Results 1 to 10 of 14

Thread: Ability to compile mame

Hybrid View

  1. #1
    Member registered user
    Join Date
    Apr 2007
    Posts
    94
    =========================

    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...ames/mame-data
    https://packages.debian.org/bullseye...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:

    Code:
    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:

    Code:
    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:
    Code:
    ROMS="/media/sdb1/roms;/media/sdb1/soft"
    then launch mame with
    Code:
    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:
    Code:
    cat /proc/bus/input/devices
    Code:
    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.

    Code:
    "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://stackoverflow.com/questions/...ck-but-os-does

    another thing you could try is to add the user "knoppix" to the "input" group.
    Code:
    groups knoppix  (will show the groups that knoppix is part of)
    sudo adduser knoppix input

  2. #2
    Member registered user
    Join Date
    Apr 2007
    Posts
    94

    Thumbs up

    =========================

    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...-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

  3. #3
    Member registered user
    Join Date
    Apr 2007
    Posts
    94
    =========================

    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)
    Last edited by don999; 11-06-2021 at 02:19 AM.

  4. #4
    Member registered user
    Join Date
    Apr 2007
    Posts
    94
    =========================

    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:

    Code:
    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

    Code:
    (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

    Code:
    (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.

    Code:
    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
    Last edited by don999; 11-14-2021 at 01:19 AM.

  5. #5
    Member registered user
    Join Date
    Apr 2007
    Posts
    94

    Being able to compile mame in knoppix 9.1

    ============================
    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"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Fortinet FortiGate 60F | 10 Gbps Firewall Network Security EXPIRED (FG-60F)- New picture

Fortinet FortiGate 60F | 10 Gbps Firewall Network Security EXPIRED (FG-60F)- New

$279.99



FORTINET FORTIGATE 40F Next GEN Firewall Network Security EXPIRED (FG-40F)- New picture

FORTINET FORTIGATE 40F Next GEN Firewall Network Security EXPIRED (FG-40F)- New

$159.99



FORTINET FORTIGATE 40F Next GEN Firewall Security Unregistered (FG-40F)-Open Box picture

FORTINET FORTIGATE 40F Next GEN Firewall Security Unregistered (FG-40F)-Open Box

$219.99



Fortinet Fortigate 61E FG-61E Network Security/Firewall Appliance picture

Fortinet Fortigate 61E FG-61E Network Security/Firewall Appliance

$99.00



Fortinet FortiGate | FG-400D | Network Firewall Appliance picture

Fortinet FortiGate | FG-400D | Network Firewall Appliance

$34.07



Fortinet Fortiwifi 60D FG-60D Security Appliance Firewall / VPN w/ AC Adapter picture

Fortinet Fortiwifi 60D FG-60D Security Appliance Firewall / VPN w/ AC Adapter

$34.97



SimpleWAN SW Advanced Firewall & Router SW301DA-NA picture

SimpleWAN SW Advanced Firewall & Router SW301DA-NA

$19.99



pfSense four-port Gigabit router/firewall picture

pfSense four-port Gigabit router/firewall

$25.00



Genuine Fortinet FortiGate 60E-POE Firewall Network Security ATP Bundle 2 years picture

Genuine Fortinet FortiGate 60E-POE Firewall Network Security ATP Bundle 2 years

$919.00



Fortinet Fortigate Fg-1000C 1000c Security Appliance FIREWALL Hub - Tested picture

Fortinet Fortigate Fg-1000C 1000c Security Appliance FIREWALL Hub - Tested

$89.99