March 2, 2008

You are currently browsing the daily archive for March 2, 2008.

Here’s a way to quickly get up and running with Amiga OS 3.X on your PS3 running Yellow Dog, complete with internet access running through the E-UAE emulator and virtual hard disks.

1. First, install E-UAE, an Amiga emulator based on WinUAE. I use the version from the Dribble repository, installed via Add/Remove Software or simply yum install e-uae. Setup instructions for Dribble and other repos can be found here. Alternatively, you can manually install the linux-ppc binary located here.

2. As noted on the E-UAE site, “you will need access to an image of some version of the Amiga Kickstart ROM (although UAE does include a ROM emulation which may work with some old games). The Amiga Kickstart ROMs are copyrighted material and may not be freely distributed (so don’t ask me for a copy). If you don’t have an Amiga from which you can legally make a ROM image, a selection of ROM images are available for purchase online from Cloanto - publishers of the Amiga Forever distribution.”

I got the Premium Edition of Amiga Forever by Cloanto, but I think the Plus and Online Editions include the same files I’m using below.

With the Premium Edition I downloaded an installer file called “afplus.exe” that I had to run on a Windows machine to extract the files. I think the Plus Edition downloads as an ISO file (in a ZIP file) so you can avoid installing on Windows. See here for more info.

The installer extracted a folder called “Amiga Files” in My Documents folder on my Windows machine. In that folder was a “System” folder. Quoting the readme file, The “System” directory contains all Amiga system files, including ROM and OS files, workbench ADF files (floppy disk images), and the ‘System” and “Work” partitions of the Amiga OS 3.X environment (which are mapped to directories on the host file system).

To transfer the contents to my PS3 I just shared the folder and copied it over my network. Alternatively you could burn the files to a CD, copy to a memory card, etc. The entire Amiga OS and applications only take up around 30 MB. :)

The actual folders I needed were: “Amiga Files/System/dir” (both the “System” and “Work” folders) and the “Amiga Files/System/rom” folder.

Note: It took a couple of weeks but eventually I received the CD + 2 DVDs for Amiga Forever Premium Edition from Cloanto. On the Amiga Forever 2006 CD, the System and Work folders are located on the CD under: /Emulation/System/dir. The roms are in the /Emulation/System/rom folder on the CD.

The “Amiga Files/System/dir/System” and “Amiga Files/System/dir/Work” folders will be set up as virtual hard drive partitions in E-UAE.

The “Amiga Files/System/rom” folder includes the Amiga ROM files needed by E-UAE (and also a key file required to use Cloanto’s ROMs).

So, on the PS3 I now have the following folders:
~/UAE/System
~/UAE/Work
~/UAE/rom

3. Then E-UAE needs to be configured to emulate the right Amiga hardware, use the system ROM file, and use the System and Work folders as virtual hard drives. E-UAE uses a config file in your home folder called .uaerc

To make things easier, you can copy/paste/modify this one (save it in your home folder as .uaerc ):

unix.rom_path=/home/bill/UAE/rom/
unix.floppy_path=/mnt/shared/emulators/amiga
cpu_type=68040
chipset=aga
kickstart_rom_file=/home/bill/UAE/rom/amiga-os-310.rom
kickstart_key_file=/home/bill/UAE/rom/rom.key
chipmem_size=4
fastmem_size=8
z3mem_size=64
gfxcard_size=32
cpu_speed=max
filesystem2=rw,DH0:System:/home/bill/UAE/System,1
filesystem2=rw,DH1:Work:/home/bill/UAE/Work,0
gfx_width_fullscreen=960
gfx_height_fullscreen=720
gfx_fullscreen_amiga=false
use_gui=false
gfx_linemode=double
gfx_center_vertical=true
gfx_center_vertical=smart
show_leds=true
joyport0=mouse
joyport1=joy0
bsdsocket_emu=true

Note that you’ll have to modify these file/folder locations to match your own in the above config file:

unix.rom_path=/home/bill/UAE/rom/ (the rom folder path)
unix.floppy_path=/mnt/shared/emulators/amiga (this is where I keep my .ADF floppy disk images, not necessary)
kickstart_rom_file=/home/bill/UAE/rom/amiga-os-310.rom (the ROM version required to use Amiga OS3.X or Workbench 3.1)
kickstart_key_file=/home/bill/UAE/rom/rom.key (the key file required to use Cloanto’s ROM file)
filesystem2=rw,DH0:System:/home/bill/UAE/System,1 (path to the System folder copied from Amiga Forever, works like a hard drive on the Amiga, DH0:)
filesystem2=rw,DH1:Work:/home/bill/UAE/Work,0 (path to the Work folder copied from Amiga Forever, works like a hard drive on the Amiga, DH1:)

