etabeta's playground

MESS & MAME wip

Archive for April, 2013

More on slots (not the gambling)

without comments

OK, I had left you with the announcement of MESS supporting the lock-on cartridge for Sonic & Knuckles, but in the past weeks I have worked hard to propagate the nice features of slot expansions to other systems in MESS and I have to say that the results are definitely nice… actually so nice that a single blog post is not enough for all the changes that have been done (and the snaps necessary to show them all!), and I preferred to split them across a series of entries!

If you are a regular follower at the MESS board at bannister.org, you probably have already heard about most of these (except the NES ones… those should be a nice surprise for you too 🙂 ), but I think that it might be good for everyone to finally see in action all those svn logs entries about “slot devices”

  • The Sega side of the progresses, namely MegaDrive and Saturn
  • The Game Boy side of the progresses
  • The SNES side of the progresses
  • The NES side of the progresses

There is still so much to do for these systems (more SNES addons to emulate, more sound chips in NES carts to implement, more protected GB pirate games to support, etc.) that you can expect to see slot devices mentioned in messnew and svn log still for long time, but I’m confident nobody would deny that this is a great starting point for future progresses!

Written by etabeta

April 21st, 2013 at 1:44 pm

Posted in MESS

More on slots, the NES side

without comments

Finally, the NES chapter, i.e. the real news getting prepared for MESS 0.148u4!

Converting NES carts to slot devices has been my goal since a long time. It’s been essentially the main reason I’ve decided to learn more about slots, given that many NES carts had some additional chips on them and that these were impossible to support appropriately in MESS without slots.
However, at the same time, converting NES carts meant having to create around 300 hundreds different types of slots, so to covert all PCBs/mappers used by NES carts. It is not very surprising, therefore, that it took me really a looooong time before being able to announce the actual completion of the slot-ification process…

However, the work has finally reached a point where it can be made public because, even if more cleanups are definitely needed, at least no regressions are known at this stage (but I’m pretty sure that something has slipped through our regression tests, with more than 3000 dumps available…)

The first consequences of the slot devices cannot really be shown, because they mostly deal with sounds 🙂
With the new code, indeed, MESS finally features (like many other emus)
– sound FX in the Japanese version of Gimmick, by emulating the additional YM2149 present inside the Sunsoft 5B chip
– OST in Lagrange Point, by emulating the YM2413 present inside the VRC-7 chip
– speech in Jaleco sports game, even if they currently use external samples, mostly recorded years ago by Pongbashi, given that the ADPCM chip used in these is currently undumpable (samples go in the samples/ folder, like you would do with MAME samples, and you can use the old TOSEC set from 2009)

Definitely more suited to be displayed with snaps is the support for the NES-EVENT PCB, which means that you can now play in MESS the Nintendo World Championship 1990 cart (DipSwitches included)
nwc90_0 nwc90_1
nwc90_2 nwc90_3
nwc90_4 nwc90_5
nwc90_6 nwc90_7
nwc90_8 nwc90_9
nwc90_a nwc90_b

Another interesting aspect is that, thanks to the great analysis done by naruko on the Sunsoft-6/Sunsoft-DCS pcbs, MESS is now capable of emulating Nantettatte!! Baseball lock-on mechanism! This Sunsoft game is pretty interesting, given that it experimented a very original way to solve the problem of sports games with stats becoming outdated a few months after the game release…
Basically, one had to buy the original game first, at full price, and then after a few months the publisher offered cost-reduced minicarts containing new teams and new data to be plugged into the original game!

Nantettatte!! Baseball base cart and add-on cart pics from zation0323’s blog
ntbreal_a

You can see that the update cart fits the small blue slot in the main cart!
ntbreal_b

In MESS you will now be able to emulate this behavior like with Sonic & Knuckles: when you load Nantettatte!! Baseball, MESS offers you a -cart2 slot where you can load the add-on minicart (only two were sold by Sunsoft, ’91 Hen and OB Hen). By loading one of the minicarts, the first difference you see is in the available teams

ntbreal_0 ntbreal_1
base game (up left), 91 hen (up right) and OB hen (down left). also, I have fixed some gfx issues present in current MESS (down right).
ntbreal_2 ntbreal_4

but I guess that also team members and stats have been updated. Maybe, if this mechanism had been successful, Electronic Arts and other companies would have followed a different strategy in the past 20 years, but I guess Nantettatte!! Baseball was not a blockbuster 😉

