This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Need help making an nes ROM similar to MOON8

Need help making an nes ROM similar to MOON8
by on (#129104)
hello,

I’m writing to ask for some help building a basic nes ROM almost identical to rain warriors MOON8 rom, but with a few tweaks.

i will try and keep this as brief and detailed as i can, understanding that i have no knowledge of mappers, banking, nesASM, or 6502 assembly. i am musician who loves composing for the NES using famitracker, and I’m looking for help from an experienced nes coder/developer.

i am looking to make a re-usable ROM identical to moon8, but using my own original compositions, to compile “gapless” albums using multiple BIN files.

much in the same way rain warrior made moon8 as a ROM cover of pink floyds “dark side of the moon” album. i would like to have a ROM similar to make my own albums and play them off an NES.

for years I’ve been using the powerpak with separate nsf files for my live shows. having to load and re-load single nsfs will no longer do as my live shows advance and ideally, id like to eliminate having to touch a controller more than once to play my songs sequentially.

most of my songs have upwards of 20 instruments, and can vary in length from 4 to 8 minutes. i have several different .ftm files i would be using to make these albums.

first and probably most important, is that i use vrc6 expansion, and the ROM would need to built for mapper 24. most of my songs do not use DPCM, although some of my songs do have it occasionally.

i don’t need an “interface" as detailed as moon8’s either. if you look at this video https://www.youtube.com/watch?v=KQtzaED5moA you’ll see rain warrior included album artwork and some really cool visuals for the different channels. i dont have any album artwork and ideally i am only looking to have a basic track list, timer, and arrow icon to indicate looping or sequential playback.

I’ve been wanting to do something like this for a long time, but need someone to dedicate time and knowledge to it. because my knowledge is so limited, I’m hoping i can find someone to make the ROM, and then teach me how to compile, order, and place BIN files into the ROM. either writing the ROM from scratch or re-using the source files available for moon 8 http://rainwarrior.ca/music/moon8src.zip

I’ve followed rain warriors BIN export guide: http://famitracker.com/forum/posts.php?page=1&id=3681&sort=, and while he’s provided a lot of feedback and help, its gotten to a point where some of the more advanced aspects of building the ROM are too time consuming to write a tutorial for (using multiple BIN files, knowledge of mappers and banking), thus I’m asking anyone who is interested for help.

im confident that if someone were to walk me through the process I’m describing that i would be able to pick it up and eventually do what i need to on my own.

my band is going on tour this summer and ideally id like to have this ROM finished by early-mid july. i would be willing to reasonably compensate anyone for time spent creating this and teaching me how to use it.

if this sounds like something you could help me with please reply here or PM me. i would be willing go into more detail over Skype, PM or email about this if need be.

tl;dr i need to make a ROM identical to rain warriors moon8 to create and play my own original albums off an nes.

thanks for reading and i hope this interests you!
Re: Need help making an nes ROM similar to MOON8
by on (#129374)
117 views and no interest? :( I hope I'm not asking too much, but I'm not really sure what kind of time/resources something like this would take, maybe someone can enlighten me?

I could really use help with this project. If there are any freelance NES developers interested please email me at: noisewaves@gmail.com. or reply here.

Thanks!
Re: Need help making an nes ROM similar to MOON8
by on (#129386)
What you're asking for is indeed fairly involved.

Just throwing this out there: it might make more sense to modify the PowerPak software to play multiple NSF files in sequence. That said, this is not a trivial task, either (but not impossible).
Re: Need help making an nes ROM similar to MOON8
by on (#129387)
A Famitracker NSF has a memory location that can be tested for the C00 event. Unfortunately, it also clears $4015, which will lead to a pop between tracks, though there is likely a $4011 = 0 in the init code somewhere as well. Though, I suppose that wouldn't be the hard part. Probably harder getting back to the ROM BIOS and finding the next file.

Using Famitracker's BIN export and rebuilding the player code from source is way easier, especially if you cut your tracks into segments that don't have to bankswitch.

The VRC6 requirement means you have to deal with the VRC6 banking scheme, but that's not really that tough.

I presume learning to program, and also learning to program on the NES, are going to be the sticking points. You can do both of these things, but there is a large time commitment. Get started right now. If you get to work on it, and start asking specific questions, a lot of people here would be happy to answer and help you through.


Anyhow, posts that are essentially "can somebody make something for me" don't tend to get a lot of response here. If you want us to be excited about it, maybe you should try to give us a reason to be excited for it. What are you making? You haven't shared anything about it at all. Alternatively, if you are looking to hire someone, this isn't a good job posting board in general, but even so, you haven't made any offer in that respect. Do you expect there to be a bunch of pro NES developers here who will chase down every possible job lead? That's not really what this scene is made of. It's amateurs having fun trying things out in their free time. There are small handfull here that could do it, maybe, but you haven't put anything on the table.
Re: Need help making an nes ROM similar to MOON8
by on (#129396)
rainwarrior wrote:
I presume learning to program, and also learning to program on the NES, are going to be the sticking points. You can do both of these things, but there is a large time commitment. Get started right now. If you get to work on it, and start asking specific questions, a lot of people here would be happy to answer and help you through.


While this is definitely my intention in the future, unfortunately right now I simply don't have the time to dedicate to it. Between a full time job, freelance work, and writing music, my time is pretty limited to dedicate to learning a new programming language. I'd be starting from square one and don't have the confidence that I could finish something like this before we leave for our tour next month.

With my bands new album coming out at the beginning of next month, and a tour following shortly thereafter, my main concern is writing and perfecting our live show. This is where my request for help with the rom really stems from.

Again, while I'm sure that saying "im a musician first" seems like a bit of a cop-out to some, please understand that its not meant as an blatant excuse or slight to those who do spend time doing this. I've been composing music for the NES using famitracker since early 2008, and in that time using separate .nsfs has sufficed for our live shows. However the first real need for a rom like the one im asking for has only come up recently as the songs I write have been getting lengthier and include interludes. I've really only realized that it is possible to make a sort of "gapless" album ROM after seeing rainwarriors work with MOON8 and more recently with the 2a03Puritains cart. Seeing these in action have really made it clear that it can be done.

rainwarrior wrote:
Anyhow, posts that are essentially "can somebody make something for me" don't tend to get a lot of response here. If you want us to be excited about it, maybe you should try to give us a reason to be excited for it. What are you making? You haven't shared anything about it at all. Alternatively, if you are looking to hire someone, this isn't a good job posting board in general, but even so, you haven't made any offer in that respect. Do you expect there to be a bunch of pro NES developers here who will chase down every possible job lead? That's not really what this scene is made of. It's amateurs having fun trying things out in their free time. There are small handfull here that could do it, maybe, but you haven't put anything on the table.


I guess I might not have been as clear as i could have in my initial post. So ill try my best to elaborate on it more. But first maybe I'd do well to talk a little bit about why I need it.

I'm in a band called Noisewaves. We've been involved in the chipmusic scene since early 2008 and have been playing live at events like Magfest, Blipfest, 8static, and Rochester Chip Fest since early 2011.

For the past three years I’ve been composing our newest album, which in my personal experience, has pushed the limits of what I’ve done so far with the NES musically and sonically.

In a way, our newest album is similar to Pink Floyd’s “Dark Side of the Moon” in that it’s almost one continuous piece of music. Intended to be listened to sequentially.

The reason for my request is that when we play live, we would like our set to be one continuous piece… e.g: no pauses in between songs. Just one long gapless set. However, the current (and only) way i know how to play my songs off an NES involve the use of separate .nsf files, which as you all know require loading and reloading, therefore causing pauses as well as an audible clicking. I would like to eliminate this entirely, and i know its possible after seeing rain warriors work.

I’ve tried using various other techniques involving programs like Vegaplay, as well as trying to combine ftm files in famitracker..however no matter what i try, i have never achieved the outcome I truly wanted.

I would also like to (once we have money) invest in releasing our album on actual NES carts as well.

This rom would serve a dual purpose:

It would allow me to construct various live set lists now and in the future
It would allow me to release this music on an actual cart


I hope that paints a better picture of what Im trying to do with this.

I reached out to this community because I honestly felt that it was something I could find help with here.

I’m not sure what else I can put on the table other than the fact that you would be helping a person who is passionate about how the NES can be used musically, achieve something that could change the way people look at chip music and variants.

I definitely don’t expect this type of work to be taken lightly and that is why I offered compensation, not because its a means to end, but because I honestly would want to pay someone for their time and tutoring. You have knowledge and skills that I don’t, but we are both passionate about the NES and what its capable of, therefore i figured it might be something the community could help me with.

That being said, i hope this clears things up. Please let me know if you can help, I would really appreciate it.
Re: Need help making an nes ROM similar to MOON8
by on (#129398)
This comes up so much, I made a re-usable chart:

Image

I do (non-sarcastically) wish you the best of luck with your project, and also think that learning 6502 asm is the quickest way to achieve something like this that you have complete control over.
Re: Need help making an nes ROM similar to MOON8
by on (#129400)
I'll try to help you find a solution involving combining multiple NSFs into one "multicart" of NSFs that you can play with the PowerPak's NSF player. But it'll work on a PowerPak only if two things are true: the NSFs are smaller than about 250,000 bytes put together, and no individual NSF needs bank switching.

Make NSFs of all the songs in your set. How big (in bytes) are all the NSFs put together? Is any of the NSFs bigger than 32000 bytes?
Re: Need help making an nes ROM similar to MOON8
by on (#129403)
In the past I've modified Famitracker's replay code to play multiple modules instead of sub-songs. It was for an older version (2.1), but probably works the same way. I could take a few minutes to do the same with the newest version.

OK, for whatever reason every NSF I build with v2.9 is silent (even before modifying it). Maybe it's my ca65 version (v2.13.9), I don't know. This is where a 5 minute project becomes a trip down the rabbit hole. But totally untested, here's the patch:

Code:
in driver.s, before this line:
; End of variable space
put:
ft_music_addr:          .res 2

in driver.s, after this part:
;ft_music_addr:
;   .word * + 2
;   .incbin "music.bin"         ; Music data

comment it out, and put this:
ftsong0:  .incbin "potential.bin"
ftsong1:  ;
ftsong2:  ;
ftsong3:  ;
ftsong4:  ;
ftsong5:
ftsong6:
ftsong7:
ftsong8:

ft_music_table:
        .word ftsong0
        .word ftsong1
        .word ftsong2
        .word ftsong3
        .word ftsong4
        .word ftsong5
        .word ftsong6
        .word ftsong7
        .word ftsong8

in init.s, after this:
ft_load_song:
        pha

put this:
        tay
        lda ft_music_table,y
        sta ft_music_addr
        lda ft_music_table+1,y
        sta ft_music_addr+1


- edit -

in nsf_wrap.s, at the top, add this:
RELOCATE_MUSIC = 1

in init.s, before this:
jsr ft_load_track

put this:
ldy #0



This is untested, it's a little cleaner than the mod I previously did to v2.1. (edit - tested now for v2.9, it works)

As for song changing, in player.s you could put the code in the ft_cmd_halt: routine, to increment the song on the halt command. Load the new number in A, be sure to set X to 0 or 1 (for NTSC/PAL), then JMP (not JSR) to the init routine. A while back I did hack just like that with Nerdtracker2, for Chibi-Tech, who used more patterns than it supported.

And obviously, you pretty quickly need bankswitching. Just add another table and use it like ft_music_table. I know this info isn't a lot of help to a non-programmer, but I'm kinda stuck since I can't test it.

edit: Added a couple more changes so the patch works properly.
Re: Need help making an nes ROM similar to MOON8
by on (#129408)
Memblers wrote:
OK, for whatever reason every NSF I build with v2.9 is silent (even before modifying it). Maybe it's my ca65 version (v2.13.9), I don't know. This is where a 5 minute project becomes a trip down the rabbit hole. But totally untested, here's the patch:

If you haven't, try defining this before the inclusion of driver.s:
RELOCATE_MUSIC = 1
Re: Need help making an nes ROM similar to MOON8
by on (#129420)
Aha, thanks! I added that at the top of nsf_wrap.s, and that fixed it. Now it works.

I have to run now, later tonight I'll try out the song auto-switching, should take just a few minutes.
Re: Need help making an nes ROM similar to MOON8
by on (#129422)
tepples wrote:
I'll try to help you find a solution involving combining multiple NSFs into one "multicart" of NSFs that you can play with the PowerPak's NSF player. But it'll work on a PowerPak only if two things are true: the NSFs are smaller than about 250,000 bytes put together, and no individual NSF needs bank switching.

Make NSFs of all the songs in your set. How big (in bytes) are all the NSFs put together? Is any of the NSFs bigger than 32000 bytes?


there are two nsfs that are bigger than 32000 bytes. combined my full nsf set is 261120 bytes. some of have bankswitching (according to the nsf export in famitracker) im not quite sure what causes bankswitching in the context of exporting nsf files.

im going to attach a zip file of my nsfs and ftm files for reference.

Attachment:
noisewaves_src_files.zip [179.41 KiB]
Downloaded 107 times
Re: Need help making an nes ROM similar to MOON8
by on (#129435)
If the target is just gapless playback on the PowerPak, probably the easiest thing to do would be combine your NSFs into a bigger one. The recent 2A03 Puritans release has some source code demonstrating how this can work. Place a player stub in RAM, and all you really need to do to the included NSFs is patch the bank switch writes to a new routine that adds an offset to the intended bank number. Just have your player stub watch for the halt variable set by C00 to switch tracks (and you probably want to patch out the $4015 write in the C00 code).

NSF would be easier because it supports the normal bank switching methods your NSFs are already using.

You're likely going to have to split this into two ROMs to get it to fit on a PowerPak (the PowerPak's NSF limit is less than 256k, and its VRC6 limit might be 256k unless it's implemented as oversize). Do you have a place for an intermission in the middle? This is another reason to use NSF instead of NES; you can back out of the NSF player and go to a new NSF without a reset.
Re: Need help making an nes ROM similar to MOON8
by on (#129441)
rainwarrior wrote:
If the target is just gapless playback on the PowerPak, probably the easiest thing to do would be combine your NSFs into a bigger one. The recent 2A03 Puritans release has some source code demonstrating how this can work. Place a player stub in RAM, and all you really need to do to the included NSFs is patch the bank switch writes to a new routine that adds an offset to the intended bank number. Just have your player stub watch for the halt variable set by C00 to switch tracks (and you probably want to patch out the $4015 write in the C00 code).

NSF would be easier because it supports the normal bank switching methods your NSFs are already using.

You're likely going to have to split this into two ROMs to get it to fit on a PowerPak (the PowerPak's NSF limit is less than 256k, and its VRC6 limit might be 256k unless it's implemented as oversize). Do you have a place for an intermission in the middle? This is another reason to use NSF instead of NES; you can back out of the NSF player and go to a new NSF without a reset.


this sounds like a viable option, and i have experimented with this type of method as a workaround using NSFImport.

but looking at the source for 2a03puritains it looks like you combined seperate nsfs into one from their source ftm files.

my method to achieve the "gapless" playback i want, would go something like this:

create ftm > export to nsf > use NSFimport to create new ftm > combine ftms in famitracker > export to nsf

it seems a bit convoluted to do this though and due to the nsf size limit, and instrument limit, i usually am only able to get around 4 songs to a given nsf file.

i see what youre saying though, for our live show it would more than likely have to be two seperate nsfs, with around 4-5 songs in each one. which isnt the biggest deal, however i would still like to work towards a rom.

would the source code from the 2a03puritains cart eliminate having to use NSFimport? that could be a big help.
Re: Need help making an nes ROM similar to MOON8
by on (#129444)
No, 2A03 Puritans did not merge FTMs. It merges NSFs.

I wouldn't recommend trying NSFImport to merge things. Your file size will bloat and you'll exceed your 256k limit very quickly.
Re: Need help making an nes ROM similar to MOON8
by on (#129454)
I updated my post so the patch actually works now. I forgot to force the modules to play the first track.

But I can't finish the job, because Famitracker won't create a .BIN file for songs that use bankswitching. The code now, using NSF bankswitching unfortunately, according the comments is paging pattern data at $B000-$BFFF. VRC6 pages $8000-$BFFF all together. Of course it's always still doable, it just means more changes are needed.

I could make one that plays all the non-bankswitched tracks, if that helps. I would need to know what order to put them in, unless you're wanting to build from the source.
Re: Need help making an nes ROM similar to MOON8
by on (#129465)
If you did it as an NSF instead of a VRC6 NES, you could just use NSF 4k bankswitching. You'd have less problems with fragmentation wasting space, too, and could probably get more to fit in a single file. The way I did for 2A03 puritans, you don't need to work with the Famitracker driver source or BIN export, you can just take the NSFs and patch a few bytes in it each to use an alternative bankswitching routine placed in RAM (or for the ones that don't bankswitch you don't need to patch that at all).