diff --git a/Changes.txt b/Changes.txt index 83f2abc26..557157f25 100644 --- a/Changes.txt +++ b/Changes.txt @@ -22,6 +22,11 @@ * Added 'Custom' palette, generated from user controlled phase shifts. + * Added that adjustable audio & video settings are displayed as gauge bars + + * Added four global hotkeys which allow selecting and changing numerous + audio & video settings without having to remember the dedicated hotkeys + * Added 'Turbo' mode, runs the game as fast as the computer allows. * Added that paddle centering (per ROM) and sensitivity can be adjusted @@ -39,6 +44,9 @@ * Added displaying last write address in the debugger. + * Added debugger pseudo-register '_scanend', which gives the number of + scanlines at the end of the last frame. + * Added detection of color and audio data in DiStella. * Restored 'cfg' directory for Distella config files. @@ -47,9 +55,6 @@ * Removed unused CV+ and DASH bank switching types. - * Added debugger pseudo-register '_scanend', which gives the number of - scanlines at the end of the last frame. - -Have fun! diff --git a/docs/index.html b/docs/index.html index 5c5204863..3bf9ee26a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1336,8 +1336,100 @@ -

Palettes (can be remapped, only active in TIA mode)

+

Audio & Video Keys (can be remapped)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionKey (Standard)Key (macOS)
Toggle soundControl + ]Control + ]
Decrease volumeAlt + [Cmd + [
Increase volumeAlt + ]Cmd + ]
Switch to next larger zoom level in windowed mode, +
toggle stretching in fullscreen mode
Alt + =Cmd + =
Switch to next smaller zoom level in windowed mode, +
toggle stretching in fullscreen mode
Alt + -Cmd + -
Toggle windowed/fullscreen modeAlt + EnterCmd + Enter
Decrease overscan in fullscreen modeShift + PageDownShift-Fn + Down arrow
Increase overscan in fullscreen modeShift + PageUpShift-Fn + Up arrow
Move display down (uses "Display.VCenter")Alt + PageDownCmd-Fn + Down arrow
Move display up (uses "Display.VCenter")Alt + PageUpCmd-Fn + Up arrow
Decrease vertical display sizeShift-Alt + PageUpShift-Cmd-Fn + Up arrow
Increase vertical display sizeShift-Alt + PageDownShift-Cmd-Fn + Down arrow
Switch to previous display format (NTSC/PAL/SECAM etc.)Shift-Control + fShift-Control + f
Switch to next display format (NTSC/PAL/SECAM etc.)Control + fControl + f
Toggle display interpolationControl + iControl + i
+ These settings can also be changed using Global Audio & Video Keys
+
+ +

Palettes Keys (can be remapped)

@@ -1346,43 +1438,48 @@ - + - + - + - + - + - + + + +
Function
Select previous palette (Standard/Z26/User/Custom)Select previous palette (Standard/z26/User/Custom) Shift-Control + p Shift-Control + p
Select next palette (Standard/Z26/User/Custom)Select next palette (Standard/z26/User/Custom) Control + p Control + p
Select previous palette attributeSelect previous palette attribute Shift-Alt + 9 Shift-Cmd + 9
Select next palette attributeSelect next palette attribute Alt + 9 Cmd + 9
Decrease selected palette attributeDecrease selected palette attribute Shift-Alt + 0 Shift-Cmd + 0
Increase selected palette attributeIncrease selected palette attribute Alt + 0 Cmd + 0
+ These settings can also be changed using Global Audio & Video Keys
+
-

TV effects (can be remapped, only active in TIA mode)

+

TV effects Keys (can be remapped)

