Dwedit's Board

Enjoy the board

You are not logged in.

Announcement

Welcome, fellow visitors from other websites!
Whenever you download a file, I'd appreciate it if you posted a nice "Thank You" message, then tell me which site you came from. Thanks.
- Dwedit

#1 2008-06-14 5:59:38 am

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,017
Website

The right way to do Punch Out?

Flubba's trick for PocketNES to simulate Punch Out was deemed to be "bad" and "hacky" by Loopy, so it was never integrated into NesDS.

Punch Out works by the tilemap containing specific tile numbers that tell the mapper to bankswitch to a second set of vrom pages, and can also tell it to switch back to the first set of graphics again.
I think there may be a proper way to do punch out.
Use the GBA windowing feature to split the screen horizontally.  Then use an additional background layer.  This lets you have up to two vrom switch events per scanline.  It would fix Punch Out and Marble Madness, and also probably the mapper 10 games, like fire emblem and famicom wars.

It would take a fair amount of work to add it in though.


"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#2 2008-07-05 1:43:16 pm

morbid27
Member
Registered: 2008-06-13
Posts: 104

Re: The right way to do Punch Out?

Are you thinking of writing a seperate mapper for map9

I think the problem is these games use 4k banks instead of 1k banks so it is harder to render them correctly. If you were to write a seperate mapper and render background function the mask for the background and sprites would be lost or the mask for just the sprites would be lost please correct me if I am wrong.

If you just wrote a sepperate function loaded every time you use these games it wouldn't be that hard. I can't right now cuz im still learning asm but im tying to get on the same page as you.

Last edited by morbid27 (2008-07-05 1:45:06 pm)

Offline

#3 2008-07-05 2:04:17 pm

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,017
Website

Re: The right way to do Punch Out?

Punch out's mapper works by switching banks when a specific tile number is rendered.  Naturally, that's almost impossible to emulate on a GBA, unless you use the window feature.


"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#4 2008-07-08 8:40:59 pm

morbid27
Member
Registered: 2008-06-13
Posts: 104

Re: The right way to do Punch Out?

Could you point me to an example of the windowing feature (DMA?) for GBA please. I will try this weekend to update map 9 hopefully for nesDS. I just kinda want to get an idea of how it would work on gba at the same time.
THNX

Offline

#5 2008-07-08 9:10:24 pm

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,017
Website

Re: The right way to do Punch Out?

There's more to it than just using the windowing feature...

Need to use up to 3 background layers for the NES graphics (instead of just one).
Need to modify the code that assigns which BG control value gets assigned to a scanline
Need to add code to fill up the WINDOW buffer
Need to incorporate the window buffer into the scaling code

Would need to keep track of when tiles FD and FE appear on a BG map (or if they appear at all).

I'd say that Flubba's cheesy punchout hack is good enough for gameplay.


"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#6 2008-07-10 9:22:53 pm

morbid27
Member
Registered: 2008-06-13
Posts: 104

Re: The right way to do Punch Out?

http://nesdev.parodius.com/bbs/viewtopi … e3c5c2e6df

Ya its pretty complicated and i still dont know asm well enough to pull it off.
I think ppl will appreaciate a new gui though

Last edited by morbid27 (2008-07-11 8:18:54 am)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] claudebot

Board footer

Powered by FluxBB
Modified by Visman