An FPGA-based implementation of the original Commodore Amiga 500 hardware is known as Minimig (or MiniAmiga). Minimig is now available for download as an open-source / open-hardware design with a single 12x12cm PCB with project and assembly instructions published under the GNU public license.

The Minimig assembles all of the Amiga’s parts onto its PCB. It lacks a hard drive and a floppy drive. Instead, it has a floppy emulator and an MMC flash card slot.

The flash card holds the disk-images which can be loaded using an on-screen-display menu.

This document is my attempt to consolidate the very disperse documentation about the minimig and offer a concise guide if you want to build a board. Most of the websites that hosted files required are also offline currently. So I’m building a GitHub repository at

Hardware Description

The original hardware of the Minimig consists of 4 major parts:

  • The FPGA
  • The 68000
  • The RAM
  • The PIC controller

The FPGA

The FPGA is the heart of the Minimig. The chip used is a 400K LE Spartan-3 by Xilinx. All the other major components (RAM and 68000) connect directly to the FPGA.

The FPGA implements the Amiga custom chips Denise, Agnus, Paula and Gary as well as both 8520 CIA’s. It also implements a simple version of Amber so that VGA monitors can be connected. Besides this, the FPGA also acts as an automatic joystick-mouse-switcher, a PS2-to-Amiga-keyboard converter, PS2-to-Amiga-mouse converter and as an OSD (on-screen-display) generator. All of these functions were not present in the original Amiga but make life much easier.

The Spartan-3 is a ram-based FPGA and must be loaded with a “core” upon startup. This is done by a PIC controller (or a PIC replacement child board).

The 68000

The 68000 is the Minimig’s main processor. The Minimig uses a special version of the 68000: the MC68SEC000. This version runs at 3.3V and is completely static (so it can run at any frequency between 0 and Fmax). This makes it an excellent companion for the Spartan-3 FPGA as there is no need for level-shifting between 3.3V and 5V levels. The MC68SEC000 connects directly to the FPGA.

The RAM

The Minimig board contains 2Mbyte of 70ns static ram. The RAM is organized as 2x 524288*16 banks. Each bank has separate enablers for the upper and lower byte. The RAM is used to implement the 3 types of memory needed by the Minimig, namely: kickstart rom area, chip ram and (ranger) fast ram.

As the Minimig has no kickstart socket, the kickstart image must be loaded upon startup. This is done by the PIC controller as described below. Once loaded, writes to that area of the RAM are disabled and the area acts like a read-only memory. The remaining part of the RAM (1.5Mbyte) is divided up between chip and fast ram.

The PIC controller

The PIC controller plays the role of BIOS. It is a single chip 8-bit microcontroller from Microchip. The PIC controller configures the FPGA (by loading the Amiga core into it), loads the kickstart image into the kickstart ram area and acts as an Amiga floppy emulator. Thus, the PIC controller really starts the system up as soon as power is applied, hence the “bios”-like function. The Minimig uses a 18LF252/SP PIC controller.

Due to the current challenge to procure those PIC micro controllers, there is the need to look for alternatives. In the project forums an ARM AT91SAM7S256 based controller in a child board was then created. The child board implements the same functions proposed initially for the PIC micro-controller using modern components (still widely available).

These instructions contain the steps required to build the computer using the PIC controller as well as the child board. Detailed info on how to obtain the gerber files and the list of components for it can also be obtained at ARM Controller Nachbau [amiga-wiki] (amigawiki.org) page.

How the Minimig works

Boot Sequence

When the computer is turned on for the first time, it executes the boot sequence. The boot sequence is formed by a two step process:

  1. The FPGA must be configured first. As previously stated, the PIC controller performs that. Then the Kickstart image must be loaded as the next step.
  2. Once the FPGA is configured, the system is booted in a special state. In that state, a small boot rom is placed at addresss #0. This boot rom loads the kickstart through the floppy emulator.

Once the kickstart has been loaded, the boot rom then resets the system. The boot rom then disappears from address #0 and the system boots as if it were a normal Amiga.

The code from the boot rom was written in 68000 assembly.

The PIC firmware used to control the initial boot sequence was written in C. The firmware also contains an MMC (Multi Media Card) and FAT16 drivers to control the flash card operation.

User Interface and OSD

The firmware also handles the user-interface and on-screen-display. The PIC communicates with the FPGA through an SPI interface. The MMC card is also connected to this SPI bus. In it’s current form, the FPGA has 2 SPI “addresses”. Address #0 is selected by the fpga_sel0 signal and control the floppy emulator. fpga_sel1 controls the on-screen-display. fpga_sel2 is currently unused.

Kickstart

To function, Minimig needs a kickstart rom image. The Kickstart is a copyrighted. Therefore, you are not allowed to just download it anywhere from the web. You must own the original kickstart rom and make an image of them using the method described in the UAE archives. You can get the Kickstart ROMs buying the Amiga Forever package by Cloanto.

