Jump to content
Dr. Getter

Emulation Machine Project

Recommended Posts

Right guys, this is the main reason why I joined the forum. Roughly, my plan is to take a Raspberry Pi, get the OS, get Stella and a bunch of 2600 games, get the necessary cables, controllers and adapters, and put all of that together. This should be fun.

 

For the ones that don't know me, I'm a new member, didn't grow up with any classic console but I love classic games. I bought an Atari Flashback 3 two years ago, and recently I bought the game collection called Atari Vault on Steam. But I want to do these games justice, that's why I thought about starting this little project. I'm sure I'm not the first one who has attempted to do a similar thing, I'd appreciate it if you could share your knowledge and help me in this endeavour.

 

No haste though. In fact, I think I'll buy most of the stuff in Fall, since I'm a little busy at the moment. For now, just point me to any thread that I might find interesting and/or useful, please. I'll do the learning bit first, hehe.

 

 

 

Let's rock! :cool:

  • Like 1

Share this post


Link to post
Share on other sites

I've heard about Retropie. But I kinda want to keep it for another project.. another time, maybe. I really want to start with a Stella-only machine, even if that probably doesn't make sense to many of you, sorry :P that way I'll be more focused.

Share this post


Link to post
Share on other sites

Have you thought about just doing Stella on the PC?

 

And why did you choose emulation as the vehicle for getting going with classic gaming?

(Pssstt.. don't tell anyone, but I need more fodder for my evangelical preachings about why emulation is king!)

Edited by Keatah

Share this post


Link to post
Share on other sites

Have you thought about just doing Stella on the PC?

 

And why did you choose emulation as the vehicle for getting going with classic gaming?

 

I actually did try Stella a few years ago on my pc, I love that emulator. It's so.. neat? I guess? It looks polished, and it works very, very well. Oh, and I forgot to mention this in the first post, but my pc is going to bite the dust relatively soon, I'm afraid. Apparently the graphics card has some problems, and this is a laptop so there's not much I can do about it. One day the screen will stay black and that'll be it. Might take some weeks, some months or even years, I don't know. I just know that my pc won't last forever.

 

Which is why I thought of the Raspberry Pi. It is a simple machine (well, compared to a regular pc at least) and it should also be reliable. And even if it isn't, it's not very expensive, so it's pretty much what I'm looking for. I'd make back ups of the game library on muliple SD cards and/or USB drives, just to be safe. I want to be able to play on the thing years, maybe even decades from now, so I think the Raspberry Pi is the better solution. I mean, even if the Pi broke down, I'd just have to buy another one, pretty inexpensive. If the SD card failed, I'd just take the back up one and pop it in, no problem.

 

Now, why did I choose emulation instead of going the purist route? The short answer is that I'm not a purist, hehe. In my opinion, unless you're doing so for nostalgia, there's no reason to buy an old (in this case, very old) system. Components slowly degrade overtime, there's going to be less and less copies in working condition the more time passes, that means that remaining ones are going to be more and more expensive.. same goes for the games, many are still "cheap" and easy to find, but what about the rarer ones? As Frank Cifaldi said, these games are out of print, and have been out of print for many years now. If there were ways to purchase new, even digital copies of these games I'd do so. In fact, I kinda already did, but take for instance Atari Vault on Steam. It contains 100 or so games, almost all of them for the Atari 2600. And they're all games made by Atari, I think. No 3rd party. No Activision games, no Imagic games, no (lol) Mystique games. I see emulation not just as a way of reliving the past, but also of preserving it.

Share this post


Link to post
Share on other sites

I've heard about Retropie. But I kinda want to keep it for another project.. another time, maybe. I really want to start with a Stella-only machine, even if that probably doesn't make sense to many of you, sorry :P that way I'll be more focused.

The latest version of Retropie doesn't have the default emulators show up like past versions and only shows the ones that you dropped in ROM's for. So, if you only drop in Atari 2600 ROM's then Stella is all you will see. To cover the ROM's part you can go here to download all of the original games in one download: http://www.atarimania.com/rom_collection_archive_atari_2600_roms.html

 

Edit: Also, since it sounds like your PC may kick the bucket then you could have one SD card for Retropie, one for Raspbian, one for OSMC, one for Chromium OS, one for Android, etc. to switch out like cartridges for different needs to cover some of the things you would lack while between PC's.

Share this post


Link to post
Share on other sites

Since it sounds like your PC may kick the bucket then you could have one SD card for Retropie, one for Raspbian, one for OSMC, one for Chromium OS, one for Android, etc. to switch out like cartridges for different needs to cover some of the things you would lack while between PC's.

 

I do have a tablet though, and we also have a "family laptop" so I'm covered as far as basic needs and internet navigation go.

 

Ehh, don't worry about the RetroPie, cause I know I'll tackle that too sooner or later. Seems too handy to be ignored, hehe.

Share this post


Link to post
Share on other sites

Which is why I thought of the Raspberry Pi. It is a simple machine (well, compared to a regular pc at least) and it should also be reliable. And even if it isn't, it's not very expensive, so it's pretty much what I'm looking for. I'd make back ups of the game library on muliple SD cards and/or USB drives, just to be safe. I want to be able to play on the thing years, maybe even decades from now, so I think the Raspberry Pi is the better solution. I mean, even if the Pi broke down, I'd just have to buy another one, pretty inexpensive. If the SD card failed, I'd just take the back up one and pop it in, no problem.

 

 

 

There's an AtariAge regular here who goes by "ByteKnight" and he puts Raspberry Pi units into Flashback consoles and makes them "Ultimate Flashback" units. He has done Intellivision, ColecoVision, and Atari, and they include the adapters to run USB or Flashback controllers as well. For $160 it seems like a good deal to me -- just ship him a Flashback console and he does everything else, including return shipping. I'll leave the forum search to you, but everyone who has done this seems happy with his work. I'm tempted but haven't done it myself (don't spend much time in front of TV, prefer handhelds).

Share this post


Link to post
Share on other sites

 

 

There's an AtariAge regular here who goes by "ByteKnight" and he puts Raspberry Pi units into Flashback consoles and makes them "Ultimate Flashback" units.

 

Thanks Flojo, I'll be sure to check his work out. But I don't want to use my Flashback 3's case, for aesthetic reasons: I already know, approximately, how I want the machine to look like. I think I'll have the case 3D-printed, not bigger than the Pi itself, and it'll have to look like a 6-switch model (not the one with the rounded front edge though, the one with the straight one) it will have less ridges on the top, it won't have controller sockets, no cartridge port, which means the gaps between the 6 fake switches will all be the same, and it'll just have openings where they need to be (USBs, power, HDMI.. in fact, I think those 3 are enough). I want it to look familiar, yet strange at the same time.

 

And the Flashback 3 just won't do. I don't mind the size, but I don't like the front, and the buttons are.. don't know how to feel about them. They lack simmetry and the B-W/Color one is missing. Thanks anyway.

Share this post


Link to post
Share on other sites

I hear you about the Flashback cases (especially the buttons), but I think it's cool how ByteKnight has stuck the controller adapters in there. You're looking at an external power brick no matter what, which is a drag. If I were to do this, I think I'd go with the Intellivision version. It's the most 1970s of them all, very groovy.

 

It's funny how people really seem to care what game consoles look like, when it's what inside that counts. :-)

Share this post


Link to post
Share on other sites

It's funny how people really seem to care what game consoles look like, when it's what inside that counts. :-)

