Simple four-way kickstart switch with M27C160

This post has been cloned from http://blog.system11.org/?p=2666
Originally written 15 Dec 2017
Some links and inline-notes, both displayed in red, has been added to this guide after cloning.

Amiga (various models) Kickstart switcher

The Amiga has had multiple firmware versions over the years, known as “Kickstart”. Unfortunately a lot of software that hits the hardware directly is affected by which version of Kickstart you’re using, leading to various hardware and software solutions.

The software ones (for example Relokick) do work, but if you have enough boot time toggles it can start getting unwieldy managing which things are resetting and why – for example booting into 68000 mode on your accelerator card, then booting Relokick to drop to Kickstart 1.3 which involves another reset. Hardware options are definitely the way to go.

There are some quite complex ones which allow you to switch on reset with keyboard strokes, but I found one main problem with these – they’re always out of stock. Additionally they only allow you to switch between two ROMs and have quite large physical footprints because for some reason people are really “purist” over Kickstart ROMs, copyright and so on meaning multiple chips or insane solutions like having to download original chips into onboard flash.

As many reading will know, I’m a member of The Dumping Union, so I don’t much care. So I made a small quad switcher board which anyone can make without having to worry about stock availability. It won’t work in all machines, if yours can cope with single 20 pin chips then you’ll be fine. This is revision 1.1, the 1.0 included a mistake which affected the logical workings of the jumpers.

So what we have is a 27C160 (16mbit) chip split into four areas by the jumpers toggling high address lines on the chip, presented to the motherboard as a standard 27C400. If you want to make life easier when you’re building this, solder the middle pin strip first, then the resistors, socket, other strip and header in that order. It should look a bit like this:

And it installs like this (photo taken in Rev 6 A2000):

As with my drive switcher project, I suggest you get the boards made by OHS Park, here’s a handy ordering link:
Order from OSH Park

However if you want to manufacture them yourself or make changes, here’s the Eagle CAD file:
A2000_ks_quad_11

Parts list:

1x 27C160 EEPROM
2x 20 way male pin strip, turned pin type
2x 4.7k ohm resistor 1/2 watt
1x 4 pin right angle pin header
1x 42 pin DIL socket
2x jumpers, switches, or 2P4T rotary switch (examples)

To make the image for this chip just get your four chosen ROM images, double the size of any 2mbit (256k) images and copy the lower half into the upper half, and then compile them into a single 16mbit image. There are loads of ways of doing this, I just used a Linux command line:

$ cat KICK13.ROM > quadbios.bin
$ cat kickstart2_04.rom >> quadbios.bin
$ cat Kickstart3.1.rom >> quadbios.bin
$ cat DiagROM >> quadbios.bin

