Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
171 user(s) are online (159 user(s) are browsing Forums)

Members: 2
Guests: 169

MartinW, tekmage, more...

Support us!

Headlines

 
  Register To Post  

Mame Fullscreen ESC to quit (SOLVED)
Quite a regular
Quite a regular


See User information
Running Mame in fullscreen I press ESC to quit. It does quit, but the fullscreen window just freezes there.

The OS is active. I can bring up a shell with my shortcut keys and clearly everything still works, but the screen is frozen on whatever the last frame was.

Non-fullscreen works fine.

This is SDL mame: http://os4depot.net/share/emulation/gamesystem/sdl_mame.lha

==

Seems to be the scripts I have wrote.

I have a script file specificially for one game:
.KEY ARGS/F
.BRA {
.
KET }

mame GAME ssf2t {ARGS}

This was just to create an icon image. That is has:
Execution mode: Shell
Ask for input is enabled

"mame" is another script:
.KEY GAME/K,ARGS/F
.BRA {
.
KET }
.DEFAULT 
GAME "ssf2t"
.DEFAULT ARGS "-afs"

SET MAME_LOC=Programs:mame0151_os4
SET ORIG_STACK
=`stack`
SET ORIG_STACK=`RX "ECHO COMPRESS(TRANSLATE(WORD(Arg(1),5),,','))" ${ORIG_STACK}`
not greatwe may have other options beginning with w!
todoimprove 
IF `RX "ECHO INDEX(Arg(1),'-w')" {ARGS}EQ "0"
    
SET SDLMAME_DESKTOPDIM=640x480
ELSE
    
SET SDLMAME_DESKTOPDIM=800x600
ENDIF

pushcd ${MAME_LOC}
stack 2048000
${MAME_LOC}/mame {GAME} {ARGS}
stack ${ORIG_STACK}
popcd

UNSET SDLMAME_DESKTOPDIM
UNSET ORIG_STACK
UNSET NAME_LOC

Execution mode: Shell
Ask for input is disabled



When I run it this way (double clicking the ssf2t script, first one above): ssf2t script > mame I notice that the full screen appears, but there is the AmigaOS mouse cursor. I need to click once on the screen. I can play, but pressing ESC causes the frame freeze - the window does not close.

If, instead, I do all of thise just invoking the actual "mame" binary and avoid all scripts then the fullscreen shows and there is no mouse cursor. It is already the active window/screen. Then, ESC for fullscreen does work.

I do not know what the difference would be?


Edited by rjd324 on 2022/7/2 12:11:19
Edited by rjd324 on 2022/7/2 12:23:12
If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Mame Fullscreen ESC to quit (SOLVED)
Quite a regular
Quite a regular


See User information
Reason for the cursor appearing on the script version was due to a console window opening for capturing output. For whatever reason that caused this ESC issue.

Just *>NIL: from mame program seems to have fixed it.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Mame Fullscreen ESC to quit (SOLVED)
Just can't stay away
Just can't stay away


See User information
@rjd324

Before reading your last post, I was wondering whether the problem could be related to setting the stack back to the (presumably) lower value after running the program.

So maybe it isn't, but I'd still say you could simplify your script by omitting all the stuff that finds out what your current stack is and setting it back, as well as the PopCd command. All you're doing after that is unsetting a few variables, and then your script ends, which also ends the process where the stack and current dir are active. It only lives from the moment you start it from the icon until the script ends (unless I'm missing something).

Best regards,

Niels

Go to top
Re: Mame Fullscreen ESC to quit (SOLVED)
Quite a regular
Quite a regular


See User information
@nbache

Thanks for the tips. I agree with the comments wrt. simplification, but if I was to run the script from a shell already vs just double clicking the icon I made, then the unsetting of the locals and setting stack to original would be beneficial when I was finished with mame and decided to continue using the very same shell to do more and different things, right?

That is my belief, if I am wrong then please let me know.

I mean, it is like saying: don't worry about cleaning up memory at the end of your program, or setting a pointer back to NULL once you have freed it since the OS will take care of everything, yet in every book you read it is encouraged. In fact, for the Amiga, you better make sure to release everything manually, otherwise the OS will complain. But, what I just said is a program vs a script and a little pedantic.

In anycase. I am not as seasoned as people on here wrt. Amiga, so let me know otherwise.

Regards,

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project