Howto create your own ARAnyM setup from scratch

We, ARAnyM developpers hear many horror tales about ARAnyM installation, configuration and setup by beginners, or even people which know a lot about Atari computers.

Maybe we should share knowledge about how we got a working configuration using ARAnyM and pure Atari software? So let's start.

0 - Table of contents

1 - Compilation, getting an ARAnyM binary

2 - First try

3 - Setup the operating system

3.1 - TOS

3.2 - EmuTOS

3.3 - Linux/m68k

3.3.1 - Ramdisk image file
3.3.2 - Floppy disk or image file
3.3.3 - Linux/m68k example boot log, using ramdisk image file

4 - Create and setup a floppy disk image

4.1 - Under Linux (and maybe other Unices)

4.1.1 - From a real floppy disk
4.1.2 - From scratch (top l33t!)

4.2 - Some other OS

5 - Create and setup a hard disk image (IDE emulation)

5.1 - Create the hard disk image

5.2 - Partition the hard disk image (Atari side)

5.2.1 - Atari HDX 5.04
5.2.2 - Cecile 2.22
5.2.3 - HD Driver 8.13
5.2.4 - CBHD 5.02
5.2.5 - SCSI Tools 6.52
5.2.6 - ADSCSI

5.3 - Partition the hard disk image under Linux

5.3.1 - Using fdisk
5.3.2 - Using sfdisk

6 - ARAnyM specific drivers

6.1 - FVDI

6.1.1 - Setting FVDI's video resolution
6.1.2 - Using host mouse cursor
6.1.3 - Selecting VDI renderer

6.2 - Filesystem driver

6.2.1 - MetaDOS driver
6.2.2 - MiNT driver

6.3 - Network driver

6.4 - CD-ROM driver

6.5 - JPEG image decoder

6.6 - OSMesa software OpenGL driver

6.7 - PCI driver

6.8 - Audio driver

7 - Links


1 - Compilation, getting an ARAnyM binary

If you are skilled enough to compile sources, you don't need any help, except for knowing which elements you need to enable at configure time. [TODO].

For now, I consider you got a binary for ARAnyM (either .exe or anything else that can be launched).

2 - First try

If you do a fresh start (no existing configuration file), you'd better launch ARAnyM from a console window (the black/white thing where you type mystical commands), whatever your OS (Linux, win32, or MacOSX). It will be easier for you to know what prevents ARAnyM from working.

$ aranym
ARAnyM 0.9.2pre1
Config file '/home/patrice/.aranym/config' not found.
The config file is created with default values. Edit it to suit your needs.
TOS image '/usr/local/share/aranym/ROM' not found.
EmuTOS image '/usr/local/share/aranym/etos512k.img' not found.
No operating system found. ARAnyM can not boot!
Visit http://emutos.sourceforge.net/ and get your copy of EmuTOS now.
Couldn't protect ROM

So what do have? First, it does not find its configuration file (the path to this file is OS-dependent, it should written somewhere in the doc). On any Unix system, it is '${HOME}/.aranym/config'. As the program says, it creates a default one, so you only need to read where it is created, and then you'll have to edit it to suit your needs.

You'll also get a default nvram setting, which is VGA monitor, 320x200x16 colors boot screen and some other default setting for date format, keyboard and country. You can change it by using a nvram utility like 'bootconf.prg' [1].

3 - Setup the operating system

ARAnyM is only the hardware platform on which the Atari software will run. And the first software to run before you can run an application is an Atari Operating System:

Original Atari machines and clones have an operating system residing in a ROM chip on the motherboard: the TOS. ARAnyM supports only the 4.04 version of the TOS, which is the latest produced by Atari for the Falcon 030. There are some dumping software that can read it from your Falcon for use with ARAnyM.

You can also use a more recent license-free operating system ROM image, that is EmuTOS [2].