Cloanto offers the only licensed way to pick up the Amiga Kickstart ROMs dumped to a file that can be used with the Minimig.

Building Instructions

List of Components – Main Board

QtdReferenceValueDescriptionLink
22C5-C8,C16,C18-C19,C21-C22,C25,
C28-C30, C35-C36,C39-C40,
C43-C44,C46,C52,C55
10nFC805 SMD Ceramic CapacitorAli Express
21C3,C10-C13,C20,C23-C24,C26,
C31-C34, C38,C41-C42,C45,C50,
C53-C54,C56
100nFC805 SMD Ceramic CapacitorAli Express
2C49, C51 (only if using the PIC controller)47pFC805 SMD Ceramic CapacitorAli Express
1C48100pFC805 SMD Ceramic CapacitorAli Express
1C4722pFC805 SMD Ceramic CapacitorAli Express
4C4,C17,C27,C37100uF 6.3VTantalum Capacitor B-CaseAli Express
3IC1, IC3, IC4LM1117MP-ADJAdjustable power regulatorAli Express
7R20,R22,R24,R59,R63,R64,R654K7R805 SMD ResistorAli Express
28R2,R3,R13,R18,R27,R29,R30,R31,R32,R33,
R34,R41,R43,R44,R45,R46,R47,R48,R50,
R52,R53,R56,R57,R58,R60,R61,R62,R66
270R805 SMD ResistorAli Express
1R551MR805 SMD ResistorAli Express
7R7,R9,R11,R28,R54,R67,R682K2R805 SMD ResistorAli Express
2R25,R26180R805 SMD ResistorAli Express
10R12,R14,R35,R36,R37,R38,R39,R40,R42,
R49
100R805 SMD ResistorAli Express
7R4,R5,R6,R8,R10,R16,R17560R805 SMD ResistorAli Express
6R1,R15,R19,R21,R23,R511KR805 SMD ResistorAli Express
4C1, C2, C9, C15100uF/16VElectrolytic Capacitor PTHAli Express
1C1422uF/16VElectrolytic Capacitor PTHAli Express
3D1, D7, D8BLUE, RED, GREENL805 LedAli Express
1X14.433619 MhzHC-49S Passive Quartz Crystal OscillatorAli Express
1X2 (only if using the PIC controller)20.000 MhzHC-49S Passive Quartz Crystal OscillatorAli Express
5D2, D3, D4, D5, D6BAV99Transistor SMDAli Express
1IC10 Socket28 pin narrowDIP SocketAli Express
2IC6, IC7IS62WV51216BLL TSOP44 IISRAM (at least 70ns)Ali Express
1Memory Card Connector, MultiMediaCard (MMC)SDBMF-00715B0T0Push-Push, 7 ContactsNewark
1IC874HC4060 SOP1614-stage binary ripple counterAli Express
1IC2SP3232EUCN SOP163.3V, 1000 Kbps RS-232 TransceiverAli Express
1IC9MC68SEC000FU20 QFP64Micro ProcessorAli Express
1J2DC-005Power Jack Socket DC ConnectorAli Express
2J6, J10DB9 Male DB9 Male PCB Mount D-Sub 9 pin PCB ConnectorAli Express
1J3DB9 FemaleDB9 Female PCB Mount D-Sub 9 pin PCB ConnectorAli Express
1J1P2 3.5mmPhone Audio Connector, 3 Contacts, Jack, PCB Mount, Metal BodyDigikey
1J4DB15 FemaleDB15 3Rows Parallel Port 15 Pin D Sub Female Plug VGA AdapterAli Express
1J8 MouseGreenPS2 6P 6-pin ConnectorAli Express
1J5 KeyboardPurplePS2 6P 6-pin ConnectorAli Express
2MENU, PGM RESET6x6x7Push ButtonAli Express
1IC10 (*Only if the ARM controller board is not used)PIC18LF252 DIP28PIC Micro controller Ali Express

List of Components – Arm Controller Board

The list below is required if you decide to use the ARM controller board instead of the PIC micro-controller.

QtdReferenceValueDescriptionLink
1U1AT91SAM7S256-AUARM Microcontroller MCU 256kB Flash 64kB SRAM 55MHz 4 PWMAli Express
5C3, C14, C15, C16, C17100nF 16V0603 10% X7RAli Express
2C6, C71uF 6.3V0603 10% X7RAli Express
2C9, C1810pF 50V0603 5% C0GAli Express
2C11, C1215pF 50V0603 5% C0GAli Express
4C1, C5, C8, C131nF 50V0603 5% C0GAli Express
1C1033pF 50V0603 5% C0GAli Express
1C210nF 50V0603 10% X7RAli Express
1C410uF 16VSMD-B 10% TantalumAli Express
1X118.432MHzHC49/SM 18.432 MHzAli Express
2R2, R327R 0.1W0603 1%Ali Express
2R1, R71K5 0.1W0603 1%Ali Express
1R610K 0.1W0603 1%Ali Express
1R5100K 0.1W0603 1%Ali Express
1R41M 0.1W0603 5%Ali Express
1Q1BC807-25BC807-25 transistor SOT-23Ali Express
1N/A2P2-Position DIP switchAli Express
1CN15-pinUSB mini-B SMDAli Express
1U228-pin (2×14)28-pin headerAli Express

