32kb / 64 instruments hard limit?

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

Post Reply
User avatar
hawken
Posts: 79
Joined: Sun Jan 25, 2015 6:51 pm
Location: Tokyo
Contact:

32kb / 64 instruments hard limit?

Post by hawken »

I have a bunch of tracks made in Famitracker, need to make them in to one file to work with a music player, that can compile to a rom.

The tracks combined are over 32kb.

Are there any known techniques (like we have bank switching for tiles) that can be applied to remove this limit? (32kb per song perhaps?)
twitter: http://twitter.com/hawkun
Pirate Pop Plus - gameboy styled game for 3DS, WiiU & Steam
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: 32kb / 64 instruments hard limit?

Post by rainwarrior »

Yes, use a mapper with bankswitching, and then use its bankswitching. Export the tracks separately so that each can go in its own bank.

If you want an example of a music cart using 32k banking via an AxROM mapper, my old MOON8 project has source code (bottom of the page):
http://rainwarrior.ca/music/moon8.html

Even easier maybe is the Mapper 31 that we created recently for NSF roms. In this case you can just drop an NSF file that's already using NSF style bankswitching into the ROM, but it will only run on some newer emulators. Another example with source:
http://rainwarrior.ca/projects/nes/pico.html

I meant to make a simple turnkey example to make a music ROM out of a single NSF using mapper 31, but this was a project I put off until I finish my game. :( I'll do it someday!!!
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: 32kb / 64 instruments hard limit?

Post by dougeff »

Is a 32k per song limit really a problem? I estimate that can squeeze over 30 minutes into 32k. What kind of song do you need more than 30 minutes for? Tarkus - ELP?
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
hawken
Posts: 79
Joined: Sun Jan 25, 2015 6:51 pm
Location: Tokyo
Contact:

Re: 32kb / 64 instruments hard limit?

Post by hawken »

dougeff wrote:Is a 32k per song limit really a problem? I estimate that can squeeze over 30 minutes into 32k. What kind of song do you need more than 30 minutes for? Tarkus - ELP?
I'm making a rom of the music that went in to my 3DS / WiiU game "Pirate Pop Plus" - some of the tracks are a little... large. All legit 2a03 though.

(play list of the 8 tracks)
https://www.youtube.com/playlist?list=P ... yUoxj6QP3M

(more info on Pirate Pop Plus)
https://youtu.be/UQO2syGhjMg
twitter: http://twitter.com/hawkun
Pirate Pop Plus - gameboy styled game for 3DS, WiiU & Steam
User avatar
hawken
Posts: 79
Joined: Sun Jan 25, 2015 6:51 pm
Location: Tokyo
Contact:

Re: 32kb / 64 instruments hard limit?

Post by hawken »

rainwarrior wrote:Yes, use a mapper with bankswitching, and then use its bankswitching. Export the tracks separately so that each can go in its own bank.

If you want an example of a music cart using 32k banking via an AxROM mapper, my old MOON8 project has source code (bottom of the page):
http://rainwarrior.ca/music/moon8.html

Even easier maybe is the Mapper 31 that we created recently for NSF roms. In this case you can just drop an NSF file that's already using NSF style bankswitching into the ROM, but it will only run on some newer emulators. Another example with source:
http://rainwarrior.ca/projects/nes/pico.html

I meant to make a simple turnkey example to make a music ROM out of a single NSF using mapper 31, but this was a project I put off until I finish my game. :( I'll do it someday!!!
Thanks for these links, very helpful. That moon one is interesting, actually 2 of the tracks in my project are by Roger Waters' son Harry.
twitter: http://twitter.com/hawkun
Pirate Pop Plus - gameboy styled game for 3DS, WiiU & Steam
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: 32kb / 64 instruments hard limit?

Post by rainwarrior »

dougeff wrote:Is a 32k per song limit really a problem? I estimate that can squeeze over 30 minutes into 32k. What kind of song do you need more than 30 minutes for? Tarkus - ELP?
I've made plenty of NES music that doesn't fit in 32k.

Lots of people make large, detailed compositions when their primary concern is just making music. Famicompo is full of such things. Most of the time it's because of DPCM samples, but not always. Virt's Shovel Knight soundtrack was compiled into a 600k at some point. I made a 1MB NSF for the 2A03 Puritans compilation, though my own 2 and a half minute contribution to it was only 19k, and had no DPCM at all.

YS actually did cover Tarkus in Famicompo Mini Vol. 5, only the first few minutes, but the NSF is 49k. ;) YS did a lot of long prog rock covers though, the longest I can remember was an 11 minute version of Yes' Heart of the Sunrise for Famicompo Mini Vol. 8, which was ~58k.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: 32kb / 64 instruments hard limit?

Post by rainwarrior »

hawken wrote:Thanks for these links, very helpful. That moon one is interesting, actually 2 of the tracks in my project are by Roger Waters' son Harry.
The Famicompo Pico one is more recent, and I think the code and approach is better (MOON8 was one of my first NES projects), though it does depend on the special mapper 31. If you want it on a cart, InfiniteNESLives is the only one making that mapper, though there is an Everdrive N8 implementation of mapper 31 too.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: 32kb / 64 instruments hard limit?

Post by rainwarrior »

I made an NSF to NES rom tool which might help. Thread over here:
viewtopic.php?f=6&t=15204
Post Reply