Need guidance with nes to snes.

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
creaothceann
Posts: 308
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: Need guidance with nes to snes.

Post by creaothceann » Sat Apr 03, 2021 10:25 am

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.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10

infidelity
Posts: 449
Joined: Fri Mar 01, 2013 4:46 am

Re: Need guidance with nes to snes.

Post by infidelity » Mon Apr 05, 2021 7:35 am

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.

Pokun
Posts: 1825
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Need guidance with nes to snes.

Post by Pokun » 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. :D

infidelity
Posts: 449
Joined: Fri Mar 01, 2013 4:46 am

Re: Need guidance with nes to snes.

Post by infidelity » Mon Apr 05, 2021 8:24 am

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. :D
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.

User avatar
dougeff
Posts: 2856
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Need guidance with nes to snes.

Post by dougeff » 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.


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.
nesdoug.com -- blog/tutorial on programming for the NES

infidelity
Posts: 449
Joined: Fri Mar 01, 2013 4:46 am

Re: Need guidance with nes to snes.

Post by infidelity » Mon Apr 05, 2021 8:47 am

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.

User avatar
dougeff
Posts: 2856
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Need guidance with nes to snes.

Post by dougeff » 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.
nesdoug.com -- blog/tutorial on programming for the NES

infidelity
Posts: 449
Joined: Fri Mar 01, 2013 4:46 am

Re: Need guidance with nes to snes.

Post by infidelity » Mon Apr 05, 2021 9:17 am

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.

creaothceann
Posts: 308
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: Need guidance with nes to snes.

Post by creaothceann » 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)
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10

93143
Posts: 1344
Joined: Fri Jul 04, 2014 9:31 pm

Re: Need guidance with nes to snes.

Post by 93143 » Mon Apr 05, 2021 12:21 pm

infidelity wrote:
Mon Apr 05, 2021 8:24 am
Question, 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.

infidelity
Posts: 449
Joined: Fri Mar 01, 2013 4:46 am

Re: Need guidance with nes to snes.

Post by infidelity » Tue Apr 06, 2021 2:40 am

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!

infidelity
Posts: 449
Joined: Fri Mar 01, 2013 4:46 am

Re: Need guidance with nes to snes.

Post by infidelity » Fri Apr 09, 2021 3:02 am

Question regarding MSU-1. Does that allow playback of sound files for the sfx in the game, not just the music?

creaothceann
Posts: 308
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: Need guidance with nes to snes.

Post by creaothceann » Fri Apr 09, 2021 3:50 am

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.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10

infidelity
Posts: 449
Joined: Fri Mar 01, 2013 4:46 am

Re: Need guidance with nes to snes.

Post by infidelity » Fri Apr 09, 2021 4:19 am

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.

93143
Posts: 1344
Joined: Fri Jul 04, 2014 9:31 pm

Re: Need guidance with nes to snes.

Post by 93143 » Fri Apr 09, 2021 7:47 pm

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.

Post Reply