gb6: game boy emulator for System 6

I think the speed increase would come from the fact that optimized 68K code would read from aligned addresses? The emulator has to check for this alignment and use the slow path for unaligned accesses. Compare the instruction cycle counts in the CPU manual between aligned and unaligned accesses to see if this can be true.

Mac OS APIs are full of structs with 32-bit members that are only 16-bit aligned. For example, the parID field of FSSpec and portBits.baseAddr of GrafPort.

(I think you were clear on this, but in case I confused anyone else, I was talking about emulating 68K code on a little-endian host.)
 
Mac OS APIs are full of structs with 32-bit members that are only 16-bit aligned. For example, the parID field of FSSpec and portBits.baseAddr of GrafPort.

(I think you were clear on this, but in case I confused anyone else, I was talking about emulating 68K code on a little-endian host.)
I think both I and @joevt still thought this was about emulating a Game Boy (not GBA, nor Color Game Boy) on a 68000 Mac, as per the beginning of the thread. If, e.g. you're thinking about emulating a 68000 on ARM you might want to check out the posts and comments on MØBius (unless you've already chatted to me about that. No, just checked, that was @nicovr ). MØBius is a 68000 emulator written in ARM Cortex assembly code in under 6kB and will be able to emulate a Mac Plus on a standard 125MHz Raspberry PI PICO RP2040 (or RP3250), at least full speed.
 
Back
Top