Showing posts with label Asylum. Show all posts
Showing posts with label Asylum. Show all posts

Wednesday, 13 June 2007

Running Vice 1.21 Commodore Emulator under Ubuntu 7.04

Last weekend I installed Vice 1.21 - Commodore Emulator on my Ubuntu 7.04 - Festy Fawn.
First I downloaded the tarball (source code) from the site
vice-1.21.tar.gz
The official site of Vice is :
Vice Team
VICE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
So don't be afraid to download it!

Then I opened a terminal and ran the commands In order to obtain the gcc compiler :
sudo apt-get install build-essential

Then I decompressed the file with the command :
tar xvfz vice-1.21.tar.gz
Then I changed the current directory to the /vice-1.21 and ran the command :
sudo ./configure
Then I ran :
sudo make

Then I got the following errors :
../../src/arch/unix/x11/xaw/uiarch.h:33:27: error: X11/Intrinsic.h: No such file or directory
../../src/arch/unix/x11/xaw/uiarch.h:34:28: error: X11/StringDefs.h: No such file or directory
In file included from ../../src/arch/unix/x11/xaw/videoarch.h:5,
from ../../src/arch/unix/videoarch.h:9,
from video-canvas.c:39:

So I Installed the libxt-dev package to fix the problem :
sudo apt-get install libxt-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libice-dev libsm-dev
The following NEW packages will be installed:
libice-dev libsm-dev libxt-dev
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 563kB of archives.
After unpacking 1675kB of additional disk space will be used.
Do you want to continue [Y/n]?

Then I ran again :

sudo make

And another error was reported :
FileSel.c:47:29: error: X11/Xaw/SimpleP.h: No such file or directory
FileSel.c:48:28: error: X11/Xaw/Simple.h: No such file or directory
FileSel.c:49:28: error: X11/Xaw/LabelP.h: No such file or directory
FileSel.c:50:27: error: X11/Xaw/Label.h: No such file or directory
FileSel.c:51:30: error: X11/Xaw/CommandP.h: No such file or directory
FileSel.c:52:29: error: X11/Xaw/Command.h: No such file or directory
FileSel.c:53:27: error: X11/Xaw/FormP.h: No such file or directory
FileSel.c:54:26: error: X11/Xaw/Form.h: No such file or directory
In file included from FileSelP.h:25,
from FileSel.c:71:
DirMgr.h:86: warning: function declaration isn't a prototype
In file included from FileSel.c:71:
FileSelP.h:27:31: error: X11/Xaw/Cardinals.h: No such file or directory
FileSel.c: In function ChildrenCreate:
FileSel.c:767: error: labelWidgetClass undeclared (first use in this function)
FileSel.c:767: error: (Each undeclared identifier is reported only once
FileSel.c:767: error: for each function it appears in.)
FileSel.c:805: error: commandWidgetClass undeclared (first use in this function)
make[7]: *** [FileSel.o] Error 1
make[7]: Leaving directory `/home/ubuntu/vice-1.21/src/arch/unix/x11/xaw/widgets'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/home/ubuntu/vice-1.21/src/arch/unix/x11/xaw'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/ubuntu/vice-1.21/src/arch/unix/x11'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/ubuntu/vice-1.21/src/arch/unix'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/ubuntu/vice-1.21/src/arch'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/ubuntu/vice-1.21/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/ubuntu/vice-1.21/src'
make: *** [all-recursive] Error 1

So I Installed libxaw7-dev and libxaw-headers packages :

sudo apt-get install libxaw7-dev libxaw-headers

ubuntu@horus:~/vice-1.21$ sudo apt-get install libxaw7-dev libxaw-headers
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libxmu-dev libxmu-headers libxpm-dev
The following NEW packages will be installed:
libxaw-headers libxaw7-dev libxmu-dev libxmu-headers libxpm-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 389kB of archives.
After unpacking 1577kB of additional disk space will be used.
Do you want to continue [Y/n]?

Then I ran again :

sudo make

that finished without errors. So I ran :

sudo make install

I started the emulator via the x64 command to my surprise the screen was always black, If i pressed the left mouse button or the right button a menu appeared but the screeen was always black.
After googling a little I found the solution :
Just a simple change (a 0 for a 1) in the file :
vice-1.21/src/arch/unix/x11/xaw/uicolor.c

So I changed the line :
im = XCreateImage(display, visual, x11ui_get_display_depth(),
ZPixmap, 0, (char *)data, 1, 1, 8, 1);

for :

im = XCreateImage(display, visual, x11ui_get_display_depth(),
ZPixmap, 0, (char *)data, 1, 1, 8, 0);


Then I recompiled again with :
sudo make
then
sudo make install

Then the program worked!!!
Thanks to the open source it was posible to fix the game and play ASYLUM!!!
This is one of the benefits of having the code!!!

Here the screen with the compiling console, gedit with the source, and Asylum (a C64 Adventure Game) !!!



For those who don't know the Asylum game here is a link with the D64 disk image :

http://www.retrosite.de/adventure/asylum/asylum.html

Please, remember don't look up in Asylum!!! ;-)