MBV2 FAQs - Last Update 2003-July-15


General FAQs

What does the MBV2 cable do?
Where are they available?
I have seen an MBV3 cable. Is that the latest version?
Can I get info on the protocol used by the cable to talk to the GBA?
I want to program flash carts. Should I get an MBV2 or a dedicated cart programmer?
What type of flash carts does the MBV2 support?
Is any other hardware needed?
Are there any photos of it?
How is the cable actually used?
What is the smaller 9 pin connector on the MBV2 used for?
Is there any convenient way to use the MBV2 and a multiplayer link cable together?
What cable firmware is the latest?
How does downloaded code differ from code that might be in a cart?
Is there any way to distinguish between a file compiled as a ROM vs MultiBoot?
Is there any way to compile a file so that it will work on a flash cart / emulator and also MultiBoot?
Where do I get the the PC software?
What features are introduced with each version of PC software?
What demos are available to test?
How do I display a photo on the GBA screen?
What operating systems are supported by the MBV2 software?
How do I get it to work on Win 2000 or Win XP?
Any other methods for Win 2000?
Does this cable have other features besides code transfer?
Does the MBV2 support GBA UART comms mode?
How do you tell the MBV2 to enter GBA UART comms mode?
I want to download a multiboot image and then switch over to UART mode. How?
I already have a GBA flash cart. Can I use a MBV2 along with it for debugging?
How do I program my official Nintendo cart with the MBV2?
Can official Nintendo flash carts be used "as is" with it?
How do I program my Flash Advance or *modified* official Nintendo flash cart?
What exact types of flash carts can be programmed with the MBV2?
Can I program GB/GBC flash carts or use the MBV2 for GB/GBC software development?
What is the transfer rate from PC to GBA?
Do you have to power off the GBA each time you test new code?
Is there any way to copy cart backup memory to or from a PC?
Is there any way to reprogram part of a flash cart instead of the whole thing?
I followed the directions, but I get "Error - No hardware found.." Any ideas?

What does the MBV2 cable do?

The MBV2 (MultiBoot Version 2) is a cable that connects to a
PC parallel port and to the link port on the GameBoy Advance itself. It allows you to test small GBA programs (256K bytes or less), that you have created yourself, on real GBA hardware, or you can use it to program flash carts (only GBA flash carts, no GB/GBC flash carts). It takes advantage of the fact that each GameBoy Advance has a built-in boot algorithm for loading code over the link port into external WRAM (256k bytes) and then executing this code. (External WRAM is actually inside of the GBA itself.) As such, no cart is required to be installed in the GBA to use this cable.

Where are they available?

You can get them from http://www.lik-sang.com . Go to their site and
do a search on the keyword MBV2. There is no other source for the MBV2. Other devices that claim to be 100% compatible are not.

I have seen an MBV3 cable. Is that the latest version?

That appears to be a clone of the MBV2. One web site that distributes
this cable claims that it is "compatible with version 2" and that it "supports GBA UART comms mode". However, both of these statements appear to be wrong because there appears to be no DB9 serial connector on this device. It appears (though it has not been verified) that they are also using a relatively low-speed PIC chip in the cable (similar to the MBV1) that will not allow it the same performance as the MBV2.

Can I get info on the protocol used by the cable to talk to the GBA?

