Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Exit message in console window - how to suppress?  (Read 1935 times)

0 Members and 1 Guest are viewing this topic.

TheElectricMonk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 40
  • Last login:May 06, 2022, 04:17:57 pm
  • I want to build my own arcade controls!
Exit message in console window - how to suppress?
« on: March 14, 2022, 05:12:39 pm »
Long story short: Currently building my first virtual pinball cab using PinballX as a front end, and thought I'd take advantage of the big vertical screen, add a spinner and a few vertical MAME games.

It's all working beautifully, but when I exit MAME (in this case GroovyMAME 0.221, since it plays a few games that other versions complain about), I get a quick pop-up console window with suppressed error messages. It disappears after a fraction of a second, but it just looks ugly.

Is there a way to suppress this window? Like a "quiet" mode or something? I tried nolog, noverbose, nodebug, nooslog and noconsole, all to no avail.

Any help would be greatly appreciated.

EDIT:
This is what I'm talking about. Message varies from game to game, of course. And it doesn't matter if I use GroovyMAME or other MAME .exes.
« Last Edit: March 14, 2022, 06:28:01 pm by TheElectricMonk »

psakhis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 452
  • Last login:Yesterday at 12:12:41 pm
  • I want to build my own arcade controls!
Re: Exit message in console window - how to suppress?
« Reply #1 on: March 14, 2022, 05:35:28 pm »
Test confirm_quit 0 on mame.ini

TheElectricMonk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 40
  • Last login:May 06, 2022, 04:17:57 pm
  • I want to build my own arcade controls!
Re: Exit message in console window - how to suppress?
« Reply #2 on: March 14, 2022, 06:26:25 pm »
Thanks, but confirm_quit 0 has already been set.

In the meantime, I've just mapped another key (unused by the buttons on my cab) as "UI cancel" and created an AutoHotKey script that when I press the "Exit" button (mapped to Escape)
- covers the screen with a black rectangle the size of the screen's resolution
- waits 200 ms
- kills the groovymame.exe process
- waits for another 500 ms
- removes the black rectangle

It's a clunky workaround, but it works. Still, a more elegant solution would be preferable...
« Last Edit: March 14, 2022, 06:28:46 pm by TheElectricMonk »

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7414
  • Last login:April 10, 2024, 02:02:31 pm
  • Quote me with care
Re: Exit message in console window - how to suppress?
« Reply #3 on: March 15, 2022, 10:32:10 am »
You're not using an AMD card, are you? Is that a CRT?
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

10yard

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:Today at 03:30:59 am
  • L BREAK into program
    • DKAFE Frontend
Re: Exit message in console window - how to suppress?
« Reply #4 on: March 15, 2022, 10:56:58 am »
You can pipe the standard output from MAME (or any command) elsewhere so it doesn’t appear on your screen.
This example sends output and error messages to a null file.

Code: [Select]
mame mspacman > nul 2>&1
Add  > nul 2>&1 to the end of your mame arguments and it should sort your problem.
Check out my Donkey Kong Arcade Frontend at https://github.com/10yard/dkafe#readme


psakhis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 452
  • Last login:Yesterday at 12:12:41 pm
  • I want to build my own arcade controls!
Re: Exit message in console window - how to suppress?
« Reply #5 on: March 15, 2022, 02:53:01 pm »
As a part of Windows hidden, the solution is setting a cmd out of screen.

1) Edit register with regedit for save your settings (export to cmd_show.reg file)
- [HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe]
- [HKEY_CURRENT_USER\Console\EmulaStation]

2) Define a WindowPosition key out of your screen and export to a cmd_hide.reg file. (you can test it, opening a cmd)

3) Set this settings before and after of launching frontend, example:
regedit /s cmd_hide.reg
c:\users\arcade\emulationstation\emulationstation.exe --no-splash
regedit /s cmd_show.reg





TheElectricMonk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 40
  • Last login:May 06, 2022, 04:17:57 pm
  • I want to build my own arcade controls!
Re: Exit message in console window - how to suppress?
« Reply #6 on: March 16, 2022, 04:41:13 pm »
You're not using an AMD card, are you? Is that a CRT?

