*** DISCLAIMER: The information on these pages is not an official instruction or documentation. No responsibility will be taken. Use at your own risk. ***

Thursday, November 14, 2024

Why does copying to PCMCIA CompactFlash card fail with "file already exists", when a new, empty directory has just been created?

Problem symptoms

  • Copying a directory structure to a CompactFlash card in the PCMCIA slot (via adapter) fails with "file already exists", right after the very directory which should contain the file has been created.
  • Extracting .lha archives from a CompactFlash card in the PCMCIA slot (via adapter) produces a lot of errors

Solution

That's a bug in older versions of FAT95. 

Update FAT95 to the latest version.

https://aminet.net/package/disk/misc/fat95 (currently v3.18)

Friday, November 8, 2024

What's the difference between TAG_DONE and TAG_END in AmigaOS C code?

There is none - it's one and the same.

TAG_DONE and TAG_END are defined as identical clones in NDK2.0:

NDK2.0-4/include/utility/tagitem.h

#define TAG_DONE   (0L) /* terminates array of TagItems. ti_Data unused */
#define TAG_END TAG_DONE

NDK3.1 (and higher) has a slightly different definition of TAG_END, but it's still identical:

Includes\&Libs/include_h/utility/tagitem.h

#define TAG_DONE (0L) /* terminates array of TagItems. ti_Data unused */
#define TAG_END (0L) /* synonym for TAG_DONE */

Sunday, November 3, 2024

Why does HippoPlayer report an error with the HippoPlayer.group file?

The HippoPlayer.group must match the HippoPlayer executable ("HiP"), meaning it must be taken from the same archive/package/distribution as the executable.

HippoPlayer first looks for HippoPlayer.group file in the executable's directory ("PROGDIR:"). 

Then it looks for the file in the location given in HippoPlayer's settings (preferences).

If HippoPlayer reports an error with the HippoPlayer.group file, there's either a wrong one in PROGDIR:, or HippoPlayer's settings point to a non-existent, or wrong HippoPlayer.group file elsewhere.

Simplest solution is to just put the correct HippoPlayer.group file into PROGDIR:, and delete HippoPlayer.group files elsewhere.

Files and file sizes, for identification:

Hippoplayer v2.45:
Executable ("HiP"): 89036 Bytes
"HippoPlayer.group": 81954 Bytes

HippoPlayer v2.61:
Executable ("HiP"): 147636 Bytes
"HippoPlayer.group": 258010 Bytes

Wednesday, October 30, 2024

How to build the "datalink" cable required for "RVF Honda" 2-player link mode?

Note: This is currently untested. The picture looks like it's from the original docs, but no successful first hand experience has been reported yet. (No unsuccessful either.)

To play motorcycle racing game "RVF Honda" in 2-player link mode, a special "Data Link" cable is required, that connects two Amigas' (or Atari STs') parallel ports.

