NSF playback with Power Pak Lite on CopyNES?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
NSF playback with Power Pak Lite on CopyNES?
by on (#111831)
****** UPDATE ******

It is possible to play NSFs with a Power Pak Lite and CopyNES thanks to rainwarrior!

See his post below.

*********************


Is it possible to get NSFs playing with a Power Pak Lite on CopyNES? I'm a little confused. The documentation makes it sound like it's possible.

According to the readme files:

Code:
 COPYNES.TXT
 d)  NSF music playing.  With a special NSF cart, USB CopyNES can play NSF's on
     the real hardware.  128K of RAM is supported on my NSF cart allowing
     up to 128K of space for a single song.  Songs are loaded through a
     simple UI.  The RAM cart (see below) will work for SOME NSF's.  If
     they are not bankswitched, they will work on the RAM cart.

 e)  RAM cart.  This allows very fast cycle time development.  With a cart like
     the PowerPak Lite, many mappers and up to 256KB PRG, 128KB CHR, and 8KB
     WRAM can be loaded quickly.

COPYUSE.TXT
16.  Play NSF
-------------
If you have NON-banked NSFs, and a RAM cart, you can play NSFs using
this function.


I found an old thread from 2006 that was similar to what I'm trying to accomplish....
viewtopic.php?f=9&t=1893&hilit=nsf+copynes
But I thought I'd still ask since that's pretty old information. flipside's CopyNes was version 2. Mine is version 4 (just got it recently).

If the Power Pak Lite isn't going to work... what are my options?
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111832)
It's at least possible in theory, but only for non-banked NSFs (max. 32 KB).
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111839)
Yeah, CopyNES has a "play NSF" option but it doesn't work with PowerPak Lite.

I haven't investigated it yet, but probably the PowerPak Lite requires an NROM program to be sent to its CPLD, and might have its own specific way of enabling/disabling its RAM writes. It shouldn't take too much to add to the client (I will try it later this month, if nobody else does in the meanwhile).
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111876)
rainwarrior wrote:
Yeah, CopyNES has a "play NSF" option but it doesn't work with PowerPak Lite.


That's what I was thinking, thanks for confirming it wasn't just mine.

rainwarrior wrote:
It shouldn't take too much to add to the client (I will try it later this month, if nobody else does in the meanwhile).


Man, that would be amazing.


If anyone else is trying to get NSFs playing right now... I found Vegaplay by NO CARRIER and I've had good success. It's just like loading an NROM game onto the Power Pak Lite after you compile. It's pretty simple to get up and running. A tiny amount of asm needs to be changed and you'll need a hex editor to remove the header from the NSF.

http://no-carrier.com/index.php?/vegaplay/


All that said, I think Vegaplay has the same limitation of using non-bankswitched NSFs (and of course no expansion chips). One of my NSFs that used bankswitching fails to play all the songs.

So, my new question is how can I play bankswitched NSFs and use atleast the Namco163 (namco106) expansion chip? The NSFs I'm trying to get playing are songs that I've made with ppmck (using mml). I've had to use bankswitching on some of them to get it to compile.
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111896)
Famitracker has a feature export NES ROMs instead of NSFs. It can also export the song in assembly format that you can manually compile.

As far as getting an NSF with N163 to play... on what? Emulators already do it fine. PowerPak does it fine. PowerPak Lite doesn't have an N163 inside... so... I'm not sure I understand your question.
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111897)
rainwarrior wrote:
Famitracker has a feature export NES ROMs instead of NSFs. It can also export the song in assembly format that you can manually compile.


That's good to know for the future. I currently do not use Famitracker (or any tracker). I code everything in MML by hand and compile with ppmck. I'm trying to figure out how I can take one of my longer songs that required bankswitching and get that to run on real NES hardware (my modified NES with CopyNES).


rainwarrior wrote:
As far as getting an NSF with N163 to play... on what? Emulators already do it fine. PowerPak does it fine. PowerPak Lite doesn't have an N163 inside... so... I'm not sure I understand your question.


Trying to get an NSF I made that uses N163 to run on my NES (w/ CopyNES). I only have the Power Pak Lite right now. And it looks like the full featured Power Pak won't be available for at least a month.
From my limited understanding, the Power Pak emulates Mapper 19 for the N163. Can the Power Pak Lite not do the same?
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111898)
If I recall, PPMCK comes with an assembler and builds from the source every time you make an NSF, right? So... if you need to modify the code/build to proce an NES, you can, I think.

