Help needed: Rockman 6-in-1 multicart hardware

A place that you can discuss reproduction of classic titles or "licensed-for-reproduction" homebrew for personal use.

Moderators: B00daW, Moderators

Forum rules
1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.
User avatar
MottZilla
Posts: 2834
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla » Tue Jan 03, 2012 11:05 am

Yes, the menu program disables the IRQs. I don't think Rockman 1 or 2 disables the IRQs themselves.

User avatar
jpx72
Posts: 178
Joined: Tue Sep 28, 2010 3:27 am
Location: Slovakia
Contact:

Post by jpx72 » Tue Jan 03, 2012 1:57 pm

The gameplay of Rockman 1 is ok on the original cartridge, the scrolling of screens in all directions is smooth.
Since I don't have original Rockman 1 at hand and I don't remember if the slowdown in case of many enemies on screen should be so visible, if not, it may be an issue of this multicart.

User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Post by kyuusaku » Tue Jan 03, 2012 6:40 pm

Kind of strange for there to be slowdown, it's not like there's a lot to adapt with UNROM.
Yes, a multiplexer can be used too, maybe even better than adding those together with an OR (a+b). Thanks for the tip.
Definitely better because ORing two data lines will yield nonsense data. Plus OR gate chips don't have 3-state buffers required for interfacing to a data bus.

--

If I really wanted to make a new cart of this I'd sooner hack the menu to work with simpler hardware, or write another one. Hacking the mapper could get it down to 3 or 4 extra chips instead of the large amount with the current inefficient design.

The decoding isn't very hard because you can take advantage of a pattern:

Code: Select all

rockman	size
1	2m/cram -- pad prg and use for menu
2	2m/cram
4	4m/cram
6	4m/cram
3	2m/2m -- pad chr
5	2m/2m
-	4m/2m -- unused, undecoded
-	4m/2m -- unused, undecoded
So technically you could decode a '161 using the MMC3's WRAM decoder, then use another couple chips to fix the addressing.

tepples
Posts: 22162
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Tue Jan 03, 2012 7:42 pm

PRG bank order in ROM:
$000000: MM1 and menu
$040000: MM2
$080000: MM3
$0C0000: MM5
$100000: MM4
$180000: MM6

Values written to 161:

Code: Select all

3210  $6000-$7FFF: PRG ROM bankswitch
||||
|||+- Select half of 512 KiB bank (ignored when bank size is 512 KiB)
|++-- Select 512 KiB bank
|+--- Set PRG ROM bank size (0: 256 KiB; 1: 512 KiB)
+---- Select CHR chip (0: CHR RAM; 1: CHR ROM)
$0: MM1 and menu
$1: MM2
$A: MM3
$B: MM5
$4: MM4
$6: MM6

PRG A20-A19: 161 D2-D1
PRG A18: MMC3 A18 if 161 D2 is true else 161 D0
PRG A17-A0: From MMC3
CHR A18: From 161 D0
CHR chip enables: Decoded from 161 D3

In addition to the 161, I see an inverter to decode the CHR ROM enable (unless your CHR ROM has a positive enable), a multiplexer to generate PRG A18, and some sort of power-on-reset circuit to force 0 into the 161 on boot.

User avatar
l_oliveira
Posts: 404
Joined: Wed Jul 13, 2011 6:51 am
Location: Brasilia, Brazil

Post by l_oliveira » Wed Jan 04, 2012 8:37 am

So I burnt a copy of the original Rockman ROM into an UNROM board and tested.

