Home > Linux, Object Pascal > Building an Amiga for $40 with Raspberry PI and UAE4All

Building an Amiga for $40 with Raspberry PI and UAE4All

Right. As most readers probably know by now, I absolutely love the idea of re-furnishing old computers to their former glory. I tend to buy second-hand computers and technology and turn them into something useful and modern, or at least something the original designers didn’t consider when they made it. Like my $43 Apple G4 with dual monitors, a kit I turned into a MorphOS powerhouse – that is presently running a custom synapse (FreePascal coded) file-server.

Well, I’ve had a Raspberry PI floating around the place for a whole year now; It was originally something I bought for my 11 year old son in a desperate hope that he would fancy a DIY project with his old man. But sadly I have capitulated to the power of minecraft and the fact that he is more a “soccer kid” than a programmer. I love him either way, but I hope to initiate him into the mysteries of code – which have given my life so much joy. Especially in my childhood, playing games and trying to make them using Blitz basic 🙂

The RPI mini computer, size of a pack of sigarettes

The RPI mini computer, size of a pack of cigarettes

Either way, yesterday I was shopping when came across a special offer on 5V re-chargable batteries, the models meant to re-charge your iPhone. So each battery holds enough juice to fill an empty phone when you’re on the road. I suddenly remembered that the voltage and amp was identical to the Raspberry PI, and since you could chain-connect several batteries together via USB->USB MINI connectors  I figured if I got a couple of them the PI could run on them.

And work it did! I was actually able to get 6 full hours of “mobile” activity from the Raspberry PI with just two batteries (!). Which is en-par with any modern laptop of portable touch device (IPad, Android Pad). I also stopped by an electronic’s store and picked up a USB splitter – turning the meager 2 USB slots on the classical Raspberry PI into a 6 slot connectivity monster.

Tip: A rule of thumb if you want a “portable Amiga” is to add one battery to the chain per USB device you have connected that requires power. Keyboard and mouse doesn’t require much, but count one battery (a total of 2 so far). Add two more batteries if you use a USB disk drive, and a single battery if you use a Wi-FI dongle or a USB stick. So for an RPI with keyboard, mouse, external 512 gig disk and a wi-fi dongle: count 5 chained batteries.

Tip 2: Save your sanity and buy a pack of those cheap wireless keyboard and mouse. It requires very little power on the RPI and you dont have cables all over the place. Especially in your living room where your wife will no doubt comment after a while 🙂

Top 3: If your TV has an USB plug, buy a USB to mini-usb cable, then use the USB on your TV to power your RPI (!) It works brilliantly and once again saves you a power cable. With this in place you only need the HDMI cable and your’re ready to rock.

Linux to the rescue

One of the cool things about Linux these days is that it’s driver database has grown huge over the past 7-8 years. It used to be that getting anything at all to work on linux, let alone “off the shelves” windows hardware, was nearly impossible. I vividly remember having a (then) high-end gaming PC with the latest Mattrox graphics card (the type you could buy 2 or 3 and chain them with fire-wire optical cables for extreme performance) + Soundblaster 16, but when I tried to install RedHat Linux I ended up with a bog-standard VESA driver! That was such a disappointment that I did not touch linux for 8 years.

Well those days are long gone and most modern Linux distro’s are able to recognize whatever you throw at it. Since I picked up Ubuntu and started using it full-time I have yet to find a single piece of hardware that it cant work with. Which is brilliant! Especially the source-based drivers that (in theory) should work on all distros as long as it uses the driver API to talk with the hardware.

Either way — this meant that getting the Raspberry PI to recognize keyboard, mouse, external drive and even my printer (!) was actually easier than on my spankingly new Mac! You plug it in and seconds later it’s ready to go.

Memories of Amiga

