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: Want to display "Game Paused" on your screen?  (Read 2692 times)

0 Members and 1 Guest are viewing this topic.

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Want to display "Game Paused" on your screen?
« on: February 07, 2006, 10:12:11 pm »
Real quick if anyone is interested.  When you pause your game, mame will darken the screen to indicate that it is paused.  This isn't enough for me so I wanted to display the words "Game Paused" in the center of the screen.

I realize this problem has been solved before in a older thread but that code change was for an ancient build of mame.

For anyone running something this century you need only add this one line of code.  I am using v0.102 of mame.  So anything within a few builds of this should apply.

Open cpuexec.c.  At around line 482 you see this code:

/* otherwise, just pump video updates through */
else
{
   ui_draw_message_window("GAME PAUSED");       
        time_to_quit |= updatescreen();      
        reset_partial_updates();
}


Just add the line in bold and recompile.  All done.

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Want to display "Game Paused" on your screen?
« Reply #1 on: February 08, 2006, 10:33:44 am »
Very nice...thanks!

hnugz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 170
  • Last login:September 14, 2013, 06:18:38 pm
    • Horrorcore Games
Re: Want to display "Game Paused" on your screen?
« Reply #2 on: February 08, 2006, 11:11:59 am »
that is good to know, i need to look into compiling my own eventually.
"Don't play pinball if you only got one arm, cuz your score will suck."

jelwell

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 460
  • Last login:December 24, 2014, 03:47:21 pm
  • I'm a llama!
Re: Want to display "Game Paused" on your screen?
« Reply #3 on: February 08, 2006, 04:51:56 pm »
I realize this problem has been solved before in a older thread but that code change was for an ancient build of mame.

For anyone running something this century

*sigh* I'm officially ancient. It's worst then the time I realized that a girl I dated was born in a different decade.
Joseph Elwell.

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Re: Want to display "Game Paused" on your screen?
« Reply #4 on: February 09, 2006, 10:42:09 am »
No worries.  The old post may work for you.  Not sure where to find it though.  Let me see if I can search for it....

I couldn't find it, however I do have the code change that needed to be made.  Not sure if this aligns with your version.

diff -c -r ..\/src/usrintrf.c ./src/usrintrf.c
*** ..\/src/usrintrf.c   Tue Nov 23 18:05:00 2004
--- ./src/usrintrf.c   Thu Dec 16 22:33:16 2004
***************
*** 3940,3946 ****
        if (input_ui_pressed(IPT_UI_CANCEL))
           break;
 
!       code = code_read_async();
        if (code != CODE_NONE)
        {
           if (code >= KEYCODE_A && code <= KEYCODE_Z)
--- 3940,3947 ----
        if (input_ui_pressed(IPT_UI_CANCEL))
           break;
 
!       //JOEY
!        code = KEYCODE_A; //code_read_async();
        if (code != CODE_NONE)
        {
           if (code >= KEYCODE_A && code <= KEYCODE_Z)
***************
*** 4153,4166 ****
--- 4154,4173 ----
        if (single_step == 0)
           mame_pause(1);
 
+       // JOEY ADD PAUSE text
+       ui_text(bitmap, "GAME PAUSED", 100, 100);
+
        while (!input_ui_pressed(IPT_UI_PAUSE))
        {
+
           profiler_mark(PROFILER_VIDEO);
           if (osd_skip_this_frame() == 0)
           {
              /* keep calling vh_screenrefresh() while paused so we can stuff */
              /* debug code in there */
              draw_screen();
+             // JOEY ADD PAUSE text
+             ui_text(bitmap, "GAME PAUSED", 100, 100);
           }
           profiler_mark(PROFILER_END);
 
***************
*** 4206,4211 ****
--- 4213,4221 ----
              }
           if (osd_selected != 0) osd_selected = on_screen_display(bitmap, osd_selected);
 
+          // JOEY ADD PAUSE text
+ //         ui_text(bitmap, "GAME PAUSED", 100, 100);
+
           if (options.cheat) DisplayWatches(bitmap);
 
           /* show popup message if any */
***************
*** 4220,4225 ****
--- 4230,4238 ----
           update_video_and_audio();
           reset_partial_updates();
 
+          // JOEY ADD PAUSE text
+ //         ui_text(bitmap, "GAME PAUSED", 100, 100);
+
  #ifdef MESS
           if (!setup_selected && mess_pause_for_ui)
           {
***************
*** 4238,4243 ****
--- 4251,4258 ----
        }
 
        schedule_full_refresh();
+       // JOEY ADD PAUSE text
+       ui_text(bitmap, "GAME PAUSED", 100, 100);
     }
 
  #if defined(__sgi) && !defined(MESS)



jelwell

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 460
  • Last login:December 24, 2014, 03:47:21 pm
  • I'm a llama!
Re: Want to display "Game Paused" on your screen?
« Reply #5 on: February 09, 2006, 03:56:38 pm »
No worries.  The old post may work for you.  Not sure where to find it though.  Let me see if I can search for it....

I couldn't find it, however I do have the code change that needed to be made.  Not sure if this aligns with your version.
Haha. Sorry, I should have been more clear. Your code changes say JOEY, cause that's my name, and I posted the code for the ancient build. Once my LCDTopguns arrive I'll think about upgrading from (I think .92) to .104 :)
Joseph Elwell.

