Introducing the VeriSNES (FPGA-based SNES)

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
magno
Posts: 193
Joined: Tue Aug 15, 2006 5:23 am
Location: Spain
Contact:

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by magno »

jwdonal wrote:Performance enhancements would certainly be possible since the hardware is fully programmable but the real question is what games would use them? The answer is none - at least not any official ones anyway. So while it's a cool thing to think about, there would really be no point in doing it.
That's not exactly true: Treasure Hunter G has a DMA queue which allows some DMA transfers be delayed to next NMI if there is no more VBlank time left. If DMA could execute faster than the original SNES, then we could measure improves in all games than implements such a queue (I guess THG isn't the only one).
And the same with FIFO-buffered accesses to $2140/41/42 to send samples to APU. Most games use this scheme to send samples, so buffering acceses could reduce the latency to the most: each time SNES CPU puts a byte into $2140, it is buffered so it is acknowledged inmediately from the APU (FIFO) side. This, again, reduces CPU load and increased performance could be measured.

Besides, it could be used for new homebrew development, which would be nice :D
User avatar
jwdonal
Posts: 719
Joined: Sat Jun 27, 2009 11:05 pm
Location: New Mexico, USA
Contact:

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by jwdonal »

Interesting... didn't know about those.

Certainly for some games that are horribly slow, like StarFox for example, some performance improvements that could be optionally enabled/disabled would be worth looking into.
User avatar
jwdonal
Posts: 719
Joined: Sat Jun 27, 2009 11:05 pm
Location: New Mexico, USA
Contact:

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by jwdonal »

Next progress update.

Mode 7...'nuff said. ;)

https://youtu.be/c8r58jAwWRw
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by Oziphantom »

Question?

Since the 65816 doesn't have the NMOS vs CMOS issues we have on other devices and the SNES uses a stock 65816. Why not just use a modern 65816 chip they you can get for $9 from WDC, and free up space on the FPGA, or shrink the FPGA to save costs? You might be able to fit two 65816s on the board and then put the SA-1 extras in the gap in the FPGA to emulate the SA-1 modes.
Kismet
Posts: 60
Joined: Wed Nov 30, 2016 9:59 pm

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by Kismet »

Oziphantom wrote:Question?

Since the 65816 doesn't have the NMOS vs CMOS issues we have on other devices and the SNES uses a stock 65816. Why not just use a modern 65816 chip they you can get for $9 from WDC, and free up space on the FPGA, or shrink the FPGA to save costs? You might be able to fit two 65816s on the board and then put the SA-1 extras in the gap in the FPGA to emulate the SA-1 modes.
I suspect it's a combination of:
1. That defeats the purpose of emulating it accurately (what bugs may have been fixed in a new core?, What bugs need to exist?)
2. Voltage issues.
3. If you license the actual CPU core used in the SNES, you make the project's legality questionable since licensed cores can't be redistributed (NDA contract and all.) At least one previous FPGA-SNES attempt by another party used licensed a WDC core.
(All patents on SNES hardware should have expired between 2011 and 2014)

But for now he's developing it on a $600 FPGA development board. If at some point someone wants to try building a SNES using a mixture of old and new parts, they could try that, but you're basically looking at multiple problems that need to be solved before it even gets there, that's why it makes more sense to just build the CPU core to spec in the first place on the FPGA.

There are different goals when you want to emulate the device accurately, versus cheaply. Cheap is why you get clones that damage your cartridges and don't work with expansion chip games.

* The SNES has some kind of memory-mapped multiply-divide, which means that likely complicates using an off-the-shelf 65816, but someone who actually knows how it works would know better
I come from the net. Through systems, peoples and cities to this place.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by tepples »

It wouldn't matter, as the Super NES also has a DMA unit. Both are memory mapped I/O, and both would need to be in a custom memory controller in any clone, whether the 65816 is integrated or not.
93143
Posts: 1717
Joined: Fri Jul 04, 2014 9:31 pm

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by 93143 »

Yeah, the S-CPU has a lot of custom stuff on it. I assume you could mod a standard 65816 into a 5A22 via FPGA wizardry, but it seems like it might be better to just do the whole thing on the FPGA.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by tepples »

The extra stuff is analogous to a memory controller hub. I agree that it's probably more convenient when assembling the system to put everything, including the 65816, into the FPGA. But assuming compatible voltages, you can use a discrete 65816 during development and then just reimplement the memory controller part in the FPGA until you finish cloning the 65816.
User avatar
jwdonal
Posts: 719
Joined: Sat Jun 27, 2009 11:05 pm
Location: New Mexico, USA
Contact:

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by jwdonal »

A strange new source file for the VeriSNES just appeared on my computer...what on Earth could it mean?? :lol:
spr_fetch.PNG
spr_fetch.PNG (1.71 KiB) Viewed 6020 times
ccovell
Posts: 1045
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by ccovell »

jwdonal wrote:A strange new source file for the VeriSNES just appeared on my computer...what on Earth could it mean?? :lol:
spr_fetch.PNG
You programmed it up in a coke-induced frenzy, passed out on the keyboard, and you don't remember a bit of it this morning? :D
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by tepples »

I guess Coke makes Sprite in more than one way.

Image
330 mL
- Photo by Emilian Robert Vicol
syboxez
Posts: 32
Joined: Tue Mar 01, 2016 8:22 pm

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by syboxez »

jwdonal wrote:A strange new source file for the VeriSNES just appeared on my computer...what on Earth could it mean?? :lol:
spr_fetch.PNG
Honestly, I have no idea why you're so excited about adding lemon-lime flavored soft drinks into your FPGA SNES.

7-Up just makes no sense to put on an FPGA.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by lidnariq »

syboxez wrote:7-Up just makes no sense to put on an FPGA.
They wanted to experiment with bubble memory.

(I'll see myself out)
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by tepples »

syboxez wrote:7-Up just makes no sense to put on an FPGA.
Image
David Perry disagreed
KungFuFurby
Posts: 275
Joined: Wed Jul 09, 2008 8:46 pm

Re: Introducing the VeriSNES (FPGA-based SNES)

Post by KungFuFurby »

jwdonal wrote:A strange new source file for the VeriSNES just appeared on my computer...what on Earth could it mean?? :lol:
spr_fetch.PNG
Pun aside, I'm guessing you have a new routine that fetches the sprite data from VRAM and OAM to hardware timing standards (at least what you could measure).
Post Reply