SMB2J Repro

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.
Post Reply
User avatar
krzysiobal
Posts: 1036
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

SMB2J Repro

Post by krzysiobal »

Super Mario Bros 2 JAPANESE (a'ka Lost Levels) is quite interesting game. It was officially released only on Famicom Disk System floppy disk and those cartridge versions that exists are pirate ports from FDS. There exists many ports which are using different hardware solutions and thus - are emulated under different mapper numbers, like
http://wiki.nesdev.com/w/index.php/INES_Mapper_040
http://wiki.nesdev.com/w/index.php/INES_Mapper_050
and probably many others.

There are some examples of actual cartridges:
Image Image

Image Image Image Image

Image Image Image

Quite interesting fact is that even the total size of memories used on such cartridges differ. Probably it consists of FDS Bios (modified) and dumped PRG/CHR from floppy.

I was asked to make reproduction of Super Mario Bros. 4 (FDS Conversion)(Unl)[!] (which is hack of SMB2J that runs on mapper 40). The mapper is quite simple and as a good exercise I did not want to make it on FPGA, but use as little discrete discrete chips as possible.

Mapper overview:

Code: Select all

Range,Mask:   $8000-FFFF, $E000

   $8000:  Disable and acknowledge IRQ
   $A000:  Enable IRQ
   $E000:  8 KiB bank mapped at $C000
 
 PRG Setup:
 ---------------------------
 
       $6000   $8000   $A000   $C000   $E000  
     +-------+-------+-------+-------+-------+
     | { 6 } | { 4 } | { 5 } | $E000 | { 7 } |
     +-------+-------+-------+-------+-------+
Ok, so here is my brief thoughts how I would do that with a list of chips that I would probably need:
* 4020 + 1/2 7474 -> IRQ counter + IRQ ack & en/dis
* 1/2 74139 -> decoding $8000/$a000/$c000/$e000 for writes
* 74670 -> register to store PRG bank (I needed one with three state outputs)
* and probably one/two gates as glue logic

But how to make this fancy fixed-banks? Well, let's look at it in the binary:

Code: Select all

BANK   /ROMSEL CPU CPU | PRG PRG PRG
               A14 A13 | A15 A14 A13
-----------------------+------------			   
$6000     1    1   1   |  1   1   0
$8000     0    0   0   |  1   0   0
$a000     0    0   1   |  1   0   1
$c000     0    1   0   |  *   *   *
$e000     0    1   1   |  1   1   1
Now it reveals why I wanted three state outputs register - if we are not in $c000, we can use pullup resistor to force value of PRG lines to:
PRG A15 <- 1
PRG A14 <- CPU A14
PRG A13 <- CPU A13 when /ROMSEL = 0 else 0

What about the `else` part of PRG A13? Diode can be used as a second branch of `if`:
Image

There are some minor things to do:
* Activate PRG-ROM at $6000-$FFFF + prevent bus conflict
* Activte register outputs only at $c000-$dfff
All of this I did using only 2/4 of 7400 + some dide logic

Here is final schematics + photos of final version of cartridge:
Image Image Image Image

I still have 1/2 of 7474 not used, which can be used as.. poor man's NOT gate ;D

---

Cartridge has not started since first run, because:
* I forgot to solder some of the ICs pins at TOP layer (when making double side PCB, i prefer to trace it that way so all chips are soldered only at bottom side. Other connections are made by wires acting as vias), but this time I wanted to make as little vias as possible and use chip leg's as vias
* I forgot to add inverted between 4020's output and /IRQ
* I connected 4020's Q12, instead of Q13,
* Those diode AND/NOT are not the best use. Firstly, I used 1k resistors, but voltage drop on diode for 0 logic level was too much (~0.8V). After switching to 3.3k it is ~0.7V (which should be sufficient),
* The 2764 EPROM used as CHR-ROM caused troubles during programming (I had to program it many times to change all bytes into correct values). But it still gives inconsistent reads, I need to replace it.
Yevgen.gr
Posts: 4
Joined: Sun Feb 21, 2021 10:24 pm

Re: SMB2J Repro

Post by Yevgen.gr »

Hi krzysiobal!
I want to make a repro of this game for myself, so would like to ask you - can you please share the pcb design for this project?
Would really appreciate!
Kayumba
Posts: 246
Joined: Sun Mar 01, 2020 2:36 am

Re: SMB2J Repro

Post by Kayumba »

Yevgen.gr wrote: Sun Feb 21, 2021 10:29 pm Hi krzysiobal!
I want to make a repro of this game for myself, so would like to ask you - can you please share the pcb design for this project?
Would really appreciate!
Why just don’t use custom PCB ?
Then you just program your eprom with that game.
Yevgen.gr
Posts: 4
Joined: Sun Feb 21, 2021 10:24 pm

Re: SMB2J Repro

Post by Yevgen.gr »

At first I decided to make a pcb like shown here, but then realized that I will not be able to make good contact surface at home. So ended up with using original nrom pcb as a base and add that logic ICs to it. I had one laying around and I planned to throw it to garbage anyways since I don't have a shell for it.
I can post photos when done
Last edited by Yevgen.gr on Fri Mar 12, 2021 3:50 am, edited 1 time in total.
Yevgen.gr
Posts: 4
Joined: Sun Feb 21, 2021 10:24 pm

Re: SMB2J Repro

Post by Yevgen.gr »

Completed my repro. Big thanks to krzysiobal for sharing the schematics!
As I said above, I used the famicom nrom board as a donor + added logic ICs to it. Though it looks ugly, the soldering job is pretty good, so I'm sure it will work pretty good for the long time. It was not working at first, but then I realized that I messed up one wire to 74670. After rewiring, the game has started, but with graphical glitches. So I checked mirroring and realized that I did not conmect it at all. After connecting, the game started working without issues.
I used sop version of 74hct670 with dip adapter since that's the only one I found in local shops.
I also used some soviet ICs since I had them already.
K555TM2 = 74LS74
K531ЛА3 = 74S00

I also had few empty chinese cases that I ordered from Aliexpress for my other repro. After cutting some plastic, my pcb fit nicely inside it and is keeping really steardy there.
In the end, I'm pretty happy with the result
Attachments
IMG_20210312_101419.jpg
IMG_20210312_101330.jpg
IMG_20210312_101134.jpg
IMG_20210312_101115.jpg
IMG_20210312_101105.jpg
Post Reply