hulkster

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2382
  • Last login:September 05, 2021, 04:27:59 pm
  • HulkaMAMEia is runnin' wild!
Re: Want to display "Game Paused" on your screen?
« Reply #6 on: February 09, 2006, 04:40:06 pm »
Real quick if anyone is interested.  When you pause your game, mame will darken the screen to indicate that it is paused.  This isn't enough for me so I wanted to display the words "Game Paused" in the center of the screen.

I realize this problem has been solved before in a older thread but that code change was for an ancient build of mame.

For anyone running something this century you need only add this one line of code.  I am using v0.102 of mame.  So anything within a few builds of this should apply.

Open cpuexec.c.  At around line 482 you see this code:

/* otherwise, just pump video updates through */
else
{
   ui_draw_message_window("GAME PAUSED");       
        time_to_quit |= updatescreen();      
        reset_partial_updates();
}


Just add the line in bold and recompile.  All done.

ehhhhhhh.....how do i recompile mame?  i dont think i ever compiled it in the first place.  i just downloaded, extracted into a folder, and played games.  ive seen a compiler util. on mame.net i think but how do i use that and will that mess up my mame.exe or .ini?

jelwell

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 460
  • Last login:December 24, 2014, 03:47:21 pm
  • I'm a llama!
Re: Want to display "Game Paused" on your screen?
« Reply #7 on: February 09, 2006, 07:13:27 pm »

ehhhhhhh.....how do i recompile mame?  i dont think i ever compiled it in the first place.  i just downloaded, extracted into a folder, and played games.  ive seen a compiler util. on mame.net i think but how do i use that and will that mess up my mame.exe or .ini?

Compiling is not for the feint of heart. If you insist. It looks like the instructions have been touched up since I did it, so maybe it's easier now.

good luck,
Joseph Elwell.

Brad

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 247
  • Last login:August 03, 2018, 05:43:23 pm
    • www.emuchrist.org
Re: Want to display "Game Paused" on your screen?
« Reply #8 on: February 09, 2006, 07:43:27 pm »
Actually compiling Mame is a piece of cake. Check our Mr Do's destructions < -- =P here.

http://www.mameworld.net/mrdo/compile.html

Brad

Necro

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1031
  • Last login:November 29, 2022, 08:22:22 pm
  • Building a 'Classic' MAME Cab
Re: Want to display "Game Paused" on your screen?
« Reply #9 on: February 09, 2006, 08:13:33 pm »
Yeah use Mr. Do's instructions.  ANy others I found on the net were totally crap and didnt work. :)

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Re: Want to display "Game Paused" on your screen?
« Reply #10 on: February 09, 2006, 11:26:07 pm »
No worries.  The old post may work for you.  Not sure where to find it though.  Let me see if I can search for it....

I couldn't find it, however I do have the code change that needed to be made.  Not sure if this aligns with your version.
Haha. Sorry, I should have been more clear. Your code changes say JOEY, cause that's my name, and I posted the code for the ancient build. Once my LCDTopguns arrive I'll think about upgrading from (I think .92) to .104 :)
Joseph Elwell.


LOL!  Yeah sorry I didn't notice you when I replied.  Yes this is your code.  :)  You inspired me to fix it in the new versions.  :)