I must admit that I miss my Amiga a lot. Im now 41 years old but when I think about my Amiga, which I clung to until the last moment, only selling it in 1995 due to Microsoft Office requirement in college, I get all warm and fuzzy inside. It’s the same emotion you experience when you meet “that special someone from the past, she that got away”. I guess it’s common knowledge that people who grew up with Amiga’s are extremely passionate about it – bordering on fundamentalism. And this is decades after it’s gone out of production (!).

There are crimes in the history of technology; VHS vs. Betamax was one of them – but the absolute worst crime in computing history – en par with the extinction of a the west-indies by a hoard of drunken sailors in the 1600’s, will always be the unjust death of the Amiga. We would inhabit a very different technological world had Commodore survived to this day, that is for sure. It would be faster, easier and far more friendly than anything we have today. Nor would it be driven by megalomaniac psychopaths like Steve Jobs or Bill Gates. Although Petro Tyschtschenko can give you a nasty scare if you meet him holding “the walker” prototype in a dark alley somewhere.

Right – here are few things people may not know about the Amiga:

  • You could buy VR (virtual reality) equipment based on Amiga Tech 20 years ago. VR is not new nor is it innovative, it all started with the Amiga
  • TV series Babylon 5 used Amiga for all it’s graphics
  • LucasArts used Amiga 4000 render-farms
  • Nasa loved the Amiga and had a ton of them, they were also used in a couple of satellites!
  • While Microsoft Windows could barely run calculator and notepad simultaneously, the Amiga had full preemptive multitasking
  • AmigaOS was architected after UNIX and is extremely resource sufficient; running a full multi-window desktop, multitasking with far better performance than Mac’s and PC’s at a meager 1 megabyte of ram and 14Mhz Motorola 68000 CPU. That’s like a 14 year old beating Mike Tyson
  • It was only when PC’s adopted graphics accelerators and 3D hardware that Amiga’s struggled to keep up
  • PPC accelerator cards were made to make up for it, but commodore screwed up the marketing
  • Ultimately the Amiga died due to neglect by Commodore, which filed for bankruptcy
  • After the demise of the Amiga, the MC68000 CPU’s were mainly used in washing-machines (auch!)

Turning a PI into an Amiga

Looking at the specs of the $35 Rasperry PI mini-computer we find that in a raw head-to-head comparison of CPU power (which is really unfair to the Raspberry, because the Amiga’s strength was it’s integrated custom chipset) it is head over heals beyond anything the Amiga had. The Amiga 500 had 512Kb ram, the low-end RPI has 512 megabyte ram (1024 times more!). The CPU is a single-core ARM processor running at 700Mhz, but most people overclock it to 1Ghz. I can only imagine how the PI would run if Amiga OS was ported whole-heartedly over. Amiga OS natively compiled for that hardware would run rings around an average, modern PC.

Ta-Da! <$50 for a portable Amiga? Eat that Amiga inc!

Ta-Da! Less than $50 for a portable Amiga? Take that Amiga INC!

So, how could I turn my now battery powered Raspberry PI into an Amiga? Well, I have to turn to emulation. And in order to get that working I need Linux. So I went over to the Raspberry PI website and downloaded the noobs disk image, plugged in a network cable and installed Debian (I also tried the fedora port, but Debian gave the best speed). I used the apt-get package manager to update the system, plugged in a wireless USB dongle so i could finally ditch the cable — and voila! I had a “mobile” Raspberry with wireless capabilities. Oh and I had a ordinary USB keyboard and mouse in all the time. Just in case you think I did this via telepathy.

Setting up the emulation

Next was the Amiga emulator, which comes in many flavors and forks. Once again i googled the best option and found a custom variation of Amiga4All on the RPI website. I downloaded the package and installed it.

Next, I needed a few things:

  • Original ROM files from the Amiga
  • Disk images of games, Workbench (the Amiga desktop) and harddisk’s

Well, considering the amount of money I have invested in Amiga’s during my teens I felt no shame visiting my local torrent and grabbing a massive 8 gigabyte ISO with everything. And I mean everything, including all the ROM files ever made for the Amiga (and then some! Even the failed Commodore inventions like the CDTV was there).

