
The Raspberry Pi Has Revolutionized Emulation - dwaxe
https://blog.codinghorror.com/the-raspberry-pi-has-revolutionized-emulation/
======
windlep
I've had an arcade cabinet with a 9-year old computer in it that finally
failed the other day. I tried the Rasberry Pi route awhile ago, it does fine
on the oldest 80's MAME games, but has issues with most of the 90's era games
of which I'm still quite fond. And as others have noted, it's prolly going to
suck for NES/SNES emulation.

So when the arcade computer failed, I tried a different route. I realized my
main desktop computer (a Core i7-4790k) is plenty powerful to do some arcade
gaming on the side. A long VGA/USB/audio cable later, and my arcade is now
running directly off a VM from my desktop. This works so much better than
dealing with moving games on/off a SD card, and managing more physical things.
It's easy to manage the VM, snapshot it, and change the config without even
touching the arcade now.

With VT-d, PCI-passthrough, and the ridiculous amount of CPU cores everything
comes with that this should be a more normal thing in the future. It'd be
lovely to use those new multi-Gbit wireless standards instead of a cable
though...

~~~
deverton
Consider a Steam Link,
[http://store.steampowered.com/app/353380/](http://store.steampowered.com/app/353380/)
or similar system to mirror the content from your PC. It will handle sending
video/audio to your TV/arcade and sending the inputs back the desktop.

~~~
taneq
How much latency does one of these add? It might be fine on a modern cinematic
console shooter, but a large amount of the appeal of some old arcade games is
their frame-perfect timing. I can't imagine that's helped by adding a round
trip over the network, not to mention streaming the video back. That's gotta
add 2-3 frames' latency at the very least.

~~~
aallen90
The default settings have some noticeable latency (5-10ms), but changing the
video encoding from "balanced" to "fast" drop it down to almost nothing. You
can additionally plug the controller(s) into your PC to further remove any
input delay. I can't vouch for emulated arcade games, but it works
surprisingly well with a steam collection.

~~~
icelancer
Axiom Verge was unplayable on any settings I tried.

------
mrob
"Viewing angle and speed of refresh are rather critical for arcade machines,
and both are largely solved problems for LCDs at this point"

This is true, but not for the cheap IPS LCDs he advocates. The important point
is image persistence. Each frame is a sample of a single point in time. To
accurately represent motion it needs to be shown for as close to a single
point in time as possible. Most LCDs sample-and-hold, i.e. they set the pixel
and keep it there until the next frame. This results in blurring when your eye
tries to follow motion. See:

[http://www.blurbusters.com/faq/references/](http://www.blurbusters.com/faq/references/)

Modern gaming LCDs can strobe the image like a CRT, eliminating this blur. It
causes noticeable flicker at 60Hz, but it's the only way to get sharp looking
motion from these fixed framerate games (motion interpolation adds latency
which is no good for games).

~~~
speeder
I wish someone would ressurect crt or come up with similarly cheap tech.

I own lots of monitors, but after I tried my CRTs again recently, I fell in
love with them again, the image itself, and the motion is much better than any
flat panel that is affordable. (Also my CRTs aren't high end even! they were
medium range, or outright cheap when I bought them new, one is even 1024x768,
that now feels too small, but the image quality overall is soooo awesome...)

~~~
overcast
SED(Surface Conduction Electron Emitter Display) was what I was most excited
for, and it died before it got started. It's basically a matrix of tiny CRT
monitors.

[https://en.wikipedia.org/wiki/Surface-conduction_electron-
em...](https://en.wikipedia.org/wiki/Surface-conduction_electron-
emitter_display)

~~~
mrob
SED doesn't have the high quality motion of a CRT or a strobed LCD because
it's PWMed. You will either see ghost images trailing motion, or sample-and-
hold blur, depending on the PWM frequency.

------
corysama
I've long thought it would be interesting to make an education-oriented Game
Boy Advance clone to teach low-level programming. I.e: Base it on the expired
patent, but don't copy the copyrighted BIOS and don't bother being compatible
with commercial game ROMs.

The conflict is that it sure looks like sourcing everything but the SoC (case,
screen, controls, battery?) will cost more than a RasPi-like SoC capable of
emulating a GBA. At that point the question becomes, What's more valuable
inspiration-wise: Telling the kids "Your game is really running on the same
physical hardware as a GBA" or telling them "in addition to GBA, this device
can emulate a bunch of other devices and there's the whole RasPi ecosystem as
well" ?

Disclaimer: I know nothing at all about sourcing hardware.

~~~
inyorgroove
I think that pocket CHIP would fit most of your requirements:
[https://www.nextthing.co/pages/pocketchip](https://www.nextthing.co/pages/pocketchip)

~~~
mrob
It's not the same because the CPU is much faster than it needs to be for such
primitive sound and graphics. A major appeal of fixed hardware is coding close
to the metal to get the maximum performance out of it. The PocketCHIP is
supposed to be programmed in Lua, which you could do anywhere. With the GBA
you're probably going to learn assembly, and because it's ARM the skills will
be useful for many other things.

~~~
arm
There is the Arduboy¹, which is definitely a lot more primitive.

――――――

¹ —
[https://www.arduboy.com/store/products/arduboy](https://www.arduboy.com/store/products/arduboy)

~~~
corysama
Arduboy sure is cute. But, there tiny then there's really tiny! 2.5k of RAM in
the Arduboy is even smaller than I had in mind. I guess I'm thinking of
something between that and this [http://www.mouser.com/new/embedded-
solutions/display-modules...](http://www.mouser.com/new/embedded-
solutions/display-modules/4d-systems-picadillo-35T/n-6m71gZ2cn2ie)

------
ac29
> For a budget of $100 to $300 – maybe $500 if you want to get extra fancy –
> you can have a pretty great classic arcade and classic console emulation
> experience.

...if you are OK with pirating games. Its a bit odd that for the number of
times this article talks about how cheap and easy it is to get this setup
going, they kind of handwave away the fact that even old games are still
copyrighted with "Add additional ROMs and game images to taste."

~~~
intopieces
With no legal way to purchase most of the games on these systems -- and
certainly not in a way that the original creators would benefit -- most people
would be O.K. with pirating games.

~~~
_frog
A lot of these older classics that you'd probably want to emulate are actually
available in some form or other. For PS1/2 games, you can often purchase
inexpensive digital copies on the Playstation Store, and for older Nintendo
titles they offer digital copies through their Virtual Console service.

Additionally, just because a title isn't easily available for purchase, or
available through your desired channels, that doesn't magically invalidate
copyright.

~~~
intopieces
>A lot of these older classics that you'd probably want to emulate are
actually available in some form or other.

And emulation is the _reason_ those titles are available. Those titles are
being emulated on other systems. Without the games having been pirated to
begin with, the people sitting on the IP would have left them to rot. Piracy
is a demonstration of demand. Do you think the iTunes Music Store would have
come about without Napster?

>Additionally, just because a title isn't easily available for purchase, or
available through your desired channels, that doesn't magically invalidate
copyright.

"Information wants to be free." It doesn't invalidate the copyright, but it
certainly lowers the 'perceived harm' in the mind of the end-user.

And the copyright holders, thankfully, don't seem to be very attentive.
Coolroms and EmuParadise are still around, I was grabbing ROMs from there over
10 years ago.

~~~
_frog
I definitely agree that console emulation is a Good Thing from the standpoint
of preserving the history of the medium. Hell, I've been working on my own
Game Boy emulator in my spare time out of a mixture of technical curiosity and
preservationism.

I also agree that a large, driving force behind the development of these
emulators is the wider public's desire to easily play old games for free.

That said, it doesn't mean I condone the illegal redistribution of old games
to play on these emulators. The fact that it's easy and largely overlooked by
rights holders doesn't change the ethical equation for me.

~~~
Ntrails
> The fact that it's easy and largely overlooked by rights holders doesn't
> change the ethical equation for me

Which is fine, but ethics are essentially a personal thing. For example, I've
pirated things I own on non digital medium. Or heck, even things I own on DvD
because frankly double clicking 5 times is way more convenient than digging
out the disc and sitting through unskippable shitty intro warnings etc.

In neither of those cases am I within the law, but I'm ethically comfortable
with it. Similarly, I wouldn't feel bad using an emulator despite them
necessitating the pirating of games.

~~~
rahkiin
AFAIK you can make copies of your owned disks or rip them, legally, as long as
you don't distribute. So ripping a cd to listen to it is fine. Now instead of
ripping it, youngot yourself a copy online. You have already paid for the
material. (As long as you don't sell your physical media, that is).

At least, that is how it is in the Netherlands.

------
starik36
I've attempted to do this. It's not as simple as Jeff Atwood states.

For starters, there is a lot more tinkering and messing around than is
indicated in the article. You want to connect an old PS3 controller that's
sitting around? Great...prepare to spend 3-4 days messing around with config
file via SSH to get it just right. And even then, it fails intermittently and
works in some games, but not others.

Secondly, while some N64 games do emulate reasonably nicely, _most_ do not.
There are either audio issues, or video issues. And on and on. PSX and
Dreamcast games - I couldn't get those to work without lag at all.

~~~
_frog
Have you checked out RetroPie, the distribution mentioned in the article? In
my experience, using a PS3 controller with that consisted of connecting the
controller via a USB cable, selecting 'configure controller' from the main
menu, and mapping all the buttons. All in all that took maybe a minute or two.

~~~
gambiting
I've tried using RetroPie with the PS3 controller over bluetooth and it
works.....50% of the time. The problem is that when it doesn't, there's
literally nothing you can do, you have to log in through ssh and restart the
Pi, and it's _incredibly_ frustrating.

------
kerkeslager
If you're interested in emulation, The Internet Archive also has something
cool:
[https://archive.org/details/internetarcade](https://archive.org/details/internetarcade)

------
chrisguilbeau
I used a pi2 and an LCD I got off Craig's list to build an old Mac emulator
with Basillisk II and a lot of patience (took a while to get the right combo
of compile options, settings and display environment). It's relatively stable
and my 4 year old daughter has been playing kid pix, cosmic osmo and hello
kitty on it for a while now. It's also fun to see the after dark screen savers
when I go into her room.

------
Houshalter
Here's a possibly silly question. Is upscaling old games possible? In the past
I have seen papers on upscaling algorithms that do amazing things to old pixel
art and 8 bit sprites. Is it possible to run these in real time on something
like a pi?

I ask because the suggestion of using 1080p resolution or higher for this
sounded silly. But then I realized maybe it's not.

~~~
JonnieCache
The various hqxx algorithms are still there, personally I don't like the look
of them, but what's advanced a lot in recent times is TV emulation. A
programmer called blargg has released several NTSC filters which really make
games look how they did when you first played them, how they were intended to.
They've been integrated into many emulators.

Have a look at the screenshots, to me they look way more attractive than
traditional hq-style upscaling filters.

[http://slack.net/~ant/libs/ntsc.html](http://slack.net/~ant/libs/ntsc.html)

~~~
Aeolos
On the other hand, for anyone who grew up in a PAL region, these screenshots
look appalling. They look nothing at all like my SNES (which I still keep
connected to an old CRT TV.)

------
legooolas
One thing that's missing from a lot of arcade cab builds is that old games
often don't run at a 60Hz refresh rate, and so you get a strange jittery
effect as it has to skip or duplicate frames to display at 60Hz on normal LCD
monitors.

FreeSync/G-Sync makes a tremendous difference, but unfortunately does this to
the price as well :(

Edit: Or you can use a CRT :)

------
1hackaday
This is very neat. I want to have one, but don't want to have to assemble it.
Any ideas about where I can buy one already assembled? (I wouldn't mind, say,
paying a 20% surcharge over the prices mentioned in the article).

~~~
PostOnce
[http://shop.xgaming.com/](http://shop.xgaming.com/)

It's a joystick or a joystick+cabinet you plug a computer into, you could plug
a pi into it no problem. Or a more powerful computer. They sell one that has
no display, and you push it up in front of the TV when you want to play and
stash it away when you don't.

The joysticks are cheap but the cabinets arent. Plugs right into USB though,
easy.

------
fit2rule
While I think its true that the rPi has been good for arcade emulation as a
social phenomenon - i.e. the market has expanded drastically - I think its
disingenuous to think of the rPi as the main driver behind emulation becoming
mainstream. Devices such as the GP2X, Caanoo, GPH Wiz and Open Pandora gaming
consoles have contributed immensely to the subject of game emulation, and
these systems have been around far longer than the rPi - which did indeed
benefit from all the work done to make emulation work on these machines
previously (they use a similar class of device) ..

I know for sure that dynamic recompilation, which is key to the way emulators
gain the performance needed to run on these small machines, was well and truly
happening in the scene before the rPi came along.

In my opinion, the rPi just delivered the last 5% of the missing equation:
cheap, broad availability.

------
SmellyGeekBoy
Great article, but the tips about putting the Pi in a case and using heatsinks
seem at odds with each other - especially if the Pi is going to be safely
tucked away from danger inside some form of arcade cabinet. I just used self-
adhesive PCB risers with mine and stuck it to the inside of the cab.

~~~
codinghorror
Now that I have had more time to mess with my Pis, you have a point. It's a
solid 3 watts under load, when overclocking a bit more. I recommend a
20x20x15mm heatsink, and probably open air (I removed the top half of the
case) too.

The little heat sinks the cases bundle are better than nothing, for sure, but
get uncomfortable to touch under extended load. A bit more here

[https://discourse.codinghorror.com/t/the-raspberry-pi-has-
re...](https://discourse.codinghorror.com/t/the-raspberry-pi-has-
revolutionized-emulation/4462/31)

------
phreaky
I love my Raspberry Pi.

A few months ago, I started a project to convert my dad's barely used iCade
cabinet [1] into a full-fledged RetroPie cabinet.

I used a GPIO-to-USB converter (which allowed me to easily interact with the
buttons and joystick on my Raspberry Pi), a speaker with a 3.5mm line-out, and
a 7-inch screen I got off of Amazon.

Here's a video of it in action:
[https://youtu.be/EiNI2vXAomg](https://youtu.be/EiNI2vXAomg)

[1]
[http://www.ionaudio.com/products/details/icade](http://www.ionaudio.com/products/details/icade)

------
parski
I guess it depends on what you consider good enough. I use my gaming PC to
emulate and because it lets me use more accurate emulators and allows me to
configure them to my liking. Output the video to a CRT video monitor and it's
a fantastic authentic experience with liberties I could only dream of as a
child. Heck, I don't even get the frame drops that are present on original
hardware.

~~~
bitwize
_Heck, I don 't even get the frame drops that are present on original
hardware._

I hate that. It makes everything look too smooth and artificial. Frame drops
are essential to the retro gaming experience. Try comparing the original
release of _Shadow of the Colossus_ with its HD remake. It just isn't the same
without the frame drops, rendering jank, and texture and geometry pop-in.

The same goes for any modern "8 bit" "retro game" that doesn't start
flickering or dropping sprites when the sprites-per-scanline limit is
exceeded.

------
afro88
Does any RPi emulator do the nice slightly convex CRT emulation with
scanlines, colour bleeding etc?

For me this is a big part of it. The game art is designed for these effects,
and it kind of breaks the illusion if this isn't right (in a similar way to
low FPS or delayed sound).

~~~
codinghorror
Yes, see
[https://www.youtube.com/watch?v=SCqQ7ciCHcI](https://www.youtube.com/watch?v=SCqQ7ciCHcI)
for a demo! Check out the actual video simulation for the games. The bezels
are nice too :)

~~~
afro88
Awesome!!

------
pronoiac
This advice on displays made me laugh:

> Absolutely go as big as you can in the allowed form factor, though the Pi
> won't effectively use much more than a 1080p display maximum.

See, I just used a RetroPi to test a new tv, and the games I reached for were
very low res and extremely pixelated.

~~~
vinkelhake
While the old emulated games have low resolution, there is support for various
postprocessing options. There are many shaders that can be used to improve the
experience and these are run at a higher resolution.

The raspberry pis aren't fast enough for running the more advanced shaders in
1080@60Hz, but many simpler ones work well.

~~~
colejohnson66
What about the new Pi 3B? I know the 2B isn't fast enough for 1080@60, but is
the 3B any better?

~~~
happycube
3B has pretty much the same GPU (it might be upclocked), so shaders won't work
much better.

ARM really improved memory bandwidth from the A7 to A53 uncore bits, which
probably helps as much as the CPU speed bumps... at the cost of it running
quite a bit hotter.

I read an Anandtech article where they compared Samsung arm32 to arm64 chips,
and the benchmark differences were actually quite similar to Pi2->3.

------
clevernickname
I wonder what affiliate links Jeff Atwood is shilling this time.

------
Thaxll
Rasberry Pi are slow as hell and don't emulate recent consoles.

"Why Perfect Hardware SNES Emulation Requires a 3GHz CPU"
[http://www.tested.com/tech/gaming/2712-why-perfect-
hardware-...](http://www.tested.com/tech/gaming/2712-why-perfect-hardware-
snes-emulation-requires-a-3ghz-cpu/)

~~~
douche
They do a real good job on anything in the 16-bit generation (SNES, Genesis),
and handhelds up to the DS, at least in my experience.

I'm not playing anything twitchier than ChronoTrigger, though. I use my Pi to
play RPGs, primarily, although I've haven't seen any problems playing Genesis
fighting games like Mortal Kombat or Street Fighter.

~~~
tracker1
That pretty much covers most retro games I'd be interested in, tbh. For me,
what needs improvement is controller detection and (re)configuration.

~~~
ashark
Use Lakka instead of Retropie. 360 and PS3 controllers work great (plugged
in—Bluetooth remains, as in most applications other than actual game consoles,
a flaky PITA from what I've seen). I find the 360's dpad and face buttons
unacceptable for retro games, but some people are OK with it. PS3 controller's
pretty good. You shouldn't ever have a reason to mess with the mappings for
either of those under Lakka unless you disagree with the defaults (unlikely,
except maybe in MAME or something). Bonus for the PS3 controller is that the
Playstation button works to kick you back to Lakka's menu, while IIRC the
360's system button doesn't (not accessible as an ordinary input), so it saves
you having to use a button combo for that.

Lakka boots into Retroarch, which provides a unified I/O API to the "cores"
(emulators) compiled against it. Even if you do manually map, you should only
have to do it once.

~~~
tracker1
I bought 4 madcatz fight pads a few years ago for the purpose of retro gaming
(360 usb interface), single dpad with 2x3 buttons on top, and two shoulder
buttons... great layout for retro gaming. Since genesis and snes layout is a
subset in both cases. I tried a couple of the retropad (sega saturn layout),
but they were really cheaply built and didn't work or last long.

Spent a few hours last night playing with retroarch on windows, though will
have to change to config per core, so that the layout is correct in the
different cores.

