From 8d321de90d933a06a5f8f87ea20ef83a3acc04b7 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Mon, 16 Dec 2019 09:03:42 +0100 Subject: [PATCH] reimplemented ystart (TODO: GameInfoDialog) --- docs/index.html | 28 +++++++++++++++++++++++++++- src/common/PKeyboardHandler.cxx | 6 ++++-- src/emucore/Event.hxx | 2 ++ src/emucore/EventHandler.cxx | 11 +++++++++++ src/emucore/EventHandler.hxx | 2 +- 5 files changed, 45 insertions(+), 4 deletions(-) diff --git a/docs/index.html b/docs/index.html index 7e5ec7011..45a7dbd60 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1514,16 +1514,29 @@ Increase overscan in fullscreen mode + Shift + PageUp + Shift + PageUp + + + + Decrease overscan in fullscreen mode + Shift + PageDown + Shift + PageDown + + + + Move display up (uses "Display.YStart") Alt + PageUp Cmd + PageUp - Decrease overscan in fullscreen mode + Move display down (uses "Display.YStart") Alt + PageDown Cmd + PageDown + Switch display format in increasing order (NTSC/PAL/SECAM etc.) Control + f @@ -3718,6 +3731,19 @@ Ms Pac-Man (Stella extended codes): PAL60 or SECAM60. + Display.Format: + Indicates the television format the game was designed for. The value + must be Auto, NTSC, PAL, SECAM, NTSC50, + PAL60 or SECAM60. + + + + Display.YStart: + Indicates the scan-line to start displaying at. + The value must be n such that 0 <= n <= 64. + + + Display.Phosphor: Indicates whether the phosphor effect should be emulated or not. diff --git a/src/common/PKeyboardHandler.cxx b/src/common/PKeyboardHandler.cxx index aa68a55a2..e57412939 100644 --- a/src/common/PKeyboardHandler.cxx +++ b/src/common/PKeyboardHandler.cxx @@ -431,13 +431,15 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultCommo {Event::VidmodeDecrease, KBDK_MINUS, MOD3}, {Event::VidmodeIncrease, KBDK_EQUALS, MOD3}, + {Event::DecreaseYStart, KBDK_PAGEUP, MOD3}, + {Event::IncreaseYStart, KBDK_PAGEDOWN, MOD3}, {Event::VolumeDecrease, KBDK_LEFTBRACKET, MOD3}, {Event::VolumeIncrease, KBDK_RIGHTBRACKET, MOD3}, {Event::SoundToggle, KBDK_RIGHTBRACKET, KBDM_CTRL}, {Event::ToggleFullScreen, KBDK_RETURN, MOD3}, - {Event::DecreaseOverscan, KBDK_PAGEDOWN, MOD3}, - {Event::IncreaseOverScan, KBDK_PAGEUP, MOD3}, + {Event::DecreaseOverscan, KBDK_PAGEDOWN, KBDM_SHIFT}, + {Event::IncreaseOverScan, KBDK_PAGEUP, KBDM_SHIFT}, {Event::VidmodeStd, KBDK_1, MOD3}, {Event::VidmodeRGB, KBDK_2, MOD3}, {Event::VidmodeSVideo, KBDK_3, MOD3}, diff --git a/src/emucore/Event.hxx b/src/emucore/Event.hxx index 7cb95b716..2bb9c1629 100644 --- a/src/emucore/Event.hxx +++ b/src/emucore/Event.hxx @@ -120,6 +120,8 @@ class Event CompuMateQuote, CompuMateBackspace, CompuMateEquals, CompuMatePlus, CompuMateSlash, + DecreaseYStart, IncreaseYStart, + LastType }; diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 333533d4d..b7296622d 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -419,6 +419,14 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated) if(pressed) myOSystem.frameBuffer().changeVidMode(+1); return; + case Event::DecreaseYStart: + if (pressed) myOSystem.console().changeYStart(-1); + return; + + case Event::IncreaseYStart: + if (pressed) myOSystem.console().changeYStart(+1); + return; + case Event::ToggleFullScreen: if (pressed && !repeated) myOSystem.frameBuffer().toggleFullscreen(); return; @@ -1824,6 +1832,8 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { { { Event::IncreaseOverScan, "Increase overscan in fullscreen mode", "" }, { Event::DecreaseFormat, "Decrease display format", "" }, { Event::IncreaseFormat, "Increase display format", "" }, + { Event::DecreaseYStart, "Move display up", "" }, + { Event::IncreaseYStart, "Move display down", "" }, { Event::TogglePalette, "Switch palette (Standard/Z26/User)", "" }, // TV effects: @@ -1949,6 +1959,7 @@ const Event::EventSet EventHandler::AudioVideoEvents = { Event::ScanlinesDecrease, Event::ScanlinesIncrease, Event::DecreasePhosphor, Event::IncreasePhosphor, Event::TogglePhosphor, Event::DecreaseFormat, Event::IncreaseFormat, + Event::DecreaseYStart, Event::IncreaseYStart, Event::DecreaseOverscan, Event::IncreaseOverScan, Event::TogglePalette, }; diff --git a/src/emucore/EventHandler.hxx b/src/emucore/EventHandler.hxx index f0604f515..29219317e 100644 --- a/src/emucore/EventHandler.hxx +++ b/src/emucore/EventHandler.hxx @@ -464,7 +464,7 @@ class EventHandler #else PNG_SIZE = 0, #endif - EMUL_ACTIONLIST_SIZE = 138 + PNG_SIZE + COMBO_SIZE, + EMUL_ACTIONLIST_SIZE = 140 + PNG_SIZE + COMBO_SIZE, MENU_ACTIONLIST_SIZE = 18 ;