I took the Flash-Card out of the RPI and plugged it into my Mac, then copied the ROM files to the “roms” folder, and the disk images to the games folder. I also separated the floppy images from the harddisk images so it would be easier to work with.

Adapting Linux

Next, having booted back into Linux on the RPI, I edited the config file and removed the statement “startx” (towards the end of the config file) which is the command that starts the desktop under Linux (I presume this is universal, but I’m really new to Linux so there may be variations). I replaced it with the command-line call to start UAE instead – pointing it to the first game I ever bought as a kid: Rocket Ranger (I later discovered that you could disable the desktop completely when you install, but picking “text mode” instead of desktop-display).

To be perfectly frank I never thought it would work “just like that”, because I have only 3 weeks on hands-on experience with Linux (Ubuntu) so I was prepared to drone over esoteric man-files and asking people online. But to my big surprise, I 6-10 seconds later I was looking at the Cinemaware logo on my spanking new 55″ LED TV. Boy did I jump! I even got sound, although it was slightly jerky.

I went back in and had a look at the UAE config, turned on JIT, set “drop frames” to 1 (it was set to 3). I also set sound to mono, because I’m not that into music anyhow. And that was it — it worked just like my old Amiga (!)

Setting up WB

Next step was to see if any of the Workbench HD images worked, and indeed they did! It’s actually faster to use Workbench under emulation – than to use Arch Linux compiled for Raspberry (oh yes, I tested that distro as well, and it was barely usable at all).

Overclocking

A major speed boost is the over-clocking feature. You simply edit the RPI boot config and set over-clocking to max (see article on doing this here) and the CPU runs at 1Ghz, which is a great improvement from the default 700MHz. I have yet to find a game which runs worse than the original Amiga — and I’m guessing it’s not even hardware accelerated.

As you probably know the RPI comes with a proper GPU, which is how it can play HD video. If UAE was to use this there is no doubt — the RPI would replicate the old Amiga down to the letter, but with more power, more ram and full driver support for modern hardware.

Well, I hope my little adventure interested you!