I can not release this information due to an agreement I've made with
another company. :( Sorry about that. However, I can release info on the protocol from the cable to the PC for purposes of writing custom PC apps. Use the email link at the bottom of the page for more info.

I want to program flash carts. Should I get an MBV2 or a dedicated cart programmer?

The flash advance linker has the advantage of being faster. One 4Mbyte
test file I tried took 55 seconds to erase & program using the FAL.

The MBV2 took 98 seconds to erase & program the same file. (You need v3 firmware or later in order to program Flash Advance flash carts.) However, when using the MBV2 you save some time and much wear & tear on connectors due to the fact of not having to remove the cart from the GBA to program it. You can program a cart and then immediately execute it using the command line option -e. If you also use -r and modify your GBA for hardware reset then you don't need to cycle the power on & off each time you reprogram.

What type of flash carts does the MBV2 support?

Only Flash Advance, Flash Advance Turbo, and official Nintendo flash carts.
EZF Advance, Flash2Advance, and game carts that you buy at your local game store are not supported.

Is any other hardware needed?

The MBV2 cable is about 3 feet (1 metre) in length and plugs directly
into a PC parallel or serial port. (Parallel cable is required for transferring code or programming flash carts. Serial cable is required to use GBA UART comms mode for your own coding projects.) If you need a longer cable from your PC to your GBA then you need a parallel or serial extension cable. Any standard serial or parallel "straight through" extension cable will work.

Are there any photos of it?

Here's a photo of it with the cover on -
http://home.hiwaay.net/~jfrohwei/gameboy/mbv22.jpg and here's a photo with the cover off - http://home.hiwaay.net/~jfrohwei/gameboy/mbv21.jpg . Many of the components are on the bottom on the pc board. The top connector is parallel and the bottom right is serial. The bottom left 4 pin connector is accessible when the cover is on and it is used to upgrade the internal computer chip firmware in order to take advantage of any future enhancements. (The cable has to be returned to be upgraded since it takes special equipment and there may be a small fee to cover shipping costs.)

How is the cable actually used?

You just connect the cable from your PC parallel port to the GBA
link port and then turn on the GameBoy Advance with no cart installed. Then you run a program on the PC end that transfers code to the GameBoy Advance. At the end of transfer of data the code will automatically execute. Example demonstration programs along with source code are available along with the cable software.

What is the smaller 9 pin connector on the MBV2 used for?

That can connect to a PC serial port but it can not be used to
transfer programs to the GBA using MB.EXE. It is useful for allowing the MBV2 to communicate with a PC when the GBA is in UART comms mode.

Is there any convenient way to use the MBV2 and a multiplayer link cable together?

Yes, get the InterAct PlayLine Link Cable (http://www.InterActAccessories.com).
This kit contains a "Link Port Multiplier/Pass Thru Port" that allows you to plug two devices into the link port at the same time. You can download code to a GBA, using the MBV2, and upon completion the MBV2 will no longer interfere with the link port. This will allow you to communicate with a second GBA even with two cables in the link port. An alternative method to this would be to use 2 GBA's, 2 MBV2's, 2 Pass Thru Ports, 1 link cable, and 2 PC parallel ports. This would allow downloading multiplayer code to 2 GBA's independent of each other.

What cable firmware is the latest?

At various times new cable firmware is released to add more features
to the internal cable computer chip. This is done by returning the cable to where you bought it so that it can get upgraded by way of the four pin connector on the end of the cable housing. Upgrades can NOT be done by the end user. The upgrade code (even in compiled form) will not be sent to end users due to legal agreements in effect. Here is a list of the various firmware and the added functionality with each release:
v0 - Original release.
v1 - Support for GBA UART mode added.
.....The GBA can indicate wanting to enter UART comms mode by setting
.....SD to 1 & SC to 0 for at least 50 milliseconds. (The GBA can do
.....this by entering General Purpose comms mode, set SD high (1), set
.....SC low (0), delaying 50 milliseconds, and then switching to UART
.....comms mode.)
v2 - Does not exist. Skipped for version naming reasons.
v3 - High speed PC to GBA transfer modes added. Upgrade to at least this version if you wish to use your MBV2 to program Flash Advance flash carts.
v4 - High speed GBA to PC transfer mode added. This mode is currently not used and was only added for possible future use.

How does downloaded code differ from code that might be in a cart?

Downloaded code by MultiBoot is nearly identical to ROM code. They both
must have a ROM header at the beginning followed by code/data. (Currently, the rom header, by default, is replaced with a known good header containing the standard logo. This default replacement can be disabled with a command line option.) To compile your code you need to specify a Text section of 0x2000000 instead of 0x8000000. There is one other difference. In multiboot images, the area from 0x20000c4 to 0x20000df is reserved and should be set to zeros in your crt0.s (for GCC) or start.asm (for SDT). If you use the following code, then stick it right after the ROM header:

        b       SkipReservedStuff
        .byte   0       @ Boot method (0 = ROM boot, 3 = Multiplay boot)
        .byte   0       @ Slave # (1 = slave #1, 2 = slave #2, 3 = slave #3)
        .byte   0       @ reserved
        .byte   0       @ reserved
        .word   0       @ reserved
        .word   0       @ reserved
        .word   0       @ reserved
        .word   0       @ reserved
        .word   0       @ reserved
        .word   0       @ reserved
SkipReservedStuff:
(For SDT, replace .byte with dcb, .word with dcd, and @ with ; .)

After the multiboot image is loaded into RAM by the GBA, the GBA BIOS will patch location 0x20000c4 (boot method) with 0x03 and location 0x20000c5 (Slave #) with 0x01.

Is there any way to distinguish between a file compiled as a ROM vs MultiBoot?

I personally use .gba (preferred) or .bin to indicate a standard ROM image
and .mb to indicate a MultiBoot image. My proposal is that if the file extension is .mb OR the rom header game code is 'MB ' (Hex: 4D 42 20 20) then GBA emulators should treat the file as a MultiBoot image rather than a standard ROM image. The ideal MultiBoot image should probably use both.

Is there any way to compile a file so that it will work on a flash cart / emulator and also MultiBoot?

Yes. Use the ReservedStuff header, above, (after the normal ROM header) and compile
the rom with the Text section set to 0x2000000. After the ReservedStuff header put some assembly language code in that file that detects if the program is running in ROM or RAM (by looking at the Program counter value.) If the program is running in ROM then copy 256k bytes of the program to external RAM and then branch to 0x2000000. If the program is running in RAM then continue as normal. You should probably give the file an extension of .mb.gba (i.e. myfile.mb.gba) since it works on multiple setups. (Idea from Joat / File extension idea from Dark Fader.)

Where do I get the the PC software?

DOS / Windows port v1.75: http://www.devrs.com/gba/files/mbdw.zip
Linux port v1.75: http://www.devrs.com/gba/files/mblinux.tar.gz
DebugLib v1.42: http://www.devrs.com/gba/files/mbdebug.zip
To do printf/getch or fileserving over the parallel link with Debug console (-c) you need DebugLib (also referred to as mbv2lib.c) as well. To use this library the MB software must be running in Console mode (i.e. -c option). The PC parallel interface must be used. DebugLib does not support the mbv2 serial interface.
To uncompress the linux version just do: tar -xzf mblinux.tar.gz
You must be a root user to run this software on linux. Also, you may need to kill "lpd" in order to get more reliable operation in linux.

What features are introduced with each version of PC software?

Type the following to get the version number: mb

v1.50 - * Added -3 option
v1.60 - * Fixed verify OK reported count. * Added support for MBV2 firmware v3 & Flash Advance programming. Speeded up official Nintendo flash cart programming many times. [<3 minutes to erase/program 4mbytes.] (NOTE: Flash Advance & fast N flash cart programming requires firmware v3 or later.) * Speeded up -3 option when using MBV2 firmware v3.
v1.70 - * Added support for Turbo/Pro FA 256M flash cart.
v1.72 - * Added -u option. Fixed 'fgetc' bug with char 0x1b when using mbv2lib.
v1.73 - * Filenames & paths can now be 256 characters long instead of 20 chars.
v1.75 - * Added support for user specified port address & fixed bug in xferNC() routine where -x had no effect.

What demos are available to test?

Here's gfxLib compiled for MultiBoot: http://www.devrs.com/gba/files/glibmb.zip
To use it try the following: mb -s glib -w 500
(For linux, use this instead: ./mb -s glib.mb -w 500)
If that doesn't work then try doubling the number until it works.
If that does work then try cutting the number in half until it fails. Once it fails then double the number to get a reliable setting. A smaller number means a faster transfer rate for download.

The source code for gfxLib is on this web site. Just change the 0x8000000 to 0x2000000 in the 'makefile' and it will compile for MultiBoot.

How do I display a photo on the GBA screen?

First, you need v1.50 software or later. Next you need a photo
that is 240x160 pixels or smaller and it has been saved in Targa (.tga) format. (You can also display raw graphics files but that's left for more experienced users to attempt.) It can be 16,24, or 32 bits color depth and it doesn't matter if it's compressed (RLE) or uncompressed. Try the following:
mb -3 YourFile.tga -w delay

What operating systems are supported by the MBV2 software?

It has been tested on Win95, Win98, Win2000, WinXP, and linux. It *should*
also work on WinNT with the giveio method described for Win2000.

How do I get it to work on Win 2000 or Win XP?

1) Get the following driver: http://www.devrs.com/gba/files/userport.zip
2) Unzip userport.zip in a temporary folder.
3) Copy the userport.sys file into the %XPDIR%/SYSTEM32/DRIVERS/
4) Copy the userport.exe file into the %XPDIR%/
5) Run the userport.exe file and enter the adress-range applicable for your LPT1 port. (Check this range in the Control Panel|System|Hardware|DeviceManager|PORTS|Printer ports|Resources). My I/O range for LPT1 was 0378 - 037F. You can remove the other ranges listen by default in userport.exe.
6) Click start. That's it, you can exit UserPort now.
Open any shell you want (e.g. Start->Run->"cmd") and MB.exe will work.