It is like finding a mate. The personality is what matters but being nice to look at is a bonus.

  • Like 1

Share this post


Link to post
Share on other sites

Back from the holidays. I did some research while I was away, I even read through all the pages in Kevtris' FPGA thread. This project is slowly taking shape in my head, I now have a better idea about what I'll need and wont' need. I do have some questions though, I'd appreciate it if someone could answer them:

 

1) first one is about the RetroUSB Atari 2600 controller adapter (DB9 to USB) I've read somewhere in the forum that it only works with Joystick controllers, is that true?

 

http://www.retrousb.com/product_info.php?cPath=21&products_id=70&osCsid=9a2d61bd37ba4f7d31b1642d532eecc9

 

Also, how does it compare to the 2600-daptors? Performance-wise I mean. I know the 2600-daptors send data to the PC at 1000 Hz, is there more delay with the RetroUSB adapter or is it just as good?

 

2) Lag. I want to know if someone has already done what I'm going to do. Installing Stella on a Raspberry Pi, running nothing else, and using HDMI for output (although this one isn't necessary, since the Pi also has composite out) how much lag will there be, between me pressing a button and something happening on the screen? I'd need a rough estimate in milliseconds. I know Stella is good, but I don't know how good.

 

3) lastly, usb controllers. This has been asked in the past by other people as well, so if I'm annoying anyone, sorry :P I know about the Retrobit joysticks (and I know a lot of people has had problems with them) and I also know about Syzygy's ones (but the site and store seem to be inactive). Both seem like a no-go for me, based on customers' reviews and opinions. So, is there anyone else making usb atari joysticks? I don't need them, since I'll be getting adapters for original controllers, I'm just curious.