The latest possibility is to use Linux/m68k kernel as an alternative OS. Running it requires ARAnyM to be compiled with MMU (so you'll get no JIT, and using MMU slows down the m68k emulation a lot) and Lilo (Linux loader) support.

3.1 - TOS

Just edit the config file, in the [GLOBAL] section, you'll find the 'TOS=' line to fill with the complete path to a TOS 4.04 ROM image file. If you run ARAnyM with it, after the Atari logo, you should reach the well-known GEM desktop.

$ aranym
ARAnyM 0.9.2pre1
Using config file: '/home/patrice/.aranym/config'
[snip]
TOS 4.04 loading... [OK]
NVRAM loaded from '/home/patrice/.aranym/nvram'
TunTap(0): ERROR: aratapif not found. Ethernet disabled!
TunTap(0): ERROR: aratapif not found. Ethernet disabled!
Floppy read(-1, 001cc6, 1) failed.

3.2 - EmuTOS

Just like TOS, edit the config file, in the [GLOBAL] section, you'll get the 'EmuTOS=' line to fill with the complete path to a EmuTOS ROM image file. If you have both TOS and EmuTOS available, ARAnyM defaults to TOS. You can force EmuTOS usage using '-e' command-line parameter:

$ aranym -e
ARAnyM 0.9.2pre1
Using config file: '/home/patrice/.aranym/config'
[snip]
EmuTOS 2005/09/18 loading from '/usr/local/share/atari-emu/emutos-0.8.1-512k.img'... [OK]
NVRAM loaded from '/home/patrice/.aranym/nvram'
TunTap(0): ERROR: aratapif not found. Ethernet disabled!
TunTap(0): ERROR: aratapif not found. Ethernet disabled!
BIOS: Detected memory: ST-RAM = 14 MB, FastRAM = 0 MB
BDOS: Address of basepage = 00013000
BDOS: cinit - osinit successful ...
Floppy read(-1, 009fcc, 1) failed.
hdv_boot returns 3

There you get the EmuTOS boot screen, pressing any key provides this crash.

Panic: bus error. misc = 0x2000, address = 0x00e01254
opcode = 0x7008, sr = 0x602e, pc = 0x02060000
Aregs: 602e0206 00e2bdac 00018a40 00018c74  00000000 00014a90 000151da 00015144
Dregs: 0000046c 00000004 0000001c 00000000  00000000 00000000 00000000 00000000
Processor halted.

3.3 - Linux/m68k

Linux/m68k settings have a special section [LILO] (for Linux loader), where you have some work to do. You must provide the kernel image [3] file to use (of course) in the line 'Kernel='. A list of arguments to pass to the kernel to tell it some infos about the system, in the line 'Args=', and a root filesystem.

The 'Args=' line must be filled with some infos, like the Atari frame buffer format, or more precisely, the video mode to use. Interleaved bitplanes formats are not supported, so it must be either monochrome (use 'video=atafb:sthigh') or 16 bits true colour mode.

You also need to add 'console=tty0' if you enable debugging by adding 'debug debug=<debug device>' for the Linux kernel to open the root console, or it will fail to go further in the boot process once it has mounted its root filesystem.
The root filesystem is the filesystem the Linux kernel will boot from, and is required. It can be a ramdisk image file, a floppy disk, or a partition from a hard disk. For ARAnyM, the floppy disk and the partition can be image files.

Once these lines (Kernel, Args, maybe Ramdisk) are filled, you can start ARAnyM with '-l' command-line parameter (wait a bit before Linux kernel starts)

3.3.1 - Ramdisk image file

Give to ARAnyM's linux loader the full path to a ramdisk image file [3] in the line 'Ramdisk='. It can be gzipped, no need to uncompress it yourself.

You'll need to have 'root=/dev/ram load_ramdisk=1 ramdisk_size=<n>' in the 'Args=' line. Replace <n> with a size in KB to allocate for the uncompressed ramdisk in RAM, 8000 seems to be a good default value. In fact this value is the size of the uncompressed ramdisk image. Remember you only have 14MB of STRAM, so add at least 16MB of FastRam to ARAnyM if you want to try Linux/m68k. This is the 'FastRAM=' value in the [GLOBAL] section.

[LILO]
Kernel = /path/to/vmlinuz-2.2.25-atari
Args = root=/dev/ram load_ramdisk=1 ramdisk_size=8000 [add some other arguments if needed]
Ramdisk = /path/to/initrd22.gz

3.3.2 - Floppy disk or image file

If you use the floppy disk image atari-root.img.gz from [3], uncompress it using gunzip, then edit the configuration file this way, to boot from the floppy disk image. You could also dd/rawcopy the image file to a real floppy disk, and use 'Floppy =' to point to your real floppy drive.

[GLOBAL]
Floppy = /path/to/atari-root.img

[LILO]
Kernel = /path/to/vmlinuz-2.2.25-atari
Args = root=/dev/fd0 [add some other arguments if needed]

3.3.3 - Linux/m68k example boot log, using ramdisk image file

Note: I already had a 4MB disk image as IDE0 disk (hda in the log).

$ aranym -l
Linux version 2.2.25-atari (root@aahz) (gcc version 2.7.2.3) #1 Wed Mar 17 18:40:05 CET 2004
Atari hardware found: VIDEL STDMA-SCSI ST_MFP STND_DMA YM2149 PCM CODEC DSP56K ANALOG_JOY BLITTER IDE TT_CLK FDC_SPEED
Console: colour dummy device 80x25
Calibrating delay loop... 1.02 BogoMIPS
Memory: 15872k/30720k available (1152k kernel code, 624k data, 72k init)
Dentry hash table entries: 4096 (order 3, 32k)
Buffer cache hash table entries: 32768 (order 5, 128k)
kmem_create: Forcing size word alignment - buffer_head
Page cache hash table entries: 8192 (order 3, 32k)
kmem_create: Forcing size word alignment - filp
VFS: Diskquotas version dquot_6.4.0 initialized
kmem_create: Forcing size word alignment - dquot
POSIX conformance testing by UNIFIX
Linux/m68k PCI BIOS32 revision 0.01
PCI: No PCI bus detected
Linux NET4.0 for Linux 2.2
Based upon Swansea University Computer Society NET3.039
kmem_create: Forcing size word alignment - sock
kmem_create: Forcing size word alignment - skbuff_head_cache
NET4: Unix domain sockets 1.0 for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
kmem_create: Forcing size word alignment - tcp_open_request
kmem_create: Forcing size word alignment - tcp_tw_bucket
TCP: Hash tables configured (ehash 32768 bhash 32768)
Initializing RT netlink socket
Starting kswapd v 1.5
Console: switching to mono frame buffer device 80x25
Determined 640x400, depth 1
   virtual 640x870
fb0: Atari Builtin sthigh frame buffer device, using 68K of video memory
M68K Serial driver version 1.01
pty: 256 Unix98 ptys configured
Atari mouse installed.
Real Time Clock Driver v1.10
Non-volatile memory driver v1.2
Probing nvram size...  found 64 bytes
RAM disk driver initialized:  16 RAM disks of 8000K size
loop: registered device at major 7
ide0: Falcon IDE interface
hda: Master, ATA DISK drive
ide0 at fff00000 on irq 0x0000000f
hda: Master, 3MB w/256kB Cache, CHS=8/16/63
Atari floppy driver: max. HD, track buffering
Probing floppy drive(s):
fd0
md driver 0.36.6 MAX_MD_DEV=4, MAX_REAL=8
Atari SCSI: resetting the SCSI bus... done
scsi0: options CAN_QUEUE=8 CMD_PER_LUN=1 SCAT-GAT=0 TAGGED-QUEUING=no HOSTID=7 generic options AUTOSENSE REAL DMA SCSI-2 TAGGED QUEUING generic release=7
scsi0 : Atari native SCSI
scsi : 1 host.
scsi : detected total.
Partition check:
 hda: AHDI GEM(3) hda1
VFS: Mounted root (ext2 filesystem) readonly.
Setting up filesystem, please wait ...
umount: /initrd: Invalid argument
mount: Mounting devfs on /dev failed: No such device
Starting system log daemon: syslogd, klogd.
Setting up Userspace DevFS:
  Detecting cdrom devices ...
Creating cdrom devices ...
  Hard disk and partitions ...
  Userdevfs sub-arch specific handling ...
Userdevfs done.
[not patient enough to wait more :-)]

