elite-harmless icon indicating copy to clipboard operation
elite-harmless copied to clipboard

Memory layout improvements?

Open Kroc opened this issue 7 years ago • 3 comments

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:

  • Removing the #2 tape code and implementing a fast-loader (to minimize Kernal use) should allow us to push base memory down to $0200. I'm not certain of this in practice, but it's something to explore; an extra 256 bytes wouldn't go amiss

Kroc avatar May 23 '18 07:05 Kroc

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.

Kroc avatar Jan 26 '19 11:01 Kroc

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!

  • [ ] A small buffer is written to at $FFC0; in the original game this is empty space, but on elite-harmless this is part of the bitmap screen, so we need to relocate this. It's not clear how large this buffer is, but it's guaranteed to not be any larger than $FFC0..$FFFA

Kroc avatar Jun 24 '19 16:06 Kroc

  • [x] Rendering of the local chart is very broken in the hiram build!

Kroc avatar Mar 02 '20 19:03 Kroc