- Joined
- Feb 10, 2009
- Messages
- 5,484
- Trophies
- 2
- Location
- Sacramento, California
- Website
- lazerlight.x10.mx
- XP
- 5,522
- Country
Nice!
I wonder if using a function pointer table over a big switch will improve speed much, though. Compilers generally turn big switch statements into jump tables.
However, something that could give you more speed would be storing the 6502 registers in ARM registers rather than in RAM. lolSnes/blargSnes do it this way, and I think SNemulDS goes even further but I haven't looked into it much. But the overall idea is to do the least RAM accesses possible. I don't know how slow the 3DS RAM is, but on the DS the main RAM is slow as shit, so yeah.
DS RAM is pretty bad. Memory and I/O accesses are delayed to 33Mhz as opposed to 66Mhz (which is only with cache and tcm), and it's further dropped by a hardware glitch that adds 3 wait cycles to all non-sequential access on the NDS9 side, resulting in the bus clock to about 8Mhz.