|
| | slinga said: |
Hey all,
I'm doing a little research in the Saturn BIOS in my free time. Anybody have any notes, doc, etc to get started? Some things I'm still murky on:
1) After power on, what's the first address executed? The BIOS is located at 0x00000000 - 0x00800000. Address 0 is not the starting address. According to Yabause source, execution starts at 0x06001088, but that doesn't make sense as that's located in the Work RAM, not the BIOS. Setting a breakpoint on SH2Exec() it looks like the first address is 0x20000200 which is the area immediately following the BIOS.
|
Upon a hardware reset, the CPU fetches the word at 0x00000000 and uses that as the entry point. That is, 0x00000000 isn't the entry point itself, but it's a pointer to the entry point. Keep in mind that 0x20000200 is still the BIOS ROM, just with the cache bypassed (in other words, be careful not to confuse the first and second digits of the address, because they have very different practical meanings). 0x20000200 refers to the same physical address as 0x00000200.
| |
2) When attaching an action replay, the whole things get mapped to CSO (0x02000000 - 0x04000000) and not the Work RAM area correct?
|
Right, but the firmware does end up running from work RAM; the BIOS first copies the header/AIP to work RAM (IIRC, at 0x06002000, with the AIP entry point probably being 0x06002F00), and then the AIP code copies the AR firmware into work RAM and jumps to it. |