VOGONS


First post, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

https://sourceforge.net/tracker/index.php?fun … 551&atid=467234

Added handling of the pause key.

CPU utilization drops to 0 when paused.

Displays 'PAUSED' in the title bar.

Pressing any key resumes.

copy pause061.diff to the dosbox source directory
cd dosbox-0.61
patch -up1 < pause061.diff

As always, enjoy.

Attachments

  • Filename
    pause061.diff
    File size
    5.1 KiB
    Downloads
    187 downloads
    File comment
    the diff
    File license
    Fair use/fair dealing exception

Reply 1 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Massive keyboard state problems

Maybe join it with this.
As this does all but pause.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 7, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I'd rather the Pause key act as it would on an actual DOS machine. In games like Firehawk (Thexder 2), I remember being able to pause (via the Pause key) during the credits to hear the rest of the intro song that would otherwise get cut off early when the credits finish. There's no way to "pause" it in this way in DOSBox as far as I can tell.

Reply 4 of 7, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

Is that going to be the new handler?

If so, could we agree to convert the pocket of scancodes handled in decimal back to hex? I can convert in my head but it's annoying as most references are in hex and it just slows things down when working things out.

Reply 5 of 7, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

that's probably going to be new handler.
There are some small bugs left in it. but it is in general a big improvement.

you want all entries in the switch to be heximal instead of the mixed mess it is now ? 😀 ( I ran into that with insert who's used to twice in it 😀
one in deciamal one in hex.)
Probably a good idea,. I'll try to "fix" it before i commit it.

Water flows down the stream
How to ask questions the smart way!

Reply 6 of 7, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

OK, attached is how I would implement pause in this code. It updates the necessary flags. Note that I havn't compiled and tested this. It does the behavior that hunterz described(because it updates interrupts in the pause). I have tested the interrupt updating in the pause patch I posted. Quick to implement as there was already a fuction, CALLBACK_Idle, to facilitate what was needed, but still needs some work, as using it caused big pauses in sound output/emulation.

Attachments

  • Filename
    bios_keyboard.cpp
    File size
    15.8 KiB
    Downloads
    161 downloads
    File license
    Fair use/fair dealing exception

Reply 7 of 7, by almightyjustin

User metadata
Rank Newbie
Rank
Newbie

For pausing, instead of taking up a key, the easiest would be automatically pausing DosBox when another window becomes active, like many other emulators do. Although, you'd probably want to have an option because some people might want to run old compilers etc. in the background in DosBox.

Games that use the Pause key I can think of off the top of my head: QBasic uses Ctrl-Break to abort programs, and for many QBasic games this is the only way of quitting and starting over; Commander Keen IV detects Pause and puts up a little "PAUSE" box on the screen.

Swim, swim, hungry! Stupid fish.