GameBoy Developers Kit (GBDK)

Highlights | Bug tracking/FAQ | Status | Changes | Downloading and Installing | Tools | The Example Programs | Guidelines | Troubleshooting | Links | Contact

Download (latest is 2.95-3)
CVS | Source / Linux / win32

Documentation
HTML | HTML tarball | PDF | Old docs

News

This project is no longer being worked on. See https://github.com/Zal0/gbdk-2020/ for a community driven reboot.

28th Feburary, 2001 - Current status. There has been little development on GBDK recently due to life getting in the way. I am currently working on porting sdcc to the Intel i186, and will hopefully be able to use basically the same code base to target the z80, gbz80, and Toshiba TLCS-900H. This should make the compiler in GBDK easier to maintain, but is still some time off.

If anyone wants to take up the maintenance or the lead of GBDK, contact me and I can give you access to CVS.

19th August - 2.95-3 Released. This is an experimental release for those who feel keen. The main change is a new lexer (the first part in the compilation process which recognises words and symbols like '!=' and 'char' and turns them into a token number) which speeds up compilation of large initialised arrays like tile data by a factor of three. Please report any bugs that show up - this is a big change.

I have also included a 'minimal' release for win32 users which omits the documentation, library sources, and examples. If this is useful I will keep doing it.

5th August - 2.95-2 Released. Just a small update. From the README:

  • Added model switching support
    --model-medium uses near (16 bit) pointers for data, and banked calls for anything not declared as 'nonbanked' --model-small uses near (16 bit) pointers for data and calls. Nothing uses banked calls. 'nonbanked' functions are still placed in HOME. Libraries are under lib/medium and lib/small.
  • Added the gbdk version to 'sdcc --version'
  • Changed the ways globals are exported, reducing the amount of extra junk linked in.
  • Turned on the optimisations in flex. Large constant arrays like tile data should compile a bit faster.

22nd July - 2.95 Released. This is a recommended upgrade. Some of the big features are:

  • Decent rgbds support. All the libraries and most of the examples can now compile with rgbds as the assembler.
  • Banked function support. It is now easier to break the 32k barrier from within C. Functions can live in and be called transparently from any bank. Only works with rgbds
  • Fixed some decent bugs with RSH, LSH, and a nasty bug with + and - for int's and pointers.
  • Various optimisations in the code generator.

7th July - Information on float and long support. Someone asked about the state of float/long support recently. Heres my reply:

long support is partly there, as is float support. The compiler will correctly recognise the long and float keywords, and will generate the code for most basic ops (+, -, &, | etc) for longs correctly and will generate the function calls for floats and hard long operations (*, /, %) correctly. However it wont generate float constants in the correct format, nor will it 'return' a long or float - gbdk doesn't yet support returning types of 4 bytes. Unfortunately its not going to make it into 2.95 as there's too much else to do, but I should be able to complete long support for 2.96

7th May - 2.94 released. Many fixes - see the README for more.

7th May - Library documentation up. A good size part of the libraries that go with gbdk have been documented - follow the HTML link above to have a look. Thanks to quang for a good chunk of the gb.h documentation. Please report any errors :)

6th April - 2.93 released. From the README

  • Added multi-bank support into the compiler - The old -Wf-boxx and -Wf-baxx options now work
  • Has preliminary support for generating rgbds and ISAS compatible assembler. Try -W--asm=rgbds or -W--asm=isas. The ISAS code is untested as I dont have access to the real assembler.
  • RSH is fixed
  • AND is fixed
  • The missing parts of 2.1.0's libs are there. Note: They are untested.
  • The dscan demo now fully works (with a hack :)
  • There is a bug with cached computed values which are later used as pointers. When the value is first used as a BYTE arg, then later as a pointer the pointer fails as the high byte was never computed and is now missing. A temporary fix is to declare something appropriate as 'volatile' to stop the value being cached. See dscan.c/bombs() for an example.
26th March - 2.92-2 for win32 available. This is a maintenance release for win32 which fixes some of the niggly install problems, especially:
  • WORDS are now back to signed. GBDK_2_COMPAT is no longer needed.
  • Temporary files are created in TMP, TEMP, or TMPDIR instead of c:\tmp
  • The installer is no more as it's not needed. There is a WinZip wrapped version for those with the extra bandwidth :).
  • gbdk autodetects where it is installed - no more environment variables.
  • cygwin1.dll and make are no longer required - gbdk is now compiled with mingw32.
See the ChangeLog section in the README for more information.

21st March - Problems with the installer. It seems that the demo of InstallVISE has an unreasonably short time limit. I had planed to use the demo until the license key came through, but there's no sign of the key yet and the 3 day evaluation is up. If anyone knows of a free Windows installer with the ability to modify environment variables, please contact me. I hear that temporarily setting you clock back to the 15th works...

18th March - libc5 version available / "Error creating temp file" Thanks to Rodrigo Couto there is now a Linux/libc5 version of gbdk3-2.92 available - follow the download link above. At least it will be there when the main sourceforge site comes back up... Also some people have reported a bug where the compiler reports '*** Error creating temp file'. Try typing "mkdir c:\tmp" from a DOS prompt and see if that helps.

