A few month ago, I was speaking with friend about the marvelous Bandai’s WonderSwan, about making something that is missing for now on the platform: Flash Carts.
But before going more on the subject, I will give you some clues on the WonderSwan, and why it can be so attractive, even if it didn’t went out of Japan.
The WonderSwan is the last video game console made by Bandai, and it was at first a project of Yokoi Gunpei just before his tragic death. This handled game console was in direct line with the Gunpei’s leitmotiv: “Lateral thinking of obsolete technologies”
All his life he try to make the cheapest possible device, without lowering the quality, and this by using “old” technology and by finding a new way to use them. The Wii Remote, is an example, but the GameBoy too, or even the Nintendo DS, they use “obsolete” technology in them, but with modern goal.
There is too much to say on this and could make a full article, but the WonderSwan was made with this idea. When you look at the specs of the CPU of first model, a NEC V30MZ (a clone of the 8086), and when you think that the first WonderSwan was out in Japan in 1999 this look a bit old. But this come at a big price: the device cost was awfully low compared to competition, it was sold at ¥6800 (~$60 / ~50€) when the GameBoy Color cost at least the double or the triple. The other major advantage of the WonderSwan was it’s autonomy: ~30-40Hr … with only ONE AA battery!
The first model was only black and white, like the original GameBoy, and two other version come later, the WonderSwan Color (2000) and the WonderSwan Cristal (2002) with for both a color screen (241 color out of 4096) more RAM (512KB) and for the later a better screen: a TFT LCD instead of a FSTN one used on previous models.
All of thoses models comme in multiple standard colors, and it is, maybe, the video game console with the most special edition I ever see.
So our main problem here is that the WonderSwan use, on each cartridge, a custom chip named Bandai2001 or Bandai2003 and some of its function are still unknown.
I will for now the Bandai2001 and Bandai2003 as BMC (Bandai Memory Controller) as it’s main goal is to be a memory mapper like the well know memory mappers (MMC1, MMC3, …) on the NES or the MBC chips found on the GameBoy: the main CPU memory address space is too limited to support the full game ROM. The cartridge address bus is 20bit wide so only 1MBytes (with some parts reserved to the system) and games can have size up to 16MB (128Mb) on the original model (or I will say, with the Bandai2001).
So the main goal of the BMC is to paginate memory, but it has too other uses, like managing a RTC on the Bandai2003, or allow access to an EEPROM on the Bandai2001.
All of theses function are know, if not well known, and are easily found by looking at a game cartridge. The main concern we have is HOW the console know that a game is inserted, or may I say, why, if a homemade cart with a ROM is inserted, the console does not start the game.
One bypass was found, by using an official game and starting the console in a special mode (if you start the console with the START button pressed, it will goes into some sort of console parameter, where you can put the console name (display during the boot) and select settings that are popular in japan like you sex, your bloodtime etc.
When the console is started in this mode, you can safely remove the official game, and put your own board, then just validate the parameter screen, and the rom on your board will start without any problem.
The problem is unlike a NES or SNES, the CPU vectors are not stored inside the game cartridge, but in some embedded ROM in the CPU, and there is not known dump of this ROM. This rom is responsible of the parameter screen, the Bandai logo during the boot, and to initialise the console in some state before give the hand to the game ROM, it can be responsible for example for this strange thing in the RAM:
as found in the wstech24.txt fileSome games required initialized (?) part of RAM, for example: $75AC = $41 = "A" $75AD = $5F = "_" $75AE = $43 = "C" $75AF = $31 = "1" $75B0 = $6E = "n" $75B1 = $5F = "_" $75B2 = $63 = "c" $75B3 = $31 = "1"
Dumping this ROM is a project on its own, and is not the goal of this project (at least not now) and could learn a lot of thing on the device.
So my friend, to made is own homemade cart, he had to search for every pin on both BMC and cartridge pin when they connect and found some cart pin connected to the BMC with unknown meaning. His original goal was to make compatible cart by using original parts like the BMC so it was not really important.
But since there is not an infinite supply of BMC, and we can’t destroy all existing game, and by the fact that I hate to destroy working games, even the baddest one ;), it was time to search how the BMC is used during boot that will prevent the game console to start.
This is only the first part of this project, the next will be to make a compatible chip (I hope for a CPLD, and not a FPGA) that will replace the BMC in homebrew cartridge.
Since I have a “bad” WonderSwan (the power button rubber is faulty, but work perfectly on the other part) I starting to make a “debug cart board” that will be directly solder on the cart port :
The next part was to solder it on the device mainboard. The cart pinout can be easily found and Bandai even left all test point, it will be easier to solder 😀 :
The cartrigde pinout is as follow:
Pin# | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Use | GND | A15 | A10 | A11 | A9 | A8 | A13 | A14 | A12 | A7 | A6 | A5 |
Pin# | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
Use | A4 | D15 | D14 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | +3.3V |
Pin# | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
Use | +3.3V | A0 | A1 | A2 | A3 | A19 | A18 | A17 | A16 | D8 | D9 | D10 |
Pin# | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
Use | D11 | D12 | D13 | /RESET | BMC?? | BMC?? | /RD | /WR | BMC?? | RTC INT | CLK | GND |
And after soldering the debug board:
And when powered, you know what? It works!
Now the more difficult part is to be done 😉
Do you know there was a blank cartridge called WonderMagic? You can dump roms on it to play. It was made in taiwan, but it’s not easy to find now. Working from scratch is hard. Good luck
Thanks!
Yes I know about the WonderMagic, but it has at least 3 problems:
1 – It is no longuer available (and like you say, hard to find)
2 – It is too big and need an external tool to flash it, and I suspect it draw a lot of power from the battery.
3 – There is no documentation on the Bandai chip, and we need to have one at least for preservation.
4 – It is not WonderWitch compatible 😉