Any other methods for Win 2000?

METHOD #1
1) The method above is probably preferred but you can also use these methods.
2) Get the following driver: http://www.devrs.com/gba/files/giveio.zip
3) Unzip it in directory c:\giveio (Or some place, anyway..)
4) Run loaddrv.exe. Set the path in the edit box to c:\giveio\giveio.sys
5) Click Install.
Now you should be setup to use MB.EXE. Everything above only needs to be done once.

6) Execute giveio.cmd by double-clicking it or running it. (NOTE: You must do this every time you restart windows!)
7) In the new shell window that is created, you can now use MB.EXE to control the MBV2.

METHOD #2 - Get and install Direct I/O from http://www.direct-io.com

Does this cable have other features besides code transfer?

v1.50 & later software allows you to display raw or Targa (.tga)
graphics pictures on the GBA. You can program official Nintendo flash carts in the GBA itself using MBV2. Also, there are features that allow doing a "printf" on the GBA which displays a debug string on the PC. File server software is also supported which allows the GBA to read or write PC files over the link.

Does the MBV2 support GBA UART comms mode?

Yes, if you have version 1 firmware or later. If you have version 0
firmware then it has to be upgraded to support this mode. (You can display your firmware version by doing: mb -s ) Upgrades are not physically possible over the parallel port or serial ports.

