Previous  1, 2, 3, 4  Next
MIST - FPGA emulation is the shit 
Author Message
User avatar

Joined: 2014-09-25 13:52
Posts: 8294
 Re: MIST - FPGA emulation is the shit
Quote:
Most people have a PC already for internet, school, and gaming use. Adding emulators to it costs nothing and takes up no further space or tv ports. Why spend thousands of dollars on really good knockoffs when you can just emulate on the PC you already need and have? I don't get it.


It usually comes down to having a strong distaste for latency.

And I don't doubt that ultra pro gamers exist where the added latency of a software emulator will cause them visible trouble playing games.

But I've said before and I'll say again, the latency is overrated by most people. I can beat the absolutely brutally hard as nails Ninja Gaiden in higan even with the worst-case scenario for latency (non-exclusive video mode, DirectSound, USB controller.) Going between hardware and the console, all it does is very slightly change when you are supposed to react. It takes about an hour or two to adjust after playing on a real console for a week or two.

But higan has gotten a lot better at latency. You can run Direct3D in fullscreen exclusive mode with an adaptive sync display, you can run ASIO or WASAPI exclusive (most of the time), you can get a monitor with a known low latency (lots of sites compare monitors on this) -- avoiding a built-in scaler really helps here, you can set your USB polling rate to 1000hz, and you'll be left with an extremely low latency.

Ignore the peanut gallery's comments. higan using more CPU resources isn't going to increase latency, unless your emulation speed drops below 100%. higan's input method is literally just-in-time and will poll the instant a game does, with a config-file adjustable lock to not poll again for X milliseconds, which prevents a homebrew ROM from deadlocking by performing a DMA against the input polling register (games only poll once every 16ms in practice.) There is no secret to lower latency in software emulation. Only random internet commenters offering no proof claiming there is.

The end result is really, truly responsive. Yes, FPGA driving a CRT directly, driving a speaker directly, and polling a shift-register classic gamepad directly would probably lower latency by another 30-40ms. But you're really not going to notice and it's not going to make you a much better gamer. The HDMI upscaled output that these things support is going to add latency, LCD displays used with HDMI is going to add latency, and I'm betting some sound buffering / filtering in them is going to add latency as well. So it's not going to be just as great as the old SNES in the '90s was, either.

I'm all for FPGA, and I think it's a really neat way to write a massively parallel emulator. But until we have powerful FPGA programmable chips in computers ubiquitously, I'll continue to feel they're not a solution. My software emulator reached at its peak, 100,000 users. Dolphin has reached many millions of users. How many people do you think will be running any given FPGA emulator? 10? 100? Maybe even 1000? How accurate is an emulator going to get with such a small userbase to report bugs in games? How is it going to get there when debugging on an FPGA is a thousand times harder than debugging software on a PC?

Again, this post isn't anti-FPGA. I'm all for it and welcome the developers working on them. Just explaining why I chose not to go that route personally, and that it's not a magic solution that results in a perfect SNES clone with zero latency.

_________________
What the hell's going on? Can someone tell me please?
Why I'm switching faster than the channels on TV.
I'm black, then I'm white. No, something isn't right.
My enemy's invisible, I don't know how to fight.


2017-08-17 09:18
User avatar

Joined: 2014-09-27 09:22
Posts: 5157
Location: A chair.
 Re: MIST - FPGA emulation is the shit
byuu wrote:
But I've said before and I'll say again, the latency is overrated by most people. I can beat the absolutely brutally hard as nails Ninja Gaiden in higan even with the worst-case scenario for latency (non-exclusive video mode, DirectSound, USB controller.) Going between hardware and the console, all it does is very slightly change when you are supposed to react. It takes about an hour or two to adjust after playing on a real console for a week or two.

