Home    FAQ    Site Map    Order    E-query us

GatesBoy™ binary ROM image to Cartridge Download Tips

Which versions of Game Boy are covered by these tips?

The download procedure is identical for the Game Boy Advance, Color, Pocket, and Light. The original Game Boy Classic (which has "Dot Matrix with Stereo Sound" marked above the screen) is not supported.

With the Game Boy Advance, GatesBoy™ works in GBC compatibility mode, so your program has access to all the enhanced I/O features of GatesBoy™. However, the GBA specific features (ARM processor power and speed) are disabled. Currently there is no known method of enabling the ARM processor when a GBC cartridge (like GatesBoy™ ) is plugged into a GBA. You can, of course, stretch your images to fit the full width of the GBA screen.

What software packages are covered by these tips?

Download the Rom2Cart.zip (1 Megabyte) package. This contains files and utilities needed to download programs to the GatesBoy™ cartridge. It also contains code showing how to control the pins of the DB25 connector of the GatesBoy™ cartridge. These examples are provided in NucBasic™, C and Assembler.

Look for the "PSDsoft Extpess" download page on the the STMicroelectronics site and download the latest "Standalone FLINK Software" from STMicroelectronics. This contains the STM utilities which handle address translation and parallel port communication.

If you have a problem with the latest version of the Standalone FLINK Software you can get an older version here: upfloc25.zip (2.5 MBytes)

Download Cable

You will need an IBM PC type parallel port cable with a 25 pin male connector at each end. If you want to make your own, connect pins 2-9 and 11-19 at one end to the same pin numbers at the other end. If all 25 pins are connected that is also fine. The cable should be less than 3 meters (10 feet) long.

Installation

  1. Extract the "Standalone FLINK Software" to the *default* C:\FLINK subdirectory.
  2. Create the C:\FLINK\ROM subdirectory.
  3. Unzip Rom2Cart.zip to C:\FLINK\ROM.

If you cannot install this software in C:\FLINK

Look at Rom2Cart32K.bat - you may need to edit this file.
You will need to carefully edit the pathnames in the following PSDsoft Express program generated files.

Use

Once both packages have been installed, the following sequence is followed:
  1. Assemble / compile your code to a 32 KByte GB binary ROM and copy this to C:\FLINK\ROM
    e.g. C:\FLINK\ROM\NucBasic.gb
  2. In DOS, go to the C:\FLINK\ROM subdirectory and Run
    Rom2Cart32K.bat   NucBasic.gb
    Which performs the following conversion / transfer sequence:
    NucBasic.gb to GB32K_A.hex to GB32K_A.obj to Parallel Port to GatesBoy™ cartridge.

    A Windows " Run " box should read "C:\FLINK\ROM\Rom2Cart32K.bat   NucBasic.gb"

    NucBasic.gb (supplied) can be used for your initial test, which therefore becomes:
    "C:\FLINK\ROM\Rom2Cart32K.bat     NucBasic.gb"
    The Working Directory for a Windows shortcut icon would be "C:\FLINK\ROM"

For programs larger than 32 KBytes

Memory pages are 32 KBytes, 0000h - 7FFFh. Programs up to 32K Bytes do not need paging. If your binary ROM file (*.gb) is larger than 32 KBytes (Max is 128 KBytes) then the procedure is similar to the above. However, use Rom2Cart64K.bat or Rom2Cart96K.bat or Rom2Cart128K.bat as appropriate. Do not use the GBDK or assembly language bank switching support functions. Instead, write directly to the page register of the PSD memory chip. This register is defined as "PAGE" in the "psd813f2.h" header file (to be included in your C program) and "PSD8x.inc" include file (for assembly). Each page is 32 KBytes, and the ROM has 128 KBytes, so you have pages 0 - 3.

Why we need Intel HEX format files

The UTLADRM.exe file merging utility from STM does not accept a binary ROM input file (the usual Game Boy ROM format), so the ROM file needs to be converted to Intel HEX format. The enclosed Bin2Hex.com utility performs this conversion. This is performed automatically by the Rom2Cart32K.bat file (see transfer sequence above).

Troubleshooting

The UTLADRM.exe and FLINK.exe programs generate logs and errors in C:\FLINK\ROM\GB32K_A.log and C:\FLINK\ROM\GB32K_A.err
If there is an error, Rom2Cart32K.bat displays these two files on the screen. Look at the troubleshooting guide http://www.gatesboy.com/tsdownload.htm

Subdirectory Contents

C:\FLINK contains the files extracted from upfloc25.EXE
C:\FLINK\ROM contains the following files extracted from Rom2Cart.zip :

Other Documentation supplied by STM in C:\FLINK

utladrm.pdf has usage information for UTLADRM.exe (the STM address translation utility).
FLINK.pdf has usage information for FLink.exe (the STM JTAG parallel port cartridge download utility).


Feedback
This is a FeedbackFriendly site. Feedback to Rom2Cart

Rom2Cart.htm (this file) Version 1.51. Updated 6 August 2004.
The latest version can be found at http://www.gatesboy.com/Rom2Cart.htm


GatesBoy™ and NucBasic™ are trademarks of David Nathan Creations Ltd.
Game Boy & Nintendo are trademarks of Nintendo Co., Ltd. of Kyoto, Japan.
PSDsoft is a trademark of STMicroelectronics Inc.