Jump to content

bSNES WIP Update!


Alpha

Recommended Posts

bSNES is a Super Nintendo Emulator for Windows.

 

    Most importantly, I received my copy of Visual Studio 2005 Pro, so now I can use profile guided optimizations on bsnes. This will give the emulator a 10-20% speed increase, depending on the game. I'll only be using this feature on final builds, and not WIP versions, as it takes significantly longer to compile this way.

 

    Next, to speed things up some more, I added #ifdefs around all of the debugging functions inside the core. That means a Windows port can now be compiled with no debugging extensions, which gives a nominal ~10% speed increase as well.

 

    Finally, I improved the BG and OAM rendering a bit. First, I fixed a possible buffer overflow in the tile cache lookup for BGs, and second, I corrected two bugs in the OAM renderer, and generally rewrote a lot of the code in an attempt to clean things up. The first bug was due to incorrect tile wrapping. An example: if you specify a 16x16 sprite indexed at character=15, then the SNES will loads tiles 15 (top left), 0 (top right), 31 (bottom left), and 16 (bottom right), and not 15, 16, 31, 32. So (character + x) becomes (character & ~15) + ((character + x) & 15). I don't know of any games it fixes, and in fact, most emulators don't emulate this correctly anyway. The second bug was due to me handling hires OAM sprites differently. Before, I was casting the sprite X position by two for hires, and performing screen wrapping based on that value. This is incorrect. The OAM data is actually still rendered using only the 256-width X position, so I adjusted the OAM renderer to just double up each final OAM pixel during the final stage of OAM rendering. This fixes an RTO bug in Madara 2, and the scrolling background image in the first screen for Tokimeki Memorial. Please note the below two screenshots are from hires (512x224) mode games, but the screen was scaled down to 256x224. The screens look better when at the proper scale ratio.

 

bs1899kb.th.pngbs1903zb.th.png

»» bSNES WIP Page

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...