ZSNES Performance Questions

Strictly for discussing ZSNES development and for submitting code. You can also join us on IRC at irc.libera.chat in #zsnes.
Please, no requests here.

Moderator: ZSNES Mods

Post Reply
tcaudilllg2
Hazed
Posts: 77
Joined: Fri Mar 21, 2008 12:52 am

ZSNES Performance Questions

Post by tcaudilllg2 »

- of the 500Mhz recommended to run ZSNES, is it known approximately how these mhz are divided between tasks? If not, how might it be?
- which is performed faster: the interpretation of program source or the graphics rendering/PPU? Why? To what degree is sound processing a burden?
Last edited by tcaudilllg2 on Thu Mar 27, 2008 5:03 am, edited 1 time in total.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Re: ZSNES Performance Questions

Post by grinvader »

tcaudilllg2 wrote:- of the 500Mhz recommended to run ZSNES, is it known approximately how these mhz are divided between tasks? If not, how might it be?
90 MHz stoeling your bike
90 MHz haxxoring in the yuor RAWMZ
90 MHz in ur base, killing ur dudes
90 MHz drinking your beer
90 MHz raping lolis
50 MHz emulating the snes
- which is is performed faster: the interpretation of program source or the graphics rendering/PPU? Why? To what degree is sound processing a burden?
Current versions of zsnes' main bottleneck is copying to vram, iirc.
Last edited by grinvader on Thu Mar 27, 2008 6:39 pm, edited 1 time in total.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
I.S.T.
Zealot
Posts: 1325
Joined: Tue Nov 27, 2007 7:03 am

Re: ZSNES Performance Questions

Post by I.S.T. »

grinvader wrote:
tcaudilllg2 wrote:- of the 500Mhz recommended to run ZSNES, is it known approximately how these mhz are divided between tasks? If not, how might it be?
90 MHz stoeling your bike
90 MHz haxxoring in the yuor RAWMZ
90 MHz in ur base, killing ur dudes
90 MHz drinking your beer
90 MHz raping lolis
50 MHz emulating the snes
:lol: :lol: :lol:
Kajuru
Regular
Posts: 253
Joined: Wed Oct 18, 2006 6:43 pm
Location: localhost

Post by Kajuru »

I ran Zsnes in my 086.
tcaudilllg2
Hazed
Posts: 77
Joined: Fri Mar 21, 2008 12:52 am

Post by tcaudilllg2 »

So what's the deal with the PPU bottlenecks?

Here's something I imagine is quite bothersome.

http://en.wikipedia.org/wiki/Super_Nint ... stem#Video
The PPU may be instructed to latch the current pixel position at any time during image output, both by game software and by the device attached to controller port 2. The game software may then read back this latched position. The PPU may also be used for fast 16-bit by 8-bit signed multiplication.[49]
To synthesize that WITHOUT drawing all the pixels in some parallel process seems to me very complicated. To put a simulation of the draw in the main loop would require that it made 64,000 pixels a frame... which is ridiculous.

How did you guys handle this?

What about the VRAM is slow?
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

tcaudilllg2 wrote:What about the VRAM is slow?
Sending data to it.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
declan
Lurker
Posts: 194
Joined: Thu Jan 03, 2008 12:45 am
Location: Austalia

Post by declan »

Do the SNES PPU's have 65816 cores like the CPU?
Hardware means nothing if you don't have good software.
Compare the success of SNES over Genisis
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

tcaudilllg2 wrote:So what's the deal with the PPU bottlenecks?

Here's something I imagine is quite bothersome.

http://en.wikipedia.org/wiki/Super_Nint ... stem#Video
The PPU may be instructed to latch the current pixel position at any time during image output, both by game software and by the device attached to controller port 2. The game software may then read back this latched position. The PPU may also be used for fast 16-bit by 8-bit signed multiplication.[49]
To synthesize that WITHOUT drawing all the pixels in some parallel process seems to me very complicated. To put a simulation of the draw in the main loop would require that it made 64,000 pixels a frame... which is ridiculous.

How did you guys handle this?

What about the VRAM is slow?
Simple... We use SIMD

And most of the time it's only 114 688 bytes per frame if you are looking at a 256x224 frame with a 16bpp (yes I know it's 15bpp but we pad a bit for performance reasons).
Watering ur plants.
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

declan wrote:Do the SNES PPU's have 65816 cores like the CPU?
No.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
Exophase
Hazed
Posts: 77
Joined: Mon Apr 28, 2008 10:54 pm

Post by Exophase »

Hope it's okay if I respond to this kind of old thread.
tcaudilllg2 wrote:So what's the deal with the PPU bottlenecks?

Here's something I imagine is quite bothersome.

http://en.wikipedia.org/wiki/Super_Nint ... stem#Video
The PPU may be instructed to latch the current pixel position at any time during image output, both by game software and by the device attached to controller port 2. The game software may then read back this latched position. The PPU may also be used for fast 16-bit by 8-bit signed multiplication.[49]
To synthesize that WITHOUT drawing all the pixels in some parallel process seems to me very complicated. To put a simulation of the draw in the main loop would require that it made 64,000 pixels a frame... which is ridiculous.

How did you guys handle this?

What about the VRAM is slow?
There's no need to interleave pixel processing with CPU processing in order to emulate the raster position, which is not at all dependent upon what is being drawn. If you know how many cycles have passed since the beginning of the frame (or more likely the beginning of the scanline) then you can figure out the position directly because it's drawn in a deterministic way. Chances are that not a lot of games rely on horizontal positioning, though.

As of right now I don't think any SNES emulator interleaves pixel operations with the rest of the emulated operations, or has any other provisions for emulating mid-scanline raster effects (what the SNES will allow you to do I'm not 100% certain of). As far as byuu has indicated, there are no SNES games that strictly rely on this and won't work being rendered a scanline at a time. Nonetheless, I know he is at least working on a version of BSNES that can emulate this correctly.
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

I'm gonna delete every post that goes beyond my gag reflex on stupidity now.

If you got beef with it, PM me and maybe I'll tell you how stupid your post was... I mean, answer them.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Post Reply