You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#1
Mednafen Emulation Timings
Posted on: 2014/2/22 15:16
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
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.
Top

#2
Re: Mednafen Emulation Timings
Posted on: 2014/2/22 18:18
PVB Elite
Joined 2008/12/28
Slovenia
628 Posts
Highscore Top ScoreHighscore Top ScoreCoderContributor10+ Game RatingsLong Time User (10 Years) App CoderPVBCC 2010 EntryPVBCC 2013 Entry
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.
Top

#3
Re: Mednafen Emulation Timings
Posted on: 2014/2/22 20:31
VB Gamer
Joined 2008/7/19
35 Posts
Long Time User (11 Years) App Coder
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.
Edited by Mednafen on 2014/2/22 20:45
Top

#4
Re: Mednafen Emulation Timings
Posted on: 2014/2/22 21:49
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
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.
Top

 Top   Previous Topic   Next Topic


Register To Post