Note that you have to use the actual path names and not ~ or $HOME …

Also, you may need to adjust the fullscreen resolution — I have mine set this way since I’m running my PS3 at 720p:
gfx_width_fullscreen=960
gfx_height_fullscreen=720

4. Finally, you can start E-UAE from a terminal window (uae) or the Applications -> Games menu in e17. With the above settings in the config file, it should load straight into the Amiga OS3.X Workbench. Pressing F12-s toggles between windowed and full screen.

You can actually run Amiga OS3.X at 1280×720, full screen, on the PS3. :) On the Amiga Workbench, open the System drive, then Prefs, then ScreenMode, and select uaegfx: 1280×720 32bit under Display Mode. (assuming you’re running YDL at 720p)

Amiga OS3.X on PS3

To install additional software besides what is already included with Yellow Dog 6, I’m using three additional repositories. These are set up by saving them as text files in the /etc/yum.repos.d folder (root privilege required). The file names are: fedora-extras.repo, livna-stable.repo, and dribble.repo

NOTE: These are clearly NOT supported by Terrasoft and could potentially create stability issues on your system. That said, I haven’t had any problems with using them other than some of the applications not working properly. In some cases an RPM will call for a dependency not included in these or the yellowdog repos since they’re included in Fedora Core 6 base. In this case you can install the dependency directly from the Fedore Core 6 download server.

fedora-extras.repo

[fedora-extras]

name=Fedora Extras

baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/6/ppc

enabled=1

gpgcheck=0

livna-stable.repo

[livna-stable]

name=Livna.org Fedora Compatible Packages (stable)

baseurl=http://rpm.livna.org/fedora/6/ppc

enabled=1

gpgcheck=0

dribble.repo

[dribble]

name=Dribble for Fedora 7 - ppc

baseurl=http://dribble.org.uk/repo/7/ppc

enabled=1

gpgcheck=0

After installing those it appears to be a good idea to install ProtectBase to prevent files from the yellowdog-base repository from being overwritten by files from these or other third party repositories. Here’s how to install and configure ProtectBase to protect your yellowdog-base.repo:

su
[root password]

yum install yum-protectbase

echo 'protect=1' >> /etc/yum.repos.d/yellowdog-base.repo

echo 'protect=1' >> /etc/yum.repos.d/yellowdog-updates.repo

exit

If you need to disable protection in the future, just edit /etc/yum.repos.d/yellowdog-base.repo and change protect=1 to protect=0.

UPDATED 5/10/08: Using Fedora 7 packages from Dribble now, and protecting both yellowdog-base and yellowdog-updates (so updates will install properly)

Quake 2 on YDL

Quake 2 on PS3

See it in action on youtube!

UPDATE:  I have added rpm package built for Yellow Dog 6 in the files area of the Yahoo! Groups site, so it is no longer necessary to build from the source as described below.  The demo or full version files are still required.  The full version is available on Steam.

Even without any hardware accelerated OpenGL, Quake 2 runs great on the Playstation 3 with Yellow Dog 6. I normally play at 960×720 and it runs around 3o FPS (according to timerefresh). The gameplay is smooth at this speed and very entertaining. Following these instructions should have you dodging, ducking, and spreading giblets all over the place in no time!

This will require either the Quake 2 demo files or the full retail version of Quake 2. If you already have the Quake 4 Special DVD Edition, it includes a second disc with Quake 2 + Expansion packs. This makes it very easy to copy the data files over to your PS3.

Just copy the entire contents of /path/to/your/DVD/setup/data to where you want it on your PS3 (like in your home folder under quake2, for example: ~/quake2). Instructions for using the demo files are included in the README with the source.

Building and Installing the game:

I’m running it using the source port found on icculus.org.Compiling from the quake2-r0.16.1.tar.gz source required editing the make file — the portion I changed looks like this:

BUILD_SDLQUAKE2=YES # sdlquake2 executable (uses SDL for cdrom and sound)
BUILD_SVGA=NO # SVGAlib driver. Seems to work fine.
BUILD_X11=NO # X11 software driver. Works somewhat ok.
BUILD_GLX=NO # X11 GLX driver. Works somewhat ok.
BUILD_FXGL=NO # FXMesa driver. Not tested. (used only for V1 and V2).
BUILD_SDL=YES # SDL software driver. Works fine for some people.
BUILD_SDLGL=NO # SDL OpenGL driver. Works fine for some people.
BUILD_CTFDLL=YES # game$(ARCH).so for ctf
BUILD_XATRIX=NO # game$(ARCH).so for xatrix (see README.r for details)
BUILD_ROGUE=NO # game$(ARCH).so for rogue (see README.r for details)
BUILD_JOYSTICK=YES # build in joystick support
BUILD_ARTS=NO # build in support for libaRts sound.
BUILD_ALSA=NO # build in support for ALSA (default sound on 2.6)
BUILD_DEDICATED=NO # build a dedicated quake2 server
BUILD_AA=NO # build the ascii soft renderer.
BUILD_QMAX=NO # build the fancier GL graphics
BUILD_RETEXTURE=NO # build a version supporting retextured graphics
BUILD_REDBLUE=NO # build a red-blue 3d glasses renderer...
STATICSDL=NO
SDLDIR=/usr/local/lib

Then compile and install like so:

[installdir] is wherever you want to install the original quake2 game files — I used ~/quake2
The releaseppc folder will be found in your source dir after you compile.

0. edit Makefile as described above, then ‘make ARCH=ppc‘ When compiling is done you’ll have a new folder called releaseppc. If you get errors when trying to compile you may be missing some dependencies.
1. copy releaseppc/gameppc.so to [installdir]/baseq2/
2. copy releaseppc/ref_*.so to [installdir]
3. copy releaseppc/sdlquake2 to [installdir]
4. copy releaseppc/ctf/gameppc.so to [installdir]/ctf/ (optional)
5. copy releaseppc/sdlquake2 to your /usr/local/bin folder (you need root privilege to do this)

Once you have all that set up you start quake2 like this:

sdlquake2 +set vid_ref=softsdl +set basedir ~/quake2
(where ~/quake2 is the [installdir] you copied the original Quake 2 files and the new binaries)

Note:
If the default resolution is higher than your screen resolution you can start in windowed mode and change it in the game menu. To start in windowed mode instead:

sdlquake2 +set vid_fullscreen 0 +set vid_ref=softsdl +set basedir ~/quake2

Try running from the command line first to see if you get any errors, then you can set it up as a launcher on the desktop, or as a new menu item using alacarte.

Sun offers Java for x86 and x64 Linux that can’t be used on the PS3 (which runs PPC Linux). However, IBM produces an implementation of Java that does work on PPC Linux. Here’s how to install the IBM Java plugin for Firefox on Yellow Dog 6:

Install IBM Java

Go here:
http://www-128.ibm.com/developerworks/java/jdk/linux/download.html

Click on the link for Java SE Version 6 for 32-bit iSeries/pSeries

You’ll need to register with IBM, sign in, accept license agreement, yada
yada yada…

Click on the link to Download using http

Click on this one:
rpm format
ibm-java-ppc-jre-6.0-0.0.ppc.rpm

Open with system-install-packages, Click OK

Install the Mozilla plugin

Once IBM Java install is finished, open a terminal window.
Applications -> Accessories -> Terminal

Create a symbolic link to /opt/ibm/java-ppc-60/jre/plugin/ppc/ns7/libjavaplugin_oji.so in the /usr/lib/mozilla/plugins folder:

su
[enter root password]

cd /usr/lib/mozilla/plugins

ln -s /opt/ibm/java-ppc-60/jre/plugin/ppc/ns7/libjavaplugin_oji.so

exit


Confirm Installation

Restart Firefox if it’s already running.

In Firefox, where you normally would enter an http: address, enter:

about:plugins

You should see this show up in the list:

Java(TM) Plug-in 1.6.0-internal-root_16_nov_2007_18_41-b00

After this, you should be able to run Java applets in Firefox 2, complete
with sound.

Of course then you’ll want to make sure it’s working:

http://www.time.gov
Try selecting a time zone … ZZZzz…

http://www.flyordie.com/
A very active mutliplayer Java game site featuring pool, chess, Reversi,
etc. Expect to see lots of banner ads.

http://www.runescape.com
A Java-based MMORPG (Massively Multiplayer Online Role-Playing Game)

NOTE:
If you need to use Java 5 instead, select J2SE 5.0 for 32-bit iSeries/pSeries. Download/install this one: ibm-java2-ppc-jre-5.0-6.0.ppc.rpm, and to create the symbolic link, use this:

ln -s /opt/ibm/java2-ppc-50/jre/bin/libjavaplugin_ojigtk2.so

All other steps remain the same.