Has anybody tested the timings of mednafen compared to the hardware? Don’t get me wrong I’m not knocking mednafen at all, without it I wouldn’t have been able to do anything with the VB but In developing my compo entry I put in a counter incremented by an interrupt and displayed the maximum count that was reached for any game frame. I was looking for overall performance and beginning to search for bottlenecks. I used mednafen’s built in option of “-vb.cpu_emulation accurate” which is suppose to be “close” to actual timings according to the doc. However in mednafen my demo had a maximum count of around 203 for any game frame. On the hardware this number was close to 800. Like I said I’m not putting down mednafen at all, i use that emulator for all my old roms, but a 400% difference in a simple timer doesn’t seem like “close” to me. I either see it as the emulated hardware timer is off or mednafen isn’t calculating clock cycles per operation correctly. I’ll try to dig into it at some point but figured somebody else my have already and could save me some time.
The V810 manual only gives best case (cache hit) instruction timings, which probably only apply very rarely in practice. The V810 used in the VB is also slightly modified and Nintendo did not document how it differs from the standard one, other than that it implements some extra instructions (whose timings are also undocumented, except for MPYHW). The VIP timings are entirely undocumented too.
Mednafen’s VB emulation is not CPU-timing-accurate, and it was not designed to be CPU-timing-accurate, for performance and other reasons(it runs code faster than the CPU on an actual VB, mostly due to lack of wait state emulation and lack of register hazard pipeline stall emulation or whatever it’s called).
It’s not VIP draw timing accurate either, but that was a bit more due to lack of test data.
This reply was modified 10 years, 9 months ago by Mednafen.
I completely understand emulating something at higher speeds if possible. I also get that if there isn’t any doc on something like VIP timings it makes it rather difficult to emulate. It just would have saved me a ton of time since I don’t actually have a VB and was expecting better performance out of the hardware. Finding what pieces of my code are actually bottlenecking on the hardware is near impossible since I can’t test on hardware and they don’t appear to be bottlenecking on the emulator at all.
Anyway thanks for the replies and info. Appreciate it.