Open Kroc opened 6 years ago
Something I have noticed now that I am able to re-arrange segments in memory is that we should place all page-aligned segments together so as to avoid wasted bytes between the end of a flexible segment (such as code) and data-tables that must be page-aligned.
For the benefit of also producing a #4 cartridge version, we want to place the aligned segments in the upper-memory region where the cartridge banking occurs as we want to mostly use the cartridge to bank in/out data-tables and not code.
I've got the game working on VIC bank 3 ($E000..$FFFF); there remain a few bugs related to the move, but once they've been rectified, we can move to the new layout permanently and this bug can be officially closed!
I can't say for certain this will be beneficial, but moving the VIC-II bank from $4000...$7FFF to $C000...$FFFF may make things simpler:
The VIC-II always gets screen / sprite data from RAM regardless of the presence of ROM shadows; if the text screens and sprites were stored in $D000...$DFFF, then we would not need to switch the I/O shadow on and off so much
With the bitmap screen located at $E000...$FFFF, there would not be a need relocate data in the disk-file -- code/data is stored in the bitmap area in the disk file and moved out during initialisation -- instead the disk-file can simply stop before the text-screens. this saves code space and simplifies any fast-loading (make the game one file)
Other observations: