I figured it might be useful to have thread for discussing BGB, the Gameboy emulator I would recommend. If you have questions you want answered/added, please ask here.
Current version: 1.5.3, released 2015-03-04. All users are recommended to update to the latest version.
New in BGB 1.5.3 (2017-03-04) - Accuracy improvements, including: pokemon (all versions) now has correct TID for speedruns. Fixed a large number of bugs and problems, including: "uncoverable direct3d error" on some Optimus laptops. Added improved support for automation/commandline use. Significant performance/efficiency improvement with most roms. Added support for loading RTC .sav files where a timestamp in the future does not (incorrectly) advance time.
New in BGB 1.5.2 (2015-08-17) - Fixed a large number of bugs and problems, including: glitches in pokemon linking. Screensaver now doesn't start if you play with gamepad. Crash/stability fixes. Many small improvements, including efficiency improvements. Added support for more joypad axes (xbox 360 controller). Various debugger GUI improvements including local symbols.
It's reasonably fast, very accurate, has high quality audio rendering and is feature rich and generally well-working. It also has a powerful debugger which is useful for Gameboy software development.
xxx doesn't work/I have a problem.
First of all, make sure you have the latest version from the link above. If you have an old version there's a good chance that your problem is fixed in a recent release.
If that doesn't help, and if you believe you have found a bug, please report it to beware, the author. You can do that in this thread, by sending an e-mail to the address on the homepage or by visiting the #gbdev IRC channel on EFNet.
Which platforms are supported?
Almost any 32-bit or 64-bit of Windows. The latest version should work as far back as Windows 98 with DirectX 7 installed, and tentatively Windows 95 with DirectX 7 and the Winsock 2 package installed. On the other end of the lineage, BGB reportedly works perfectly on Windows 8.
Another platform that is officially supported by the author of BGB is Wine. Any issues with using BGB under Wine should be reported as bugs. The current version of BGB has received a platinum rating in the Wine AppDB.
How can I change BGB settings?
Right click the emulator window and select options, or press F11 on you keyboard.
Where are my savs stored?
By default, a save file for a ROM is stored next to the ROM, with a sav file extension. For example, if the ROM is called lsdj.gb, a file called lsdj.sav in the same directory will hold the save data.
BGB can also save all savs in a single directory which you can set in the options window, under the misc tab.
What are checksums and how can I fix them?
A Gameboy ROM contains two checksums to verify that the ROM hasn't been damaged. If you've edited the ROM (for example added kits) the checksums may no longer be valid.
The header checksum is calculated based on the values in the ROM header only. This checksum must be correct to to start the ROM on a real Gameboy, but will only need to be fixed if you've edited values in the header area.
The file checksum is not required to be correct to start program on a Gameboy, but you may still want to fix it after editing a ROM to get a warm fuzzy feeling inside. If you're distributing a ROM to other people, it's good practice to fix both checksums.
Press esc to bring up the debugger window. Select file, fix checksums. then file, save as to save the fixed ROM file.
How can I record audio from BGB?
Note: If you're using a version older than 1.4.x, it's especially important that you upgrade if you want to use the recording function, because of a bug that would cause timing problems, which was fixed in 1.4.
In the settings, go to the sound tab and enter the beginning of a file name in the wave file writer box, and check the checkbox. When you resume emulation, a timestamp and wav file extension is added to what you have entered.
For example, if you enter c:\songs\mysong then the audio will be recorded to a file with a name like c:\songs\mysong-1384891504.wav where 1384891504 is a UNIX time UTC timestamp indicating the when the recording was started. The recording continues until you pause or quit the emulator, or uncheck the wav file writer check box and hit apply or ok.
Why does the soundcard output skip a lot while recording?
Because BGB has to output the sound stream to two different locations, (both disk and soundcard) and sometimes BGB the disk IO will take so long that BGB can't produce a sound buffer when the soundcard wants it. However, the wav file is still recorded perfectly.
Is it possible to sync LSDj running on two different instances of BGB?
Yes. However you should use two different GB files with two different corresponding sav files, so they don't conflict.
Right click one of the BGB windows and select link, listen. Enter a port in the range 1024-65535. Right click the other window and select link connect. Enter 127.0.0.1 followed by the : followed by the port, for example 127.0.0.1:12345
This only creates a virtual link cable and you still need to set up LSDj to make the sync work. One instance should have sync type set to master and the other to slave. Press start on the master side in order to start playback. Or press start first on the slave which should show "WAIT" until you press start on the master.
Is it possible to record two LSDj synced in BGB?
Yes, you should be able to combine the two instructions above, with a couple of caveats.
When you open the BGB settings dialog, the settings are loaded from the ini file. So if you first set a filename in one of the instances, a,d then open the settings dialog for the other instance, the file name carries over. You can solve this by having both dialogs open before you begin. You could also keep two BGB instances in different folders, so they each have their own ini file.
Do things in the following order:
Start two instances of BGB and load two different instances of LSDj.
Establish a link connection, as described above.
Pause one of the Gameboys. (This will pause poth.)
Open the settings dialog in both the instances of BGB, and keep them open.
Enter two different file name beginnings (see the above entry about recording) in the respective instance, and press apply.
Unpause BGB. Now, both the instances should start recording in sync, and with minimal offset.
When you're done, uncheck the respective record enable boxes then click apply. Or just quit BGB. You will get a warning next time that recording is enabled, so you don't accidentally start recording again.
Links for developers
RTC save format specification - Real time clock save file format, for games like Pokemon Gold/Silver.
MBC2 save format specification - Specification of the save format for the MBC2 cartridge memory controller.
BGB 1.4 link protocol - The protocol for interfacing with BGB's link cable emulation.
Last edited by nitro2k01 (March 6, 2017 4:44 pm)