In order for the MBV2 to transmit serial data out the pin 9 serial connector, pin 7 must be held high (+5v to +12v). (However, the MBV2 can receive data without requiring anything to be held high.) This is normally accomplished by enabling hardware handshaking on a PC serial interface. This upgrade supports standard UART transmit/receive and hardware handshaking from PC->GBA. (i.e. GBA can wait until PC is ready to accept data.) Handshaking from GBA->PC is not supported due to hardware limitations. (i.e. PC will not wait until GBA is ready. It can send data to GBA at any time.)

To upgrade the firmware you must send it to the following address along with US$5 to cover return international postage:

Jeff Frohwein
910 Clinton Ave. E
Huntsville, AL 35801
USA

How do you tell the MBV2 to enter GBA UART comms mode?

If the MBV2 is powered up while connected to a parallel port,
then the MBV2 will go into sleep mode when not busy. This is to save GBA battery power. So you must use the software -u option to set uart mode. The method below will NOT work for switching to UART mode if the MBV2 was powered up while connected to a parallel port.

If the MBV2 is powered up while not connected to a parallel port, then the MBV2 is in serial mode. At this point you can switch to UART mode by setting link port SD to 1 & SC to 0 for at least 50 milliseconds. (The GBA can do this by entering General Purpose comms mode, set SD high (1), set SC low (0), delaying 50 milliseconds, and then switching to UART comms mode.) You also need to supply a handshake or +5v to +12v to pin 7 of the 9 pin serial connector or else the MBV2 cable will not put out any data, even though it will receive data just fine. This is normally accomplished by enabling hardware handshaking on a PC serial interface.

I want to download a multiboot image and then switch over to UART mode. How?

Use the -u option that is found in v1.72 or later. But also realize that the
serial port and the parallel port on the MBV2 can not both be hooked up at the same time due to the fact that they share some interface signals. Here are various options:
1) Put a parallel port switch on the parallel cable and a serial port switch on the serial cable.
2) Keep the serial cable hooked up all the time but put a parallel port switch on the parallel cable. The only draw back is that garbage serial characters will be sent by the MBV2 while the multiboot image is being downloaded.
3) Same as option #2 except instead of a parallel switch, pin 1 & pin 11 on the parallel interface are disconnected from the MBV2 while using the MBV2 serial interface.

I already have a GBA flash cart. Can I use a MBV2 along with it for debugging?

Yes. MBV2 can be used for multibooting, debugging, or both. Get the DebugLib
software from the link above and then use the following for printf/fileserving:
mb -c -x 10000 (Use smallest value that works.)

How do I program my official Nintendo cart with the MBV2?

Carts that contain a game that you buy at your local store are not
programmable because they contain ROM instead of flash. However, if you are a licensed Nintendo developer then you might have access to ordering official Nintendo flash carts from their developers support group. These are the only official Nintendo carts that may be programmed.

Can official Nintendo flash carts be used "as is" with it?

No. To make Nintendo flash carts (only available to licensed developers
from Nintendo) writeable in the GBA, resistor R7 has to be moved to the empty resistor position R8. If you'd rather not do the modification yourself then I'd be glad to do it for US$20 + $5 shipping.