NVIDIA GForce. I'm using a Panasonic Flatscreen as playing field. (Yes, I know, Groovymame is made chiefly for CRTs, but it's running a few games that are incompatible with other versions of MAME I tried)


You can pipe the standard output from MAME (or any command) elsewhere so it doesn’t appear on your screen.
This example sends output and error messages to a null file.

Code: [Select]
mame mspacman > nul 2>&1
Add  > nul 2>&1 to the end of your mame arguments and it should sort your problem.

Thank you, that's a great idea, and it works beautifully when I'm starting MAME from a batch file.
For some reason though, when I'm launching the game this way via the PinballX frontend, it immediately crashes back to menu. I may have to try the PinballX forum for this.


As a part of Windows hidden, the solution is setting a cmd out of screen.

1) Edit register with regedit for save your settings (export to cmd_show.reg file)
- [HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe]
- [HKEY_CURRENT_USER\Console\EmulaStation]

2) Define a WindowPosition key out of your screen and export to a cmd_hide.reg file. (you can test it, opening a cmd)

3) Set this settings before and after of launching frontend, example:
regedit /s cmd_hide.reg
c:\users\arcade\emulationstation\emulationstation.exe --no-splash
regedit /s cmd_show.reg


Could you go into a bit more detail? It feels like I'm missing half the information here.
In what format do I need to add the screen position? I don't see an entry named %SystemRoot%_system32_cmd.exe in HKEY_CURRENT_USER\Console. Do I need to create one? In what format?
If you have it, could you post the contents of your .reg file please?
« Last Edit: March 16, 2022, 04:46:08 pm by TheElectricMonk »

psakhis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 452
  • Last login:Yesterday at 12:12:41 pm
  • I want to build my own arcade controls!
Re: Exit message in console window - how to suppress?
« Reply #7 on: March 16, 2022, 06:00:18 pm »
Hi, maybe you are in W10.

Settings are saved here HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe (only exists when you save properties)

For setting WindowsPosition
1) Windows Key + R --> Type cmd
2) Properties - Design Tab
3) Set WindowsPosition (you can see with prev image if windows will be hidden)


TheElectricMonk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 40
  • Last login:May 06, 2022, 04:17:57 pm
  • I want to build my own arcade controls!
Re: Exit message in console window - how to suppress?
« Reply #8 on: March 17, 2022, 01:53:34 pm »
Hi, maybe you are in W10.

Settings are saved here HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe (only exists when you save properties)

For setting WindowsPosition
1) Windows Key + R --> Type cmd
2) Properties - Design Tab
3) Set WindowsPosition (you can see with prev image if windows will be hidden)

Thank you for explaining! It works, but only when I try to open CMD manually. The MAME text window still pops up in its usual place after I quit a game.
Still, I'm sure this trick will be useful to me somewhere down the road.
For the time being, I'll stick with my AHK script.

Just in case anyone may need it or something similar in the future, here it is:

Remap your "Exit GUI" key in MAME to something else, then force your frontend to run the compiled script before starting a MAME game.


Esc::
{
BlockInput, on
Gui, Color, black
Gui +AlwaysOnTop
Gui -Caption
Gui, Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%
Sleep, 200
Process, Close, groovymame.exe
Sleep, 500
Gui, Destroy
BlockInput, off
ExitApp
}
Return


This will
1. block any further user input
2. create a black surface covering the width and height of the screen
3. wait for 200 milliseconds, then kill the mame process
4. wait for 500 milliseconds (enough time for the cmd window to appear and disappear), then remove the black surface
5. allow user input again
6. quit the script

psakhis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 452
  • Last login:Yesterday at 12:12:41 pm
  • I want to build my own arcade controls!
Re: Exit message in console window - how to suppress?
« Reply #9 on: March 17, 2022, 03:46:38 pm »
Probably you need to configure WindowsPosition on a opened cmd because parent process is the propietary (in my case emulastation)

In this case, on W7x64 i needed to configure for emulastation on a differnet reg key.
- [HKEY_CURRENT_USER\Console\EmulaStation]