vendredi 1 mai 2020

docker container for videopac / odyssey2 emulation


As some of you already probably know, the support for the 32 bits software is tending to disappear.
Some old emulators only support 32bits linux systems and some other are difficult to recompile. To help people try and use the o2em2 emulator, i've built a docker image.

Docker is currently widely used to broadcast software and enabel people to use it without having to mess to much with their system.


Prerequisites


You need to have docker installed and running. You need a running linux station with graphical environment set up. The docker container should also work with a windows station, but I have not yet tried to.

The docker service must be started.

Running it

Runing a docker image is as simple as issuing a command :
docker -it <imagename>
The docker image for o2em2 is called o2em2. It is available here : docker hub o2em2.

To run the emulator software and actually use it you need to overcome two problems:
  • access to the graphic interface
  • access to the sound devices
gaining access to the sound device may be considered optionnal, but really it seems necessary to me to have the sounds to enjoy playing those games.

Access to the sound device

obtaining the sound requires to pass an additionnal option
    --device /dev/snd \

Access to the graphic interface


Several options ca be used for that
Option 1 : open network access
If you are willing to open network access to your X11 server then you simply have to pass a DISPLAY env variable
    -e DISPLAY=$(hostname -I | cut -d ' ' -f 1):0  \

Option 2 : provide the container access to the X11 unix domain socket
This can be acheived by passing additionnal options to docker command:
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -v $XAUTHORITY:/root/.Xauthority \
Display must simply be :0
    -e DISPLAY=:0  \

This option also requires access to some shared memory IPC, thus the following option must be added:
    --ipc=host \

Minimal command with option 1 is :
docker run -it \
    --device /dev/snd \
    -e DISPLAY=$(hostname -I | cut -d ' ' -f 1):0  \
    o2em2

Minimal command with option 2 is :
docker run -it \
    --device /dev/snd \
  --ipc=host \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v $XAUTHORITY:/root/.Xauthority \
    -e DISPLAY=$(hostname -I | cut -d ' ' -f 1):0  \
    o2em2


option 1 seems simpler, but do not forget it requires some system configuration as in most linux distros, the X11 server is not listening on an IP port. Option 1 also requires you to open some access with an xhost command.
option 2 should work out of the box.

container tweaking

control launched rom:
By default the container launches always the same game. You can control the launched game by adding the following at the end of the docker command :
    ./o2em2 vp_14.bin
 

tweak bios:
It is possible to provide your own bios directory to o2em2.
     --volume=<fullToBiosDirInHost>:/app/bios  \

tweak rom dir :
It is possible to provide the rom  directory used by o2em2.
     --volume=<fullToRomsDirInHost>:/app/roms  \

tweak sound:
The alsa sound configuration can be set from host system
    --volume=<fullPathtoYourAsound.conf>:/etc/asound.conf \


The following capture show a full command in option 2


Conclusion

I hope this container is going to help some people play the retro games of the early 80's.
In a next coming post i'm going to explain how to control IP address in option 1 and how to troubleshoot sound.


samedi 9 mars 2019

jo2emLauncher v2

jo2emLauncher v2 is in preparation.

What's going on ?
  • new java1.8 compliance
  • git is the VCS
  • dependency enhancements
  • new configuration window
  • ...

You can already use  the master branch.


Here is a snapshot of the improved configuration dialog :



The release will come soon with just a small feature set and will be enhanced in an incremental fashion.

dimanche 3 avril 2016

64bits linux and odyssey 2 emulation

Here is my latest story related to odyssey 2 emulation.

Recently, I've offered myself a brand new computer. I've installed a recent linux distro with 64 bits compilation mode. Everything was fine until i tried to restore o2em and my launcher jo2emLauncher. For those who don't know, here is a link to a blog entry about the launcher blog entry about jo2emLauncher.


No odyssey 2 emulator anymore ?


The most perspicacious among have already noticed the big lie in the previous section. Not everything was easy and straightforward. The problem with o2em was rather the 20th problem I met, but it si the one this blog entry is about.
  • Impossible to use the binary file I had saved. It was a 32 bits exe and the system is 64 bits. There are some compatibility layers, but I did not try this way.
  • O2em is developed using liballegro 4.2 and ubuntu 15.10 (Willy Werewolf) brings allegro 4.4.
Rather than trying to make o2em work by installing a compatibility layer and some old library release, I tried to find an more modern emulator. I found O2em2. The main page of this project is there o2em2.

 

Recompile it


Recompiling o2em2 and making it working has not been a simple job.
  • I first downloaded the latest release o2em2-1.51.tar.gz
  • I uncompressed: tar -xvzf o2em2-1.51.tar.gz
  • cd o2em2-1.51/
  • ./configure --with-game-api=allegro
  • make
    • vmachine.c:25:19: fatal error: debug.h: No such file or directory
       
  • I edited main.c and vmachine.c to replace
    •  #include "debug.h" by
    • //#include "debug.h"
  •  make
  • This time I got a launchable program. To try it, I just had to create a "bios" and a "roms" directories.
 

Program options

The following issue I met was about options. Lots of o2em command line options were not accepted anymore. Among them:
  • -help (not so important)
  • -fullscreen (Annoying because to really have fun you have to play 2 player games. You have to be a few feet away from the screen)
  • -s1
  • -s2 (really annoying because many games require a joystick or a joypad.)
To fix this, I modified the source code of the function parse_option. The modifications of the source code are simple but there are many. I don't place them in the blog entry but you can download the patch.


Having the joysticks working

After the parse_option update, all the options are accepted by the program, but some are still not working. i did not test each of them, but I can tell you that joysticks were still not working.
To fix it, I uncommented a source code line in vmachine.c. source file. The uncommented line is poll_joystick();.

Once this statement is brought back, the program is working fine for me. Nonetheless you may find some other issues and differences with o2em.

Source patches

To ease getting the same result I got, I publish 2 patch files. You can download them:
  main.patch

 vmachine.patch

To apply patches, you just have to download them into the o2em2 source directory and enter the following command:

  • patch -p0 < vmachine.patch
  • patch -p0 < main.patch
Then compile:
  • ./configure --with-game-api=allegro
  • make

  What about jo2emLauncher ?

For now I just created a symbolic link o2em -> o2em2. It is enough to make the launcher work with o2em2.
In a next coming release of he launcher, the name of the emulator binary will be customizable. I've added this item to the TODO list.

dimanche 27 mars 2016

linux 64 bits et emulation videopac


Voici le compte rendu de mes dernières aventure en matière d'émulation videopac.

Dernièrement, je me suis offert un tout nouveau PC. J'ai installé dessus une distribution récente en 64 bits.Tout se passait assez bien jusqu'à ce que j'essaye de rétablir O2em et mon petit launcher jo2emLauncher. Pour ceux qui n'auraient pas suivi les épisodes précédents, voici un article sur jo2emLauncher.

Plus de videopac ?

Les plus perspicaces d'entre vous auront remarqué le gros mensonge qui consiste à dire que tout allait bien. En fait, mes difficultés avec o2em,  c'etait plutôt le vingtième problème, que je rencontrais, mais c'est le seul dont je vais vous parler dans cet article.
  • Impossible d'utiliser le binaire o2em que j'avais sauvegardé. Il est 32 bits et le système est 64 bits. Il existe des couches de compatibilité, mais je n'ai pas essayé de suivre cette voie.
  • O2em est développé pour liballegro 4.2 et ubuntu 15.10 (Willy Werewolf) apporte allegro 4.4.
Plutôt que d'essayer de faire marcher o2em en installant une couche de compatibilité et de vieilles version de bibliothèques, j'ai essayé de trouver un émulateur plus moderne. J'ai trouvé  o2em2  dont la page principale se trouve ici o2em2.

Recompiler


Recompiler o2em2 et le faire fonctionner ne s'est pas avéré simple.
  • J'ai téléchargé les sources de la dernière version o2em2-1.51.tar.gz
  • J'ai décompressé: tar -xvzf o2em2-1.51.tar.gz
  • cd o2em2-1.51/
  • ./configure --with-game-api=allegro
  • make
    • vmachine.c:25:19: fatal error: debug.h: No such file or directory
       
  • J'ai édité main.c et vmachine.c pour remplacer
    •  #include "debug.h" par
    • //#include "debug.h"
  •  make
  • Cette fois on obtient un exécutable utilisable. Pour l'essayer, il suffit de mettre en place un répertoire "bios" et un répertoire "roms".
 

Les options

Le problème suivant est que de nombreuses options ne sont pas acceptées. Parmi lesquelles:
  • -help (anecdotique)
  • -fullscreen (ennuyeux car pour s'amuser vraiment, il faut jouer à 2 et avoir un peu de recul)
  • -s1
  • -s2 (également très ennuyeux car sans joystick la jouabilité est diminuée)
Pour corriger ce problème, j'ai modifié de façon assez substantielle le code de la  fonction parse_option. Les modifications sont simples mais assez nombreuses. Je ne les reproduis donc pas dans l'article, et je me contente de fournir un patch.

Les joysticks

Avec cette première modification, les options sont toutes reconnues, mais toutes en fonctionnent pas. Je n'ai pas tout testé en détail mais je peux vous dire que les joysticks ne fonctionnent toujours pas.
Pour corriger ca, j'ai rétabli une ligne de code qui a été mise en commentaire dans le source vmachine.c. poll_joystick();.

Une fois cette ligne rétablie, le fonctionnement me donne satisfaction. Il se peut cependant qu'il y ai d'autres différences avec o2em.

Les patches

Pour faciliter la reproduction des manipulations que j'ai décrites , je mets 2 fichiers patches à disposition :
 main.patch

 vmachine.patch

Pour appliquer ces patches, il suffit de les télécharger dans le répertoire contenant les sources de o2em2 et d'entrer

  • patch -p0 < vmachine.patch
  • patch -p0 < main.patch
 Ensuite il suffit de compiler
  • ./configure --with-game-api=allegro
  • make

 Et jo2emLauncher ?

Pour le moment je me suis contenté de créer un lien o2em -> o2em2. Ca suffit pour faire fonctionner le launcher avec o2em2.
Dans une prochaine version, le nom de l'exécutable sera configurable. Je l'ai ajouté a la TODO list.





samedi 2 mai 2015

o2em emulator on raspberry pi

Introduction

I am going to install o2em on a raspberry pi.

Sometimes ago I had bought a raspberry pi. I was then seeking another goal. The project I then had did not succeed, so this marvellous piece of technology was lying in a shoe box under my old CRT television set.
good old television set

A raspberry pi model B, 2 pads, good old TV set. All I need to get a videopac / odyssey 2 playing  in my living room  is to install an emulator.
I thank smoothifier for his very kind message and for having given me the idea to turn this raspberry pi into a videopac / odyssey 2 emulator. To say it shortly, I tried and as I managed, I'm going to tell you how.
OS
As I really tried many tunings on my raspberry pi, I decided to start from blank. So I started by downloading NOOBS 1.4.0. . I installed raspbian. Then I made some basic customizations:
  • network
  • overclock settings at 900 MHz
  • timezone
  • keyboard
  • enable ssh access
Recompilation
o2em requires liballegro. To install it:
$ apt-get liballegro4.2-dev




I didn't know if I needed liballegro4.2-plugin-jack, I avoided doing anything and for the moment it seems ok.
Then, I followed my post install o2em on linux and-recompile it section 2. I placed source files in  /home/pi/o2em118src and I installed binary files in  /home/pi/o2embin directory.
Installation
I copied binary files resulting from compilation into o2embin:
  • o2em
  • dis48
I created a directory called bios and copied the french videopac C52 bios file that can be downloaded from here : The old computer (Last file from the list)
Then I installed a rom file set coming from here : emulvideopac-rom001.tgz .
 

Launching o2em

You must have X11 started to launch o2em. So enter the following commands in an  xterm.
$ cd o2embin
$ ./o2em
produces a minimal message :
O2EM v1.18 (Jan/2007)  -  UNIX binary
Free Odyssey2 / Videopac+ Emulator - http://o2em.sourceforge.net
Created by Daniel Boris (c)1996/1998
Developed by:
     Andre de la Rocha since version 0.80
     Arlindo M. de Oliveira since version 1.16

type o2em -help


$ o2em -help
produces a help message that I cannot completely see on my TV set because it is too long . The Esc key enables to get the help window away.

$ o2em vp_14.bin
launches the game 14 "duel".

$ o2em -fullscreen vp_14.bin
launches the game 14 "duel" in full screen.

If you have 2 joypads with your raspberry, as I do :
The raspberry pi and 2 pads
 
$ ./o2em -s1=3 -s2=3 -fullscreen vp_14.bin
enables to play using the pads instead of the keyboard.

Whatever are your preferred options, you acn record them once for all in a file named o2em_def.cfg. This file must be placed in the binary directory (/home/pi/o2embin). My o2em_cgf file contains:
# PVentrillon configuration 1
fullscreen
s1=3
s2=3


This enables to launch the emulator with a simpler command :
$ o2em vp_14.bin

Deactivate the screensaver

While playing, you will probably be annoyed by the screensaver. It is triggered after 10 minutes and replaces the display by a black screen.
This is not compatible with playing arcade games.
I found information on how deactivating the screensaver in this news thread : screensaver .
To make it short, i just added the following lines to the file /etc/xdg/lxsession/LXDE-pi/autostart:
  @xset s noblank
  @xset s off
  @xset -dpms




Conclusion
Here is the result. We could believe be back to the 80's. Actual odyssey 2 joystick would achieve to make the feeling complete.


o2em working
 

Making  o2em work on raspberry pi has been easier than I first thought. Next step will be to try jo2emlauncher on raspberry pi.

vendredi 1 mai 2015

o2em sur raspberry pi

Introduction
Je vais installer o2em sur un raspberry pi.

 Il se trouve que j'avais acquis un raspberry pi il y a quelques temps. Il était destiné à un tout autre but. Ce projet n'a pas abouti, j'avais donc cette petite merveille qui traînait dans une boite à chaussures sous ma vieille télé à tube cathodique.
une bonne vieille télé cathodique

Un raspberry pi model B, 2 pads, une bonne vielle télé. Il ne reste qu'à installer un émulateur et c'est reparti pour des séance de jeu videopac dans le salon!

Je remercie smoothifier pour son message très aimable et pour m'avoir donné l'idée de recycler ce raspberry pi en émulateur videopac. Bref, je me suis lancé et comme j'ai obtenu un résultat positif, je vous fait le compte rendu de mes opérations.

OS
Comme j'avais mis pas mal de bazar sur mon raspberry pi, je suis reparti de zéro. J'ai donc commencé par télécharger NOOBS 1.4.0. . J'ai installé le système raspbian.J'ai ensuite fait un minimum de configuration pour avoir les fonctions de base:
  • réseau
  • overclock à 900 MHz
  • timezone
  • clavier
  • accès ssh

Recompilation

o2em nécessite liballegro. Pour l'installer:
$ apt-get liballegro4.2-dev




Ne sachant si j'avais besoin de liballegro4.2-plugin-jack, je me suis abstenu et pour le moment, tout va bien.

Ensuite, j'ai suivi mon post installer o2em sous linux et recompiler chapitre 2. J'ai mis les sources dans /home/pi/o2em118src et j'ai installé les binaires dans le répertoire/home/pi/o2embin.

Installation
Dans me répertoire o2embin, j'ai recopié les binaires issus de la compilation:
  • o2em
  • dis48
J'ai créé un répertoire bios dans lequel j'ai placé le bios videopac C52 français que l'on peut télécharger ici : The old computer (C'est le dernier de la liste)


J'ai ensuite installé le set de rom que vous pouvez telécharger ici : emulvideopac-rom001.tgz .

Lancer o2em

Il faut savoir que pour lancer o2em il faut impérativement être sous X11. Donc les commandes qui suivent doivent être entrées dans un xterm.
$ cd o2embin
$ ./o2em
affiche un message minimal:
O2EM v1.18 (Jan/2007)  -  UNIX binary
Free Odyssey2 / Videopac+ Emulator - http://o2em.sourceforge.net
Created by Daniel Boris (c)1996/1998
Developed by:
     Andre de la Rocha since version 0.80
     Arlindo M. de Oliveira since version 1.16

type o2em -help


$ o2em -help
 affiche un message d'aide que je nepeux voir en entier sur ma télé parce que il est trop long. La touche Esc permet de s'en débarasser.

$ o2em vp_14.bin
lance le jeu 14 "duel".

$ o2em -fullscreen vp_14.bin
lance le jeu 14 "duel" en plein écran.

Si vous avez des joypads sur votre raspberry, c'est mon cas, j'en ai deux :
Le raspberry et les 2 pads
 
$ ./o2em -s1=3 -s2=3 -fullscreen vp_14.bin
permet de jouer sans les touches du clavier mais avec les pads.

Quelles que soient vos options, vous pouvez les enregistrer une fois pour toutes dans un fichier o2em_def.cfg. Ce fichier doit être placé dans le répertoire des binaires (/home/pi/o2embin). Dans mon cas il contient:
# PVentrillon configuration 1
fullscreen
s1=3
s2=3


 Cela permet de lancer les roms plus simplement :
$ o2em vp_14.bin

Désactiver le screensaver
En jouant, vous remarquerez probablement que le screensaver se déclenche au bout de 10 minutes et supprime l'affichage le remplaçant par un écran noir.
Ceci est incompatible avec le jeu.
J'ai trouvé les informations pour désactiver le screensaver dans ce fil de discussion : screensaver .
En résumé j'ai ajouté les lignes suivantes au fichier /etc/xdg/lxsession/LXDE-pi/autostart:
  @xset s noblank
  @xset s off
  @xset -dpms




Conclusion
Voila le résultat. On s'y croirait quand même.De vrais joystick d'époque et l'illusion serait totale.


o2em en fonctionnement
 

Faire fonctionner o2em sur raspberry pi s'est avéré plus facile que je ne l'imaginais. La prochaine étape, après la traduction de cet article en anglais, sera d'essayer jo2emlauncher sur raspberry pi.


 

 




dimanche 30 mars 2014

jo2emLauncher intègre les manuels des jeux videopac

jo2emLauncher revient avec sa dernière version  : 1.2.1
jo2emLauncher est un launcher pour o2em. Comme il est écrit en java, il est 100% utilisable sous linux.

Cette nouvelle version comprend des améliorations internes pour préparer les versions futures, mais elle a aussi de nouvelles fonctions.

  • Des icones sur les boutons et dans les menus déroulants
  • Les messages d'erreru ont été retravaillés
  • le launcher sait gérer les manuels des jeux (comme le montre la figure ci dessous).
Le paragraphe "getting started" du fichier readme a été revue.
Les manuels pdf proposés viennet du site suivant : http://www.bermuda.ch/balduin/videopac/videopac.html. Mille mercis au propriétaire de ce site qui met à notre disposition une très belle collection de manuels.

Le contenu de la version suivante (1.4?) n'est pas encore défini. Je vous propose de demander les features que vous aimeriez ou de voter pour l'une de celles qui sont d'hors et déjà planifiées:
  - Améliorer l'ergonomie de la fenêtre configuration (with spinners for integer values    and file choosers for directories)
  - Améliorer al fenêtre a propos
  - rendre la taille o2em  configurable
  - rendre les touches de fonction o2em configurables
  - savoir exploiter tvb
  - permettre de traduire les racourcis clavier
  - afficher text / html manuals
  - ajouter une option de  zoom "fit width"
  - rendre parametrable le rom scanner
  - ajouter une notion de categorie de rom pour les classer

J'aimerais beaucoup recevoir du feedback de ceux qui utilisent ou prévoient d'utiliser jo2emLauncher.



jo2emLauncher now handles manuals

jo2emLauncher has come out with a new release : 1.2.1
jo2emLauncher is a launcher for o2em. As it is written in java, it is fully useable with linux .

This new release has some internal enhancements to prepare future releases and it also has some new feature visible to end users.

  • Icons in menu and one buttons
  • error messages have been reworked
  • manual are now displayed in a dedicated tab (as shown below).
The getting started section in the readme file has been reviewed.
The manual pdf files are coming from the following site : http://www.bermuda.ch/balduin/videopac/videopac.html. Thank you very much to the owner of this site who provides us a very complete set of manuals.

The content of the next release is not defined yet. You can ask for features or vote for the planned features of this list:
  - make a nicer configuration window (with spinners for integer values
    and file choosers for directories)
  - make manual, screenshot and cover directories optional
  - make a fancier About window
  - make o2em size configurable
  - make o2em function keys configurable
  - use tvb (as well as text file)
  - enable to localize keyboard shortcuts
  - display text / html manuals
  - have a zoom option "fit width"
  - enable to parameterize rom scanner
  - add a category notion for roms

I am very willing to receive feedback from people who plan to use or actually use jo2emLauncher.



dimanche 2 février 2014

launcher jo2emlauncher 1.0 released

jo2emlauncher 1.0 is released

After 6 month in beta release and more than 140 downloads, I decided it was time for jo2emlauncher to be released.

I remind that it is a graphical launcher for o2em that can work under linux. As it is written in java it is probably usable under other systems? For more detail please read  march 2013 blog entry.

Link to project site : projet jo2emlauncher
This 1.0 release can be downloaded there : jo2emLauncher-1.0.0.jar


Of course there is still some work to be done, but available functions are :

  • Cover display
  • screenshot display
  • o2em parameter
  • o2em launch
  •  joystick calibrate
  • i18n

launcher jo2emlauncher version 1.0

La version 1.0 de jo2emlauncher est sortie.

Après 6 mois de beta version et 145 downloads j'ai pensé qu'il etait temps.

Pour rappel il s'agit d'un launcher java pour o2em. Ce launcher fonctionne donc sous linux. Pour ceux qui veulent plus de details, vous pouvez consulter mon blog de mars 2003.

Le site du projet : projet jo2emlauncher
Cette version 1.0 peut être téléchargée là : jo2emLauncher-1.0.0.jar

Bien entendu il reste de travail, mais les fonctions d'hors et déjà disponibles sont :
  • affichage des couvertures
  • affichage de screenshots
  • paramétrage de o2em
  • lancement de o2em
  • calibrage des joysticks
  • support français et anglais

samedi 7 décembre 2013

Emulation and pads

Emulation and pads

This entry is available in french

Introduction

This article is not completly dedicated to videopac (aka odyssey 2), but i would like to share my experience and, if possible, receive some information.
If you have a preffered pad model please let me know and please explain how you use it.

The problem

For me pads and joysticks have 2 main uses:
- videopac (odyssey 2) emulation
- megadrive (genesis) emulation

I only emulate under linux (currently ubuntu precise pangolin).

When i started to play different games on emulators with my children, the lack of joystick rapidely became a real problem. At least, it was really lowering gaming pleasure.
It was impossible to plug sega gamepads (not supported).
It was impossible to plug videopac joysticks, they do not even have a plug.


I quickly gave up the idea of buying joysticks. I only found very complex sticks not suitable to a very simple odyssey 2 gameplay.

Moreover the megadrive pads have 6 buttons (2 rows of three).
sega genesis/megadrive pad
I was seeking to have a product both suitable for megadrive and for videopac emulation.

First try


I started by buying two saitek p220 pads.
Saitek p220 pad



In the beginning i was quite happy. They were not too expensive. Thanks to the USB plug they worked at once. The 6 buttons were working. The useless throttle gadget in the middle was not annoying me.
But after a while, I realized the product was not so good:
- The D-pad was not reactive enough to play platform games
- The 6 buttons were not sensitive enough
- The diagonals were difficult to find at once





In some games, the diagonal problem is critical. It is impossible to play to DamBuster (videopac 29) without perfectly working diagonal directions. With other games it is less annoying, it is just that after half an hour your hand is completely tetanized.


Second try

So i decided to spend a little more money to have a really good pad. A quick search learned to me that top quality pads like Mad catz were realy too expensive. I could not find a saturn pad which is supposed to work on PC.
I finnaly found this:
pad hori fighting commander pro
This pad is HORI fighting commander PRO. I don't know why, but mines, yes i bought two, do not have the trendy color on buttons. But we spend a so little time to look at buttons that it is not bothering me.
Megadrive emulation worked at once. The emulator i use asks to define buttons and it's done, you can play.

The 6 buttons are quite sensitive.
The D-Pad is accurate and smooth, even if it does not behave exactly like sega one.
This feeling is lasting for now more than one year.

But there is a pitfall: these pads are for Sony PS3. With a PC, the D-pad is seen as a POV stick. So it was not working with my videopac emulator. No use to blame linux, i had the same behavior with another well known OS.

The advices i could find in forums were:
- install a driver for PS3 pads, I did not manage
- install a software (commercial OS) enabling to map pads to keyboard (xpadder, joy2key, ppjoyjoy, ...)


With linux, there is a standard solution:
Linux includes command-line tools  to handle and configure joysticks and pads: jstest jscal jscal-store jscal-restore
and a graphical front end: jstest-gtk which enable to remap axes.


jstest-gtk

Well, one small problem remains: I have to configure one of the two pads each time i use videopac emulator though it should be saved once for all.
Is it a bug ? I think so. Any information on the subject is welcome.
If you have a linux distro that completely saves two pad config please let me know. Do some of you have the same problem ?


Unexpected lucky break!

Sometime later, at an attic sale, i found a  pad microsoft sidewinder at a such low price that i could not left it behind me. I bought it and it works very well with linux.
Furthermore, though it has been previously used it is working nicely and it has 6 buttons.


microsoft sidewinder

Conclusion Please share your knowledge !

What are your preffered pads ?.
  • What is its brandname ?
  • How do you use it ?
Share your knowledge about jstest
  • Is it completely stable is your distro ?
  • Can it save the second pad configuration ?
Where can i find saturn pads ?

 

dimanche 22 septembre 2013

Emulation et pad

Introduction

Also available in english


Cet article n'est pas complètement spécifique au videopac, mais je voudrais partager mon expérience et si possible recevoir des informations.
Si vous avez un pad préféré, faites le moi savoir et expliquez de quelle manière vous l'utilisez (pour quel usage, sous quel environnement).

Le problème


Pour moi, les pads et joysticks ont 2 utilisations:
- faire de l'émulation videopac
- faire de l'émulation megadrive
Je fais fonctionner ces émulateurs uniquement sous linux (actuellement ubuntu precise pangolin).

Quand j'ai commencé à jouer à différents jeux sur émulateur avec mes enfants, l'absence de joystick est rapidement devenu un vrai problème. En tout cas, ça devenait une très sérieuse limite au plaisir de jeu.
Impossible de brancher les manettes sega, ce n'est pas supporté.
Impossible de brancher les manette videopac, il n'y a même pas de prises. Le câble du joystick sort directement de la console.

J'ai rapidement abandonné l'idée d'acheter des joystick. Je n'ai trouvé que des trucs très sophistiqués pas très compatible avec la simplicité des jeux videopac.
En plus les pad de megadrive avait 6 boutons répartis en 2 rangées de 3:
pad sega megadrive
Tant qu'à faire, autant essayer d'avoir des pads qui puissent servir pour la megadrive et le videopac.

Premier essai


J'ai commencé par acheter 2 pads saitek p220.
pad saitek p220
Au début j'étais assez content. Ils ne m'avaient pas couté très cher. Avec leur prise USB, ils avaient marché du premier coup sans faire d'histoire, les 6 boutons fonctionnaient, le gadget "throttle" en servait à rien, mais ne me gênait pas.
Mais au bout d'un moment, je me suis aperçu des limites du produit:
- le D-pad ne répond pas assez pour faire des jeux de plate-forme
- les boutons ne sont pas très précis ni très réactifs
- le D-pad n'est pas assez précis pour permettre de trouver les diagonales du premier coup.

Dans certains jeux, le problème des diagonales est critique. Impossible de jouer à DamBuster (videopac 29) sans avoir des diagonales parfaites. Avec d'autres jeux, c'est moins génant, c'est juste que après une demi heure on a la main complètement tétanisée.

Deuxième essai


J'ai donc décidé de mettre un peu d'argent sur la table pour avoir quelque chose de vraiment bien. Une recherche m'a rapidement amené à me rendre compte que le top, les mad catz et autres atteignent des prix au dessus du raisonnable. Pas moyen de mettre la main sur une manette pour saturn. J'ai fini par trouver çà:
pad hori fighting commander pro
C'est un HORI fighting commander PRO. Je ne sais pas pourquoi, mais les miens, et oui ça va par deux chez moi, n'ont pas de couleur sur les boutons. Mais bon, les boutons pour ce qu'on les regarde, ce n'est pas très grave.
L'émulation megadrive a fonctionnée du premier coup. L'émulateur que j'utilise demande de définir les boutons et zouh ça marche.

Les 6 boutons fonctionnent de manière précise.
Le D-pad est assez précis et souple à la fois, même s'il ne donne pas tout à fait le même sensation que le pad sega.
Et ce sentiment perdure après un an d'utilisation.

Par contre il y a un gag: c'est que ces pads sont pour PS3. Et sous PC le D-pad est reconnu comme un champignon. Donc ça ne fonctionne pas avec mon émulateur videopac. Pas la peine d'accuser linux, c'est pareil sous un système propriétaire très répandu.


Les solutions généralement préconisées consistent à
- installer un driver pour pad ps3, malgré les posts sur le sujet, je n'ai pas réussi.
- installer un soft (sous système propriétaire) permettant de mapper les pads sur des entrées clavier (xpadder, joy2key, ppjoyjoy, ...)

Pour linux, il y a une solution standard de série:
Linux inclut des outils en ligne de commande pour gérer et configurer les joysticks et pad: jstest jscal jscal-store jscal-restore
et un front graphique: jstest-gtk qui permet de remapper les axes.

jstest-gtk

Bon, il me reste encore un petit problème: Je suis obligé de reconfigurer l'un des deux pads à chaque utilisation alors que d'après ce que j'ai compris, ca devrait être sauvegardé de manière durable.
S'agit -il d'un bug ? Je crois que oui. Je suis preneur de toute information sur le sujet. Est ce que vous avez une distribution qui gère complètement les 2 pads reconfigurés ? Avez vous le même problème que moi ?

Imprévu coup de chance !


Quelques temps plus tard, dans un vide grenier je trouve un pad microsoft sidewinder à un pris défiant toute concurrence. Je l'achète, et il marche très bien sous linux.
En plus, bien que d'occasion, son comportement et plus que correct, et il a 6 boutons.

microsoft sidewinder

Conclusion Participez !

Donnez le nom de vos pad préférés.
  • Quel est la marque de ce pad ?
  • Comment l'utilisez vous ?
Partagez vos expériences avec jstest
  • Est ce que il est complètement stable dans votre distribution ?
  • Est qu'il parvient à sauvegarderla configuration de la deuxième manette ?
Où trouver des manettes saturn ?

dimanche 10 mars 2013

launcher (graphic front end ) for o2em under linux


 version fançcaise

We saw there is a nice application called  o2emlauncher  to ease o2em use. Unfortunately it only exists on windows. What does exists under linux ?

Well according to my knowledge, untill yesterday there was nothing.  But for some reasons that i won't detail at once, but only later,  I absolutely wanted to use and make my children use o2em under linux OS. So I developped a launcher for o2em.

It is an open source application. The project is hosted at sourceforge sourceforge, it is called jo2emlauncher.

It is a java application, thus it should work under win, OSX, and other OSes. It is still in the beta stages, but as my children have been using it for a whileI think it is enough stabel to be usable.

Here is a screen capture :





For those who want to start from sources, a readme file is provided.

For thos who want it more simple :


I am seeking for any feedback
  • some translations to other languages
  • some requests for features
  • some bug reports
  • some reports of test for any OS
  • some set of parameters
  • some request for help

Hope you will enjoy ...

launcher (front end graphique) pour o2em sous linux


English version

Nous avons vu qu'il existait une application sympa o2emlauncher sous windows pour faciliter l'utilisation de o2em. Mais sous linux, qu'existe t-il ?

Et bien à ma connaissance jusqu'à hier, il n'existait rien. Mais comme pour des raisons que je développerai plus tard, je voulais utiliser et mettre à la portée de mes enfants d'utiliser o2em sous linux, j'ai développé un launcher.

Cerise sur le gateau il est open source. Le projet est sous sourceforge, il s'appelle jo2emlauncher.

Comme c'est développé en java, il devrait fonctionner sous win, OSX, et d'autres OS. C'est encore une version beta, mais comme mes enfants l'utilisent depuis quelques temps je pense que c'est assez fini pour être utilisable.

Voici une capture :





Pour ceux qui travaillent à partir des sources, vous allez trouver un readme.

Pour ceux qui veulent faire simple :

Je suis intéressé par tous les retours
  • nouvelles traductions
  • demande de fonctions
  • rapports de bug
  • rapport de test sur d'autres OS
  • jeux de paramètre
  • demandes d'aide
  • ...


A bientôt

samedi 16 février 2013

install o2em on linux and recompile it

 version francaise 

In my previous message "installer et configurer o2em", I explained how to install this emulator on windows.
In this message I'm going to provide instructions for linux.

The main videopac emulator is o2em. The web site proposes binaries of the latest release of o2em only for Windows. This is why we are going to start from the sources and recompile them.

This mesage is based on experiments made withubuntu Precise Pangolin 32 bits. You may need to tweak here described manipulations to your own linux distribution.

1 Dependancies

the main dependancy of o2em is liballegro.
You can use synaptic Package manager to install it. You should get a result similar to the figure below:


2 Rebuild videopac emulator from sources

In this chapter we are going to rebuild o2em from sources. Those who do not whish to recompile it themselves can jump to chapter 3.

2.1 Download o2em sources

Click on the following link to download a zip file of o2em sources o2em118src.zip.
Unzip the downloaded file. I use to unzip it into my home directory.

You should get the following directory structure:
  • o2em118src/
    • o2em118src/Docs/
  • changelog.txt
  • LICENSE.TXT
  • O2EM.TXT
    • o2em118src/SRC:
  • AUDIO.C
  • AUDIO.H
  • CONFIG.H
  • CPU.C
  • CPU.H
  • CRC32.C
  • CRC32.H
  • CSET.C
  • CSET.H
  • DEBUG.C
  • DEBUG.H
  • DIS48.C
  • KEYBOARD.C
  • KEYBOARD.H
  • MAIN.C
  • Makefile
  • Makefile.djgpp
  • Makefile.freebsd
  • Makefile.linux
  • Makefile.mingw
  • Makefile.win
  • O2EM116_private.h
  • O2EM116_private.rc
  • O2em118.dev
  • O2em118.layout
  • O2EM.ICO
  • o2em.png
  • O2EM.RC
  • O2EM.RES
  • SCORE.C
  • SCORE.H
  • SYSTEM.C
  • TABLE.C
  • TABLE.H
  • TIMEFUNC.C
  • TIMEFUNC.H
  • TYPES.H
  • VDC.C
  • VDC.H
  • VMACHINE.C
  • VMACHINE.H
  • VOICE.C
  • VOICE.H
  • VPP.C
  • VPP_CSET.C
  • VPP_CSET.H
  • VPP.H

2.2 Change the case of the file names

The files in SRC directory  nearly all have their name in uppercase. this is causing a problem during compilation. So we have to correct the case:
Enter the following script and save it into o2em118src/SRC/rename.sh
#!/bin/bash
for file in *
do
        trfile=$(echo $file|tr '[A-Z]' '[a-z]')
        if [ "$file" != "$trfile" ]
        then
                command="mv $file $trfile"
                $command
        fi
done
run the rename.sh script .

 2.3 Edit score.c

To solve errors like :
score.c:110:68: error: ‘errno’ undeclared (first use in this function)

Edit score.c file , add #include <errno.h> before the first #include statement.
 *   Score loading/saving by manopac
 */

#include <errno.h>
#include <dirent.h>


2.4 Modify makefile

To solve the following error
 /usr/bin/ld: cannot find -lalleg_unsharable
collect2: ld returned 1 exit status

Edit  makefile.linux file
Replace
LIBALLEG = /usr/lib/liballeg.so.4.2 -lalleg_unsharable

by
LIBALLEG = `allegro-config --libs`
Beware of antiquotes (AltGr 7)

2.5 Compile

make -f makefile.linux
As output, you must get  two executable files in SRC directory:
  • dis48
  • o2em

2.6  Install

Copy o2em into the directory of your choice. My pesonal choice is /usr/local/games/o2em. In this directory create two subdirectories roms and bios.

drwxrwxr-x 2 ventrill ventrill   4096 Feb 16 17:57 bios
-rwxrwxr-x 1 ventrill ventrill  11768 Feb 16 17:57 dis48

drwx------ 2 ventrill ventrill   4096 Feb 16 18:18 Docs

-rwxrwxr-x 1 ventrill ventrill 133448 Feb 16 17:57 o2em

drwxrwxr-x 2 ventrill ventrill   4096 Feb 16 17:57 roms
In bios directory, you must copy a bios file. In roms directory you must copy rom files. Pour avoir plus de détails, consultez le post "installer-et-configurer-o2em" .

3 o2em from binary in tarball

For those who do not want to go through the steps of recompiling described in chapter2, here is an alternate solution. I recorded the result of chapter 2 and zipped it into this archive : emulvideopac001-linux-x86.tgz.
Download it, expand it and here you are.

4 Use o2em

For now, there is no launcher availabel. I show a shell command. change to the directory wehre you have decompressed the archive. There enter the following commands :
cd o2em
./o2em vp01.bin

To learn more about available options, read the file Docs/O2EM.TXT. I am also planning to describe the use of available options in future posts ...


  



installer O2em sous linux et recompiler

english version


Lors du précédent message installer et configurer o2em, j'avais expliqué comment installer cet émulateur videopac sous windows.
Dans ce message je vais essayer d'aider les utilisateurs  linux.

Le principal émulateur pour videopac est o2em. Le site web ne propose des binaires de la dernière version que pour windows. Nous allons donc repartir des sources et les recompiler.

Cet article a été rédigé à partir d'une distribution ubuntu Precise Pangolin 32 bits. Il vous faudra sans doute adapter les manipulations décrites à votre distribution.

1 Dépendances

La seule dépendance notable de l'émulateur o2em est liballegro.
Utilisez le gestionnaire de paquets synaptic pour l'installer. Vous devez arriver à un résultat comparable à celui-ci:


2 Reconstruire l'émulateur videopac a partir des sources 

Dans ce chapitre nous allons recompiler o2em à partir des sources. Ceux qui ne souhaitent pas recompiler eux mêmes peuvent aller au chapitre 3.

2.1 Télécharger les sources o2em

Cliquez sur le lien suivant pour télécharger un zip des sources o2em118src.zip
Decompresser le zip. Personnellement je le décompresse dans mon home directory.

Vous obtenez l'arborescence suivante:
  • o2em118src/
    • o2em118src/Docs/
  • changelog.txt
  • LICENSE.TXT
  • O2EM.TXT
    • o2em118src/SRC:
  • AUDIO.C
  • AUDIO.H
  • CONFIG.H
  • CPU.C
  • CPU.H
  • CRC32.C
  • CRC32.H
  • CSET.C
  • CSET.H
  • DEBUG.C
  • DEBUG.H
  • DIS48.C
  • KEYBOARD.C
  • KEYBOARD.H
  • MAIN.C
  • Makefile
  • Makefile.djgpp
  • Makefile.freebsd
  • Makefile.linux
  • Makefile.mingw
  • Makefile.win
  • O2EM116_private.h
  • O2EM116_private.rc
  • O2em118.dev
  • O2em118.layout
  • O2EM.ICO
  • o2em.png
  • O2EM.RC
  • O2EM.RES
  • SCORE.C
  • SCORE.H
  • SYSTEM.C
  • TABLE.C
  • TABLE.H
  • TIMEFUNC.C
  • TIMEFUNC.H
  • TYPES.H
  • VDC.C
  • VDC.H
  • VMACHINE.C
  • VMACHINE.H
  • VOICE.C
  • VOICE.H
  • VPP.C
  • VPP_CSET.C
  • VPP_CSET.H
  • VPP.H

2.2 Corriger la casse

Les fichiers du répertoire SRC sont presque tous en majuscule. Ceci pose problème lors de la compilation. nous allons donc corriger cela:
Saisissez un script et sauvez le dans le répertoire o2em118src/SRC
#!/bin/bash
for file in *
do
        trfile=$(echo $file|tr '[A-Z]' '[a-z]')
        if [ "$file" != "$trfile" ]
        then
                command="mv $file $trfile"
                $command
        fi
done
Executer le script.

 

 2.3 Editer score.c

Pour corriger les erreurs comme celle qui suit :
score.c:110:68: error: ‘errno’ undeclared (first use in this function)

Editez le fichier score.c , ajoutez #include <errno.h> devant le premier include.
 *   Score loading/saving by manopac
 */

#include <errno.h>
#include <dirent.h>


2.4 Modifier makefile

Pour corriger l'erreur
 /usr/bin/ld: cannot find -lalleg_unsharable
collect2: ld returned 1 exit status

Editez le fichier makefile.linux
Remplacez
LIBALLEG = /usr/lib/liballeg.so.4.2 -lalleg_unsharable

Par
LIBALLEG = `allegro-config --libs`
Attention à bien respecter les antiquotes (AltGr 7)

2.5 Compiler

make -f makefile.linux
En résultat, vous devez obtenir dans le répertoire SRC deux executables:
  • dis48
  • o2em

2.6  Installer

Copier o2em dans le répertoire de votre choix. Moi je mets ça dans /usr/local/games/o2em. Dans ce répertoire je crée deux sous-répertoires roms et bios.

drwxrwxr-x 2 ventrill ventrill   4096 Feb 16 17:57 bios
-rwxrwxr-x 1 ventrill ventrill  11768 Feb 16 17:57 dis48

drwx------ 2 ventrill ventrill   4096 Feb 16 18:18 Docs

-rwxrwxr-x 1 ventrill ventrill 133448 Feb 16 17:57 o2em

drwxrwxr-x 2 ventrill ventrill   4096 Feb 16 17:57 roms
Dans le répertoire bios il faut déposer un fichier bios, et dans le répertoire roms il faut déposer un fichier rom. Pour avoir plus de détails, consultez le post "installer-et-configurer-o2em" .

3 o2em a partir du tar binaire

Pour ceux qui ne veulent pas effectuer les manipulations du chapitre 2, voici une alternative. J'ai enregistré le résultat  de toutes les manipulations du chapitre 2 dans cette archive : emulvideopac001-linux-x86.tgz.
Téléchargez la, décompressez la et voilà.

4 Utiliser o2em

Pour le moment il n'y a pas de launcher. Je vous propose donc une ligne de commande. A partir du répertoire ou vous avez décompréssé l'archive :
cd o2em
./o2em vp01.bin

Pour en savoir plus sur les options disponibles, consultez le fichier Docs/O2EM.TXT ou attendez mes prochains posts ...