4 - Create and setup a floppy disk image

If your system does not have a floppy drive, or the direct floppy usage is not supported on your system - i.e. not win32 and Linux/Unix (correct me if it's wrong -, then your only option to start some Atari software is by using floppy disk images.

The floppy image can be selected in Aranym GUI, press 'Pause' (or the OS-dependent key which has this feature, read the doc), and go to disk submenu. This is the topmost feature on this screen. Or you can edit the configuration file, line 'Floppy=' in [GLOBAL] section.

But we must create one first, before ARAnyM can use it.

4.1 - Under Linux (and maybe other Unices)

4.1.1 - From a real floppy disk

Creating a floppy image from a real floppy disk is dead simple:

$ dd if=/dev/fd0 of=/path/to/floppy.img

4.1.2 - From scratch (top l33t!)

First, we create an empty file, which has the same size as a 1.44 MB floppy.

$ dd if=/dev/zero of=/path/to/floppy.img bs=1024 count=1440

Then, we format it (using either vfat or msdos file system):

$ /sbin/mkfs.msdos /path/to/floppy.img

It was easy to put files from an Atari system from a floppy disk to a floppy image. But if we already have the Atari files on the host system, how can we put them on the floppy image? Well, we mount it using the special loopback device:

# losetup /dev/loop0 /path/to/floppy.img
# mount -t msdos /dev/loop0 /mnt

Note: only root user can create this special mapping, and now, your floppy image is mounted in /mnt on your host system. You can copy your Atari files to it. When you are finished with this transfer task, unmount the floppy image, and unset the loop device:

# unmount /mnt
# losetup -d /dev/loop0

4.2 - Some other OS

[TODO]

5 - Create and setup a hard disk image (IDE emulation)

I won't explain how to use a real hard disk from your old Atari computer, it is safer to use a blank disk image to test. So, I will make it using TOS.

5.1 - Create the hard disk image

Run ARAnyM, once you reach the GEM desktop, press 'Pause' (or the OS-dependent key which has this feature, read the doc), and go to disk submenu. There you can choose the floppy disk image, and one hard disk image for each IDE device (master and slave).

Select 'Path' and choose the location (and name) of the hd image. Then select the size (in MB), and click 'Generate'. ARAnyM asks for confirmation, then does its job. A geometry has been chosen for this hd image (C/H/S = 8/16/63). Enable it by selecting the 'Present' checkbox. Select 'Apply' to go back to menu, then save the config file. If you shutdown ARAnyM, and edit the config file, you'll find what has been done in section [IDE0] of the config file.

On a real machine, it means we have plugged an hard disk in our machine, it does not mean there is software to drive it, which is the task of a hard disk driver. EmuTOS has one embedded, whereas TOS has not. However, the hard disk image must be partitionned to be used directly by EmuTOS:

$ aranym -e
ARAnyM 0.9.2pre1
Using config file: '/home/patrice/.aranym/config'
[snip]
hda: Non-ATARI root sector
[snip]

We need software to partition our hard disk image. Either from host side (with host specific tools that must create an Atari root sector), or from Atari side (using floppy disks or images to run software).

5.2 - Partition the hard disk image (Atari side)

We can use several Atari Hard Disk drivers:

The question is, which ones work with ARAnyM?

5.2.1 - Atari HDX 5.04

I got one error message when going to menu Disk->Partition, and ARAnyM crashes:

hard drive: io read to address f00001 unsupported
hard drive: shouldnt get here!
Segmentation fault

5.2.2 - Cecile 2.22

First run cecile.prg, so the partition utility (cc_tools.prg) can access the IDE hard disk. Run cc_tools.prg, select 'partition', then the first IDE hard disk. Create one partition on this hard disk. Then select 'install' to install the cecile.sys hard disk driver on it, selecting the first partition to boot from. Bingo, you can reboot ARAnyM, and it is now booting from the IDE disk image.

EmuTOS checks for partitions sizes against the whole disk size, and refuse to use the disk if partitions have boundaries outside the disk. The last partition created with Cecile on a hard disk has a wrong size (1 sector off limits), and if you have only 1 partition created, its size is wrong, and EmuTOS won't use it. So create at least 2 partitions if you want to boot EmuTOS.

5.2.3 - HD Driver 8.13

You run hddriver.prg first, so that hddrutil.prg can access your hard disk. Go to 'Hardisk' -> 'Partition...', select the IDE device and partition it. Don't forget to install the driver on it to boot from it under TOS.

Booting from EmuTOS also works with it.

5.2.4 - CBHD 5.02

Run 'cbhd.prg' for the utility to reach the IDE disk. Then run 'cbhdconf.app'. When you try to partition, there are some errors coming from ARAnyM, and partitioning fails:

SET FEATURES with unknown subcommand: 0x88
SET FEATURES with unknown subcommand: 0x88
SET FEATURES with unknown subcommand: 0x88
SET FEATURES with unknown subcommand: 0x8a
SET FEATURES with unknown subcommand: 0x8a
SET FEATURES with unknown subcommand: 0x8a
hard drive: RESET
write cmd 0xC4 (READ MULTIPLE) not supported
write cmd 0xC4 (READ MULTIPLE) not supported
write cmd 0xC4 (READ MULTIPLE) not supported
write cmd 0xC4 (READ MULTIPLE) not supported
write cmd 0xC4 (READ MULTIPLE) not supported
write cmd 0xC4 (READ MULTIPLE) not supported
write cmd 0xC4 (READ MULTIPLE) not supported
write cmd 0xC4 (READ MULTIPLE) not supported
write cmd 0xC4 (READ MULTIPLE) not supported

5.2.5 - SCSI Tools 6.52

Run 'hushi.prg' to start the driver. Then run 'scsitool.prg' to partition the hard disk image. Select 'Partitionen' -> 'Neu einrichten...' to create a new partition root sector for this image. Select 'Standard' in the dialog box, then you got a new dialog box where you choose partition types and sizes. Then select 'Ok' and 'Ja, partionieren...' to validate your changes.

Now you have to install the driver. In 'Treiber' menu, select 'Instalieren...'. Select the new partition where to install the hard disk driver. Once installed, reconfigure it so it does not search for SCSI or ACSI drives ('Gerätereihenfolge' in installation dialog box). Just keep I0 and I1 for IDE devices.

Surprinsingly, no error messages from the IDE emulation layer. And the image boots with both TOS and EmuTOS without problems.

5.2.6 - ADSCSI

Like other drivers, you need to run it first. The program is 'icdboot.prg'. All other programs, like 'hdutil.prg' (for configuration) requires it to be run. Unfortunately, it seems there is a problem with IDE emulation not suiting the driver:

IO write(f00000h): current command is 20h
IO read(f00000h) with drq == 0: last command was 20h

5.3 - Partition the hard disk image under Linux

Linux come with several partition utilities: mpartition (from mtools), cfdisk, fdisk, sfdisk, parted and many more. All these tools will create a PC-like root sector on the hard disk image, so not all Atari hard disk drivers can be installed on these.

ID you can use for partitions are 04 (FAT16<32MB), 06 (FAT16), 83 (Linux) for the most useful for an Atari system.

EmuTOS supports the PC root sector format without an hard disk driver.

5.3.1 - Using fdisk

You need to give it the C/H/S parameters of the disk image, as written in ARAnyM config file. In our case:

$ /sbin/fdisk -C 8 -H 16 -S 63 /path/to/harddisk.img

Press 'm' for some help. You need to create a partition (and choose its ID), then write the created partition table to the image before quitting.

5.3.2 - Using sfdisk

You need to give it the C/H/S parameters of the disk image, as written in ARAnyM config file. In our case:

$ /sbin/sfdisk -C 8 -H 16 -S 63 /path/to/harddisk.img
Warning: test.img is not a block device
Disk test.img: cannot get geometry

Disk test.img: 8 cylinders, 16 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 test.img: unrecognized partition table type
Old situation:
No partitions found
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps <type>).

