Jump to content


  • Content Count

  • Joined

  • Last visited

Posts posted by wierd_w

  1. Success!





    I have, since making this vid, found that ALSA was not initializing correctly, and have added some instructions to reset alsa, set volume 100%, unmute, then test sound playback with a sample wav file before starting MAME.



    • Like 2

  2. OK, I don't know if it fixes the race condition completely, but echoing a silly limerick to /dev/null one line at a time seems to introduce sufficient delay to have it not happen in my VM anymore.


    Waiting a full second before starting the window manager is heavy handed, so I want to avoid that if possible.



  3. Note, to get to tty2, press


    ctrl + alt + F2



    That will switch to virtual terminal 2, which should be waiting at a login prompt.  You can log in as root there.  password is 'genevian'


    Mame can keep running in tty1.


    To get back to tty1, do the same sequence, but with F1 instead.


    This is useful for making changes. 

    • Thanks 1

  4. Well..


    My i5 laptop is (and always has been) picky about what USB devices it will boot from. Refuses to start the stick I just made. (had to drive to town to get some, and not driving back again just because this computer is picky)


    SO, I decided "Hey, lets go SUPER OLD!", and dug out my Fujitsu Lifebook E2000. It's an old "Windows XP era" laptop.


    It is laughably old.



    Pentium 4, single core, ~2ghz, netburst arch

    1gb RAM

    ATI m340 video

    SigmaTel integrated ac97 audio

    ALI pci chipset, IDE disk controller (ata 100)

    cardbus slots

    USB2.0 rear panel connector.

    Broadcom B43xx based wifi (wireless G)

    (bonus)-- Hardware RS232 and LPT ports on rear panel


    Now; It TOO has issues booting from USB (because it is old as hell), but since it has a dvd drive baked in, I can start it with plopboot, and then boot it from USB that way.  So I did. Since the USB controller is ancient, it has "issues", and has to be put in 1.1 mode to boot from plopboot... So, initial loading of the initrd is painfully slow.  BUT, then the system starts, and linux mounts volumes with its native USB2.0 drivers. X loads and then so does MAME. 


    It runs like it has a concrete enema. 


    Switching to tty2 with the key combo, I log in as root, and see how loaded the system is. Sure enough, the CPU is beating itself to death at 100% saturation.


    I try to run tetris from mdos, in the mdosgames folder.


    I laugh and cry, as I watch it slowly draw the splash screen.

    Gameplay is laughably poor.


    (I note that necessary firmware to enable gpu acceleration is not present, but meh)


    HOWEVER, IT BOOTED, and technically "Works". 


    I switch back to tty2, and gracefully down the system.


    Now, as hilarious as this is, other people SURELY have something that is both newer, AND stronger in the knees than this lifebook that they can test this image with. Remember, this was built specifically for "Older" laptops, that have a normal BIOS (not UEFI), and is a 32bit flavor OS. I am thinking "windows 7 era" laptops here, with dual or quad core processors. It will not work on a "UEFI ONLY" modern system.  I will have to build a UEFI bootable version for newer units. If/when I do that, I will use a 64bit base system.


    I am zipping up the image now.  Since it is a full base debian system, it will be about 600mb in size zipped.  You will need a 16gb or so sized flash drive, and rufus.


    For completeness, the root password is 'genevian'


    DO NOT reformat the fat32 volume. There is an important reason for this:

    Linux can either mount a filesystem based on its hardware node ("/dev/sda1" for example), or by the GUID of the filesystem (which is generated at format).  Since this is meant to run "God only knows where", and get booted "God only knows how", I have the /etc/fstab entries all calling file systems by GUID entries. If you reformat the FAT32 volume, it will no longer mount on boot.  I will provide instructions on how to grow the FAT32 volume to fill the rest of a thumbdrive later. Just remember, DO NOT FORMAT IT.





    To write it to a USB device:


    On windows, use rufus. Select the vmdk file (after changing type to all files), and write it to the drive.  When it is done, it should work as a bootable device. Windows successfully mounts the FAT32 volume, and ignores the 2.5gb EXT4 volume linux lives on.  This should let people easily get at the disk images.


    On linux, use dd to copy the flat image over. While the extension is vmdk, it is really just a flat, boring image inside.


    It is partitioned with a 2.5gb EXT4 bootable volume, then a ~6gb FAT32 volume. The fat32 volume should be capable of being extended to fill whatever medium you write the image onto. 


    Quality of life, totally optional things to do:


    Configure GRUB to display a fancy splash screen or something until X starts.


    • Like 2

  5. OK. I have rebuilt it again, this time with the FAT32 partition mounted, to contain the disk images.


    It now autoboots as the genevian user, and autostarts genmod on TTY1.  The image is ~8gb in size, but is mostly empty space.



    I will begin testing on real iron using a RUFUS burned usb stick.

    • Like 1

  6. I ham-fisted some ubuntu .deb files (yes, this is not recommended) in to get a recent mame. (.226) Had to give a few ubuntu support file .debs along with it to make it install via dpkg.  (libjpeg8, libjpeg8-turbo, multiarch-support) Seems to work though.  Seems to not make my laptop's fans blare instantly to life in the VM also. Must be some quality/performance fixes in the later version.


    Since this is not a recommended course of action, I will NOT detail how to do that here. :)


    Onward and upward-- time to get rid of the grub timer.

    • Like 1

  7. OK.  First, I am using oracle virtualbox, because it does virtualization, is free, and can produce flat vmdk files. (I can use qemu tools package to convert the resulting disk image into a flat image suitable for use with RUFUS, for writing to a USB stick and using on real iron.)



    Steps to reproduce:


    1) Install virtualbox

    2) Download the latest stable debian net-install cd image. (i386 iso, amd64 iso)

    3) Create a new virtual machine, and specify that it is debian, and what flavor. (i386 or x64)

    4) Configure the VM to use the downloaded net install CD iso as the boot device.

    5) Boot the ISO, use text mode installation, go through the install process, DO NOT install a GUI. Allow it to install GRUB2 on the virtual disk drive.
    6) VM will reboot, and boot from the hard disk.  Log in as the root user. (the limited user will not have sudoers access yet!)

    7) Install some necessary packages.


    apt-get install xorg sudo twm mame zram-tools cifs-utils


    8 ) Set your limited user (created during installation wizard process) up for sudo access.


    /sbin/usermod -aG sudo {LimitedUserName}


    9) Configure sudo so that permitted users dont have to use a password to issue the poweroff command.


    Edit the following file with nano (or whatever editor you like most)


    nano /etc/sudoers


    Look for this area, and add the highlighted line.




    10) Create an invocation shell script that will start mame, then do a poweroff. This is what we will have .xinitrc run before twm, with forked invocation.


    I put it in the limited user's home directory, in a folder called .scripts, and named it runmame.sh .  It looks like this inside, (since it contains all your special invocation voodoo)



    mame genmod -skip_gameinfo -peb:slot4 speech -peb:slot6 tirs232 -peb:slot8 hfdc -peb:slot8:hfdc:h1 generic -hard1 /home/genevian/.shared/mame/disks/BOOTDISK3.hd

    sudo poweroff


    11) Make the script executable and readable/editable by everyone.


    chmod 777 runmame.sh


    12) Edit the limited user's .xinitrc file, so that it looks like this inside.



    13) Edit the limited user's .bashrc file, go to the VEEEEEEERY bottom, and add this line:




    so that it looks like this inside.



    14) copy the rom files into the correct location at /usr/local/share/games/mame/roms


    I accomplished this using a CIFS (windows file share) mount.  I did this by mounting my NAS. To do that, you need a place to mount the file system ON first. Historically, this is done on /mnt.


    mkdir /mnt/cifs


    Then you mount it.


    mount -t cifs // /mnt/cifs


    It will ask for the windows share password. Give it, press enter. Boom, you now have that network device mounted and can copy files to/from it.


    cp -r /mnt/cifs/geneve/roms/*.* /usr/local/share/games/mame/roms


    get an ls -ll on that location, so you are sure they copied.



    15) Copy the disk images over similarly, but put them in an appropriate place in the limited user's home directory, then give the limited user ownership of them with chown.


    16) TEST!!


    Exit out of the root user account with exit.




    Then log in as the limited user.  It should IMMEDIATELY start xwindows, and the geneve emulation.


    (and that is where I am at right now.)



    • Like 1

  8. OK, it makes my crappy i5 laptop hum quite bad running in the VM, but the VM starts the genmod emulation and boots mdos now.


    I enabled support for mounting windows file shares. (was how I got the data into the vm's disk image) Created a folder in /mnt called cifs. (legacy name for windows file share tech)


    For those with NAS boxes, this could be used to mount their NAS.  The utility of this should be clearly apparent.



    Disk images are stored in /home/genevian/.shared/mame/disks


    ini folder, with copied ti99 config ini files, located in /home/genevian/.shared/mame/ini
    (has subfolders for games and cart; How to tell mame to use this location is another matter however.)


    I have never messed with setting up MAME this way before, I just lifted all the invocation from hloberg's archive, and did unix style path translations and corrections where appropriate.









    For utility reasons, it might be beneficial to create a FAT32 partition, move disk images there, and have the system automatically mount that partition in the ~/.shared/mame location, then move all the disk images and config files THERE.  That way windows loving kids can put the stick in a windows machine, and use the tools there on the images.



  9. Successfully pulled the rom zips from one of hloberg's posts.  Old mame from distro can start genmod from that package.  Now I just need to bring in disk images, configure paths, and tweak mame invocation so geneve slot info is correctly passed.


    I will make appropriate folders in the "genevian" user's home directory for disk images and pals, so that we dont end up with permissions shenannigans going on.



    • Like 1

  10. That's what a good readme.md is for.


    I have used gcc and pals to build packages from source before. (where PPAs dont exist, and where the distro repo has something so woefully out of date that it makes me cry blood)



    In this case though, I think I will just use the driver package with stock (old) mame from the distro.

  11. VM now automagically starts X when normal user logs in. This automagically starts MAME.  When mame exits, "sudo poweroff" is called, causing a graceful shutdown. Appropriate rules to not demand sudo password for poweroff command has been added to /etc/sudoers

    (Normal user is named "genevian", and it is a member of sudo group.)


    Still need to do:


    Kill GRUB screen/timeout
    Autologin as "genevian"

    Make MAME automagically start geneve emulation



  12. OK, I have the virtual machine able to start mame with a minimal xwindows and twm.


    I suspect it is an ancient version of mame, however.  Is there a repo I can add?








    Figure out how to make MAME auto-start Geneve emulation

    Remove GRUB2 bootloader timeout
    Autologin, and automagically run startx.
    Automagically invoke "sudo shutdown --now" when mame exits. (DONE! VM now downs gracefully when you kill MAME)



    • Like 1

  13. 13 hours ago, hloberg said:

    This Linux noob says yes. 



    I will do the following:

    step 1, create a flat image VMDK in virtualbox that is 1gb 2gb in size. (Base debian is bigger than I expected)
    step 2, install debian using netinstall cd, with hyper minimal options.
    Step 3, configure the VM as I desire.
    Step 4, use DD to transfer this image (with /etc/fstab entry calling for GUID of filesystem for root volume) to a USB stick.

    Step 5, verify operation

    then, when all works as expected:

    Step 6, zip the resulting image and post it.



    Since this is probably going to be aimed at "old hardware", I will use the i386 branch debian, not x64 branch debian.

  14. If I were to try and make it as light as possible, I would:


    1) Start with a fresh debootstrap (or similar, such as say, arch base) environment; Just enough to get a console, and functioning network stack.

    2) Install X and fluxbox (to get a functional skeleton xwindows config we can modify)

    3) Modify the X config for fluxbox, and substitute mame's executable instead.


    This way there would a hyper-minimal init, hyper minimal x, and just the bare necessities.


    Specifically, after this is done, you will have functional xinit configuration you can prod.



    We would edit it, and prevent it from starting fluxbox. We would instead direct it to start mame, and append the ampersand at the end, as instructed.


  15. 6 hours ago, potatohead said:

    I only used the ROM BASIC a time or two.  Never did much with it.  I bet a lot of people using the PC did the same.  Who used ROM Basic?


    Now, the QBASIC and variants?  Those saw a lot of use, but not from me for anything fun.




    Microsoft's BASIC was actually a lot of places.


    Like here:



    Wikipedia has a pretty good list of places in its main page for MS Basic.



    EG, it was more than just QBASIC and pals.

  • Create New...