Author Topic: Looking for a prebuilt RPI3B+ IMG SINGLE ROM Load directly to one MAME game.  (Read 17556 times)

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
1. You can't modify the cmdline.txt file because the /boot volume is mounted as read only. Remount the /boot volume as read/write to modify the cmdline.txt.

This won't work in Retropie (edit: tested it – it doesn't), because /boot is already mounted as rw there, but only root has write permissions in it.

Quote
3. Why are you asking these questions here? This has absolutely nothing to do with Attract-Mode. I don't mind but it doesn't make much sense.

That's why I suggested to continue on https://retropie.org.uk/forum/. :) But I also don't mind to answer any questions I can here.

LOL. I tested and updated my post before I saw this. I was thinking about LibreELEC and OpenELEC which make the /flash boot volume read only by default.

Favdeacon

  • Sr. Member
  • ****
  • Posts: 129
    • View Profile
LOL. I tested and updated my post before I saw this. I was thinking about LibreELEC and OpenELEC which make the /flash boot volume read only by default.

No sweat, I didn't even think of this possibility, because I'm used to *buntu Linux and Retropie where /boot is rw. :)

pibuilder

  • Full Member
  • ***
  • Posts: 36
    • View Profile

2. To have your system shutdown after you use your emulator "exit" button(s). Change your autostart.sh to this
Code: [Select]
#emulationstation #auto
/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ arcade '/home/pi/RetroPie/roms/arcade/tmnt.zip'
sudo poweroff


Thanks ! that worked perfectly however I'm testing this outside of a dedicated cabinet on my TV at the moment and on my ps4 controller I was able to "exit" the emulator which shut down the pi, i have a few concerns / questions...

1.) How safe is "sudo poweroff" within the autostart.sh in other words I want to ensure this prevents corrupting the micro SD card, as opposed to just unplugging the game / cutting power via a surge protector (which I know is a no-no).

2.) How do you change the "exit" keys as of now it's my Sony PlayStation 4 Dualshock controller which is "hotkey / ps button logo in the center, along with "options" button. In other words when I place this into a cabinet I'll be using an IPAC controller / keyboard encoder which I can essentially MAP / programs any keys to have it "EXIT" or in this case shut down the pi. I'm using MAME Libretro2003 / I believe it's in conjunction with RetroArch. In a perfect world I'd like to hit "ESC" on the keyboard to have it "exit / shutdown" the pi.

3.) I didn't get rid of the 4 raspberry pi logo's yet nor the load up text which I'd still like to do. & I'm confused about that because of a permission denied lock-out.
« Last Edit: October 20, 2018, 09:51:32 AM by pibuilder »

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
1. It's safe. You can also use "sudo halt", "sudo shutdown", "sudo init 0" or any other method to power the system off safely. There are slight differences. I like "sudo poweroff" because it will also power off most linux devices (but not the Pi).

2. Pressing the "Esc" key in RetroArch should exit the emulator (and shutdown your Pi) by default. You shouldn't have to change anything for it to work.

3. I provided a way to edit the cmdline.txt file in a previous post. If you have permission issues login as "root" to make the change. You can also put the sd card in a PC and edit the file there, you won't have permission problems doing it this way but you must use a unix aware text editor such as Notepad ++ and not the builtin notepad or wordpad program. It would be a good idea to make a backup of the file before you modify it, just in case.

Favdeacon

  • Sr. Member
  • ****
  • Posts: 129
    • View Profile
3.) I didn't get rid of the 4 raspberry pi logo's yet nor the load up text which I'd still like to do. & I'm confused about that because of a permission denied lock-out.

I don't know if you can get rid of the raspberrys (I would have to research that further myself).

Aside from progets' two solution for the permissions problem, I also gave you two and a quick description for the nano editor:

Oops, my mistake, sorry. The redirection via ">>" doesn't get the root permissions we gave echo via sudo. You'll have to write it like this:
Code: [Select]
sudo su -c "echo ' logo.nologo quiet' >> /boot/cmdline.txt"

Alternatively, you can edit the file manually with sudo nano /boot/cmdline.txt. You exit the editor with ctrl+x, then answer the question to write the file with "y" and confirm the filename with enter.

A third option would be to copy the file as user pi, then either use the first echo command or edit it with WinSCP, and then copy it back as root:
Code: [Select]
# copy the file as pi to /tmp
cp /boot/cmdline.txt /tmp
# append the options via echo (this time without sudo) or edit it with WinSCP
echo " logo.nologo quiet" >> /tmp/cmdline.txt
# copy it back to /boot WITH sudo, so it belongs to root again
sudo cp /tmp/cmdline.txt /boot