@@ -1391,73 +1488,112 @@ - + - + - + - + - + - + - - - + - - + - - + - + - + These settings can also be changed using Global Audio & Video Keys + + + +
Key (macOS)
Select previous TV effects presetSelect previous TV effects preset Shift-Alt + 1 Shift-Cmd + 1
Select next TV effects presetSelect next TV effects preset Alt + 1 Cmd + 1
Select previous 'Custom' mode attribute (*)Select previous 'Custom' mode attribute (*) Shift-Alt + 2 Shift-Cmd + 2
Select next 'Custom' mode attribute (*)Select next 'Custom' mode attribute (*) Alt + 2 Cmd + 2
Decrease 'Custom' selected attribute value (*)Decrease 'Custom' selected attribute value (*) Shift-Alt + 3 Shift-Cmd + 3
Increase 'Custom' selected attribute value (*)Increase 'Custom' selected attribute value (*) Alt + 3 Cmd + 3
Toggle 'phosphor' mode Alt + p Cmd + p
Decrease 'phosphor' blendDecrease 'phosphor' blend Shift-Alt + 4 Shift-Cmd + 4
Increase 'phosphor' blendIncrease 'phosphor' blend Alt + 4 Cmd + 4
Decrease scanline intensityDecrease scanline intensity Shift-Alt + 5 Shift-Cmd + 5
Increase scanline intensityIncrease scanline intensity Alt + 5 Cmd + 5
- Items marked as (*) will also switch to 'Custom' preset mode
+ Items marked as (*) will also switch to 'Custom' mode
+

Global Audio & Video Keys (can be remapped)

+

These keys allow selecting and changing audio & video settings without having to remember the + dedicated keys.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionKey (Standard)Key (macOS)
Select previous AV settingEndFn + Left arrow
Select next AV settingHomeFn + Right arrow
Decrease current AV settingPageDownFn + Down arrow
Increase current AV setting + PageUpFn + Up arrow
+

Notes: +

+


+ -

Developer Keys in TIA mode (can be remapped)

+

Developer Keys (can be remapped)

@@ -1575,7 +1711,7 @@
-

Other Keys (can be remapped)

+

Other Emulation Keys (can be remapped)

@@ -1583,93 +1719,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1767,27 +1821,9 @@ - - - - - - - - - - - - - - -
Key (Standard) Key (macOS)
Switch to next larger zoom level in windowed mode, -
toggle stretching in fullscreen mode
Alt + =Cmd + =
Switch to next smaller zoom level in windowed mode, -
toggle stretching in fullscreen mode
Alt + -Cmd + -
Toggle fullscreen/windowed modeAlt + EnterCmd + Enter
Decrease overscan in fullscreen modeShift + PageDownShift + PageDown
Increase overscan in fullscreen modeShift + PageUpShift + PageUp
Move display up (uses "Display.VCenter")Alt + PageUpCmd + PageUp
Move display down (uses "Display.VCenter")Alt + PageDownCmd + PageDown
Switch display format in decreasing order (NTSC/PAL/SECAM etc.)Shift-Control + fShift-Control + f
Switch display format in increasing order (NTSC/PAL/SECAM etc.)Control + fControl + f
Toggle display interpolationControl + iControl + i
Toggle 'Turbo' mode Control + t Control + t
Toggle sound on/offControl + ]Control + ]
Decrease volumeAlt + [Cmd + [
Increase volumeAlt + ]Cmd + ]
Switch mouse between controller emulation modes
(see Game Properties - Controller)
Control + 0Alt + Up arrow Cmd + Up arrow
Decrease current setting (*)PageDownPageDown
Increase current setting (*) - PageUpPageUp
- (*) Note: These keys allow easy changing of the current displayed selection (e.g. volume (default), - phosphor, zoom...) without having to use the original keys.
-

UI keys in Text Editing areas (cannot be remapped)

+

UI Keys in Text Editing areas (cannot be remapped)