While it also suffer of some slowdown (it's the original game, not an patched ROM) it's not even close to the slowdowns I had with the MMC3 patched Rockman rom.

If anyone feels like testing, play the 1st part of Iceman stage and try to put many enemies on the screen.

tepples
Posts: 22162
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Wed Jan 04, 2012 9:37 am

MMC3 also requires four writes to change a 16 KiB PRG bank, while UNROM requires one.

Code: Select all

unromsetbank:  ; as might have been used in Mega Man
  tay
  sta busconflict,y
  ; 6 cycles so far
  rts
busconflict:
  .byt 0, 1, 2, 3, 4, 5, 6, 7

mmc1setbank:  ; as might have been used in Mega Man 2
  sta $E000
  lsr a
  sta $E000
  lsr a
  sta $E000
  lda #0
  sta $E000
  sta $E000
  ; 26 cycles so far
  rts

mmc3setbank:  ; as might have been used in Mega Man 3-6
  asl a
  ldy #6  ; Reg 6: PRG bank $8000
  sty $8000
  sta $8001
  iny     ; Reg 7: PRG bank $A000
  sty $8000
  ora #$01
  sta $8001
  ; 24 cycles so far
  rts
With a lot of bankswitches, this 18-cycle difference might be the last straw that causes the main loop to exceed 241 lines. If the original bankswitch was inlined and the ROM hack patches each mapper write with a JSR/RTS pair (likely), the difference might be 30 to 32 cycles. How many times does Mega Man 1 bankswitch per frame?

User avatar
MottZilla
Posts: 2834
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla » Wed Jan 04, 2012 10:18 am

You may well be right tepples, I've noticed some discrete logic games that have a simple write register experience slowdown with more complex slower to write mapper registers which probably is because they bankswitch alot as it didn't normally take so much time to do so.

If the IRQs were firing I think you'd experience something worse but I'm not sure. Or maybe they bothered to alter the IRQ routines to disable it if they did fire. I didn't study the hacked versions much.

tepples
Posts: 22162
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Tue Jan 10, 2012 6:37 am

But to be fair to the MMC3: A program originally designed for MMC3 might use $A000 as the only switchable bank and leave bank select set to $46 (or $C6 to swap the pattern tables) most of the time. This leaves one instruction to switch $A000 (that is, STA $8001) throughout the main thread, which is fast as UNROM. The only time the mode would change would be to load a new DMC sample into $C000 ($8000:=$47, $8001:=bank number, $8000:=$46) or to change CHR banks (in the NMI or IRQ handler, after which point back to $46). It's just using MMC3 to emulate UNROM that might run into slowdown.

80sFREAK
Posts: 275
Joined: Sat Sep 03, 2011 11:40 pm

Post by 80sFREAK » Sat Apr 28, 2012 7:13 am

jpx72 wrote:Yes, a multiplexer can be used too, maybe even better than adding those together with an OR (a+b). Thanks for the tip.
There is already one built-in 27xx160 and controlled by pin BYTE/WORD.

Reverse menu first.

User avatar
MWK
Posts: 15
Joined: Wed Apr 07, 2010 12:46 pm
Location: Poland
Contact:

Post by MWK » Sat May 05, 2012 8:44 am

l_oliveira wrote: If anyone feels like testing, play the 1st part of Iceman stage and try to put many enemies on the screen.
jpx72 wrote: Since I don't have original Rockman 1 at hand and I don't remember if the slowdown in case of many enemies on screen should be so visible, if not, it may be an issue of this multicart.
Just wanted to add a piece of informations someone may find useful (or not).

Since I have two (2) different carts of that Rockman 6in1 I tried to find out if there are any differences, but just before that I'd like to personally say I think all of them Rockmans suffers some kind of slowdowns when there is like too many things on the screen at the particular time (i.e. just try to "collect" as many bees as you can right at the beginning of the "Hardman" stage in Rockman 3, you'll notice that right away), so it's kinda "natural" I'd say, as for that "Iceman" stage from Rockman 1 I haven't noticed anything unusual, maybe just a little slowdown l_oliveira, but there is this one enemy on some other stage in Rockman 1 (I don't exactly remember where it was...), flying rocket or something, when you hit it, it explodes with massive blast radius causing a huuuuuge slowdown, that is something, or hell even while firing "electro shot" you can experience something little bit similar.

