Releases: jsgroth/jgnes
Releases · jsgroth/jgnes
v0.6.2
- Upgraded wgpu to 0.17.2 to pick up a bugfix for the DirectX 12 backend where resizing the window would completely crash the program. This bug apparently did not affect the other wgpu backends
- Replaced the VRC7 expansion audio implementation with a stripped-down version of the YM2413/OPLL implementation from my Sega Master System emulator, which should be more accurate and also much more efficient
- Implemented the NES PPU's grayscale bit, which was only used in a single officially released game: Noah's Ark (EU) uses it for the water effect covering the bottom of the screen
- Made audio buffer size configurable instead of hardcoded
v0.6.1
- Significant performance improvement / reduced CPU usage due to a rewrite of the 6502 CPU emulation code
- Fixed a PPU bug where the PPU would sometimes render the wrong backdrop color when rendering was left disabled at the start of a frame; this caused occasional top-of-screen flickering in Battletoads, which leaves rendering disabled for the first ~7 visible scanlines of every frame
- Fixed a bug that caused PAL audio sync to time to ~49.9 FPS instead of 50 FPS
- Added an option to have audio sync time to native NES speed (~60.1 FPS NTSC / ~50.007 FPS PAL) instead of aiming for exactly 60 FPS NTSC / 50 FPS PAL
- Note this will cause severe audio skipping if combined with VSync on a display with 60Hz refresh rate
v0.6.0
- Core changes
- Support for PAL (EU) timings and output resolution/frequency
- PAL mode outputs at 256x240 instead of 256x224, runs the CPU/PPU/APU at different speeds, outputs video at ~50Hz instead of ~60Hz, and a few other changes
- By default the emulator will attempt to detect NTSC vs. PAL from the ROM header, but there is also a new option to force either NTSC or PAL while ignoring what is in the header
- Added a new aspect ratio option for PAL (11:8 pixel aspect ratio at PAL output resolution)
- Added a new option to emulate the PAL black border, which crops the output resolution from 256x240 to 252x239 (removing the top scanline + the 2 columns on each edge)
- Implemented all unofficial/illegal 6502 CPU opcodes except for 3 buggy/unstable opcodes that are not useful (specifically $93, $9B, $9F)
- Only a few officially licensed games used any unofficial opcodes (e.g. Super Cars and Puzznic) but some ROM hacks and homebrew software make use of them
- Executing an illegal KIL opcode will now halt the CPU until reset instead of causing the emulator to terminate with an error
- Added an option to disable sprite flickering by removing the hardware's 8-sprite-per-scanline limit
- Note this can cause visual glitches in games that used the limit to intentionally hide sprites (e.g. Castlevania II and Ninja Gaiden)
- Support for PAL (EU) timings and output resolution/frequency
- Frontend changes
- Added a scanlines option that supports rendering with no scanlines (current behavior), dimmed scanlines, or black scanlines; requires integer height scaling and at least 2x native NES resolution to render correctly
- Added an option for a configurable blur shader that can produce a cleaner soft image than using linear filtering with 1x internal scaling
- Fixed a bug in the wgpu renderer where there would sometimes be a visible seam from the top-left corner of the viewport to the bottom-right corner depending on whether the window height was even or odd; it was particularly noticeable with nearest-neighbor filtering
- Slight improvements to audio playback that should reduce audio lag and reduce stuttering when audio sync is enabled in some configurations
- Updated input/hotkey configuration menu to allow changing input/hotkey bindings while the emulator is running
- Web changes
- Configuration is now saved in local storage instead of reset on every page load
- 2x/3x image prescaling is now implemented much more efficiently by utilizing a GPU shader, same as the native frontend
- Added a fullscreen toggle
- Added support for a build that renders using WebGPU instead of WebGL2, controlled by building without default features (or using the JGNES_WEBGPU env var with build.sh). This reduces the WASM file size by roughly 75% (!) but doesn't work in most browsers yet
- Tweaks to audio playback that should reduce audio skips when audio sync is enabled at high refresh rates
- Layout and styling improvements
v0.5.0
- Additional mappers implemented:
- Namco 108 (iNES mapper 206); used in multiple games including Pac-Mania and Gauntlet (unlicensed version)
- Namco 108 variant w/ 128KB CHR ROM (iNES mapper 88); used in 3 games including Dragon Spirit: Aratanaru Densetsu
- Namco 129 / 163 (iNES mapper 19), including Namco 163 expansion audio; used in multiple games including Digital Devil Story: Megami Tensei II
- Namco 175 / 340 (iNES mapper 210); used in multiple games including Splatterhouse: Wanpaku Graffiti
- NAMCOT-3425 (iNES mapper 95); used only in Dragon Buster
- NAMCOT-3446 (iNES mapper 76); used only in Digital Devil Story: Megami Tensei
- NAMCOT-3453 (iNES mapper 154); used only in Devil Man
- Additional mapper features implemented:
- Konami VRC7's FM synthesizer chip is now implemented; this chip was only used in Lagrange Point. (The JP version of Tiny Toon Adventures 2 uses the VRC7 board but doesn't use the audio chip)
- The VRC7 implementation additionally will now work properly with older ROM dumps that don't specify an NES 2.0 submapper
- In the native GUI app, most options can now be changed while a game is running
- Input bindings notably cannot be changed while a game is running, for the moment
- Renderer (SDL2/wgpu) and wgpu backend also cannot be changed while a game is running
- Implemented fast forward with a configurable speed multiplier
- Implemented rewind with a configurable rewind buffer length (10 seconds by default)
- Removed the Adaptive VSync option because it isn't supported on any computer I was able to test on, including Windows with an Nvidia GPU. Fast VSync option is still present and is supported on common configurations
- Web frontend changes:
- Implemented input reconfiguration instead of having hardcoded key bindings
- Changed the canvas to display random white noise instead of nothing at all before the first ROM file is loaded
- Reduced the audio sync threshold to hopefully reduce audio lag at >60Hz refresh rates, although animation is unfortunately still somewhat choppy at high refresh rates
- Added a button to upload a save file for the currently running game (for games with persistent save files, e.g. the Zelda games)
- Made some minor tweaks to bring focus back to the emulator after clicking on certain UI elements, such as the Reset button
- Changed the 'Open ROM file' button text to 'Open NES ROM file'
- Fixed a very minor logging bug where the TRACE log message indicating that an address low byte overflow occurred during an absolute indexed read instruction was logged unconditionally instead of only logging when overflow occurred
v0.4.0
- Additional mappers implemented:
- BNROM (iNES mapper 34)
- NINA-001 (also iNES mapper 34)
- GxROM (iNES mapper 66)
- Jaleco JF-11 / JF-14 (iNES mapper 140)
- Bandai FCG-1 / FCG-2 (iNES mapper 16, submapper 4)
- Bandai LZ93D50 w/ X24C01 EEPROM chip (iNES mapper 159)
- Bandai LZ93D50 w/ X24C02 EEPROM chip or no writable memory (iNES mapper 16, submapper 5)
- Bandai LZ93D50 w/ 8KB SRAM (iNES mapper 153)
- Additional mapper features implemented:
- Konami VRC6 expansion audio is now slightly amplified linearly; before this change, audio output from this mapper was very quiet compared to the builtin APU audio and other boards with expansion audio
- Web frontend made much more featureful:
- Allow loading different ROM files without needing to refresh the page
- Add a reset button
- Add aspect ratio (NTSC / Square pixels) and image filtering options (Nearest neighbor / Linear 1x/2x/3x); the linear 2x/3x options are implemented using CPU scaling because WebGL does not support GPU compute shaders
- Implement audio using the AudioWorklet API
- Implement audio sync to prevent the emulator from running too fast on high refresh rate displays
- Implement persistent save files using local storage, and add a button to download the save file for the currently running game
- Fix window scaling so that the window size accounts for DPI scale factor
- Disallow opposing directional inputs to be pressed simultaneously (left+right or up+down); allowing these can cause severe glitches in some games (e.g. Zelda 2 and Battletoads). If opposing inputs are pressed simultaneously, left/up will be sent to the emulated NES rather than right or down
- Add a .nes file filter to the file picker dialog (previously there was no filter at all)
- When the page is loaded, hide the UI and display "Loading..." until the WASM is loaded and all event listeners are added
- Add an option to all frontends to allow silencing the triangle wave audio channel when it is outputting waves at ultrasonic frequencies, which can reduce audio popping in some games (e.g. Mega Man 2)
- Enable link-time optimizations for published release builds to significantly reduce executable binary sizes
- Implement a hack to fix the GUI scaling factor from defaulting to 4.5 on the Steam Deck, which made the GUI completely unusable
- A few minor performance improvements:
- Refactor audio downsampling code to avoid needing to do floating point multiplications and divisions on every emulated CPU cycle
- In the PPU code, add a bit set storing which pixels contain any sprites to avoid needing to loop over all sprites on the scanline on pixels that don't contain any sprites
- Change the square wave channel sweep units to only recompute the target period when one of their inputs changes, either the sweep config or the phase timer period
v0.3.0
- Additional mapper features implemented:
- Sunsoft 5B expansion audio implemented, minus the noise and envelope features which were not used by the only game that used this audio chip
- MMC5 PCM channel implemented; MMC5 is now fully implemented, aside from the MMC5A features which were not used by any released games
- Added a ROM list to the GUI window instead of leaving it blank
- Implemented save & load state
- Implemented reset, both soft reset (emulated reset button) and hard reset (completely re-initialize the emulator)
- Improved support for using multiple gamepads simultaneously
- Made hotkeys configurable (Quit / Toggle Fullscreen / Save & Load State / Reset)
- Changed the emulation core to return an error instead of panicking after executing an invalid or unsupported opcode
- Implemented CPU open bus, which fixes issues with a few games (e.g. Battletoads & Double Dragon and Low G Man)
- Implemented PPU OAM "open bus", which fixes numerous issues with Micro Machines
- Implemented a limited web frontend that compiles to WASM and runs in the browser, using
wgpu
with the WebGL2 backend for rendering- Audio and save files are not implemented, nor is any form of video/input configuration, but the emulation core is identical to the native frontends
v0.2.0
- Additional mappers implemented:
- Konami VRC2 & VRC4 (iNES mappers 21, 22, 23, 25)
- Konami VRC6 (iNES mappers 24, 26), including expansion audio
- Konami VRC7 (iNES mapper 85)
- FM synth expansion audio is not yet implemented
- Sunsoft 5A / 5B / FME-7 (iNES mapper 69)
- 5B expansion audio is not yet implemented
- Color Dreams unlicensed board (iNES mapper 11)
- Codemasters unlicensed board (iNES mapper 71)
- Additional mapper features implemented:
- MMC3 MC-ACC variant is now implemented (NES 2.0 submapper 3); this fixes the shaking in games such as The Incredible Crash Dummies
- MMC5 expansion audio is now partially implemented; the two square wave channels are implemented, the PCM channel is not
- Improve default configuration values in the CLI
- Implement an obscure scrolling behavior related to the CPU accessing the PPUDATA register during rendering; this fixes Burai Fighter, which previously had half of the status bar cut off at the bottom of the screen
- Relatedly, fix some minor MMC3 IRQ timing issues that could occur when the CPU accesses PPUADDR and/or PPUDATA during rendering
- Fix a bug where MMC3 IRQ would not trigger correctly in games that set both BG and sprite pattern table addresses to $0000 while also enabling double height sprites; this caused all kinds of graphical corruption in Mickey's Safari in Letterland
- Very minor performance improvements in the PPU emulation code
v0.1.0
First release!
- NTSC NES emulation with full CPU, PPU, and APU emulation (barring a few obscure behaviors that affect very few or no games)
- Command-line and graphical user interfaces, the latter built using
egui
- Support for keyboard inputs as well as gamepad inputs via DirectInput
- Using multiple gamepads simultaneously is not really supported yet; the emulator doesn't currently take notice of which gamepad a particular gamepad input came from
- Input configuration is not currently supported through the CLI
- Hotkeys are not currently configurable (Esc=Quit, F9=Toggle Fullscreen)
- 2 different renderers, a GPU-backed renderer built using
wgpu
and a software-based renderer using SDL2 - 4 different vertical sync options: On/FIFO, Off/Immediate, Fast/Mailbox, and Adaptive/FIFORelaxed
- Fast and Adaptive are supported only with the wgpu renderer, and support varies based on platform/GPU/driver
- Optional support for integer upscaling + linear interpolation when using the
wgpu
renderer, which produces an image that is sharp but clean even at higher display resolutions - Support for different fixed aspect ratios:
- NTSC - 8:7 pixel aspect ratio, the way games would have looked on most 1980s TVs
- Square Pixels - Perfect 1:1 pixel aspect ratio, the image may look slightly squished
- 4:3 - SD screen aspect ratio, the image may look slightly stretched
- Stretched - Aspect ratio is not fixed, image always fills the screen
- An option to force display height to an integer multiple of the NES's native output resolution (224px)
- Customizable overscan on each side of the screen
- Support for the following cartridge boards, which together cover the majority of licensed NES releases:
- NROM (iNES mapper 0)
- UxROM (iNES mapper 2)
- CNROM (iNES mapper 3)
- AxROM (iNES mapper 7)
- MMC1 (iNES mapper 1)
- MMC2 (iNES mapper 9)
- MMC3/MMC6 (iNES mapper 4)
- MC-ACC variant not currently implemented
- MMC4 (iNES mapper 10)
- MMC5 (iNES mapper 5)
- Additional audio channels not currently implemented