From dad590b8c14cc84313919044764ecadb5d40bcda Mon Sep 17 00:00:00 2001 From: tomcw Date: Sat, 6 Apr 2019 17:31:26 +0100 Subject: [PATCH] Bumped to 1.28.5.0 and updated History.txt Updates for DHGR MIX (#633): . Support new switch -rgb-card-invert-bit7 to invert bit7 for Dragon Wars. - Reverted DHGR MIX mode and AN2 off to invert bit7 --- bin/History.txt | 12 ++++++++++++ help/CommandLine.html | 10 +++++++--- resource/version.h | 2 +- source/Applewin.cpp | 5 +++++ source/NTSC.cpp | 2 +- source/RGBMonitor.cpp | 16 ++++++++++++++++ source/RGBMonitor.h | 2 ++ 7 files changed, 44 insertions(+), 5 deletions(-) diff --git a/bin/History.txt b/bin/History.txt index d969fd36..4578fb44 100644 --- a/bin/History.txt +++ b/bin/History.txt @@ -8,6 +8,18 @@ https://github.com/AppleWin/AppleWin/issues/new Tom Charlesworth + +1.28.5.0 - 6 Apr 2019 +--------------------- +. [Change #631] Improvements for the RGB AppleColor card: + - Relax the video-mode precondition to just ignore if VF_MIXED (previously required HIRES on) for Apple II Desktop. + - Changing from DHGR B&W mode to HGR remains in B&W (color burst if off). + - For '50% scan lines', don't blend in NTSC B&W mode, as this was inconsistent with the RGB colour rendering. +. [Change #633] Improvements for the RGB AppleColor card: + - Improved the video-mode precondition to ignore if 80COL ($C00C/D) occurs before DHIRESON ($C05F) for Renegade. + - Support new switch -rgb-card-invert-bit7 to invert bit7 for Dragon Wars. + + 1.28.4.0 - 16 Mar 2019 ---------------------- . [Change #616] Improved accuracy for 'RGB (Color Monitor)' for hires. diff --git a/help/CommandLine.html b/help/CommandLine.html index f6dec26e..aca64edb 100644 --- a/help/CommandLine.html +++ b/help/CommandLine.html @@ -97,15 +97,19 @@
  • Either: Toggle between windowed and full screen video modes (default).
  • Or: Allow the emulated Apple II to read the Enter key state when Alt (Open Apple key) is pressed. + -rgb-card-invert-bit7
    + Force the RGB card (in "Color (RGB Monitor)" video mode) to invert bit7 in MIX mode. Enables the correct rendering for Dragon Wars.

    Debug arguments:

    -l or -log
    - Enable logging. Creates an AppleWin.log file

    + Enable logging. Creates an AppleWin.log file.

    -m
    - Disable DirectSound support

    + Disable DirectSound support.

    -no-printscreen-dlg
    - Suppress the warning message-box if AppleWin fails to capture the PrintScreen key

    + Suppress the warning message-box if AppleWin fails to capture the PrintScreen key.

    + -screenshot-and-exit
    + For testing. Use in combination with -load-state.

    diff --git a/resource/version.h b/resource/version.h index ec8ebb7a..4b56dec7 100644 --- a/resource/version.h +++ b/resource/version.h @@ -1,4 +1,4 @@ -#define APPLEWIN_VERSION 1,28,4,0 +#define APPLEWIN_VERSION 1,28,5,0 #define xstr(a) str(a) #define str(a) #a diff --git a/source/Applewin.cpp b/source/Applewin.cpp index a69a138a..4cf53765 100644 --- a/source/Applewin.cpp +++ b/source/Applewin.cpp @@ -53,6 +53,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Speech.h" #endif #include "Video.h" +#include "RGBMonitor.h" #include "NTSC.h" #include "Configuration/About.h" @@ -1416,6 +1417,10 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int) { newVideoStyleDisableMask = VS_COLOR_VERTICAL_BLEND; } + else if (strcmp(lpCmdLine, "-rgb-card-invert-bit7") == 0) // GH#633 + { + RGB_SetInvertBit7(true); + } else if (strcmp(lpCmdLine, "-screenshot-and-exit") == 0) // GH#616: For testing - Use in combination with -load-state { szScreenshotFilename = GetCurrArg(lpNextArg); diff --git a/source/NTSC.cpp b/source/NTSC.cpp index 186e3ba5..fe7b7c82 100644 --- a/source/NTSC.cpp +++ b/source/NTSC.cpp @@ -1378,7 +1378,7 @@ void updateScreenDoubleHires80Simplified (long cycles6502 ) // wsUpdateVideoDblH uint8_t a = *MemGetAuxPtr(addr); uint8_t m = *MemGetMainPtr(addr); - if (RGB_IsMixMode() && !MemGetAnnunciator(2)) // AN2 inverts high bit? (GH#633) + if (RGB_IsMixModeInvertBit7()) // Invert high bit? (GH#633) { a ^= 0x80; m ^= 0x80; diff --git a/source/RGBMonitor.cpp b/source/RGBMonitor.cpp index 93a8a0db..3312b3a6 100644 --- a/source/RGBMonitor.cpp +++ b/source/RGBMonitor.cpp @@ -739,6 +739,7 @@ static UINT g_rgbFlags = 0; static UINT g_rgbMode = 0; static WORD g_rgbPrevAN3Addr = 0; static bool g_rgbSet80COL = false; +static bool g_rgbInvertBit7 = false; // Video7 RGB card: // . Clock in the !80COL state to define the 2 flags: F2, F1 @@ -801,6 +802,11 @@ bool RGB_Is560Mode(void) // Extended 80-Column Text/AppleColor Card's Mode 1 return g_rgbMode == 3; } +bool RGB_IsMixModeInvertBit7(void) +{ + return RGB_IsMixMode() && g_rgbInvertBit7; +} + void RGB_ResetState(void) { g_rgbFlags = 0; @@ -808,6 +814,11 @@ void RGB_ResetState(void) g_rgbPrevAN3Addr = 0; } +void RGB_SetInvertBit7(bool state) +{ + g_rgbInvertBit7 = state; +} + //=========================================================================== #define SS_YAML_KEY_RGB_CARD "AppleColor RGB Adaptor" @@ -817,6 +828,7 @@ void RGB_ResetState(void) #define SS_YAML_KEY_RGB_MODE "RGB mode" #define SS_YAML_KEY_RGB_PREVIOUS_AN3 "Previous AN3" #define SS_YAML_KEY_RGB_80COL_CHANGED "80COL changed" +#define SS_YAML_KEY_RGB_INVERT_BIT7 "Invert bit7" void RGB_SaveSnapshot(YamlSaveHelper& yamlSaveHelper) { @@ -826,6 +838,7 @@ void RGB_SaveSnapshot(YamlSaveHelper& yamlSaveHelper) yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_RGB_MODE, g_rgbMode); yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_RGB_PREVIOUS_AN3, g_rgbPrevAN3Addr); yamlSaveHelper.SaveBool(SS_YAML_KEY_RGB_80COL_CHANGED, g_rgbSet80COL); + yamlSaveHelper.SaveBool(SS_YAML_KEY_RGB_INVERT_BIT7, g_rgbInvertBit7); } void RGB_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT cardVersion) @@ -838,7 +851,10 @@ void RGB_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT cardVersion) g_rgbPrevAN3Addr = yamlLoadHelper.LoadUint(SS_YAML_KEY_RGB_PREVIOUS_AN3); if (cardVersion >= 3) + { g_rgbSet80COL = yamlLoadHelper.LoadBool(SS_YAML_KEY_RGB_80COL_CHANGED); + g_rgbInvertBit7 = yamlLoadHelper.LoadBool(SS_YAML_KEY_RGB_INVERT_BIT7); + } yamlLoadHelper.PopMap(); } diff --git a/source/RGBMonitor.h b/source/RGBMonitor.h index b6b26ab7..14cb72c0 100644 --- a/source/RGBMonitor.h +++ b/source/RGBMonitor.h @@ -13,7 +13,9 @@ bool RGB_Is140Mode(void); bool RGB_Is160Mode(void); bool RGB_IsMixMode(void); bool RGB_Is560Mode(void); +bool RGB_IsMixModeInvertBit7(void); void RGB_ResetState(void); +void RGB_SetInvertBit7(bool state); void RGB_SaveSnapshot(class YamlSaveHelper& yamlSaveHelper); void RGB_LoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT cardVersion);