
gbc.sb2 Audio Improvements
by SpinningCube
Description
gbc.sb2 is a Game Boy / Game Boy Color emulator originally created by @DCPU-16: https://scratch.mit.edu/projects/53005142/ UPDATE November 08, 2023 - Changes: - Cartridge RAM saving and loading added! Permanent progress can now be saved as a hexadecimal string, and loaded back in later. The .sav files from other emulators like BGB and SameBoy are also acceptable if they are converted to hex. - External RAM no longer resets every time the emulator is started. It is now maintained until the next ROM is loaded in. - Menu animations now use delta time, making animation speeds independent of frame rate and turbo mode. - Minor change to the project thumbnail I've fixed the project so that it runs at full speed with higher quality audio emulation. Be sure to also check out rrgbc, a fast and accurate Game Boy Color emulator by @52525rr: https://scratch.mit.edu/projects/865567417 Thanks to @ego-lay_atman-bay for making their own project on fixing the audio. Their project inspired me to make this one. Credits: - @DCPU-16 for the original project. A great majority of the work in this project is by them. That project can be found here: https://scratch.mit.edu/projects/53005142/ - Wave table synthesizer by @Kouzeru, used for the wave channel: https://scratch.mit.edu/projects/470900402/ - This emulator boots from SameBoy's "SameBoot" custom DMG boot ROM, written by LIJI32 and licensed under the MIT License. - The preloaded game ROM is Dangan GB, a game by Snorpung and Nordloef. - Pixel art in the thumbnail is from a Game Boy demo also by Snorpung and Nordloef. In my first remix I fixed major issues present in the original version in order to ensure that the emulator could run at its proper speed in the TurboWarp player. In this remix, I made significant improvements to the audio emulation and fixed some bugs. Instead of note blocks, the audio channels now use play sound blocks combined with the pitch effect block. I've also fixed some broken audio features and added a few new ones, including stereo/panning. Turbo Mode and Remove Limits are used because they improve the audio quality. All put together, the audio quality has improved significantly. I also added a settings menu. Thanks to FFT, the sound of the Game Boy's wave channel is now emulated pretty well. There are still a few situations in which it won't work, specifically if the wave channel is updated very frequently, but in most cases it will sound flawless. Before this, it was approximated using triangle waves or pulse waves depending on the situation. Changelog: Update February 24, 2024 - Changes: - Stereo audio features now completely implemented, which fixes audio glitches in some games - Preloaded ROM used to be Gejmbaj, now replaced with Dangan GB Update November 08, 2023 - Changes: - Cartridge RAM saving and loading added! Permanent progress can now be saved as a hexadecimal string, and loaded back in later. .sav files from other emulators like BGB and SameBoy are also acceptable if they are converted to hex. - External RAM no longer resets every time the emulator is started. It is now maintained until the next ROM is loaded in. - Menu animations now use delta time, making animation speeds independent of frame rate and turbo mode. - Minor change to the project thumbnail Update April 16, 2023 - Changes: - Completed wave channel using @Kouzeru's wave table piano: https://scratch.mit.edu/projects/470900402/ - Resetting of the LFSR upon retriggering the noise channel is now emulated (by stopping and replaying the noise channel sound from the beginning) - Frequency sweeps no longer restart the audio clones constantly - Added enable flags and APU status reading via NR52 - Channel volumes can now be set to 0 without disabling the audio channel, fixes envelope effects that start at 0 Dec 03, 2022 - Original Release of Audio Improvements #Gameboy #GB #GBC #Game #Boy #Emulator #Emulation
Instructions
Run at full speed in the TurboWarp player, otherwise it is basically unplayable: https://turbowarp.org/751324131?fps=60&turbo&limitless Alternatively, try using Forkphorus: https://forkphorus.github.io/?webgl&fps=60&limits=1#751324131 Buttons: Z = (A), X = (B), Space = Start, C = Select, Arrows = Dpad Click the cartridge to import a custom ROM. Click on the gear icon to open the settings menu. Click "PLAY" to start! Piracy is discouraged, use legally obtained ROMs. Both Game Boy and Game Boy Color ROMs are supported (.gb and .gbc files). gbc.sb2 can't take these files directly, but accepts them in two text-based formats: as a newline-separated list of byte values, or as a hexadecimal string with 2-digit hex values per byte concatenated together. Tools for converting ROMs: https://rokcoder.com/convert/ by @RokCoder The outputted text file can be imported into the emulator (right click the ROM list > import) http://tomeko.net/online_tools/file_to_hex.php Uncheck both settings. The result can be copied and either can be directly pasted in using the "Import HEX" button on the right of the import screen or can be saved to a text file and imported to the list. Press 1 to change the Zoom. Press 2 to change the frameskip setting (0-slow&smooth, 8-fast&jittery). Press 3 to toggle the border. Settings Menu: Output Volume - Controls the loudness of sounds being played. Frameskip (0-10) - How many frames will be skipped between frames. Increasing this number can improve performance. Auto Adjust Emulation Speed - When enabled, ensures that the emulator runs at the same speed no matter what the maximum framerate is. If you disable this, be sure to also disable Turbo Mode and set the framerate to 60 FPS. Reset noise LFSR on trigger - The LFSR is the pseudorandom number generator used for the noise channel (this emulator doesn't actually emulate the LFSR, but plays a sound that was pre-generated from an identical LFSR). With this setting enabled, the emulator will mimic the resetting behavior found on an actual gameboy, where all bits in the LFSR get set to 1 whenever the noise channel is re-triggered (I just stop and replay the sound from the beginning). This affects the quality of the outputted noise. 1 is accurate to the real game boy. 0 may produce technically inaccurate but cleaner sounding noise. Skip BIOS - When enabled, the boot ROM showing the Nintendo logo at the beginning will be skipped. Note that this emulator does not include a GBC boot ROM so when running GBC games it is always skipped. Show FPS - Shows the frame rate of the emulated system (skipped frames are counted). Show Wave Table Visualizer - Displays the waveform being used by the wave channel. Channel 1-4 Volume - Individual volume controls for each audio channel. Wave Channel Quality - Controls the number of sine waves that are added together to produce the sound of the wave channel. Lower values yield smoother, muffled, less accurate waveforms. Higher values produce more accurate waveforms that capture the higher frequencies produced by the jagged edges between the steps of the wave table.
Project Details
- Visibility
- Visible
- Comments
- Enabled
- Remixed From
- Project #562335591
- Original Project
- Project #562335591
More Cool Projects