Tips

Although it is generally recommended to solder all difficult parts (like the FPGA, RAM chips and 68000) first, I would like to advise another order of building the Minimig. This alternative order of building will allow you to test a sub-section of the board before soldering the expensive components.

One of the most important parts of the board is the power supply system. So, my recommendation is to build this part first by soldering the following components:

  1. All 10nF capacitors
  2. All 100nF capacitors
  3. All tantalum capacitors (pay attention as they are polarized)
  4. Power regulators
  5. Resistors and leds with references R37,R38,R42,R14,R26,R28,R2, and D1
  6. Electrolytic capacitors and the power plug

Note that if you are using the controller board instead of the PIC controller, you don’t need to solder C49 and C51 as the X2 oscillator is not used by the board, only by the PIC controller. Of course, X2 is not required as well if you decide to use the board. It will be replaced by the 18.432Mhz oscillator that is used on the child board.

At this stage, the power supply can be tested. Double check if all components are soldered correctly (especially the capacitors!) and connect a 5V regulated power supply to J2. D1 should light up blue. Feel if any of the regulators don’t get hot. If all is well, proceed by testing the following voltages:

Test PointVoltage
Voltage at J6, pin 7+5V +/-5%
Voltage at J10, pin 7+5V +/-5%
Voltage at J5, pin 4+5V +/-5%
Voltage at J8, pin 4+5V +/-5%
Voltage at tab of regulator IC1+3.2V to +3.4V
Voltage at tab of regulator IC3+1.20 to +1.26V
Voltage at tab of regulator IC4+2.40 to +2.6V

Only if all of these voltages check alright you can proceed by soldering the big chips IC5, IC6, IC7 and IC9. Because all SMD parts at the bottom side of the PCB are now soldered, you cannot lay the board flat anymore. Therefore, give the PCB some “feet” before soldering the big chips.

After that solder the remaining SMD parts and finally solder all trough-hole components.

Programming the PIC controller

If you decide to use the PIC controller, and of course if you find it with reasonable prices, that is the only part the needs programming.

The FPGA is configured upon startup by the PIC. This means that you do not need any JTAG cables or special tools to program the Minimig, besides of course a PIC programmer.

Programmers for PIC microcontrollers are cheap and widely available, both as DIY projects or as commercial programmers. The pictures below show two options you can use to program the micro-controller: The XGecu TL866II Universal Programmer (in the picture it is being used to program a GAL, but it also works for the PIC we are using for the Minimig), or the PICkit-2 programmer with the Universal Programmer Adaptor.

You can buy those programmers from AliExpress: PICKit 2 or TL866II.

PIC controllers can only be erased when operated at 5V. The Minimig operates at 3.3V so you would never be able to completely “reset” the PIC when something go wrong with normal computer use. Thanks to the socket soldered to the PCB, the PIC can always be taken out and inserted into a programmer for reprogramming when needed.

Here are the steps to program the PIC micro-controller for the Minimig using the PICkit 2:

  1. Assuming you will be using the PICkit2 programmer, download the programmer software from the Microchip website and install it on your PC.
  2. Download the Tiny PIC Bootloader from its page here. We will download the firmware to the PIC controller initially using the programmer and then directly on the board by switching the jumper to MCU.
  3. Adjust the jumpers on the back of the Universal Programmer Adaptor to program the PIC18LF252 DIP28 micro-controller.
  4. Connect the Universal Programmer Adaptor to the PICkit 2 and use the USB cable to connect the programmer to your PC.
  5. Run the PICkit v2 programmer software. If everything is correctly configured, you will see the message saying that the PICkit 2 is connected and the micro-controller will be identified by the programmer.
  1. Click the Erase button. In a few seconds your micro-controller will be erased by the programmer and you will receive a message saying the process was completed.
  2. Click File and then Import Hex. Navigate to the folder where you uncompressed the firmware.hex file. Click Open.
  3. Enable the following fuse bits FOSC2, LVP, FOSC0, /PWRTE, WDTEN
  4. Click Write.
  5. After a few seconds you will receive a message saying the programming was successful.

