Exophase said:
I updated the gpSP blog with what I've been working on. It's really technical so if you half understand something ask questions to help understand the other half. *_*
Very interesting. You have some great ideas. I wouldn't have realized that self-modfiying code was still so common.
The GBA doesn't really need cache as the 32K IWRAM runs with zero wait states anyway?
Would dynamic recompilation be more difficult for machines with larger amounts of RAM, like the NDS? Or with multi-CPU machines, again, like the NDS? I would imagine synchronizing the CPUs would be more difficult? In fact how is synchronization done now? Using an interpreter you can just count the cycles as you go - with a dyna rec....?
Anyway, nice blog update and I'm looking forward to future releases! (Both PSP and GP2X).
You're right that GBA doesn't "need" cache per se, but it would have sanitized things a decent amount.
Fortunately Nintendo DS does have instruction cache and can't just do self modifying code without invalidating it (which is a major tipoff for a recompiler). Actually, this is the saving grace that could make partial virtualization MAYBE possible (but please don't take my word for this). Synchronization is a pain to get accurate, but it depends on how much accuracy the games need. Same goes with all timing issues.
Dynarec wouldn't inherently be worse on the Nintendo DS than the GBA, because while the DS has a lot more RAM it actually has a lot less addressible code space (since there's no mapped cartridge, unless you plug a GBA cart in of course)