diff --git a/src/common/PKeyboardHandler.cxx b/src/common/PKeyboardHandler.cxx index c09cd48fb..cf4a31831 100644 --- a/src/common/PKeyboardHandler.cxx +++ b/src/common/PKeyboardHandler.cxx @@ -494,8 +494,13 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultCommo {Event::PaletteDecrease, KBDK_P, KBDM_SHIFT | KBDM_CTRL}, {Event::PaletteIncrease, KBDK_P, KBDM_CTRL}, +#ifndef BSPF_MACOS {Event::PreviousSetting, KBDK_END}, {Event::NextSetting, KBDK_HOME}, +#else + {Event::PreviousSetting, KBDK_HOME}, + {Event::NextSetting, KBDK_END}, +#endif {Event::SettingDecrease, KBDK_PAGEDOWN}, {Event::SettingIncrease, KBDK_PAGEUP}, diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index 1d5bb5e6c..59c5cad32 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -468,17 +468,20 @@ void Console::enableColorLoss(bool state) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void Console::toggleInter() +void Console::toggleInter(bool toggle) { bool enabled = myOSystem.settings().getBool("tia.inter"); - myOSystem.settings().setValue("tia.inter", !enabled); + if(toggle) + enabled = !enabled; + + myOSystem.settings().setValue("tia.inter", enabled); // ... and apply potential setting changes to the TIA surface myOSystem.frameBuffer().tiaSurface().updateSurfaceSettings(); ostringstream ss; - ss << "Interpolation " << (!enabled ? "enabled" : "disabled"); + ss << "Interpolation " << (enabled ? "enabled" : "disabled"); myOSystem.frameBuffer().showMessage(ss.str()); } diff --git a/src/emucore/Console.hxx b/src/emucore/Console.hxx index bcf4d2cf2..d13588b07 100644 --- a/src/emucore/Console.hxx +++ b/src/emucore/Console.hxx @@ -206,7 +206,7 @@ class Console : public Serializable, public ConsoleIO /** Toggle interpolation on/off */ - void toggleInter(); + void toggleInter(bool toggle = true); /** Toggle turbo mode on/off diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 303f8061f..00f73f2be 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -368,11 +368,14 @@ AdjustFunction EventHandler::cycleAdjustSetting(int direction) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AdjustFunction EventHandler::getAdjustSetting(AdjustSetting setting) { - // MUST have the same order as AdjustSetting + // Notes: + // - All methods MUST show a message + // - This array MUST have the same order as AdjustSetting const AdjustFunction ADJUST_FUNCTIONS[int(AdjustSetting::NUM_ADJ)] = { std::bind(&Sound::adjustVolume, &myOSystem.sound(), _1), std::bind(&FrameBuffer::selectVidMode, &myOSystem.frameBuffer(), _1), + std::bind(&FrameBuffer::toggleFullscreen, &myOSystem.frameBuffer(), _1), std::bind(&FrameBuffer::changeOverscan, &myOSystem.frameBuffer(), _1), std::bind(&Console::selectFormat, &myOSystem.console(), _1), std::bind(&Console::changeVerticalCenter, &myOSystem.console(), _1), @@ -405,6 +408,7 @@ AdjustFunction EventHandler::getAdjustSetting(AdjustSetting setting) int(NTSCFilter::Adjustables::BLEEDING), _1), std::bind(&Console::changePhosphor, &myOSystem.console(), _1), std::bind(&TIASurface::setScanlineIntensity, &myOSystem.frameBuffer().tiaSurface(), _1), + std::bind(&Console::toggleInter, &myOSystem.console(), _1), // Following functions are not used when cycling settings but for "direct only" hotkeys std::bind(&StateManager::changeState, &myOSystem.state(), _1), std::bind(&PaletteHandler::changeCurrentAdjustable, &myOSystem.frameBuffer().tiaSurface().paletteHandler(), _1), @@ -643,7 +647,12 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated) return; case Event::ToggleFullScreen: - if (pressed && !repeated) myOSystem.frameBuffer().toggleFullscreen(); + if(pressed && !repeated) + { + myOSystem.frameBuffer().toggleFullscreen(); + myAdjustSetting = AdjustSetting::FULLSCREEN; + myAdjustActive = true; + } return; case Event::OverscanDecrease: @@ -807,7 +816,12 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated) return; case Event::ToggleInter: - if (pressed && !repeated) myOSystem.console().toggleInter(); + if(pressed && !repeated) + { + myOSystem.console().toggleInter(); + myAdjustSetting = AdjustSetting::INTERPOLATION; + myAdjustActive = true; + } return; case Event::ToggleTurbo: @@ -2338,8 +2352,6 @@ const Event::EventSet EventHandler::MiscEvents = { // Event::MouseButtonLeftValue, Event::MouseButtonRightValue, Event::HandleMouseControl, Event::ToggleGrabMouse, Event::ToggleSAPortOrder, - Event::SettingDecrease, Event::SettingIncrease, - Event::PreviousSetting, Event::NextSetting, }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2347,19 +2359,21 @@ const Event::EventSet EventHandler::AudioVideoEvents = { Event::VolumeDecrease, Event::VolumeIncrease, Event::SoundToggle, Event::VidmodeDecrease, Event::VidmodeIncrease, Event::ToggleFullScreen, - Event::VidmodeStd, Event::VidmodeRGB, Event::VidmodeSVideo, Event::VidModeComposite, Event::VidModeBad, Event::VidModeCustom, - Event::PreviousAttribute, Event::NextAttribute, Event::DecreaseAttribute, Event::IncreaseAttribute, - Event::ScanlinesDecrease, Event::ScanlinesIncrease, - Event::PhosphorDecrease, Event::PhosphorIncrease, Event::TogglePhosphor, + Event::OverscanDecrease, Event::OverscanIncrease, Event::FormatDecrease, Event::FormatIncrease, Event::VCenterDecrease, Event::VCenterIncrease, Event::VSizeAdjustDecrease, Event::VSizeAdjustIncrease, - Event::OverscanDecrease, Event::OverscanIncrease, Event::PaletteDecrease, Event::PaletteIncrease, - Event::PreviousVideoMode, Event::NextVideoMode, Event::PreviousPaletteAttribute, Event::NextPaletteAttribute, Event::PaletteAttributeDecrease, Event::PaletteAttributeIncrease, - Event::ToggleInter + Event::VidmodeStd, Event::VidmodeRGB, Event::VidmodeSVideo, Event::VidModeComposite, Event::VidModeBad, Event::VidModeCustom, + Event::PreviousVideoMode, Event::NextVideoMode, + Event::PreviousAttribute, Event::NextAttribute, Event::DecreaseAttribute, Event::IncreaseAttribute, + Event::PhosphorDecrease, Event::PhosphorIncrease, Event::TogglePhosphor, + Event::ScanlinesDecrease, Event::ScanlinesIncrease, + Event::ToggleInter, + Event::PreviousSetting, Event::NextSetting, + Event::SettingDecrease, Event::SettingIncrease, }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/EventHandler.hxx b/src/emucore/EventHandler.hxx index 6051a9961..0ab40c7cd 100644 --- a/src/emucore/EventHandler.hxx +++ b/src/emucore/EventHandler.hxx @@ -397,6 +397,7 @@ class EventHandler NONE = -1, VOLUME, ZOOM, + FULLSCREEN, OVERSCAN, TVFORMAT, VCENTER, @@ -418,7 +419,8 @@ class EventHandler NTSC_BLEEDING, PHOSPHOR, SCANLINES, - MAX_ADJ = SCANLINES, + INTERPOLATION, + MAX_ADJ = INTERPOLATION, // Only used via direct hotkeys STATE, PALETTE_CHANGE_ATTRIBUTE, diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index c49f592a2..4599a3860 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -987,9 +987,13 @@ void FrameBuffer::setFullscreen(bool enable) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void FrameBuffer::toggleFullscreen() +void FrameBuffer::toggleFullscreen(bool toggle) { - setFullscreen(!fullScreen()); + const bool isFullscreen = toggle ? !fullScreen() : fullScreen(); + + setFullscreen(isFullscreen); + + showMessage(string("Fullscreen ") + (isFullscreen ? "enabled" : "disabled")); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/FrameBuffer.hxx b/src/emucore/FrameBuffer.hxx index 52f6eeae7..3912f38cd 100644 --- a/src/emucore/FrameBuffer.hxx +++ b/src/emucore/FrameBuffer.hxx @@ -260,7 +260,7 @@ class FrameBuffer /** Toggles between fullscreen and window mode. */ - void toggleFullscreen(); + void toggleFullscreen(bool toggle = true); /** Changes the fullscreen overscan.
KeyEditor Function