Share this post


Link to post
Share on other sites

2) is relatively easy for a lower bound, at 60Hz a frame takes 17ms. On HDMI you have to account for a full frame buffer to avoid any possible tear, so that should give you around 17ms delay or 1 frame at a minimum.

 

If the out frequency of the emulated console and the HDMI are not exact match then you can count on another frame here and there to compensate.

 

I would expect a little more than that but anywhere between 1 frame and 3 frames (17ms to 50ms) is about right as an estimate.

Share this post


Link to post
Share on other sites

Thanks Phoenix. So, that's using HDMI. If I were to output in composite, the video signal would be generated and sent to the TV practically instantaneously, right?

 

Then my question now is, can Stella receive a controller input, process it and then generate video, all in less than 17 ms (1 frame)? Mhm, maybe I should ask to the Stella developer directly, what do you say?

Share this post


Link to post
Share on other sites

Thanks Phoenix. So, that's using HDMI. If I were to output in composite, the video signal would be generated and sent to the TV practically instantaneously, right?

 

Then my question now is, can Stella receive a controller input, process it and then generate video, all in less than 17 ms (1 frame)? Mhm, maybe I should ask to the Stella developer directly, what do you say?

Composite is a little different in that you can regen a frame midway if you so chose ... but it is not advised, the composite signal has a special "new frame" sync peak that can be used (that's how older console managed to pull 240p60 out of NTSC which is 480i30, they tricked the TV into restarting the frame rather than send the second interlaced frame).

 

So told the way it used to work is that the VDP/VDU fills the video mem and then the VideoDAC scans it and generates the video signal. The trick is to make sure the VDP/VDU does not touch the data midway to avoid tearing and competing with the VideoDAC (you can stay in front of it or in the back but you can't cross or tearing ensues). The way it was done is to wait for the VBLANK (one per frame, so 60) and do all the processing there.

Some more advanced system implemented double buffering, you write in one memory area, then you wait for the VBL and then flip the memory (so you can draw as the VideoDAC scans without interference), in any case without double buffering you don't have full 16ms to render the display area fully, the trick that most early systems used is to consider the screen like a grid of 8x8 characters (so you only need a couple of KB to represent the whole screen) and during VBL change the character description or use hardware to scroll for 7 pixel, then at the 8th reset the HW scroll but shift the chars in the memory block etc.

My point being that to access and manipulate 1 or 2KB even on a 1MHz machine it takes very little, even assuming like the C64 you only do it at even/odd cycles that's 500K accesses you can perform per second, if you need to access say 1K (C64 was 40x23 if I recollect), you could do it full speed 500 times in a second (assuming you managed to do one mem access per 2 cycles), if you slow down at 50Hz you only use 10% of that bandwidth, which maybe enough to replace the content completely as you normally have from when the VBL hits until the screen starts rendering (https://en.wikipedia.org/wiki/Vertical_blanking_interval)

 

The 2600 is an even harder beast in that it goes by single line, the 2600 has no framebuffer (check "racing the beam" for an explanation) or char map memory RAM per se (in fact it only has 128 bytes of RAM total)

 

As to how Stella does it, well it emulates a 2600 so I don't see the issue, 16ms is a lot wrt to modern hardware, but you don't have the full 16ms to do as you please without double buffering.

Now to synchronize the 2600 output frequency (which may not be a strict 60Hz) to your monitor input (which may be set to a different refresh rate) by the emulator likely Stella implements double or triple buffering, but I would ask the author.

 

HDMI full frame buffer does not change the processing from the VDP/VDU point of view, it' just a fixed latch frequency I was referring to (the 60 frames) so that you need to be able to have the full processing done before the rendering to video starts.

 

Even more kevtris NESHD HDMI board forces the NES to run at strictly 60Hz (in sync with HDMI) and just buffers a few lines ahead of the HDMI signal so that it can compensate for some tricks pulled by the NES. All in all the delay in this case is way less than 16ms as there's no full framebuffer before rendering.

 

Finally yuor TV/Monitor may still reconstruct the signal in a memory buffer in order to apply all sorts of digital filtering/effects/conditioning as needed thus adding back another full frame of delay ... it really depends.

Share this post


Link to post
Share on other sites

So, I finally got my Raspberry Pi. First things first, I need the best OS for the task.

 

I'm gonna be browsing lists of operating systems for the Pi, but if anyone has any experience on the subject matter, let me know. I guess I'll need something light. The faster the Pi runs, the better. Maybe even a command line-based OS, if it exists? Stella opening as soon as I turn the computer on would be a nice feature, too..

Share this post


Link to post
Share on other sites

So, I finally got my Raspberry Pi. First things first, I need the best OS for the task.

 

I'm gonna be browsing lists of operating systems for the Pi, but if anyone has any experience on the subject matter, let me know. I guess I'll need something light. The faster the Pi runs, the better. Maybe even a command line-based OS, if it exists? Stella opening as soon as I turn the computer on would be a nice feature, too..

You're overthinking this. Just put Retropie on it, load ROMs, done.

https://retropie.org.uk/download/

Share this post


Link to post
Share on other sites

Oh, I know I'm overthinking it. But this project serves multiple purposes at once.

 

By the end of it, not only will I have a small emulation box that'll let me play any VCS game I want, but I'll also have learned (hopefully) some things about Linux, and how it works. This is my first time using this OS, after all.

 

I don't have much time for it at the moment, though. University sucks up a good chunk of my time, plus there's a convention I'm going to in a week, and I need to get things ready.. I've tested the Pi, everything seems fine. Tested the keyboard my dad lent me to use with the Raspberry, no issues there as well. Next, I need to install Stella and do some performance and total latency tests, see if I need to change OS or not (or run things in Terminal, that may suffice). And then I'll start putting the games on, and in the following months I'll be getting some more peripherals, original controllers and adapters. That's roughly the plan.

Share this post


Link to post
Share on other sites

So, I finally got my Raspberry Pi. First things first, I need the best OS for the task.

 

I'm gonna be browsing lists of operating systems for the Pi, but if anyone has any experience on the subject matter, let me know. I guess I'll need something light. The faster the Pi runs, the better. Maybe even a command line-based OS, if it exists? Stella opening as soon as I turn the computer on would be a nice feature, too..

Retropie is built on Raspbian which is based on Debian Linux. No desktop environment is included with Retropie so it is a command line OS. They did that to save storage space.

 

What OS are you using?

Share this post


Link to post
Share on other sites

Retropie is built on Raspbian which is based on Debian Linux. No desktop environment is included with Retropie so it is a command line OS. They did that to save storage space.

 

What OS are you using?

 

Right now, standard Raspbian that came included in the package (my micro SD card had NOOBS installed). Storage space isn't really a problem for me, after all Stella and the game library will have room to spare.

 

Ideally, I'd like to make the Pi start from the command line interface. Or even better, make it so that Stella autoruns on startup. I'm sure there are commands that'd let me do that, I'll have to look at some guides, or forums.. ehh, there's no hurry.

Share this post


Link to post
Share on other sites

You can disable the loading of the desktop environment and have it automatically load any program you want; just like retropie automatically loads emulationstation. I'm curious if having the desktop environment loaded has any affect on emualation performance.

Share this post


Link to post
Share on other sites

Ideally, I'd like to make the Pi start from the command line interface. Or even better, make it so that Stella autoruns on startup. I'm sure there are commands that'd let me do that, I'll have to look at some guides, or forums.. ehh, there's no hurry.

 

Atari relevant stuff

https://github.com/retropie/retropie-setup/wiki/Atari-2600

 

Boot in kiosk mode

https://github.com/retropie/retropie-setup/wiki/Child-friendly-EmulationStation

 

 

Maybe a second Pi for learning Linux is in order. They're cheap.

 

I don't think you're a real doctor.

Share this post


Link to post
Share on other sites

You can disable the loading of the desktop environment and have it automatically load any program you want; just like retropie automatically loads emulationstation. I'm curious if having the desktop environment loaded has any affect on emualation performance.

 

It should have a slight impact on overall performance. It's probably almost nothing, but every millisecond counts when playing arcade style games at high difficulties.

Share this post


Link to post
Share on other sites

It should have a slight impact on overall performance. It's probably almost nothing, but every millisecond counts when playing arcade style games at high difficulties.

 

http://giphy.com/search/roll-eyes

 

Even the $30 Pi is thousands of times faster than the original hardware that ran the "arcade-style games." There's not a heavy UI running in the background of any OS the Pi is capable of running.

 

Did I mention that you're overthinking this? Your original post was 110 days ago. This is a 30 minute project.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...