The imbNES Linux Tutorial

The imbNES Linux Tutorial v1.0
Bruno Freitas - aka Sparrow
bruno@brunofreitas.com
23/03/2004
------------------------------

This tutorial aims to help people that uses Linux to build a working imbNES
CD using only free tools (just like Linux is! :-).

It's not our objective to guide people on installing and configuring a CD
recorder on Linux and installing softwares like 'mkisofs' and 'cdrdao'. For
this purpose, there is an excellent how-to in
http://www.tldp.org/HOWTO/CD-Writing-HOWTO.html

What you will need:

- A working Linux box (console mode, at least!!)
- Sun's Java 2 Runtime Environment available from: http://java.sun.com/
- A CD recorder (SCSI or IDE with ide-scsi modules loaded!)
- Linux softwares for ISO creation and CD burning: mkisofs and cdrdao
- imbNES last version zip package. Available from http://imbnes.gamebase.ca/
- Sparrow's rombank Java Edition available from:
http://nic-nac-project.de/~sparrow/rombank.jar
- Sparrow's mkpsxiso Java Edition available from:
http://nic-nac-project.de/~sparrow/mkpsxiso.jar
- A set of licenses files available from:
http://nic-nac-project.de/~sparrow/psx-licenses.zip
- A couple of .NES roms. Please, don't ask for them!!!

Let's go, then! First, we'll create some directories, just for using as
example and make our job easier:

#mkdir /imbnes
#mkdir /imbnes/roms
#mkdir /imbnes/cdrom

After that, we're going to unzip the following files from the imbNES zip
package to the /imbnes/cdrom directory:

- nes.exe
- saveicon.bmp
- system.cnf

CAUTION: ONLY these files should be extracted to the /imbnes/cdrom
directory. If there is other files like rombank.exe or anyone else, just
delete it with the 'rm' command, just like 'rm rombank.exe'.

The next step is to put a couple of ROMs (files with .NES extension) in
the /imbnes/roms directory.

Copy the files rombank.jar and mkpsxiso.jar to /imbnes directory. Unzip
the psx-licenses.zip file in this directory too.

Now, we are going to generate a rombank.bin file from the /imbnes/roms
directory by using the rombank.jar tool. Make sure you are in the /imbnes
directory and type the following:

#java -jar rombank.jar roms/

After the utility finishes, type the 'ls' commando and there will be the
rombank.bin file in the /imbnes directory. Let's move it to the cdrom
directory by typing the following command:

#mv rombank.bin cdrom

Ok. Now the cdrom directory is complete and it represents the files that
will be recorded in the CD. Now we have to generate a ISO file which
contents the files in this directory. Make sure you are in the /imbnes
directory and type the following command:

#mkisofs -o imbnes.iso -V IMBNES -sysid PLAYSTATION cdrom/

After that, a file named imbnes.iso should be created. Just type the 'ls'
command and check it out.

This .iso file is ready to burn on a CD, but if we do that now, the PSX
will not run it because it is on a format the playstation doesn't recognize.
So we have to convert it to a .bin/.cue file pair. Just type (still in the
/imbnes directory!!):

#java -jar mkpsxiso.jar imbnes.iso imbnes.bin infousa.dat

After that, two new files will be created:

- imbnes.bin
- imbnes.cue

These files are ready to burn to a CD and the PSX will be happy because the
CD will be in a format which it recognizes!!!

Before burn the CD, you must discover what device is representing your CD
burner on Linux. To discover this, you must type:

#cdrdao scanbus

Take note of the three numbers separated by commas. Mine is 1,0,0!!!

Now... THE FINAL STEP!!! :-) Burn the CD!!! Put and empty CD-R in your CD
recorder tray. Close it!

Make sure you are still in the /imbnes directory (where files imbnes.bin
and imbnes.cue are) and type the following:

#cdrdao write --device 1,0,0 imbnes.cue

Just wait a few minutes and, voila!!! There is a brand new imbNES CD that
was created using just freeware tools! Isn't that cool?? :-P

Hope this tutorial helped you! If you have sugestions, problems, comments,
you can reach me by email: bruno@brunofreitas.com or enter the imbNES home
page (http://imbnes.gamebase.ca/) and access our forum. People will be
pleased to help you!

Good imbNES Playing! Enjoy!

Sparrow

rombank Java Edition Sources:
http://nic-nac-project.de/~sparrow/rombank-java-src-docs.zip
mkpsxiso Java Edition Sources:
http://nic-nac-project.de/~sparrow/mkpsxiso-java-src-docs.zip