etabeta's playground

MESS & MAME wip

Archive for February, 2014

Barcode scanning

without comments

Some time ago, I have discussed about Nantettate! Baseball by Sunsoft (for the Nintendo Famicom) and about the sub-cart system used to update team data of the original game at later stage, to renew players’ experience without the need of a whole new game.

In Japan, however, it was far from being an isolated case. In particular, it seems that Bandai was a company who strongly believed in the concept of expandable games, with cheaper updates at later times. It happened with Famicom Karaoke Studio (new songs were added by switching the cart in the body of the Karaoke Studio connector)

(Karaoke Studio base cart and add-on cart pics from ochagumi’s blog)
karaoke

it happened with the Datach Joint ROM System (featuring a barcode scanner in the base device)

(Datach base cart and add-on cart pics from nesworld.com)
datach1datach2

and it also happened a few years later with the Sufami Turbo for the Super Famicom (a.k.a. SuFami)

(Sufami Turbo base cart from an auction)
sufami

In emulators, these expansions are never trivial to handle (not to mention that quite often users are not aware of the correct usage of the original hardware!), but luckily the progresses about slot devices in MESS made them quite easy to work with, both from the development and from the usage points of view. If Sufami Turbo was already handled fine under the SNES driver, and Karaoke Studio is still out of reach due to mic emulation requirements, in the past few days I dug out some old (and broken) code to emulate the Datach unit in MESS and decided to take another look to the barcode reader support.

Long story short, I managed to fix the barcode handling code, and in next release you will be able to effectively play most of Datach games in MESS! However, I guess that some explanations on the way it will work in the emulator could be useful.

EDIT (2014-02-13): As of latest MAME/MESS svn, Datach games have been moved from NES softlist to a separate Datach softlist (because the carts are different, as you can see from the pictures). Also, the base unit has been properly implemented as a passthrough cart with a separate cartslot for its minicarts. This means that to test the improvements below you now have to launch MESS with the following command

mess nes -cart datach -cart2 gamename

where gamename can be either a softlist shortname, or the full path to the iNES files for the games (notice that you can also load an headerless 256k dump of your Datach minicarts, so you don’t need to add an header if you dumped your own cart)

First of all you will need to launch a Datach game in NES. These typically are games which boots with this logo
datach_logo
If you have ever launched one of these games in previous MESS, you would have noticed that some games were not really playable due to the game sitting there waiting for a barcode to be scanned into the unit. The Dragon Ball game (Dragon Ball Z – Gekitou Tenkaichi Budou Kai) and the Yu Yu Hakusho game (Yu Yu Hakusho – Bakutou Ankoku Bujutsu Kai) are perfect examples for this
title title
If you try to start a game and you have no barcode, you cannot pass through the following screens
no_code_dbz no_code_yuu
where the game waits for a barcode to generate your character.

Now, when you get to those screens, you can just open up the UI and you will see a brand new menu item: Barcode Reader!
menu1

You select it, you choose the Datach reader, and you will get to the Barcode prompt
menu2
and here you can enter your favorite barcode! (you first type the code, then you select the “Enter Code” option)

EDIT (2014-02-14): the guy at retrostuff.org (the website where I had borrowed the original Goku barcode) has scanned some more original cards for the Datach Dragon Ball Z game. This helps to play the game as it was intended. You can find them at this page. Thanks a lot, mate.

By using “5018-4385” and “9638-5074” (two codes I found by googling EAN-8 barcodes) you get a fight between an alien and the cyborg 18!
vs01 vs02

The game also features a menu where you can test your barcodes to see which fighters get unlocked with each code, before entering the tournament!
code_test
By selecting “022248-300117” (which comes from an original DBZ card for Goku), you will see the game scanning the code
scan
and you will get a Level 2 Sayan fighter.
fight1
By using “062982-144233” (mentioned in nocash documents) you will get a different and stronger Level 2 fighter (maybe Trunks?)
fight2
By using “9-771129-975005” (a code I took from a comic book I had at home) you will get a weak Level 1 Piccolo
fight3
and so on…

Similarly, in Yu Yu Hakusho – Bakutou Ankoku Bujutsu Kai, you can now pass to the actual fights
fight4
vs03 vs04

You can now also play Ultraman Club – Supokon Fight!
ultra01 ultra02
ultra03 ultra04
and J League Super Top Players
jl03
jl04 ultra05
jl01 jl02
and SD Gundam – Gundam Wars
gundam1 gundam2
even if I’m not sure how to pass this screen 🙂
gundam3

Finally, Battle Rush – Build Up Robot Tournament does not enter in game (maybe it sits waiting for response from the unemulated EEPROM?)
brsh
The factory option works, but in this way there is not much to do other than creating robots over and over.

There was also a seventh Datach game, Crayon Shin-Chan Ora to Poi Poi, but this does not even use the barcode unit and it was probably only sold in Datach format (in addition to the standard FC cart format) to make happier the owner of the Datach unit.

I’m not fully satisfied by the initial commit to MESS, because Datach carts are still treated as base FC carts, without a separate slot, but this will be fixed later. In the meanwhile, 6 out of 7 Datach games are playable, at last!

Finally, for the moment I won’t look in supporting Barcode Battler units (both for NES and SNES), because those require to convert the NES/SNES controllers to be slot devices and thus require more time than I have at the moment. Also, I’d be actually more interested into understanding how Barcode Boy worked, since only a few emulators support or document it 😉

Written by etabeta

February 12th, 2014 at 4:56 pm

Posted in MESS

MMC5, at last

without comments

One of the main limitations of NES emulation in MESS has always been the lack of MMC-5 support. It was not the only problem (many games suffer of 1-line glitches, a few games are broken, and Skulls & Crossbones IRQ handling does not like at all out PPU code), but still MMC-5 was probably the most annoying one, because Castlevania III is one of the favorite games of a lot of people (including myself) and it was a pain to admit that we were not able to support it properly in MESS.

I have written many times in the past that the culprit was our emulation of the NES video chip, too limited to handle all MMC-5 features, and that a full PPU rewrite was needed in order to properly fix CV3 and the various Koei games which run on this boards. And I have promised to many friends that eventually I would have been able to tackle the challenge of such a rewrite.
Unfortunately, a long series of real life events is keeping me 95% busy with non-emulation stuff, so that the actual rewrite I’ve been working on since last June is still faaaaar from completion. In conclusion, proper MMC-5 support in MESS seemed doomed…

…if it wasn’t for the fact that I was terribly nauseated by repeating over and over that MESS was very cool (thanks to the MAME debugger, to the number of supported pirate mappers, to the support for Game Genie, Famicom BASIC and Nantettatte Baseball subcarts), but not good enough to support MMC-5, despite MMC-5 was one of the most famous official Nintendo mappers and it was already supported by most other emus…
Read the rest of this entry »

Written by etabeta

February 8th, 2014 at 9:22 pm

Posted in MESS