If you are using the TL866II you need to follow the steps below:

  1. Download and setup the XGPro Software that you can download from http://www.xgecu.com/
  2. Run the XGPro programmer software.
  3. Under Select IC, click the button and select the PIC18F252 DIP28 IC from the list.
  4. Click Load and navigate to the folder where you uncompressed the firmware.hex file. Make sure you select the Intel HEX on File format. Click OK.
  5. Important!!! Select the tab Config and select FOSC2, LVP, FOSC0, /PWRTE, WDTEN
  1. Click PROG.
  2. Select all options on Program Range and hit Program.
  1. Wait for the programming process to finish.

Programming the ARM Controller Board

If you are following this part of the article you opted by the use the ARM controller board instead of the PIC controller.

The ARM controller has a few advantages over the old PIC option.

  • – emulates four floppy drives
  • – adds write support to harddrive and floppy disks
  • – allow increase of the CPU speed from 7.09 to 49.63 MHz with a 4kb zero waitstate cpu cache
  • – allows usage of long floppy file names
  • – allows usage of directories on the SD card
  • – allows unlimited number of files by directory
  • – support for 2 HDF files
  • – fast firmware boot

To program the board you will need the SAM-BA in system programmer software by Microship. You can download it from https://www.microchip.com/en-us/development-tool/SAM-BA-In-system-Programmer

Here are the steps to flash the firmware to the ARM controller child board:

  1. Download and unzip the SAM-BA in system programmer.
  2. Switch the TEST dip switch to ON (number 1) and power the board.
  3. Wait 10 seconds and turn off the board.
  4. Switch the TEST dip switch back to OFF.
  5. Connect the USB cable to your PC and to the board. Then power the board again.
  6. Run the SAM-BA (I used the 2.18 version for Windows) and select the COM port that was created when you plugged the board to the PC.
  7. Select the at91sam7s256-ek board and hit connect.
  1. Click on the open file icon on the side of the Send File Name text box and select the firmware.bin file from the ASB140501 folder.
  1. Click Send File.
  2. Click No on the message asking lock regions.
  3. Click on Compare sent file with memory. And check if you get a message saying that the content and the memory match exactly.
  4. Done. You have your board programmed.

Jumpers and SD Card

Make sure you use a jumper to define the video frequency to match your monitor. You can choose between 15Khz or 31Khz. Usually 31Khz offer a more broad range of supported monitors as 15Khz is not quite used anymore in modern displays.

Leave the second jumper on MCU.

If you are using the PIC controller, format the SD Card with FAT and save the appropriate minimig1.bin file to the root. You may choose between a NTSC or PAL configuration and that will determine the file you need to save to the card.

Also save the kick.rom file on the root of the SD card.

Keep in mind that you cannot have a partition with more than 4Gb if using FAT. And it is not exFAT, it is just FAT.

If you are using the ARM controller, then you can format the card with FAT32 and save the files on the root.

First Boot

Turn on the board with the sd card inserted. The default behavior is to flash the drive light quickly as the PIC controller (or the ARM board) configures the FPGA with the minimig1.bin file. Then the kickstart is copied to the memory area where it will be resident and the 68000 starts executing code.

You will see the default kickstart prompt page on the screen after a few seconds.

Did you get blinking codes with the drive light? Please use the below table to decode those.

number of blinks:

            1: neither mmc nor sd card detected

            2: fat16 filesystem not detected

            3: FPGA configuration error (INIT low or DONE high before config)

            4: no MINIMIG1.BIN file found

            5: FPGA configuration error (DONE is low after config)

            6: no kickstart file found

Remember you need to push F12 to open the on-screen-display. You can also use the menu button on the board.

Issues

The first two units built were using the CD4060 integrated circuit as I initially thought they were somehow equivalent to the HCF4060. However when turning on the computer with the CD4060 you can clearly see issues with the synchronization on the image.

When using the CD4060 you will get a blue screen with the lateral suffering for some sort of interference. I ended up figuring our that the CD4060 and HCF4060 are very different. They are both binary ripple counters/dividers integrated circuits (ICs) produced by Texas Instruments, but they differ in a few key specifications.

The CD4060 is part of the CMOS 4000 series and is designed to operate with a supply voltage range of 3V to 15V. It has a maximum clock frequency of 4 MHz, and its typical power consumption is around 10 microamps.

The HC4060 is part of the high-speed CMOS (HCMOS) family and is designed to operate with a supply voltage range of 2V to 6V. It has a maximum clock frequency of 25 MHz, and its typical power consumption is around 2 milliamps.

When replacing the CD4060 by the HC4060 the problem just goes away, so be aware of that if you are building the minimig and make sure you are getting the right ICs for the computer.

2 thoughts on “An FPPGA based Amiga – The Minimig”
  1. Bom dia,,, vc faz sobre encomenda este amiga 500? se sim, ja viria com sd com soft e jogos? obrigado e aguardo

Leave a Reply

Your email address will not be published. Required fields are marked *