Unfortunately, NSF bankswitching may or may not easily translate to other bankswitching methods. Probably the easiest thing to do is build an AxROM that stitches several non-bankswitching NSFs together, each one in its own 32k page. (This is what I did for my Dark Side of the Moon ROM.)

As far as mappers the PowerPak Lite supports, it's a very short list. Its CPLD and other hardware are nowhere near the power of the PowerPak. It probably doesn't have the juice to handle an N163 mapper. It's also not connected to the expansion pin that the PowerPak puts its expansion audio on, so it would need to be modded (but again, probably doesn't have enough power anyway).
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111899)
Well you can probably ignore the last part of my last post. I just looked at the Power Pak Lite product page and saw it only supports 8 mappers (and does not include Mapper 19)


http://www.retrousb.com/product_info.php?products_id=35


So for N163 playback on my NES I'll need a Power Pak or hack together a cart, right? Those are the only two options?
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111900)
Well, another option that might be interesting is playing logged register streams through the CopyNES.

The VRC7 register test mode operates like this, where you plug a Lagrange Point into your NES (with an appropriate adapter, modded so you can use the audio), and the CopyNES program sends a data stream to the NES that will immediately play on the cart.

You could do an NSF player in the same way, though you'd need to convert the NSF into a log first. You wouldn't even need a cartridge in the NES if it was just 2A03.
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111901)
You could also get something similar to the PowerPak, e.g. an Everdrive N8 or maybe an InviteNES
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111903)
rainwarrior wrote:
If I recall, PPMCK comes with an assembler and builds from the source every time you make an NSF, right? So... if you need to modify the code/build to proce an NES, you can, I think.


Yes that is true, it builds from the source every time using NESASM. I'll be looking at the code tonight and see if I can modify it. I know currently it uses 8k banks because I see the bank overflow error pretty often. ppmck is not very efficient with its data and I can easily use more than 8k for a single song.
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111904)
lidnariq wrote:
You could also get something similar to the PowerPak, e.g. an Everdrive N8 or maybe an InviteNES


That's cool. I didn't know those existed.
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111905)
I'm currently trying to make one of my longer songs non bank-switched (So maybe I can figure out how to combine multiple NSFs like rainwarrior suggested). It doesn't seem possible so far because of ppmck and NESASM.

I was just thinking... the 8k bank limit is because of NESASM.

Even if I modify the asm that ppmck spits out it still has to compile with NESASM. I can't really get around the 8k limit and thus my NSF is going to be bank-switched.

Is that right? All of my longer songs that were made with ppmck MUST be bank-switched?
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#111908)
The 8KiB constraint of NESASM should be something you can work around, as long as you set up the banks to be loaded in linear order for an unbanked NSF.
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#112000)
Okay, I felt like figuring this out today: http://code.google.com/p/usbcopynesblue/downloads/detail?name=usbcopynesblue501.zip

Give this a spin! This should make Play NSF work with the PowerPak Lite, and probably the other ram cart types that CopyNES USB seems it might support. (I can only test PowerPak Lite)

It should work for NSFs that are not bankswitched, and NSFs <32k that only use a startup bank set (and don't need to switch during/after INIT). Basically the NSF gets rebuilt into an NROM, and then uploaded to the RAM cart as an NROM.

The existing NSF cart support still exists, so if you've got one of those, just hit cancel when the ram cart plugin selector comes up.


One thing I noticed about the BIOS' NSF player is that it copies the song number into all three registers A/X/Y, so for NSFs that are dual NTSC/PAL you will probably end up getting the wrong speed on some tracks besides the first one. Maybe someday I will rewrite the NSF player as a plugin, but for now this is an issue that exists. (I don't feel qualified to update the BIOS.)
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#112112)
rainwarrior wrote:



You. Are. Amazing.

Really man this is great!

(To celebrate I ordered a copy of MOON8 - can't wait to get it. You're a real inspiration.)
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#112125)
Did you try it out?

Eventually I think I'll add another row of features, and stick NSF > Ramcart in its own space, with a plugin designed for it instead of hijacking the NSF Cart bios support. Also I could fix that NTSC/PAL bug.

Thanks for getting a MOON8; it is in the mail.
Re: NSF playback with Power Pak Lite on CopyNES?
by on (#112126)
rainwarrior wrote:
Did you try it out?


Yes! Works perfect.