NES: Move .nes header functionality out of makebin
- Move all .nes header related functionality into a new utility gbdk-support/makenes
- Update LCC to use makenes for .postproc member of build process, with mapper30 header parameters hard-coded for now
- Update makefiles to build makenes
- Add Makefile commands to generate output for the toolchain settings doc page
- Add documentation section for makenes in 06_toolchain.md
Changes to gbdk-lib/include library headers:
* Make NONBANKED / BANKED macros in asm/mos6502/types.h expand to respective keywords instead of being no-ops
* Remove force-zero-bank version of INCBIN macros in gbdk/incbin.h in favour of regular version
* Make BANK / BANKREF macros in nes/nes.h use appropriate implementation instead of stubs
* Add SWITCH_ROM_UNROM macro, and make SWITCH_ROM use it in place of SWITCH_ROM_DUMMY in nes.h
* Add stubbed no-op versions for SWITCH_RAM / ENABLE_RAM / DISABLE_RAM in nes.h, to support cross-platform tests
changes to gbdk-support tools:
* Remove CODEFIXED segment at 0xE000 in lcc/targets.c, relying only on _CODE at 0xC000
* Make ld command use -a nes, to use virtual address translation from sdld_virtual_address_translation.patch
* Update bankpack to support "nes" as option (uses GB platform)
* Update makebin to perform NES specific bank fix (rotates ROM by one bank, putting first bank as last)
* Update png2asset to initialize bank to -1 and write #pragma bank for banks = 0, to remove assumption on bank 0 being the fixed bank
Changes to gbdk-lib/libc implementations:
* Add implementation of to_far_ptr and call__banked in targets/mos6502/far_ptr.s
* Add UNROM bank switching macros in targets/mos6502/nes/mapper_macros.s, and __swith_prg0 function in targets/mos6502/nes/mapper.s
* Add banked call support routine ___sdcc_bcall in targets/mos6502/nes/sdcc_bcall.s
* Add code to initialize switchable bank to 0 at reset in crt0
Depends on sdcc_mos6502_underscored_areas.patch, sdcc_mos6502_bank_support.patch and sdld_virtual_address_translation.patch applied to SDCC
* Add new input parameter -N to output ines
* Add new structure nes_opt_s for describing iNES flags
* Add function write_ines_header to write 16-byte iNES header to file from nes_opt_s
* Set default iNES values to mapper2, 32kB PRG, horizontal mirroring
* Modify read_ihx to allow applying an optional rom_base_offset to addresses, set to 0x8000 for iNES
* Replace gbdk-support/makebin/makebin.c with sdcc-svn/sdcc/support/makebin/makebin.c@r12975
* Edit Makefile to build this makebin, and install it instead of the one in the patched sdcc build