Just choose your preferred method, or try some of them, and tell us any problems you may face with an explicit description what you did.

We're nearly there! :D

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
I don't know if you can get rid of the raspberrys (I would have to research that further myself).

Yes, you can. It's the logo.nologo part of the cmdline.txt.

P.S. I should mention that the cmdline.txt needs to all be on one line. No [CR] or word wrap.
« Last Edit: October 21, 2018, 12:22:09 AM by progets »

Favdeacon

  • Sr. Member
  • ****
  • Posts: 129
    • View Profile
logo.nologo: Ah, I didn't know that. As a long term Linux geek, I like the boot messages, and so I don't use the guide to hide them myself. :) I just point others to it and help them to use it.

I already mentioned that the options have to go to the end of the line, but things like that can be easily overlooked, so it makes sense to mention them again.

Now I would add the options logo.nologo and quiet to the end of the line:

Code: [Select]
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=f2d3cb4f-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait loglevel=3 consoleblank=0 plymouth.enable=0 logo.nologo quiet

pibuilder

  • Full Member
  • ***
  • Posts: 36
    • View Profile
1. It's safe. You can also use "sudo halt", "sudo shutdown", "sudo init 0" or any other method to power the system off safely. There are slight differences. I like "sudo poweroff" because it will also power off most linux devices (but not the Pi).

Good to know that's reassuring... thanks.

Quote
2. Pressing the "Esc" key in RetroArch should exit the emulator (and shutdown your Pi) by default. You shouldn't have to change anything for it to work.
Thankfully exactly just that... It worked, the ESC key shutdown the Pi (which is exactly what I wanted it to do...So thanks!) :-)

3.
Quote
You can also put the sd card in a PC and edit the file there, you won't have permission problems doing it this way but you must use a unix aware text editor such as Notepad ++ and not the builtin notepad or wordpad program. It would be a good idea to make a backup of the file before you modify it, just in case.

I did just that easiest method for me just loaded the sd card into my PC used notepad++ to edit the "cmdline.txt" file added logo.nologo quiet WORKS PERFECTLY !!

BIG Thanks to Favdeacon & progets as I now have exactly what I wanted a single load rom on the rpi3b+ with no garbage in the start and a clean safe shutdown in the end. My last to do should be rather simple I just need to add BIOS's for games that might need it in the future & SAMPLES for sound being I'm using .78 set of MAME. I plan on keeping all the set on the sd card  this way all I need to do is basically in place of say TMNT I just need to rename it to a different ROM file and in theory should work. Outside of that I'll just need to hit TAB in MAME to map the keys according to whatever game I build simply brilliant ! I would share my image but IF any one follows this thread its VERY easy to get this going. I noticed that even though I'm not using the full 32gig card the .img file retains the 32gig size for whatever reason other wise I'd share it without the ROMs... but If anyone reads through this thread is so simple to set this up. Again some PCB's (original hardware) is very unreliable, pricey, upkeep etc etc... this is such a great way to create a "dedicated" reliable single clean one ROM launch as if it were the original machine.

I didn't test it yet but the only one I might see having trouble with this is possibly Daphne / Dragon's Lair ? I've gotten it working on my ATTRACT MODE setup with my thousands of games build but a single launch with that might be more involved, I don't know. I own an original Cinematronics Dragon's Lair with a Laser Disc player, they will eventually have disc rot etc, this is really good way to preserve these games for future players. However I don't even want to think about what's involved with getting the score board to function with it etc ...
« Last Edit: October 21, 2018, 08:28:07 AM by pibuilder »

Favdeacon

  • Sr. Member
  • ****
  • Posts: 129
    • View Profile
Good to know that it worked. :) And you learned some things along the way that empower you to modify your system to your needs. That wouldn't be the case if you just downloaded a premade image someone else created. (Yeah, I'm preaching a bit about doing things ourselves.  8) ) And you will still get official support in the Retropie forum if you ever need it, since you used the official image.

I plan on keeping all the set on the sd card  this way all I need to do is basically in place of say TMNT I just need to rename it to a different ROM file and in theory should work.

To change the game that is loaded at boot? Yes, or you could make one line for each game in the autostart.sh and enable/disable them via prefixed "#" characters, or you could make multiple autostart.sh files (e.g. autostart.tmnt, autostart.pacman, etc.) and copy them to autostart.sh. The latter would be done in the console like this:

