Need sound help emulating NES on 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.
Erockbrox
Posts: 342
Joined: Sun Nov 23, 2014 12:16 pm

Re: Need sound help emulating NES on SNES

Post by Erockbrox » Sun Mar 01, 2020 11:27 pm

This is a very cool and useful idea.

Since I have my SNES hooked up to my CRT via an S-video cable, I basically use my SNES for everything.

Here were some ideas that I had:

If the SNES bare can't do it, then the SA-1 probably can. SA-1 has come a long way recently.

Also with the SD2SNES, you could literally, re-create an NES with the FPGA. And now there is an SD2SNES Pro with even a more powerful FPGA.

But yeah, an NES emulator would be great.

calima
Posts: 1126
Joined: Tue Oct 06, 2015 10:16 am

Re: Need sound help emulating NES on SNES

Post by calima » Mon Mar 02, 2020 12:22 am

This is static recompiling, not a generic emulator. Then any cart-side thing would run into the "why can't I do a Super GBC", not enough DMA BW. Aka SNES is not going to emulate NES except in very limited cases and with preprocessing.

lidnariq
Posts: 9403
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Need sound help emulating NES on SNES

Post by lidnariq » Mon Mar 02, 2020 1:53 am

Erockbrox wrote:
Sun Mar 01, 2020 11:27 pm
Also with the SD2SNES, you could literally, re-create an NES with the FPGA. And now there is an SD2SNES Pro with even a more powerful FPGA.
I really don't see any point in doing this on the SD2SNES? We already have at least one FPGA console designed for this (e.g. MiSTer), and as Calima points out, there are major bandwidth problems preventing DMA of enough of the NES's video. (There's just barely enough bandwidth for the Super GameBoy's 160x144x2bpp data in a 224-scanline NTSC SNES. There's just enough time to upload 188 scanlines if the rest is forced blank, with no color or sprite information )

For the subset of games where you can get away with leaving the patterns in the SNES PPU's VRAM, the "only" problems remaining are translating from the NES's nametable encoding to the SNES's, and the different OAM order. (YTAX vs XYTa; attribute byte also differs in exact meaning). At that point, the FPGA can't contribute that much, and it's a much more interesting problem to address using just the plain SNES's CPU (or maybe one of the original cart coprocessors)

Myself086
Posts: 21
Joined: Sat Nov 10, 2018 2:49 pm

Re: Need sound help emulating NES on SNES

Post by Myself086 » Wed Mar 11, 2020 9:15 am

I'm having trouble understanding the sweep for square channels. Charging a sword in Crystalis should produce a rising sweep but instead it stays at the initial frequency. Here are the values written while the sweep should be going on:
[$4004] = $00
[$4005] = $0A
[$4006] = $00
[$4007] = $08

I am using Memblers' code because it is much closer to what I need. It seems to support sweep but the "enabled" flag is turned off in the example above.


Side note, the intro for Super Mario Bros 3 started running on February 29th. This game heavily uses the DMC but I don't think I'm ready to support it anytime soon.
Erockbrox wrote:
Sun Mar 01, 2020 11:27 pm
If the SNES bare can't do it, then the SA-1 probably can. SA-1 has come a long way recently.
I can see some games or mappers being too tricky to emulate at full speed. There's still room for optimization without a co-processor so I'll keep SA-1 in mind for when the time saves are too thin to matter.

Post Reply