||Snes9x.COM: Developers Journal
|New Linux Release Soon
Here are the features it will have:
Corrected the colour addition/subtraction and halve the result code not
to halve the result when only the fixed colour is used, i.e. the sub-screen
is clear. Discovered and fixed this awhile ago, but I accidentally reintroduced
the bug when adding some optimisations a few versions back.
Finally cleared the last of the offset per tile background mode bugs. There
was something odd about the tile at the left-hand edge of the screen that
I couldn't figure out - well now I have. Yoshi's Island level 6 boss screen,
Mario RPG mine cart screen and Jim Power title screen now all display correctly.
Made reading blank areas of the SNES memory map return the middle byte
of the address - fixes Home Alone which tries to execute code in an empty
part of its memory map but only works because the real SNES seems to return
the middle byte of the address - $60 in this case, which corresponds to
the ReTurn from Subroutine instruction.
Added auto-cycle skipping disable for Earth Worm Jim 2 and several other
games that spool sample data using H-DMA as the sample is being played.
Improves some sound effects in these games.
Fixed joy-pad routines to only report up or left if down or right are also
pressed respectively. Works around a game bug in Empire Strikes Back in
the asteroid stage where the game crashes if both left and right are pressed
- something impossible to do on the original SNES game-pad.
Added custom SPC700 timing for Rendering Ranger R2 - the game now works
with full sound. No idea why it needs custom SPC700 timing.
The ROM type detection was broken for Treasure Hunter G and Test Drive
2 - fixed the code so type 2 ROMs can be LoROM.
Adjusted the main CPU cycles per scan-line from 341 to 342 to give an exact
match for the timing required for Earth Worm Jim 2. All EWJ2 needs now
for perfect sound emulation is a method of synchronising the emulation
speed to the host hardware's sound card playback rate and a fast CPU. The
Linux port already has this but seems to be broken because games play at
double-speed when this option is enabled.
Some SPC700 code in Earth Worm Jim 2 seemed to prove that I had guessed
the clock speed of the SPC700 sound CPU incorrectly - out by almost a factor
of two, in fact. Changed the relative emulated clock speed of SPC700. Now
Chrono Trigger doesn't lock up at certain points anymore, the special SPC700
timing for games written by the Human Software company isn't required and
you can hear some more of the sound samples in Earth Worm Jim 2, etc.
H-IRQ triggering code was broken - if a ROM turned on H-IRQ but later turned
it off, Snes9x could continued to generate H-IRQs, crashing some games.
Added a generic test for Human Entertainment games - they need special
sound CPU timing to work. Gets Taekwon-Do working.
Disabled offset-per-tile mode for Theme Park; the world map screen is corrupt
with it enabled.
Yet more changes to the offset-per-tile backgrounds modes 2 and 4. Added
64 tile wide screen support for Mario RPG's mine cart ride and fixed multiple
bugs with the handling of horizontal offset-per-tile used in Chrono Trigger's
fade in of the space ship.
New feature: Snes9x can now load ZSNES freeze state files! Just copy them
into the freeze file folder and Snes9x will load them when you load a freeze
file, but only if the corresponding native format Snes9x freeze file doesn't
Added memory map hack for Batman - Revenge of the Joker: its ROM header
block is in the wrong location and Snes9x incorrectly detected its ROM
Fixed an off-by-one-pixel clip win
Gary, 6-1-2001 7:35:00
|Problems with release v1.33
I've broken Super FX emulation while adding C4 emulation, sorry about that. I'm investigating; expect a new release soon.
Also, I included an old CHANGES.TXT file in the Windows .zip and setup releases so people might not realise that C4 emulation (for Megaman X2 and X3) has been added. Here is what is missing from the CHANGES.TXT file:
- Noticed another problem with the CPU_SHUTDOWN code - Chrono Trigger locked
up during the intro but only when using the asm code CPU core. Found the
algorithm difference between the code and made the CPU match what the C
version was doing. Still not sure why it caused a problem in the first place.
- Changed colour subtraction code to use Lindsey Dubb's newer version he sent
me some time ago but I 'forgot' to include. I say forgot, but I really put
off including it because, although it improves most games that use the
effect, it does result in one or two slight visual glitches.
- Hacked in zsKnight's C4 emulation asm code - now both Megaman X2 and X3 are
playable. Still got to complete the reverse engineering of the i386 asm code
to C so other, non-Intel ports can have C4 emulation.
- Shuffled the keyboard mapping a bit on the Linux port so now Tab key acts as
an emulation speed turbo button, `, # and ~ act as superscope turbo and
/ acts as the superscope pause button.
Gary, 4-11-2000 5:03:00
Well, I've just released a new Snes9x version with C4 emulation emulation for Megaman X2/X3 courtesy of zsKnight, thanks!
After I've finished converting zsKnight's asm code to C for non-Intel Snes9x ports, I'll have some 'free' time to work on other Snes9x features until sometime early in the New Year when I get a new notebook computer with some 3d hardware acceleration so I can work on OpenGL/DirectX3D SNES screen rendering. The question is what to work on?
People have suggested adding more freeze file save slots to the Windows port, but how would it work? Do people prefer ZSNES's way of saving where you select a slot, then save or Snes9x's way of selecting a slot and saving at the same time by pressing Shift+Fn Key? Should each slot act as a ring - saving into a slot 'pushes' the current save out of the way, then repeatedly loading a slot rotates through all the save games in that slot? How would you delete saves? Should pressing a function key to load a slot ask before loading, or should the current game be auto-saved first so you could 'undo' the load?
What about sound and SPC file saving? Snes9x already has SPC file saving, should it be improved to provide a slot feature?
What about a pause-then-single-frame-advance feature? Would anyone use it? Should Snes9x support saving screen dumps directly (which graphics format) or is the current copy-paste approach more flexible?
Should I spend all my 'spare' time trying to get S-DD1 emulation working for Street Fighter 2 Alpha? I know that zsKnight has already spent considerable time on this already, but couldn't work out the graphics compression algorithm the chip was using. Maybe the data is encrypted as well as compressed, so trying to implement S-DD1 emulation would be a waste of time?
Then there's AntiRes's asm SPC700 emulation that I never did get working satisfactory enough to include in a release - should I spend more time on that? If I could get it working, it would give Snes9x a substantial speed boost (for Intel ports)...
What about MMX colour addition and subtraction code? Graphics rendering and colour blending effects are two of the most CPU intensive operations that Snes9x has to perform; adding some asm code here would certainly help speed up Snes9x. Having said that, adding OpenGL/DirectX3D SNES rendering will speed up all ports, not just Intel-based ports.
Any other suggestions? Ideally, get yourself a login on the forum and post our idea there, or failing that, e-mail me.
Gary, 3-11-2000 19:33:00
|September Snes9x Update
I've been going through some of my old problem and to-do lists and trying to get a few non-working games working. I've got Traverse working - a ROM bug that was triggering a Snes9x bug was the problem there. I discovered a problem with my fixed-colour half-brightness code - now in-game menus on several games look correct. I also spotted I wasn't wrapping V-RAM addresses on all cases causing one or two corrupt screens on a few games.
I'm currently working on SA-1 game speed ups, similar to what I've done already for the main SNES CPU and sound CPU, and what zsknight has already added to ZSNES. Basically the SA-1 sits in an idle loop most of the time waiting for the main SNES to give it something to do; the trick is to spot this and stop emulating SA-1 instructions until it gets 'woken up' by the main SNES CPU.
I first tried writing a generic method of spotting these idle loops, and it worked for about 70% of the SA-1 games, but the other 30% had complex idle loops that made them difficult to generically identify, so I've now switched to zsknight's approach and hard-wire the ROM addresses of these idle loops into Snes9x. I've only hacked the C code version so far, but already the 100% C code version now runs several times faster than the non-hacked asm version for SA-1 games!
zsknight has very kindly sent me the C4 chip information that he reversed engineered out of the Megaman X2/3 games; once I've finished the SA-1 hacking I'll release the source code then start work on adding C4 emulation to Snes9x.
I've also now got a working SNES backup unit - previously I got given one that didn't work and then bought a brand new one that also didn't work; its 16Mbit, Lo-ROM only so most games don't work on it, but it does allows a game pak with a DSP-1 chip to be plugged into the top and then for test ROMs to access the chip. Hopefully, around Christmas, I'll get some free time at home to write a few test ROMs and try and discover more about the DSP-1, with a view to getting DSP-1 emulation working for games other than Mario Kart.
Final note, my Internet gateway/firewall machine at home is beeping out Morse code error messages to me and refusing to work at the moment, so I'm unable to read and respond to e-mails. I haven't had any free time at home to install a temp replacement machine while the other one gets fixed, so don't expect replies to e-mails anytime soon...
Gary, 22-9-2000 13:26:00
|Snes9x v1.31 for Windows Released
This release is available as an installable .exe file or a as zip file for more advanced users who prefer more control over the installation process.
Unfortunately, you will need to reconfigure Snes9x after installing this new release because the diagonal key support I added makes some of the old registry settings incompatible.
Highlights of the new release include OpenGL support, Windows WAVE sound output support, DirectSound support improved and auto-detect for odd Super FX format ROMs.
Here's the full list:
- Snes9x DirectSound code modified - the mixing block size is now always 10ms
for Windows 95/98/2000 and 20ms for NT 4.x, now there should be no need to
enable Sync Sound when a large sound buffer is required (helps emulation
speed). The maximum sound buffer length values have been updated to reflect
the smaller mixing block size.
- Changed the DirectSound code back to use an offset from the play position
as the place to write new sample data into the sound buffer - on NT 4.x the
write position seems to vary randomly rather than being a fixed distance
in front of the play position as documented. Now I know why I used the play
- Changed the DirectSound code to fill the sound buffer at the write position
supplied by DirectSound, rather than just before the current play position -
should help reduce latency.
- Added an auto-detect method for interleaved mode 2 Super FX ROM images -
well, not really auto-detect: if the game crashes and its a Super FX game,
Snes9x assumes its in interleaved mode 2, demangles the ROM image and tries
to run the game again.
- Had to update the Snes9x Windows registry version number as the additional
diagonal settings make old registry settings incompatible.
- Added diagonal keyboard controls to the Windows port, as requested by
- Changed PPU code to return zero when reading non-existent registers - the
game Equinox relies on this due to an original game coding bug.
- Included FMOD sound driver support to Windows port - people experiencing
broken sound or delayed sound, etc, might want to give it a try.
- Tales of Phantasia - un-interleaved format ROM memory map changes to match
odd ZSNES format, now the hacked ROM works.
- Changed NMI again. Made reading or writing to PPU register 0x4210
clear NMI pending flag again, without this Super Tennis does not work.
- Changed NMI timing back to be the same as several versions ago and just
special cased Cacoma Knight instead - although kept the code to prevent
the re-triggering of an NNI more than once in the same frame.
Gary, 23-8-2000 11:30:00
Go back in time