Code: [Select]
cp /opt/retropie/configs/all/autostart.tmnt /opt/retropie/configs/all/autostart.sh

You could even make little scripts to do that:

Code: [Select]
mkdir /home/pi/bin    # create a directory named "bin" in user pi's home dir, this is needed only once
echo "/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ arcade '/home/pi/RetroPie/roms/arcade/tmnt.zip'" > /opt/retropie/configs/all/autostart.tmnt
echo "cp /opt/retropie/configs/all/autostart.tmnt /opt/retropie/configs/all/autostart.sh" > /home/pi/bin/tmnt
chmod u+x /home/pi/bin/tmnt

From now on, you just have to type "tmnt" [enter] in the console to "enable" tmnt as the bootup game.  8) (I very much hope that I didn't make any typing errors. If so, feel free to throw it back into my face.)

Quote
I noticed that even though I'm not using the full 32gig card the .img file retains the 32gig size for whatever reason

That's because images are 1:1 copies of the whole storage medium. Some imaging programs can determine unused blocks and compress the image accordingly, but it would still be an image of the whole medium – just compressed.

Quote
other wise I'd share it without the ROMs... but If anyone reads through this thread is so simple to set this up.

I'm glad that you discovered this, and that I didn't drive you away by insisting that you better modify the official RP image.  :D

Quote
I didn't test it yet but the only one I might see having trouble with this is possibly Daphne / Dragon's Lair ?

The emulator Daphne is a little tricky to set up. A good place to start would be – again – the official RetroPie Docs:

https://retropie.org.uk/docs/Daphne/

Have fun with your emulation rig. But be warned, they tend to be like model railways that will never be truly finished.  ;D

pibuilder

  • Full Member
  • ***
  • Posts: 36
    • View Profile
I forgot what program I used back in the day but essentially it creates a list of the file names such as that of notepad / .txt file of everything that's in the folder aka just the ROM folder. This would be helpful because a .txt file takes up virtually no room. Also it's been a hot minute since I've used say Clrmame or one of those RomLister programs but that would REALLY be what I would want so say I have a little over 2,000 ROMs in the folder .zip files what ever & say "bublbobl.zip" it would create a .txt file that would say;

Bubble Bobble - bublbobl.zip
[insert game title here] - gamename.zip
[insert game title here] - gamename.zip
[insert game title here] - gamename.zip

I found this website extremely helpful with .zip names version changes etc... http://adb.arcadeitalia.net/default.php
but ideally I'd want to run said program to create a simple .txt file without having to cross reference the internet / a website I can just hit ctrl+F to find whatever game title which I need to name the corresponding .zip to have it as that single load ROM. The other reason why I'd like to create my own .txt file matching the game names to the .zip of the Rom is I removed most of the clones.


Also to note as opposed to plugging in the sd Card into a Pi, powering on the pi, using WinSCP to modify the autostart.sh.... In other words is it possible to view / and modify autostart.sh if I just use my PC / sd card adapter ?
« Last Edit: October 21, 2018, 11:06:54 AM by pibuilder »

Favdeacon

  • Sr. Member
  • ****
  • Posts: 129
    • View Profile
Also to note as opposed to plugging in the sd Card into a Pi, powering on the pi, using WinSCP to modify the autostart.sh.... In other words is it possible to view / and modify autostart.sh if I just use my PC / sd card adapter ?

Not without third-party software that can read Linux' ext4 filesystems. Windows itself can't read or write ext4 natively.

That said, you could use a so-called Live System that boots a modern Linux Desktop from a USB Stick or DVD. Many popular Linux distributions have installation images that include a Live mode, e.g. all of the Ubuntu variants. The Live system runs only from the stick or DVD, so your Windows on your hard drive will remain untouched. But since Linux can read and write Windows file systems for over ten years now, you could use a Live system to access your Retropie card as well as your Windows hard drive, and copy data between them.

One obstacle worth noting is that the Windows to be accessed has to be shut down properly. The "fast startup" mode of Windows 8 + 10 doesn't umount the file system properly, and the Linux Live system can only access file systems that are completely shut down.

pibuilder

  • Full Member
  • ***
  • Posts: 36
    • View Profile
I went to switch it back to galaga.zip which the game loaded however prior it had a NAG screen which I'm well familar with in terms of the emulations is not 100% video accurate etc, I know it's here:

/opt/retropie/configs/all/

The option is:

mame2003-skip_warnings = "enabled"

I did this and I'm still seeing the NAG screen very annoying.

My "retroarch-core-options.cfg" file shows this:

cap32_autorun = "enabled"
cap32_Model = "6128"
cap32_Ram = "128"
fba-diagnostic-input = "Hold Start"
fuse_machine = "Spectrum 128K"
gambatte_gb_colorization = "custom"
mame2003-skip_disclaimer = "enabled"
mame2003-dcs-speedhack = "enabled"
mame2003-samples = "enabled"
mame2003-frameskip = "0"
mame2003-skip_warnings = "enabled"
mame2003-sample_rate = "48000"
mame2003-external_hiscore = "disabled"
mame2003-dialsharexy = "disabled"
mame2003-mouse_device = "mouse"
mame2003-crosshair_enabled = "enabled"
mame2003-rstick_to_btns = "enabled"
mame2003-tate_mode = "disabled"
mame2003-skip-rom-verify = "disabled"
mame2003-vector-resolution-multiplier = "1"
mame2003-vector-antialias = "disabled"
mame2003-vector-translucency = "enabled"
mame2003-vector-beam-width = "1"
mame2003-vector-flicker = "20"
mame2003-vector-intensity = "1.5"

I tried changing the text / from disabled to enabled etc , It shows the changes using notepad++ or with modifying it with WinSCP. I turn the game back on to see the same stupid NAG screen! I drag and drop "retroarch-core-options.cfg" from my desk top to replace the file, relaunch the pi, same NAG screen still shows soooo annoying. Whatever I do I can't seem to prevent it from displaying.

I did however switch it to The Simpsons ala changing the autostart.sh to it's zip file name "simpsons.zip" and that loaded up fine because it doesn't have any known issues with the game. I'm just doing preventative maintenance so that in the future when I "write" the micro SD card over and over again I'm trying to avoid any issues I would run into. On my Attract-Mode build where I have tons of games It doesn't have the issue I don't know why it's not working on this single load image I created, luckily most of the .78 set doesn't have major issues with it.
« Last Edit: October 21, 2018, 01:04:35 PM by pibuilder »

Favdeacon

  • Sr. Member
  • ****
  • Posts: 129
    • View Profile
Is there another file retroarch-core-options.cfg in the directory /opt/retropie/configs/mame-libretro/? If so, check it for the option, too. It would override the cfg file in the …/configs/all directory.
« Last Edit: October 21, 2018, 01:19:58 PM by Favdeacon »

pibuilder

  • Full Member
  • ***
  • Posts: 36
    • View Profile
Only thing I see under /opt/retropie/configs/mame-libretro is;
 emulators.cfg & retroarch.cfg

within retroarch.cfg shows this:

# Settings made here will only override settings in the global retroarch.cfg if placed above the #include line

input_remapping_directory = "/opt/retropie/configs/mame-libretro/"

#include "/opt/retropie/configs/all/retroarch.cfg"

IF i go back to the path; /opt/retropie/configs/all it's not saving the setting for whatever reason, I agree with you somethings overriding it. the file currently shows;

cap32_autorun = "enabled"
cap32_Model = "6128"
cap32_Ram = "128"
fba-diagnostic-input = "Hold Start"
fuse_machine = "Spectrum 128K"
gambatte_gb_colorization = "custom"
mame2003-skip_disclaimer = "enabled"
mame2003-dcs-speedhack = "enabled"
mame2003-samples = "enabled"
mame2003-frameskip = "0"
mame2003-skip_warnings = "disabled"
mame2003-sample_rate = "48000"
mame2003-external_hiscore = "disabled"
mame2003-dialsharexy = "disabled"
mame2003-mouse_device = "mouse"
mame2003-crosshair_enabled = "enabled"
mame2003-rstick_to_btns = "enabled"
mame2003-tate_mode = "disabled"
mame2003-skip-rom-verify = "disabled"
mame2003-vector-resolution-multiplier = "1"
mame2003-vector-antialias = "disabled"
mame2003-vector-translucency = "enabled"
mame2003-vector-beam-width = "1"
mame2003-vector-flicker = "20"
mame2003-vector-intensity = "1.5"


which clearly needs to say "enabled" it keeps reverting back to disabled regardless of what I do.
« Last Edit: October 21, 2018, 02:21:48 PM by pibuilder »

Favdeacon

  • Sr. Member
  • ****
  • Posts: 129
    • View Profile
Did you try to edit it on the Pi itself by nano /opt/retropie/configs/all/retroarch.cfg ?