Advertisements
  1. October 9, 2014 at 10:33 pm

    Excellent article, would you consider including step by step instructions or maybe creating a video?

    Not a video, but I do plan to insert the technical information.
    A managed to screw up APT with my hacking around the system, so it will take a while, but hopefully i’ll post a step-by-step thing next week 🙂

  2. October 11, 2014 at 8:42 am

    Nice. Try getting your son to play Soccer Kid and Sensible Soccer 🙂

    • Jon Lennart Aasenden
      October 11, 2014 at 11:37 am

      Way ahead of you 🙂

  3. semiot
    October 15, 2014 at 9:07 pm

    Hi, thanks for sharing! Just because I’m a RPi addict and was into C64 long time ago, I just read this interesting series from a german ex-employee of commodore who gives us some sad insights on why commodore and with it, the amiga died (sorry, german only):
    http://www.amiga-news.de/de/news/AN-2014-04-00068-DE.html

  4. October 17, 2014 at 5:36 pm

    Hi , nice job !

    Can you put here a download link of this “custom variation of Amiga4All” package ?

  5. October 18, 2014 at 10:48 am

    How do you plan to emulate AGA chipset? Full A1200 is impossible on RPi. UAE4ALL (by Chips) emulate A500 in 100% and is the maximum.

    • Jon Lennart Aasenden
      October 18, 2014 at 10:57 am

      I cant think of a single program or game that i want to use that requires aga. For me this was not so important as to just setup a $35-40 RPI and play around with retro stuff. Also, i did not write any code for this project (UAE) so that’s up to the maintainers to deal with

  6. October 18, 2014 at 11:01 am

    ..alway you can change the title for “Building an A500 for $40 with Raspberry PI and UAE4All (by Chips)”

    • Jon Lennart Aasenden
      October 18, 2014 at 11:08 am

      A bit late now, it’s already syndicated

      • March 5, 2016 at 3:54 pm

        Good work.. i’ve gotta be honest im not tempted in standalone emulation, but it’s nice to see that it’s now easily possible. i actually own an Original Commodore A1200, but when people say Amiga i think A500 (i prefer the A600 and A1200s purely from an upradeability standpoint for the original machines, well ok the A500 does now have acceleration and cf card options, but its a massive machine).

        • Jon Lennart Aasenden
          March 5, 2016 at 5:27 pm

          My favorite is by far the A1200. I went from gaming to coding in between those models, so when i got the A1200 i was all about NASM, Blitzbasic and Hisoft Pascal/C.

          Mind you, the Raspberry PI 2 has had some problems with pure A1200 emulation. It works, but in heavy duty programs/games/demos it can glitch a bit. But the new RPI3 will finally make it 100% up and running.

          What i did was create a massive Amiga HDF disk-image based on Amiga4ever on the PC, stuffed it with everything i could find (ton of games, whdload, coding, graphics and so on) and then copied that over.
          Then i modded the linux distro to load straight into workbench using that hardfile — that is just wonderful, and it works really well.

          Check out this post on my other website: https://retromodsblog.wordpress.com/2016/01/25/velkommen/

  7. October 18, 2014 at 11:11 am

    I have build a GPIO joystick adapter to use Qucktshot Python joystick with UAE. I have tested all possible emulators of Amiga (three versions of UAE) and I can say that the Chips version is the best (speed and compatibility). Its only A500. It works only with diskettes so you can forget about HDD. There is a version which supports HDD but is too slow to use.

    • Jon Lennart Aasenden
      October 18, 2014 at 11:14 am

      Did you overclock the PI? Was it model A or B? You can overclock model-A from 700Mhz to 1Ghz, and the model B to 1.3Ghz i seem to recall. This actually makes a huge difference in speed. Using the linux desktop before overclocking is to slow for any serious work, but with overclock in place it’s “usable” for more than just poking around. Probably not enough to emulate AGA copper stuff, but it should be more than enough juice for both desktop and floppy games.

  8. October 18, 2014 at 11:34 am

    Yes. My configs are 950MHz and 1GHz on model B. Its enough for Workbench 1.3 (boot from adf) and floppy games. Aeros for RPi (Aros on Linux) open source AmigaOS is too slow to use on current stage (beta version).

    • Jon Lennart Aasenden
      October 18, 2014 at 12:54 pm

      Hm. Strange. I found a youtube video with a pre-release at least 2 years old, that was pretty snappy?

      Think it’s this one: https://www.youtube.com/watch?v=COUrcZat6oc

      I would have imagined GPU drivers to be ready for this right about now?

  9. April 7, 2015 at 4:01 pm

    Nice article ! What about the joystick ? Are you able to use an original AMiga joystick (with a USB to DB9 adapter ?) or are you using a PC gamepad ?

  10. July 26, 2015 at 12:28 pm

    The Amiga 1000 and Amiga 500 computers used a Motorola 68000 CPU at 7 MHz and they only had 512 kb of memory in their factory configuration. The Amiga 500 could be expanded with an additional 512 kb memory for a total of 1MB of memory.
    The Amiga 1200 used a Motorola 68020 that ran at 14 MHz.

  11. July 26, 2015 at 12:32 pm

    My own Amiga 500 is however expanded with both the additional 512 kb memory as well as an old AlfaPower controller that allowedme to add an additional 8 MB of memory for a total of 9 MB of memory as well as it allowed me to add a spare 44 MB (PATA/IDE) Harddrive.

  12. August 1, 2015 at 2:35 pm

    Woaw ! Nice shot 😉
    I will do exactly the same but with my RPI B+ 🙂
    … And I’m preparing the casing (based on an Amiga 500 casing) so that batteries, USB HUB, keyboards and the RPI fit inside 🙂
    Back to the roots through UAE4All 😉

    Regards,

    Patrick

  1. October 15, 2014 at 2:56 pm

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: