It is currently Fri Nov 24, 2017 4:22 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Super Mario Bros on MMC3
PostPosted: Fri Nov 09, 2012 9:36 am 
Offline

Joined: Fri Nov 09, 2012 9:14 am
Posts: 2
Super Mario Bros 2 and 3 and the Japanese Super Mario Bros 2 FD conversion all run on the MMC3

I know with a simple counter 74 chip and a large EPROM it is possible to cycle running these games on a MMC3 board just by pressing the reset button.

For an video games exhibition I want to have all the Super Mario Games running on a NES, however the original SMB doesn't use a mapper and I was wondering if there would be any way to get SMB to work on a MMC3 mapper.

There may be other ways to do what I need but I would prefer a simple reset to select the next game.


Top
 Profile  
 
PostPosted: Fri Nov 09, 2012 10:17 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19254
Location: NE Indiana, USA (NTSC)
SMB1 can run on the same sort of MMC3 board as the MMC3 version of SMB2 (J) if you hack it to set all the banks first.

I forget: does the MMC3 version of SMB2 (J) use CHR ROM or CHR RAM?


Top
 Profile  
 
PostPosted: Fri Nov 09, 2012 10:35 am 
Offline
User avatar

Joined: Fri Sep 26, 2008 7:55 pm
Posts: 105
Location: Montreal
I suppose you could have an version of SMB that has its program duplicated in every bank that could be accessed so that it could run regardless of the state of the mapper, precluding the need for a init code. Or write an mapper init routine into one of the unused banks to run right before SMB starts running. I'm sure there are many other possibilities i'm not thinking of.

I don't think it's really something I could test out right now, I think it would require programming some new mapper into a emulator involving your 74 chip and big ROM, added to the TSROM or whatever board.


Tepples: SMB2(J) doesn't appear to be on bootgod's site. Is it an bootleg?


Top
 Profile  
 
PostPosted: Fri Nov 09, 2012 10:52 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19254
Location: NE Indiana, USA (NTSC)
The MMC3 version of SMB2 (J) is a mapper hack (by the homebrew community) of a bootleg (by Chinese pirates).

MMC3 fixes only $E000-$FFFF, and I think SMB1's reset vector is in $8000-$9FFF. Any bank, including the last fixed bank, could in theory be switched into $8000-$9FFF at power on. At least some of the mapper init would have to be in $E000-$FFFF, but armed with doppelganger's SMBDis, it should be straightforward to patch in any mapper init you need.


Top
 Profile  
 
PostPosted: Fri Nov 09, 2012 10:57 am 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6452
Location: UK (temporarily)
There is a version of SMB1 in the NWC/SMB/Tetris multicart that runs on an MMC3, and a little bit of effort with a debugger will let you extract the right slices.


Top
 Profile  
 
PostPosted: Sun Nov 18, 2012 3:16 am 
Offline

Joined: Fri Nov 09, 2012 9:14 am
Posts: 2
Glad I was not asking an insane question then. :)

I will point the information you guys have given me to the person who will be making me the multicart, as I also need him to put back in the (C) Nintendo message in the SMB2(J) hack, so that Nintendo will be happy.

Thanks again.


Top
 Profile  
 
PostPosted: Thu Aug 15, 2013 6:39 pm 
Offline

Joined: Tue May 05, 2009 8:44 pm
Posts: 71
Someone have found a way to make Super mario Bros works on MMC3 ?


Top
 Profile  
 
PostPosted: Thu Aug 15, 2013 9:16 pm 
Offline

Joined: Tue Apr 05, 2005 7:30 pm
Posts: 179
Running SMB in MMC3 is easy. All you need to do is move the reset routine to $E000-$FFFF, add some code to switch in the proper banks, pad the binary to fit the ROM if you plan on burning it to an E/EPROM (best thing to do is duplicate the banks), and reassemble.

_________________
Be whatever the situation demands.


Top
 Profile  
 
PostPosted: Thu Aug 15, 2013 9:52 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19254
Location: NE Indiana, USA (NTSC)
But where in $E000-$FFFF would the reset stub fit? Wouldn't the music engine need moved?


Top
 Profile  
 
PostPosted: Thu Aug 15, 2013 10:01 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2803
SMB is packed pretty full of code and data. However if you had a menu that runs to select your game, you could have the menu do your register setup for SMB.


Top
 Profile  
 
PostPosted: Fri Aug 16, 2013 4:09 pm 
Offline

Joined: Tue Apr 05, 2005 7:30 pm
Posts: 179
tepples wrote:
But where in $E000-$FFFF would the reset stub fit? Wouldn't the music engine need moved?


I assume you're referring to the stub needed for the MMC3.

It is true that SMB is tight on code and data. But it's also true that portions of the code are redundant or unreachable, that is, either they never execute, or they execute but accomplish nothing.

Two examples: the routine ResidualMiscObjectCode at $e392-$e39b is never executed. The JSR instructions at $90bf-$90c4 jump to two separate points in the routine DoNothing at $92aa-$92af, which writes to a variable that is never used.

Those two examples alone, plus the 13 unused $ff bytes, give 35 bytes, which should be enough to write a short MMC3 bank init routine.

_________________
Be whatever the situation demands.


Top
 Profile  
 
PostPosted: Fri Aug 16, 2013 5:13 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2803
Then write it and you'll know. You need to setup the 6 CHR registers and two PRG registers. Mirroring register too.


Top
 Profile  
 
PostPosted: Fri Aug 16, 2013 5:45 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19254
Location: NE Indiana, USA (NTSC)
Let's play 6502 golf.
Code:
  ; 28 object code bytes
  ldx #$07
loop:
  stx $8000
  lda mmc3tbl,x
  sta $8001
  dex
  bpl loop
  sta $A000  ; set vertical mirroring, or use stx for horizontal
  jmp rest_of_reset
  ; A=$00 and X=$FF at end, so ready for $2000/$2001 writes and TXS
mmc3tbl:
  .byt 0,2,4,5,6,7,0,1

There are also 16 bytes to be had by overlapping BrickShatterEnvData with BowserFlameEnvData.


Top
 Profile  
 
PostPosted: Sat Aug 17, 2013 7:56 pm 
Offline

Joined: Mon Feb 04, 2013 8:48 am
Posts: 45
Ohhh, Mario MMC3 conversions. my faaaaavorite subject! Haha!

If there's one ting left I wish I had, it'd be a menu.


Top
 Profile  
 
PostPosted: Tue Aug 20, 2013 1:17 pm 
Offline

Joined: Tue Apr 05, 2005 7:30 pm
Posts: 179
tepples wrote:
Let's play 6502 golf.


Super Mario Bros code is full of rough and sandtraps, but you managed to pitch it onto the green with plenty of strokes under par. Good job.

_________________
Be whatever the situation demands.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group