Along the same line of piggyback carts, we now support the real NES Game Genie from Galoob (not very useful, given that most of these same codes are also in Puggsy’s cheats, but if it was possible on the real system why not in MESS as well?). Once again, when you load the Game Genie in the main cartslot, a -cart2 device becomes available to load any another game you want

Game Genie with Super Mario Bros. and the codes to make Mario immortal and to have Bowser flames in all levels
gg01
gg02 gg03

Game Genie with Super Mario Bros. 3 and the code for the Hammer suit
gg04
gg05 gg06

While converting the old code to the new slots, I have also improved some pcbs and/or fixed some bugs, which I guess will be appreciated by everyone. For instance, Family Circuit ’91 is no more glitchy as in 0.148u2

Ingame before the rewrite (left) and after (right)
famcir91_0 famcir91_1
and some Tengen games work now, like Klax, Road Runner and Alien Syndrome
klax_0 klax_1
rrunn_0 rrunn_1
asyn_0 asyn_1

Some progresses have also been made on other games, which however still do not work.
Skull and Crossbones now draws most of its graphics (but dies when the gameplay starts, possibly due to a delay in IRQ firing which is not easy to implement in current PPU code and which will probably have to wait until the PPU rewrite)
sxb_0 sxb_1

And Racermate Challenge II after some flickers (the game saves on battery the videoram content, but we currently do not emulate this, so the game has to initialize it every time, which should be the reason of the flickering…) finally shows the current game screen, but it cannot work because the bycicle controller is not emulated at all
racmate2_0 racmate2_1

Plus, I have added support for some more pirate pcbs, mostly used by multigame carts or FDS conversions
mc_0 mc_1
mc_2 mc_3
mihun_0 mihun_1
aisenshi_0 aisenshi_1
histfds_0 histfds_1
doki_0 doki_1
fuun_0 fuun_1
monty_0 monty_1
smb2m_0 smb2m_1

Written by etabeta

April 21st, 2013 at 1:43 pm

Posted in MESS

More on slots, the SNES side

without comments

Before 0.148u2 release, SNES carts got converted to slot devices as well. Like with MegaDrive and Virtua Racing, the main effect on the end-users is that now games using add-on chips like DSP-1/2/3/4 (e.g. Super Mario Kart, Dungeon Master, etc.) or ST-010 (e.g. Exhaustion Heat 2), or SuperFX (e.g. Star Fox) can be loaded into snes & snespal directly, without the needs of additional clone systems (snesdsp, snessfx, etc.) like in 0.148! And we also support dumps with the DSP bios attached at the end of the file, like byuu’s higan, for ease of compatibility of the files between emulators.

smk_0 smk_1

exhaust2_0 exhaust2_1

sfox_0 sfox_1

The rewrite had however also many other effects. For instance, the Powerfest ’94 competition cart is playable in MESS now (DipSwitches included)
pfest94_0 pfest94_1
pfest94_2 pfest94_3
pfest94_4 pfest94_5
pfest94_6 pfest94_7
pfest94_8 pfest94_9

But we also added support for DSP-1 games with large ROM, like Super Bases Loaded II
sbl_0 sbl_1
sbl_2 sbl_3

Furthermore, some basic support for BS-X Satellaview was added to both BS-X – Sore wa Namae o Nusumareta Machi no Monogatari
bsx_base0 bsx_base1
bsx_base2bsx_base3

and some other compatible games
bsx_comp0 bsx_comp1
bsx_comp2 bsx_comp3
bsx_comp4 bsx_comp5
bsx_comp6 bsx_comp7

Even if most games making non trivial usage of flash memory are not working yet (which means that 70% of the BS-X carts, including the popular BS Zelda, BS Excitebike, Radical Dreamers and Treasure Conflix, will only show a black screen 🙁 ), a few other work fine
bsx01 bsx02
bsx03 bsx04
bsx05 bsx06
bsx07 bsx08
bsx09 bsx10
bsx11 bsx12

Luckily, even our sloppy BSX implementation is enough to support the character data in Same Game, by just dropping samegmcc or samegamecd in the -cart2 slot available when loading samegame…

Same Game + Chara Cassette, Bomberman flavor

Same Game + Chara Cassette, Momotarou flavor

Same Game + Chara Data (which adds Tengai Makyou characters)

A more interesting addition was probably the Korean 20-in-1 multigame cart showed here, which mostly work in current MESS (even if a couple of games freeze at start)
kor20_0kor20_1
kor20_2

kor20_3
kor20_4 kor20_5
kor20_6 kor20_7
kor20_8 kor20_9

