PowerPak mapper 30 implementation

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

Bananmos
Posts: 532
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Re: PowerPak mapper 30 implementation

Post by Bananmos » Tue Apr 02, 2019 3:45 pm

rainwarrior wrote:
I'm curious how FDS saving was implemented... though I suppose the modified BIOS could just write out the file any time it changed.
Well, I noticed when digging through the powerpak module sources that the code path for FDS saving has the disk in the upper 256kB (=space for 2 double-sided disks) of the PRG chip. And I suspect the upper area was chosen for the very same reason: To avoid the boot ROM trashing the PRG. You might be able to break it with more than 4094 entries in your directory...

Roth
Posts: 399
Joined: Wed Aug 03, 2005 3:15 pm
Contact:

Re: PowerPak mapper 30 implementation

Post by Roth » Mon Apr 08, 2019 10:35 am

Bananmos wrote:Looks like PowerpakMapper30_v3 came with a pretty bad bug, courtesy of nesasm, which due to its daft addressing syntax had turned the final "jmp ($FFFC)" into a plain "jmp $FFFC".

Strangely, Troll Burner, Black Box Challenge and the test ROM all seemed to boot fine with this bug in-place. But the Byte-off compos did not fare so well...

New version here: PowerpakMapper30_v4.zip

And yes, I hate nesasm as much as the next guy. The only reason for using here is that the Powerpak source code used it, and I didn't want to diverge from the main source code too much.
Ah, I was havin' a problem with the reset bug with version 3 while firin' up Black Box Challenge, and didn't notice this post with a version 4. I wonder what the difference is, because rainwarrior and yourself didn't have that issue. Anyway, I wanted to thank you and the others listed in the readme for the flash save implementation, as it makes my life a whole lot easier when I want to play the games I've made and they're all in one spot! Also means I don't need to make a separate mapper for Babel Blox, which is a relief haha

Bananmos
Posts: 532
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Re: PowerPak mapper 30 implementation

Post by Bananmos » Wed Apr 10, 2019 4:28 pm

Roth wrote:
Bananmos wrote:Looks like PowerpakMapper30_v3 came with a pretty bad bug, courtesy of nesasm, which due to its daft addressing syntax had turned the final "jmp ($FFFC)" into a plain "jmp $FFFC".

Strangely, Troll Burner, Black Box Challenge and the test ROM all seemed to boot fine with this bug in-place. But the Byte-off compos did not fare so well...

New version here: PowerpakMapper30_v4.zip

And yes, I hate nesasm as much as the next guy. The only reason for using here is that the Powerpak source code used it, and I didn't want to diverge from the main source code too much.
Ah, I was havin' a problem with the reset bug with version 3 while firin' up Black Box Challenge, and didn't notice this post with a version 4. I wonder what the difference is, because rainwarrior and yourself didn't have that issue. Anyway, I wanted to thank you and the others listed in the readme for the flash save implementation, as it makes my life a whole lot easier when I want to play the games I've made and they're all in one spot! Also means I don't need to make a separate mapper for Babel Blox, which is a relief haha
Glad you find it useful! And thanks for making the first (as far as I know) freely downloadable game to take advantage of the Flash writing feature on Mapper30. Still need to finish the game, but am enjoying it very much :)

Taking the "all games in one spot a bit further", I was toying with the idea that with so many Mapper30 collections now existing as a bundle (like NESMaker's ByteOff competition entries), it'd be kind of cool to have a multicart engine that would allow loading a big list of single-mapper games with a custom menu that allows switching games going back to the Powerpak file menu, and having to reconfigure the FPGA.

If you appended all the 512kB ROMs as a footer of the .NES file and kept a list of all sectors (or clusters?) in the WRAM chip, you could also do kind of a "fastloader" which could load the ROM data from the CF noticeably faster than the Powerpak's native OS routines can... and maybe taking it even a step further and interleave the banks in a form optimal for transfer.

But that's just a wild idea in my head ATM, so can't commit to implementing it anytime soon, if ever. And at the moment I feel like I need a long vacation from the Powerpak OS code... :D

User avatar
rainwarrior
Posts: 7824
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: PowerPak mapper 30 implementation

Post by rainwarrior » Thu Apr 11, 2019 2:43 pm

I think the time it takes to reset the PowerPak and select and load a ROM is still a lot shorter than a typical modern console game's startup sequence. :P It's definitely faster than switching a cartridge, even.

Faster loading is always nice, from an ideal perspective, but I personally think it's in pretty good shape as-is.

Roth
Posts: 399
Joined: Wed Aug 03, 2005 3:15 pm
Contact:

Re: PowerPak mapper 30 implementation

Post by Roth » Wed Apr 17, 2019 3:47 pm

Bananmos wrote:Glad you find it useful! And thanks for making the first (as far as I know) freely downloadable game to take advantage of the Flash writing feature on Mapper30. Still need to finish the game, but am enjoying it very much :)
Glad you're diggin' it! It was a really fun one to make.
Bananmos wrote:Taking the "all games in one spot a bit further", I was toying with the idea that with so many Mapper30 collections now existing as a bundle (like NESMaker's ByteOff competition entries), it'd be kind of cool to have a multicart engine that would allow loading a big list of single-mapper games with a custom menu that allows switching games going back to the Powerpak file menu, and having to reconfigure the FPGA.
Sounds kinda like a "Humble Homebrew Bundle" :P

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

Re: PowerPak mapper 30 implementation

Post by tepples » Wed Apr 17, 2019 4:14 pm

So long as the games can be cut down to mapper 2 (256K max, no CHR RAM banking, no 1 or 4 screen, no self-flashability), you can build an Action 53 compilation out of them using mapper 28. The biggest limit you'll run into is the 512K limit of the PowerPak and EverDrive.

User avatar
rainwarrior
Posts: 7824
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: PowerPak mapper 30 implementation

Post by rainwarrior » Wed Apr 17, 2019 4:23 pm

I think NES Maker games tend to rely on CHR banking.

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

Re: PowerPak mapper 30 implementation

Post by tepples » Wed Apr 17, 2019 4:29 pm

To mapper hack a game using UNROM 512 CHR RAM banking to Action 53, replace all mapper writes with calls to something like this (untested).

Code: Select all

simulate_mapper30_write:
  pha
  lda #$00
  sta $5000
  pla
  pha
  and #$60
  rol a  ; 0:BA00 0000
  rol a  ; B:A000 0000
  rol a  ; A:0000 000B
  rol a  ; 0:0000 00BA
  sta $8000
  lda #$01
  sta $5000
  pla
  sta $8000
  rts

Post Reply