Top

New Version Of The SNES Emulator ZSNES

August 14, 2008 by Hawq 

The excellent SNES emulator ZSNES gets an update now with the SPC7110 pack loading code removed, why? you ask read on to discover the reasons:

    v5:
    Changes:
    _Demo_ and I optimized the code even more, to the extent that we don´t think there´s anything else significant we can do.
    Fixed a bug with save states/rewind that Deathlike found.
    Removed the gfx packs stuff from the GUI and config file.
    Added to the config file an option to turn off the graphics cache.
    The cache isn´t used if there´s not enough free memory, but you can play SPC7110 games anyway.
    Cleanup.
    Post results of speeds with the cache on and off (changing the setting requires ZSNES to be restarted). I´d appreciate if people with sub 1 GHz machines can post some FPS and CPU info with and without cache.
    Todo:
    Post source changes for people who want them.
    Coordinate with some translation teams to get the 4 SPC7110 games translated. If you need a special build of ZSNES for something, or some info which I can provide, let me know.
    Party?
    v4
    Okay, _Demo_ pointed out some relics of neviksti´s code still in our optimized version. I rewrote some of the tightest loops to use 64 less bytes of memory, and only loop 25% of the amount of loops it was currently doing.
    v3
    Okay, anomie and I rewrote pretty much all of neviksti´s code and seriously optimized it like nuts. We still have a little bit more that we can optimize (and hopefully will), but we´re MUCH faster now.
    This build offers over the previous build even more optimized decompression, and a persistent cache (which at this point I don´t think we really need anymore).
    v2
    I optimized neviksti´s decompression code a bit more, but this isn´t the good part. I wrote a completely new caching algorithm which is able to cache the complete decompressed data for any game, and search for entries with an upper bound of O(6). What this means, is that once the game already saw a graphic, it´ll be able to recall it instantly. Some initial screens may be slow, but if you ever come there again, it should be full speed. So for example, the first time or two watching the FEoEZ intro, I would have it dipping to 55 FPS on occasion, but after that, all repeat loops are full speed. Also, how long it dips for initially should be less as well, since the games keep on re-decompressing graphics multiple times on each screen, now, that´s been completely eliminated. Hold down fast forward, you may be surprised. In SPL4, in the field, I´m now able to get 196/60 FPS. I also redid the save state code again. It should now generate save states approximately 64KB smaller than before, which are obviously incompatible with previous build. I also double checked the movie code, so that should work too, unlike the previous build which had some issues there.
    Todo:
    Finish optimizing neviksti´s decompresser so initial loads are even quicker.
    Perhaps offer an option to save the cache to disk, so every time you reload a game, it doesn´t have to rebuild it. Let me know if you guys want this or not.
    Clean out the old pack path stuff from the GUI and the config file.
    v1
    This is v1.51, with the SPC7110 pack loading code removed (although I didn´t remove the GUI stuff for it yet), and real decompression added.

    Save states with this version are not compatible with SPC7110 save states of pack loading versions, however SRMs should remain compatible.

    Thanks for the code is as follows:
    SPC7110:
    Research by Dark Force, zsKnight, and The Dumper.
    Implementation by zsKnight, Jonas Quinn, and Nach
    Decompression:
    Research by neviksti, Andreas Naive, and jolly_codger
    Implementation by neviksti, Nach, and TRAC
    With lots of help from CaitSith2

    I spent the better part of two days trying to optimize as much as I could the decompression code, since it was really slow, I was only getting 16 FPS on my 2.5 GHz machine in some cases. Now I get 60/60 and it uses ~20% CPU.

Download from the release thread or below.

ZSNES For WindowsZSNES For Windows (502.4 KiB, 467 Downloads) - Version 1.51 SPC7110 Test Build

ZSNES for DosZSNES for Dos (731.8 KiB, 72 Downloads) - Version 1.51 SPC7110 Test Build

ZSNES SPC7110 Source Code ChangesZSNES SPC7110 Source Code Changes (126.9 KiB, 66 Downloads) - Version 1.51 SPC7110 Test

Looking for our ZSNES Page? Click below!

    ZSNES - Downloads, Screenshots, and More!

Comments

RSS feed | Trackback URI

Comments »

No comments yet.

Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

Trackback responses to this post

Bottom