As in the MegaDrive case, the slot code allowed for emulation of more protected SNES pirate carts

Digimon
snes_pir00 snes_pir01
Pokemon Gold Silver
snes_pi0r2 snes_pir03
X-Men VS Street Fighter
snes_pir04 snes_pir05
Pocket Monster
snes_pir06 snes_pir07
Soul Edge
snes_pir08 snes_pir09
KOF 2000
snes_pir10 snes_pir11
Pokemon Stadium
snes_pir12 snes_pir13
Tekken 2
snes_pir14 snes_pir15
Street Fighter EX Alpha
snes_pir16snes_pir17

Also, even if MESS has supported 8MB ExHiROM/ExLoROM games with no problems since 2007, support is now more transparent and they work exactly the same as HiROM/LoROM

snaps from Dragon Quest 3 English translation


snaps from Super Demo World

As you might have guessed at this stage, a byproduct of the usage of slots is that it is now very easy to add emulation of the copy protection and of the bankswitch mechanisms used in many pirate carts. However, I can’t stress enough that without slots it would have never been possible to support properly the add-on chips as we do now 🙂

Written by etabeta

April 21st, 2013 at 1:43 pm

Posted in MESS

More on slots, the Game Boy side

without comments

Soon after finishing MegaDrive, I have converted Game Boy and Game Boy Color carts to use internally the slot devices, and as a byproduct I found out that some “Collection” games, like Genjin Collection, Momotarou Collection, Mortal Kombat I & II and Super Chinese Land 1.2.3 were emulated as plain MBC1 even if they were in fact using an alternate switching mechanism. By fixing that, all of them now work fine in MESS and don’t freeze/reset anymore when a game is selected!

gbcol_0 gbcol_1 gbcol_2 gbcol_3

Also, I was able to add support for some pirate games which were not emulated before, like Rockman 8 (which might still have issues, given that enemies do not appear for whole sections of the levels… but it might just be the way it is originally, I don’t really know…)
rockman8_0 rockman8_1 rockman8_2 rockman8_3
rockman8_4 rockman8_5 rockman8_6 rockman8_7

and the raw dumps of Sintax chinese games (huge thanks go to Taizou, who reverse engineered the non-trivial protection for these!).
sintax_1 sintax_2 sintax_3

Some of these are quite interesting
sintax_10 sintax_11 sintax_12 sintax_13

others not so much, but still worth preservation to better represent the HK market
sintax_4 sintax_5 sintax_6 sintax_7
sintax_8 sintax_9 sintax_14 sintax_15
sintax_16 sintax_17sintax_18 sintax_19
sintax_20 sintax_21 sintax_22 sintax_23
sintax24 sintax_25 sintax_26 sintax_27
sintax_28 sintax_29 sintax_30 sintax_31
sintax_32 sintax_33 sintax_34 sintax_35

Written by etabeta

April 21st, 2013 at 1:43 pm

Posted in MESS

More on slots, the Sega side

without comments

MegaDrive support has been improved some more, so that in addition to all the protected pirate carts which were supported by HazeMD, it also supports the recently dumped Super Mario World 64

smw64_1 smw64_2

and a few RPGs that not many other emus allow to play (credits go to Eke too, for the kind support in sorting out a few bankswitch corner cases)

Beggar Prince
beggar_0 beggar_1
beggar_3 beggar_4

Legend of Wukong
wukong_0 wukong_1
wukong_2 wukong_3

And, quite important from an user-friendlyness point of view, you can now use the main genesis/megadriv/megadrij emulation to run Virtua Racing
vru_0 vru_1
vru_2 vru_3
instead of using some clone systems (gensvp and c.) which many users did not even know that existed. Now you just load the game and it plays fine (by internally adding the required co-processor)

Also the slot code allowed to fix some bugs in our previous code, fixing some games which had been broken or heavily glitched in MESS for years like World Series Baseball games
wsb96_old wsb96
WSB before (left) and after (right) the fixes!

As per Kale’s request, I also slot-ified the Saturn carts, allowing for cleaner support of Backup RAM carts. Hence, you can now format your saturn ‘memory card’ and load/save stuff there, e.g. in Castlevania Symphony of the Night

cvsat_0

Also, you can copy data between the internal backup memory and the external one, like in a real saturn

1. select the external memory
cvsat_1

2. select the data to copy
cvsat_2

3. it’s written to the internal memory!
cvsat_3

Written by etabeta

April 21st, 2013 at 1:43 pm

Posted in MESS