Not to detract from your main point, which is well-taken, but this is a terrible example. For the most part, Ninja Gaiden is a rigid game with strict patterns. Latency has to get VERY bad before it affects such a game.
(It isn't to the point where you can play it blindfolded, like Super Mario, but it is pretty fixed.)

A more reflex-focused game would more rapidly demonstrate detrimental effects from latency., since it becomes less about adjusting your timing and more about actually having less time to respond.

_________________
Just in case you thought something could EVER be straightforward, and needed someone to dash your hopes across the rocky shoals of harsh reality.

; write !!!


2017-08-17 09:52
User avatar

Joined: 2014-09-25 13:52
Posts: 8294
 Re: MIST - FPGA emulation is the shit
What kind of hard as nails game is a good latency test?

I was able to hit second loop on Dodonpachi using a software emulator as well. Although to be fair, I don't own an arcade machine version to see if I can play better on it or not.

Anything in the SNES Japanese library? I don't mind giving it a try on my PVM-2530 SNES vs my PC.

_________________
What the hell's going on? Can someone tell me please?
Why I'm switching faster than the channels on TV.
I'm black, then I'm white. No, something isn't right.
My enemy's invisible, I don't know how to fight.


2017-08-17 09:53
User avatar

Joined: 2014-09-27 09:39
Posts: 2949
 Re: MIST - FPGA emulation is the shit
I have a coordination disorder. Added input latency affects everything I do.

A perfect SNES clone will have more latency than a perfect emulator. Not because of trickery, but because things on a perfect SNES clone will be done in "real time".

Right now, higan's audio sync system approximates this "real time" because it can cause the emulator to pause for syncing at any time. If you had a sufficiently low audio buffer period, it would buffer several times per frame, evenly spread out, making the emulator's latency act as though you're barely maintaining 60fps.

It would be ideal if it were changed so that it only syncs when the core tells it it's okay, i.e. right after presenting a full video frame or right before the first time the game polls for input after presenting video. That's not an option for most audio backends, but it would be 100% possible for WASAPI.


2017-08-17 12:12

Joined: 2014-09-27 09:29
Posts: 719
 Re: MIST - FPGA emulation is the shit
byuu wrote:
Anything in the SNES Japanese library? I don't mind giving it a try on my PVM-2530 SNES vs my PC.
I don't know of anything in the SNES library but apparently the delays between Mike Tyson's punches are completely random, so everything needs to be done on reaction, and it happens right on the edge of normal human reaction thresholds. If you stack on 30-40 ms of latency--which really isn't that much!--it pushes the reaction window below that threshold.

It would be pretty easy, I guess, to write an SNES homebrew that shows a color (e.g., a fully red screen) and then randomly changes color (e.g., green) and then measures the number of milliseconds or vblanks or whatever between the color change and the player pressing a button.

^^this is how I wish the 240p test suite's manual lag test worked. The current test is essentially useless because you can (and unconsciously will) anticipate the prompt.


2017-08-18 00:16
User avatar

Joined: 2014-09-27 09:22
Posts: 5157
Location: A chair.
 Re: MIST - FPGA emulation is the shit
hunterk wrote:
byuu wrote:
Anything in the SNES Japanese library? I don't mind giving it a try on my PVM-2530 SNES vs my PC.
I don't know of anything in the SNES library but apparently the delays between Mike Tyson's punches are completely random, so everything needs to be done on reaction, and it happens right on the edge of normal human reaction thresholds. If you stack on 30-40 ms of latency--which really isn't that much!--it pushes the reaction window below that threshold.

It would be pretty easy, I guess, to write an SNES homebrew that shows a color (e.g., a fully red screen) and then randomly changes color (e.g., green) and then measures the number of milliseconds or vblanks or whatever between the color change and the player pressing a button.

^^this is how I wish the 240p test suite's manual lag test worked. The current test is essentially useless because you can (and unconsciously will) anticipate the prompt.

Thanks for an example.

I am not disputing byuu's point that it doesn't matter for most people. Just saying a rigid pattern-based game isn't a good example, because it IS predictable and compensatable. You know the bat is coming even if it isn't onscreen yet.

I'd probably lean towards Super Aleste as a Super Famicom test. Compile shooters tend to be less rigid. (US got it as Space Megaforce)
Though I'd rather fall to the 8-bit Nintendo and throw out Zanac. That game gets ANGRY, and content is highly dependant on gameplay.
Edit: Scratch that. Super Aleste is one of Compile's worse shooters. Crowded and lacks much of the excitement or fun of most Aleste games, or Zanac games, or even Blazing Lazers. 'S like they were taking the day off when that one came out.

_________________
Just in case you thought something could EVER be straightforward, and needed someone to dash your hopes across the rocky shoals of harsh reality.

; write !!!


2017-08-18 04:14

Joined: 2014-10-29 20:54
Posts: 48
 Re: MIST - FPGA emulation is the shit
FitzRoy wrote:
Quote:
But, what if we, instead of software emulation... Do actual hardware emulation using an FPGA chip?


I don't see how FPGA guarantees perfection. Have you looked at jwdonal's thread? It's a progression of adding features and fixing bugs, just like an emulator. He'll mass produce it and little errors will pop up once in a while just like every other emulator.

Most people have a PC already for internet, school, and gaming use. Adding emulators to it costs nothing and takes up no further space or tv ports. Why spend thousands of dollars on really good knockoffs when you can just emulate on the PC you already need and have? I don't get it.


Yeah, you are correct in that the FPGA does not in any way *guarantee* perfection. Heck, even such a thing as having a new revision board with 0.3mm copper wires instead of 0.4mm cause latency issues, though far too small to be noticed.

However, if you *know* how these chips work, you can re-create them in an FPGA. Not only that, but with a couple of seconds delay, you can burn another chip design to the FPGA, or several cores for that matter... And it will behave pretty much exactly as the hardware would - for a fraction of the power and utilization done by a CPU. This is really nice for mobile devices. Imagine 2 weeks of play time on your Android phone, that's what this baby *could* do if one would let it.

But, yeah, still much of a research area, this one - e.g. no practical benefits yet, except "Ooooh shiny!"...


2017-08-20 22:53
User avatar

Joined: 2014-09-27 09:23
Posts: 2201
Location: Germany
 Re: MIST - FPGA emulation is the shit
wertigon wrote:
However, if you *know* how these chips work

Let's do a kickstarter for 5A22/PPU/APU decapping, scanning & reconstruction then.

_________________
My setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → Multi Out to SCART cable → EuroSCART to Mini cable → Framemeister (with Firebrandx' profiles) → AVerMedia Live Gamer Extreme capture unit → RECentral 4 viewing/recording software


2017-08-20 23:40
User avatar

Joined: 2014-09-27 09:27
Posts: 1222
 Re: MIST - FPGA emulation is the shit
byuu wrote:
It usually comes down to having a strong distaste for latency.


But a real SNES shares that attribute. So really, it just sounds like these people want an SNES clone with HDMI out. Modding an SNES to output HDMI is apparently much harder than NES.

_________________
GB/GBA Buglist for Higan 103r26


2017-08-21 08:15
User avatar

Joined: 2014-09-27 09:22
Posts: 5157
Location: A chair.
 Re: MIST - FPGA emulation is the shit
FitzRoy wrote:
byuu wrote:
It usually comes down to having a strong distaste for latency.


But a real SNES shares that attribute. So really, it just sounds like these people want an SNES clone with HDMI out. Modding an SNES to output HDMI is apparently much harder than NES.

The solutions are still the same: clone and replace the graphics subsystem, or use a lame-o upconverter.
It just happens that cloning the Super Nintendo's graphics subsystem is a lot harder. On the upside, it generates a more useful signal for lame-o upconverters since it outputs RGB instead of a janky sort-of-like-NTSC.

_________________
Just in case you thought something could EVER be straightforward, and needed someone to dash your hopes across the rocky shoals of harsh reality.

; write !!!


2017-08-21 08:47
Previous  1, 2, 3, 4  Next