* NES: Add support for various tilemap layout (mirroring) configurations
- Introduce platform configuration, mainly to define tilemap layout NES_TILEMAP_[F|H|V|S] in platform_cfg.s
+ Add NES_TILEMAP_S|H|V|F setting for tilemap layout, and hard-code to NES_TILEMAP_S for now
+ Add NES_LOMEM setting to enable current default of using part of stack instead of BSS for attribute shadow buffer
+ Edit Makefile to copy platform_cfg.s (if it exists) to platform directory after build
- Updates to attribute shadow buffer and dirty bits:
+ Add NUM_NT define for number of nametables used by a layout, and AT_SHADOW_WIDTH/_HEIGHT to denote the variable dimensions
+ Add convenience defines NT_2W / NT_2H to quickly test whether tilemap layout is two screens wide / high
+ Define _attribute_shadow and _attribute_row/_column_dirty in terms of NUM_NT
+ Update flush_attributes to support all layouts
+ Update get_bkg_xy_addr / set_bkg_tile_xy to support all layouts
+ Update set_bkg_attribute_xy[_nes16x16] to support all layouts
+ Update set_bkg_attributes[_nes16x16] to support all layouts, and correctly wrap to next AT in both directions
+ Update set_bkg_submap_attributes[_nes16x16] to support all layouts
+ Update set_bkg_submap to support all layouts, and contain common inner subroutine .set_bkg_common
+ Replace set_bkg_tiles with simpler implementation calling .set_bkg_common, and correctly wraps to next NT in both directions
+ Add set_bkg_based_tiles / set_bkg_based_submap implementations using the new common subroutine
- Updates to C include files:
+ Define DEVICE_SCREEN_BUFFER_WIDTH/_HEIGHT based on NES_TILEMAP_ setting, doubling high-level size of WIDTH / HEIGHT conditionally
+ Add typedefs scroll_x_t / scroll_y_t as uint8_t or uint16_t based on NES_TILEMAP_ setting
+ Make move_bkg use scroll_x/y_t typedefs, set 9th scroll bit in shadow_PPUCTRL where needed, and compensate for 239->0 y wrapping
- Updates to examples:
+ Update large_map example to use platform-agnostic settings for scroll wrapping and offset
+ Update rle_map to use a uint16_t for scroll position, to support NES_TILEMAP_H and NES_TILEMAP_F settings
- Works around issue where the sdld linker tries to create matching .rst files in the gbdk install dir where it finds the empty crt0.lst, causing builds to fail if the user lacks permissions for that directory
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
The gbdk-lib-install-ports has an unwritten dependency on the
gbdk-lib-build target. the gbdk-lib-install-ports target fails if built
before the gbdk-lib-build target. In a non-parallelized build, these two
targets are built in the right order and the build works fine. In a
parallelized build, a race condition causes the targets to build in the
wrong order.
- Add license folder
- Copy license folder to build output when building
- Summarize all licenses used in the repo
- Add more explicit license files where needed
- Update contact info for Jon Fuge
* 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
* Add crt0 for NES with NMI handler performing OAM DMA, palette update and VRAM transfers via a transfer buffer at bottom of stack
* Add trivial definition of crlf in crlf.c
* Add "nes" to PLATFORMS in top-level Makefile and gbdk-lib/libc/Makefile
* Add gbdk-lib/include/nes/hardware.h and gbdk-lib/include/nes/nes.h, with hardware registers and platform function prototypes
* Update gbdk-lib/include/gbdk/platform.h to include nes/nes.h
* Update Makefiles to build nes.lib
* Add assembly support routines from sdcc-svn/sdcc/device/lib/mos6502/ to gbdk-lib/libc/asm/mos6502/
* Add gbdk-lib/libc/asm/mos6502/Makefile, based on corresponding sm83 / z80 Makefiles
* Add CPU-specific include files to gbdk-lib/include/asm/mos6502/, based on corresponding sm83 / z80 include files
* Update gbdk-lib/include/asm/sm83/types.h and gbdk-lib/include/asm/z80.types.h to define REENTRANT as no-op
* Update gbdk-lib/include/stdio.h to use REENTRANT keyword for printf and sprintf
* Update gbdk-lib/include/stdlib.h to prevent #if-clause from redefining __reentrant as a no-op
* Update gbdk-lib/include/stdatomic.h to consider mos6502 in #if-clause
* Update gbdk-lib/libc/_divulong.c to consider mos6502 in #if-clause
* Add mos6502 to PORTS in Makefile, gbdk-lib/Makefile.common and gbdk-lib/libc/Makefile
* Update Makefile to include sdas6500 and sdld in sdcc-install rule
* Add assembly support routines from sdcc-svn/sdcc/device/lib/mos6502/ to gbdk-lib/libc/asm/mos6502/
* Add gbdk-lib/libc/asm/mos6502/Makefile, based on corresponding sm83 / z80 Makefiles
* Add CPU-specific include files to gbdk-lib/include/asm/mos6502/, based on corresponding sm83 / z80 include files
* Update gbdk-lib/include/asm/sm83/types.h and gbdk-lib/include/asm/z80.types.h to define REENTRANT as no-op
* Update gbdk-lib/include/stdio.h to use REENTRANT keyword for printf and sprintf
* Update gbdk-lib/include/stdlib.h to prevent #if-clause from redefining __reentrant as a no-op
* Update gbdk-lib/include/stdatomic.h to consider mos6502 in #if-clause
* Update gbdk-lib/libc/_divulong.c to consider mos6502 in #if-clause
* Add mos6502 to PORTS in Makefile, gbdk-lib/Makefile.common and gbdk-lib/libc/Makefile
* Update Makefile to include sdas6500 and sdld in sdcc-install rule
- export OS_TARGET=Win_x32; make
- export OS_TARGET=Win_x64; make
- (use exiftool on linux to verify)
- Also fix strip executable extension during cross build
- Update some notes about building without lcc and directly using the sdcc tools
- Add sdldz80 and sdasz80 to toolchain help output page (updated main makefile to generate it, plus updated output)