- Added Direct3D renderer with options for disabling hardware filtering and scanlines
- Screenshots can now be captured in BMP, JPEG, or PNG format
- Added config file option to specify default ROM and SRAM paths
- Config file is always loaded from path to bsnes executable
- Added support for analog mode joypad input
- Up to 32 joypads can be used at once now
- Fixed bug regarding enabling interlace mid-frame
- Moved PPU rendering to V=240, from V=0
- Started on new debugger. So far only debug messages and memory editor added
- Added joypad axis resistance option for analog input mode
- Added config file option to set window style attributes
- Added color adjustment settings for brightness, contrast, gamma, and scanline intensity
- Added grayscale, sepia, and invert color settings
- Added NTSC filter by blargg, HQ2x filter by MaxSt, and Scale2x filter
- PPU now renders scanline 224
- Revampled about box
- Added Game Genie / PAR cheat code support + editor, saves codes to .cht files
- HDMA channels are no longer disabled when starting DMA, fixes Dracula X [DMV27]
- Fixes to OAM priority mode (not perfect), fixes Final Fantasy: Mystic Quest [DMV27]
- Fixed ENDX sound bug, fixes voices in Earthworm Jim 2 [DMV27]
- bsnes should now compile with MinGW [DMV27]
- Added DSP-2 support
- Added OBC-1 support
- Major rewrite of SNES address bus mirroring and MMIO handlers
- Many address mirroring corrections, fixes Dezaemon, etc
- Blocked invalid (H)DMA transfers, fixes Kirby's Super Funhouse
- Wrote Win32 API wrapper and ported all GUI code to use it, should help to create Linux GUI later on
- Revampled input system, should lead to customizable GUI shortcut keys later on
- Fixed numerous bugs with input registers. Fixes many games that previous had their intro cut off (Super Conflict, etc), and many that never accepted input (Super Double Dragon, etc)
- Moved auto joypad strobing from V=225 to V=227
- Killed OAM table caching and window range caching, as they were actually hindering speed
- Rewrote input configuration screen to show currently mapped keys
- Greatly enhanced configuration options for each video profile
- Modified fullscreen mode to exit to windowed mode when menu is activated, use F11 to toggle fullscreen mode
- Fixed bugs in txs, wai, brk, cop, and rti opcodes [DMV27]
- Fixed bug with emulation-mode IRQs [DMV27]
- Initializing DMA registers to $ff [DMV27]
- Memory writes now update CPU MDR register (open bus) [DMV27]
- Improved ROM header detection, fixes Chou Jikuu Yousai Macross [DMV27]
- Reading OAM no longer updates OAM latch
- Writing to OAM high table no longer updates OAM latch
- Writing CGRAM now updates CGRAM latch
- Improved pseudo-hires rendering [blargg]
- Much, much more
- Added GZ / ZIP / JMA archive support [Nach, NSRT team]
- Fixed bug in APU ADDW/SUBW opcode flags, thanks to DMV27, anomymous for info
- Mosaic support is now (mostly) hardware accurate, thanks to TRAC for info
- Fixed a bug in SC tilemap clipping, fixes Seiken Densetsu 3
- Emulated pseudo-hires mode, uses a fairly poor color filter to simulate TV effect, the same one that SNES9x and Super Sleuth use
- Rewrote the ROM loading code to be more port-friendly, and improved header detection
- Added C4 emulation -- mostly correct. Only minor bugs remain, possibly not C4 related [Nach, byuu], also uses code from zsKnight, Overload, and anomie
- Fixed noise channel generation for DSP, fixes Dual Orb 2 opening. Thanks to DMV27 for info
- Fixed bug with DSP VxSRCN registers, fixes horrible sound corruption in Mortal Kombat 2/3
- Modified DSP KON register reading to act according to anomie's research, while still allowing Der Langrisser, etc. to play sounds correctly
- Fixed a bug in CPU BCD math, fixes numbers in SimEarth, thanks to DMV27 for info
- Rewrote the windows port from scratch
- -- Added triple buffering support (buggy)
- -- Added DirectInput (joypad) support, allows both keyboard and joypad to be mapped to the same SNES controller button. Only one controller supported for this release, will be improved shortly
- -- Added pause key (mapped to Pause/Break)
- -- bsnes no longer consumes CPU time when paused or when no ROM is loaded
- -- Updated DirectDraw to 7, and added video mode configuration options to configuration file
- -- Video modes can specify screen width+height, refresh rate, and render width+height
- -- Added CTRL+[1-0] hotkeys for swapping video modes
- -- Added +/- hotkeys for adjusting frameskipping rate
- -- Added adjustable speed regulation. There are five modes, all can be adjusted inside the configuration file. CTRL+[+/-] will adjust the speed mode.
- -- Added PPU options to toggle any BG / OAM layers with any priority, HDMA effects, and offset per tile effects
- -- Added option to accept invalid button combinations (up+down, left+right) to joypad config menu
- -- bsnes now properly clears the main window when unloading games
- [code] Made destructors for base classes virtual, so the correct destructors will be called now
This version adds speed regulation, greatly improves PPU rendering, and increases speed by ~30% over the previous version.
Changelog:
- Rewrote offset-per-tile mode emulation, should be correct now. Fixes Chrono Trigger, Contra III, Tetris Attack, etc.
- Fixed a bug with HDMA occuring during interrupts. Fixes Tales of Phantasia souond test screen
- Updated compiler to Visual Studio 2005, and enabled profile guided optimizations
- Added conditional compilation of debugging functions (faster without them)
- Added conditional compilation of core classes as pointers (allowing polymorphism) or objects (allowing inlining). The latter results in a speed increase
- Small fixes to BG and OAM rendering routines
- Corrected sprite tile bounds wrapping
- Corrected sprite rendering in hires video modes
- Rewrote color add/sub routines, should be correct now. Fixes Illusion of Gaia menu, etc.
- Optimized video blitting routines, will temporarilly break mixed video mode screenshots
- Prevented selecting menu options via return key from being recognized as keypresses by the emulator
- Added system speed regulation (60hz/NTSC or 50hz/PAL)! Many thanks to kode54, GIGO, and Richard Bannister for their assistance
I disabled the debugger and polymorphism, and enabled profile guided optimizations for this build, to maximize speed. The debugger and polymorphism can be re-enabled via uncommenting the respective #defines in src/base.h and recompiling, or bsnes v0.013 can be used. I may start releasing two separate builds in the future... not sure yet.
- Greatly improved HDMA timing and accuracy with help from anomie and DMV27 -- fixes bugs in Energy Breaker and Street Fighter Alpha 2
- Fixed a problem with color add/sub code -- fixes opening battle in Tales of Phantasia and clouds in Energy Breaker
- Temporarily added DMV27's bugfix for the DSP KON register -- fixes sound in Der Langrisser, but this is not a hardware-accurate fix
- Disabled VRAM writes outside of vblank -- fixes Hook, but breaks many PD ROMs and fan translations (Roto's BS Zelda hack, Gideon Zhi's Ys 4 translation, etc). I might add an option in the future to toggle this behavior, but for now these games will no longer work. Please keep in mind these games will not run properly on real SNES hardware, either.
- Improved frameskipping code thanks to a suggestion from Richard Bannister
- Misc. other code cleanups and improvements (notably in the color table generation code)
- bsnes is now endian-safe and runs on Mac OS X
- Added caching support for window clipping tables resulting in a slight speedup. Please let me know if you spot any errors as a result of this change.
Changelog:
- Added S-DSP emulation
- Added sound output support via DirectSound -- no sound buffering though, so sound is muted by default
- Added option to record raw sound output to WAV files
- Added multiple color adjustment filters to the video output
- Added mode3/4 direct color support
- Added mode7 direct color and mosaic support
- Greatly improved mode7 rendering algorithm thanks to anomie
- Fixed mode7 screen repitition and EXTBG effects
- Greatly increased accuracy of NMI and IRQ timing, and emulated many newly discovered hardware quirks involving the two
- A few speed improvements courtesy of Nach for profiling the code for me
I'm now looking for assistance with sound buffering. Specifically, I need help modifying the DirectSound code to allow the emulator to be ran between 50%-400% normal speed, while keeping the sound output relatively good. If you have experience with this and can help, please get in touch with me (setsunakun0 at hotmail dot com).
- Fixed Mode 0 color palette index problem. Fixes ToP, DQ5, etc.
- Improved LoROM memory mapper to support 32mbit images. Fixes Tokimeki Memorial, etc.
- Added full S-DD1 support, SFA2 and Star Ocean are now playable. Special thanks to Andreas Naive
- Updated BGnxOFS / Mode7 registers with anomie's latest findings
- Added basic ROM mirroring support. Fixes copy protection issues in MMX, etc.
- Rewrote string library to work better on gcc/linux
- Cleaned up S-RTC/S-DD1 emulation to make way for future add-on chip emulation
- Rewrote DMA code, now runs cycle-by-cycle
- Rewrote HDMA code, now allows HDMA to be enabled mid-frame, fixes many games
- Fixed a bug in Mode7 vertical screen flip mode. Fixes FF5 title screen, etc.
- Greatly improved IRQ triggering. Fixes Der Langrisser, etc.
- Added full support for open bus. This includes PPU1 and PPU2 open bus support
- Modified CPU core back to cycle-based system. Slower, but improves debugger
- Implemented temporary fix for debugger to handle new cycle-based cores
- Modified CGRAM to ignore highest bit, since it is not used at all by the SNES, and is impossible to read on real hardware. Lowers memory usage by ~1.2mb
- Added mostly accurate PAL timing support. This should increase compatibility by ~30% or so
- More stuff I'm forgetting at the moment...
bsnes now supports SPC700 emulation (no DSP or sound support, however), and has greatly improved compatibility. It also now contains a keyboard-only joypad configuration tool.
- Fixed non-interlaced display modes from not drawing every other frame
- Changed OAM halve to skip every other scanline in 224-height modes
- Updated renderer to properly support games that switch resolutions mid-frame
- Fixed VRAM address remapping modes, fixes DQ3R, FF: MQ
- Fixed a bug in main color window clipping affecting BGs
- Added video color curve option, thanks to Overload for the idea + color table
- Added vblank, FPS counter, and DDraw surface memory options to settings menu
- Added fullscreen modes 640x480 and 1024x768 to video modes
- Added option to toggle the menubar on and off by pressing the escape key
- Mode3 was not rendering sprites
- Priorities were wrong for modes 2-4, thanks to anomie for info
- Fixed a serious bug in IRQ interrupts. May not be perfect, but helps many games
moving the window + main color window clipping into the bg/oam/mode7 rendering routines themselves, I was able to greatly simplify the most complicated part of rendering: the final pass where color add/sub effects are applied. As a result, the new PPU core is not only ~35% faster (on graphics intensive screens, even faster on simpler screens), but more accurate as well. Awesome.
In celebration, I´m releasing bsnes v0.008. I can actually run all games I have at >60fps on my Athlon 1.67ghz PC. Probably not something to brag about, though ...
Oh, and I also updated the keyboard polling code to only capture keypresses if the main window has focus. I´ve been meaning to do this for the better part of a year now, but never got around to it.
If, for some reason, you still want to use the old renderer, you can uncomment the first line in src/ppu/bppu/bppu.h and recompile the emulator yourself. Or you can use v0.007a, I´ll leave it up for a bit.
I have done quite a bit, so I´ll try my best to recap most of the fixes since the last release...
- HDMA was not running during DMA transfers
- Emulator did not recognize any filetype other than .smc
- Added configuration file support and imported my vector/string/config libraries into bsnes
- Added option to use system RAM instead of video RAM for display, this can greatly increase speed on certain video cards
- Increased speed by ~15% by adding 256x224 renderer (still very buggy when the SNES mixes video modes mid-frame)
- mvn/mvp opcodes were not setting the DB register
- Fixed joypad input in many games (Super Mario: All Stars, Dragon Quest III, etc.)
- Major speedup with frakeskip option
- Fixed default aspect ratio when emulator is first started
There´s probably a lot more, but that´s all I remember offhand... this release should be a lot closer to the quality of v0.005a, but still needs a bit more polishing.
The rewrite is now complete. I finished adding frameskip, and fixed some crashing issues with loading multiple ROMs. I wrapped all malloc/free calls with memalloc/memfree, which are custom functions that log each call, and let you pass sprintf-style arguments to them to debug memory leaks. Don´t see any, nor have I noticed any in bsnes; but it makes a nice test tool anyway.
I found out today that the mvn/mvp instructions actually set the DB register to the destination bank. Weird. This fixed Final Fantasy V, Chrono Trigger, and Dragon Quest III (which now runs as a result) graphics. Not all of them, but quite a few. I had also previously been setting the M/X flags of the P register when xce was executed. I never anticipated a game using xce while in native mode to switch to... native mode... but apparently, Chrono Trigger does. And my code was incorrect. So now Chrono Trigger gets past the name select screen, but dies a few screens after still.
The only really major flaw I am aware of that bsnes v0.005 did not have is with the battle screens in Squaresoft games. I get horrible flickering and "crushed scanlines" every other frame on them, for some reason. I´ll try and track that down for the next release, but I didn´t want to hold up a new release any longer. As a result, I´ll leave up v0.005a for the time being until I get this problem fixed.
Released a new version of bsnes today. Version 0.0.005 is up on the main page now.
The changes since .004 wip10 include: DRAM timing fix (now occurs mid-opcode), memory address speed fix, added CPU cycle condition 4 to all opcodes that use it, and fixed a bug where DRAM refresh was not changing start positions every other scanline.
With the new version, Chrono Trigger should get a little further, and Final Fantasy 5 should get in-game now. The only problem FF5 seems to have is sprite corrution in the menus. I´m too busy with the CPU timing to mess around with the PPU right now, though. Also, the APU is not bridged to the CPU in this release, so compatibility is (still) really low.
After I get the APU working fairly well, I´ll (try and) start keeping a what´s new file so that people can know what all changed between public releases of the emulator without having to follow this page. Sorry for the inconvenience in the mean time.
[No archive available]
Doubled the width of sprites when the width of the screen is 512. The SNES Test Program now runs through all of the character test correctly. The windows are off-by-one though.
Added the very bizarre 00:4300-00:437f memory region that is unique from 7e:4300-7e:437f. Then I added read support from $2180. This allowed the SNES Test Program to not crash after failing the electronics test, and it also fixed the horrible graphics corruption in Der Langrisser.
The fonts were still failing, so I went in with my tracer and found out what was causing it. The following code:
gx816->regs.pc += (signed char)(arg + 2);
This is the code used to increment the pc counter after relative branches. The problem is that I had parinthesis around the + 2 as well as arg. Therefore, if arg was 0x7e, 0x7f, 0xfe, or 0xff, it would change the sign. This would in turn make the program counter off by 256 bytes. Very bad. Fixing this fixed the font in Der Langrisser, and also fixed Super Mario World, when Yoshi spits a turtle out, the game will no longer crash.
Next, via the Der Langrisser world map, I realized that anomie´s description of the BG/mode7 register latches was reversed: the BG registers (may) share a common latch between all of them, but the mode7 registers do not. I removed the common latches from the mode7 regs, but I haven´t added the latch to the BG registers yet.
I also realized that clearing the entire screen on a BG mode change would probably not be a good thing for games that change video modes mid-frame. So I tried working on getting the weird single-frame garble that pops up every minute or so to go away, but to no avail. I´m having a difficult time tracking down the exact cause of the error, but I believe it to be a buffer overflow, or something along those lines.
[No archive available]
The bug in the Bahamut Lagoon mode7 screens turned out to be that I never added the dividend result to $4216/$4217. It always returned the multiplication of $4202/$4203. This also fixed the sprites in battles for Dai Kaijuu Monogatari. I added a bunch of window stuff, including a double size windowed mode, and a fullscreen mode. Lots of fixes to the interface, as well as code cleanup. It's still pretty buggy, there's a lot of variables to keep up with in the GUI at present...
I also added better tile caching, I just cache all tiles when they are rendered, for all 3 color depths (4, 16, 256). Seems to help a little. A portion of the speed gain was lost by fixing the dividend result, though. Very strange, since I wouldn't think much work would go into a simple line of code that's called 20 times a frame probably at best... oh well.
[No archive available]
First, I fixed some issues with the mode7 / scroll regs thanks to info from anomie. Qwertie's mode7 demo runs without modification now. Next, I fixed a small glitch with tiles getting cut off on the right edge of the screen, fixes some flickering on the edges in Zelda 3. Finally, I added tile caching to all 4 BG layers. It didn't really increase speed by much (~10%), and upped the RAM requirements by 1.2mb... I left the old code in case I need to fall back on it. My only guess (hope) is that the bottleneck lies somewhere else...
[No archive available]
Had a small glitch in the OAM $2102/$2103 register settings, fixed that and now both Zelda 3 and Super Mario World always show sprites perfectly. The only error to my knowledge in the below screenshots is that the large version of the mario sprite in the third pic is not shown at the top left of the screen. Which could be because I have no mosaic support. But at any rate, both games should be completely playable now, albeit very slowly. I tried to speed up things by caching some stuff in the PPU, but I couldn't find a nice way to implement it that would result in a significant speed increase. Oh yeah, Zelda won't follow you in Zelda 3, but you can just go to the throne room and push the picture to the right yourself, and she'll appear when you reach the sanctuary.
I also updated the debugger, it uses a smaller font, which is a bit harder to read, but saves a lot of screen space. This will definately be needed when I add in more of the debugging windows in the future, so it's better to get used to it now than later.
[No archive available]
Added SRAM support. It's compatible with other emulators. It maps both the LoROM SRAM between $700000-$7dffff, and HiROM SRAM between $3n6000-$3n7fff (where n = 0 - f).
Modified the screen to redraw at scanline 224, instead of 0. Fixes some flickering between screens in some games.
Moved the lighting adjustment code ($2100 bits 0-3) directly into the PPU, rather than outside in the platform-specific code. This is because games have the ability to adjust this value per scanline. Also allowed the games to control the background enable ($2100 bit 7) flag per scanline now. This allowed Bahamut Lagoon's dragon intro to work.
I then added mode2 support, so now all that's missing is modes 5 and 6 (interlaced).
I also created an easy #define to select between the public domain mode7 code I wrote, and the snes9x mode7 code. I'll go through one of these days and rewrite the snes9x code in a clean environment (e.g. without using the current mode7 file as a reference) to avoid the issue altogether, but for now... the snes9x code is twice as fast, and that's good enough for me.
Lastly, I also added in a trace checkbox to enable tracing. As such, the zip file of my work up now has debug mode enabled by default. I really need an overhaul of the gui implementation, and a configuration file. I have a very nice string library system (that I wrote myself) that I would love to take advantage of in this project.
Here's some screenshots of the dragon intro. Lots of HDMA here, showing that I pretty much have HDMA down, now. I remember zsnes used to have a problem with these screens, and had to do something with an HDMA hack to get around it. They figured out what the problem was, eventually. I was actually quite surprised my emulator does not suffer from this same problem. Lucky for me, as they never did mention what the problem was to begin with. The HDMA is technically drawing too soon (at the start of the scanline instead of the end) which probably messes things up a bit, and I'm guessing the scroll registers are screwing up in one or two of the below pics. No mosaic support either.
[No archive available]