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
-
Extract the "Standalone FLINK Software" to the *default* C:\FLINK
subdirectory.
-
Create the C:\FLINK\ROM subdirectory.
-
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.
-
gbd32k.asv
-
gbd32k.ini
-
gbd32k.jcl
Use
Once both packages have been installed, the following sequence is followed:
-
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
-
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
:
-
Rom2Cart32K.bat
Usage:
Rom2Cart32K.bat filename
of the GB binary ROM file.
-
Rom2Cart.htm
(this file)
-
NucBasic.gb
Example 32 KByte GB binary ROM for your testing.
-
Bin2Hex.com
is a MSDOS utility to convert GB binary ROM to Intel HEX
-
Miscellaneous
GB32K_A.* files
generated by PSDsoft Express.
-
Miscellaneous
GB64K_A.* files
generated by PSDsoft Express.
-
Miscellaneous
GB96K_A.* files
generated by PSDsoft Express.
-
Miscellaneous
GB128K_A.* files
generated by PSDsoft Express.
-
If you installed the "Standalone FLINK Software" package in the default
C:\FLINK subdirectory and have also installed PSDsoft Express but NOT yet
run it, backup the original PSDsoft.ini and copy:
C:\FLINK\ROM\PSDsoft.ini
to the
\PSDExpress\
main subdirectory.
-
\Source\C\SOS
subdirectory.
SOS.c
a sample C program which shows how to control
the DB25 I/O pins of the GatesBoy cartridge.
-
\Source\C\PIN_IO
subdirectory.
PIN_IO.c
a sample C program submitted by Dan Carter which shows how
to control all the DB25 I/O pins of the GatesBoy cartridge.
-
\Source\MergNucB
subdirectory.
NucMorse.bas
a sample NucBasic program which shows how to control
the DB25 I/O pins of the GatesBoy cartridge.
-
\Source\NucBasic
subdirectory.
NucBasic.asm
TASM Assembler source for the NucBasic Interpreter.
-
\Source\PSD
subdirectory.
PSD813F2.c and related files
contain generic C code to Program, Erase, Reset etc the
PSD813F2 chip with FLASH memory used in the GatesBoy cartridge version 7B & 7C.
These files need modifying to work with the GBDK C compiler, and also
adapting for your needs.
-
\Source\RGBDS
subdirectory.
Talk1to8.asm and related files
RGBDS Assembler source for talking demo program which shows how to
control the DB25 I/O pins of the GatesBoy cartridge.
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.