test.img1 :

Now the program asks for each partition its infos. The partitions are named 'test.img[n]'. To create a single partition covering all the image, which ID is 4 (FAT16<32MB), just enter:

,,4

The program will use default for start and size, which is all the disk, and set the partition ID to 4. Then it will ask the same for the other primary partitions, just reply with enter.

test.img1          0+      7       8-      4031+   4  FAT16 <32M
test.img2 :
test.img2          0       -       0          0    0  Empty
test.img3 :
test.img3          0       -       0          0    0  Empty
test.img4 :
test.img4          0       -       0          0    0  Empty
New situation:
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
test.img1          0+      7       8-      4031+   4  FAT16 <32M
test.img2          0       -       0          0    0  Empty
test.img3          0       -       0          0    0  Empty
test.img4          0       -       0          0    0  Empty
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Do you want to write this to disk? [ynq]

Just reply 'y' to write your changes.

Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Ioctl() inappropré pour un périphérique

6 - ARAnyM specific drivers

Now that you have a big hard disk image you can use and boot from, it is time to install ARAnyM specific drivers to improve your user experience with top experimental un-seen features. The reality is that these drivers help ARAnyM by using direct host features without passing it to the hardware emulation layer.

All ARAnyM drivers are present in the atari subdir in ARAnyM archive. They come in various forms: TOS residents, Metados drivers, MiNT drivers, LDG libraries, and so on.