DOORS - Seek Chase
by Gamerudofia

Among us || Character platformer 2
by lightblue012

Timestart Band 9
by BFDI67376

The Best of the Virtual Pets! (minigame collection)
by SquidwardTentacools

The Epic Blob
by kevin_eleven_1234

Unfinished FNAF World Game
by MeIzAwezomeDede

ZXNM: Funky Pack
by -Multinia-

Hurricane Season Simulator | v1.6.3 [HSS2 IN DEV]
by s20038627

greening [green sans]
by ITSME_Felipe

Incredibox - wild as decay remix-2
by DeadpoolLamar

Underfell: Sans fight
by loganvcairns

beat up sonic exe but 2069 but my version
by SANNHIB_IS_SUS

Music App
by LG125YT_Tests

京急線シミュレーター v1.6.2 Keikyu Line Drive Simurator
by onara_go

Deeper The Dungeon v1.4.2
by Collin_The_Newmaker

(試射会)スプラ3withウデマエシステム
by akosanp

MRT: The Game
by calster1800

Beat Up Bonzi Buddy 2 remix remix
by TAG987654321

Flight Simulator Storm Mod
by 7FQ

Alphabet Lore starter pack
by klaskyfan123456Alt

Car Driving Simulator
by ArunL

FNF - (Vs Imposter) Week 2 (Old version)
by Bradk2005

Funk! Miss Nagatoro ( Toyboy )
by Wah4Smashh

DUSTTRUST PHASE1
by aiuexedx