This is a post on a bug that broke Fatal Rewind for the Sega Genesis, a port of the Amiga/Atari ST game The Killing Game Show. I’m not sure why some Amiga-to-Genesis ports changed the game’s title. Leander is another one, which got ported to Genesis under the title Galahad.| jsgroth.dev
Rather than covering a single game, this is a topic post that covers six different bugs in my implementation of the Game Boy Color’s HDMA feature (HBlank direct memory access). Not every GBC game uses this feature, but a decent number do, and a few games will break pretty badly if it’s not emulated fairly accurately (moreso in terms of behavior than timing).| jsgroth.dev
This is maybe the start of a series of posts on games/software that exposed bugs in one of my emulators, depending on how many I find interesting enough to write about. In most cases I think the interesting part is usually the game behavior that triggered the bug rather than the bug itself.| jsgroth.dev
jsgroth's blog| jsgroth.dev
Donkey Kong Country 2 has a pretty well-known bug in the old SNES emulator ZSNES where some stages have spinning barrels that don’t work properly. One of the earliest pictured here, in the first stage of Krem Quay (third world): After you jump into the barrel, you’re supposed to be able to completely control its rotation by pressing left and right on the d-pad, with the barrel only rotating while you’re holding left or right.| jsgroth.dev
This is the seventh and final post in a series on emulating the main Sega Genesis sound chip, the YM2612. Part 1 - Interface Part 2 - Phase Part 3 - Envelopes Part 4 - Digital Output Part 5 - Analog Output Part 6 - LFO This post will cover the envelope generator’s SSG-EG mode.| jsgroth.dev
This is the sixth in a series of posts on emulating the main Sega Genesis sound chip, the YM2612. Part 1 - Interface Part 2 - Phase Part 3 - Envelopes Part 4 - Digital Output Part 5 - Analog Output This post will cover the hardware timers, the LFO (low frequency oscillator), and synthesized effects powered by the LFO.| jsgroth's blog
This is the fifth in a series of posts on emulating the main Sega Genesis sound chip, the YM2612. Part 1 - Interface Part 2 - Phase Part 3 - Envelopes Part 4 - Digital Output This post will cover a few aspects of the YM2612’s audio hardware, particularly the DAC (digital-to-analog converter), that are not strictly related to sample generation but do noticeably affect the sound of the final output.| jsgroth's blog
This is the fourth in a series of posts on emulating the main Sega Genesis sound chip, the YM2612. Part 1 - Interface Part 2 - Phase Part 3 - Envelopes This post will describe how the chip computes operator and channel outputs given the phase generator and envelope generator outputs.| jsgroth's blog
This is the third in a series of posts on emulating the main Sega Genesis sound chip, the YM2612. Part 1 - Interface Part 2 - Phase This post will describe how the ADSR envelope generators work. ADSR Each of the YM2612’s 24 operators has its own ADSR envelope generator that automatically adjusts the operator’s volume over time.| jsgroth.dev
This is the second in a series of posts on emulating the main Sega Genesis sound chip, the YM2612. Part 1 - Interface This post will describe the FM synthesis channels’ phase generators. Phase Generation Each of the YM2612’s 24 operators contains a phase generator and an ADSR envelope generator.| jsgroth's blog
This is the first post in a series on emulating the main Sega Genesis sound chip, the Yamaha YM2612 FM synthesis chip, also known as the OPN2. To date, the YM2612 is pretty easily the most difficult-to-emulate sound chip that I have worked on.| jsgroth.dev
The Famicom allows cartridges to modify the console’s audio signal between the APU (audio processor) and the TV. Most games don’t do anything with this capability, but some games included expansion audio chips on the cartridge board to enable enhanced audio beyond what the console is normally capable of.| jsgroth.dev
This is the second of two followups to my post on the Sega CD PCM chip. Where the last post described a way to improve audio quality by applying an audio filter to final mixed PCM chip output, this post will describe an audio enhancement that improves audio quality by changing how the emulated chip itself generates samples.| jsgroth's blog
This is a followup to the previous post on the Sega CD’s PCM sound chip. This post will start by going into more detail on why this chip’s audio output sounds pretty crummy by default, followed by one of two possible solutions that I know of to that problem.| jsgroth.dev
In my last post I described an enhancement that an SNES or PS1 emulator can implement to improve audio quality in some games. Since then, I noticed that Sega CD games that use its PCM sound chip have pretty poor audio quality in my emulator - the audio output sounds very noisy and aliased.| jsgroth's blog
I recently (ish) started to work on a PlayStation emulator. Compared to the previous systems I’ve worked on, it’s very different! It definitely feels like jumping forward a generation compared to the Genesis and the SNES. I’ll start off by covering the core of the system, the CPU.| jsgroth's blog
The Super FX chip is easily the most well-known SNES coprocessor, primarily because of Star Fox which renders real-time 3D graphics on the SNES with the help of the Super FX. Yoshi’s Island also uses the Super FX, though mainly for sprite scaling/rotation and various graphical effects rather than 3D rendering.| jsgroth's blog
SPC7110 is a data decompression chip very similar to S-DD1, but it also has a number of other features that games make use of, with one of the three SPC7110 games even including a real-time clock chip on the cartridge. This chip was used in 3 games, all Japan-only games by Hudson: Tengai Makyou Zero, Momotarou Dentetsu Happy, and Super Power League 4.| jsgroth's blog
There are two SNES coprocessors that contain hardware data decompression chips: S-DD1 and SPC7110 (no relation to the SPC700 CPU as far as I know). These chips allow the SNES CPU to read compressed data from ROM without the CPU needing to do any decompression work - the hardware decompresses the data on-the-fly while the CPU is reading it.| jsgroth's blog
The SA-1 coprocessor, or Super Accelerator 1, is a somewhat fascinating chip in that it has quite a lot of hardware that almost no games ever used. Its primary attraction is an additional 65816 CPU clocked at 3x the speed of the SNES CPU, and most of the SA-1 games only used it for that.| jsgroth's blog
The Cx4, or Capcom Consumer Custom Chip, is a coprocessor that Capcom used in Mega Man X2 and Mega Man X3. It’s most well-known as the coprocessor that enables those games’ 3D wireframe models, but they also use it for sprite scaling/rotation effects and to help out with managing the sprite table.| jsgroth's blog
This post will cover the two simplest SNES coprocessors: OBC1 and S-RTC. OBC1 is an “OBJ controller” chip while S-RTC is a real-time clock chip. Neither one does any real computation on the chip itself, unlike nearly all of the other SNES coprocessors.| jsgroth's blog
While Sega tried to expand the Genesis’ capabilities by adding on to the console hardware with the Sega CD and 32X, Nintendo took a different approach with the SNES: put additional hardware into the cartridge on a game-by-game basis. This post will cover the first SNES coprocessor, DSP-1, and its close relatives.| jsgroth's blog
The Game Boy Color is an interesting piece of hardware. In some ways it’s a significant upgrade over the original Game Boy (it has color!!), but in other ways it feels like a minor hardware revision despite releasing 9 years later. Well, let’s see what it takes to make a Game Boy emulator support Game Boy Color software!| jsgroth's blog
First of all, if you are writing your own Game Boy emulator, you don’t need to emulate the pixel FIFO! Almost nothing depends on it for correct rendering, it’s a lot more complex to implement than a scanline-based renderer, and it’s also significantly more difficult to debug than a scanline-based renderer.| jsgroth's blog
My Game Boy emulator was both the first emulator I wrote and my first real project written in Rust. Needless to say, there’s a lot of room for improvement. I briefly thought about porting it into my multi-system emulator which doesn’t currently have a Game Boy core, but this also seemed like a good opportunity to go back and clean things up, and it frankly seemed easier to do a complete rewrite while using my v1 as a reference for trickier details (e.| jsgroth's blog
This is a continuation of my attempt to get Titan Overdrive 2 working in my Genesis emulator. It will be more technical than Part 1 as fixing the remaining effects requires getting into low-level details of how the Genesis VDP functions, which these effects depend on.| jsgroth's blog
When I first saw Titan’s Overdrive 2 demo I was blown away, both by the presentation itself and by how in the world they managed to push that out of the Mega Drive. After how much I struggled to get Overdrive 1 to work in my emulator, I just assumed that getting Overdrive 2 to work was out of reach.| jsgroth's blog
The Titan Overdrive and Overdrive 2 Mega Drive demos are well-known for pushing the Mega Drive / Genesis hardware to its limits. I decided to try the first one in my own Genesis emulator and see what it would take to get it working!| jsgroth.dev
It’s been a minute, and I haven’t done a whole lot of emulation work recently, but this is a topic I’ve wanted to do a short post about for a while: a really simple audio enhancement for SNES and PlayStation emulation that works surprisingly well with some games.| jsgroth.dev
I recently added 32X support to my Sega Genesis emulator. While I’d say it was definitely easier than Sega CD overall, it wasn’t without difficulty, and much like Sega CD there’s very little public documentation aside from Sega’s poorly translated official docs from the 90s.| jsgroth.dev
Sega released two hardware add-ons for the Genesis in an attempt to expand its hardware capabilities to enable more advanced gaming experiences. The first of these was the Sega CD, obviously a response to the PC Engine CD (which was fairly successful in Japan despite very poor sales in the rest of the world).| jsgroth.dev
This is the fourth and final post in a series on the PlayStation SPU which will cover the remaining major features that were not covered in previous posts. This includes the noise generator (pseudorandom white noise), pitch modulation (dynamic pitch adjustment using another voice’s output), SPU IRQs (trigger IRQ when a specific sound RAM address is accessed), and the capture buffers (record recent samples from CD audio and two specific voices).| jsgroth.dev
This is the third part in a series of posts on the PlayStation SPU (Sound Processing Unit). This post will focus on the SPU’s reverb feature, which can simulate echoes or reverberations. In short, it’s a much more advanced version of the SNES APU’s echo filter.| jsgroth.dev
Where the last post focused on the PlayStation SPU’s audio format and how to implement ADPCM decoding, this post will focus on volume and envelopes. The SPU supports a number of different volume multipliers: some as constant volumes, and some as volumes that automatically adjust themselves over time using what are called envelope generators.| jsgroth.dev
The PlayStation’s SPU (Sound Processing Unit) is definitely not the most logical next thing to work on after implementing a basic triangle rasterizer, but it’s what I feel like discussing next. With my own projects, I don’t feel like an emulator is really online until it supports audio, so here we go!| jsgroth.dev
While the GPU tests I mentioned at the end of my last post are very helpful for validating a lot of GPU rasterization functionality, a new emulator might want the early satisfaction of getting the splash screen’s diamond to render mostly correctly. This post will overview what’s required to make that happen.| jsgroth.dev
This post will overview what is required for a PS1 emulator to get any graphical output from test programs. PS1 test programs are typically designed such that they don’t use most (if any) of the GPU’s rasterization capabilities - they’ll either render their output pixel-by-pixel, or they’ll just copy the frame directly into VRAM using the CPU.| jsgroth.dev
Two of the most useful things for a new PlayStation emulator to implement are EXE sideloading and TTY support. Supporting EXE sideloading makes it possible to load programs before any CD-ROM functionality is implemented, and supporting TTY output makes it possible to see debug output from the BIOS and from test programs.| jsgroth.dev
The Game Boy’s APU (audio processing unit) is responsible for generating the chiptunes that you (probably) know and love. Unlike with the PPU and the CPU, it’s possible to write a Game Boy emulator that runs most things pretty well without emulating the APU at all, though you’ll obviously have no audio.| jsgroth.dev