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
3D Engine
by Tigershade1034
魔改造ポップコーンスマホ対応
by Taka0131
Ballon sky!
by nyannkithi
スプラトゥーン ver2.0 / splatoon ver2.0
by syokaki
スペースシューター ver1.0モバイル 対応
by BABABU35
Sonic The Hedgehog 2: For Scratch
by SwagGames1
バネプラットフォーマー続編! モバイル対応 Sequel to Spring Platformer! mobile compatible
by KYJTN
Reflect_Hero
by Blank_Dev
-椅子鳥GAME- 第銃護話「確定演出」
by mikorin
Super Mario Kart (Instructions en français)
by cesou91_officiel
Cat Clicker!
by cyruswasapro
Survival in Among Us
by Mihapro0012
アニメ FOURVERSE 第43話「封印者」
by kesikesi_gomugomu
Beluga Dash
by LukeMaster999
TACT-AIM ANOTHER
by FUJIkam
HTML-Editor 2
by NpChecker
Poly Bridge
by TarangoHasan
UUSR Sprites for @--DEADLINE-GAMES--
by Krystian0827
osu!mania but dark
by saberwhy
slap battles online (wip)
by pooiod7
Minecraft Terrain v1
by urlocalcreator
【5~1級】太鼓の達人 段位道場2021 ニジイロver. v3.2.0.3
by Kuppi-scratch
Numberblocks band thirty seconds 63 Make new dances
by 768thecreator
Intro 4 Tralaxy (Best intro yet)
by Samburrito