Page 13 of 23
Re: Need guidance with nes to snes.
Posted: Sat Apr 03, 2021 10:25 am
by creaothceann
infidelity wrote: ↑Sat Apr 03, 2021 5:56 am
I was fully prepared for things like this to pop up, since jts a double whammy of being new to snes, and doing a port as well.
It's not a bad thing, since the best way to learn something is to already have a definitive goal.
Re: Need guidance with nes to snes.
Posted: Mon Apr 05, 2021 7:35 am
by infidelity
Alright, I'm feeling pretty good. With all my attribute coding I did for my copyright screen, the next screen to appear is the developer's logo, and the tile construction was correct, the attributes were correct from 32x32 down to 8x8, the chr data was correct, and the CGRAM was correct. So happy with what I've got going on.
The next thing is the sound engine. What I'll probably end up doing for now, until I have the game running 100%, is bypass the games sound engine and work on it later. Cause I was poking around an snes title to see how it works with the APU and wow that's crazy.
Again I'm coming from working with nes roms since '04, and I now have to learn how a sound engine is copied from rom and injected into the APU.
I've seen some documents explaining specific writes need to be done to $2140-43, and within the APU I've seen where this particular game stores its sfx, and where it always swaps out the current bgm.
Again all this I'm probably going to hold off till the end of the port, cause this can easily get me mentally sidetracked.
Re: Need guidance with nes to snes.
Posted: Mon Apr 05, 2021 8:16 am
by Pokun
Heh, at least you don't have to look for an SPC700 assembler since you do everything manually anyway.

Re: Need guidance with nes to snes.
Posted: Mon Apr 05, 2021 8:24 am
by infidelity
Pokun wrote: ↑Mon Apr 05, 2021 8:16 am
Heh, at least you don't have to look for an SPC700 assembler since you do everything manually anyway.
That's true, heh
Question, I'm using wram from 7E:0000-1FFF, is 2000 and onward available for wram as well? I read the SNES use 128kb.
Re: Need guidance with nes to snes.
Posted: Mon Apr 05, 2021 8:42 am
by dougeff
To be honest, you will probably need to find someone else to transcribe all the music to a format that works for SNES.
Option 1, use samples of NES audio (square, triangle, and noise).
Option 2, use SNES style samples, which can sound like real instruments (piano, trumpet, guitar, etc)
I feel that the best sample rate (quality vs compression) is 16000 Hz.
But, you should think about this stuff much later.
Another option. MSU1. It's sort of a fictional chip that plays MP3 files. Lots of emulators will play MP3 files along side the game.
Your other question. If the Data Bank is set to 7e, then any reads and writes 0000-ffff will get the first half of WRAM. If data bank is 7f, the second half. You can also use long addressing modes to access these.
Re: Need guidance with nes to snes.
Posted: Mon Apr 05, 2021 8:47 am
by infidelity
dougeff wrote: ↑Mon Apr 05, 2021 8:42 am
To be honest, you will probably need to find someone else to transcribe all the music to a format that works for SNES.
Option 1, use samples of NES audio (square, triangle, and noise).
Option 2, use SNES style samples, which can sound like real instruments (piano, trumpet, guitar, etc)
I feel that the best sample rate (quality vs compression) is 16000 Hz.
But, you should think about this stuff much later.
Another option. MSU1. It's sort of a fictional chip that plays MP3 files. Lots of emulators will play MP3 files along side the game.
Without giving too much away, I'm implementing a sound engine from an snes game, that's an enhanced version of a sound engine I've worked with on the nes side for the past 15 years, the music & sfx will work with the snes sound engine, some commands are the same, some have changed, but the fact that the notes and pauses can be used with this engine is huge, I'll just need to change some pointer addresses and loop commands.
As for MSU-1, it's a pretty big reason why I'm doing what I'm doing. But I gotta crawl first before I go off sprinting.
Re: Need guidance with nes to snes.
Posted: Mon Apr 05, 2021 9:06 am
by dougeff
MSU1 was an option to make things easier, not harder. You would just have a recording of the NES music, and play it on a loop. (and skip the SPC sound engine).
But it sounds like you want to write your own SPC code, so you can ignore the MSU1 suggestion.
Re: Need guidance with nes to snes.
Posted: Mon Apr 05, 2021 9:17 am
by infidelity
dougeff wrote: ↑Mon Apr 05, 2021 9:06 am
MSU1 was an option to make things easier, not harder. You would just have a recording of the NES music, and play it on a loop. (and skip the SPC sound engine).
But it sounds like you want to write your own SPC code, so you can ignore the MSU1 suggestion.
The port I'm doing will contain it's original nes compositions. In regards to MSU-1, I plan on adding an enhanced soundtrack to accompany the port. That's what I was getting at.
Btw, thank you on the wram info, I've got all of 7E:0000-FFFF & 7F:0000-FFFF cleared out from my snes init routine. This kinda makes me sad I'm realizing this size now, i could've easily just swapped out level data to this region at a fixated address, heh. Oh well.
Re: Need guidance with nes to snes.
Posted: Mon Apr 05, 2021 12:16 pm
by creaothceann
dougeff wrote: ↑Mon Apr 05, 2021 8:42 am
Another option. MSU1. It's sort of a fictional chip that plays MP3 files. Lots of emulators will play MP3 files along side the game.
Afaik PCM files with a special header. (@infidelity: MSU1 is also implemented in the SD2SNES cartridge)
Re: Need guidance with nes to snes.
Posted: Mon Apr 05, 2021 12:21 pm
by 93143
infidelity wrote: ↑Mon Apr 05, 2021 8:24 amQuestion, I'm using wram from 7E:0000-1FFF
Just in case you missed it, that area of WRAM is mirrored in the bottom of every bank from $00-$3F and from $80 to $BF. This makes it easy to access without using long addressing when you also want easy access to other stuff that isn't in $7E (MMIO, tables in ROM, etc.). It also means that direct page can be in WRAM, which would otherwise be impossible as it is locked to bank $00.
Re: Need guidance with nes to snes.
Posted: Tue Apr 06, 2021 2:40 am
by infidelity
creaothceann wrote: ↑Mon Apr 05, 2021 12:16 pm
dougeff wrote: ↑Mon Apr 05, 2021 8:42 am
Another option. MSU1. It's sort of a fictional chip that plays MP3 files. Lots of emulators will play MP3 files along side the game.
Afaik PCM files with a special header. (@infidelity: MSU1 is also implemented in the SD2SNES cartridge)
Ive owned the rev h version of SD2SNES since 2016, love it!
@93143, thanks for that info!
Re: Need guidance with nes to snes.
Posted: Fri Apr 09, 2021 3:02 am
by infidelity
Question regarding MSU-1. Does that allow playback of sound files for the sfx in the game, not just the music?
Re: Need guidance with nes to snes.
Posted: Fri Apr 09, 2021 3:50 am
by creaothceann
It doesn't care what the sounds you play back are, could be music or sfx. You can only play one track at a time though.
Re: Need guidance with nes to snes.
Posted: Fri Apr 09, 2021 4:19 am
by infidelity
So I take that as a no, I cant have a piece of bgm playing, while loading up a sfx when called upon from code.
Re: Need guidance with nes to snes.
Posted: Fri Apr 09, 2021 7:47 pm
by 93143
That's correct. The inventor wanted it to have multichannel capability, but found that it would be too complicated. The audio module in the SNES can produce sound effects while the MSU1 is playing music, but the MSU1 itself cannot.