As you can see I chose 1.3, 2.0, 3.1 and the awesome Amiga Diagnostic ROM (http://www.diagrom.com), once you have that image you will need to byte swap it if you’re using images used by emulators, but not if you’re using genuine chip dumps. As a sanity check when you load the file into your programmer software to burn the 27C160, look at the buffer – if you see readable headers instead of slightly scrambled ones, you’ll need to byte swap it. In fact it’s probably best to check the individual ROMs you plan to use before joining them together, that will work just as well.

As for how to actually use it – well that’s up to you. If you ground the second pin of J1 or J2 you’ll change which segment of the 27C160 is being accessed according to this table:

J1  J2
ON  ON  = ROM 1
OFF ON  = ROM 2
ON  OFF = ROM 3
OFF OFF = ROM 4

If you do this while the machine is running it will tend to crash horribly – but switching it during a reset seems to work, or by turning it off first. You could attach 2 toggle switches to it, or do as I have and wire up a 2 pole 4 throw switch – if wired correctly this will let you choose any of the 4 possible combinations. I used one of these:

So if you look at the above pinout, I connected J1-1 to A, J1-2 to 1 & 3, J2-1 to B, and J2-2 to 5 & 6.

You may not make these to sell unless you are charging a minimal amount for assembly and parts. Everything else is fine.

Burning Kickstart ROMs for the Amiga

(cloned from https://www.software-by-mabe.com/blog?3&catid=2)
Links and inline-notes, both displayed in red, has been added to this guide after cloning.
See also:
Burn Damn ROM Burn

Burning your own Amiga ROMs (EPROMs)

01/26/2019 | Amiga | Amiga ROM AmigaOS

With the release of the latest AmigaOS version (3.1.4) the package you could buy included ROM images to be used for either maprom (depending on your accelerator card tool support) or for burning it to a ROM.

Maprom is probably preferred, because it’s more flexible, but not always possible. For instance the A3440 card can’t do maprom. Or if you have no accelerator at all you can’t do maprom either.

Which leaves only a few options. Either you can buy the ROM, have someone burn it or burn it yourself.

Here I want to show how it works to burn it yourself.

What you need:

– an EPROM programmer. I have chosen the low cost GQ-4×4 USB programmer.

– to program the EPROMs used in an Amiga you have to get a 16-Bit 40/42 pin ZIF adapter board for the burner:
ADP-054 16 Bit EPROM 40/42 pin ZIF adapter

– an UV eraser, which can erase the EPROMs, in case something goes wrong.

– then you need EPROMs. The types used in A500/A600/A2000 are 27C400. I found the following to work which can be ordered in eBay: AMD27C400

– for burning ROMs for A1200/A4000 you need 27C800 / AMD27C800 roms, two of them to burn one ROM.

– and certainly a ROM image you want to burn.

Sometimes there are good offers at Amazon or eBay for a complete package (except the EPROMs).
You shouldn’t pay more than €150 for the GQ-4×4, the adapter board and the eraser.
(https://www.amazon.co.uk/gp/product/B011HVON3A/)

Here is a picture of the device with attached adapter board with an EPROM inside.
GQ programmer with adapter board and EPROM

Then you need to download the software for the burner. That is a) the burner software itself named “GQUSBprg”. The latest version as of this writing is 7.21.
And you need the USB driver 3.0.

Can be downloaded here: http://mcumall.com/store/device.html

When you connected the burner and installed the software we can start.
Now open the burner software. Make sure that there is no EPROM put in.

1. first step is to select the device, or the EPROM to burn.

Make sure you choose either AM27C400 or 27C400.

2. Next we’ll make a voltage check to see if the burner has all voltages in order to properly burn the EPROM.

I found that while you can attached a power supply on the burner it is not required. The USB provides enough power.

3. Load the ROM image into the buffer.

When you load the image make sure you choose .bin (binary).

!!! This is important, or otherwise the programmed ROM won’t work.
After you loaded the ROM image, you have to make sure to swap bytes.
This can be done in the ‘Command’ menu of the software.
Check first by selecting the “Buffer” tab. If you find some readable text in the beginning of the buffer, you need to byteswap it.

4. Now you have to put in your EPROM into the ZIF slot.

Make sure it sits tight and doesn’t move anymore.

5. Make a blank check to see if the EPROM is empty.

6. When the EPROM is blank we can write it.

When the write process is finished it’s done.

You can take out the EPROM and put it into the Amiga and it should work.

Some notes:
Partly this whole process of writing the ROM was a real pain because the GQ burner would just stop writing at some address. And in fact I had to get the package replaced including the adapter board.

I had first tried it in a virtual machine (VMware Fusion on Mac) but this doesn’t work for some reason as the GQ programmer detaches and re-attaches to the USB bus on some of the operations and that doesn’t seem to be working reliably in a VM.

Commenting on my own post:

The Amiga 4000 can only use 512k EPROMs, hence only 27C400 will work.
The Amiga 1200 can also use 27C800 (1MB).

The byte-swap, if your ROM image is already byte-swapped, then you don’t need to do this here.
Some ROM images, which are ready to burn have this already.
However, if you want to burn ROM images that are used in maprom or UAE, then you have to byte-swap.

07/15/2019 | Manfred |


Resources

Making a custom kickstart 3.9 ROM
Guide: Create and Burn a custom Kickstart 3.9
AmigaOS 3.9 Kickstart and Patches Guide
Classic Amiga Wiki – Kickstart 3.9
Help making Custom Kickstart rom
EEPROM on A1200?
Making a custom kickstart 3.1.4 ROM
Remus and ROMsplit to create your own 3.1.4 KS


Willem EPROM programmer
GQ-4X User’s Manual
Software and USB-driver download
27C400 EPROMs (for A500/A600/A2000 and A4000 ?)
27C800 EPROMs (for A1200 only ?)

Partitioning 16 GB Compact Flash card with WinUAE and PFS3

See also: How to Setup an Amiga Compact Flash Drive using WinUAE [everythingamiga.com]

(https://16bitdust.wordpress.com/2015/10/13/partitioning-16-gb-compact-flash-card-with-winuae-and-pfs3/ || 16bitdust is now defunct)

Index, or quick links to the sections

Use these quick links if you know how to do some of the steps.

Lately I’ve noticed a lot of questions on how to partition and prepare Compact Flash card (or HDD) for use with Amiga, so I’ve decided to write this tutorial on how to do it and format them as PFS3 partitions.

At least this is how I do it :). Using PC with WinUAE to prepare everything and just pop finished card in Amiga, ready to go.

Preparing Compact Flash card

Regardless if you’re going to do it with real Amiga or with WinUAE, first step is to prepare CF card. For Amiga to be able to use it we need to “clean” any file and partition structures that are present on the card. Luckily, there’s a tool included with windows to do just that, it’s called “diskpart”.

First thing first, connect your CF card to PC, it doesn’t matter how you do it. Integrated card reader, USB card reader, whatever you usually use.

Now we need to start Command Prompt with elevated permissions, aka “as Administrator”. If you have Windows 7 and UAC turned off applications start “as Administrator” by default, but I guess most people use default settings. Anyway, press Start key on keyboard (or click Start icon on taskbar), type “cmd” (without quotes of course, every command I have written with quotes is supposed to go without them, unless explicitly state otherwise). It should find either Command Prompt or cmd.exe, in my case (Windows 10) it was Command Prompt, but if I remember correctly on Windows 7 it says only cmd.exe. Regardless, right click it and choose “Run as administrator”.

Now type “diskpart” and press enter key

This will load diskpart. Now lets see what drives we have available, type “list disk” and press enter, this will list all disk drives that are present in your computer. Find the one representing your CF card. In my case it was 16 GB CF card so it’s the last one, where is says 14 GB. Note that it’s “Disk 5”.

To select it type “select disk #” where # is number your CF/HDD got, followed by enter of course. In my case it was “select disk 5”

You should get message that Disk # is now the selected disk. To make sure type “detail disk” and press enter

It will output details of currently selected disk. Double check you’ve selected the correct one. If you clean wrong disk it’s bye, bye data. After you’re sure you’re sure 🙂 type “clean” and press enter. You should get a message saying it’s been successfully cleaned. If there was some kind of error make sure you’ve started Command Prompt as administrator.

And that’s it for preparing your CF/HDD. You can check with “detail disk” and/or “list disk” (selected disk will get * sign in front of it) commands to see if it’s been cleaned.

Tools and preparation

To make it a bit easier I’ve prepared small pack of tools and file systems. Simply unzip them in folder and assign the folder as hard drive in WinUAE, we’ll get into more details a bit later. Inside the archive is

Diskmaster – Norton Commnder like file manager
HDInstTools
HDToolBox
loadmodule – command line tool, used for loading modules, we use it to load updated scsi.device that enables large hdd usage
Reboot – command line soft reset tool
CLI – Shell
scsi.device – doobrey’s pacthed scsi.device v44.20, I use it without problems with all my A600/A1200
FS folder – I’ve included few filesystems in this folder, few versions of FFS and latest (at the moment v18.5) PFS3 AIO, you can get newest version from aminet
scsi folder – Here I’ve included two scsi.device files I used so far. scsi.device.44.20 is the same one as above, scsi.device.43.45 is patched version of scsi.device 43.43 from WB3.9 BB2 update, reason I included it was because I had problems with 44.20 when used on regular A500 with KS3.1, for some reason it was crashing when it tried to load it, but this version, 43.45, worked fine. I guess it might be something to do with 68000 CPU, when I connected ACA500 with ACA1220 (68020 CPU) to this same A500 it worked fine with v44.20. So just in case, here are both versions.

PrepTools_v02.zip
Dropbox download (from article author)
Alternative download location (shared from my online storage)

WinUAE settings

We’re almost ready for actual work, almost :). First, run WinUAE as administrator, same as with command prompt. Find it’s shortcut (or WinUAE.exe), right click it and choose “Run as administrator”. This will allow WinUAE to access CF card, otherwise OS will block direct access to it.

To make it a bit faster I set WinUAE to emulate a bit beefier then standard Amiga. These are setting that I use for prepping CF cards, WB installations, file copying and so on. I saved it as config so I don’t have to set it up every time.

For ROM settings use Kickstart 3.0 or 3.1, whatever you usually use, for floppy settings mount either Workbench or WorkBench Install floppy (again, either 3.0 or 3.1, whatever you usually use) and set it to turbo speed (slider to maximum left), to speed up WorkBench load.

If you use Workbench floppy instead of Workbench install floppy you’ll get one warning from HDToolBox later on, nothing important, we’ll get to that later, doesn’t really matter.

Now go to HDD settings (CD & Hard drives) and click “Add Directory or Archive…” button

Browse to the folder you unpacked archive from previous chapter. For “Device name” and “Volume label” enter whatever you like. I simply enter “f” in those fields and I’ll use “f” throughout this tutorial. No special reason, that simply means that within workbench you’ll be able to find those files in drive “f”.

Now we need to add CF card to our virtual Amiga. Click “Add Hard Drive…” button, in new window click on the drop down menu and choose your drive.

Also, from drop down menu that says “UAE” choose “A600/A1200/A4000” and click “Add hard drive” button.

Finally, all preparation is done. All that’s left is to click “Start” button and load Workbench. You haven’t forgot to assign WB3.x floppy to floppy drive, have you?

Preparing the card

After it finishes loading you should get something like this

First thing we need to do is load patched scsi.device, original one is limited to 4GB and since our card is 16 GB we need to do something about it. If you’ll use 4 GB card you can skip this scsi.device thing, or if you use direct scsi enabled filesystem you can use up to 8 GB HDDs, like PFS3DS, but I prefer to use scsi.device approach even with 8 GB cards.

To load it we need to get to Shell. Since there’s no Shell on Workbench Install floppy I’ve included it in tools archive. Open drive “f” and you’ll find Shell there

Alternatively, if you used Workbench floppy to boot you can also find Shell in Workbench floppy, System drawer.

Switch to drive “f” by typing “f:”, followed by enter key, and finally type “loadmodule scsi.device” and press enter. This will load new scsi.device to memory and reboot our virtual Amiga. After it boots again, we can go back to shell and type “version scsi.device”, output should say version 44.20.

If you reboot from WinUAE (F12 and then “Reset” button) or stop/start emulation again, you’ll have to repeat this “loadmodule scsi.device” procedure, loadmodule survives only soft reset (ctrl + amiga + amiga, or reboot from command line, remember that Reboot file from zip archive?).

Now that we’ve loaded patched/updated scsi.device we can proceed. Open F drive, HDToolBox drawer and finally run HDToolBox.

HDToolBox should load and show one unknown drive. So let’s introduce them, click “Change Drive Type” button.

Click “Define New…”

And Finally “Read Configuration”, to get drive geometry information.

You’ll get one info dialog so just click Continue and you’ll get correct geometry values. Don’t mind Size negative size. That’s only visual, HDToolBox wasn’t meant for drives so big so they never bothered to use big variables, this is simple programming variable overflow, drive will be formatted correctly.

If you want to precisely set partition sizes you can use calculator I made, at bottom left there’s link to PDF on how to use it. You just need Cylinders, Heads and Block per Track values from this HDToolBox window.

Now just click “Ok” on this and next window.

If you used Workbench floppy to boot you’ll probably get warning complaining how it can’t find L:FastFileSystem, just click continue. Reason for this is that Workbench floppy doesn’t have FFS driver on it. It’s on Install floppy, where HDToolBox usually is so it can find it automatically. If you used Workbench install floppy to boot you’ll simply be back to starting HDToolBox window.

Now that we’re back at starting window, you’ll notice that all buttons have unlocked and that drive is no longer “unknown”. Click “Partition Drive” button

Add checkmark on “Advanced Options” checkbox

Edit “Partition Device Name” from UDH0 to DH0 (I guess it doesn’t matter, but traditionally HDD partitions are named DH0, DH1 and so on), and click on “Add/Update…” button.

Again, if you used Workbench floppy to boot, you wont’ have anything in the list. If you used Workbench install floppy you’ll have Fast File System loaded. If you don’t intend to use it, simply select it and click “Delete File System” button.

To add new file system click on “Add New File System…” button

And type path to file containing desired file system. In that zip file from beginning I’ve put them in FS folder and file name is pfs3_aio-handler, so in this case I typed “f:fs/pfs3_aio-handler”, and click “Ok” button.

Now we need to enter DosType for PFS3, for PFS3 it’s

0x50465303

For PFS3DS aka PDS3 DosType would be 0x50445303 (pfs3_aio-handler supports PDS3, you just need to type this instead of PFS3 one, everything else is the same) and FFS would use 0x444F5301, just for info.

You can leave “Version” and “Revision” fields at default values, sometimes I edit “Revision” to 5 since this is PFS3 v18.5 but it’s not like it really matters. Again, click “Ok” button.

Now we have PFS3 loaded. We can load more filesystems, I’ve included few FFS versions in FS folder. When I started with Amigas few years ago I usually used FFS for DH0 and PFS3 for DH1, but actually there’s not much point to it, PFS3 is better (more modern) than FFS, and OS had to load two drivers so that resulted in a bit more memory used.

Now to set the partition up. I’ve resized it to 500 MB. You can do this via partition slider, which is unprecise, or by directly entering Start Cyl and End Cyl values. Which is what I did. To get those values you can use calculator I mentioned earlier. Finally, click on “Change…” button.

First click on “File System:” block thingy until it says “PFS\03” and then edit MaxTransfer value to 0x1fe00 (these are zeroes, not “O”s) AND PRESS ENTER TO CONFIRM THE VALUE. This is a “feature” on this window, if you enter the value and click “Ok” it will not apply but revert to original value. You have to press enter and then click “Ok” button.

Now set second partition to size you want. I usually use all of the rest of space for it, you can simply stretch it, no need to be precise for that. And repeat last step on it (Change…, File System, MaxTransfer). After you’re done with both (or more) partitions click “Ok” button to return to main HDToolBox window. All that’s left is to click “Save Changes to Drive” button. Only visible difference will be drive status, it will change from “Changed” to “Not Changed”.

Exit HDToolBox and reboot. In some rare occasions new partitions appeared immediately after I saved changes in HDToolBox, but in 90% of cases they didn’t. After reboot they appeared.

Easiest way is to double click Reboot icon that should be in “F” folder so do it. Or open shell again, go to drive “F” and type “reboot” followed by enter. But double clicking Reboot icon is faster/easier.

If you reboot from WinUAE control panel, you’ll have to do that “loadmodule scsi.device” thingy again. Alternative is to reboot via keyboard shortcut (Ctrl + Amiga + Amiga).

After reboot you may have to wait few seconds (3-5) for partitions to appear. But they should appear.

Select first one (DH0), press right mouse button and go to toolbar at the top, choose “Icons” and “Format Disk…”


Enter name you want your drive to have, like System, Main, Workbench… whatever, uncheck “Put Trashcan” checkbox if you want (I uncheck it) and click on “Quick Format” button. This is a must when using flash media like CF cards.

You’ll get two warnings asking you if you’re sure you want to format it, click “Format” button on both dialogs.

Lastly you’ll get one more dialog, simply informing you about some PFS3 info, click “Ok” and wait a bit for format to complete.

Repeat for second (and all consecutive ones if you made them) partition, this one might take 30-60 seconds to complete as it’s quite a bit larger. After it’s done you’ll have two partitions, 500 MB and 14+ GB formatted as PFS3.

Now you can install Workbench on it. But remember, if you make hard reset you’ll have to manually load patched scsi.device again, BEFORE you make any change to filesystem. Usually first partition will be accessible since it’s 500 MB, but DH1 will be NDOS again until you load scsi.device.

If you install Classic Workbench you can simply copy this scsi.device to DH0:DEVS folder, it will load it automatically on boot. If you install “plain” Workbench you’ll have to manually add it to startup-sequence. Tutorial on how to do this is here.

Just be sure to use same scsi.device you used to when partitioning the drive. There are more than one, others might work, but they may also result in corrupted data.

Create a bootable USB-disk for installations and tools using .iso images

The Acronis way

This method uses Grub4Dos and standard windows/dos utilities. Works only for smaller images (less than 2GB) and only for Legacy boot (not UEFI). See links at the end of the article for other methods.

Cloned from: https://kb.acronis.com/content/57232

Downloading grub4dos

Download grub4dos utility and grub installer to your computer and unpack them.
Currently, the latest version of grub4dos is grub4dos-0.4.4.zip and the latest version of grub installer is grubinst-1.1-bin-w32-2008-01-01.zip.

Making USB bootable

1. In Windows Explorer, open the installer’s folder and select grubinst_gui.exe:

2. Run the application:
Windows XP: Double-click grubinst_gui.exe
Windows 7 or later: Right-click grubinst_gui.exe and select Run as administrator:

3. Select Disk, then click Refresh and select the drive you want to create a bootable media on:

You can detect your drive by its size. In this example an 8GB flash drive is used.

3. In Part List click Refresh.

4. From the dropdown box select Whole disk (MBR):

5. Check the Don’t search floppy option, leave all the other options unchecked:

6. Click Install.
If the installation completes successfully, you will see this message:

7. Press Enter.

8. In Windows Explorer open the grub4dos folder, locate grldr and copy it to the target drive:

Creating ISO files of Acronis products

  1. Run the media builder of Acronis True Image.
  2. Select ISO file when offered to choose media destination:
  3. Create the ISO. You can save the ISO file directly to your flash drive or copy in later.
  4. Run the media builder of Acronis Disk Director.
  5. Select ISO file when offered to choose media destination:
  6. Create the ISO. You can save the ISO file directly to your flash drive or copy in later.

Setting up multiproduct boot

  1. Copy the ISO files to the flash drive if you haven’t done it yet. Now you should have 3 files on the drive:
  2. Open Notepad.
  3. Insert this content:
    timeout 10
    default 0title Acronis Disk Director
    map –mem –heads=0 –sectors-per-track=0 (hd0,0)/<DiskDirector>.iso (hd32)
    map –hook
    chainloader (hd32)
    boot

    title Acronis True Image
    map –mem –heads=0 –sectors-per-track=0 (hd0,0)/<TrueImage>.iso (hd32)
    map –hook
    chainloader (hd32)
    boot

    title CommandLine
    commandline

    title Reboot
    reboot

    title Halt
    halt

where <DiskDirector> is the name of the ISO file created in Acronis Disk Director and <TrueImage> is the ISO file created with Acronis True Image.

4. Save the file as menu.lst to the root directory of your flash drive. In Save as type select All files, otherwise the file might be saved as a .txt-file while we need a .lst-file.

You can double-check the file extention in Windows Explorer:

If you don’t see the extention, check this article for help.

Now your USB drive is ready and you can boot your computer with it.

Other methods

YUMI – Multiboot USB Creator

Ventoy – A New Bootable USB Solution

Recommended tools to put on the USB-drive

MiniTool Partition Wizard

The best partition manager
Version 9 and 9.1 is downloadable from here: http://www.it.nrru.ac.th/download/utilities/ (140MB)

HDClone

HDClone 6 Free Edition

Trinity Rescue Kit

Trinity Rescue Kit

Creating a bootable USB stick for Windows installation using diskpart

Cloned from: https://blog.bramp.net/post/2008/06/23/create-bootable-windows-server-2008-usb-stick/

Start diskpart

DISKPART> list disk

     Select the USB device from the list and substitute the disk number below
     when necessary

DISKPART> select disk 1
DISKPART> clean
DISKPART> create partition primary
DISKPART> select partition 1
DISKPART> active
DISKPART> format fs=fat32
DISKPART> assign
DISKPART> exit

xcopy X:\*.* /s/e/f Y:\

     where X:\ is your mounted image or physical DVD and Y:\ is your USB
     device

Diskpart info: http://www.computerhope.com/diskpart.htm
See also: USB install media with WIM file larger than 4GB