[English] [Japanese]

Linux CD-ROM Game System

 
  YAMAMORI Takenori <yamamori>

§ Setting up the save-data of the game to be saved into a floppy disk.

Here, we play a trick so that the save-data of the game are saved into a floppy disk. We make a directory /tmp/gamefd as a mount point which a floppy disk is mounted on. The directory /tmp/gamefd will be in a RAM disk when the file system becomes just a CD-ROM so that it is writable. Accordingly data can be saved on the directory /tmp/gamefd and remain until the system shutdown even if a floppy disk is not inserted.

A concrete file name of the save-data is different by a game software. In case of circuslinux, it is $HOME/.circuslinux, which is /root/.circuslinux actually, because the game starts with a condition HOME=/root as a single user mode. We move this file into a floppy disk pointing it with a symbolic link.

As a Linux user, we may prefer to use ext2 logical format for the floppy disk, however, we use DOS format for the portability. And we change the file name to so-called 8.3 style at the destination of the symbolic link.

The concrete procedure is the following:

----
# cd /root
# rm .circuslinux
# mkdir /tmp/gamefd
# ln -s /tmp/gamefd/circus .circuslinux
----

In addition, it is convenient to install the following package from a Vine CD-ROM so as to be able to make a floppy disk with a DOS file system even on Linux.

# rpm -ivh mkdosfs-ygg-0.3b-11.i386.rpm

To make a DOS logical format upon a physical formatted floppy disk, do the following command:

# /sbin/mkdosfs /dev/fd0

And put the DOS floppy disk into a drive and mount it manually as follows:

# mount -t vfat /dev/fd0 /tmp/gamefd

And, by this state, start the circuslinux as a root and then exit it. Then we will see the save-data which have been saved as a file name circus on the floppy disk.


To "Linux CD-ROM Game System" index


This page has been rewritten for the web from a manuscript of TECH Linux Vol. 2 "CD-ROM Game System" ASCII Corporation.
To "SunOS 4.1.4 the mystery" Home
© 2000 YAMAMORI Takenori
yamamori