A "Data Link" cable is not a "laplink" cable, not a "parnet" cable, not a "PC2Am" cable - these are all different. (And it's not any type of serial cable, e.g. nullmodem.)

Basically, "RVF Honda"'s "Data Link" cable connects 8 data lines and pin 25 (GND) pin-on-pin, and pins 11 (BUSY) and 12 (POUT) cross-over, between the two machines' parallel ports.

It's probably good practice to not connect unused pins to avoid side-effects (e.g. pin 14 +5V, Amiga 1000 pin 23).

"Data Link" cable wiring/pinout for Amiga and Atari ST computers' parallel/printer port

As can be seen in the picture, on Atari ST computers' printer port, use pin 1 (STROBE) instead of pin 12. 

In addition to the cable, a version of the game is required that supports "Data Link", which is indicated by a menu entry at the bottom of the game's main menu. (Most available Amiga versions should support "Data Link".) 

To establish the link, connect both computers while they're powered off, then power on and load the game on one computer, then power on the other one, and load the game on that one. On the first computer, select "Data Link" from the menu.

Note: When a nullmodem cable is used to connect the computers, there might be some activity due to a line shared with the parallel port (serial RI, parallel SEL), but it's just a side-effect..

Additional sources:
https://amiga.abime.net/games/view/rvf-honda
https://imgur.com/AGA5aLN (schematics picture)


Saturday, October 26, 2024

How to view / convert IFF ILBM image files under Linux?

ffmpeg can convert IFF ILBM images and ANIM animations. For example to create a JPEG file from an ILBM:

ffmpeg -i myimage.iff myimage.jpg


ffplay supports all file formats supported by ffmpeg, so it can "play" IFF images and animations:

ffplay myimage.iff


netpbm (netpbm-progs) can convert IFF ILBM to its native image format, and from there to many other formats. For example, to create a JPEG file, use "ilbmtoppm" and "pnmtojpeg":

cat myimage.iff | ilbmtoppm | pnmtojpeg > myimage.jpg


ImageMagick also uses "ilbmtoppm", so you can use its commands to process IFF ILBM picture files. For example "convert":

convert myimage.iff myimage.png


GIMP supports IFF ILBM images with a plugin.

https://github.com/unwind/gimpilbm

 

xiffview can show IFF ILBM images on X screens, and gives some information about them (palette, bitmaps). (Only simple images are currently supported - no HAM, EHB, ...)

https://aminet.net/package/misc/unix/xiffview


Sunday, March 5, 2023

How to prepare a CompactFlash card for Amiga PCMCIA using Linux

Note: If you have an new, unused CompactFlash card, it's probably already FAT formatted, so the procedure described here isn't required - you can use your card right away. It is only required if you'd like to change the partition layout of the card, or if there's no usable FAT partition on the card.

An example how to prepare a CompactFlash card for Amiga compactflash.device (cfd) / FAT95 using Linux Fedora Core 33.

The idea is to wipe the CompactFlash card, and create one big partition for Amiga PCMCIA slot use. The procedure should basically be the same on all Linux distributions. Make sure your "mkfs" command has "vfat" support (which it probably has).

0. unplug CompactFlash card device

This makes it easy to identify the card, by plugging it in and watching what happens (see next step).

1. open a shell, log in as root, and watch your system's messages

On Linux Fedora, the system writes messages to /var/log/messages. "tail -f" displays the file's last lines (tail), and updates the output as the file changes ("-f" = "follow").

Watch system messages

2. plug in and identify CompactFlash card device

Plug in your CompactFlash card / reader. The reader used in this example has four slots, with a 1GB CompactFlash card inserted into one of them. As we can see it shows up in the log as drive "sdc".

Find drive name

3. run "fdisk", review and remove existing partitions

This CompactFlash card already has a couple of partitions - we just remove all and start from scratch. In this example, the shell command is "fdisk /dev/sdc" - replace "sdc" with your card(reader)'s drive name from previous step. fdisk's command to print the partition table is "p", and to delete a partition it's "d".

Remove existing partitions (if required/desired)

4. add new partition, set size and file system type

We want to create one big partition for Amiga use. fdisk provides default values for a full size partition, but we leave a little space at the end, in case some emergency-space is required one day. fdisk's command to create a new partition is "a" ("add"). See fdisk's output for size specification.

Add new partition

The new partition has been created with file system type ID 83 / Linux - we have to change that to Windows FAT95.

fdisk's command to set partition type is "t". It automatically selects our only partition (otherwise it would ask for partition number), then asks for new partition type (or "L" to list all types): 

Change partition type

For Amiga's FAT95 filesystem we need partition type "W95 FAT32", which has the Id "b" (or "0b"), as shown by the list of types:

Type Id "b" is for "W95 FAT32"

5. save changes (and reboot)

We're almost done. Enter "p" to print the partition table. It should now show Id "b" and Type "W95 FAT32".

Enter "w" ("write") to save changes.

Review changes, and save

In this example, previously existing partitions on the CompactFlash card were still mounted - see red error messages - so we reboot system with "shutdown -r now".

If your system didn't mount any partitions from your card, then no reboot is required.

Watch your system's messages, re-plug your CompactFlash card (reader), and note its drive name (as in steps 1 and 2) - it probably hasn't changed, just to make sure.

Re-plug and re-check drive name before formatting

6. format new partition as FAT filesystem

Just to make sure we review our partition table before formatting. Run fdisk with your drive's name (example: fdisk /dev/sdc), then enter "p" to print partition table. Note the number of your partition - probably 1. (example: /dev/sdc1, which is number 1.)

Make sure it's the right drive name and partition number

Here's a little optional step that you can safely skip: Activate the partition for booting. The Amiga (compactflash.device / FAT95 / PCMCIA slot) doesn't care, but it might come in handy some day if this CompactFlash card is put into some other machine. fdisk's command to make a partition bootable is "a" ("activate"). Enter "w" to save changes when done. (The new partition wasn't mounted, so changes take effect immediately, no reboot required.)

