z80playground / cpm-fat

CP/M for the Z80 Playground that runs on the FAT disk format
GNU General Public License v3.0
20 stars 9 forks source link

monitor.asm code size larger than current 16k ROM->RAM copy #71

Open tegerdine opened 3 years ago

tegerdine commented 3 years ago

The current monitor executable is 0x4A92 bytes long. During boot a LDIR copies the ROM contents to RAM to allow the ROM to be mapped out without losing the monitor functionality. The monitor only copies 0x4000 bytes across, missing the tail end of the GameOfLife demo, which therefore crashes if started with ROM mapped out. Since the default EEPROM is now 32kB, perhaps this copy should do it all?

skx commented 3 years ago

Steps to reproduce:

tegerdine commented 3 years ago

18k isn't quite enough. 181024=0x4800, wheras the ROM extends to 0x4A92. To copy all of the data in the current ROM you need to copy (19 1024) bytes. However, I would argue that copying the whole 32k instead will prevent this issue returning in the future.