How do I program my Flash Advance or *modified* official Nintendo flash cart?

You need MB.EXE v1.60 or later. Do the following:
1) Insert your flash cart into the GBA.
2) Turn on the GBA and hold down START+SELECT so that the GBA enters multiboot mode.
3) Do the following: mb -p filename.ext - w delay
Use whatever delay value, or smaller, you used to get the glib.mb demo to work.
4) Wait for programming to complete.
5) Turn off the GBA & turn it back on. The program on the flash cart will now execute.
] 6) To autoexecute a program cart after programming, use the -e option.
7) To speed up cart programming, lower the -w value until errors occur then slightly raise the value until it's reliable.

Currently, programming a 32mbit/4mbyte ROM takes < 2 minutes with firmware v3.

What exact types of flash carts can be programmed with the MBV2?

It has been tested with all of the following and they all program fine:
Flash Advance (FA) 64M, FA 64M Turbo, FA 128M Turbo, FA 256M Pro, and a modified official Nintendo cart.

Can I program GB/GBC flash carts or use the MBV2 for GB/GBC software development?

No. The MBV2 will only work for GBA software & GBA hardware.

What is the transfer rate from PC to GBA?

Upon power up of the GBA, the transfer rate is 5K bytes/sec
at a transfer baud rate of 115200 bps. The GBA is not able to handle data sent to it during boot at a rate faster than 5K bytes/sec. The reason appears to be due to the inherent encryption that is used on the cable that slows down the GBA-side handling of data.

The theoretical upper limit for GBA cables is 32k bytes/sec for normal communications mode. However, in 32-bit comms mode a rate close to 110k bytes/sec is possible. Possibly the link can handle a faster rate but the MBV2, itself, is limited to ~110k bytes/sec. The current release of PC software uses the slower, normal comms to load a small "boot loader" using multiboot and then switch to a faster rate to program flash carts. Note that ~110k bytes/sec is the theoretical top burst rate. In actual practice, programming a flash cart will appear to have an effective transfer rate that is slower than this due to handshaking, GBA data processing, etc. This boot loader does not currently support transfer of user multiboot code at this time.

Do you have to power off the GBA each time you test new code?

Yes, unless you add a software reset to your code or modify your GBA.

To add a software reset, execute the following ARM assembly code in Supervisor mode: (i.e. Execute this code in an interrupt.)
mov r0,#0x8c
bx r0


A modified GBA where the GBA reset line is brought out and connected to the MBV2 allows testing new code without having to touch anything. However, each individual has to modify their own GBA and be happy with the fact that they are voiding their warranty by doing so. Here is info on locating the GBA reset line:
http://www.devrs.com/gba/files/gbadevfaqs.php#ResetButton
This reset line needs to be connected to pin 9 of the serial connector (if the parallel connector is connected to a PC) or to pin 18 of the parallel connector (if the serial connector is connected to a PC).

Is there any way to copy cart backup memory to or from a PC?

The -f option can be used to copy from GBA cart->PC. There is no feature
in the MB.EXE software to copy from PC->GBA cart. However, you can copy cart SRAM or Flash backup to PC or from PC to cart SRAM by using the examples in mbv2lib. Look at mbv2lib.c in the DebugLib package for an example of code to do this. After you compile the code with GCC, you then need to execute it on a GBA using something similar to the following command line options:
mb -s YourCompiledFile.mb -w 50 -x 500 -c

Is there any way to reprogram part of a flash cart instead of the whole thing?

Yes. This comes in handy if you have large amounts of data that never changes.
When programming a flash cart, the software erases just enough blocks of memory to allow writing the new image. (Each block is typically 256k bytes in size, but the earliest full-size Visoly 64M cart had blocks of 128k bytes.) You can take advantage of this fact by writing a file to flash that is, for example, 600k bytes in length. Next, program the flash cart with a file that is less than 256k bytes in length. The older data at offset 256k bytes and upward is still present even though the first 256k bytes of flash cart has been erased and rewritten.

I followed the directions, but I get "Error - No hardware found.." Any ideas?

Try changing your parallel port setting to SPP (Standard Parallel Port.)
If that works then for better performance, try EPP mode. (Either EPP 1.7 or EPP 1.9 mode should work.) On most computers you change the parallel port mode by pressing a key during the power up of your computer. Instructions are on the screen during power up of which button to press to edit settings. On some other computers, you change the parallel port mode by accessing the windows control panel.