8th March - gbdk3 2.92 released. Better than 2.91 :). Can now be installed anywhere. All the demos work. See the README for more.

27th Feb - gbdk3 2.91 released. Better than 2.90 and includes Linux, win32 and a source tar ball. Some notes:

  • Read the README first
  • Linux users need libgc-4 or above. Debian users try apt-get install libgc5.
  • All the types have changed. Again, please read the README first.
  • I prefer release early, release often. The idea is to get the bugs out there so that they can be squashed quickly.
  • I've split up the libs so that they can be used on other platforms and so that the libs can be updated without updating the compiler. One side effect is that gb specific files have been shifted into their own directory i.e. gb.h is now gb/gb.h.
Many of the other pages on this site are now out of date. And gbdk3 needs a logo... I have seen trouble with the examples and no$gmb.

23rd Feb First release of gbdk/sdcc. This is an early release - the only binary is for Linux and the source is only available through cvs. If your interested in the source, have a look at the cvs repository gbdk-support first, which will download all the rest of the code. Alternatively, look at gbdk-support and gbdk-lib at cvs.gbdk.sourceforge.net and sdcc at cvs.sdcc.sourceforge.net. I will be working on binaries for Win32 and a source tar ball soon. Please report any bugs through the bugs link above.

31st Jan Added Dermot's far pointer spec. It's mainly here for comment. If sdcc is ported to the Gameboy then I will be looking for some way to do far calls.

8th Jan Moved over to sourceforge.net. Thanks must go to David Pfeffer for gbdk's previous resting place, www.gbdev.org. The transition is not complete, but cvs and web have been shifted. Note that the cvs download instructions are stale - you should now look to cvs.gbdk.sourceforge.net.
I am currently working on porting sdcc over to the Z80. David Nathan is looking at porting it to the GB.

6th Jan Icehawk wrote "I did write some rumble pack routines. Just make sure to remind people to add -Wl-yt0x1C or -Wl-yt0x1D or -Wl-yt0x1E depending on sram and battery usage. Find the routines on my site (as usual). =)"

18th Oct - Bug tracking / FAQ up. Try the link on the left to report any bugs with GBDK. It's also the first place to look if your having problems.

17th Oct - GBDK 2.1.5 is available. The compiler is the same, but some of the libraries have been improved. memset() and memcpy() are much faster, malloc() is fixed, and a high speed fixed block alternative malloc() was added.

The most common question I get asked is along the lines of 'I tried to compile xxxx but I get an error saying 'crt0.o' not found. crt0.o is the compiled form of crt0.s in the lib directory - cd to lib and type 'make' to compile it and the rest of the library files,

The source to a universal remote control for the CGB from Mr.K.I. and Mr.N.U of TeamKNOx is now available.

TeamKNOX can be found here. They have an impressive PDA written partly in GBDK.

Thanks to E. Allen Soard there is now a precompiled binary for Linux with libc5.

A preliminary version of the libraries documentation is available online or in PDF form It has not been updated to reflect gbdk3.

For technical information on the GameBoy hardware, see here.

Have a look at the GBDoK documentation page maintained by Jason.

GBDK 2.1.0 was Pascal's last personal release. These web pages are now maintained by Michael Hope.

So, what's the future of GBDK? You tell me :) Some ideas are Style suggestions (Lynx compatible) would be appreciated.

I'm interested in any libraries that people may have written for GBDK - please contact me directly. 

Highlights

The GameBoy Developer's Kit (GBDK), is a set of tools that enable to develop programs for the Nintendo GameBoy system, either in C or in assembly. GBDK includes a set of libraries for the most common requirements and generates image files for use with a real GameBoy or with an emulator like VGB or no$gmb.

GBDK is available for UNIX and DOS. The UNIX version of GBDK has been tested on Debian Linux 2.1. The Win32 version runs from inside a win32 DOS box - note that it may be possible to recompile so that it will also work under DPMI.

GBDK features:

  • An ANSI C compiler.
  • An assembler that generates relocatable code.
  • A peephole optimiser.
  • A linker that produces GameBoy image files.
  • Support for multiple-bank images.
  • Smart linking.
  • A set of libraries, with source code.
  • Example programs in assembly and in C.
GBsed, a companion sprite editor written in Java, enables to create images and sprites to be included in GameBoy programs. Alternatively, you can use the Win 95/NT BMP2GB program by Ian James that convert BMP files to C code, or the Win 95/NT GameBoy Tile Designer and Map Builder programs that lets you create images and maps for GBDK.

Status

GBDK is freeware for non-commercial developments. Most of the code is under the GPL. The runtime libraries should be under the LGPL. The non-commercial clause is from the C front end, lcc. If you use it, please send me an e-mail to keep me informed of your work. If you really find it great, you can send me something typical from your country...

If GBDK is used for developing a commercial program, I ask you to mention that the program has been made using GBDK (in the credits), and to send me a copy of the finished product. If you feel generous, you can also send me a copy of any other products that your company has produced for the GameBoy...

Links

GBDK Documentation and Support Files

GBDK Ports

Technical informations on the GameBoy


[1] Saying 'real soon now' always jinxs a project :)
[2] Life, a new country, getting Married...

Michael Hope / $Id: index.html,v 1.27 2001/02/28 16:54:49 michaelh Exp $ / History