MetaDOS drivers (.BOS and .DOS) requires installation of MetaDOS [9] [10], BetaDOS [8] [9] [10], Spin [9] [10] or ExtenDOS [11] in AUTO folder on boot drive. MiNT drivers (.XFS and .XDD) requires installation of MiNT kernel.

Only the MiNT filesystem driver 'hostfs.xfs' ,the MiNT network driver 'aranym.xif', and the MiNT osmesa driver 'nfosmesa.xdd' requires MiNT to be installed and used. The OSmesa library 'osmesa.ldg' requires LDG [13] installation. All the other drivers must be run from the AUTO folder, before the MiNT kernel if present.

6.1 - FVDI

FVDI [12] is a replacement VDI like the well-known NVDI. It allows usage of custom video and printer (among others) drivers to be used on your Atari system. 'fvdi.prg' is a TOS resident program that must be run from the AUTO folder. It has a config file 'fvdi.sys' at the root of the boot drive. In the config file, you'll find the line 'PATH=' which points to a directory ('c:\gemsys' as default) where to find its drivers (and fonts).

ARAnyM needs its 'aranym.sys' driver to be put there. Near the end of the 'fvdi.sys' file, you'll find a line like this, which tells FVDI to map VDI device 01 (default video device) to aranym.sys driver:

01r aranym.sys mode 1024x768x16@70 assumenf

6.1.1 - Setting FVDI's video resolution

Near the end of 'fvdi.sys' configuration file, you'll see you can pass the resolution as a parameter to the driver:

01r aranym.sys mode 1024x768x16@70 assumenf

The resolution is fixed here and can not be changed after FVDI is started. You can also force a resolution in ARAnyM's [AUTOZOOM] section of its config file, for example for a 640x480 screen, and FVDI will use it instead:

[AUTOZOOM]
FixedSize = Yes
Width = 640
Height = 480

Now ARAnyM does not need to emulate the Falcon's VIDEL video chip anymore, and so it is much faster at displaying GEM graphics, because it is also the host's CPU that does all the drawing, instead of the emulated m68k CPU. Beware that non-GEM applications will not work correctly in this mode.

6.1.2 - Using host mouse cursor

If you think the mouse cursor is a bit slow and jerky, it is because everything is managed from Atari side. You have first mouse movement that goes through the emulated IKBD 6301 processor, then the emulated m68k VDI driver must delete current mouse cursor drawed on Atari screen, take the new mouse position into account, then redraw the mouse cursor at a new position. Wheew.

In ARAnyM, you can configure the VDI driver to use directly the host mouse cursor, so all the steps mentionned above will be short-circuited. Just fill the [NFVDI] section of ARAnym's configuration file this way:

