Merge tag 'v1.28.2.0'

This commit is contained in:
Andrea Odetti 2019-04-19 20:55:57 +01:00
commit 4373e1ac61
33 changed files with 562 additions and 230 deletions

View file

@ -374,7 +374,8 @@
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502
@ -398,7 +399,8 @@
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502
@ -428,7 +430,8 @@
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502
@ -458,7 +461,8 @@
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502

View file

@ -373,8 +373,9 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;Advapi32.lib;shell32.lib;Comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502
@ -397,8 +398,9 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;Advapi32.lib;shell32.lib;Comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502
@ -426,9 +428,10 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;Advapi32.lib;shell32.lib;Comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502
@ -456,9 +459,10 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;Advapi32.lib;shell32.lib;Comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502

View file

@ -369,12 +369,14 @@
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source\cpu;source\emulator;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502
@ -393,12 +395,14 @@
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source\cpu;source\emulator;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502
@ -420,6 +424,7 @@
<AdditionalIncludeDirectories>source\cpu;source\emulator;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -428,7 +433,8 @@
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502
@ -450,6 +456,7 @@
<AdditionalIncludeDirectories>source\cpu;source\emulator;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -458,7 +465,8 @@
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;winmm.lib;dsound.lib;dxguid.lib;version.lib;strmiids.lib;dinput8.lib;user32.lib;gdi32.lib;advapi32.lib;shell32.lib;comdlg32.lib;ole32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<AdditionalManifestDependencies>"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502

View file

