@Stef : it's more a 32X problem I guess. On Gens, it seems that you don't need to clear the Clear register before returning from exception. On Kega, it's mandatory.
@Kan' : well, I had to fix it a little bit and I can't reach anything higher than 25fps (PAL 240) or 27fps (NTSC) on Kega, 28 and 30 on Gens.
Still not that bad, but room for improvement, innit ?
The real deal here is A-Plane (foreground and transparency). Writing each pixel byte per byte takes foooooooooooorever. 34 instr / 16 pixels, not higher than 47fps (NTSC) alone.
With the B-Plane (background, no transparency), I hit 21 instr / 16 pixels, 61 fps (NTSC).
Computing the scrolling isn't that expensive.
NB : 25 instr for a transparent tile line, 42 for a solid tile line => 33,5 instr avg, if 50% of the A-Plane are fully transparent
Oh, and about my fears when I started this project.
Contention doesn't seem to be a problem. Or the emulators don't pay attention to it.
Concurrency isn't a issue either.
I haven't tested cache influency extensively. I don't know if Kega uses it.
320 * 112 / 16 * 21 instr for B-Plane, then 320 * 112 / 16 * 34 for A-Plane = 47 040 + 76 160 = 123 200 instr / frame.
And with 27 fps, I reach 3.33 MIPS @ 23MHz. I don't know it it's that good, or even if these numbers have a meaning.
NB : 112 lines since each CPU draws only a half-screen for both planes.
Anyway, I guess it's time for showtime.
And even if there are some graphical glitches to fix,
even if the comm should allow noDMA,
even if there's just one scrolling mode (line H, 2-cell V),
here it is :
The numbers you see in white are for Kega (no Kmod ;) , thank you Chilly) and are the Comm Port :
- comm from the Master
- number of frames drawn by the Master
- comm from the Slave
- number of frames drawn by the Slave
- comm from the 68k
- this page intentionnaly left blank ( :D )
- SuperVDP register
NB : no vSync on this version.
No source yet : I'll publish 'em when it's fixed.