GBDK 2020 Docs  4.3.0
API Documentation for GBDK 2020
Links, Tools and Debugging

This is a brief list of useful tools and information. It is not meant to be complete or exhaustive, for a larger list see the Awesome Game Boy Development list.

SDCC Compiler Suite User Manual

Getting Help

Game Boy Documentation

  • Pandocs
    Extensive and up-to-date technical documentation about the Game Boy and related hardware.
    https://gbdev.io/pandocs/
  • Awesome Game Boy Development list
    A list of Game Boy/Color development resources, tools, docs, related projects and homebrew.
    https://gbdev.io/resources.html

Sega Master System / Game Gear Documentation

  • SMS Power!
    Community site with technical documentation, reviews and other content related to the Sega 8-bit systems.
    https://www.smspower.org/

Tutorials

Example code

Graphics Tools

Music And Sound Effects

Emulators

Intellisense in VSCode may have trouble identifying some GBDK types or functions, and therefore flag them as warnings or unidentified.

GBDK platform constants can be declared so that header files are parsed more completely in VSCode. The following c_cpp_properties.json example may be adapted for your own project.

    {
        "configurations": [
            {
                "name": "gameboy",
                "includePath": [
                    "${workspaceFolder}/src/**",
                    "${workspaceFolder}/res/**",
                    "${workspaceFolder}/include/**",
                    "${workspaceFolder}/../../../gbdk/include/**"
                ],
                "defines": ["__PORT_sm83", "__TARGET_gb"],
                "compilerPath": "",
                "cStandard": "c11",
                "intelliSenseMode": "${default}",
                "compilerArgs": [],
                "browse": {
                    "limitSymbolsToIncludedHeaders": true
                }
            }
        ],
        "version": 4
    }

Debugging tools

  • Emulicious debug adapter
    Provides source-level debugging in VS Code and Sublime Text that works with GBDK2020.
    https://marketplace.visualstudio.com/items?itemName=emulicious.emulicious-debugger
    • If compiler optimization is making the program source hard to step through in the debugger then adding this flag to lcc can help. Note that using this flag will likely reduce code performance and increase code size while enabled, so it is best to only use it temporarily.
      • -Wf--max-allocs-per-node0
  • romusage
    Calculate used and free space in banks (ROM/RAM) and warn about errors such as bank overflows.
    See romusage-settings
  • noi file to sym conversion for bgb
    Debug information in .noi files can be converted to a symbol format that BGB recognizes using:
    • lcc : -Wm-yS (with --debug, or -Wl-j to create the .noi)
    • directly with makebin : -yS (with -j passed to the linker)
  • src2sym.pl
    Add line-by-line C source code to the main symbol file in a BGB compatible format. This allows for C source-like debugging in BGB in a limited way. https://gbdev.gg8.se/forums/viewtopic.php?id=710

Optimizing Assembly

Continuous Integration and Deployment