@ -8,6 +8,15 @@ https://github.com/AppleWin/AppleWin/issues/new
Tom Charlesworth
1.28.2.0 - 24 Feb 2019
----------------------
. [Change #616] Support vertical blending for 'RGB (Color Monitor)' for hires.
- Support the old AppleWin 1.25 vertical blending for hires via a 'Vertical Blend' checkbox.
. [Change #621] Support RGB AppleColor card's 160-color pixel mode by squashing 640 pixels into 560 pixels.
- Squashing is done by losing every 8th pixel.
. [PR #623] Do not reset on minor state load errors.
. [Bug #609] Configuration dialog didn't correctly reflect lack of Mockingboard/Phasor when loading a save-state without this sound card.
1.28.1.0 - 2 Feb 2019
---------------------
@ -714,8 +723,8 @@ Beta builds for specific testers
. Support for Pravets 82. Caps Lock serves as Lat/Cyr lock. The charset still needs a little fix (all characters have to be one row down).
. Some partial support for Pravets 8A. Caps Lock serves as Lat/Cyr lock, and F10 serves as Caps Lock.
In Pravets 8A mode the former behaviour of the F10 key is preserved as Ctrl+F10 (see Help/Keyboard for details).
Extended Basic and Miniassembler work, but there are still problems with the 8 bit charset (Ïàðèñ [Parris] does not switch to latin characters).
Some keys have to be remapped, because currently they are not available (i.e. Ý). There is still the problem that there is not enough space for this key on the keyboard.
Extended Basic and Miniassembler work, but there are still problems with the 8 bit charset (Ïàðèñ [Parris] does not switch to latin characters).
Some keys have to be remapped, because currently they are not available (i.e. Ý). There is still the problem that there is not enough space for this key on the keyboard.
. Added Send to CiderPress function via the popup menu of the drive buttons.
1.14.1.2 - 2 Dec 2007 (beta)

View file

@ -36,10 +36,10 @@ To support Bob Bishop's intros, tight-loop page-flipping, etc
Plans for (1st pass) cleaning up are:
. Ditch the x86 code to access the PC speaker + ditch PC speaker support
. [DONE] The arrays ioread[] & iowrite[] in Memory.cpp should be switched from units of 1 byte to 16 bytes.
This will yield 256 entries spanning [$C000…$CFFF] currently its only [$C000…$C0FF]. This will mean that:
a) cards with I/O mapped above $C0FF (eg Mockingboard, Mouse?) dont have to be kludged as in the READ/WRITE macros in CPU.cpp
This will yield 256 entries spanning [$C000…$CFFF] currently its only [$C000…$C0FF]. This will mean that:
a) cards with I/O mapped above $C0FF (eg Mockingboard, Mouse?) dont have to be kludged as in the READ/WRITE macros in CPU.cpp
b) $CFFF (ROMs out) can be emulated
. Talking of CPU.cpp & those macros: Id prefer to replace them with inline funcs. Maintenance of these
macros is a bitch & they cant be single-stepped. Inline funs should yield the same code (in release build)
. Talking of CPU.cpp & those macros: Id prefer to replace them with inline funcs. Maintenance of these
macros is a bitch & they cant be single-stepped. Inline funs should yield the same code (in release build)
as the macros.

View file

@ -49,10 +49,14 @@
This is the color to use when you choose a monochrome video mode.<br>
<br>
<strong>50% Scan line:</strong><br>
<strong>50% Scan lines:</strong><br>
Only draw alternate scanline (for better monitor authenticity).<br>
<br>
<strong>Vertical blend:</strong><br>
When video mode is 'Color (RGB Monitor)' then vertically blend the hires screen.<br>
<br>
<strong>Full-Screen: Show drive/keyboard status:</strong><br>
When in full-screen mode, show floppy (activity and track) and harddisk status (activity); keyboard caps-lock status and if emulation is paused.<br>
<br>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -89,16 +89,17 @@ CAPTION "Configuration"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "&Model:",IDC_STATIC,5,7,40,8
COMBOBOX IDC_COMPUTER,45,5,95,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Confirm reboot",IDC_CHECK_CONFIRM_REBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,148,8,62,10
COMBOBOX IDC_COMPUTER,45,5,90,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Confirm reboot",IDC_CHECK_CONFIRM_REBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,8,62,10
GROUPBOX "Video",IDC_STATIC,5,22,200,56
LTEXT "Mo&de:",IDC_STATIC,12,33,33,8
COMBOBOX IDC_VIDEOTYPE,45,30,95,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_VIDEOTYPE,45,30,90,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Monochrome &Color...",IDC_MONOCOLOR,12,46,80,14
CONTROL "50% Scan lines",IDC_CHECK_HALF_SCAN_LINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,48,62,10
CONTROL "50% Scan lines",IDC_CHECK_HALF_SCAN_LINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,33,62,10
CONTROL "Vertical blend",IDC_CHECK_VERTICAL_BLEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,48,62,10
CONTROL "Full-Screen: Show drive/keyboard status",IDC_CHECK_FS_SHOW_SUBUNIT_STATUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,64,140,10
LTEXT "&Serial Port:",IDC_STATIC,5,89,40,8
COMBOBOX IDC_SERIALPORT,45,87,95,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_SERIALPORT,45,87,90,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&Ethernet Settings...",IDC_ETHERNET,4,105,80,14
GROUPBOX "Emulation Speed Control",IDC_STATIC,5,130,200,85
CONTROL "Use &Authentic Machine Speed",IDC_AUTHENTIC_SPEED,

View file

@ -115,6 +115,7 @@
#define IDC_COMBO_DISK1 1080
#define IDC_COMBO_DISK2 1081
#define IDC_CHECK_FS_SHOW_SUBUNIT_STATUS 1082
#define IDC_CHECK_VERTICAL_BLEND 1083
#define IDM_EXIT 40001
#define IDM_HELP 40002
#define IDM_ABOUT 40003

View file

@ -1,4 +1,4 @@
#define APPLEWIN_VERSION 1,28,1,0
#define APPLEWIN_VERSION 1,28,2,0
#define xstr(a) str(a)
#define str(a) #a

View file

@ -1175,6 +1175,9 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
const std::string strCmdLine(lpCmdLine); // Keep a copy for log ouput
UINT uRamWorksExPages = 0;
UINT uSaturnBanks = 0;
int newVideoType = -1;
int newVideoStyleEnableMask = 0;
int newVideoStyleDisableMask = 0;
while (*lpCmdLine)
{
@ -1395,6 +1398,18 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
{
SetAltEnterToggleFullScreen(false);
}
else if (strcmp(lpCmdLine, "-video-mode=rgb-monitor") == 0) // GH#616
{
newVideoType = VT_COLOR_MONITOR_RGB;
}
else if (strcmp(lpCmdLine, "-video-style=vertical-blend") == 0) // GH#616
{
newVideoStyleEnableMask = VS_COLOR_VERTICAL_BLEND;
}
else if (strcmp(lpCmdLine, "-video-style=no-vertical-blend") == 0) // GH#616
{
newVideoStyleDisableMask = VS_COLOR_VERTICAL_BLEND;
}
else // unsupported
{
LogFileOutput("Unsupported arg: %s\n", lpCmdLine);
@ -1507,6 +1522,10 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
LoadConfiguration();
LogFileOutput("Main: LoadConfiguration()\n");
if (newVideoType >= 0)
SetVideoType( (VideoType_e)newVideoType );
SetVideoStyle( (VideoStyle_e) ((GetVideoStyle() | newVideoStyleEnableMask) & ~newVideoStyleDisableMask) );
// Apply the memory expansion switches after loading the Apple II machine type
#ifdef RAMWORKS
if (uRamWorksExPages)

View file

@ -104,7 +104,8 @@ enum AppMode_e
#define REGVALUE_PRINTER_APPEND "Append to printer file"
#define REGVALUE_PRINTER_IDLE_LIMIT "Printer idle limit"
#define REGVALUE_VIDEO_MODE "Video Emulation"
#define REGVALUE_VIDEO_HALF_SCAN_LINES "Half Scan Lines"
#define REGVALUE_VIDEO_STYLE "Video Style" // GH#616: Added at 1.28.2
#define REGVALUE_VIDEO_HALF_SCAN_LINES "Half Scan Lines" // GH#616: Deprecated from 1.28.2
#define REGVALUE_VIDEO_MONO_COLOR "Monochrome Color"
#define REGVALUE_SERIAL_PORT_NAME "Serial Port Name"
#define REGVALUE_ENHANCE_DISK_SPEED "Enhance Disk Speed"

View file

@ -3,7 +3,7 @@
*
* Written by
* Ettore Perazzoli <ettore@comm2000.it>
* André Fachat <fachat@physik.tu-chemnitz.de>
* André Fachat <fachat@physik.tu-chemnitz.de>
* Andreas Boose <viceteam@t-online.de>
*
* This file is part of VICE, the Versatile Commodore Emulator.

View file

@ -2,7 +2,7 @@
* mem.h - Memory interface.
*
* Written by
* André Fachat <fachat@physik.tu-chemnitz.de>
* André Fachat <fachat@physik.tu-chemnitz.de>
* Ettore Perazzoli <ettore@comm2000.it>
* Andreas Boose <viceteam@t-online.de>
*

View file

@ -3,7 +3,7 @@
*
* Written by
* Ettore Perazzoli <ettore@comm2000.it>
* André Fachat <a.fachat@physik.tu-chemnitz.de>
* André Fachat <a.fachat@physik.tu-chemnitz.de>
* Teemu Rantanen <tvr@cs.hut.fi>
* Andreas Boose <viceteam@t-online.de>
*

View file

@ -119,6 +119,7 @@ BOOL CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
case IDC_CHECK_CONFIRM_REBOOT:
case IDC_CHECK_HALF_SCAN_LINES:
case IDC_CHECK_VERTICAL_BLEND:
case IDC_CHECK_FS_SHOW_SUBUNIT_STATUS:
// Checked in DlgOK()
break;
@ -142,6 +143,14 @@ BOOL CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
}
break;
case IDC_VIDEOTYPE:
if(HIWORD(wparam) == CBN_SELCHANGE)
{
const VideoType_e newVideoType = (VideoType_e) SendDlgItemMessage(hWnd, IDC_VIDEOTYPE, CB_GETCURSEL, 0, 0);
EnableWindow(GetDlgItem(hWnd, IDC_CHECK_VERTICAL_BLEND), (newVideoType == VT_COLOR_MONITOR_RGB) ? TRUE : FALSE);
}
break;
#if 0
case IDC_RECALIBRATE:
RegSaveValue(TEXT(""),TEXT("RunningOnOS"),0,0);
@ -186,10 +195,13 @@ BOOL CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
CheckDlgButton(hWnd, IDC_CHECK_CONFIRM_REBOOT, g_bConfirmReboot ? BST_CHECKED : BST_UNCHECKED );
m_PropertySheetHelper.FillComboBox(hWnd,IDC_VIDEOTYPE,g_aVideoChoices,g_eVideoType);
CheckDlgButton(hWnd, IDC_CHECK_HALF_SCAN_LINES, g_uHalfScanLines ? BST_CHECKED : BST_UNCHECKED);
m_PropertySheetHelper.FillComboBox(hWnd,IDC_VIDEOTYPE, g_aVideoChoices, GetVideoType());
CheckDlgButton(hWnd, IDC_CHECK_HALF_SCAN_LINES, IsVideoStyle(VS_HALF_SCANLINES) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hWnd, IDC_CHECK_FS_SHOW_SUBUNIT_STATUS, GetFullScreenShowSubunitStatus() ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hWnd, IDC_CHECK_VERTICAL_BLEND, IsVideoStyle(VS_COLOR_VERTICAL_BLEND) ? BST_CHECKED : BST_UNCHECKED);
EnableWindow(GetDlgItem(hWnd, IDC_CHECK_VERTICAL_BLEND), (GetVideoType() == VT_COLOR_MONITOR_RGB) ? TRUE : FALSE);
m_PropertySheetHelper.FillComboBox(hWnd,IDC_SERIALPORT, sg_SSC.GetSerialPortChoices(), sg_SSC.GetSerialPort());
EnableWindow(GetDlgItem(hWnd, IDC_SERIALPORT), !sg_SSC.IsActive() ? TRUE : FALSE);
@ -245,17 +257,32 @@ void CPageConfig::DlgOK(HWND hWnd)
{
bool bVideoReinit = false;
const DWORD uNewVideoType = (DWORD) SendDlgItemMessage(hWnd, IDC_VIDEOTYPE, CB_GETCURSEL, 0, 0);
if (g_eVideoType != uNewVideoType)
const VideoType_e newVideoType = (VideoType_e) SendDlgItemMessage(hWnd, IDC_VIDEOTYPE, CB_GETCURSEL, 0, 0);
if (GetVideoType() != newVideoType)
{
g_eVideoType = uNewVideoType;
SetVideoType(newVideoType);
bVideoReinit = true;
}
const DWORD uNewHalfScanLines = IsDlgButtonChecked(hWnd, IDC_CHECK_HALF_SCAN_LINES) ? 1 : 0;
if (g_uHalfScanLines != uNewHalfScanLines)
const bool newHalfScanLines = IsDlgButtonChecked(hWnd, IDC_CHECK_HALF_SCAN_LINES) != 0;
const bool currentHalfScanLines = IsVideoStyle(VS_HALF_SCANLINES);
if (currentHalfScanLines != newHalfScanLines)
{
g_uHalfScanLines = uNewHalfScanLines;
if (newHalfScanLines)
SetVideoStyle( (VideoStyle_e) (GetVideoStyle() | VS_HALF_SCANLINES) );
else
SetVideoStyle( (VideoStyle_e) (GetVideoStyle() & ~VS_HALF_SCANLINES) );
bVideoReinit = true;
}
const bool newVerticalBlend = IsDlgButtonChecked(hWnd, IDC_CHECK_VERTICAL_BLEND) != 0;
const bool currentVerticalBlend = IsVideoStyle(VS_COLOR_VERTICAL_BLEND);
if (currentVerticalBlend != newVerticalBlend)
{
if (newVerticalBlend)
SetVideoStyle( (VideoStyle_e) (GetVideoStyle() | VS_COLOR_VERTICAL_BLEND) );
else
SetVideoStyle( (VideoStyle_e) (GetVideoStyle() & ~VS_COLOR_VERTICAL_BLEND) );
bVideoReinit = true;
}

View file

@ -9361,7 +9361,7 @@ void DebuggerProcessKey( int keycode )
}
}
else if (( keycode == VK_OEM_3 ) || // US: Tilde ~ (key to the immediate left of numeral 1)
( keycode == VK_OEM_8 )) // UK: Logical NOT ¬ (key to the immediate left of numeral 1)
( keycode == VK_OEM_8 )) // UK: Logical NOT ¬ (key to the immediate left of numeral 1)
{
if (KeybGetCtrlStatus())
{

View file

@ -1518,7 +1518,7 @@ int GetDisassemblyLine ( WORD nBaseAddress, DisasmLine_t & line_ )
{
bDisasmFormatFlags |= DISASM_FORMAT_TARGET_POINTER;
nTargetValue = *(LPWORD)(mem+nTargetPointer);
nTargetValue = *(mem + nTargetPointer) | (*(mem + ((nTargetPointer + 1) & 0xffff)) << 8);
// if (((iOpmode >= AM_A) && (iOpmode <= AM_NZ)) && (iOpmode != AM_R))
// nTargetBytes refers to size of pointer, not size of value

View file

@ -275,7 +275,7 @@ static void GetAppleWindowTitle()
// TODO: g_bDisplayVideoModeInTitle
_tcscat( g_pAppleWindowTitle, " - " );
if( g_uHalfScanLines )
if( IsVideoStyle(VS_HALF_SCANLINES) )
{
_tcscat( g_pAppleWindowTitle," 50% " );
}
@ -1289,7 +1289,7 @@ LRESULT CALLBACK FrameWndProc (
}
else if ( KeybGetCtrlStatus() && KeybGetShiftStatus() ) // CTRL+SHIFT+F9
{
g_uHalfScanLines = !g_uHalfScanLines;
SetVideoStyle( (VideoStyle_e) (GetVideoStyle() ^ VS_HALF_SCANLINES) );
}
// TODO: Clean up code:FrameRefreshStatus(DRAW_TITLE) DrawStatusArea((HDC)0,DRAW_TITLE)
@ -2401,14 +2401,33 @@ static void SetupTooltipControls(void)
// SM_CXPADDEDBORDER is not supported on 2000 & XP, but GetSystemMetrics() returns 0 for unknown values, so this use of SM_CXPADDEDBORDER works on 2000 & XP too:
// http://msdn.microsoft.com/en-nz/library/windows/desktop/ms724385(v=vs.85).aspx
// NB. GetSystemMetrics(SM_CXPADDEDBORDER) returns 0 for Win7, when built with VS2008 (see GH#571)
static void GetWidthHeight(int& nWidth, int& nHeight)
{
nWidth = g_nViewportCX + VIEWPORTX*2
+ BUTTONCX
+ (GetSystemMetrics(SM_CYFIXEDFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
+ (GetSystemMetrics(SM_CXFIXEDFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
nHeight = g_nViewportCY + VIEWPORTY*2
+ (GetSystemMetrics(SM_CYFIXEDFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER)) * 2 // NB. No SM_CYPADDEDBORDER
+ GetSystemMetrics(SM_CYCAPTION);
#if 0 // GH#571
LogOutput("g_nViewportCX = %d\n", g_nViewportCX);
LogOutput("VIEWPORTX = %d (const)\n", VIEWPORTX);
LogOutput("BUTTONCX = %d (const)\n", BUTTONCX);
LogOutput("GetSystemMetrics(SM_CXFRAME) = %d (unused)\n", GetSystemMetrics(SM_CXFRAME));
LogOutput("GetSystemMetrics(SM_CXFIXEDFRAME) = %d\n", GetSystemMetrics(SM_CXFIXEDFRAME));
LogOutput("GetSystemMetrics(SM_CXBORDER) = %d (unused)\n", GetSystemMetrics(SM_CXBORDER));
LogOutput("GetSystemMetrics(SM_CXPADDEDBORDER) = %d\n", GetSystemMetrics(SM_CXPADDEDBORDER));
LogOutput("nWidth = %d\n", nWidth);
LogOutput("g_nViewportCY = %d\n", g_nViewportCY);
LogOutput("VIEWPORTY = %d (const)\n", VIEWPORTY);
LogOutput("GetSystemMetrics(SM_CYFRAME) = %d (unused)\n", GetSystemMetrics(SM_CYFRAME));
LogOutput("GetSystemMetrics(SM_CYFIXEDFRAME) = %d\n", GetSystemMetrics(SM_CYFIXEDFRAME));
LogOutput("GetSystemMetrics(SM_CYBORDER) = %d (unused)\n", GetSystemMetrics(SM_CYBORDER));
LogOutput("GetSystemMetrics(SM_CYCAPTION) = %d\n", GetSystemMetrics(SM_CYCAPTION));
LogOutput("nHeight = %d\n\n", nHeight);
#endif
}
static void FrameResizeWindow(int nNewScale)

View file

@ -195,7 +195,7 @@ void KeybQueueKeypress (WPARAM key, Keystroke_e bASCII)
if (key == 92) keycode = 96;
if (GetCapsLockAllowed() == true)
{
if ((key == 92) || (key == 124)) keycode = 96; //Ý to Ţ
if ((key == 92) || (key == 124)) keycode = 96; //Ý to Þ
//This shall be rewriten, so that enabling CAPS_LOCK (i.e. F10) will not invert these keys values)
//The same for latin letters.
if ((key == '{') || (key == '}') || (key == '~') || (key == 124) || (key == '^') || (key == 95))
@ -231,24 +231,24 @@ void KeybQueueKeypress (WPARAM key, Keystroke_e bASCII)
}
}
// Remap for the TK3000 //e, which had a special |Mode| key for displaying accented chars on screen
// Borrowed from Fábio Belavenuto's TK3000e emulator (Copyright (C) 2004) - http://code.google.com/p/tk3000e/
// Borrowed from Fábio Belavenuto's TK3000e emulator (Copyright (C) 2004) - http://code.google.com/p/tk3000e/
if (g_bTK3KModeKey) // We already switch this on only if the the TK3000 is currently being emulated
{
if ((key >= 0xC0) && (key <= 0xDA)) key += 0x20; // Convert uppercase to lowercase
switch (key)
{
case 0xE0: key = '_'; break; // ŕ
case 0xE1: key = '@'; break; // á
case 0xE2: key = '\\'; break; // â
case 0xE3: key = '['; break; // ă
case 0xE7: key = ']'; break; // ç
case 0xE9: key = '`'; break; // é
case 0xEA: key = '&'; break; // ę
case 0xED: key = '{'; break; // í
case 0xF3: key = '~'; break; // ó
case 0xF4: key = '}'; break; // ô
case 0xF5: key = '#'; break; // ő
case 0xFA: key = '|'; break; // ú
case 0xE0: key = '_'; break; // à
case 0xE1: key = '@'; break; // á
case 0xE2: key = '\\'; break; // â
case 0xE3: key = '['; break; // ã
case 0xE7: key = ']'; break; // ç
case 0xE9: key = '`'; break; // é
case 0xEA: key = '&'; break; // ê
case 0xED: key = '{'; break; // í
case 0xF3: key = '~'; break; // ó
case 0xF4: key = '}'; break; // ô
case 0xF5: key = '#'; break; // õ
case 0xFA: key = '|'; break; // ú
}
if (key > 0x7F) return; // Get out
if ((key >= 'a') && (key <= 'z') && (g_bCapsLock))

View file

@ -1663,9 +1663,10 @@ void MemInitializeIO(void)
{
ConfigureSoftcard(pCxRomPeripheral, 5); // $C500 : Z80 card
}
else
if (g_Slot5 == CT_SAM)
ConfigureSAM(pCxRomPeripheral, 5); // $C500 : Z80 card
else if (g_Slot5 == CT_SAM)
{
ConfigureSAM(pCxRomPeripheral, 5); // $C500 : Z80 card
}
DiskLoadRom(pCxRomPeripheral, 6); // $C600 : Disk][ f/w
HD_Load_Rom(pCxRomPeripheral, 7); // $C700 : HDD f/w

View file

@ -1376,13 +1376,20 @@ static void MB_DSUninit()
//=============================================================================
static void InitSoundcardType(void)
{
g_SoundcardType = CT_Empty; // Use CT_Empty to mean: no soundcard
g_bPhasorEnable = false;
}
void MB_Initialize()
{
InitSoundcardType();
LogFileOutput("MB_Initialize: g_bDisableDirectSound=%d, g_bDisableDirectSoundMockingboard=%d\n", g_bDisableDirectSound, g_bDisableDirectSoundMockingboard);
if (g_bDisableDirectSound || g_bDisableDirectSoundMockingboard)
{
MockingboardVoice.bMute = true;
g_SoundcardType = CT_Empty;
}
else
{
@ -1411,6 +1418,17 @@ void MB_Initialize()
g_bCritSectionValid = true;
}
void MB_SetSoundcardType(SS_CARDTYPE NewSoundcardType);
// NB. Mockingboard voice is *already* muted because showing 'Select Load State file' dialog
// . and voice will be demuted when dialog is closed
void MB_InitializeForLoadingSnapshot() // GH#609
{
MB_Reset();
InitSoundcardType();
MockingboardVoice.lpDSBvoice->Stop(); // Reason: 'MB voice is playing' then loading a save-state where 'no MB present'
}
//-----------------------------------------------------------------------------
// NB. Called when /g_fCurrentCLK6502/ changes
@ -1453,15 +1471,16 @@ static void ResetState()
g_bMB_RegAccessedFlag = false;
g_bMB_Active = false;
//g_bMBAvailable = false;
// g_SoundcardType = CT_Empty; // Don't uncomment, else _ASSERT will fire in MB_Read() after an F2->MB_Reset()
// g_bPhasorEnable = false;
g_nPhasorMode = 0;
g_PhasorClockScaleFactor = 1;
// Not these, as they don't change on a CTRL+RESET or power-cycle:
// g_bMBAvailable = false;
// g_SoundcardType = CT_Empty; // Don't uncomment, else _ASSERT will fire in MB_Read() after an F2->MB_Reset()
// g_bPhasorEnable = false;
}
void MB_Reset()
void MB_Reset() // CTRL+RESET or power-cycle
{
if(!g_bDSAvailable)
return;
@ -1615,6 +1634,26 @@ static BYTE __stdcall PhasorIO(WORD PC, WORD nAddr, BYTE bWrite, BYTE nValue, UL
//-----------------------------------------------------------------------------
SS_CARDTYPE MB_GetSoundcardType()
{
return g_SoundcardType;
}
static void MB_SetSoundcardType(const SS_CARDTYPE NewSoundcardType)
{
if (NewSoundcardType == g_SoundcardType)
return;
if (NewSoundcardType == CT_Empty)
MB_Mute(); // Call MB_Mute() before setting g_SoundcardType = CT_Empty
g_SoundcardType = NewSoundcardType;
g_bPhasorEnable = (g_SoundcardType == CT_Phasor);
}
//-----------------------------------------------------------------------------
void MB_InitializeIO(LPBYTE pCxRomPeripheral, UINT uSlot4, UINT uSlot5)
{
// Mockingboard: Slot 4 & 5
@ -1636,6 +1675,12 @@ void MB_InitializeIO(LPBYTE pCxRomPeripheral, UINT uSlot4, UINT uSlot5)
RegisterIoHandler(uSlot5, IO_Null, IO_Null, MB_Read, MB_Write, NULL, NULL);
MB_SetSoundcardType(g_Slot4);
// Sound buffer may have been stopped by MB_InitializeForLoadingSnapshot().
// NB. DSZeroVoiceBuffer() also zeros the sound buffer, so it's better than directly calling IDirectSoundBuffer::Play():
// - without zeroing, then the previous sound buffer can be heard for a fraction of a second
// - eg. when doing Mockingboard playback, then loading a save-state which is also doing Mockingboard playback
DSZeroVoiceBuffer(&MockingboardVoice, "MB", g_dwDSBufferSize);
}
//-----------------------------------------------------------------------------
@ -1775,26 +1820,6 @@ void MB_UpdateCycles(ULONG uExecutedCycles)
//-----------------------------------------------------------------------------
SS_CARDTYPE MB_GetSoundcardType()
{
return g_SoundcardType;
}
void MB_SetSoundcardType(SS_CARDTYPE NewSoundcardType)
{
if (g_SoundcardType == NewSoundcardType)
return;
g_SoundcardType = NewSoundcardType;
if(g_SoundcardType == CT_Empty)
MB_Mute();
g_bPhasorEnable = (g_SoundcardType == CT_Phasor);
}
//-----------------------------------------------------------------------------
static double MB_GetFramePeriod(void)
{
// TODO: Ideally remove this (slot-4) Phasor-IFR check: [*1]
@ -2108,9 +2133,7 @@ bool MB_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version)
AY8910_InitClock((int)CLK_6502);
// Setup in MB_InitializeIO() -> MB_SetSoundcardType()
g_SoundcardType = CT_Empty;
g_bPhasorEnable = false;
// NB. g_SoundcardType & g_bPhasorEnable setup in MB_InitializeIO() -> MB_SetSoundcardType()
return true;
}
@ -2233,9 +2256,7 @@ bool Phasor_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version
AY8910_InitClock((int)(CLK_6502 * g_PhasorClockScaleFactor));
// Setup in MB_InitializeIO() -> MB_SetSoundcardType()
g_SoundcardType = CT_Empty;
g_bPhasorEnable = false;
// NB. g_SoundcardType & g_bPhasorEnable setup in MB_InitializeIO() -> MB_SetSoundcardType()
return true;
}

View file

@ -4,6 +4,7 @@ void MB_Initialize();
void MB_Reinitialize();
void MB_Destroy();
void MB_Reset();
void MB_InitializeForLoadingSnapshot(void);
void MB_InitializeIO(LPBYTE pCxRomPeripheral, UINT uSlot4, UINT uSlot5);
void MB_Mute();
void MB_Demute();
@ -12,7 +13,6 @@ void MB_EndOfVideoFrame();
void MB_CheckIRQ();
void MB_UpdateCycles(ULONG uExecutedCycles);
SS_CARDTYPE MB_GetSoundcardType();
void MB_SetSoundcardType(SS_CARDTYPE NewSoundcardType);
bool MB_IsActive();
DWORD MB_GetVolume();
void MB_SetVolume(DWORD dwVolume, DWORD dwVolumeMax);

View file

@ -1378,7 +1378,12 @@ void updateScreenDoubleHires80Simplified (long cycles6502 ) // wsUpdateVideoDblH
uint8_t a = *MemGetAuxPtr(addr);
uint8_t m = *MemGetMainPtr(addr);
if (RGB_Is560Mode() || (RGB_IsMixMode() && !((a | m) & 0x80)))
if (RGB_Is160Mode())
{
int width = UpdateDHiRes160Cell(g_nVideoClockHorz-VIDEO_SCANNER_HORZ_START, g_nVideoClockVert, addr, g_pVideoAddress);
g_pVideoAddress += width;
}
else if (RGB_Is560Mode() || (RGB_IsMixMode() && !((a | m) & 0x80)))
{
update7MonoPixels(a);
update7MonoPixels(m);
@ -1935,7 +1940,7 @@ void NTSC_SetVideoMode( uint32_t uVideoModeFlags )
//===========================================================================
void NTSC_SetVideoStyle() // (int v, int s)
{
int half = g_uHalfScanLines;
int half = IsVideoStyle(VS_HALF_SCANLINES);
uint8_t r, g, b;
switch ( g_eVideoType )

View file

@ -161,9 +161,9 @@ static BYTE __stdcall PrintTransmit(WORD, WORD, BYTE, BYTE value, ULONG)
{
char Lat8A[]= "abwgdevzijklmnoprstufhc~{}yx`q|]";
char Lat82[]= "abwgdevzijklmnoprstufhc^[]yx@q{}~`";
char Kir82[]= "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÜŞß[]^@";
char Kir8ACapital[]= "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÜŞßİ";
char Kir8ALowerCase[]= "àáâãäåæçèéêëìíîïğñòóôõö÷øùúüşÿı";
char Kir82[]= "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÜÞß[]^@";
char Kir8ACapital[]= "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÜÞßÝ";
char Kir8ALowerCase[]= "àáâãäåæçèéêëìíîïðñòóôõö÷øùúüþÿý";
bool Pres = false;
if (!CheckPrint())
{

View file

@ -39,6 +39,7 @@ enum Color_Palette_Index_e
, HGR_GREEN // HCOLOR=1 GREEN , 2400: 02 00 2A 55
, HGR_VIOLET // HCOLOR=2 VIOLET , 2800: 01 00 55 2A
#endif
// TV emu
, HGR_GREY1
, HGR_GREY2
@ -206,88 +207,6 @@ static void V_CreateLookup_DoubleHires ()
//===========================================================================
#if 0
static void V_CreateLookup_Hires()
{
// int iMonochrome = GetMonochromeIndex();
// BYTE colorval[6] = {MAGENTA,BLUE,GREEN,ORANGE,BLACK,WHITE};
// BYTE colorval[6] = {HGR_MAGENTA,HGR_BLUE,HGR_GREEN,HGR_RED,HGR_BLACK,HGR_WHITE};
for (int iColumn = 0; iColumn < 16; iColumn++)
{
int coloffs = iColumn << 5;
for (unsigned iByte = 0; iByte < 256; iByte++)
{
int aPixels[11];
aPixels[ 0] = iColumn & 4;
aPixels[ 1] = iColumn & 8;
aPixels[ 9] = iColumn & 1;
aPixels[10] = iColumn & 2;
int nBitMask = 1;
int iPixel;
for (iPixel = 2; iPixel < 9; iPixel++) {
aPixels[iPixel] = ((iByte & nBitMask) != 0);
nBitMask <<= 1;
}
int hibit = ((iByte & 0x80) != 0);
int x = 0;
int y = iByte << 1;
while (x < 28)
{
int adj = (x >= 14) << 1;
int odd = (x >= 14);
for (iPixel = 2; iPixel < 9; iPixel++)
{
int color = CM_Black;
if (aPixels[iPixel])
{
if (aPixels[iPixel-1] || aPixels[iPixel+1])
color = CM_White;
else
color = ((odd ^ (iPixel&1)) << 1) | hibit;
}
else if (aPixels[iPixel-1] && aPixels[iPixel+1])
{
// Activate fringe reduction on white HGR text - drawback: loss of color mix patterns in HGR video mode.
// VT_COLOR_MONITOR_RGB = Fill in colors in between white pixels
// VT_COLOR_TVEMU = Fill in colors in between white pixels (Post Processing will mix/merge colors)
// VT_COLOR_TEXT_OPTIMIZED --> !(aPixels[iPixel-2] && aPixels[iPixel+2]) = Don't fill in colors in between white
if ((g_eVideoType == VT_COLOR_TVEMU) || !(aPixels[iPixel-2] && aPixels[iPixel+2]) )
color = ((odd ^ !(iPixel&1)) << 1) | hibit; // No white HGR text optimization
}
//if (g_eVideoType == VT_MONO_AUTHENTIC) {
// int nMonoColor = (color != CM_Black) ? iMonochrome : BLACK;
// SETSOURCEPIXEL(SRCOFFS_HIRES+coloffs+x+adj ,y , nMonoColor); // buggy
// SETSOURCEPIXEL(SRCOFFS_HIRES+coloffs+x+adj+1,y , nMonoColor); // buggy
// SETSOURCEPIXEL(SRCOFFS_HIRES+coloffs+x+adj ,y+1,BLACK); // BL
// SETSOURCEPIXEL(SRCOFFS_HIRES+coloffs+x+adj+1,y+1,BLACK); // BR
//} else
{
// Colors - Top/Bottom Left/Right
// cTL cTR
// cBL cBR
SETSOURCEPIXEL(SRCOFFS_HIRES+coloffs+x+adj ,y ,HiresToPalIndex[color]); // cTL
SETSOURCEPIXEL(SRCOFFS_HIRES+coloffs+x+adj+1,y ,HiresToPalIndex[color]); // cTR
SETSOURCEPIXEL(SRCOFFS_HIRES+coloffs+x+adj ,y+1,HiresToPalIndex[color]); // cBL
SETSOURCEPIXEL(SRCOFFS_HIRES+coloffs+x+adj+1,y+1,HiresToPalIndex[color]); // cBR
}
x += 2;
}
}
}
}
}
#endif
//===========================================================================
void V_CreateLookup_Lores()
{
for (int color = 0; color < 16; color++)
@ -484,7 +403,176 @@ Legend:
//===========================================================================
static void CopySource(int w, int h, int sx, int sy, bgra_t *pVideoAddress)
// For AppleWin 1.25 "tv emulation" HGR Video Mode
const UINT FRAMEBUFFER_W = 560;
const UINT FRAMEBUFFER_H = 384;
const UINT HGR_MATRIX_YOFFSET = 2;
static BYTE hgrpixelmatrix[FRAMEBUFFER_W/2][FRAMEBUFFER_H/2 + 2 * HGR_MATRIX_YOFFSET]; // 2 extra scan lines on bottom?
static BYTE colormixbuffer[6]; // 6 hires colours
static WORD colormixmap[6][6][6]; // top x middle x bottom
BYTE MixColors(BYTE c1, BYTE c2)
{
#define COMBINATION(c1,c2,ref1,ref2) (((c1)==(ref1)&&(c2)==(ref2)) || ((c1)==(ref2)&&(c2)==(ref1)))
if (c1 == c2)
return c1;
if (COMBINATION(c1,c2,HGR_BLUE,HGR_ORANGE))
return HGR_GREY1;
else if (COMBINATION(c1,c2,HGR_GREEN,HGR_VIOLET))
return HGR_GREY2;
else if (COMBINATION(c1,c2,HGR_ORANGE,HGR_GREEN))
return HGR_YELLOW;
else if (COMBINATION(c1,c2,HGR_BLUE,HGR_GREEN))
return HGR_AQUA;
else if (COMBINATION(c1,c2,HGR_BLUE,HGR_VIOLET))
return HGR_PURPLE;
else if (COMBINATION(c1,c2,HGR_ORANGE,HGR_VIOLET))
return HGR_PINK;
else
return WHITE; // visible failure indicator
#undef COMBINATION
}
static void CreateColorMixMap(void)
{
const int FROM_NEIGHBOUR = 0x00;
const int MIX_THRESHOLD = HGR_BLUE; // (skip) bottom 2 HGR colors
for (int t=0; t<6; t++) // Color_Palette_Index_e::HGR_BLACK(0) ... Color_Palette_Index_e::HGR_VIOLET(5)
{
for (int m=0; m<6; m++)
{
for (int b=0; b<6; b++)
{
BYTE cTop = t;
BYTE cMid = m;
BYTE cBot = b;
WORD mixTop, mixBot;
if (cMid < MIX_THRESHOLD)
{
mixTop = mixBot = cMid;
}
else
{
if (cTop < MIX_THRESHOLD)
mixTop = FROM_NEIGHBOUR;
else
mixTop = MixColors(cMid,cTop);
if (cBot < MIX_THRESHOLD)
mixBot = FROM_NEIGHBOUR;
else
mixBot = MixColors(cMid,cBot);
if (mixTop == FROM_NEIGHBOUR && mixBot != FROM_NEIGHBOUR)
mixTop = mixBot;
else if (mixBot == FROM_NEIGHBOUR && mixTop != FROM_NEIGHBOUR)
mixBot = mixTop;
else if (mixBot == FROM_NEIGHBOUR && mixTop == FROM_NEIGHBOUR)
mixBot = mixTop = cMid;
}
colormixmap[t][m][b] = (mixTop << 8) | mixBot;
}
}
}
}
static void MixColorsVertical(int matx, int maty)
{
int bot1idx, bot2idx;
if (VideoGetSWMIXED() && maty > 159)
{
if (maty < 161)
{
bot1idx = hgrpixelmatrix[matx][maty+1] & 0x0F;
bot2idx = 0;
}
else
{
bot1idx = bot2idx = 0;
}
}
else
{
bot1idx = hgrpixelmatrix[matx][maty+1] & 0x0F;
bot2idx = hgrpixelmatrix[matx][maty+2] & 0x0F;
}
WORD twoHalfPixel = colormixmap[hgrpixelmatrix[matx][maty-2] & 0x0F]
[hgrpixelmatrix[matx][maty-1] & 0x0F]
[hgrpixelmatrix[matx][maty ] & 0x0F];
colormixbuffer[0] = (twoHalfPixel & 0xFF00) >> 8;
colormixbuffer[1] = (twoHalfPixel & 0x00FF);
twoHalfPixel = colormixmap[hgrpixelmatrix[matx][maty-1] & 0x0F]
[hgrpixelmatrix[matx][maty ] & 0x0F]
[bot1idx];
colormixbuffer[2] = (twoHalfPixel & 0xFF00) >> 8;
colormixbuffer[3] = (twoHalfPixel & 0x00FF);
twoHalfPixel = colormixmap[hgrpixelmatrix[matx][maty ] & 0x0F]
[bot1idx]
[bot2idx];
colormixbuffer[4] = (twoHalfPixel & 0xFF00) >> 8;
colormixbuffer[5] = (twoHalfPixel & 0x00FF);
}
// NB. This operates at the 7M pixel level: 2 identical 14M pixels are written per inner loop (so no support for half-dot-shift, eg. Archon's title)
static void CopyMixedSource(int x, int y, int sourcex, int sourcey, bgra_t *pVideoAddress)
{
const BYTE* const currsourceptr = g_aSourceStartofLine[sourcey]+sourcex;
UINT32* const currdestptr = (UINT32*) pVideoAddress;
const int matx = x;
const int maty = HGR_MATRIX_YOFFSET + y;
const int hgrlinesabove = (y > 0) ? 1 : 0;
const int hgrlinesbelow = VideoGetSWMIXED() ? ((y < 159)? 1:0) : ((y < 191)? 1:0);
const int istart = 2 - (hgrlinesabove*2);
const int iend = 3 + (hgrlinesbelow*2);
// transfer 7 pixels (i.e. the visible part of an apple hgr-byte) from row to pixelmatrix
for (int count = 0, bufxoffset = 0; count < 7; count++, bufxoffset += 2)
{
hgrpixelmatrix[matx+count][maty] = *(currsourceptr+bufxoffset);
// color mixing between adjacent scanlines at current x position
MixColorsVertical(matx+count, maty);
// transfer up to 6 mixed (half-)pixels of current column to framebuffer
UINT32* currptr = currdestptr+bufxoffset;
if (hgrlinesabove)
currptr += GetFrameBufferWidth() * 2;
for (int i = istart; i <= iend; currptr -= GetFrameBufferWidth(), i++)
{
if (IsVideoStyle(VS_HALF_SCANLINES) && (i & 1))
{
// 50% Half Scan Line clears every odd scanline (and SHIFT+PrintScreen saves only the even rows)
*currptr = *(currptr+1) = 0;
}
else
{
_ASSERT( colormixbuffer[i] < (sizeof(PalIndex2RGB)/sizeof(PalIndex2RGB[0])) );
const RGBQUAD& rRGB = PalIndex2RGB[ colormixbuffer[i] ];
const UINT32 rgb = (((UINT32)rRGB.rgbRed)<<16) | (((UINT32)rRGB.rgbGreen)<<8) | ((UINT32)rRGB.rgbBlue);
*currptr = *(currptr+1) = rgb;
}
}
}
}
//===========================================================================
// Pre: nSrcAdjustment: for 160-color images, src is +1 compared to dst
static void CopySource(int w, int h, int sx, int sy, bgra_t *pVideoAddress, const int nSrcAdjustment = 0)
{
UINT32* pDst = (UINT32*) pVideoAddress;
LPBYTE pSrc = g_aSourceStartofLine[ sy ] + sx;
@ -496,15 +584,16 @@ static void CopySource(int w, int h, int sx, int sy, bgra_t *pVideoAddress)
while (nBytes)
{
--nBytes;
if (g_uHalfScanLines && !(h & 1))
if (IsVideoStyle(VS_HALF_SCANLINES) && !(h & 1))
{
// 50% Half Scan Line clears every odd scanline (and SHIFT+PrintScreen saves only the even rows)
*(pDst+nBytes) = 0;
}
else
{
_ASSERT( *(pSrc+nBytes) < (sizeof(PalIndex2RGB)/sizeof(PalIndex2RGB[0])) );
const RGBQUAD& rRGB = PalIndex2RGB[ *(pSrc+nBytes) ];
_ASSERT( *(pSrc+nBytes+nSrcAdjustment) < (sizeof(PalIndex2RGB)/sizeof(PalIndex2RGB[0])) );
const RGBQUAD& rRGB = PalIndex2RGB[ *(pSrc+nBytes+nSrcAdjustment) ];
const UINT32 rgb = (((UINT32)rRGB.rgbRed)<<16) | (((UINT32)rRGB.rgbGreen)<<8) | ((UINT32)rRGB.rgbBlue);
*(pDst+nBytes) = rgb;
}
@ -525,16 +614,15 @@ void UpdateHiResCell (int x, int y, uint16_t addr, bgra_t *pVideoAddress)
BYTE byteval3 = (x < 39) ? *(pMain+1) : 0;
#define COLOFFS (((byteval1 & 0x60) << 2) | ((byteval3 & 0x03) << 5))
#if 0
if (g_eVideoType == VT_COLOR_TVEMU)
if (IsVideoStyle(VS_COLOR_VERTICAL_BLEND))
{
CopyMixedSource(
xpixel >> 1, (ypixel+(yoffset >> 9)) >> 1,
SRCOFFS_HIRES+COLOFFS+((x & 1) << 4), (((int)byteval2) << 1)
x*7, y,
SRCOFFS_HIRES+COLOFFS+((x & 1) << 4), (((int)byteval2) << 1),
pVideoAddress
);
}
else
#endif
{
CopySource(14,2, SRCOFFS_HIRES+COLOFFS+((x & 1) << 4), (((int)byteval2) << 1), pVideoAddress);
}
@ -577,6 +665,68 @@ void UpdateDHiResCell (int x, int y, uint16_t addr, bgra_t *pVideoAddress, bool
#undef PIXEL
}
#if 1
// Squash the 640 pixel image into 560 pixels
int UpdateDHiRes160Cell (int x, int y, uint16_t addr, bgra_t *pVideoAddress)
{
const int xpixel = x*16;
uint8_t *pAux = MemGetAuxPtr(addr);
uint8_t *pMain = MemGetMainPtr(addr);
BYTE byteval1 = (x > 0) ? *(pMain-1) : 0;
BYTE byteval2 = *pAux;
BYTE byteval3 = *pMain;
BYTE byteval4 = (x < 39) ? *(pAux+1) : 0;
DWORD dwordval = (byteval1 & 0xF8) | ((byteval2 & 0xFF) << 8) |
((byteval3 & 0xFF) << 16) | ((byteval4 & 0x1F) << 24);
dwordval <<= 2;
#define PIXEL 0
CopySource(7,2, SRCOFFS_DHIRES+10*HIBYTE(VALUE)+COLOR, LOBYTE(VALUE)<<1, pVideoAddress, 1);
pVideoAddress += 7;
#undef PIXEL
#define PIXEL 8
CopySource(7,2, SRCOFFS_DHIRES+10*HIBYTE(VALUE)+COLOR, LOBYTE(VALUE)<<1, pVideoAddress, 1);
#undef PIXEL
return 7*2;
}
#else
// Left align the 640 pixel image, losing the right-hand 80 pixels
int UpdateDHiRes160Cell (int x, int y, uint16_t addr, bgra_t *pVideoAddress)
{
const int xpixel = x*16;
if (xpixel >= 560) // clip to our 560px display (losing 80 pixels)
return 0;
uint8_t *pAux = MemGetAuxPtr(addr);
uint8_t *pMain = MemGetMainPtr(addr);
BYTE byteval1 = (x > 0) ? *(pMain-1) : 0;
BYTE byteval2 = *pAux;
BYTE byteval3 = *pMain;
BYTE byteval4 = (x < 39) ? *(pAux+1) : 0;
DWORD dwordval = (byteval1 & 0xFC) | ((byteval2 & 0xFF) << 8) | // NB. Needs more bits than above squashed version, to avoid vertical black lines
((byteval3 & 0xFF) << 16) | ((byteval4 & 0x3F) << 24);
dwordval <<= 2;
#define PIXEL 0
CopySource(8,2, SRCOFFS_DHIRES+10*HIBYTE(VALUE)+COLOR, LOBYTE(VALUE)<<1, pVideoAddress);
pVideoAddress += 8;
#undef PIXEL
#define PIXEL 8
CopySource(8,2, SRCOFFS_DHIRES+10*HIBYTE(VALUE)+COLOR, LOBYTE(VALUE)<<1, pVideoAddress);
#undef PIXEL
return 8*2;
}
#endif
//===========================================================================
// Tested with Deater's Cycle-Counting Megademo
@ -636,13 +786,10 @@ static void V_CreateDIBSections(void)
ZeroMemory(g_pSourcePixels, SRCOFFS_TOTAL*MAX_SOURCE_Y); // 32 bytes/pixel * 16 colors = 512 bytes/row
V_CreateLookup_Lores();
// if ( g_eVideoType == VT_COLOR_TVEMU )
// V_CreateLookup_Hires();
// else
V_CreateLookup_HiResHalfPixel_Authentic(VT_COLOR_MONITOR_RGB);
V_CreateLookup_HiResHalfPixel_Authentic(VT_COLOR_MONITOR_RGB);
V_CreateLookup_DoubleHires();
CreateColorMixMap();
}
void VideoInitializeOriginal(baseColors_t pBaseNtscColors)
@ -650,19 +797,15 @@ void VideoInitializeOriginal(baseColors_t pBaseNtscColors)
// CREATE THE SOURCE IMAGE AND DRAW INTO THE SOURCE BIT BUFFER
V_CreateDIBSections();
#if 1
memcpy(&PalIndex2RGB[BLACK], *pBaseNtscColors, sizeof(RGBQUAD)*kNumBaseColors);
PalIndex2RGB[HGR_BLUE] = PalIndex2RGB[BLUE];
PalIndex2RGB[HGR_ORANGE] = PalIndex2RGB[ORANGE];
PalIndex2RGB[HGR_GREEN] = PalIndex2RGB[GREEN];
PalIndex2RGB[HGR_VIOLET] = PalIndex2RGB[MAGENTA];
#endif
}
//===========================================================================
#define DBG_SUPPORT_A2OSX
static UINT g_rgbFlags = 0;
static UINT g_rgbMode = 0;
static WORD g_rgbPrevAN3Addr = 0;
@ -676,7 +819,7 @@ void RGB_SetVideoMode(WORD address)
if ((address&~1) != 0x5E) // 0x5E or 0x5F?
return;
// Precondition before togglng AN3:
// Precondition before toggling AN3:
// . Video7 manual: set 80STORE, but "King's Quest 1"(*) will re-enable RGB card's MIX mode with only VF_TEXT & VF_HIRES set!
// . "Extended 80-Column Text/AppleColor Card" manual: TEXT off($C050), MIXED off($C052), HIRES on($C057)
// . (*) "King's Quest 1" - see routine at 0x5FD7 (trigger by pressing TAB twice)
@ -702,10 +845,10 @@ bool RGB_Is140Mode(void) // Extended 80-Column Text/AppleColor Card's Mode 2
return g_rgbMode == 0;
}
//bool RGB_Is160Mode(void) // Extended 80-Column Text/AppleColor Card: N/A
//{
// return g_rgbMode == 1;
//}
bool RGB_Is160Mode(void) // Extended 80-Column Text/AppleColor Card: N/A
{
return g_rgbMode == 1;
}
bool RGB_IsMixMode(void) // Extended 80-Column Text/AppleColor Card's Mode 3
{

View file

@ -1,5 +1,6 @@
void UpdateHiResCell(int x, int y, uint16_t addr, bgra_t *pVideoAddress);
void UpdateDHiResCell (int x, int y, uint16_t addr, bgra_t *pVideoAddress, bool updateAux, bool updateMain);
int UpdateDHiRes160Cell (int x, int y, uint16_t addr, bgra_t *pVideoAddress);
void UpdateLoResCell(int x, int y, uint16_t addr, bgra_t *pVideoAddress);
void UpdateDLoResCell(int x, int y, uint16_t addr, bgra_t *pVideoAddress);
@ -9,6 +10,7 @@ void VideoInitializeOriginal(baseColors_t pBaseNtscColors);
void RGB_SetVideoMode(WORD address);
bool RGB_Is140Mode(void);
bool RGB_Is160Mode(void);
bool RGB_IsMixMode(void);
bool RGB_Is560Mode(void);
void RGB_ResetState(void);

View file

@ -356,18 +356,20 @@ static void ParseUnit(void)
static void Snapshot_LoadState_v2(void)
{
bool restart = false; // Only need to restart if any VM state has change
try
{
int res = yamlHelper.InitParser( g_strSaveStatePathname.c_str() );
if (!res)
throw std::string("Failed to initialize parser or open file"); // TODO: disambiguate
if (!yamlHelper.InitParser( g_strSaveStatePathname.c_str() ))
throw std::string("Failed to initialize parser or open file");
UINT version = ParseFileHdr();
if (version != SS_FILE_VER)
if (ParseFileHdr() != SS_FILE_VER)
throw std::string("Version mismatch");
//
restart = true;
CConfigNeedingRestart ConfigOld;
//ConfigOld.m_Slot[0] = CT_LanguageCard; // fixme: II/II+=LC, //e=empty
ConfigOld.m_Slot[1] = CT_GenericPrinter; // fixme
@ -389,7 +391,7 @@ static void Snapshot_LoadState_v2(void)
HD_Reset();
KeybReset();
VideoResetState();
MB_Reset();
MB_InitializeForLoadingSnapshot(); // GH#609
sg_SSC.CommReset();
#ifdef USE_SPEECH_API
g_Speech.Reset();
@ -430,7 +432,8 @@ static void Snapshot_LoadState_v2(void)
TEXT("Load State"),
MB_ICONEXCLAMATION | MB_SETFOREGROUND);
PostMessage(g_hFrameWindow, WM_USER_RESTART, 0, 0); // Power-cycle VM (undoing all the new state just loaded)
if (restart)
PostMessage(g_hFrameWindow, WM_USER_RESTART, 0, 0); // Power-cycle VM (undoing all the new state just loaded)
}
yamlHelper.FinaliseParser();

View file

@ -419,7 +419,7 @@ void SoundCore_SetFade(eFADE FadeType)
if(g_nAppMode == MODE_DEBUG)
return;
// Fade in/out just for speaker, the others are demuted/muted
// Fade in/out for speaker, the others are demuted/muted here
if(FadeType != FADE_NONE)
{
for(UINT i=0; i<g_uNumVoices; i++)

View file

@ -89,7 +89,7 @@ COLORREF g_nMonochromeRGB = RGB(0xC0,0xC0,0xC0);
uint32_t g_uVideoMode = VF_TEXT; // Current Video Mode (this is the last set one as it may change mid-scan line!)
DWORD g_eVideoType = VT_DEFAULT;
DWORD g_uHalfScanLines = 1; // drop 50% scan lines for a more authentic look
static VideoStyle_e g_eVideoStyle = VS_HALF_SCANLINES;
static const bool g_bVideoScannerNTSC = true; // NTSC video scanning (or PAL)
@ -1211,11 +1211,28 @@ enum VideoType127_e
void Config_Load_Video()
{
REGLOAD(TEXT(REGVALUE_VIDEO_MODE ),&g_eVideoType);
REGLOAD(TEXT(REGVALUE_VIDEO_HALF_SCAN_LINES),&g_uHalfScanLines);
REGLOAD(TEXT(REGVALUE_VIDEO_MONO_COLOR ),&g_nMonochromeRGB);
REGLOAD(TEXT(REGVALUE_VIDEO_MODE) ,&g_eVideoType);
REGLOAD(TEXT(REGVALUE_VIDEO_STYLE) ,(DWORD*)&g_eVideoStyle);
REGLOAD(TEXT(REGVALUE_VIDEO_MONO_COLOR),&g_nMonochromeRGB);
//
const UINT16* pOldVersion = GetOldAppleWinVersion();
if (pOldVersion[0] == 1 && pOldVersion[1] <= 28 && pOldVersion[2] <= 1)
{
DWORD halfScanLines = 0;
REGLOAD(TEXT(REGVALUE_VIDEO_HALF_SCAN_LINES),&halfScanLines);
if (halfScanLines)
g_eVideoStyle = (VideoStyle_e) ((DWORD)g_eVideoStyle | VS_HALF_SCANLINES);
else
g_eVideoStyle = (VideoStyle_e) ((DWORD)g_eVideoStyle & ~VS_HALF_SCANLINES);
REGSAVE(TEXT(REGVALUE_VIDEO_STYLE), g_eVideoStyle);
}
//
if (pOldVersion[0] == 1 && pOldVersion[1] <= 27 && pOldVersion[2] <= 13)
{
switch (g_eVideoType)
@ -1229,6 +1246,8 @@ void Config_Load_Video()
case VT127_MONO_WHITE: g_eVideoType = VT_MONO_WHITE; break;
default: g_eVideoType = VT_DEFAULT; break;
}
REGSAVE(TEXT(REGVALUE_VIDEO_MODE), g_eVideoType);
}
if (g_eVideoType >= NUM_VIDEO_MODES)
@ -1237,9 +1256,37 @@ void Config_Load_Video()
void Config_Save_Video()
{
REGSAVE(TEXT(REGVALUE_VIDEO_MODE ),g_eVideoType);
REGSAVE(TEXT(REGVALUE_VIDEO_HALF_SCAN_LINES),g_uHalfScanLines);
REGSAVE(TEXT(REGVALUE_VIDEO_MONO_COLOR ),g_nMonochromeRGB);
REGSAVE(TEXT(REGVALUE_VIDEO_MODE) ,g_eVideoType);
REGSAVE(TEXT(REGVALUE_VIDEO_STYLE) ,g_eVideoStyle);
REGSAVE(TEXT(REGVALUE_VIDEO_MONO_COLOR),g_nMonochromeRGB);
}
//===========================================================================
VideoType_e GetVideoType(void)
{
return (VideoType_e) g_eVideoType;
}
// TODO: Can only do this at start-up (mid-emulation requires a more heavy-weight video reinit)
void SetVideoType(VideoType_e newVideoType)
{
g_eVideoType = newVideoType;
}
VideoStyle_e GetVideoStyle(void)
{
return g_eVideoStyle;
}
void SetVideoStyle(VideoStyle_e newVideoStyle)
{
g_eVideoStyle = newVideoStyle;
}
bool IsVideoStyle(VideoStyle_e mask)
{
return (g_eVideoStyle & mask) != 0;
}
//===========================================================================

View file

@ -21,6 +21,14 @@
extern TCHAR g_aVideoChoices[];
extern char *g_apVideoModeDesc[ NUM_VIDEO_MODES ];
enum VideoStyle_e
{
VS_NONE=0,
VS_HALF_SCANLINES=1, // drop 50% scan lines for a more authentic look
VS_COLOR_VERTICAL_BLEND=2, // Color "TV Emu" rendering from AppleWin 1.25 (GH#616)
// VS_TEXT_OPTIMIZED=4,
};
enum VideoFlag_e
{
VF_80COL = 0x00000001,
@ -156,7 +164,6 @@ struct WinBmpHeader4_t
extern COLORREF g_nMonochromeRGB; // saved to Registry
extern uint32_t g_uVideoMode;
extern DWORD g_eVideoType; // saved to Registry
extern DWORD g_uHalfScanLines; // saved to Registry
extern uint8_t *g_pFramebufferbits;
// Prototypes _______________________________________________________
@ -212,3 +219,9 @@ bool IsVideoRom4K(void);
void Config_Load_Video(void);
void Config_Save_Video(void);
VideoType_e GetVideoType(void);
void SetVideoType(VideoType_e newVideoType);
VideoStyle_e GetVideoStyle(void);
void SetVideoStyle(VideoStyle_e newVideoStyle);
bool IsVideoStyle(VideoStyle_e mask);

View file

@ -1,13 +1,13 @@
/* Emulador do computador TK3000 //e (Microdigital)
* por Fábio Belavenuto - Copyright (C) 2004
* por Fábio Belavenuto - Copyright (C) 2004
*
* Adaptado do emulador Applewin por Michael O'Brien
* Part of code is Copyright (C) 2003-2004 Tom Charlesworth
*
* Este arquivo é distribuido pela Licença Pública Geral GNU.
* Este arquivo é distribuido pela Licença Pública Geral GNU.
* Veja o arquivo Licenca.txt distribuido com este software.
*
* ESTE SOFTWARE NÃO OFERECE NENHUMA GARANTIA
* ESTE SOFTWARE NÃO OFERECE NENHUMA GARANTIA
*
*/

View file

@ -1,18 +1,18 @@
/* Emulador do computador TK3000 //e (Microdigital)
* por Fábio Belavenuto - Copyright (C) 2004
* por Fábio Belavenuto - Copyright (C) 2004
*
* Adaptado do emulador Applewin por Michael O'Brien
*
* Este arquivo é distribuido pela Licença Pública Geral GNU.
* Este arquivo é distribuido pela Licença Pública Geral GNU.
* Veja o arquivo Licenca.txt distribuido com este software.
*
* ESTE SOFTWARE NÃO OFERECE NENHUMA GARANTIA
* ESTE SOFTWARE NÃO OFERECE NENHUMA GARANTIA
*
*/
// Emula a CPU Z80
// Protótipos
// Protótipos
void ConfigureSoftcard(LPBYTE pCxRomPeripheral, UINT uSlot);
// NB. These are in z80.cpp: