View Full Version : Ability to compile mame
don999
11-29-2015, 02:44 PM
It would be really awesome if all of the libraries were in place so that you could just download mame and type "make" and have everything compile without having to install a bunch of things with apt-get.
Years ago I think with knoppix5.3 dvd I seem to remember being able to compile the version of mame that was current then with knoppix out of the box.
superman
11-29-2015, 05:52 PM
Hi, there:
Not trying to be a smart ar$e, but have just went to the Debian repository for a quick look. Pre-compiled deb packages of mame (version 0.146 and 0.154) are up for grabs from here if running the most updated version of mime (version 0.168 ) isn't the object. Not a gamer, so I have no idea if running different versions will make a difference though...
klaus2008
11-29-2015, 08:50 PM
Hi!
I think one should try out the binary package from deb-multimedia.org. There you can find mame version 0.168 for the sid distribution. Maybe this package works with Knoppix 7.6.0, too.
Since the source of mame 0.168 deb package is also available there you could read the build description of the package in order to find out which additional packages are to be installed on Knoppix 7.6.0 or if there is any conflicting package which make it nearly impossible to compile mame 0.168.
don999
12-02-2015, 06:01 PM
Hi!
I think one should try out the binary package from deb-multimedia.org. There you can find mame version 0.168 for the sid distribution. Maybe this package works with Knoppix 7.6.0, too.
Since the source of mame 0.168 deb package is also available there you could read the build description of the package in order to find out which additional packages are to be installed on Knoppix 7.6.0 or if there is any conflicting package which make it nearly impossible to compile mame 0.168.
Thanks for all of your suggestions. Two of my favorite things are knoppix and mame. Someone awhile back put out something called "knoppixmame" but that hasn't been updated for a long time.
I didn't know about deb-multimedia.org, so I'll give it a try.
I had some problems with knoppix 7.5 with using synaptic and updating packages and got a little discouraged.
don999
12-20-2017, 04:49 PM
Thanks for all of your suggestions. Two of my favorite things are knoppix and mame. Someone awhile back put out something called "knoppixmame" but that hasn't been updated for a long time.
I didn't know about deb-multimedia.org, so I'll give it a try.
I had some problems with knoppix 7.5 with using synaptic and updating packages and got a little discouraged.
After I got started using ubuntu, I've been using that because I can compile mame without any problems. But I love to fiddle with knoppix so I thought I'd give it a go with knoppix 8.1.
(from http://docs.mamedev.org/initialsetup/compilingmame.html)
sudo apt-get install git build-essential libsdl2-dev libsdl2-ttf-dev libfontconfig-dev qt5-default
which should install everything you need to compile mame.
I tried that on a fresh knoppix 8.1 after updating the repositories with "sudo apt-get update" and it hangs up on:
sudo apt-get install git build-essential libsdl2-dev libsdl2-ttf-dev libfontconfig-dev qt5-default
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libfontconfig1-dev' instead of 'libfontconfig-dev'
build-essential is already the newest version (12.3).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libsdl2-dev : Depends: libgles2-mesa-dev but it is not going to be installed
Depends: libpulse-dev but it is not going to be installed
Depends: libsdl2-2.0-0 (= 2.0.5+dfsg1-2) but 2.0.7+dfsg1-3 is to be installed
Depends: libudev-dev but it is not going to be installed
Depends: libxss-dev but it is not going to be installed
libsdl2-ttf-dev : Depends: libsdl2-ttf-2.0-0 (= 2.0.14+dfsg1-1) but 2.0.14+dfsg1-2 is to be installed
qt5-default : Depends: qtbase5-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I'm pretty much a novice with the complexities of upgrading so I thought I'd try the deb-multimedia packages as suggested.
I was able to get the "stable" version working without any problems (it is version 0.186)
http://deb-multimedia.org/dists/stable/main/binary-i386/package/mame-data
http://deb-multimedia.org/dists/stable/main/binary-i386/package/mame
I downloaded the deb files:
http://deb-multimedia.org/pool/main/m/mame-dmo/mame-data_0.186-dmo1_all.deb
http://deb-multimedia.org/pool/main/m/mame-dmo/mame_0.186-dmo1_i386.deb
then did a dpkg -i to install them:
sudo dpkg -i mame-data_0.186-dmo1_all.deb
sudo dpkg -i mame_0.186-dmo1_i386.deb
and it puts the mame files in /usr/share/games/mame and the executable in /usr/games/mame
ls /usr/share/games/mame
ls -l /usr/games/mame
The deb-multimedia "testing" version didn't work for me with various dependency problems.
sudo dpkg -i mame_0.192-dmo1_i386.deb (Reading database ... 451601 files and directories currently installed.)
Preparing to unpack mame_0.192-dmo1_i386.deb ...
Unpacking mame (1:0.192-dmo1) over (1:0.186-dmo1) ...
dpkg: dependency problems prevent configuration of mame:
mame depends on libsdl2-2.0-0 (>= 2.0.7); however:
Version of libsdl2-2.0-0:i386 on system is 2.0.5+dfsg1-3.
mame depends on libutf8proc2 (>= 1.3); however:
Package libutf8proc2 is not installed.
===============================
And I've come up with a command line that I like:
mame -rompath "whereiputmyroms" -console -ui_active -window -debug -confirm_quit -verbose
I needed to add the -ui_active or the ui tab menu wouldn't come up in mame. Interestingly, the Insert key is the toggle key for full/partial keyboard emulation, mame's standard key is the Scroll Lock key.
Use -verbose if you want to know all about what mame is doing, and how it was compiled.
Use the -debug switch if you want to use the mame debugger. (type g to "go" in the debugger window)
And you can use the lua console of mame if you use the -console switch so you can fiddle with lua from the terminal.
[MAME]> print("I am lua")
I am lua
[MAME]> for i=1,10 do print(i) end
1
2
3
4
5
6
7
8
9
10
========================
or if you want debian's version (which is only 0.182) you can simply do
sudo apt-get install mame
knoppix@Microknoppix:~/Downloads$ sudo apt-get install mame
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
mame-data
Suggested packages:
gnome-video-arcade mame-doc mame-extra mame-tools
The following NEW packages will be installed:
mame mame-data
0 upgraded, 2 newly installed, 0 to remove and 1201 not upgraded.
Need to get 48.0 MB of archives.
After this operation, 239 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.de.debian.org/debian stable/main i386 mame-data all 0.182-1 [9,176 kB]
Get:2 http://ftp.de.debian.org/debian stable/main i386 mame i386 0.182-1 [38.8 MB]
Fetched 48.0 MB in 25s (1,882 kB/s)
...
but for some reason I couldn't get the lua console to work with 0.182.
Have fun!
klaus2008
12-23-2017, 02:21 PM
Hi!
The deb-multimedia "testing" version didn't work for me with various dependency problems.
I would suggest you issue
sudo apt-get update
sudo apt-get -f install after using dpkg.
don999
01-05-2018, 05:12 AM
Hi!
I would suggest you issue
sudo apt-get update
sudo apt-get -f install after using dpkg.
I tried that but it didn't seem to work for me... it still couldn't handle the conflicts.
I've got a question regarding some strange behavior of knoppix 8.1.
If I install the deb-multimedia.org version of mame 0.186, I can use the mame lua console if I use knoppix 8.1 from a non-persistent system (ie just fresh boot from an 8.1 live dvd).
I can use the mame lua console if I use knoppix 8.1 from a flash drive installed with a fat32 partition with a fat32 overlay image.
but if I use knoppix 8.1 from a flash drive/hard drive installed with a fat32 partition with a reiserfs overlay partition, the mame lua console does _NOT_ work. I've been testing and testing and it seems to definitely be the reiserfs overlay partition.
The packages that I'm using are:
http://deb-multimedia.org/dists/stable/main/binary-i386/package/mame
http://deb-multimedia.org/dists/stable/main/binary-i386/package/mame-data
and the download packages are at:
http://deb-multimedia.org/pool/main/m/mame-dmo/mame_0.186-dmo1_i386.deb
http://deb-multimedia.org/pool/main/m/mame-dmo/mame-data_0.186-dmo1_all.deb
This is on a freshly installed knoppix with reiserfs overlay partition:
knoppix@Microknoppix:~$ sudo dpkg -i mame_0.186-dmo1_i386.deb mame-data_0.186-dmo1_all.deb
Selecting previously unselected package mame.
(Reading database ... 449729 files and directories currently installed.)
Preparing to unpack .../mame_0.186-dmo1_i386.deb ...
Unpacking mame (1:0.186-dmo1) ...
Selecting previously unselected package mame-data.
Preparing to unpack .../mame-data_0.186-dmo1_all.deb ...
Unpacking mame-data (1:0.186-dmo1) ...
Setting up mame-data (1:0.186-dmo1) ...
Setting up mame (1:0.186-dmo1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for menu (2.1.47+b1) ...
knoppix@Microknoppix:~$ mame -console
knoppix@Microknoppix:~$
noppix@Microknoppix:~$ mame -verbose
Available videodrivers: x11 wayland dummy
Current Videodriver: x11
Display #0
Renderdrivers:
opengl (0x0)
opengles2 (0x0)
software (0x0)
Available audio drivers:
pulseaudio
alsa
sndio
dsp
disk
dummy
Build version: 0.186 (unknown)
Build architecure:
Build defines 1: SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1
Build defines 1: LSB_FIRST=1
SDL/OpenGL defines: SDL_COMPILEDVERSION=2005 USE_OPENGL=1
Compiler defines A: __GNUC__=4 __GNUC_MINOR__=2 __GNUC_PATCHLEVEL__=1 __VERSION__="4.2.1 Compatible Clang 3.8.1 (tags/RELEASE_381/final)"
Compiler defines B: __unix__=1 __i386__=1
Compiler defines C: __USE_FORTIFY_LEVEL=0
Enter init_monitors
Adding monitor screen0 (1920 x 1080)
Leave init_monitors
Enter sdlwindow_init
Using SDL multi-window OpenGL driver (SDL 2.0+)
(note that no lua console is shown and no plugins work, if you go to the plugins menu in mame, you will not see any entries)
Again, this only seems to happen with the reiserfs overlay.
don999
01-05-2018, 12:21 PM
I thought I'd try it again to make sure:
I boot knoppix, typing "knoppix64 noimage" to boot without using the overlay partition. It's just as if I booted knoppix with the live dvd.
Then I mount the reiserfs overlay partition on /dev/sdb2 readonly on /mnt/a just so I can access my mamepackages which I've previously downloaded.
Once I install the 0.186 dmo packages with dpkg, the mame lua console and the plugins work. If you go to the plugins menu in mame, the menu shows all the normal plugins.
knoppix@Microknoppix:~$ mame
bash: mame: command not found
knoppix@Microknoppix:~$ sudo mkdir /mnt/a; sudo mount /dev/sdb2 /mnt/a -o ro
knoppix@Microknoppix:~$ ls /mnt/a/home/knoppix/mamepackages/
mame_0.182-1_i386.deb mame-data_0.182-1_all.deb
mame_0.186-dmo1_amd64.deb mame-data_0.186-dmo1_all.deb
mame_0.186-dmo1_i386.deb mame-data_0.189+dfsg.1-1_all.deb
mame_0.189+dfsg.1-1_i386.deb mame-extra_0.182-1_all.deb
mame_0.192-dmo1_i386.deb
knoppix@Microknoppix:~$ time sudo dpkg -i /mnt/a/home/knoppix/mamepackages/mame_0.186-dmo1_i386.deb /mnt/a/home/knoppix/mamepackages/mame-data_0.186-dmo1_all.deb
Selecting previously unselected package mame.
(Reading database ... 449729 files and directories currently installed.)
Preparing to unpack .../mame_0.186-dmo1_i386.deb ...
Unpacking mame (1:0.186-dmo1) ...
Selecting previously unselected package mame-data.
Preparing to unpack .../mame-data_0.186-dmo1_all.deb ...
Unpacking mame-data (1:0.186-dmo1) ...
Setting up mame-data (1:0.186-dmo1) ...
Setting up mame (1:0.186-dmo1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for menu (2.1.47+b1) ...
real 0m15.095s
user 0m6.235s
sys 0m5.348s
knoppix@Microknoppix:~$ mame -console
_/ _/ _/_/ _/ _/ _/_/_/_/
_/_/ _/_/ _/ _/ _/_/ _/_/ _/
_/ _/ _/ _/_/_/_/ _/ _/ _/ _/_/_/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/_/_/_/
mame 0.186
Copyright (C) Nicola Salmoria and the MAME team
Lua 5.3
Copyright (C) Lua.org, PUC-Rio
[MAME]>
knoppix@Microknoppix:~$ mame -verbose -console
_/ _/ _/_/ _/ _/ _/_/_/_/
_/_/ _/_/ _/ _/ _/_/ _/_/ _/
_/ _/ _/ _/_/_/_/ _/ _/ _/ _/_/_/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/ _/_/_/_/
mame 0.186
Copyright (C) Nicola Salmoria and the MAME team
Lua 5.3
Copyright (C) Lua.org, PUC-Rio
Available videodrivers: x11 wayland dummy
Current Videodriver: x11
Display #0
Renderdrivers:
opengl (0x0)
opengles2 (0x0)
software (0x0)
Available audio drivers:
pulseaudio
alsa
sndio
dsp
disk
dummy
Build version: 0.186 (unknown)
Build architecure:
Build defines 1: SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1
Build defines 1: LSB_FIRST=1
SDL/OpenGL defines: SDL_COMPILEDVERSION=2005 USE_OPENGL=1
Compiler defines A: __GNUC__=4 __GNUC_MINOR__=2 __GNUC_PATCHLEVEL__=1 __VERSION__="4.2.1 Compatible Clang 3.8.1 (tags/RELEASE_381/final)"
Compiler defines B: __unix__=1 __i386__=1
Compiler defines C: __USE_FORTIFY_LEVEL=0
...
and the version of Knoppix:
knoppix@Microknoppix:~$ cat /mnt-system/KNOPPIX/kversion
8.1-2017-09-05
knoppix@Microknoppix:~$ uname -a
Linux Microknoppix 4.12.7-64 #13 SMP PREEMPT Tue Aug 15 04:56:38 CEST 2017 x86_64 GNU/Linux
knoppix@Microknoppix:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.1 (stretch)
Release: 9.1
Codename: stretch
don999
03-23-2018, 12:48 PM
I was fiddling around with Debian 9.3 and thought, what if I installed Debian 9.3 i386 32 bit on an external usb hard drive and see if I could compile mame 194.
I was able to compile mame 194 myself after removing a few items from the compile specifically the barcrest and bfm games, otherwise it would exhaust the virtual memory with gcc v6.3.0.
This comments out the barcrest and bfm in mame.lst with c style comments: Adding 6 lines.
diff ../mame194orig/src/mame/mame.lst src/mame/mame.lst
2875a2876
> /*
8683a8685
> */
21424a21427
> /*
27842a27846
> */
32555a32560
> /*
32558a32564
> */
diff ../mame194orig/src/mame/mame.lst src/mame/mame.lst -u5
--- ../mame194orig/src/mame/mame.lst 2018-01-31 11:19:22.000000000 -0500
+++ src/mame/mame.lst 2018-03-12 04:39:47.748825373 -0400
@@ -2871,10 +2871,11 @@
bestleaw // bootleg
@source:beta.cpp
beta //
+/*
@source:bfcobra.cpp
beeline // 1991 BFM
escounts // 1990 BFM
inquiztr // 1989 BFM
qos // 1992 BFM
@@ -8679,10 +8680,11 @@
b85ritzc //
b85ritzd //
b85royal //
b85scard // (c) 198? BFM
b85sngam //
+*/
@source:bgt.cpp
bg_barmy //
bg_ddb //
bg_max //
@@ -21420,10 +21422,11 @@
mps1230 // 1988 Commodore MPS-1230 near-letter-quality dot matrix printer
@source:mpu12wbk.cpp
fruitstb //
+/*
@source:mpu2.cpp
m2hilite // Hi-Lights (Barcrest) (MPU2)
m2svlite // Silver Lights (Barcrest) (MPU2)
@source:mpu3.cpp
@@ -27838,10 +27841,11 @@
m5xfact // X Factor (Empire)
m5xfact02 //
m5xfact04 //
m5xfact11 //
m5zigzag // Zig Zag
+*/
@source:mpz80.cpp
mpz80 //
@source:mquake.cpp
@@ -32551,13 +32555,15 @@
rastanub // B04 (c) 1987 Taito America Corporation (US)
rastsaga // B04 (c) 1987 Taito Corporation (Japan)
rastsagaa // B04 (c) 1987 Taito Corporation (Japan)
rastsagab // B04 (c) 1987 Taito Corporation (Japan)
+/*
@source:rastersp.cpp
fbcrazy // 1997
rotr // 1994
+*/
@source:ravens.cpp
ravens //
ravens2 //
This comments out barcrest and bfm using lua style comments. Changing 6 lines.
diff ../mame194orig/scripts/target/mame/arcade.lua scripts/target/mame/arcade.lua
747,748c747,748
< "barcrest",
< "bfm",
---
> -- "barcrest",
> -- "bfm",
1283a1284
> --[[
1308a1310,1311
> --]]
> --[[
1340a1344
> --]]
diff ../mame194orig/scripts/target/mame/arcade.lua scripts/target/mame/arcade.lua -u5
--- ../mame194orig/scripts/target/mame/arcade.lua 2018-01-31 11:18:24.000000000 -0500
+++ scripts/target/mame/arcade.lua 2018-03-11 14:05:01.899315814 -0400
@@ -742,12 +742,12 @@
"amiga",
"aristocr",
"ascii",
"atari",
"atlus",
- "barcrest",
- "bfm",
+ -- "barcrest",
+ -- "bfm",
"bmc",
"capcom",
"ces",
"cinemat",
"comad",
@@ -1279,10 +1279,11 @@
MAME_DIR .. "src/mame/includes/powerins.h",
MAME_DIR .. "src/mame/video/powerins.cpp",
MAME_DIR .. "src/mame/drivers/bowltry.cpp",
}
+--[[
createMAMEProjects(_target, _subtarget, "barcrest")
files {
MAME_DIR .. "src/mame/drivers/mpu2.cpp",
MAME_DIR .. "src/mame/drivers/mpu3.cpp",
MAME_DIR .. "src/mame/machine/mpu4.cpp",
@@ -1304,10 +1305,12 @@
MAME_DIR .. "src/mame/drivers/mpu4vid.cpp",
MAME_DIR .. "src/mame/drivers/mpu5.cpp",
MAME_DIR .. "src/mame/drivers/mpu5.hxx",
}
+--]]
+--[[
createMAMEProjects(_target, _subtarget, "bfm")
files {
MAME_DIR .. "src/mame/drivers/bfcobra.cpp",
MAME_DIR .. "src/mame/machine/bfm_comn.cpp",
MAME_DIR .. "src/mame/machine/bfm_comn.h",
@@ -1336,10 +1339,11 @@
MAME_DIR .. "src/mame/machine/bfm_bda.h",
MAME_DIR .. "src/mame/video/bfm_dm01.cpp",
MAME_DIR .. "src/mame/video/bfm_dm01.h",
MAME_DIR .. "src/mame/drivers/rastersp.cpp",
}
+--]]
createMAMEProjects(_target, _subtarget, "bmc")
files {
MAME_DIR .. "src/mame/drivers/bmcbowl.cpp",
MAME_DIR .. "src/mame/drivers/koftball.cpp",
To my surprise, the compiled binary worked perfectly on knoppix 8.1. I guess it's not too surprising considering they are both based on debian.9.3.
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.3 (stretch)
Release: 9.3
Codename: stretch
./mame -sdlvideofps galaxian -verbose -video opengl
Available videodrivers: x11 wayland dummy
Current Videodriver: x11
Display #0
Renderdrivers:
opengl (0x0)
opengles2 (0x0)
software (0x0)
Available audio drivers:
pulseaudio
alsa
sndio
dsp
disk
dummy
Build version: 0.194 (unknown)
Build architecure:
Build defines 1: SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1
Build defines 1: LSB_FIRST=1
SDL/OpenGL defines: SDL_COMPILEDVERSION=2005 USE_OPENGL=1
Compiler defines A: __GNUC__=6 __GNUC_MINOR__=3 __GNUC_PATCHLEVEL__=0 __VERSION__="6.3.0 20170516"
Compiler defines B: __unix__=1 __i386__=1
Compiler defines C: __USE_FORTIFY_LEVEL=0
Enter init_monitors
Adding monitor screen0 (1920 x 1080)
Leave init_monitors
Enter sdlwindow_init
Using SDL multi-window OpenGL driver (SDL 2.0+)
...snip...
GL texture: copy 0, shader 0, dynamic 0, 768x224 768x224 [RGB32, Equal: 1, Palette: 0,
scale 1x1, border 0, pitch 1152,768/2048], bytes/pix 4
GL texture: copy 0, shader 0, dynamic 0, 768x224 768x224 [RGB32, Equal: 1, Palette: 0,
scale 1x1, border 0, pitch 1152,768/2048], bytes/pix 4
0.02s, 1 F, avrg game: 60.24 FPS 16.60 ms/f, avrg video: 731.20 FPS 1.37 ms/f, last video: inf FPS 0.73 ms/f
1.02s, 62 F, avrg game: 60.61 FPS 16.50 ms/f, avrg video: 1288.61 FPS 0.78 ms/f, last video: inf FPS 0.66 ms/f
2.03s, 123 F, avrg game: 60.60 FPS 16.50 ms/f, avrg video: 1356.92 FPS 0.74 ms/f, last video: inf FPS 0.69 ms/f
3.04s, 184 F, avrg game: 60.60 FPS 16.50 ms/f, avrg video: 1312.29 FPS 0.76 ms/f, last video: inf FPS 0.81 ms/f
Average speed: 100.00% (4 seconds)
sdl_kill: closing audio
Sound buffer: overflows=3 underflows=0
Enter sdlwindow_exit
Leave sdlwindow_exit
So while it's not compiling under knoppix 8.1 itself, it's the next best thing.
don999
10-20-2021, 05:37 PM
=========================
Knoppix 9.1 and mame
==========================
I wanted to see if I could get knoppix9.1 working with mame,
"lsb_release -a"
says that it's running "bullseye/sid"
so I went to packages.debian.org and looked under bullseye and found
https://packages.debian.org/bullseye/i386/games/mame
https://packages.debian.org/bullseye/i386/games/mame-data
https://packages.debian.org/bullseye/i386/games/mame-doc
https://packages.debian.org/bullseye/i386/liblua5.3-0
https://packages.debian.org/bullseye/i386/libpugixml1v5
and get all of these and make sure that you get the "i386" version
then you should have these files:
mame_0.228+dfsg.1-1_i386.deb
mame-data_0.228+dfsg.1-1_all.deb
mame-doc_0.228+dfsg.1-1_all.deb
liblua5.3-0_5.3.3-1.1+b1_i386.deb
libpugixml1v5_1.11.4-1_i386.deb
and then use dpkg -i to install them:
sudo dpkg -i libpugixml1v5_1.11.4-1_i386.deb mame-data_0.228+dfsg.1-1_all.deb mame-doc_0.228+dfsg.1-1_all.deb liblua5.3-0_5.3.3-1.1+b1_i386.deb mame_0.228+dfsg.1-1_i386.deb
That should install all of the mame stuff.
set $roms to where you've got your roms. For example, say I've got my roms in two different directories:
ROMS="/media/sdb1/roms;/media/sdb1/soft"
then launch mame with
mame -rompath "$ROMS"
=====================================
I had a little bit of trouble getting the joystick (mame uses SDL2 for joystick input) to work under sdl2 because of permissions, you may try a couple of things:
I installed evtest as well from:
https://packages.debian.org/bullseye/i386/utils/evtest
so if you run "sudo evtest" it will give you a list. Figure out which one is your joystick, and then
If you don't want to install evtest, you could try just looking at /proc/bus/input/devices:
cat /proc/bus/input/devices
ls -l /dev/input
drwxr-xr-x 2 root root 220 Sep 27 14:28 by-id
drwxr-xr-x 2 root root 240 Sep 27 14:28 by-path
crw-rw---- 1 root input 13, 64 Aug 7 08:56 event0
crw-rw---- 1 root input 13, 65 Aug 7 08:56 event1
crw-rw---- 1 root input 13, 76 Aug 7 08:56 event12
crw-rw---- 1 root input 13, 77 Aug 7 08:56 event13
crw-rw---- 1 root input 13, 78 Aug 7 08:56 event14
crw-rw---- 1 root input 13, 79 Aug 7 08:56 event15
crw-rw---- 1 root input 13, 80 Aug 7 08:56 event16
crw-rw---- 1 root input 13, 81 Aug 7 08:56 event17
crw-rw---- 1 root input 13, 82 Aug 7 08:56 event18
crw-rw---- 1 root input 13, 83 Aug 7 08:56 event19
crw-rw---- 1 root input 13, 66 Aug 7 08:56 event2
crw-rw---- 1 root input 13, 67 Sep 27 14:28 event3
crw-rw---- 1 root input 13, 68 Sep 27 14:28 event4
crw-rw---- 1 root input 13, 69 Aug 7 08:56 event5
crw-rw---- 1 root input 13, 70 Aug 7 08:56 event6
crw-rw---- 1 root input 13, 71 Sep 27 14:28 event7
crw-rw---- 1 root input 13, 72 Sep 27 14:28 event8
crw-rw---- 1 root input 13, 73 Sep 27 14:28 event9
crw-rw-r-- 1 root input 13, 1 Aug 7 08:56 js1
crw-rw---- 1 root input 13, 63 Aug 7 08:56 mice
crw-rw---- 1 root input 13, 32 Aug 7 08:56 mouse0
crw-rw---- 1 root input 13, 33 Aug 7 08:56 mouse1
crw-rw---- 1 root input 13, 34 Aug 7 08:56 mouse2
crw-rw---- 1 root input 13, 35 Sep 27 14:28 mouse3
Notice how js1 has the crw-rw-r--? SDL2 doesn't use the /dev/input/jsX, but rather one of the /dev/input/eventXX, and I think it has to have the a+r set.
"sudo chmod a+r /dev/input/event22" if the list says your joystick is event 22
This will open up the permissions for /dev/input/event22 so "all can read" it.
so if you launch mame with -verbose it should show your joystick getting opened.
Some discussion about the issue here:
https://discourse.libsdl.org/t/sdl2-requires-root-privileges-to-use-joysticks-in-linux/20181
(https://discourse.libsdl.org/t/sdl2-requires-root-privileges-to-use-joysticks-in-linux/20181)
(https://stackoverflow.com/questions/61603693/sdl2-does-not-see-joystick-but-os-does)https://stackoverflow.com/questions/61603693/sdl2-does-not-see-joystick-but-os-does
another thing you could try is to add the user "knoppix" to the "input" group.
groups knoppix (will show the groups that knoppix is part of)
sudo adduser knoppix input
don999
11-05-2021, 09:34 PM
=========================
Knoppix 9.1 and mame 235
==========================
You can install mame 235 and run under knoppix9.1 by getting the debian i386 packages from testing (bookworm):
https://packages.debian.org/bookworm/i386/mame/download
Download Page for mame_0.235+dfsg.1-2_i386.deb
https://packages.debian.org/bookworm/i386/mame-data/download
Download Page for mame-data_0.235+dfsg.1-2_all.deb
You still need these files also (see my previous post about mame 228 above for more information)
liblua5.3-0_5.3.3-1.1+b1_i386.deb
libpugixml1v5_1.11.4-1_i386.deb
You can also get mame-doc (0.235+dfsg.1-2) if you like.
Then just put them all in a directory and "sudo dpkg -i *.deb" and then you should be able to run mame 235 by running "mame".
Mame 235 is only a couple of months old, so it's pretty up to date.
=======================
(The Mame 237 debs in sid won't work on knoppix 9.1)
If you search at package.debian.org for mame there's various versions available, 235 being the most recent that will work on knoppix 9.1.
stretch (oldoldstable) (games): Multiple Arcade Machine Emulator (MAME)
0.182-1: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x
buster (oldstable) (games): Multiple Arcade Machine Emulator (MAME)
0.206+dfsg.1-1: amd64 arm64 armel armhf i386 mips mips64el mipsel s390x
bullseye (stable) (games): Multiple Arcade Machine Emulator (MAME)
0.228+dfsg.1-1: amd64 arm64 armhf i386 mips64el ppc64el s390x
bookworm (testing) (games): Multiple Arcade Machine Emulator (MAME)
0.235+dfsg.1-2: amd64 arm64 armel armhf i386 mips64el ppc64el s390x
sid (unstable) (games): Multiple Arcade Machine Emulator (MAME)
0.237+dfsg.1-1: amd64 arm64 armel armhf hppa i386 mips64el mipsel ppc64 ppc64el riscv64 s390x sh4 sparc64 x32
don999
11-06-2021, 02:16 AM
=========================
Knoppix 9.1 and other emulators
==========================
You can get other emulators running also, not just mame. I was able to get:
atari800
vice (name of executable program is x64, xpet, x128 )
dosbox
fs-uae
stella
running on knoppix9.1 by downloading the deb packages from package.debian.com (bullseye stable)
You could also use synaptic to download the packages, but I like the debs so I can install it offline (no internet necessary).
atari800_4.1.0-3_i386.deb
vice_3.5.0.dfsg-3_i386.deb (c64 emulator)
stella_6.5.2-1_i386.deb (atari 2600 emulator)
dosbox_0.74-3-3_i386.deb (dos games emulator)
libsdl-sound1.2_1.0.3-9+b1_i386.deb
fs-uae_3.0.5+dfsg-1_i386.deb (fs-uae is an amiga emulator)
fs-uae-launcher_3.0.5+dfsg-1_all.deb
python3-pyqt5.qtopengl_5.15.2+dfsg-3_i386.deb
There's other emulators too:
https://packages.debian.org/bullseye/games-emulator
(This metapackage lists a bunch of emulator packages)
don999
11-14-2021, 01:13 AM
=========================
Getting the joystick/gamepad working (using setfacl)
==========================
Okay, I have spent way more time than I ever wanted to fiddling with permissions and the like. However, I've found a pretty simple way to get the joystick working.
There's actually two different styles of joystick access: one is with /dev/input/eventX and the other is with /dev/input/jsX.
I think /dev/input/eventX is the more recent, and /dev/input/jsX is the "old" way.
So when I boot knoppix, my gamepad shows up as /dev/input/event4. So you'll need to figure out which file represents your gamepad.
When I do a "ls -l /dev/input/by-id" the gamepad has a symlink to /dev/input/event4.
So I do this:
sudo setfacl -m "u:knoppix:rw-" /dev/input/event4
sudo setfacl -m "u:knoppix:rw-" /dev/input/js0
touch /dev/input/js0
so once you "touch" the js0, it sets up a symlink to /dev/input/js0 in the /dev/input/by-id directory.
When you run touch, it may complain about not being able to set the time. (Doesn't seem to hurt anything)
The reason I use "touch" is to make an access to /dev/input/js0.
Running "hexdump -C /dev/input/js0" would do the same thing (CTRL+C to exit after generating some joystick activity).
The setfacl commands above will give the user knoppix read and write file access using an access control list. setfacl = set file access control list (-m is modify).
getfacl = get file access control list.
If you do a "ls -l /dev/input" you will see a + after rw-rw-r--+, the + indicates that there's an access control list for that file.
So as a test, launch chromium or firefox, go to "about:blank" and bring up the f12 console. Press a joystick button. Type "navigator:getGamepads()" and hit enter.
Remember that you have to generate joystick activity (like pressing buttons) to see the gamepad in chromium or firefox.
If your joystick is working on /dev/input/js0 you should see a list like
(firefox)
navigator.getGamepads()
Array [ Gamepad ]
(chromium)
navigator.getGamepads()
GamepadList {0: Gamepad, 1: null, 2: null, 3: null, length: 4}
If it isn't working, you will see
(firefox)
navigator.getGamepads()
Array []
(chromium)
navigator.getGamepads()
GamepadList {0: null, 1: null, 2: null, 3: null, length: 4}
Once you enter the commands below, press a joystick button. Type "navigator:getGamepads()" and hit enter. You don't have to relaunch firefox or chromium if it's already open, it should work.
echo launch chromium or firefox here and getGamepads here wont work
sudo setfacl -m "u:knoppix:rw-" /dev/input/event4
sudo setfacl -m "u:knoppix:rw-" /dev/input/js0
touch /dev/input/js0
echo now getGamepads here should work
don999
11-24-2021, 10:21 PM
============================
Being able to compile mame 238 in knoppix 9.1
============================
What's necessary to compile mame is just:
sudo apt-get install git build-essential python libsdl2-dev libsdl2-ttf-dev libfontconfig-dev libpulse-dev qt5-default
but what if we wanted to be able to compile mame by adding .deb packages manually?
I got the following packages from packages.debian.org:
libasound2-dev_1.2.4-1.1_i386.deb
libpulse-dev_14.2-2_i386.deb
libqt5core5a_5.15.2+dfsg-9_i386.deb
libqt5gui5_5.15.2+dfsg-9_i386.deb
libqt5widgets5_5.15.2+dfsg-9_i386.deb
libsdl2-dev_2.0.14+dfsg2-3_i386.deb
libsdl2-ttf-dev_2.0.15+dfsg1-1_i386.deb
libsdl-sound1.2_1.0.3-9+b1_i386.deb
libsndio-dev_1.5.0-3_i386.deb
libudev-dev_247.3-6_i386.deb
qtbase5-dev_5.15.2+dfsg-9_i386.deb
qtbase5-dev-tools_5.15.2+dfsg-9_i386.deb
also need these to run:
liblua5.3-0_5.3.3-1.1+b1_i386.deb
libpugixml1v5_1.11.4-1_i386.deb
So put them all in a directory then:
sudo dpkg -i --force-depends *.deb
and it will install them all at once. We use --force-depends because we haven't actually got every package needed to satisfy all the dependencies.
Get the source for mame0238 and extracting the mame0238.exe, cd into the directory, edit the makefile with
"nano makefile" so that we specify our compile to be 32 bit and where to find qt5:
#PTR64 = 1
edit to say
PTR64 = 0
since we're compiling for an 32 bit target
and also
#QT_HOME = /usr/lib/qt5/
edit to
QT_HOME = /usr/lib/i386-linux-gnu/qt5/
then save it with CTRL+O, exit with CTRL+X.
time make -j4
and it should be able to complete the compile.
and launch your freshly compiled mame with
./mame -rompath "path_to_my_roms"
don999
12-14-2024, 04:39 AM
The last version of mame that is compileable under knoppix 9.1 is mame 264. 265 and above require a more up to date compiler.
Powered by vBulletin® Version 4.2.2 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.