Optional: make partition bootable (ignored by the Amiga)

Finally, format the new partition with "mkfs" as filesystem type "vfat". Depending on your Linux distro, your mkfs command might look different. On Linux Fedora Core 33 "mkfs.vfat" is available to create a FAT filesystem. On other systems you may have to give command line options (e.g. "mkfs -t vfat ...").

In this example, the full command is: mkfs.vfat /dev/sdc1

Format new partition as type "vfat"

We're done!

To test our newly prepared CompactFlash card, we unplug, and re-insert it. Now the system should auto-mount the new partition.

New partition auto-mounts

This is what it looks like in PCManFM filemanager:

Empty partition in PCManFM filemanager

And here's the information given by "mount", "ls" and "df"

Command line information about the partition

Amiga PCMCIA slot

This is how the CompactFlash card (CF0:) looks from the Amiga side when put into the PCMCIA slot (via adapter) with compactflash.device and FAT95 installed:

Amiga "info" command output

Compactflash.device:
http://aminet.net/package/driver/media/CFD133

FAT95 filesystem:
http://aminet.net/package/disk/misc/fat95

(Note: Check for latest versions)



Sunday, March 8, 2020

How do you convert lha to ADF?

The contents of the files are completely different:

  • lha file is a compressed image of one or more files (files, folders)
  • ADF is a raw, fixed size (DD floppy = 880KB) track-by-track image of an AmigaDOS formatted floppy disk (that might, or might not be bootable)

To use the contents of an lha file from an ADF ("convert to ADF"), you have to extract the lha file, and write its contents to an ADF.  
(This implies that the contents of the lha file must fit onto a floppy disk - if they don't, extra work is required, which is beyond the scope of this article.)

You can do so for example by inserting some ADF (preferably a copy, or an empty one!) to your Amiga emulator. Make sure your emulator settings allow for writing to ADF files. Format the disk (ADF) if required, then extract lha to that disk. Example:

> format drive df0: name my_floppy_disk
> lha x myarchive.lha df0:

Note that every good archive - if it contains more than one file - should contain a root folder. Let's assume your archive is a good one, and let's assume the name of the root folder inside the archive is "rootfolder". For your disk (ADF), you probably want the disk itself to be the root folder. So instead of the above steps, directly extracting your lha file to disk, you might want to extract, then copy folder contents. Example:

> format drive df0: name my_floppy_disk
> makedir RAM:adfdir
> lha x myarchive.lha RAM:adfdir
> copy RAM:adfdir/rootfolder/#? df0: all clone


If you're using an emulator, you're done. The contents of your lha archive are now stored in an ADF file. Quit emulator, use ADF as desired.

Using a hardware Amiga with a physical or emulated floppy drive, the procedure is the same, but you'll obviously end up with a floppy disk, not an ADF. You can then use transadf from AmiNet, or any other ADF-reading tool, to create your ADF. Example:

> transadf df0: my_adf.adf

(Here's a floppy emulator that runs on all AmigaOS versions: http://aminet.net/package/disk/misc/fms_20)



To make the disk (ADF) bootable:

Run "install" from a shell. Example:

> install df0:

Then create a text file "s/startup-sequence" that contains the commands to be run on boot - you can use AmigaOS's ed, or any other text editor. Example:

> ed df0:s/startup-sequence

Example: If you want to run "mygame" from folder "myfolder", put this line into the "startup-sequence" file:

myfolder/mygame