SNES PowerPak 1.04b mappers

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
SNES PowerPak 1.04b mappers
by on (#57128)
(link removed for ROMs)

Adds SPC player. This is certainly beta, sometimes a song will not start playing. I am sure there are lots of tricks to loading the SPC I am missing. Press start at any time to reset back to the menus. Not sure how much more work will be done on this or if rsn/rar support will ever be started.

Adds header guessing if no valid internal header is found. Right now it will only guess hirom/lorom but that is enough to fix games like Contra 3 where the name overlaps the mapper. Should never break a previously working game because it doesn't happen until the header already failed.

Adds faster scrolling using shoulder buttons. Thought I already had this :)

by on (#57131)
I don't know if you're not setting all DSP registers or what's wrong, but there's certainly something strange about it.
I've got my own little "test set" with 17 songs from different games. My own SPC loader plays 12 of them right now IIRC while failing with 5. The PowerPak only managed to play 4 or 5 of them. A few caused a jump back to the PowerPak logo screen (e.g. Map.spc from Dracula X, or Wild-F.spc from Wild Guns).
I'll probably release my SPC loading code eventually. Right now I'm still trying to improve it further.

by on (#57132)
First $0002-00EF is loaded, then $00F8-FFA0.

Then the init code is copied to $FFA0-FFBF

All DSP registers are loaded in reverse pairs (01,00,03,02,etc) to avoid the problem you saw.

$00F1 is set, hopefully for less time between timer enable and timer overflow.

Then the init code is run which sets A/X/Y/SP/etc.

I would guess there are more DSP loading problems in my code, or some other init step that is missing. Sometimes when a song doesn't start picking it again will work. I am waiting for the io port echos at every step so it shouldn't be a protocol problem. None should jump back to the title screen, can you email those ones to me?

Wonder if the F2/F3 DSP regs need to be set using the SPC data before or after loading all the DSP registers...

by on (#57133)
I'm not sure if the F2/F3 init values in the .SPC are needed at all, they don't seem to make much difference to me.
Your loading procedure sounds pretty much the same as mine, so there must be some mismatch between how you describe it and how you've actually implemented it ;P

by on (#57158)
Thanks for the update. Particularly the header guessing and fast scroll. =)

by on (#57162)
This is VERY good news !! I'll definitely order a Super Power Pak before my credit cards expires in 1 month or so (I don't want to pay for a new one).

by on (#57192)
Yeah, the header guessing is cool (any improvement in compatibility with clean ROMs is certainly welcome) as is the R-L scolling (I wondered what was wrong there :P ), but I've been checking these forums several times a week in the hope of getting autoloading of savefiles. Oh well, maybe next time. Keep up the good work.

by on (#57196)
I want to play Demos and Hacks on it!!!

by on (#57197)
A better snes compatibility would be nice...
for example:
ISSD works on all of my 2 GPU snes but it doesnt work on my 1 GPU snes.

Super Demo World works on one of my 2GPU snes but not on the other 2GPU snes.
Following error occurs while loading Super Demo World:
Error $51 - CF card status
Error $10 - CF card error
c=$01 0=$69 1=$43 2=$0C 3=$E2

by on (#57210)
mic_ wrote:
A few caused a jump back to the PowerPak logo screen (e.g. Map.spc from Dracula X, or Wild-F.spc from Wild Guns).

This should have been more obvious to me. The player reads the play length in the .spc and will reset when the song is supposed to be over. Those have zeros, so it resets immediately. I know I am not handling those correctly (they are ascii, not binary values) and may just end up ignoring them.

by on (#57223)
I'd like to confirm that Mottzilla's BS Zelda works with the new mappers. :) I bet that other variants will work as well, but I've not tested them extensively.

EDIT: Just finished testing BS The Legend of Zelda Ancient Stone Tablets week 1 with the latest mappers. To get saving working, you'll need to play the game in an emulator and pad the sram to the correct size. Since the PowerPak uses 8KB sram, it's necessary to pad the 4KB sram created by your emulator.

I used a hex editor to create a blank 4KB file. Then I inserted the 4KB srm at the beginning of the file at address $000. Your 4KB srm should be exactly $FFF bytes. When you add it to the blank 4KB file, your new file size should be $1FFF bytes or 8KB. After that, you should be able to save.

Alternatively, you can download the sram here: http://www.iga-home.net/downloads/snes/ ... da_ast.srm

Also, you should be able to use the same sram for weeks 1-4 to keep your progress. Let me know if this works for you.

by on (#57252)
The SRAM size byte of BS Zelda AST's internal header is actually set to 256 Kbits. So I played through all 4 weeks recently using a 256 Kbit (32 KB) SRM file. Worked like a charm. :)

by on (#57262)
That's interesting becuase it's saving my progress with an 8KB SRAM. I'm not sure how it's doing that though if the SRAM size is 32KB.

by on (#57363)
Future updates like this will be on the nintendoage.com forums. The FDS BIOS is always included, so no ROM linking forbids it here.
Re: SNES PowerPak 1.04b mappers
by on (#57637)
bunnyboy wrote:
Right now it will only guess hirom/lorom but that is enough to fix games like Contra 3 where the name overlaps the mapper.

Tried it out on Contra 3 and Test Drive II and it wouldn't load either.

by on (#57646)
so where can i download those mappers SNES PowerPak 1.04b?

by on (#57655)
From a ROM site, for this reason.

by on (#57672)
Newest beta and discussion now moved to the nintendoage.com forums, will probably mention future changes here but may forget.

by on (#57686)
Link pls 8)

by on (#57687)
Oh ffs.. :P

Click "Forum", click "The Brewery", click "NES/SNES PowerPak beta mappers".

by on (#57692)
oh thanks :)

by on (#57705)
Is linking to sites that host ROM links ok? :)

by on (#57706)
If we take the six degrees of separation from ROM sites too far, then at some point, we wouldn't be able to link to any web site because you can get to Google and from Google to ROM sites. Heck, if you type snes into Google, it actually suggests pirate sites halfway down the page: "Also see snes roms". And even Zophar's Domain, which once hosted only NSFs and freeware ROMs, now hosts a full ROM archive.

Now as for our policy of "almost anything":
koitsu wrote:
Parodius Networking is not responsible for Sites which contain HTML or text links to said pirated software/music that is not hosted on the Parodius network.

However, linking has been shown to constitute contributory infringement under US law. So I don't want us linking directly to binary files containing ROMs not cleared for Internet distribution, even if only for "bandwidth theft" reasons. But there are cases in which I'll interpret fair use to allow a link to an external HTML page linking to a ROM, such as Doppelganger's commented disassembly of SMB1. The FDS BIOS is marginally OK; NSFs and SPCs are historically OK; complete copies of three early-1990s Mario games are not.

by on (#57716)
I don't mean to nitpick your policy, and by all means it's your site, but it is somewhat bemusing how various sites pick and choose which copyrights to obey, and how to obey them.

The old ROM sites used to have the "delete this file within 24 hours" rule, which was pulled out of someone's ass.

The ROM hacking scene is adamantly against full copyrighted games, whilst the translation patches they host violate the Berne Convention.

And apparently NESdev is okay with SPCs that contain complete sound engine programs, so I guess visual programs are not okay whilst aural programs are.

In America, it's not about who is right, but who has the more expensive lawyers. If Nintendo wants to kill nesdev, they'll find ten dozen reasons to do so, with or without the FDS BIOS here. Congress has turned everyone into criminals with their perpetual copyright system.

And these various policies aren't about legal vs illegal, they're an amortized risk system.

by on (#57724)
byuu wrote:
The old ROM sites used to have the "delete this file within 24 hours" rule, which was pulled out of someone's ass.

I seem to recall that it was pulled out of a misinterpretation of a U.S. copyright statute that was intended to apply to libraries and archives: 17 USC 108 if I recall. Deletion of the downloaded copy was supposed to correspond to returning a traditional copy of a work to the library.

Quote:
The ROM hacking scene is adamantly against full copyrighted games, whilst the translation patches they host violate the Berne Convention.

A lot of developed countries don't fully implement Berne anyway. The United States explicitly does not (17 USC 104(c)). The US breaks Berne's minimum copyright term for any work published before 1978 and more than 45 years before the death of the author, and critics of the version of fair use in place in the US have called it broader than Berne's "three-step test".

Quote:
And apparently NESdev is okay with SPCs that contain complete sound engine programs, so I guess visual programs are not okay whilst aural programs are.

Once zophar.net and snesmusic.org receive takedown notices about archives of NSF, SPC, PSF, etc., I plan to revise the policy. Until then, the retro game music ripping scene relies on the legal doctrine of snooze == lose: an exclusive right holder that ignores a pattern of infringement for too long is entitled to an injunction against future infringement but not damages for past infringement. Takedown procedures for alleged infringements on forums and the like (17 USC 512) are already slanted in favor of copyright owners; any copyright owner that hasn't already availed itself of these after over a decade of the scene's existence probably doesn't care about the disparity between its copyrights and the scene's copynorms.

by on (#57736)
Wow, Zophar's Domain has devolved to a ROM site? I never would have guessed. I don't know what ZD has now, but one thing I've noticed is that a big public ROM site (like pleasuredome.co.uk) will carry everything but ROMs for any Nintendo-made systems.

Quote:
And these various policies aren't about legal vs illegal, they're an amortized risk system.


Yeah that's true when it comes to NSFs and SPCs, I think it would be dumb (and bad business) for Nintendo to have a problem with them. It seems pretty harmless to me, and actually I'd imagine if anything, they increase interest in the games they came from.

Stuff like the FDS BIOS is probably something they wouldn't care about, but it would be disrespectful to assume so. Plus the FDS BIOS is 99% only useful for playing older games, and that's not what this site has been about anyways.

by on (#57738)
Quote:
A lot of developed countries don't fully implement Berne anyway.


http://www.copyrightaid.co.uk/copyright ... ignatories

The US is on that list, although I'm not a lawyer so I can't say how 17 USC 104(c) affects that. It would seem odd for the US to sign the Berne Convention just to ignore it, but it wouldn't be the first illogical thing the US has done.

Still, certainly there are countries on that list that do follow the BC, and for those countries, translation patches are illegal.

Quote:
Once zophar.net and snesmusic.org receive takedown notices about archives of NSF, SPC, PSF, etc., I plan to revise the policy.


zophar.net also hosts the FDS BIOS, along with other commercially copyrighted ROMs.

Quote:
Until then, the retro game music ripping scene relies on the legal doctrine of snooze == lose: an exclusive right holder that ignores a pattern of infringement for too long is entitled to an injunction against future infringement but not damages for past infringement.


I do wonder how that'd turn out in court, but hopefully you're right.

It wouldn't really matter anyway, I'm sure it would be trivial to make a new SNES music format that is more of a patch that forces a game to start playing a given song, with the game itself not included. SNSF is not that format. I feel these could be UPS patches roughly 20-60 bytes a piece in size, but playing them would require the original game and a full SNES emulator.

The battle theme to Lufia II is music just as much as is Enter Sandman by Metallica. If not moreso, since it also contains a copyrighted computer program in the background.

Quote:
Yeah that's true when it comes to NSFs and SPCs, I think it would be dumb (and bad business) for Nintendo to have a problem with them.


Absolutely, it would be terrible PR and would net them nothing.

But you never know, they may want to start double-dipping their customers again like they do now with their Virtual Console sales. What do you think, 100 Wii points per song?

Quote:
Stuff like the FDS BIOS is probably something they wouldn't care about, but it would be disrespectful to assume so.


The problem with that is where do you draw the line? That was kind of my point, that it's all arbitrary.

If the FDS BIOS is indeed off-limits, what about the SPC700 IPLROM? Note: the previous sentence is larger than the entire SPC700 IPLROM. What about the DSP-n data ROMs, which are essentially sin / cos lookup tables? Sounds silly to consider them even remotely copyrightable, and yet the MESS team does.

If a math table can be copyrighted, then why not the gaussian table in the S-DSP? Why not the counter tables in the S-DSP? Why not the lighting tables in the S-PPU? Again, where do you draw the line?

The way I see it is that the Sony v Connectix BIOS ruling was a gross error, and contradicts every other law giving the green light to emulation. Make a program that reads the BIOS and compares it bit-for-bit, failing if not a match. Bam, you have the court case where IBM tried to stop clones by checking for their company name in a BIOS string. Once the BIOS is exposed from hardware, the only way to perfectly emulate the hardware is to be able to provide the same output to the same input. If the input asks for the BIOS, what can you do?

At the very least, Sony should have been required to provide a digital copy of the BIOS to purchasers of the Playstation.

The way it stands, emulation can be defeated for good like so: store a $5 SD card inside the system that holds 16GB of true (non-pseudo) random gibberish. Make it 100x bigger by mixing it with pseudo-random gibberish akin to the CICs, as cryptographically secure as possible. For each game, randomly generate an algorithm that produces a 2GB block of that gibberish and reads it back. If it doesn't match, halt the game. Sorry emulators, game over.

But that BIOS was a major piece of software, which was 8,192 times larger than the IPLROM. So who knows.

What about the D411 key+seed? That's 1/4th as big as the IPLROM.

I don't know where to draw the line on this stuff myself, and I can't exactly ask Nintendo because they'd just say they own the copyright to all electrical equipment in the universe if asked.

The program ROMs for the DSP-n chips are going to be fun if and when we ever get them dumped. I have no idea how to handle that. They are 2KB in size each.

by on (#57747)
ROMs on zophar are on a separate subdomain and are a recent development.

A program whose size is close to the SPC700's IPL was ruled uncopyrightable. It was called Toner Loading Program. Once you get to short programs that must take a given number of bytes, you get very close to merger of idea and expression.

Quote:
Make a program that reads the BIOS and compares it bit-for-bit, failing if not a match.

That's what Nintendo is trying with the DSi, except in the other direction. DS games are divided into an executable and a file system, and hashes of the executables of the first 3,000 or so DS releases are in the DSi's firmware, just as I had predicted on forum.gbadev.org about a year before the DSi came out. Subsequent DS releases carry RSA-signed hashes on the card.

Quote:
For each game, randomly generate an algorithm that produces a 2GB block of that gibberish and reads it back. If it doesn't match, halt the game.

That will so be HLE'd over.

In another topic about FDS homebrew, I wrote that the FDS BIOS can be rewritten based on known entry points or HLE'd, just as PC-based GBA emulators tend to HLE the BIOS.

by on (#58557)
I also didn't know that about Zophar's Domain. In any case, my own HD is its own ROM site. I downloaded complete GoodSNES and GoodNES sets about a year ago in the hopes of never visiting a rom site again for NES/SNES games. It actually didn't quite work out that way; my own Garou Densetsu cart didn't show up on GoodSNES when I dumped it, so I downloaded a Non-GoodSNES rom of Rev. 1.1 to compare checksums, and sure enough, that's what I have.

My PowerPak is virtually unused for stuff I don't actually own though. I have only three ROMs of games I don't own - 1) Star Ocean, 2) Rendering Ranger R2, and 3) Seiken Densetsu, and that's because:
1) 96mbit ROM, WOW!!!
2) It's a ridiculously rare and expensive title that shows off well what the hardware can do, but it's also not that good of a game (unless you really like shooters, in which case it's at least well above average)
3) I have SD2, and I put it on there for completeness. I may or may not ever buy SD3, cuz I don't like it that much, but there ya go.