etabeta's playground

MESS & MAME wip

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…

Thus, I’ve decided to hack around a little bit the PPU limitations and to cheat about the way real MMC-5 hardware monitors PPU reads (to figure out in real time whether sprite or background is being drawn, which kind of sprite it is drawing and which tiles is being fetched). As a result, I was able to fix a few mistakes in previous emulation, to add Extended Attribute Mode (Ex1), to add the separate CHR registers for 8×16 sprites, to improve PRG-RAM usage and now most games work! Hacks will be removed, of course, once the PPU rewrite is complete, but in the meanwhile the games can be tested (and hopefully, non-PPU problems identified and solved! :) )
Here some pics NEVER seen before in MESS!

Castlevania III by Konami
cv3_00 cv3_01
cv3_02 cv3_03
cv3_04 cv3_05
Just Breed by Enix
jrdb_00 jrdb_01
jrdb_02 jrdb_03
jrdb_04 jrdb_05
jrdb_06 jrdb_07
jrdb_08 jrdb_09
Gemfire by Koei
gemfire00 gemfire01
gemfire02 gemfire03
gemfire04 gemfire05
and its Japanese original Royal Blood
royal00 royal01
royal02 royal03
Uncharted Waters by Koei
unchart00 unchart01
unchart02 unchart03
unchart04 unchart05
and its Japanese original Daikoukai Jidai
daikokai00 daikokai01
daikokai02 daikokai03
daikokai04 daikokai05
Romance of the Three Kingdoms II by Koei
3king00 3king01
3king02 3king03
and its Japanese original Sangokushi II
sango00 sango01
sango02 sango03
Nobunaga’s Ambition II by Koei
nobuamb200 nobuamb201
nobuamb202 nobuamb203
and its Japanese original Nobunaga no Yabou – Sengoku Gunyuuden
nobuseng00 nobuseng01
nobuseng02 nobuseng03
L’Empereur by Koei (both in US and Jpn flavors)
empu_00 empu_01
empu_02 empu_03
emp_00 emp_01
emp_02 emp_03
Nobunaga no Yabou – Bushou Fuuunroku by Koei
nobubuf00 nobubuf01
nobubuf02 nobubuf03
nobubuf04 nobubuf05
Ishin no Arashi by Koei
ishinara00 ishinara01
ishinara02 ishinara03

There are still some gfx glitches with some games, both among the above
cv3_bad emp_bad
(left: 1-frame glitch after the 2nd boss in CV3; right: wrong palette during L’Empereur fight)

and among the remaining ones like
Laser Invasion / Gunsight by Konami
laserinv00 gunsight00 laserinv01 gunsight01
laserinv02 gunsight02 laserinv03 gunsight03
Metal Slader Glory by HAL Kenkyuujo (which flickers a lot, even if it’s hard to capture it with the snap)
msladerg00 msladerg01
msladerg02 msladerg03
Uchuu Keibitai SDF by HAL Kenkyuujo (whose intro relies on the not-yet-implemented MMC-5 “split screen” feature)
uchuksdf00 uchuksdf01
uchuksdf02 uchuksdf03
uchuksdf04 uchuksdf05

Plus a few games don’t work yet
Shin 4-nin Uchi Mahjong – Yakuman Tengoku by Nintendo
shin4num

or freezes/crashes the emulated game (most certainly due to some PRG-RAM issue, but I haven’t found the precise culprit yet)
Aoki Ookami to Shiroki Mejika – Genchou Hishi by Koei
genchohi00 genchohi01
genchohi02 genchohi03
Bandit Kings of Ancient China by Koei
bandking00 bandking01
bandking02 bandking03
and its Jpn counterpart Suikoden – Tenmei no Chikai
suikoden00 suikoden01
suikoden02 suikoden03

I hope to fix some of the remaining bugs soon, and to have time during spring for completing the PPU rewrite, but at least MESS is not anymore the only full-featured emu which doesn’t emulate any of these games :-)

p.s. in other news, I have also added support in MESS for three new homebrew PCBs which got built in the past couple of years

  • NROM-368, which is an extension to base NROM pcbs, capable to support up to 46Kb of PRG without any bankswitch logic (exploiting the CPU area in the 0x4800-0x7fff range, which is often used for WRAM). To my knowledge there is not much software for this, only Shiru’s conversion of a ZX Spectrum game by Denis Grachev (Alter Ego, included in the test archive you can find here)
    alter00 alter01
    alter02 alter03
  • PRG-ONLY by nocash, which is a 1-chip-only pcb (+CIC if necessary) replacing VROM/VRAM with a smart usage of the NT-RAM 1K. This was a design discussed for quite some time on NESDev boards, but nocash was the first one to actually build it! Even in this case, I am only aware of a single game to test our implementation, that is Magic Floor by nocash (available, in several flavours, here), and it seems to work well in MESS
    magfloor00 magfloor01
  • ACTION-53 (aka Multi-discrete mapper designed by Tepples), a PCB designed for the production of the minicompo multicart Action 53 Function 16 Volume ONE “Streemerz Bundle” (from here), containing a lot of nice games
    act53_00 act53_01
    act53_02 act53_03
    act53_04 act53_05
    act53_06 act53_07
    act53_08 act53_09
    act53_10 act53_11
    act53_12 act53_13

Maybe you won’t find these as exciting as the MMC-5 progress, but I definitely love that people keep creating new carts for NES :-)

Written by etabeta

February 8th, 2014 at 9:22 pm

Posted in MESS

Leave a Reply

You must be logged in to post a comment.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close