Now, on to the differences. Right of the bat not only the casing is different but also a PCB and a menu screen :

"Regular" Rockman 6in1 cart >> http://img535.imageshack.us/img535/3084/r6in1.jpg
and it's PCB (hi-res) >> http://img812.imageshack.us/img812/3319/r6in1b.jpg

"Other Rockman 6in1 cart >> http://mwk.netne.net/006.jpg
it's PCB (hi-res) >> http://img233.imageshack.us/img233/4350/r6in1a.jpg
and game select screen >> http://img825.imageshack.us/img825/1850/r6in1scr.jpg

What's also kinda weird is this "Loading..." screen that appears for like noticeable half a second right after choosing any game. It's like all the games are packed or something and they're need to be decrunched, I dunno, but I always enjoy watching that flashy quickie load screen :oops:

I believe that Sony chip from the back side is just a regular SRAM, but the "main" one is that "MX29L3211MC-10 - 32M-BIT [4M x 8/2M x 16] CMOS SINGLE VOLTAGE PAGEMODE FLASH EEPROM - Macronix International" >> pdf here, so that glob-top seems to be only just a mapper (with/without menu screen), correct me if I'm wrong.

As for the games, all Rockmans aren't "screwed up" with extra lifes, only copyrights have been removed from Rockman 3, the rest is fine... but, yeah, one big thing that affects the entire, sweet cake that multicart is... unfortunately at precise point of Rockman 1 (that waterpipe at the beginning of the 3-rd (I believe?) part of Dr.Wily's stage, right after water flushes in) game suddenly (!) switch back to the title screen like nothing ever happen :cry:
Believe me, I've tried everything on like 4 or 5 different consoles (including famiclones).
Sad sad thing it is.

Anyway, I hope all this will help somehow.

User avatar
MottZilla
Posts: 2834
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla » Sat May 05, 2012 10:54 am

The second Rockman 6-in-1 PCB looks like it stores CHR data inside the large flash chip and loads it into the same large SRAM chip it would use for any of the games. That is certainly one way to do it, but then you need a bigger PRG-ROM and a 256KByte SRAM.

Rockman resetting could be for many reasons. Maybe they just did a poor job of hacking.

80sFREAK
Posts: 275
Joined: Sat Sep 03, 2011 11:40 pm

Post by 80sFREAK » Sat May 05, 2012 5:09 pm

2 MWK What's the part number of "back side" IC? Also love the PCB(not mapper LOL) with place for second flash chip

2 MottZilla hi, boss :)

User avatar
l_oliveira
Posts: 404
Joined: Wed Jul 13, 2011 6:51 am
Location: Brasilia, Brazil

Post by l_oliveira » Sat May 05, 2012 5:27 pm

SONY CXK582000M.

256KB 8-bit low power Static RAM .

The 4MB SOP FLASHROM (the Macronix chip) is 3.3v so the Chinese is cheating with a diode to drop the voltage a bit. Don't play that cart much as it will eventually blow itself or your nes (or both).

80sFREAK
Posts: 275
Joined: Sat Sep 03, 2011 11:40 pm

Post by 80sFREAK » Sat May 05, 2012 6:04 pm

l_oliveira wrote:The 4MB SOP FLASHROM (the Macronix chip) is 3.3v so the Chinese is cheating with a diode to drop the voltage a bit. Don't play that cart much as it will eventually blow itself or your nes (or both).
It must blow asap, otherwise Mao's kids will starving :lol:

User avatar
FARID
Posts: 499
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

Post by FARID » Sun May 06, 2012 1:58 pm

If someone can convert Rockman 3 and 5 from TLROM to TGROM, I can design a new hardware for this cartridge by using :
1 * M27C322 --> PRG
1 * 6264 --> SRAM
1 * AX5202P --> MMC3
1 * 74HC174 --> PRG Latch
2 * 74HC157 --> Data line separator

Post Reply