Issue Converting Mike Tyson's Punch-Out!! to MMC3 *CHR*

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
infidelity
Posts: 339
Joined: Fri Mar 01, 2013 4:46 am

Issue Converting Mike Tyson's Punch-Out!! to MMC3 *CHR*

Post by infidelity » Sat Nov 30, 2013 10:13 am

I was successful in getting the game to run it's PRG-ROM properly as an MMC3 rom. The gfx are still a wip, but gameplay/music/sfx are all intact and work properly.

I've been in the process of creating my MMC3 chr routines so that the gfx can be displayed properly, but i'm having difficulty.

The MMC2 is able to swap the ppu consistently without any visual changes from loading 2 different pages at once within $1000-$1FFF. And it's able to do this without an irq/sprite 0 going on.

Within MTP, PPU $1000-$1FFF is the one that gets the most attention. I'm able to get some of the gfx to properly load, but, all the games text, crowd, various icons, are within the first chr page, page 0. This is somehow loaded and stored into the PPU, so that 3 different things are being displayed.
1, current chr page within $0-$FFF PPU.
2, current chr page within $1000-$1FFF ppu.
3, chr page 0 from $1000-$1FFF ppu.

I have tried various different methods of trying to get a 3rd PPU set to be stored into mmc3's $8001-$8001 for display within $1000-$1FFFppu, I tried making it load 00 as either A & Y, storing into $8000-1,A $8000-1,Y, but I don't get the correct desired result.

I tried using register $1E which I believe is a frame counter, to AND 01, and load page 0 into PPU $1000-$1FFF, and if it's not AND 01, to continue displaying what was currently in $1000-$1FFF, it swaps, but it displays the 2 pages swapping on screen.

Then, I tried creating an interrupt using $FFFE, I would force a BRK so that $FFFE would point to my LDA #$00 to store into $1000-$1FFF, but all that does is simply overtake $1000-$1FFF, meaning it's just constantly displaying page 0.

So what I would like to know is, does MMC3 have a way to load chr tiles from other chr pages that are not currently within the ppu, without splitting the screen like in Super Mario Bros. 3?

The only way I've ever seen this was with SMB3, but it uses an irq split to load a 3rd chr page.

So is there any way of using an interrupt to display a 3rd chr page within $1000-$1FFF? Once I can figure this out, MTP will be finished and completed as an MMC3 conversion.

Thank you!
-infidelity

User avatar
qbradq
Posts: 951
Joined: Wed Oct 15, 2008 11:50 am

Re: Issue Converting Mike Tyson's Punch-Out!! to MMC3 *CHR*

Post by qbradq » Sat Nov 30, 2013 10:37 am

Have you been studying the behavior of MMC2? It banks on access to specific tile ranges. This type of banking is not possible in the MMC3. For one, the MMC3 does not connect the required CHR-ADDR lines needed to decode those accesses.

I don't think there's any way to convert MTP to MMC3 without re-writing the sprite engine. And if you do that, then you'd need to do some pretty awesome character banking based on the scan-line interrupt.

You might want to just buy a cart :)

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

Re: Issue Converting Mike Tyson's Punch-Out!! to MMC3 *CHR*

Post by tepples » Sat Nov 30, 2013 10:50 am

That doesn't help with a Punch-Out/Power Punch II multicart.

infidelity
Posts: 339
Joined: Fri Mar 01, 2013 4:46 am

Re: Issue Converting Mike Tyson's Punch-Out!! to MMC3 *CHR*

Post by infidelity » Sat Nov 30, 2013 11:01 am

I read disch's notes on the latches, how $B000 & $C000 are $0-$FFF and $D000 & E000 are $1000-$1FFF, and it's tile dependant on setting/clearing the latch.

What's confusing is that I don't believe there is a scanline interrupt on the title screen, cause the title screen utilizes 3 sets of chr.

Little Mac, and all of the fighters appear correctly within the game, it's the background that is messed up, the crowd tiles and Mac share $1000-$1FFF. And anything text related and various sprites are within $1000-$1FFF.

That's why I was wondering if there was a way to use the mmc3's irq to load a 3rd chr set without a scanline.

User avatar
infiniteneslives
Posts: 2100
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: Issue Converting Mike Tyson's Punch-Out!! to MMC3 *CHR*

Post by infiniteneslives » Sat Nov 30, 2013 11:20 am

infidelity wrote:What's confusing is that I don't believe there is a scanline interrupt on the title screen, cause the title screen utilizes 3 sets of chr.
Correct, MMC2 doesn't have interupts. The mapper switches banks based on location of last tile fetched.
That's why I was wondering if there was a way to use the mmc3's irq to load a 3rd chr set without a scanline.
Huh? You want an interupt without a scanline? The MMC3 interupts are based on a counter that's decremented for each sensed scanline. No scanlines = No IRQ's from the mapper. Additionally the irq doesn't load chr sets. The mapper interupts the CPU and then the CPU would be changing the chr set on the MMC3. The MMC2 is inherently different in the fact that the CPU doesn't control bankswitching aside from what tiles it draws where for the PPU.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers

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

Re: Issue Converting Mike Tyson's Punch-Out!! to MMC3 *CHR*

Post by tepples » Sat Nov 30, 2013 11:33 am

You need to figure out what part of the code is inserting FD/FE tiles and what scanlines they occur on, and then set an IRQ to fire at those times. You may have to do some bank rearranging if more than one switch occurs during a scanline or if it draws sprites from both pattern tables.

infidelity
Posts: 339
Joined: Fri Mar 01, 2013 4:46 am

Re: Issue Converting Mike Tyson's Punch-Out!! to MMC3 *CHR*

Post by infidelity » Sat Nov 30, 2013 12:18 pm

Hmm this is starting to be a bit outta my league here, since I lack creating an irq engine from scratch. I've been doing several attempts at doing it, looking at how other mmc3 roms do it, reading tutorials online on how to do it, but I just can't do it. I didn't think i'd run into this kind of issue with the CHR.

Thanks for all the replies everyone.

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

Re: Issue Converting Mike Tyson's Punch-Out!! to MMC3 *CHR*

Post by MottZilla » Sat Nov 30, 2013 12:53 pm

The game could probably be converted if you got into exactly how the game is using the feature of the MMC2 and then reprogramming it to get the same effect with MMC3 scanline interrupts. But you may need to reprogram and change other things if that isn't enough.

I don't think it would be an easy task.

User avatar
oRBIT2002
Posts: 622
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: Issue Converting Mike Tyson's Punch-Out!! to MMC3 *CHR*

Post by oRBIT2002 » Tue Dec 10, 2013 4:43 am

What's the purpose of converting it at all?
The challenge itself?

infidelity
Posts: 339
Joined: Fri Mar 01, 2013 4:46 am

Re: Issue Converting Mike Tyson's Punch-Out!! to MMC3 *CHR*

Post by infidelity » Tue Dec 10, 2013 10:51 am

That, and for anyone who wants it on an MMC3 cart.

Post Reply