Author Topic: Level nearly completed ...  (Read 45502 times)

Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: Level nearly completed ...
« Reply #15 on: November 15, 2015, 11:53:25 PM »
Glad you got it working. To compile jv4779's code you should do the following:

To build

Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
make

To run:
If you have not installed the libopenlase.so library, you will need to specify where it is located:
Code: [Select]
export LD_LIBRARY_PATH=/home/<openlase directory>/build/libol:$LD_LIBRARY_PATH

Code: [Select]
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
« Last Edit: November 15, 2015, 11:58:10 PM by Macpod »

Fabrice

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Level nearly completed ...
« Reply #16 on: November 17, 2015, 02:52:59 AM »
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
« Last Edit: November 17, 2015, 12:07:50 PM by Fabrice »

Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: Level nearly completed ...
« Reply #17 on: November 17, 2015, 10:09:00 PM »
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):
Code: [Select]
sudo apt-get install zlib1g-dev x11proto-video-dev


You should remove the two headers you added to the project folder.
« Last Edit: November 17, 2015, 10:22:22 PM by Macpod »

Fabrice

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Level nearly completed ...
« Reply #18 on: November 18, 2015, 01:15:17 PM »
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


« Last Edit: November 18, 2015, 01:17:56 PM by Fabrice »

Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: Level nearly completed ...
« Reply #19 on: November 19, 2015, 11:49:34 PM »
Some warnings are expected. As long as there were no errors you are ok. Looks like it finished compiling successfully

Fabrice

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Level nearly completed ...
« Reply #20 on: November 21, 2015, 07:09:58 AM »
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



« Last Edit: November 23, 2015, 02:31:11 AM by Fabrice »

Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: Level nearly completed ...
« Reply #21 on: November 23, 2015, 11:11:24 PM »
Did you modify the following line in your xmamerc file to specify where your rom folder is?:
Code: [Select]
rompath                 $HOME/.xmame/roms
Is your xmamerc file located in one of the locations it was searched for at? I.e.:
Code: [Select]
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?:
Code: [Select]
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)
« Last Edit: November 23, 2015, 11:14:21 PM by Macpod »

Fabrice

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Level nearly completed ...
« Reply #22 on: November 24, 2015, 12:12:49 PM »
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

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: Level nearly completed ...
« Reply #23 on: November 24, 2015, 08:48:39 PM »
Quote
rompath         $HOME/skappy/.xmame/roms
This is incorrect. (it is pointing to /home/skappy/skappy/.xmame/roms) It should be:
Code: [Select]
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:
Code: [Select]
035145.02    NOT FOUND
035144.02    NOT FOUND
035143.02    NOT FOUND
035127.02    NOT FOUND

Fabrice

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Level nearly completed ...
« Reply #24 on: November 25, 2015, 12:22:39 PM »
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

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: Level nearly completed ...
« Reply #25 on: December 02, 2015, 12:31:57 AM »
Code: [Select]
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.
« Last Edit: December 02, 2015, 12:34:07 AM by Macpod »

Fabrice

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Level nearly completed ...
« Reply #26 on: December 04, 2015, 04:51:34 AM »
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

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: Level nearly completed ...
« Reply #27 on: December 05, 2015, 06:21:55 PM »
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

« Last Edit: December 05, 2015, 06:23:50 PM by Macpod »

Fabrice

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Level nearly completed ...
« Reply #28 on: December 07, 2015, 03:34:10 PM »
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

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: Level nearly completed ...
« Reply #29 on: December 07, 2015, 10:34:54 PM »
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.