Nop90 Posted December 5, 2018 Share Posted December 5, 2018 Just for curiosity (probably this is a silly question). Why is so common in 4kB commercial roms to have start address at 0xF000? (same for 2kB roms starting at 0xF800). My idea is that this could be related to the original atari dev kit. Maybe to run the code in debug mode on the host developement machine in a memory area normally unused. Or maybe it's only a coding convention. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted December 5, 2018 Share Posted December 5, 2018 Most likely because 6502 assembly programmers are familiar with this - Internals of BRK/IRQ/NMI/RESET on a MOS 6502 SIGNAL VECTOR NMI $FFFA/$FFFB RESET $FFFC/$FFFD IRQ/BRK $FFFE/$FFFF By setting the ROM start at $F000 (or $F800 for 2K) then those vectors end up where people expect them to be even though the 6507 treats $1FFA, $3FFA, .., and $FFFA as the same address. Quote Link to comment Share on other sites More sharing options...
Nop90 Posted December 5, 2018 Author Share Posted December 5, 2018 Thanks, this makes sense. So after all it's a coding convention. By setting the ROM start at $F000 (or $F800 for 2K) then those vectors end up where people expect them to be even though the 6507 treats $1FFA, $3FFA, .., and $FFFA as the same address. This brings to my mind that I made an error with some code I wrote to relocate roms to phisical 13 bits addresses (trying to save some instructions to make z26 run at acceptable speed on the 3ds); I relocated 2k roms to 0x1000, just like 4k roms, but the correct position should be 0x1800 to have the interrupt vector(s) at the right position. Strange thing is that the relocated roms work fine on the emulator (using javatari), but probably it's because the emulator, with 2k roms, ignores bit 13 of the addresses (just like happens with phisical 2k cartridges) Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted December 10, 2018 Share Posted December 10, 2018 Actually, this is also how the 2600 operates. With a 2k Rom, the other half of the 4k block does not exist. Access to $1000-17FF is then treated the same as access to $1800-$1FFF. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.