Re: [Tuxnes-devel] more help w/ asm
Brought to you by:
tmmm
|
From: Jim U. <ji...@3e...> - 2001-04-12 14:52:13
|
At 08:10am on 2001 April 12, Mike Melanson did write: > On Wed, 11 Apr 2001, Jim Ursetto wrote: > Right. These are all well-known issues with the dyn-rec > approach. Well, don't I feel silly now. I thought the dyn-rec engine was poorly understood except by the original author. Glad to hear that. > > and it's very fast, nearly 10 times faster than the Nofrendo core, > > using the none renderer. > > 10 times faster? Really? Finally, some real speed comparisons. > However, how much time does the program spend simulating the 6502 in > comparison to, say, rendering the graphics 60 times per second? I think it'd be difficult to get a pure measure of 6502 emulation speed, unless someone has a long sequence of varied instructions that don't depend on input or output. Barring this, I simply used the none renderer, decoupling it from 60fps vertical refresh by commenting out the sync code. Whenever UpdateDisplayNone() is called, it increments a global frame count. Input and output routines are still called normally, because otherwise the cart wouldn't progress. The I/O routines call drawimage, but this is a no-op. So the approximate overhead is: - input and output routines - CLOCK, CTNI, VBL, etc. variables updated - fiddling based on register - drawimage no-op - interrupt routine - CLOCK etc. variables updated - UpdateDisplayNone no-op No rendering is done at all. The remaining overhead, I suspect is concentrated in the I/O routines (the "fiddling" part). Speed-wise, on a Celeron 366 I get: dyn-rec engine: 4250 fps nes6502 core: 600 fps M6502 core: 440 fps So let's say 7 times faster. This was timed several times with Super Mario Brothers, using the eyeball-and-watch method, over a 1 minute period, dividing total frames by 60. Admittedly not the most accurate method, but gives you a general idea. At one time I had implemented an accurate fps counter, but not in this copy of the code. When rendering is turned on, and synced to refresh, there is no appreciable difference in rendering speed on my system. I.e., it runs at a full 59 or 60 fps at 400x300 (unscaled), when run with full-screen DGA or GGI. However, I haven't done any speed comparisons with rendering on but without vertical sync. That might be interesting. It's too bad I still have that slowdown problem with my Maestro2 soundcard. It's not as fun without sound... -- "... [WM97/Melissa-V] triggers immediately and attempts to delete data on your M:, N:, O:, P:, Q:, S:, F:, I:, X:, Z:, H:, and L: network drives." ji...@3e... / 0x43340710 / 517B C658 D2CB 260D 3E1F 5ED1 6DB3 FBB9 4334 0710 |