[NFVDI]
UseHostMouseCursor = Yes

Restart ARAnyM, and check the super fast mouse cursor. There is still a problem remaining: At start, the Atari OS thinks the mouse position is at position x1,y1 on the Atari screen, whereas in reality, you see it at position x2,y2. So when you click, nothing may happen, or you'll see yourself not clicking where it should be. You need to 'calibrate' the host mouse cursor, so the Atari OS and the host both have the same mouse position. To calibrate the mouse cursor, just move it to all sides of the Atari screen, and it should be OK.

6.1.3 - Selecting VDI renderer

If your host system has hardware accelerated OpenGL, and your ARAnyM is compiled with OpenGL support, then you can try the OpenGL VDI backend instead of the pure software backend.You select it in the [NATFEATS] section of ARAnyM config file:

[NATFEATS]
Vdi = opengl

Default value is 'Vdi = soft' for the software backend. You must also enable global OpenGL usage for ARAnyM in the [OPENGL] section:

[OPENGL]
Enabled = Yes

As usual, you need to restart ARAnyM for changes to taken into account.
Note: currently you can't use the ARAnyM GUI when OpenGL is enabled, because GUI routines are still software-rendering only.

6.2 - Filesystem driver

This disk driver allows you to access host filesystem directly without passing through the hard disk emulation layer. There are drivers for both Metados 'hostfs.dos' and MiNT 'hostfs.xfs'.

6.2.1 - MetaDOS driver

First as said before, you need to install MetaDOS, Spin, BetaDOS or ExtenDOS to load the driver at boot time. All have a configuration file 'config.sys' or 'bdconfig.sys' depending on the loader. Note: after some tests, it appears the driver does not work with MetaDOS (and Spin which uses MetaDOS), so use either BetaDOS or ExtenDOS.

You need to edit this file to add a line like this:

*DOS, \auto\hostfs.dos, P:P

As you see, you have complete pathname to the driver, and 'P:P' means that it maps the GEMDOS drive letter P to the MetaDOS device P. In fact the MetaDOS device does not exists. But you must use the same letter for GEMDOS drive and MetaDOS device. Standard GEM fileselector only have drive letters from A to P, so this is why it would be wise to not assign GEMDOS drives letters Q to Z.

The GEMDOS drive is configured in ARAnyM's config file, [HOSTFS] section, where you map a drive to a host filesystem directory:

[HOSTFS]
P = /path/to/my/favorite/atari/software/

Now you don't need floppies anymore to move, copy and access files from your virtual Atari machine.

6.2.2 - MiNT driver

If you installed the MiNT multitasking kernel, then there is a driver for it. Just copy the 'hostfs.xfs' file in the MiNT directory, and all drives declared in [HOSTFS] section will be mounted under the U:\ directory.

6.3 - Network driver

'aranym.xif' is the MiNT driver for ARAnyM networking. It emulates an Ethernet card on Atari side.

6.4 - CD-ROM driver

This driver 'nfcdrom.bos' allows usage of CD-ROM (and playing audio CD) from your Atari applications. To access the files on a CD-ROM, you'll need an ISO9660 filesystem driver, that you should already have with the program you use to load the driver.

In the MetaDOS (or other) configuration file, you just have to add a line like this:

*BOS, \auto\nfcdrom, Y

This will create a MetaDOS device Y, which is declared in the ARAnyM config file in the section [CDROMS]:

[CDROMS]
Y = 0

The number is the nth CD-ROM device on your host system, starting from 0. Now you can play audio CD with any Atari application. If you want data CD-ROM access, you'll need to use Linux nfcdrom driver on ARAnyM side, and install an ISO9660 filesystem driver in MetaDOS configuration file for the MetaDOS device.

