Jump to content
IGNORED

About roms start address


Nop90

Recommended Posts

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.

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...