News:

The forums are under a spambot siege. Registration has been disabled temporarily. Please contact me to register an account.

Main Menu

Level nearly completed ...

Started by Fabrice, October 30, 2015, 04:46:46 AM

Previous topic - Next topic

Macpod

#15
Glad you got it working. To compile jv4779's code you should do the following:

To build


cd ~/Desktop
mkdir mame
cd mame
git clone https://github.com/jv4779/openlase-mame.git
cd openlase-mame/xmame-0.106


If you have not installed the libopenlase.so library, you will need to specify where it is located:

export LD_LIBRARY_PATH=/home/<openlase directory>/build/libol:$LD_LIBRARY_PATH


In the Makefile within the of xmame-0.106 directory make the following changes:

Change this line to point to where openlase source is:
OL_DIR = /home/nelsonjm/laser_projector/openlase_macpod/openlase

Change this line:
#CFLAGS = -O2 -mtune=i686 -fomit-frame-pointer -fstrength-reduce -ffast-math
To this:
CFLAGS += -O2 -mtune=i686 -fomit-frame-pointer -fstrength-reduce -ffast-math

Comment out this line (assuming you are running a 64-bit os):
MY_CPU = i386
And uncomment this line:
MY_CPU = em64t

If you want to use a joystick, uncomment this line:
JOY_STANDARD = 1


If you want sounds, uncomment htis line:
SOUND_ALSA = 1


Build it:

make


To run:
If you have not installed the libopenlase.so library, you will need to specify where it is located:

export LD_LIBRARY_PATH=/home/<openlase directory>/build/libol:$LD_LIBRARY_PATH



Copy or link xmamerc that is in ~/Desktop/mame/openlase-mame/ into $HOME/.xmame directory

Update rompath in $HOME/.xmame/xmamerc to point to where your roms are

Start up openlase (ie jackctl, etc)

cd ~/Desktop/mame/openlase-mame/xmame-0.106
padsp ./xmame.x11 asteroid

Fabrice

#16
Dear MacPod,

Everything goes well until the 'make' command ... :'(

Terminal returns :

skappy@skappy-portable:~/Bureau/mame/openlase-mame/xmame-0.106$ export LD_LIBRARY_PATH=/home/skappy/openlase/libol:$LD_LIBRARY_PATH
skappy@skappy-portable:~/Bureau/mame/openlase-mame/xmame-0.106$ make
Compiling src/chd.c ...
src/chd.c:13:18: fatal error: zlib.h: Aucun fichier ou dossier de ce type
#include <zlib.h>
                  ^
compilation terminated.
make: *** [xmame.obj/chd.o] Erreur 1

skappy@skappy-portable:~/Bureau/mame/openlase-mame/xmame-0.106$

It seems that it does not find the zlib.h files ...
:-[ still a little help MacPod ?  :-[

Thank you so much !

---- LAST MINUTE NEWS ---
Magic has operated ...
I have put the 2 missing files in the main directory and compilation starts ...  ;)
But .. that was too easy ...
Terminal finally returns

src/unix/video-drivers/xv.c:14:31: fatal error: X11/extensions/Xv.h: Aucun fichier ou dossier de ce type
#include <X11/extensions/Xv.h>
                               ^
compilation terminated.
make: *** [xmame.obj/unix.x11/video-drivers/xv.o] Erreur 1


And this time, the Xv.h file is not in the neighborhood  :'( so I still need help MacPod  :-[ :-[

Thx

Macpod

#17
If you receive messages concerning missing header files, it indicates you do not have the appropriate developer packages installed on your computer which contain these headers.

When you encounter errors of this type, you will need to identify and install the package which provides these headers. This page describes how to do this:
https://kobablog.wordpress.com/2011/05/17/how-to-find-and-install-the-missing-file-in-ubuntu/

In your case you need to install the following packages (note that packages ending with -dev indicates they include headers generally):

sudo apt-get install zlib1g-dev x11proto-video-dev



You should remove the two headers you added to the project folder.

Fabrice

#18
MacPod,
I have erase the mame directory from the last installation and start the process from the beginning , installed a new stuff by myself  8) (it was sudo apt-get install libxv-dev)


But now terminal returns ....

(...)
Compiling src/chdcd.c ...
src/chdcd.c: In function ‘cdrom_parse_toc’:
src/chdcd.c:153:8: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
   fgets(linebuffer, 511, infile);
        ^
[OSDEPEND] Compiling src/unix/osd_tool.c ...
Linking chdman...
Compiling src/xml2info.c ...
src/xml2info.c: In function ‘process_error’:
src/xml2info.c:232:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘XML_Size’ [-Wformat=]
  fprintf(stderr, "%d:%s:%s\n", XML_GetCurrentLineNumber(state->parser), tag, msg);
  ^
Linking xml2info...
Compiling src/jedutil.c ...
Linking jedutil...
skappy@skappy-portable:~/Bureau/mame/openlase-mame/xmame-0.106$


Help once again is really welcome  :P

Thx MacPod



Macpod

Some warnings are expected. As long as there were no errors you are ok. Looks like it finished compiling successfully

Fabrice

#20
Dear MacPod,
the goal is near ...
Terminaly finally returns now

skappy@skappy-portable:~/Bureau/mame/openlase-mame/xmame-0.106$ padsp ./xmame.x11 asteroid
info: trying to parse: /usr/local/share/xmame/xmamerc
info: trying to parse: /home/skappy/.xmame/xmamerc
info: trying to parse: /usr/local/share/xmame/xmame-x11rc
info: trying to parse: /home/skappy/.xmame/xmame-x11rc
info: trying to parse: /usr/local/share/xmame/rc/asteroidrc
info: trying to parse: /home/skappy/.xmame/rc/asteroidrc
loading rom 0: 035145.02                       
loading rom 1: 035144.02                       
loading rom 2: 035143.02                       
loading rom 3: 035127.02                       
done
035145.02    NOT FOUND
035144.02    NOT FOUND
035143.02    NOT FOUND
035127.02    NOT FOUND
ERROR: required files are missing, the game cannot be run.
skappy@skappy-portable:~/Bureau/mame/openlase-mame/xmame-0.106$


I have created a roms directory in /mame/openlase-mame/xmame-0.106/
And i have put asteroid.zip in it (I have also decompress the zip files into this roms directory).

Do you have any idea of what i'm doing wrong Macpod ?

Have a great week end




Macpod

#21
Did you modify the following line in your xmamerc file to specify where your rom folder is?:

rompath                 $HOME/.xmame/roms

Is your xmamerc file located in one of the locations it was searched for at? I.e.:

info: trying to parse: /usr/local/share/xmame/xmamerc
info: trying to parse: /home/skappy/.xmame/xmamerc
info: trying to parse: /usr/local/share/xmame/xmame-x11rc
info: trying to parse: /home/skappy/.xmame/xmame-x11rc
info: trying to parse: /usr/local/share/xmame/rc/asteroidrc
info: trying to parse: /home/skappy/.xmame/rc/asteroidrc


Finally in your rom directory (or a subdirectory), do these files exist?:

035145.02    NOT FOUND
035144.02    NOT FOUND
035143.02    NOT FOUND
035127.02    NOT FOUND


What does the rompath directory point to and what is inside of this directory? (use ls -l)

Fabrice

Dear MacPod,
Very sorry for been such a pain ...
I do not understanf what is going on ...

I have put the xmamerc file into the .xmame directory, change the rompath with

rompath         $HOME/skappy/.xmame/roms

and here is the path to my roms

skappy@skappy-portable:~$ ls
avirer.py                 examples.desktop  Modèles    Téléchargements
Bureau                    helloworld.py     Musique    test_twitter.py
Documents                 hershey-fonts     openlase   tweet.py
essai_compilation_c       Images            Public     Vidéos
essai_compilation_python  jd2               pylase.so
skappy@skappy-portable:~$ cd .xmame
skappy@skappy-portable:~/.xmame$ ls
cfg  diff  hi  inp  mem  nvram  rc  roms  sta  xmamerc
skappy@skappy-portable:~/.xmame$ cd roms
skappy@skappy-portable:~/.xmame/roms$ ls
034602-01.c8   035143-02.j2   035145-04e.ef2  readme.html
035127-02.np3  035144-04e.h2  asteroid.zip

I'm a bit lost !!!

Thx Macpod

Macpod

Quote
rompath         $HOME/skappy/.xmame/roms
This is incorrect. (it is pointing to /home/skappy/skappy/.xmame/roms) It should be:

rompath                 $HOME/.xmame/roms







Quote
skappy@skappy-portable:~/.xmame/roms$ ls
034602-01.c8   035143-02.j2   035145-04e.ef2  readme.html
035127-02.np3  035144-04e.h2  asteroid.zip
You need to rename these files to match what xmame is looking for when it tries to run the asteroid game. That is what these lines correspond to:

035145.02    NOT FOUND
035144.02    NOT FOUND
035143.02    NOT FOUND
035127.02    NOT FOUND

Fabrice

Macpod, please apologize...

I have modified the rompath as you mentionned ,

I have renamed the 4 files as terminal expects

skappy@skappy-portable:~$ cd ..
skappy@skappy-portable:/home$ ls
skappy
skappy@skappy-portable:/home$ cd skappy
skappy@skappy-portable:~$ cd .xmame
skappy@skappy-portable:~/.xmame$ ls
cfg  diff  hi  inp  mem  nvram  rc  roms  sta  xmamerc
skappy@skappy-portable:~/.xmame$ cd roms
skappy@skappy-portable:~/.xmame/roms$ ls -l
total 32
-rw-rw-r-- 1 skappy skappy  256 déc.  24  1996 034602-01.c8
-rw-rw-r-- 1 skappy skappy 2048 déc.  24  1996 035127.02
-rw-rw-r-- 1 skappy skappy 2048 déc.  24  1996 035143.02
-rw-rw-r-- 1 skappy skappy 2048 déc.  24  1996 035144.02
-rw-rw-r-- 1 skappy skappy 2048 déc.  24  1996 035145.02
-rw-r--r-- 1 skappy skappy 7752 nov.  21 11:25 asteroid.zip
-rw-r--r-- 1 skappy skappy  730 mai   19  2014 readme.html
skappy@skappy-portable:~/.xmame/roms$ ^C
skappy@skappy-portable:~/.xmame/roms$


but terminal is still returning

skappy@skappy-portable:~/Bureau/mame/openlase-mame/xmame-0.106$ padsp ./xmame.x11 asteroid
info: trying to parse: /usr/local/share/xmame/xmamerc
info: trying to parse: /home/skappy/.xmame/xmamerc
error: unknown option doublebuf, on line 52 of file: /home/skappy/.xmame/xmamerc
   ignoring line
error: unknown option grabinput, on line 53 of file: /home/skappy/.xmame/xmamerc
   ignoring line
error: unknown option joydevname, on line 62 of file: /home/skappy/.xmame/xmamerc
   ignoring line
error: unknown option lirc, on line 65 of file: /home/skappy/.xmame/xmamerc
   ignoring line
info: trying to parse: /usr/local/share/xmame/xmame-x11rc
info: trying to parse: /home/skappy/.xmame/xmame-x11rc
info: trying to parse: /usr/local/share/xmame/rc/asteroidrc
info: trying to parse: /home/skappy/.xmame/rc/asteroidrc
loading rom 0: 035145.02                       
loading rom 1: 035144.02                       
loading rom 2: 035143.02                       
loading rom 3: 035127.02                       
done
035145.02    NOT FOUND
035144.02    NOT FOUND
ERROR: required files are missing, the game cannot be run.
skappy@skappy-portable:~/Bureau/mame/openlase-mame/xmame-0.106$


I can't understand what is needed, previously 4 files were not found and now only two are still missing...

Macpod

#25

macpod@computer ~/.xmame/roms $ tree
.
└── asteroid
    ├── 034602.01
    ├── 035127.02
    ├── 035143.02
    ├── 035144.02
    └── 035145.02

1 directory, 5 files


Try re-acquiring your rom files and installing them in your rom folder as above. Once you have done this run the tree command and paste the results here if it still does not work. Something isn't adding up. Either you have accidentally added a space to the names or the files are not actually in the right location.

Fabrice

Hi Macpod,
A very big thank for your patience and your support...
A big step was taken ... Putting all the .01 and .02 files into a directory called asteroid in the roms directory allows the game to start ...  :) :) :) but,  ???, it seems that the game could not be started as pressing the '1' key does not launch it ... It would have been to easy isn't it ?
I can read a message on the mame screen warning that a file can be corrupted but Asteroid launch properly, stars and asteroids scroll perfectly.

I have re-check the Makefile within the of xmame-0.106 directory and  the line:
JOY_STANDARD = 1
is still commented.
Others keys seem to work properly ("pause", "tab",...) .

The goal is close ....

Macpod

#27
Did you pay for the game? You need to insert quarters to play. Press the 5 key (insert coint) before pressing the 1 key (start)

Edit: Here is a link to the controls
http://wiki.mamedev.org/index.php/FAQ:Controls


Fabrice

Mapod,

Everything runs finally perfectly, i'm very happy !

Building this laser projector is quite an old dream and i would like to sincerely thanks you for all the help you provide to me ... I would never have been able to see sucha nice result wihout your assistance and your patience, so once again thank you ...

Next adventure will be with RGB Lasershark isn't it ?

Have a great day Macpod


Macpod

Glad you got it working. Please be careful with your galvos as these games can strain them. The galvos should not sound strained when operating. If they do, this is likely to reduce the operational lifespan of the galvos units.