Currently in ARAnyM, there are 2 nfcdrom drivers: the SDL one (works everywhere) but only allows audio CD control, and the Linux one which gives you total control over the CD-ROM drive. You choose which one to select in the [NATFEATS] section of ARAnyM config file:

[NATFEATS]
CDROM = linux

The default value for CDROM is 'sdl' of course. The ISO9660 filesystem can then be mapped to the MetaDOS device in its config.sys file:

*DOS, \auto\iso9660.dos, H:Y

This line will create a GEMDOS drive H to access the CD-ROM filesystem through MetaDOS device Y.

6.5 - JPEG image decoder

If you know Brainstorm's JPEG DSP decoder for Falcon, you know it is much faster to decode JPEG images than poor Falcon 030/16 MHz cpu. With this driver, it is the host cpu that will decode the image for your Atari applications. Just install 'nfjpeg.prg' in the AUTO folder to run it at your system's boot. This program is TOS resident, so it must be run before MiNT kernel.

6.6 - OSMesa software OpenGL driver

This one is a little tricky, there are both a device driver 'nfosmesa.xdd' required for MiNT, and a library 'osmesa.ldg' for Atari applications. LDG [13] must be installed for the library to be loaded/usable by applications. OSMesa is an OpenGL offscreen renderer, i.e. it renders images using host CPU in RAM. The result is then passed to the Atari application for final display.

For OSMesa to operate properly, you must have OSMesa host's libraries compiled and installed. Then, fill the [NFOSMESA] section of the ARAnyM configuration file:

[NFOSMESA]
ChannelSize = 0
LibGL = /path/to/libGL.so
LibOSMesa = /path/to/libOSMesa.so

Channel size is the number of bits per color channel. Default is 8 (0 in config file), it means that one colour component (R,G,B,A) will use 8 bits. Other values are 16 and 32. It means a single pixel could use 8 or 16 bytes to be stored.

If you have ARAnyM compiled with OpenGL support, and this implementation is not coming from Mesa [14], then the libraries will conflict. For example if you have installed drivers from your video card's vendor, then you can't use both with ARAnyM (i.e. libGL for your card and libGL from Mesa).

However, if you have ARAnyM compiled with OpenGL support, you can use OSMesa if you use the 16 or 32 bits per channel version (libOSMesa16 or libOSMesa32), because they embed Mesa's libGL implementation, so no conflict in this case.

Let me do a list of what can/can not be used:

ARAnyM compiled
with OpenGL
ARAnyM compiled
with NFOSMesa
NFOSMesa availability
for Atari applications
No No None
Yes No None
No Yes All libOSMesa implementations
Yes Yes Only with libOSMesa16 and libOSMesa32

If you use libOSMesa16 or libOSMesa32, you must put the corresponding value in 'ChannelSize' (i.e. 16 or 32), and 'LibGL=' will not be used. If you use default libOSMesa, set 'ChannelSize' to 0, and 'libGL=' will be used. In all cases, you must set correctly 'libOSMesa='.

6.7 - PCI driver

Latest Atari compatible hardware like Medusa, Hades or Milan have PCI bus to improve the system extensions. However, specific drivers are required for each PCI card. Currently the nfpci driver only allows you to list host PCI devices (a good start!). Just install 'nfpci.prg' in the AUTO folder to run it at your system's boot. This program is TOS resident, so it must be run before MiNT kernel.

6.8 - Audio driver

With the Falcon, Atari added specific Xbios system calls to drive the sound hardware. So now it is possible for different hardware to be used by Atari applications, provided they use the system calls. Under MiNT, an audio device driver should be used when it will be done/debugged/stable.

ARAnyM has some DMA audio emulation, but it may not be sufficient for programs to operate properly. Well-written applications use Xbios, and could use the ARAnyM audio driver.

Run 'zmagxsnd.prg' to install this compatibility layer, and you should have a better audio experience under ARAnyM (only with compatible applications of course). This program is TOS resident, so it must be run before MiNT kernel.

7 - Links


Copyright (c) 2005 Patrice Mandin, ARAnyM dev team