This commit is contained in:
michaelangel007 2019-04-13 10:22:42 -07:00
commit c0d442dc76
102 changed files with 5399 additions and 4445 deletions

1
.gitignore vendored
View File

@ -159,6 +159,7 @@ ClientBin/
*.pfx
*.publishsettings
node_modules/
.vs/
# RIA/Silverlight projects
Generated_Code/

View File

@ -6,6 +6,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Applewin", "AppleWinExpress
{5CE8051A-3F0C-4C39-B1C0-3338E48BA60F} = {5CE8051A-3F0C-4C39-B1C0-3338E48BA60F}
{7935B998-C713-42AE-8F6D-9FF9080A1B1B} = {7935B998-C713-42AE-8F6D-9FF9080A1B1B}
{2CC8CA9F-E37E-41A4-BFAD-77E54EB783A2} = {2CC8CA9F-E37E-41A4-BFAD-77E54EB783A2}
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A} = {AA5854AD-2BC7-4EFD-9790-349ADB35E35A}
{709278B8-C583-4BD8-90DE-4E4F35A3BD8B} = {709278B8-C583-4BD8-90DE-4E4F35A3BD8B}
{0AE28CF0-15B0-4DDF-B6D2-4562D8E456BB} = {0AE28CF0-15B0-4DDF-B6D2-4562D8E456BB}
EndProjectSection
@ -20,6 +21,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml", "libyaml\win32\yaml2
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestDebugger", "test\TestDebugger\TestDebugger.vcproj", "{0AE28CF0-15B0-4DDF-B6D2-4562D8E456BB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HookFilter", "HookFilter\HookFilter.vcproj", "{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -50,6 +53,10 @@ Global
{0AE28CF0-15B0-4DDF-B6D2-4562D8E456BB}.Debug|Win32.Build.0 = Debug|Win32
{0AE28CF0-15B0-4DDF-B6D2-4562D8E456BB}.Release|Win32.ActiveCfg = Release|Win32
{0AE28CF0-15B0-4DDF-B6D2-4562D8E456BB}.Release|Win32.Build.0 = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug|Win32.ActiveCfg = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug|Win32.Build.0 = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release|Win32.ActiveCfg = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -625,6 +625,14 @@
RelativePath=".\source\Keyboard.h"
>
</File>
<File
RelativePath=".\source\LanguageCard.cpp"
>
</File>
<File
RelativePath=".\source\LanguageCard.h"
>
</File>
<File
RelativePath=".\source\Log.cpp"
>
@ -897,6 +905,14 @@
RelativePath=".\source\NTSC_CharSet.h"
>
</File>
<File
RelativePath=".\source\RGBMonitor.cpp"
>
</File>
<File
RelativePath=".\source\RGBMonitor.h"
>
</File>
<File
RelativePath=".\source\Video.cpp"
>
@ -1277,6 +1293,10 @@
RelativePath=".\resource\TKClock.rom"
>
</File>
<File
RelativePath=".\resource\version.h"
>
</File>
<File
RelativePath=".\resource\winres.h"
>

View File

@ -1,50 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2012 for Windows Desktop
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppleWin", "AppleWinExpress2012.vcxproj", "{0A960136-A00A-4D4B-805F-664D9950D2CA}"
ProjectSection(ProjectDependencies) = postProject
{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D} = {509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}
{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E} = {9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zip_lib", "zip_lib\zip_lib2012.vcxproj", "{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib-Express2012.vcxproj", "{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug NoDX|Win32 = Debug NoDX|Win32
Debug|Win32 = Debug|Win32
Release NoDX|Win32 = Release NoDX|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0A960136-A00A-4D4B-805F-664D9950D2CA}.Debug NoDX|Win32.ActiveCfg = Debug NoDX|Win32
{0A960136-A00A-4D4B-805F-664D9950D2CA}.Debug NoDX|Win32.Build.0 = Debug NoDX|Win32
{0A960136-A00A-4D4B-805F-664D9950D2CA}.Debug|Win32.ActiveCfg = Debug|Win32
{0A960136-A00A-4D4B-805F-664D9950D2CA}.Debug|Win32.Build.0 = Debug|Win32
{0A960136-A00A-4D4B-805F-664D9950D2CA}.Release NoDX|Win32.ActiveCfg = Release NoDX|Win32
{0A960136-A00A-4D4B-805F-664D9950D2CA}.Release NoDX|Win32.Build.0 = Release NoDX|Win32
{0A960136-A00A-4D4B-805F-664D9950D2CA}.Release|Win32.ActiveCfg = Release|Win32
{0A960136-A00A-4D4B-805F-664D9950D2CA}.Release|Win32.Build.0 = Release|Win32
{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}.Debug NoDX|Win32.ActiveCfg = Debug|Win32
{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}.Debug NoDX|Win32.Build.0 = Debug|Win32
{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}.Debug|Win32.ActiveCfg = Debug|Win32
{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}.Debug|Win32.Build.0 = Debug|Win32
{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}.Release NoDX|Win32.ActiveCfg = Release|Win32
{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}.Release NoDX|Win32.Build.0 = Release|Win32
{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}.Release|Win32.ActiveCfg = Release|Win32
{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}.Release|Win32.Build.0 = Release|Win32
{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}.Debug NoDX|Win32.ActiveCfg = Debug|Win32
{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}.Debug NoDX|Win32.Build.0 = Debug|Win32
{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}.Debug|Win32.ActiveCfg = Debug|Win32
{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}.Debug|Win32.Build.0 = Debug|Win32
{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}.Release NoDX|Win32.ActiveCfg = Release|Win32
{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}.Release NoDX|Win32.Build.0 = Release|Win32
{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}.Release|Win32.ActiveCfg = Release|Win32
{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,424 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug NoDX|Win32">
<Configuration>Debug NoDX</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release NoDX|Win32">
<Configuration>Release NoDX</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource\resource.h" />
<ClInclude Include="resource\winres.h" />
<ClInclude Include="source\6821.h" />
<ClInclude Include="source\Applewin.h" />
<ClInclude Include="source\AY8910.h" />
<ClInclude Include="source\Common.h" />
<ClInclude Include="source\CommonVICE\6510core.h" />
<ClInclude Include="source\CommonVICE\alarm.h" />
<ClInclude Include="source\CommonVICE\interrupt.h" />
<ClInclude Include="source\CommonVICE\mem.h" />
<ClInclude Include="source\CommonVICE\types.h" />
<ClInclude Include="source\Configuration\About.h" />
<ClInclude Include="source\Configuration\Config.h" />
<ClInclude Include="source\Configuration\IPropertySheet.h" />
<ClInclude Include="source\Configuration\IPropertySheetPage.h" />
<ClInclude Include="source\Configuration\PageAdvanced.h" />
<ClInclude Include="source\Configuration\PageConfig.h" />
<ClInclude Include="source\Configuration\PageConfigTfe.h" />
<ClInclude Include="source\Configuration\PageDisk.h" />
<ClInclude Include="source\Configuration\PageInput.h" />
<ClInclude Include="source\Configuration\PageSound.h" />
<ClInclude Include="source\Configuration\PropertySheet.h" />
<ClInclude Include="source\Configuration\PropertySheetDefs.h" />
<ClInclude Include="source\Configuration\PropertySheetHelper.h" />
<ClInclude Include="source\CPU.h" />
<ClInclude Include="source\CPU\cpu6502.h" />
<ClInclude Include="source\CPU\cpu65C02.h" />
<ClInclude Include="source\CPU\cpu65d02.h" />
<ClInclude Include="source\Debugger\Debug.h" />
<ClInclude Include="source\Debugger\DebugDefs.h" />
<ClInclude Include="source\Debugger\Debugger_Assembler.h" />
<ClInclude Include="source\Debugger\Debugger_Color.h" />
<ClInclude Include="source\Debugger\Debugger_Console.h" />
<ClInclude Include="source\Debugger\Debugger_DisassemblerData.h" />
<ClInclude Include="source\Debugger\Debugger_Display.h" />
<ClInclude Include="source\Debugger\Debugger_Help.h" />
<ClInclude Include="source\Debugger\Debugger_Parser.h" />
<ClInclude Include="source\Debugger\Debugger_Range.h" />
<ClInclude Include="source\Debugger\Debugger_Symbols.h" />
<ClInclude Include="source\Debugger\Debugger_Types.h" />
<ClInclude Include="source\Debugger\Util_MemoryTextFile.h" />
<ClInclude Include="source\Debugger\Util_Text.h" />
<ClInclude Include="source\Disk.h" />
<ClInclude Include="source\DiskDefs.h" />
<ClInclude Include="source\DiskImage.h" />
<ClInclude Include="source\DiskImageHelper.h" />
<ClInclude Include="source\Frame.h" />
<ClInclude Include="source\Harddisk.h" />
<ClInclude Include="source\Joystick.h" />
<ClInclude Include="source\Keyboard.h" />
<ClInclude Include="source\Log.h" />
<ClInclude Include="source\Memory.h" />
<ClInclude Include="source\Mockingboard.h" />
<ClInclude Include="source\MouseInterface.h" />
<ClInclude Include="source\NoSlotClock.h" />
<ClInclude Include="source\ParallelPrinter.h" />
<ClInclude Include="source\Pravets.h" />
<ClInclude Include="source\Registry.h" />
<ClInclude Include="source\Riff.h" />
<ClInclude Include="source\SaveState.h" />
<ClInclude Include="source\SerialComms.h" />
<ClInclude Include="source\SoundCore.h" />
<ClInclude Include="source\Speaker.h" />
<ClInclude Include="source\Speech.h" />
<ClInclude Include="source\SSI263Phonemes.h" />
<ClInclude Include="source\StdAfx.h" />
<ClInclude Include="source\Structs.h" />
<ClInclude Include="source\Tape.h" />
<ClInclude Include="source\Tfe\Bittypes.h" />
<ClInclude Include="source\Tfe\Bpf.h" />
<ClInclude Include="source\Tfe\Ip6_misc.h" />
<ClInclude Include="source\Tfe\Pcap-stdinc.h" />
<ClInclude Include="source\Tfe\Pcap.h" />
<ClInclude Include="source\Tfe\Tfe.h" />
<ClInclude Include="source\Tfe\Tfearch.h" />
<ClInclude Include="source\Tfe\Tfesupp.h" />
<ClInclude Include="source\Tfe\Uilib.h" />
<ClInclude Include="source\Video.h" />
<ClInclude Include="source\z80emu.h" />
<ClInclude Include="source\Z80VICE\daa.h" />
<ClInclude Include="source\Z80VICE\z80.h" />
<ClInclude Include="source\Z80VICE\z80mem.h" />
<ClInclude Include="source\Z80VICE\z80regs.h" />
</ItemGroup>
<ItemGroup>
<Text Include="docs\CodingConventions.txt" />
<Text Include="docs\Debugger_Changelog.txt" />
<Text Include="docs\FAQ.txt" />
<Text Include="bin\History.txt" />
<Text Include="docs\ToDo.txt" />
<Text Include="docs\Video_Cleanup.txt" />
<Text Include="docs\Wishlist.txt" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="source\6821.cpp" />
<ClCompile Include="source\Applewin.cpp" />
<ClCompile Include="source\AY8910.cpp" />
<ClCompile Include="source\Configuration\About.cpp" />
<ClCompile Include="source\Configuration\PageAdvanced.cpp" />
<ClCompile Include="source\Configuration\PageConfig.cpp" />
<ClCompile Include="source\Configuration\PageConfigTfe.cpp" />
<ClCompile Include="source\Configuration\PageDisk.cpp" />
<ClCompile Include="source\Configuration\PageInput.cpp" />
<ClCompile Include="source\Configuration\PageSound.cpp" />
<ClCompile Include="source\Configuration\PropertySheet.cpp" />
<ClCompile Include="source\Configuration\PropertySheetHelper.cpp" />
<ClCompile Include="source\CPU.cpp" />
<ClCompile Include="source\Debugger\Debug.cpp" />
<ClCompile Include="source\Debugger\Debugger_Assembler.cpp" />
<ClCompile Include="source\Debugger\Debugger_Color.cpp" />
<ClCompile Include="source\Debugger\Debugger_Commands.cpp" />
<ClCompile Include="source\Debugger\Debugger_Console.cpp" />
<ClCompile Include="source\Debugger\Debugger_DisassemblerData.cpp" />
<ClCompile Include="source\Debugger\Debugger_Display.cpp" />
<ClCompile Include="source\Debugger\Debugger_Help.cpp" />
<ClCompile Include="source\Debugger\Debugger_Parser.cpp" />
<ClCompile Include="source\Debugger\Debugger_Range.cpp" />
<ClCompile Include="source\Debugger\Debugger_Symbols.cpp" />
<ClCompile Include="source\Debugger\Util_MemoryTextFile.cpp" />
<ClCompile Include="source\Disk.cpp" />
<ClCompile Include="source\DiskImage.cpp" />
<ClCompile Include="source\DiskImageHelper.cpp" />
<ClCompile Include="source\Frame.cpp" />
<ClCompile Include="source\Harddisk.cpp" />
<ClCompile Include="source\Joystick.cpp" />
<ClCompile Include="source\Keyboard.cpp" />
<ClCompile Include="source\Log.cpp" />
<ClCompile Include="source\Memory.cpp" />
<ClCompile Include="source\Mockingboard.cpp" />
<ClCompile Include="source\MouseInterface.cpp" />
<ClCompile Include="source\NoSlotClock.cpp" />
<ClCompile Include="source\ParallelPrinter.cpp" />
<ClCompile Include="source\Pravets.cpp" />
<ClCompile Include="source\Registry.cpp" />
<ClCompile Include="source\Riff.cpp" />
<ClCompile Include="source\SaveState.cpp" />
<ClCompile Include="source\SerialComms.cpp" />
<ClCompile Include="source\SoundCore.cpp" />
<ClCompile Include="source\Speaker.cpp" />
<ClCompile Include="source\Speech.cpp" />
<ClCompile Include="source\StdAfx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="source\Tape.cpp" />
<ClCompile Include="source\Tfe\Tfe.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="source\Tfe\Tfearch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="source\Tfe\Tfesupp.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="source\Tfe\Uilib.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="source\Video.cpp" />
<ClCompile Include="source\z80emu.cpp" />
<ClCompile Include="source\Z80VICE\daa.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="source\Z80VICE\z80.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="source\Z80VICE\z80mem.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="resource\Apple2.rom" />
<None Include="resource\Apple2e.rom" />
<None Include="resource\Apple2e_Enhanced.rom" />
<None Include="resource\Apple2_Plus.rom" />
<None Include="resource\DISK2.rom" />
<None Include="resource\Freezes_Non-autostart_F8_Rom.rom" />
<None Include="resource\Hddrvr.bin" />
<None Include="resource\Mockingboard-D.rom" />
<None Include="resource\MouseInterface.rom" />
<None Include="resource\Parallel.rom" />
<None Include="resource\PRAVETS82.ROM" />
<None Include="resource\PRAVETS8C.ROM" />
<None Include="resource\PRAVETS8M.ROM" />
<None Include="resource\SSC.rom" />
<None Include="resource\ThunderClockPlus.rom" />
<None Include="source\CPU\cpu_general.inl" />
<None Include="source\CPU\cpu_instructions.inl" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="zip_lib\zip_lib2012.vcxproj">
<Project>{509739e7-0af3-4c09-a1a9-f0b1bc31b39d}</Project>
</ProjectReference>
<ProjectReference Include="zlib\zlib-Express2012.vcxproj">
<Project>{9b32a6e7-1237-4f36-8903-a3fd51df9c4e}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Image Include="resource\Applewin.bmp" />
<Image Include="resource\APPLEWIN.ICO" />
<Image Include="resource\CAPSOFF.BMP" />
<Image Include="resource\CAPSOFF_P8.BMP" />
<Image Include="resource\CAPSON.BMP" />
<Image Include="resource\CAPSON_P8.BMP" />
<Image Include="resource\CHARSET4.BMP" />
<Image Include="resource\CHARSET82.bmp" />
<Image Include="resource\CHARSET8C.bmp" />
<Image Include="resource\CHARSET8M.bmp" />
<Image Include="resource\COLOR.BMP" />
<Image Include="resource\DEBUG.BMP" />
<Image Include="resource\Debug_Font.bmp" />
<Image Include="resource\DISK.ICO" />
<Image Include="resource\DISKOFF.BMP" />
<Image Include="resource\DISKPROT.BMP" />
<Image Include="resource\DISKREAD.BMP" />
<Image Include="resource\DISKWRIT.BMP" />
<Image Include="resource\DRIVE1.BMP" />
<Image Include="resource\DRIVE2.BMP" />
<Image Include="resource\DriveSwap.bmp" />
<Image Include="resource\FULLSCR.BMP" />
<Image Include="resource\HELP.BMP" />
<Image Include="resource\LATOFF.BMP" />
<Image Include="resource\LATON.BMP" />
<Image Include="resource\LED_CAPS_OFF.BMP" />
<Image Include="resource\LED_CAPS_OFF_LAT.BMP" />
<Image Include="resource\LED_CAPS_OFF_P8.BMP" />
<Image Include="resource\LED_CAPS_ON.BMP" />
<Image Include="resource\LED_CAPS_ON_LAT.BMP" />
<Image Include="resource\LED_CAPS_ON_P8.BMP" />
<Image Include="resource\RUN.BMP" />
<Image Include="resource\RUNP.BMP" />
<Image Include="resource\SETUP.BMP" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="resource\Applewin.rc" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{0A960136-A00A-4D4B-805F-664D9950D2CA}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>AppleWinExpress2012</RootNamespace>
<ProjectName>AppleWin</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source\cpu;source\emulator;source\debugger;zlib;zip_lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;ddraw.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>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;NO_DIRECT_X;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source\cpu;source\emulator;source\debugger;zlib;zip_lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;ddraw.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>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source\cpu;source\emulator;source\debugger;zlib;zip_lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;ddraw.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>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;NO_DIRECT_X;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source\cpu;source\emulator;source\debugger;zlib;zip_lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>htmlhelp.lib;comctl32.lib;ddraw.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>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,659 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Docs">
<UniqueIdentifier>{a9a09086-bbce-46ea-8b29-f18a8df8732b}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\CommonVICE">
<UniqueIdentifier>{d1228537-59c3-4a6c-92fd-d7ba9d4efab7}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Configuration">
<UniqueIdentifier>{d614ba59-527b-4acb-842e-7b61ca7f694f}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\CPU">
<UniqueIdentifier>{2e94f8a1-5598-4bed-8365-add09bca1f56}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Debugger">
<UniqueIdentifier>{71ec7de0-6ba1-4de1-9bc8-bdc3597e62cd}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Disk">
<UniqueIdentifier>{2c27fcf6-cf59-4359-9e15-2de64af1a94f}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Emulator">
<UniqueIdentifier>{9b13bfc1-31ab-4f55-bb69-b8620ebdc2be}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Model">
<UniqueIdentifier>{15b450e4-f89f-4d80-9c44-48b32f33f3e3}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Uthernet">
<UniqueIdentifier>{9bcc8097-f610-4843-bd76-a313aa54fbb0}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Video">
<UniqueIdentifier>{f688ce36-1417-440c-b844-f2180a0017a9}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Z80VICE">
<UniqueIdentifier>{4cecf5fc-1fe3-425f-907a-b62a6d046d45}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\_Headers">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="source\Common.h">
<Filter>Source Files\_Headers</Filter>
</ClInclude>
<ClInclude Include="source\SSI263Phonemes.h">
<Filter>Source Files\_Headers</Filter>
</ClInclude>
<ClInclude Include="source\Structs.h">
<Filter>Source Files\_Headers</Filter>
</ClInclude>
<ClInclude Include="resource\resource.h">
<Filter>Source Files\_Headers</Filter>
</ClInclude>
<ClInclude Include="source\Applewin.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="source\StdAfx.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="source\CommonVICE\6510core.h">
<Filter>Source Files\CommonVICE</Filter>
</ClInclude>
<ClInclude Include="source\CommonVICE\alarm.h">
<Filter>Source Files\CommonVICE</Filter>
</ClInclude>
<ClInclude Include="source\CommonVICE\interrupt.h">
<Filter>Source Files\CommonVICE</Filter>
</ClInclude>
<ClInclude Include="source\CommonVICE\mem.h">
<Filter>Source Files\CommonVICE</Filter>
</ClInclude>
<ClInclude Include="source\CommonVICE\types.h">
<Filter>Source Files\CommonVICE</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\About.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\Config.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\IPropertySheet.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\IPropertySheetPage.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\PageAdvanced.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\PageConfig.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\PageConfigTfe.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\PageDisk.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\PageInput.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\PageSound.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\PropertySheet.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\PropertySheetDefs.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\Configuration\PropertySheetHelper.h">
<Filter>Source Files\Configuration</Filter>
</ClInclude>
<ClInclude Include="source\CPU\cpu65C02.h">
<Filter>Source Files\CPU</Filter>
</ClInclude>
<ClInclude Include="source\CPU\cpu65d02.h">
<Filter>Source Files\CPU</Filter>
</ClInclude>
<ClInclude Include="source\CPU\cpu6502.h">
<Filter>Source Files\CPU</Filter>
</ClInclude>
<ClInclude Include="source\CPU.h">
<Filter>Source Files\CPU</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Debug.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Debugger_Assembler.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Debugger_Color.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Debugger_Console.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Debugger_DisassemblerData.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Debugger_Display.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Debugger_Help.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Debugger_Parser.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Debugger_Range.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Debugger_Symbols.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Debugger_Types.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Util_MemoryTextFile.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Disk.h">
<Filter>Source Files\Disk</Filter>
</ClInclude>
<ClInclude Include="source\DiskImage.h">
<Filter>Source Files\Disk</Filter>
</ClInclude>
<ClInclude Include="source\DiskImageHelper.h">
<Filter>Source Files\Disk</Filter>
</ClInclude>
<ClInclude Include="source\Harddisk.h">
<Filter>Source Files\Disk</Filter>
</ClInclude>
<ClInclude Include="source\6821.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\AY8910.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Joystick.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Keyboard.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Log.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Memory.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Mockingboard.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\MouseInterface.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\NoSlotClock.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\ParallelPrinter.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Registry.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Riff.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\SaveState.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\SerialComms.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\SoundCore.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Speaker.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Speech.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Tape.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\z80emu.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Z80VICE\daa.h">
<Filter>Source Files\Z80VICE</Filter>
</ClInclude>
<ClInclude Include="source\Z80VICE\z80.h">
<Filter>Source Files\Z80VICE</Filter>
</ClInclude>
<ClInclude Include="source\Z80VICE\z80mem.h">
<Filter>Source Files\Z80VICE</Filter>
</ClInclude>
<ClInclude Include="source\Z80VICE\z80regs.h">
<Filter>Source Files\Z80VICE</Filter>
</ClInclude>
<ClInclude Include="source\Frame.h">
<Filter>Source Files\Video</Filter>
</ClInclude>
<ClInclude Include="source\Video.h">
<Filter>Source Files\Video</Filter>
</ClInclude>
<ClInclude Include="source\Tfe\Bittypes.h">
<Filter>Source Files\Uthernet</Filter>
</ClInclude>
<ClInclude Include="source\Tfe\Bpf.h">
<Filter>Source Files\Uthernet</Filter>
</ClInclude>
<ClInclude Include="source\Tfe\Ip6_misc.h">
<Filter>Source Files\Uthernet</Filter>
</ClInclude>
<ClInclude Include="source\Tfe\Pcap.h">
<Filter>Source Files\Uthernet</Filter>
</ClInclude>
<ClInclude Include="source\Tfe\Pcap-stdinc.h">
<Filter>Source Files\Uthernet</Filter>
</ClInclude>
<ClInclude Include="source\Tfe\Tfe.h">
<Filter>Source Files\Uthernet</Filter>
</ClInclude>
<ClInclude Include="source\Tfe\Tfearch.h">
<Filter>Source Files\Uthernet</Filter>
</ClInclude>
<ClInclude Include="source\Tfe\Tfesupp.h">
<Filter>Source Files\Uthernet</Filter>
</ClInclude>
<ClInclude Include="source\Tfe\Uilib.h">
<Filter>Source Files\Uthernet</Filter>
</ClInclude>
<ClInclude Include="resource\winres.h">
<Filter>Resource Files</Filter>
</ClInclude>
<ClInclude Include="source\DiskDefs.h">
<Filter>Source Files\Disk</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\DebugDefs.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Debugger\Util_Text.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Pravets.h">
<Filter>Source Files\Model</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="docs\CodingConventions.txt">
<Filter>Docs</Filter>
</Text>
<Text Include="docs\Debugger_Changelog.txt">
<Filter>Docs</Filter>
</Text>
<Text Include="docs\FAQ.txt">
<Filter>Docs</Filter>
</Text>
<Text Include="bin\History.txt">
<Filter>Docs</Filter>
</Text>
<Text Include="docs\ToDo.txt">
<Filter>Docs</Filter>
</Text>
<Text Include="docs\Video_Cleanup.txt">
<Filter>Docs</Filter>
</Text>
<Text Include="docs\Wishlist.txt">
<Filter>Docs</Filter>
</Text>
</ItemGroup>
<ItemGroup>
<ClCompile Include="source\Applewin.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\StdAfx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\Configuration\About.cpp">
<Filter>Source Files\Configuration</Filter>
</ClCompile>
<ClCompile Include="source\Configuration\PageAdvanced.cpp">
<Filter>Source Files\Configuration</Filter>
</ClCompile>
<ClCompile Include="source\Configuration\PageConfig.cpp">
<Filter>Source Files\Configuration</Filter>
</ClCompile>
<ClCompile Include="source\Configuration\PageConfigTfe.cpp">
<Filter>Source Files\Configuration</Filter>
</ClCompile>
<ClCompile Include="source\Configuration\PageDisk.cpp">
<Filter>Source Files\Configuration</Filter>
</ClCompile>
<ClCompile Include="source\Configuration\PageInput.cpp">
<Filter>Source Files\Configuration</Filter>
</ClCompile>
<ClCompile Include="source\Configuration\PageSound.cpp">
<Filter>Source Files\Configuration</Filter>
</ClCompile>
<ClCompile Include="source\Configuration\PropertySheet.cpp">
<Filter>Source Files\Configuration</Filter>
</ClCompile>
<ClCompile Include="source\Configuration\PropertySheetHelper.cpp">
<Filter>Source Files\Configuration</Filter>
</ClCompile>
<ClCompile Include="source\CPU.cpp">
<Filter>Source Files\CPU</Filter>
</ClCompile>
<ClCompile Include="source\Debugger\Debug.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Debugger\Debugger_Assembler.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Debugger\Debugger_Color.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Debugger\Debugger_Commands.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Debugger\Debugger_Console.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Debugger\Debugger_DisassemblerData.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Debugger\Debugger_Display.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Debugger\Debugger_Help.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Debugger\Debugger_Parser.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Debugger\Debugger_Range.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Debugger\Debugger_Symbols.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Debugger\Util_MemoryTextFile.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Disk.cpp">
<Filter>Source Files\Disk</Filter>
</ClCompile>
<ClCompile Include="source\DiskImage.cpp">
<Filter>Source Files\Disk</Filter>
</ClCompile>
<ClCompile Include="source\DiskImageHelper.cpp">
<Filter>Source Files\Disk</Filter>
</ClCompile>
<ClCompile Include="source\Harddisk.cpp">
<Filter>Source Files\Disk</Filter>
</ClCompile>
<ClCompile Include="source\6821.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\AY8910.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Joystick.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Keyboard.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Log.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Memory.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Mockingboard.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\MouseInterface.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\NoSlotClock.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\ParallelPrinter.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Registry.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Riff.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\SaveState.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\SerialComms.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\SoundCore.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Speaker.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Speech.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Tape.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\z80emu.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Z80VICE\daa.cpp">
<Filter>Source Files\Z80VICE</Filter>
</ClCompile>
<ClCompile Include="source\Z80VICE\z80.cpp">
<Filter>Source Files\Z80VICE</Filter>
</ClCompile>
<ClCompile Include="source\Z80VICE\z80mem.cpp">
<Filter>Source Files\Z80VICE</Filter>
</ClCompile>
<ClCompile Include="source\Frame.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
<ClCompile Include="source\Video.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
<ClCompile Include="source\Tfe\Tfe.cpp">
<Filter>Source Files\Uthernet</Filter>
</ClCompile>
<ClCompile Include="source\Tfe\Tfearch.cpp">
<Filter>Source Files\Uthernet</Filter>
</ClCompile>
<ClCompile Include="source\Tfe\Tfesupp.cpp">
<Filter>Source Files\Uthernet</Filter>
</ClCompile>
<ClCompile Include="source\Tfe\Uilib.cpp">
<Filter>Source Files\Uthernet</Filter>
</ClCompile>
<ClCompile Include="source\Pravets.cpp">
<Filter>Source Files\Model</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="source\CPU\cpu_general.inl">
<Filter>Source Files\CPU</Filter>
</None>
<None Include="source\CPU\cpu_instructions.inl">
<Filter>Source Files\CPU</Filter>
</None>
<None Include="resource\Apple2.rom">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\Apple2_Plus.rom">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\Apple2e.rom">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\Apple2e_Enhanced.rom">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\DISK2.rom">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\Freezes_Non-autostart_F8_Rom.rom">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\Hddrvr.bin">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\Mockingboard-D.rom">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\MouseInterface.rom">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\Parallel.rom">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\PRAVETS8C.ROM">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\PRAVETS8M.ROM">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\PRAVETS82.ROM">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\SSC.rom">
<Filter>Resource Files</Filter>
</None>
<None Include="resource\ThunderClockPlus.rom">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Image Include="resource\Applewin.bmp">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\APPLEWIN.ICO">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\CAPSOFF.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\CAPSOFF_P8.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\CAPSON.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\CAPSON_P8.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\CHARSET4.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\CHARSET8C.bmp">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\CHARSET8M.bmp">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\CHARSET82.bmp">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\COLOR.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\DEBUG.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\Debug_Font.bmp">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\DISK.ICO">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\DISKOFF.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\DISKPROT.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\DISKREAD.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\DISKWRIT.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\DRIVE1.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\DRIVE2.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\DriveSwap.bmp">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\FULLSCR.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\HELP.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\LATOFF.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\LATON.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\LED_CAPS_OFF.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\LED_CAPS_OFF_LAT.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\LED_CAPS_OFF_P8.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\LED_CAPS_ON.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\LED_CAPS_ON_LAT.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\LED_CAPS_ON_P8.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\RUN.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\RUNP.BMP">
<Filter>Resource Files</Filter>
</Image>
<Image Include="resource\SETUP.BMP">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="resource\Applewin.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

View File

@ -1,10 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio Express 2013 for Windows Desktop
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppleWin", "AppleWinExpress2013.vcxproj", "{0A960136-A00A-4D4B-805F-664D9950D2CA}"
ProjectSection(ProjectDependencies) = postProject
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A} = {AA5854AD-2BC7-4EFD-9790-349ADB35E35A}
{CF5A49BF-62A5-41BB-B10C-F34D556A7A45} = {CF5A49BF-62A5-41BB-B10C-F34D556A7A45}
{0212E0DF-06DA-4080-BD1D-F3B01599F70F} = {0212E0DF-06DA-4080-BD1D-F3B01599F70F}
{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D} = {509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}
@ -19,6 +20,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml", "libyaml\win32\yaml2
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCPU6502", "test\TestCPU6502\TestCPU6502-vs2013.vcxproj", "{CF5A49BF-62A5-41BB-B10C-F34D556A7A45}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HookFilter", "HookFilter\HookFilter-vs2013.vcxproj", "{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug NoDX|Win32 = Debug NoDX|Win32
@ -67,6 +70,14 @@ Global
{CF5A49BF-62A5-41BB-B10C-F34D556A7A45}.Release NoDX|Win32.Build.0 = Release|Win32
{CF5A49BF-62A5-41BB-B10C-F34D556A7A45}.Release|Win32.ActiveCfg = Release|Win32
{CF5A49BF-62A5-41BB-B10C-F34D556A7A45}.Release|Win32.Build.0 = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug NoDX|Win32.ActiveCfg = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug NoDX|Win32.Build.0 = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug|Win32.ActiveCfg = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug|Win32.Build.0 = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release NoDX|Win32.ActiveCfg = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release NoDX|Win32.Build.0 = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release|Win32.ActiveCfg = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -71,6 +71,7 @@
<ClInclude Include="source\Harddisk.h" />
<ClInclude Include="source\Joystick.h" />
<ClInclude Include="source\Keyboard.h" />
<ClInclude Include="source\LanguageCard.h" />
<ClInclude Include="source\Log.h" />
<ClInclude Include="source\Memory.h" />
<ClInclude Include="source\Mockingboard.h" />
@ -81,6 +82,7 @@
<ClInclude Include="source\ParallelPrinter.h" />
<ClInclude Include="source\Pravets.h" />
<ClInclude Include="source\Registry.h" />
<ClInclude Include="source\RGBMonitor.h" />
<ClInclude Include="source\Riff.h" />
<ClInclude Include="source\SAM.h" />
<ClInclude Include="source\SaveState.h" />
@ -133,6 +135,7 @@
<ClCompile Include="source\Configuration\PropertySheet.cpp" />
<ClCompile Include="source\Configuration\PropertySheetHelper.cpp" />
<ClCompile Include="source\CPU.cpp" />
<ClCompile Include="source\RGBMonitor.cpp" />
<ClCompile Include="source\SAM.cpp" />
<ClCompile Include="source\Debugger\Debug.cpp" />
<ClCompile Include="source\Debugger\Debugger_Assembler.cpp" />
@ -154,6 +157,7 @@
<ClCompile Include="source\Harddisk.cpp" />
<ClCompile Include="source\Joystick.cpp" />
<ClCompile Include="source\Keyboard.cpp" />
<ClCompile Include="source\LanguageCard.cpp" />
<ClCompile Include="source\Log.cpp" />
<ClCompile Include="source\Memory.cpp" />
<ClCompile Include="source\Mockingboard.cpp" />
@ -370,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
@ -394,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
@ -424,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
@ -454,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

@ -76,6 +76,9 @@
<ClCompile Include="source\Keyboard.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\LanguageCard.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Log.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
@ -187,6 +190,9 @@
<ClCompile Include="source\YamlHelper.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\RGBMonitor.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="source\Applewin.h">
@ -312,6 +318,9 @@
<ClInclude Include="source\Keyboard.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\LanguageCard.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Log.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
@ -459,6 +468,9 @@
<ClInclude Include="source\SaveState_Structs_v1.h">
<Filter>Source Files\_Headers</Filter>
</ClInclude>
<ClInclude Include="source\RGBMonitor.h">
<Filter>Source Files\Video</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="resource\Applewin.bmp">

View File

@ -1,10 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppleWin", "AppleWinExpress2015.vcxproj", "{0A960136-A00A-4D4B-805F-664D9950D2CA}"
ProjectSection(ProjectDependencies) = postProject
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A} = {AA5854AD-2BC7-4EFD-9790-349ADB35E35A}
{CF5A49BF-62A5-41BB-B10C-F34D556A7A45} = {CF5A49BF-62A5-41BB-B10C-F34D556A7A45}
{0212E0DF-06DA-4080-BD1D-F3B01599F70F} = {0212E0DF-06DA-4080-BD1D-F3B01599F70F}
{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D} = {509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}
@ -19,6 +20,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml", "libyaml\win32\yaml2
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCPU6502", "test\TestCPU6502\TestCPU6502-vs2015.vcxproj", "{CF5A49BF-62A5-41BB-B10C-F34D556A7A45}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HookFilter", "HookFilter\HookFilter-vs2015.vcxproj", "{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug NoDX|Win32 = Debug NoDX|Win32
@ -67,6 +70,14 @@ Global
{CF5A49BF-62A5-41BB-B10C-F34D556A7A45}.Release NoDX|Win32.Build.0 = Release|Win32
{CF5A49BF-62A5-41BB-B10C-F34D556A7A45}.Release|Win32.ActiveCfg = Release|Win32
{CF5A49BF-62A5-41BB-B10C-F34D556A7A45}.Release|Win32.Build.0 = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug NoDX|Win32.ActiveCfg = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug NoDX|Win32.Build.0 = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug|Win32.ActiveCfg = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug|Win32.Build.0 = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release NoDX|Win32.ActiveCfg = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release NoDX|Win32.Build.0 = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release|Win32.ActiveCfg = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -71,6 +71,7 @@
<ClInclude Include="source\Harddisk.h" />
<ClInclude Include="source\Joystick.h" />
<ClInclude Include="source\Keyboard.h" />
<ClInclude Include="source\LanguageCard.h" />
<ClInclude Include="source\Log.h" />
<ClInclude Include="source\Memory.h" />
<ClInclude Include="source\Mockingboard.h" />
@ -81,6 +82,7 @@
<ClInclude Include="source\ParallelPrinter.h" />
<ClInclude Include="source\Pravets.h" />
<ClInclude Include="source\Registry.h" />
<ClInclude Include="source\RGBMonitor.h" />
<ClInclude Include="source\Riff.h" />
<ClInclude Include="source\SAM.h" />
<ClInclude Include="source\SaveState.h" />
@ -133,6 +135,7 @@
<ClCompile Include="source\Configuration\PropertySheet.cpp" />
<ClCompile Include="source\Configuration\PropertySheetHelper.cpp" />
<ClCompile Include="source\CPU.cpp" />
<ClCompile Include="source\RGBMonitor.cpp" />
<ClCompile Include="source\SAM.cpp" />
<ClCompile Include="source\Debugger\Debug.cpp" />
<ClCompile Include="source\Debugger\Debugger_Assembler.cpp" />
@ -154,6 +157,7 @@
<ClCompile Include="source\Harddisk.cpp" />
<ClCompile Include="source\Joystick.cpp" />
<ClCompile Include="source\Keyboard.cpp" />
<ClCompile Include="source\LanguageCard.cpp" />
<ClCompile Include="source\Log.cpp" />
<ClCompile Include="source\Memory.cpp" />
<ClCompile Include="source\Mockingboard.cpp" />
@ -369,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
@ -393,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
@ -422,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
@ -452,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

@ -76,6 +76,9 @@
<ClCompile Include="source\Keyboard.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\LanguageCard.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Log.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
@ -187,6 +190,9 @@
<ClCompile Include="source\YamlHelper.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\RGBMonitor.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="source\Applewin.h">
@ -312,6 +318,9 @@
<ClInclude Include="source\Keyboard.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\LanguageCard.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Log.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
@ -459,6 +468,9 @@
<ClInclude Include="source\SaveState_Structs_v1.h">
<Filter>Source Files\_Headers</Filter>
</ClInclude>
<ClInclude Include="source\RGBMonitor.h">
<Filter>Source Files\Video</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="resource\Applewin.bmp">

View File

@ -1,10 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
VisualStudioVersion = 15.0.26430.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppleWin", "AppleWinExpress2017.vcxproj", "{0A960136-A00A-4D4B-805F-664D9950D2CA}"
ProjectSection(ProjectDependencies) = postProject
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A} = {AA5854AD-2BC7-4EFD-9790-349ADB35E35A}
{CF5A49BF-62A5-41BB-B10C-F34D556A7A45} = {CF5A49BF-62A5-41BB-B10C-F34D556A7A45}
{0212E0DF-06DA-4080-BD1D-F3B01599F70F} = {0212E0DF-06DA-4080-BD1D-F3B01599F70F}
{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D} = {509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}
@ -19,6 +20,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml", "libyaml\win32\yaml2
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCPU6502", "test\TestCPU6502\TestCPU6502-vs2017.vcxproj", "{CF5A49BF-62A5-41BB-B10C-F34D556A7A45}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HookFilter", "HookFilter\HookFilter-vs2017.vcxproj", "{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug NoDX|Win32 = Debug NoDX|Win32
@ -67,6 +70,14 @@ Global
{CF5A49BF-62A5-41BB-B10C-F34D556A7A45}.Release NoDX|Win32.Build.0 = Release|Win32
{CF5A49BF-62A5-41BB-B10C-F34D556A7A45}.Release|Win32.ActiveCfg = Release|Win32
{CF5A49BF-62A5-41BB-B10C-F34D556A7A45}.Release|Win32.Build.0 = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug NoDX|Win32.ActiveCfg = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug NoDX|Win32.Build.0 = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug|Win32.ActiveCfg = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Debug|Win32.Build.0 = Debug|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release NoDX|Win32.ActiveCfg = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release NoDX|Win32.Build.0 = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release|Win32.ActiveCfg = Release|Win32
{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -71,6 +71,7 @@
<ClInclude Include="source\Harddisk.h" />
<ClInclude Include="source\Joystick.h" />
<ClInclude Include="source\Keyboard.h" />
<ClInclude Include="source\LanguageCard.h" />
<ClInclude Include="source\Log.h" />
<ClInclude Include="source\Memory.h" />
<ClInclude Include="source\Mockingboard.h" />
@ -81,6 +82,7 @@
<ClInclude Include="source\ParallelPrinter.h" />
<ClInclude Include="source\Pravets.h" />
<ClInclude Include="source\Registry.h" />
<ClInclude Include="source\RGBMonitor.h" />
<ClInclude Include="source\Riff.h" />
<ClInclude Include="source\SAM.h" />
<ClInclude Include="source\SaveState.h" />
@ -133,6 +135,7 @@
<ClCompile Include="source\Configuration\PropertySheet.cpp" />
<ClCompile Include="source\Configuration\PropertySheetHelper.cpp" />
<ClCompile Include="source\CPU.cpp" />
<ClCompile Include="source\RGBMonitor.cpp" />
<ClCompile Include="source\SAM.cpp" />
<ClCompile Include="source\Debugger\Debug.cpp" />
<ClCompile Include="source\Debugger\Debugger_Assembler.cpp" />
@ -154,6 +157,7 @@
<ClCompile Include="source\Harddisk.cpp" />
<ClCompile Include="source\Joystick.cpp" />
<ClCompile Include="source\Keyboard.cpp" />
<ClCompile Include="source\LanguageCard.cpp" />
<ClCompile Include="source\Log.cpp" />
<ClCompile Include="source\Memory.cpp" />
<ClCompile Include="source\Mockingboard.cpp" />
@ -365,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
@ -389,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
@ -416,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>
@ -424,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
@ -446,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>
@ -454,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

@ -76,6 +76,9 @@
<ClCompile Include="source\Keyboard.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\LanguageCard.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\Log.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
@ -187,6 +190,9 @@
<ClCompile Include="source\YamlHelper.cpp">
<Filter>Source Files\Emulator</Filter>
</ClCompile>
<ClCompile Include="source\RGBMonitor.cpp">
<Filter>Source Files\Video</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="source\Applewin.h">
@ -312,6 +318,9 @@
<ClInclude Include="source\Keyboard.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\LanguageCard.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\Log.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
@ -459,6 +468,9 @@
<ClInclude Include="source\SaveState_Structs_v1.h">
<Filter>Source Files\_Headers</Filter>
</ClInclude>
<ClInclude Include="source\RGBMonitor.h">
<Filter>Source Files\Video</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="resource\Applewin.bmp">

View File

@ -1,36 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Applewin", "ApplewinExpress2005.vcproj", "{1DA0C491-B5F4-4EC8-B1D2-CF6BE635DADC}"
ProjectSection(ProjectDependencies) = postProject
{7935B998-C713-42AE-8F6D-9FF9080A1B1B} = {7935B998-C713-42AE-8F6D-9FF9080A1B1B}
{709278B8-C583-4BD8-90DE-4E4F35A3BD8B} = {709278B8-C583-4BD8-90DE-4E4F35A3BD8B}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib-Express2005.vcproj", "{7935B998-C713-42AE-8F6D-9FF9080A1B1B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zip_lib", "zip_lib\zip_lib2005.vcproj", "{709278B8-C583-4BD8-90DE-4E4F35A3BD8B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1DA0C491-B5F4-4EC8-B1D2-CF6BE635DADC}.Debug|Win32.ActiveCfg = Debug|Win32
{1DA0C491-B5F4-4EC8-B1D2-CF6BE635DADC}.Debug|Win32.Build.0 = Debug|Win32
{1DA0C491-B5F4-4EC8-B1D2-CF6BE635DADC}.Release|Win32.ActiveCfg = Release|Win32
{1DA0C491-B5F4-4EC8-B1D2-CF6BE635DADC}.Release|Win32.Build.0 = Release|Win32
{7935B998-C713-42AE-8F6D-9FF9080A1B1B}.Debug|Win32.ActiveCfg = Debug|Win32
{7935B998-C713-42AE-8F6D-9FF9080A1B1B}.Debug|Win32.Build.0 = Debug|Win32
{7935B998-C713-42AE-8F6D-9FF9080A1B1B}.Release|Win32.ActiveCfg = Release|Win32
{7935B998-C713-42AE-8F6D-9FF9080A1B1B}.Release|Win32.Build.0 = Release|Win32
{709278B8-C583-4BD8-90DE-4E4F35A3BD8B}.Debug|Win32.ActiveCfg = Debug|Win32
{709278B8-C583-4BD8-90DE-4E4F35A3BD8B}.Debug|Win32.Build.0 = Debug|Win32
{709278B8-C583-4BD8-90DE-4E4F35A3BD8B}.Release|Win32.ActiveCfg = Release|Win32
{709278B8-C583-4BD8-90DE-4E4F35A3BD8B}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,970 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="Applewin"
ProjectGUID="{1DA0C491-B5F4-4EC8-B1D2-CF6BE635DADC}"
RootNamespace="Applewin"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/Applewin.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/Zm200 "
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="source;source/debugger;zlib;zip_lib"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="0"
FloatingPointModel="0"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\Release/Applewin.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
DisableSpecificWarnings="4819;4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="htmlhelp.lib comctl32.lib ddraw.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 zip_lib.lib zlib.lib"
OutputFile=".\Release\Applewin.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="$(OutDir)"
AdditionalManifestDependencies="&quot;type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;&quot;"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Release\Applewin.pdb"
SubSystem="2"
LinkTimeCodeGeneration="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/Applewin.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/Zm200 "
Optimization="0"
AdditionalIncludeDirectories="source;source/debugger;zlib;zip_lib"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\Debug/Applewin.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
DisableSpecificWarnings="4819;4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="htmlhelp.lib comctl32.lib ddraw.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 zip_lib.lib zlib.lib"
OutputFile=".\Debug\Applewin.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="$(OutDir)"
AdditionalManifestDependencies="&quot;type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;&quot;"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug\Applewin.pdb"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source"
Filter=".cpp"
>
<File
RelativePath=".\source\6821.cpp"
>
</File>
<File
RelativePath=".\source\6821.h"
>
</File>
<File
RelativePath=".\source\Applewin.cpp"
>
</File>
<File
RelativePath=".\source\Applewin.h"
>
</File>
<File
RelativePath=".\source\AY8910.cpp"
>
</File>
<File
RelativePath=".\source\AY8910.h"
>
</File>
<File
RelativePath=".\source\CPU.cpp"
>
</File>
<File
RelativePath=".\source\CPU.h"
>
</File>
<File
RelativePath=".\source\Frame.cpp"
>
</File>
<File
RelativePath=".\source\Frame.h"
>
</File>
<File
RelativePath=".\source\Joystick.cpp"
>
</File>
<File
RelativePath=".\source\Joystick.h"
>
</File>
<File
RelativePath=".\source\Keyboard.cpp"
>
</File>
<File
RelativePath=".\source\Keyboard.h"
>
</File>
<File
RelativePath=".\source\Log.cpp"
>
</File>
<File
RelativePath=".\source\Log.h"
>
</File>
<File
RelativePath=".\source\Memory.cpp"
>
</File>
<File
RelativePath=".\source\Memory.h"
>
</File>
<File
RelativePath=".\source\Mockingboard.cpp"
>
</File>
<File
RelativePath=".\source\Mockingboard.h"
>
</File>
<File
RelativePath=".\source\MouseInterface.cpp"
>
</File>
<File
RelativePath=".\source\MouseInterface.h"
>
</File>
<File
RelativePath=".\source\NoSlotClock.cpp"
>
</File>
<File
RelativePath=".\source\NoSlotClock.h"
>
</File>
<File
RelativePath=".\source\ParallelPrinter.cpp"
>
</File>
<File
RelativePath=".\source\ParallelPrinter.h"
>
</File>
<File
RelativePath=".\source\Registry.cpp"
>
</File>
<File
RelativePath=".\source\Registry.h"
>
</File>
<File
RelativePath=".\source\Riff.cpp"
>
</File>
<File
RelativePath=".\source\Riff.h"
>
</File>
<File
RelativePath=".\source\SaveState.cpp"
>
</File>
<File
RelativePath=".\source\SaveState.h"
>
</File>
<File
RelativePath=".\source\SerialComms.cpp"
>
</File>
<File
RelativePath=".\source\SerialComms.h"
>
</File>
<File
RelativePath=".\source\SoundCore.cpp"
>
</File>
<File
RelativePath=".\source\SoundCore.h"
>
</File>
<File
RelativePath=".\source\Speaker.cpp"
>
</File>
<File
RelativePath=".\source\Speaker.h"
>
</File>
<File
RelativePath=".\source\Speech.cpp"
>
</File>
<File
RelativePath=".\source\Speech.h"
>
</File>
<File
RelativePath=".\source\StdAfx.cpp"
>
</File>
<File
RelativePath=".\source\StdAfx.h"
>
</File>
<File
RelativePath=".\source\Tape.cpp"
>
</File>
<File
RelativePath=".\source\Tape.h"
>
</File>
<File
RelativePath=".\source\Debugger\Util_MemoryTextFile.cpp"
>
</File>
<File
RelativePath=".\source\Debugger\Util_MemoryTextFile.h"
>
</File>
<File
RelativePath=".\source\Video.cpp"
>
</File>
<File
RelativePath=".\source\Video.h"
>
</File>
<File
RelativePath=".\source\z80emu.cpp"
>
</File>
<File
RelativePath=".\source\z80emu.h"
>
</File>
<Filter
Name="Debugger"
>
<File
RelativePath=".\source\Debugger\Debug.cpp"
>
</File>
<File
RelativePath=".\source\Debugger\Debug.h"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Assembler.cpp"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Assembler.h"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Color.cpp"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Color.h"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Commands.cpp"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Console.cpp"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Console.h"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_DisassemblerData.cpp"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_DisassemblerData.h"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Display.cpp"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Display.h"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Help.cpp"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Help.h"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Parser.cpp"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Parser.h"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Range.cpp"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Range.h"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Symbols.cpp"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Symbols.h"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Types.h"
>
</File>
</Filter>
<Filter
Name="Uthernet"
>
<File
RelativePath=".\source\Tfe\Bittypes.h"
>
</File>
<File
RelativePath=".\source\Tfe\Bpf.h"
>
</File>
<File
RelativePath=".\source\Tfe\Ip6_misc.h"
>
</File>
<File
RelativePath=".\source\Tfe\Pcap-stdinc.h"
>
</File>
<File
RelativePath=".\source\Tfe\Pcap.h"
>
</File>
<File
RelativePath=".\source\Tfe\Tfe.cpp"
>
</File>
<File
RelativePath=".\source\Tfe\Tfe.h"
>
</File>
<File
RelativePath=".\source\Tfe\Tfearch.cpp"
>
</File>
<File
RelativePath=".\source\Tfe\Tfearch.h"
>
</File>
<File
RelativePath=".\source\Tfe\Tfesupp.cpp"
>
</File>
<File
RelativePath=".\source\Tfe\Tfesupp.h"
>
</File>
<File
RelativePath=".\source\Tfe\Types.h"
>
</File>
<File
RelativePath=".\source\Tfe\Uilib.cpp"
>
</File>
<File
RelativePath=".\source\Tfe\Uilib.h"
>
</File>
</Filter>
<Filter
Name="Z80VICE"
>
<File
RelativePath=".\source\Z80VICE\daa.cpp"
>
</File>
<File
RelativePath=".\source\Z80VICE\daa.h"
>
</File>
<File
RelativePath=".\source\Z80VICE\z80.cpp"
>
</File>
<File
RelativePath=".\source\Z80VICE\z80.h"
>
</File>
<File
RelativePath=".\source\Z80VICE\z80mem.cpp"
>
</File>
<File
RelativePath=".\source\Z80VICE\z80mem.h"
>
</File>
<File
RelativePath=".\source\Z80VICE\z80regs.h"
>
</File>
</Filter>
<Filter
Name="CommonVICE"
>
<File
RelativePath=".\source\CommonVICE\6510core.h"
>
</File>
<File
RelativePath=".\source\CommonVICE\alarm.h"
>
</File>
<File
RelativePath=".\source\CommonVICE\interrupt.h"
>
</File>
<File
RelativePath=".\source\CommonVICE\mem.h"
>
</File>
<File
RelativePath=".\source\CommonVICE\types.h"
>
</File>
</Filter>
<Filter
Name="Disk"
>
<File
RelativePath=".\source\Disk.cpp"
>
</File>
<File
RelativePath=".\source\Disk.h"
>
</File>
<File
RelativePath=".\source\DiskImage.cpp"
>
</File>
<File
RelativePath=".\source\DiskImage.h"
>
</File>
<File
RelativePath=".\source\DiskImageHelper.cpp"
>
</File>
<File
RelativePath=".\source\DiskImageHelper.h"
>
</File>
<File
RelativePath=".\source\Harddisk.cpp"
>
</File>
<File
RelativePath=".\source\Harddisk.h"
>
</File>
</Filter>
<Filter
Name="Configuration"
>
<File
RelativePath=".\source\Configuration\About.cpp"
>
</File>
<File
RelativePath=".\source\Configuration\About.h"
>
</File>
<File
RelativePath=".\source\Configuration\Config.h"
>
</File>
<File
RelativePath=".\source\Configuration\IPropertySheet.h"
>
</File>
<File
RelativePath=".\source\Configuration\IPropertySheetPage.h"
>
</File>
<File
RelativePath=".\source\Configuration\PageAdvanced.cpp"
>
</File>
<File
RelativePath=".\source\Configuration\PageAdvanced.h"
>
</File>
<File
RelativePath=".\source\Configuration\PageConfig.cpp"
>
</File>
<File
RelativePath=".\source\Configuration\PageConfig.h"
>
</File>
<File
RelativePath=".\source\Configuration\PageConfigTfe.cpp"
>
</File>
<File
RelativePath=".\source\Configuration\PageConfigTfe.h"
>
</File>
<File
RelativePath=".\source\Configuration\PageDisk.cpp"
>
</File>
<File
RelativePath=".\source\Configuration\PageDisk.h"
>
</File>
<File
RelativePath=".\source\Configuration\PageInput.cpp"
>
</File>
<File
RelativePath=".\source\Configuration\PageInput.h"
>
</File>
<File
RelativePath=".\source\Configuration\PageSound.cpp"
>
</File>
<File
RelativePath=".\source\Configuration\PageSound.h"
>
</File>
<File
RelativePath=".\source\Configuration\PropertySheet.cpp"
>
</File>
<File
RelativePath=".\source\Configuration\PropertySheet.h"
>
</File>
<File
RelativePath=".\source\Configuration\PropertySheetDefs.h"
>
</File>
<File
RelativePath=".\source\Configuration\PropertySheetHelper.cpp"
>
</File>
<File
RelativePath=".\source\Configuration\PropertySheetHelper.h"
>
</File>
</Filter>
</Filter>
<Filter
Name="Docs"
>
<File
RelativePath=".\docs\CodingConventions.txt"
>
</File>
<File
RelativePath=".\docs\Debugger_Changelog.txt"
>
</File>
<File
RelativePath=".\docs\FAQ.txt"
>
</File>
<File
RelativePath=".\bin\History.txt"
>
</File>
<File
RelativePath=".\docs\ToDo.txt"
>
</File>
<File
RelativePath=".\docs\Wishlist.txt"
>
</File>
</Filter>
<Filter
Name="Resources"
Filter=".txt,.ico,.bmp,.rc"
>
<File
RelativePath=".\resource\Apple2.rom"
>
</File>
<File
RelativePath=".\resource\Apple2_Plus.rom"
>
</File>
<File
RelativePath=".\resource\Apple2e.rom"
>
</File>
<File
RelativePath=".\resource\Apple2e_Enhanced.rom"
>
</File>
<File
RelativePath=".\resource\Applewin.bmp"
>
</File>
<File
RelativePath="RESOURCE\APPLEWIN.ICO"
>
</File>
<File
RelativePath="RESOURCE\APPLEWIN.RC"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="RESOURCE"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="RESOURCE"
/>
</FileConfiguration>
</File>
<File
RelativePath="RESOURCE\CAPSOFF.BMP"
>
</File>
<File
RelativePath="RESOURCE\CAPSON.BMP"
>
</File>
<File
RelativePath=".\resource\CHARIDNICATOR_82.BMP"
>
</File>
<File
RelativePath=".\resource\CHARIDNICATOR_8C.BMP"
>
</File>
<File
RelativePath=".\resource\CHARIDNICATOR_APPLE.BMP"
>
</File>
<File
RelativePath="RESOURCE\CHARSET4.BMP"
>
</File>
<File
RelativePath=".\resource\CHARSET82.bmp"
>
</File>
<File
RelativePath=".\resource\CHARSET8C.bmp"
>
</File>
<File
RelativePath="RESOURCE\COLOR.BMP"
>
</File>
<File
RelativePath=".\resource\CYROFF.BMP"
>
</File>
<File
RelativePath=".\resource\CYRON.BMP"
>
</File>
<File
RelativePath="RESOURCE\DEBUG.BMP"
>
</File>
<File
RelativePath=".\resource\Debug_Font.bmp"
>
</File>
<File
RelativePath="RESOURCE\DISK.ICO"
>
</File>
<File
RelativePath="RESOURCE\DISKOFF.BMP"
>
</File>
<File
RelativePath="RESOURCE\DISKREAD.BMP"
>
</File>
<File
RelativePath="RESOURCE\DISKWRIT.BMP"
>
</File>
<File
RelativePath="RESOURCE\DRIVE1.BMP"
>
</File>
<File
RelativePath="RESOURCE\DRIVE2.BMP"
>
</File>
<File
RelativePath="Resource\DriveSwap.bmp"
>
</File>
<File
RelativePath="RESOURCE\FULLSCR.BMP"
>
</File>
<File
RelativePath="Resource\Hddrvr.bin"
>
</File>
<File
RelativePath="RESOURCE\HELP.BMP"
>
</File>
<File
RelativePath=".\resource\Parallel.rom"
>
</File>
<File
RelativePath="RESOURCE\RUN.BMP"
>
</File>
<File
RelativePath=".\resource\RUNP.BMP"
>
</File>
<File
RelativePath="RESOURCE\SETUP.BMP"
>
</File>
</Filter>
<File
RelativePath=".\source\Common.h"
>
</File>
<File
RelativePath=".\resource\resource.h"
>
</File>
<File
RelativePath=".\source\SSI263Phonemes.h"
>
</File>
<File
RelativePath=".\source\Structs.h"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,96 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="crypt.h" />
<ClInclude Include="ioapi.h" />
<ClInclude Include="iowin32.h" />
<ClInclude Include="mztools.h" />
<ClInclude Include="unzip.h" />
<ClInclude Include="zip.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="ioapi.c" />
<ClCompile Include="iowin32.c" />
<ClCompile Include="mztools.c" />
<ClCompile Include="unzip.c" />
<ClCompile Include="zip.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>zip_lib</RootNamespace>
<ProjectName>zip_lib</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>HookFilter</ProjectName>
<ProjectGuid>{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}</ProjectGuid>
<RootNamespace>HookFilter</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;HOOKFILTER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers />
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;HOOKFILTER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="HookFilter.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="HookFilter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -1,106 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="adler32.c" />
<ClCompile Include="compress.c" />
<ClCompile Include="crc32.c" />
<ClCompile Include="deflate.c" />
<ClCompile Include="gzio.c" />
<ClCompile Include="infback.c" />
<ClCompile Include="inffast.c" />
<ClCompile Include="inflate.c" />
<ClCompile Include="inftrees.c" />
<ClCompile Include="trees.c" />
<ClCompile Include="uncompr.c" />
<ClCompile Include="zutil.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="crc32.h" />
<ClInclude Include="deflate.h" />
<ClInclude Include="inffast.h" />
<ClInclude Include="inffixed.h" />
<ClInclude Include="inflate.h" />
<ClInclude Include="inftrees.h" />
<ClInclude Include="trees.h" />
<ClInclude Include="zconf.h" />
<ClInclude Include="zconf.in.h" />
<ClInclude Include="zlib.h" />
<ClInclude Include="zutil.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>zlib</RootNamespace>
<ProjectName>zlib</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>HookFilter</ProjectName>
<ProjectGuid>{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}</ProjectGuid>
<RootNamespace>HookFilter</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>14.0.25420.1</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;HOOKFILTER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers />
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;HOOKFILTER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="HookFilter.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="HookFilter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>HookFilter</ProjectName>
<ProjectGuid>{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}</ProjectGuid>
<RootNamespace>HookFilter</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>15.0.26419.1</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;HOOKFILTER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers />
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;HOOKFILTER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="HookFilter.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="HookFilter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

79
HookFilter/HookFilter.cpp Normal file
View File

@ -0,0 +1,79 @@
#include <windows.h>
static HWND g_hFrameWindow = (HWND)0;
static bool g_bHookAltTab = false;
static bool g_bHookAltGrControl = false;
// NB. __stdcall (or WINAPI) and extern "C":
// . symbol is decorated as _<symbol>@bytes
// . so use the #pragma to create an undecorated alias for our symbol
extern "C" __declspec(dllexport) LRESULT CALLBACK LowLevelKeyboardProc(
_In_ int nCode,
_In_ WPARAM wParam,
_In_ LPARAM lParam)
{
#pragma comment(linker, "/EXPORT:" __FUNCTION__ "=" __FUNCDNAME__)
if (nCode == HC_ACTION)
{
bool suppress = false;
PKBDLLHOOKSTRUCT pKbdLlHookStruct = (PKBDLLHOOKSTRUCT) lParam;
UINT newMsg = pKbdLlHookStruct->flags & LLKHF_UP ? WM_KEYUP : WM_KEYDOWN;
LPARAM newlParam = newMsg == WM_KEYUP ? 3<<30 : 0; // b31:transition state, b30:previous key state
//
// NB. Alt Gr (Right-Alt): this normally send 2 WM_KEYDOWN messages for: VK_LCONTROL, then VK_RMENU
// Keyboard scanCodes: LCONTROL=0x1D, LCONTROL_from_RMENU=0x21D
// . For: Microsoft PS/2/Win7-64, VAIO laptop/Win7-64, Microsoft USB/Win10-64
// NB. WM_KEYDOWN also includes a 9/10-bit? scanCode: LCONTROL=0x1D, RCONTROL=0x11D, RMENU=0x1D(not 0x21D)
// . Can't suppress in app, since scanCode is not >= 0x200
if (g_bHookAltGrControl && pKbdLlHookStruct->vkCode == VK_LCONTROL && pKbdLlHookStruct->scanCode >= 0x200) // GH#558
{
suppress = true;
}
// Suppress alt-tab
if (g_bHookAltTab && pKbdLlHookStruct->vkCode == VK_TAB && (pKbdLlHookStruct->flags & LLKHF_ALTDOWN))
{
PostMessage(g_hFrameWindow, newMsg, VK_TAB, newlParam);
suppress = true;
}
// Suppress alt-escape
if (pKbdLlHookStruct->vkCode == VK_ESCAPE && (pKbdLlHookStruct->flags & LLKHF_ALTDOWN))
{
PostMessage(g_hFrameWindow, newMsg, VK_ESCAPE, newlParam);
suppress = true;
}
// Suppress alt-space
if (pKbdLlHookStruct->vkCode == VK_SPACE && (pKbdLlHookStruct->flags & LLKHF_ALTDOWN))
{
PostMessage(g_hFrameWindow, newMsg, VK_SPACE, newlParam);
suppress = true;
}
// Suppress ctrl-escape
if (pKbdLlHookStruct->vkCode == VK_ESCAPE)
{
// But don't suppress CTRL+SHIFT+ESC
if (GetKeyState(VK_CONTROL) < 0 && GetKeyState(VK_SHIFT) >= 0)
suppress = true;
}
// Suppress keys by returning 1
if (suppress)
return 1;
}
return CallNextHookEx(0/*parameter is ignored*/, nCode, wParam, lParam);
}
extern "C" __declspec(dllexport) void __cdecl RegisterHWND(HWND hWnd, bool bHookAltTab, bool bHookAltGrControl)
{
g_hFrameWindow = hWnd;
g_bHookAltTab = bHookAltTab;
g_bHookAltGrControl = bHookAltGrControl;
}

View File

@ -1,205 +1,181 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="zip_lib"
ProjectGUID="{709278B8-C583-4BD8-90DE-4E4F35A3BD8B}"
RootNamespace="zip_lib"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\zlib"
PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\zlib"
PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\crypt.h"
>
</File>
<File
RelativePath=".\ioapi.c"
>
</File>
<File
RelativePath=".\ioapi.h"
>
</File>
<File
RelativePath=".\iowin32.c"
>
</File>
<File
RelativePath=".\iowin32.h"
>
</File>
<File
RelativePath=".\mztools.c"
>
</File>
<File
RelativePath=".\mztools.h"
>
</File>
<File
RelativePath=".\unzip.c"
>
</File>
<File
RelativePath=".\unzip.h"
>
</File>
<File
RelativePath=".\zip.c"
>
</File>
<File
RelativePath=".\zip.h"
>
</File>
</Filter>
<File
RelativePath=".\ChangeLogUnzip"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="HookFilter"
ProjectGUID="{AA5854AD-2BC7-4EFD-9790-349ADB35E35A}"
RootNamespace="HookFilter"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HOOKFILTER_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;HOOKFILTER_EXPORTS"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\HookFilter.cpp"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -3,9 +3,10 @@ AppleWin
Apple II emulator for Windows
Download latest (stable) release: [AppleWin v1.27.0.0](https://github.com/AppleWin/AppleWin/releases/download/v1.27.0.0/AppleWin1.27.0.0.zip)
Release Notes: [v1.27.0.0](https://github.com/AppleWin/AppleWin/releases/tag/v1.27.0.0)
Download latest (stable) release: [AppleWin v1.28.0.0](https://github.com/AppleWin/AppleWin/releases/download/v1.28.0.0/AppleWin1.28.0.0.zip)
Release Notes: [v1.28.0.0](https://github.com/AppleWin/AppleWin/releases/tag/v1.28.0.0)
Building
@ -25,7 +26,8 @@ Please report [new issues](https://github.com/AppleWin/AppleWin/issues/new)
Previous Versions
=================
* [AppleWin v1.27.0.0](https://github.com/AppleWin/AppleWin/releases/download/v1.27.0.0/AppleWin1.27.0.0.zip)
Last pre-NTSC change:
* [AppleWin v1.25.0.4](https://github.com/AppleWin/AppleWin/releases/download/v1.25.0.4/AppleWin1.25.0.4.zip)

View File

@ -1,7 +1,10 @@
; Apple 2 Rom Symbol Table
; Version 5 Renamed "KBD/CLR80COL" -> "KBD/CLR80STORE", "SET80COL" -> "SET80STORE"
; Renamed "CLR80VID" -> "CLR80COL", "SET80VID" -> "SET80COL"
; Renamed "RD80COL" -> "RD80STORE", "RD80VID" -> "RD80COL"
; Version 4 GH#484
; Version 3 Cross-referenced/Sync'd with APPLE2E.SYM & A2_BASIC.SYM
Added Text Holes
; Added Text Holes
; Version 2 by Michael Pohoreski - AppleWin Debugger Dev
; Version 1 Original
@ -91,8 +94,8 @@
07FB A2C.TEMP2
; Softswitches
C000 KBD/CLR80COL
C001 SET80COL
C000 KBD/CLR80STORE
C001 SET80STORE
C002 RDMAINRAM
C003 RDCARDRAM
C004 WRMAINRAM
@ -103,8 +106,8 @@ C008 SETSTDZP
C009 SETALTZP
C00A SETINTC3ROM
C00B SETSLOTC3ROM
C00C CLR80VID
C00D SET80VID
C00C CLR80COL
C00D SET80COL
C00E CLRALTCHAR
C00F SETALTCHAR
C010 KBDSTRB
@ -115,12 +118,12 @@ C014 RDRAMWRT
C015 RDCXROM
C016 RDALTZP
C017 RDC3ROM
C018 RD80COL
C018 RD80STORE
C019 RDVBLBAR
C01A RDTEXT
C01C RDPAGE2
C01E ALTCHARSET
C01F RD80VID
C01F RD80COL
C020 TAPEOUT
C030 SPKR
C050 TXTCLR

View File

@ -9,11 +9,149 @@ https://github.com/AppleWin/AppleWin/issues/new
Tom Charlesworth
1.27.3.0 - 14 Apr 2018
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 is 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.
. [Bug #611] Holding down F9 to cycle through the video modes results in occasional flicker with garbage.
. [Bug #627] Rainbow demo not working correctly when vertical blend is enabled.
. [Bug #628] Filename suffix check for .gz and .zip needs to be case-insensitive.
1.28.3.0 - 3 Mar 2019
---------------------
. [Change #625] AltGr+<key> does not send the <key> value to $C000.
- This reverts the default behaviour introduced from 1.27.6 (#558).
- Use -altgr-sends-wmchar to allow AltGr+<key> to work correctly together.
- NB. The reason for the revert was that it was preventing international keyboards from typing certain characters.
. [Change #616] Vertical blending now uses 560-pixel granularity for half-dot shift support (consistent with all other video modes).
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
---------------------
. [Change #523] Support Extended 80-Column Text/AppleColor Card's DHGR Mixed mode and 560x192 Mono mode.
. [PR #620] Corrected a few symbol names in APPLE2E.SYM for the 80STORE and 80COL I/O addresses.
. [Bug #617] Apple II,II+ keyboard: up/down arrow keys are now ignored.
1.28.0.0 - 12 Jan 2019
----------------------
. [Change #357] Resurrected the AppleWin 1.25 "Color (Standard)" video mode as "Color (RGB Monitor)".
- This is equivalent to emulating RGB video, ie. a video mode with sharp text and pixels.
- NB. Unlike AppleWin 1.25, this is now cycle-accurate, so demos that synchronise with the video scanner will work correctly.
. [Change #603] Removed support for v1 save-state files.
- Any v1 save-state files should be loaded into AppleWin 1.27, and then re-saved to a v2 save-state file.
. [Change #597] Removed the functionality for CTRL+F10 to reveal the mouse cursor.
. [Change #585] Added a 'Swap' HDD button to the Configuration->Input property sheet.
. [Bug #608] Mockingboard's 6522 TIMER1 wasn't generating an interrupt quickly enough for Broadside's detection routine.
1.27.13.0 - 8 Dec 2018
----------------------
. [Bug #303, #599] Fix for Ultima V not loading in Authentic Speed mode (regression introduced at 1.27.9.0).
. [Change #205] Added support for Apple II/II+ custom 2K video ROMs.
- Extended command line switch: -videorom <file>
- If the ROM size is 2K, then it replaces the video ROM for the Apple II/II+.
1.27.12.0 - 17 Nov 2018
-----------------------
. [Change #574] Added support for PAL/European or custom 8K video ROMs:
- Added new command line switch: -videorom <file>
- Replaces the video ROM for the Enhanced //e.
- Support video ROM sizes of 4K, 8K and 16K (top 8K only).
- NB. The rocker switch is set to the European video ROM position.
- F10 (for //e or Enhanced //e models) emulates the PAL //e's rocker switch (under the keyboard).
- Use to toggle between European or US video ROM.
. [Change #583] Added new switch: '-no-hook-alt':
- Used to prevent left/right ALT from emulating Open/Solid Apple keys.
- For European keyboards where AltGr is needed to type keys like '[',']'.
1.27.10.0 - 4 Nov 2018
----------------------
. [Change #590] Apple II original: default to 48K (so no LC installed in slot-0).
- Added new command line switch: -s0 <languagecard|lc>
('lc' is an alias for 'languagecard')
- When LC is in slot-0, it now use the Apple II+'s F8 (auto-start) ROM
. [Change #408] Support Saturn 64K and 128K cards in slot-0.
- Added new command line switch: -s0 <saturn|saturn64|saturn128>
('saturn' is an alias for 'saturn128')
. [Bug #591] Save-state wasn't preserving the 'key-waiting' flag.
. [Bug #587] Debugger: disassembly for branch targets < $1000 were missing the leading '0'.
1.27.9.0 - 2 Oct 2018
---------------------
. [Bug #582] Support for partial disk II latch reads when accesses are very close.
- Fixes Curse of the Azure Bonds & Pool of Radiance (saving characters and creating disks).
1.27.8.0 - 9 Sep 2018
---------------------
. [Bug #555] Fix for showing 559th DHGR/DGR/TEXT80 vertical column (retaining 560-pixel display width).
1.27.7.0 - 6 Aug 2018
---------------------
. [Bug #564] Fixed 'Save State on Exit' not working correctly when there's a Configuration change to the hardware.
. [Bug #556] Reverted default so that ALT+TAB is not hooked
- Support new command line switch: -hook-alt-tab to support hooking ALT+TAB.
. [Bug #558] Reverted default so that ALT GR's fake LEFT CONTROL is not hooked
- Support new command line switch: -hook-altgr-control to suppress ALR GR's fake LEFT CONTROL.
1.27.6.0 - 28 Jul 2018
----------------------
. [Bug #570] Fixed lag when repeat-stepping in debugger.
. [Bug #558] Fixed ClosedApple + <key> not working (when using right ALT key).
1.27.5.0 - 24 Jun 2018
----------------------
. [Bug #567] Fixed Mockingboard/6522: Reading the 6522's IER now returns 0x80|IER.
. [Bug #556] Allow system key combinations to be read: Open Apple (left ALT) + ESC/SPACE/TAB.
- Also fixes #145, #198, #448.
- Support new command line switches: -no-hook-system-key, -alt-enter=<open-apple-enter|toggle-full-screen>
- Fix for save-state which wasn't correctly saving last key.
. [Bug #555] Reverted 1.27.4's "Fix for showing 559th DHGR vertical column".
- So 559th DHGR vertical column remains hidden (this is still a bug).
. [Bug #330] Any Key Down (AKD) wasn't working for the multi-key case.
1.27.4.0 - 26 May 2018
----------------------
. [Bug #555] Fix for showing 559th DHGR vertical column.
- But now an HGR HCOLOR=2 vertical line at column 0 is only 1 DHGR pixel wide.
- Fix TEXT80 to be aligned with DHGR.
- Fix FLASH in TEXT80 (the inverse aux-memory char would overwrite the main-memory char).
. [Change #554] Help: Added a new help page about AppleWin's SSC emulation.
. [Change #522] SSC: ZLINK not starting unless DCD is set.
- DCD state is now a mirror of DSR unless -dcd switch is used.
- Removed -dsr,-dtr switches, so -modem is now an alias for -dcd.
. [Bug #308] SSC: For TCP mode, support DSR, DCD & CTS status bits.
. SSC: Now DTR must also be set to enable interrupts (in addition to the respective Tx/Rx interrupt bit).
. SSC: When reading the Status register, throttle calls to GetCommModemStatus() to a maximum of once every 8ms.
. SSC: Change DIPSW1's baud rate to 9600 (was 19200).
1.27.2.0 - 12 Apr 2018
@ -614,8 +752,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

@ -19,14 +19,20 @@
Start with hard disk 1 plugged-in (and auto power-on the Apple II). NB. Hard disk controller card gets enabled.<br><br>
-h2 &lt;pathname&gt;<br>
Start with hard disk 2 plugged-in. NB. Hard disk controller card gets enabled.<br><br>
-s0 &lt;saturn|saturn64|saturn128&gt;<br>
Insert a Saturn 64K or Saturn 128K card into slot 0 in the Apple II or II+ machines (or similar clone).<br>
Where -s0 saturn is an alias for -s0 saturn128.<br><br>
-s0 &lt;languagecard|lc&gt;<br>
Insert an Apple 16K Language Card into slot 0 in the original Apple II and use the F8 auto-start ROM.<br>
NB. The Apple II+ already defaults to having a Language Card, so this switch is not required.<br><br>
-s7 empty<br>
Remove the hard disk controller card from slot 7.<br>
Useful to allow a floppy disk to boot from slot 6, drive 1. Use in combination with -d1.<br><br>
-r &lt;number of pages&gt;<br>
Emulate a RAMworks III card with 1 to 127 pages (each page is 64K, giving a max of 8MB)<br><br>
Emulate a RamWorks III card with 1 to 127 pages (each page is 64K, giving a max of 8MB) in the auxiliary slot in an Apple //e machine.<br><br>
-load-state &lt;savestate&gt;<br>
Load a save-state file<br>
NB. This takes precedent over the -d1,d2,h1,h2,s7 and -r switches.<br><br>
NB. This takes precedent over the -d1,d2,h1,h2,s0,s7 and -r switches.<br><br>
-f<br>
Start in full-screen mode<br><br>
-fs-height=&lt;best|nnnn&gt;<br>
@ -36,12 +42,29 @@
<li>nnnn: select a specific resolution with height=nnnn pixels</li>
</ul>
NB. This changes the display resolution (and restores on exit).<br><br>
-f8rom &lt;rom-file&gt;<br>
Use custom 2K ROM at [$F800..$FFFF]. &lt;rom-file&gt; must be 2048 bytes long<br><br>
-f8rom &lt;file&gt;<br>
Use custom 2K ROM for any Apple II machine at [$F800..$FFFF]. &lt;file&gt; must be 2048 bytes long<br><br>
-videorom &lt;file&gt;<br>
Use an alternate custom 2K video ROM for Apple II or II+ machines (but not clones).<br>
Use an alternate European or custom 4K, 8K or 16K (top 8K only) video ROM for the original or Enhanced //e (but not clones).<br><br>
-printscreen<br>
Enable the dialog box to display the last file saved to<br><br>
-no-printscreen-key<br>
Prevent the PrintScreen key from being registered<br><br>
-no-hook-system-key<br>
Prevent certain system key combinations from being hooked (to prevent the emulator from trapping ALT+ESC, ALT+SPACE, ALT+TAB and CTRL+ESC). This means that the equivalent Open Apple+&lt;key&gt; combinations won't work within the emulator.<br>
NB. This switch takes precedence over -hook-alt-tab and -hook-altgr-control.<br><br>
-no-hook-alt<br>
Prevent the left and right ALT keys from being hooked (eg. to prevent emulation of Open/Solid Apple keys via the ALT keys).<br><br>
-hook-alt-tab<br>
By default the emulator doesn't hook ALT+TAB. Use this to allow Open Apple+TAB to be readable by the emulated machine.<br><br>
-hook-altgr-control<br>
By default the emulator doesn't suppress AltGr's (Right Alt's) fake LEFT CONTROL. Use this to suppress this fake LEFT CONTROL to allow Solid Apple+CTRL+&lt;key&gt; to be readable by the emulated machine.<br>
NB. Suppressing this fake LEFT CONTROL seems to prevent international keyboards from being able to type certain keys.<br><br>
-altgr-sends-wmchar<br>
Use this switch to allow Solid Apple (AltGr) to be used in combination with regular keys.<br>
When AltGr is pressed, Windows only sends a WM_CHAR message for (eg) international key codes; and so by default the emulator doesn't explicitly send a WM_CHAR message for regular keys when AltGr is being pressed.<br>
NB. Using this switch may prevent international keyboards from being able to type certain keys.<br><br>
-use-real-printer<br>
Enables Advanced configuration control to allow dumping to a real printer<br><br>
-noreg<br>
@ -63,25 +86,30 @@
i.e. 00:20 20 20 20 ... for page $20</li>
</ul>
-modem<br>
Shorthand for passing -dtr -dcd -dsr<br>
Shorthand for passing -dcd<br>
Use with GBBS Pro (or any other BBS package). See the <a href="http://www.callapple.org/documentation/books/gbbs-pro-2-2/">GBBS Pro 2.2</a> book from Call-A.P.P.L.E.
<br><br>
-dtr<br>
Support SSC's DTR (Data Terminal Ready) control bit<br><br>
-dcd<br>
Support SSC's DCD (Data Carrier Detect) status bit<br><br>
-dtr<br>
Support SSC's DSR (Data Set Ready) status bit<br><br>
For the SSC's 6551's Status register's DCD bit, use this switch to force AppleWin to use the state of the MS_RLSD_ON bit from GetCommModemStatus().<br><br>
-alt-enter=&lt;toggle-full-screen|open-apple-enter&gt;<br>
Define the behavior of Alt+Enter:
<ul>
<li>Either: Toggle between windowed and full screen video modes (default).
<li>Or: Allow the emulated Apple II to read the Enter key state when Alt (Open Apple key) is pressed.
</ul>
-rgb-card-invert-bit7<br>
Force the RGB card (in "Color (RGB Monitor)" video mode) to invert bit7 in MIX mode. Enables the correct rendering for Dragon Wars.
<br>
<br>
<P style="FONT-WEIGHT: bold">Debug arguments:
</P>
-l or -log<br>
Enable logging. Creates an AppleWin.log file<br><br>
Enable logging. Creates an AppleWin.log file.<br><br>
-m<br>
Disable DirectSound support<br><br>
Disable DirectSound support.<br><br>
-no-printscreen-dlg<br>
Suppress the warning message-box if AppleWin fails to capture the PrintScreen key<br><br>
Suppress the warning message-box if AppleWin fails to capture the PrintScreen key.<br><br>
-screenshot-and-exit<br>
For testing. Use in combination with -load-state.<br><br>
</body>
</html>

View File

@ -84,7 +84,11 @@
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Clock">
<param name="Local" value="Clock.html">
<param name="Local" value="clock.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Super Serial Card">
<param name="Local" value="card-ssc.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Uthernet network card">

View File

@ -27,5 +27,23 @@
</ul>
</li>
</ul>
When using a non-US (or UK) keyboard, certain keys can't be typed.
<ul>
<li>AltGr (or right Alt) needs to be used to type certain keys, eg:
<ul>
<li>'@' is AltGr+2 (for a Canadian-French keyboard).</li>
<li>'[' is AltGr+é (for an Italian keyboard).</li>
</ul>
<li>Some games or productivity software have an action based on the Open Apple (Alt) or Solid Apple (AltGr) keys, eg:
<ul>
<li>Lode Runner uses CTRL+@ to increase the lives.</li>
<li>AppleLogo // and AppleWorks 5.1 have problems when using an Italian keyboard.</li>
</ul>
<li>This dual function for AltGr (to both type a key and emulate Solid Apple) can cause problems such that the key (eg. '@') can never be typed.
<li>The workaround is to use the `-no-hook-alt` command line switch and configure Joystick 1 = "Keyboard (numpad)"; and then use the '0' and '.' keys for Open/Solid Apple.
</li>
</ul>
</body>
</html>

86
help/card-ssc.html Normal file
View File

@ -0,0 +1,86 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Super Serial Card</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body style="FONT-FAMILY: verdana; BACKGROUND-COLOR: rgb(255,255,255)" alink="#008000"
link="#008000" vlink="#008000">
<h2 style="COLOR: rgb(0,128,0)">Super Serial Card</h2>
<hr size="4">
<h3>Super Serial Card:</h3>
<p>AppleWin emulates a Super Serial Card (aka SSC) in slot-2, with the jumper block in the MODEM position.</p>
<p>The SSC can be configured to communicate externally either via the host PC's COM serial port or TCP port 1977.</p>
<p>See the <a href="cfg-config.html">Configuration</a> tab's 'Serial Port' menu to select a COM serial port or the TCP port.</p>
<p>The SSC currently has these <strong>hardcoded</strong> DIP switch settings:</p>
<ul>
<li>DIP SW1:
<ul>
<li>Baud rate = 9600
<li>Mode = CIC (ie. SSC's Communication Mode)
</ul>
<li>DIP SW2:
<ul>
<li>1 stop-bit
<li>8-bit byte size
<li>No parity
<li>Linefeed off
<li>Interrupts enabled
</ul>
</ul>
<p>Notes:</p>
<ul>
<li>The SSC emulation supports both Rx and Tx interrupts (for both COM and TCP modes), RTS/CTS, DSR/DTR, and the undocumented 115200 baud rate.
<li>For the TCP mode it doesn't matter what baud rate, stop-bit, byte size and parity are set to.
<ul>
<li>It always uses an unthrottled data-rate of 8-bit bytes (no stop-bit, no parity).
<li>When there's an active TCP connection, then the 6551's Status register has DCD,DSR bits clear (active low), and DIPSW2 has CTS bit clear (active low). When there's no TCP connection, then all these bits are set (inactive).
</ul>
<li>The TCP mode can expose buggy Rx interrupt handling code where the 6551's Status register is read more than once in the Interrupt Service Routine (ISR).
<ul>
<li>Details: TCP mode doesn't throttle the serial data-rate, so after reading the Status register (to clear the Rx interrupt) the Rx interrupt may get asserted immediately if there is more data in the TCP receive buffer, resulting in a missed interrupt (and therefore missed Rx data).
</ul>
<li>The 6551's Command register's DSR (bit0) must be set, to enable interrupts (Rx, Tx) along with the respective Rx and/or Tx bits (bit3:1). This is part of the 6551 specification, but (DSR bit) has only been enforced by AppleWin since 1.27.4.
</ul>
<p>Unsupported features are:</p>
<ul>
<li>Can't configure the DIP switches (not a problem, since most functions can be set in software).
<li>6551 ACIA Command register: Echo mode(bit4=1) and Transmit BRK (bit3:2=3).
<li>6551 ACIA Control register: external clock (bit4=0).
<li>6551 ACIA baud rates: 50, 75, 109.92, 134.58, 150 all map to 110 baud.
<li>6551 ACIA baud rate: 1800 maps to 2400 baud.
<li>6551 ACIA baud rate: 3600 maps to 4800 baud.
<li>6551 ACIA baud rate: 7200 maps to 9600 baud.
<li>6551 ACIA Status register's error bits: overrun, framing and parity (these are all hardcoded to 0).
<li>6551 ACIA Status register's DCD bit (Data Carrier Detect). This is just set the same as DSR.
<ul>
<li>NB. For COM mode, use command line -dcd to force AppleWin to use the state of the MS_RLSD_ON bit from GetCommModemStatus().
</ul>
<li>NMOS 6551 ACIA CTS bug: transmission of an already-started frame will stop immediately when CTS is taken false, the byte will be lost, and the TxD line will go to marking.
<ul>
<li>NB. The CMOS 6551's will finish the frame, so assume that AppleWin emulates a CMOS 6551.
</ul>
<li>AppleWin's 6502/65C02 emulation doesn't emulate the false read for STA $C088,X (where X=$20).
<ul>
<li>Don't do this to write to the 6551's Transmit register.
<li>On AppleWin this is fine, but on real hardware (in full duplex mode) you may falsely read (and clear) the 6551's Receive register.
<li>Instead (like the SSC's firmware) do this: STA $BFFF,Y (where Y=$A9).
</ul>
</ul>
<br>
<br>
<h4>Using TCP mode with the Apple // Game Server:</h4>
The TCP interface to the SSC can be used by the <a href="https://sourceforge.net/projects/a2gameserver">Apple // Game Server</a> (AGS).<br>
For details see the notes that comes with AGS, but in summary:<br>
<ul>
<li>Boot the Apple II to AppleSoft (ie. power on and hit Ctrl-Reset) and type IN#2.
<li>From a Windows DOS box, start AGS with "localhost 1977 apple2e". This will boot the emulated Apple II from AGS.
<li>Nb. Only Enhanced Apple //e is working at the moment.
</ul>
</body>
</html>

View File

@ -16,8 +16,8 @@
the predecessors of the Apple //e: the Apple ][ and Apple ][+. Besides running
with a different Apple system ROM, some differences are discussed below.<br>
<ul>
<li>Apple ][ : Non-autobooting, 64K machine, no lower-case, no 80-column, 6502 CPU
<li>Apple ][+ : Autobooting version of the Apple ][
<li>Apple ][ : 48K non-autostarting, Integer BASIC, no lower-case, no 80-column, 6502 CPU
<li>Apple ][+ : 64K autostarting, Applesoft BASIC version of the Apple ][
<li>Apple //e : 128K machine, lower-case, 80-column, 6502 CPU</li>
<li>Enhanced Apple //e : 128K machine, lower-case, 80-column, 65C02 CPU</li>
<li>Clone (specific model selectable from Advanced page)</li>
@ -33,12 +33,15 @@
video emulation to be used for the emulator. The differences are
discussed below.<br>
<ul>
<li><strong>Monochrome (custom) :</strong>&nbsp;This mode emulates a monochrome
monitor. You can choose your monochrome color from the <em>Monochrome Color</em>
button described below.
<li><strong>Color Monitor :</strong>&nbsp;This mode emulates a standard color monitor.
<li><strong>B&W TV :</strong>&nbsp;This mode emulates an NTSC black and white TV.
<li><strong>Monochrome (custom) :</strong>&nbsp;This mode emulates a monochrome monitor.<br>
You can choose your monochrome color from the <em>Monochrome Color</em> button described below.
<li><strong>Color (RGB Monitor) :</strong>&nbsp;This mode emulates a standard RBG color monitor.
<br>Text is sharp like a white monochrome monitor. Color graphics has only 16 colors (with no blurring or ringing).
<li><strong>Color (NTSC Monitor) :</strong>&nbsp;This mode emulates a standard NTSC color monitor.
<br>Text is sharp, but contains color artifacts. Color graphics has visible alternating color and black pixels.
<li><strong>Color TV :</strong>&nbsp;This mode emulates an NTSC color TV.
<br>All text and color graphics modes are blurry and have visible ringing.
<li><strong>B&W TV :</strong>&nbsp;This mode emulates an NTSC black and white TV.
<li><strong>Monochrome (Amber/Green/White) :</strong>&nbsp;Monochrome with specified color.
</ul>
@ -46,23 +49,21 @@
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>
<strong>Serial Port:</strong><br>
This option will remap the emulated Apple's serial port to your PC's
serial port (or TCP port 1977). The Apple Super Serial Card (SSC) is emulated in slot-2.<br>
The TCP interface to the Apple SSC can be used by the <a href="http://sourceforge.net/projects/a2gameserver">Apple // Game Server</a>.
For details see the notes that comes with AGS:<br>
<li>Boot the Apple II to AppleSoft (ie. power on and hit Ctrl-Reset) and type IN#2.
<li>From a Windows DOS box, start AGS with "localhost 1977 apple2e". This will boot the emulated Apple II from AGS.
<li>Nb. Only Enhanced Apple //e is working at the moment.
<br>
This option will remap the emulated Apple's serial port to your PC's serial port (or TCP port 1977).<br>
See <a href="card-ssc.html">Super Serial Card</a> for more details.<br>
<br>
<strong>Ethernet Settings...:</strong><br>

View File

@ -1,23 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Disk Settings</title>
</head>
<body style="background-color: rgb(255, 255, 255); font-family: verdana;" alink="#008000" link="#008000" vlink="#008000">
<h2 style="color: rgb(0, 128, 0);">Disk Settings</h2>
<hr size="4"><img style="width: 344px; height: 460px; float: right;" src="img/disk.png" alt="Disk settings" hspace="5" vspace="5">
<h3>Floppy Controller Settings:</h3>
<p><strong>Disk Access Speed:</strong><br>
Here you can choose the speed at which the system can access
@ -26,14 +16,14 @@ By default, you would want "Enhanced Speed" so that data can
be accessed as fast as possible. However, it is also possible that
certain programs might depend on the "Authentic Speed" to function
properly. This is the speed at which the real hardware
would&nbsp;access data from your drives.</p>
would&nbsp;access data from your drives.
</p>
<p><strong>Disk 1/2 drop-down menus:</strong><br>
These menus allow you to select floppy disk images (.dsk files) to
'insert' into the
emulated floppy drives 1 and 2. This can also be done during emulation by <a href="toolbar.html">using the toolbar</a> or using the F3/F4 keys. Diskettes can be swapped by pressing F5 during emulation. You can also eject images from this menu.</p>
emulated floppy drives 1 and 2. This can also be done during emulation by <a href="toolbar.html">using the toolbar</a> or using the F3/F4 keys. Diskettes can be swapped by pressing F5 during emulation. You can also eject images from this menu.
</p>
<h3>Hard disk Controller Settings:</h3>
@ -42,16 +32,20 @@ A hard disk controller (or interface) card can be plugged in to slot 7 by checki
See <a href="ddi-harddisk.html">Hard disk Images</a> for more details.
</p>
<p><strong>Swap:</strong><br>
Swap the hard disk images.<br>
WARNING! If done during image access this could result in undefined behavior (eg. Apple II program crash) or data corruption on the image.
</p>
<p><strong>HDD 1/2 drop-down menus:</strong><br>
These menus allow you to select hard disk images (eg. .hdv files) to
connect to the emulated hard disk controller card. You can also unplug images from this menu.</p>
<strong>Path to CiderPress:</strong><br>
connect to the emulated hard disk controller card. You can also unplug images from this menu.
</p>
<p><strong>Path to CiderPress:</strong><br>
Use this to specify where CiderPress is installed.<br>
The right mouse button context menu on either of the drive icons allows you to open CiderPress with the image in the drive.
</p>
</body>
</html>

View File

@ -38,14 +38,15 @@
<li>0C: $C00C - Col40/80 (inverse indicates state of 80COL)
<li>0E: $C00E - ASC/MOUS (inverse indicates state of ALTCHARSET)
<li>80: $C080-C087: B2/M R/W (Language Card Bank2)
<li>88: $C088-C08F: B1/M rNN (Language Card Bank1 and RAMworks 64K bank number)
<li>88: $C088-C08F: B1/M rNN (Language Card Bank1 and RamWorks 64K bank number)
<ul>
<li>'B2' or 'B1' is inverse when that LC bank is enabled.
<li>If 'M' is inverse: ROM is active for reading.
<li>If 'M' is not inverse: LC2 or LC1 RAM is active.
<li>If 'W' is inverse: RAM is write enabled.
<li>If 'W' is not inverse: RAM is write protected.
<li>'rNN' will appear if a RAMworks 64K bank is active.
<li>'rNN' will appear if a RamWorks 64K bank is active.
<li>'sNN' will appear if a Saturn 16K bank is active.
</ul>
</ul>
</p>

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Transferring Disk Images</title>
<title>Hard Disk Images</title>
</head>
@ -20,8 +20,9 @@
Just check <span style="font-style: italic;">Enable hard disk controller in slot 7</span>.</p>
<p>There is provision to connect two hard disks to this card.
This is done by using .hdv files on your PC.
This is done by using .hdv or 800KB .2mg files on your PC.
Each hard disk can have a maximum capacity of 32MB.</p>
NB. The hard disk controller supports both fixed-disk types (up to 32MB) and 3.5" floppy types (800KB).
<p>On booting, the Apple will <span style="text-decoration: underline;">always</span>
attempt to
@ -33,9 +34,6 @@ interface card in it).</p>
<p>To boot a floppy disk with the hard disk card enabled, either hold down the Open-Apple key during an Apple II restart or
issue PR#6 from an AppleSoft prompt.</p>
<p>You can download sample .hdv
images from Asimov (eg. <a target="_blank" href="ftp://public.asimov.net/pub/apple_II/">ftp://public.asimov.net/pub/apple_II/images/utility/misc/hardpc.zip</a>).</p>
<p style="font-weight: bold;">Warnings:</p>
<ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -29,7 +29,7 @@
The Solid Apple key was introduced on the Apple //e and later renamed to the
Option key. This key is emulated with the PC's
<span style="font-style: italic;">Right Alt</span>
key, which is in the same position as the Solid Apple key on the original //e.
key (or <span style="font-style: italic;">Alt Gr</span> key), which is in the same position as the Solid Apple key on the original //e.
</p>
<p><span style="font-weight: bold;">Numeric Keypad:</span><br>
The numeric keypad, introduced on the Extended Keyboard //e, is emulated
@ -73,7 +73,9 @@
<p><span style="font-weight: bold;">Ctrl+PrintScrn:</span><br>
Copy the text screen (auto detect 40/80 columns) to the clipboard.</p>
<p><span style="font-weight: bold;">Alt+Enter:</span><br>
Toggle between windowed and full screen video modes. (NB. Will conflict with emulation when doing Open Apple + Enter.)</p>
Default: Toggle between windowed and full screen video modes. (NB. Will conflict with emulation and prevent Open Apple + Enter from being readable. Use the <a href="CommandLine.html">Command Line</a> switch to allow Open Apple + Enter to be readable.)</p>
<p><span style="font-weight: bold;">Ctrl+Left Mouse Button:</span><br>
This will show the Windows mouse cursor when emulating an Apple joystick with the PC's mouse or using a Mouse card.<br>
<p><span style="font-weight: bold;">Function Keys F1-F8:</span><br>
These PC function keys correspond to buttons on the <a href="toolbar.html">toolbar</a>.</p>
<p><span style="font-weight: bold;">Function Key F2 + Ctrl:</span><br>
@ -86,11 +88,9 @@
through the configuration dialog. <br>NB. Use Shift+F9 to reverse-cycle the display modes.</p>
<p><span style="font-weight: bold;">Function Key F9 + Ctrl + Shift:</span><br>
This PC function key combo will toggle 50% scanline mode</p>
<p><span style="font-weight: bold;">Function Key F10 (or Ctrl+left mouse button):</span><br>
This PC function key will stop emulating an Apple joystick with the PC's mouse.<br>
In Pravets 8A emulation mode it servers as Caps Lock and Ctrl+F10 shall
be used to stop emulating an Apple joystick with the PC's mouse.</p>
<p><span style="font-weight: bold;">Function Keys F11-F12:</span><br>
These PC function keys correspond to saving/loading a <a href="savestate.html">save-state</a>
file.</p>
<p><span style="font-weight: bold;">Function Key F10:</span><br>
In //e or Enhanced //e emulation mode it will emulate the rocker switch for European video ROM selection. Use the <a href="CommandLine.html">Command Line</a> switch to use an alternate European video ROM file.<br>
In Pravets 8A emulation mode it servers as Caps Lock.</p>
<p><span style="font-weight: bold;">Function Keys F11-F12:</span><br>
These PC function keys correspond to saving/loading a <a href="savestate.html">save-state</a> file.</p>
</body></html>

View File

@ -13,13 +13,15 @@
<p>The complete<sub style="FONT-WEIGHT: bold">1</sub> Apple //e state can be saved
to a PC file at any time. This can be useful for continuity across AppleWin
sessions or to help with games that don't have a save option.</p>
<p>This is controlled by the AppleWin Configuration tab labelled <em>Advanced</em>.</p>
<p>The state can optionally be automatically saved on AppleWin exit, and (automatically) restored on AppleWin restart.</p>
<p>This is all controlled by the AppleWin <a href="cfg-advanced.html">Configuration</a> tab labeled <em>Advanced</em>.</p>
<p style="FONT-WEIGHT: bold">Details:</p>
<p>The entire Apple //e state is saved to a human-readable (.yaml) file.</p>
<p><span style="FONT-WEIGHT: bold">1</span>
The following are persisted to the file:
<ul>
<li>Apple model: ][, ][+, //e, Enhanced //e or clone (eg. Pravets)</li>
<li>Apple ]['s slot-0 language card: 16K Language Card, Saturn 64K or Saturn 128K</li>
<li>Apple //e's auxiliary card: 80 Column, Extended 80 Column or RamWorks III</li>
<li>Disk][ (even during r/w operation)</li>
<li>Hard disk (even during r/w operation)</li>
@ -28,12 +30,16 @@
<li>Mouse card</li>
<li>CP/M SoftCard</li>
<li>Parallel Printer card</li>
<li>Super Serial card</li>
</ul>
The following are not yet persisted to the file:
<ul>
<li>Uthernet card</li>
<li>SAM card</li>
<li>No-Slot clock (there's nothing to persist)</li>
<li>Using The Freeze's F8 ROM</li>
<li>Alternate F8 ROM</li>
<li>Alternate video ROM</li>
</ul>
<p>Note: Only the file names of the disk images are stored in the .yaml file (not the
full path). This allows you to move your disk image around or distribute them.

View File

@ -12,7 +12,7 @@
Copyright © 1994-1996, Michael O'Brien<br>
Copyright © 2001, Oliver Schmidt<br>
Copyright © 2002-2005, Tom Charlesworth<BR>
Copyright © 2006-2018, Tom Charlesworth, Michael Pohoreski, Nick Westgate, Linards Ticmanis
Copyright © 2006-2019, Tom Charlesworth, Michael Pohoreski, Nick Westgate, Linards Ticmanis
<br>
<br>
<a href="applewin-team.html">AppleWin team</a>
@ -30,6 +30,7 @@
<li><a href="savestate.html">Save-state Files</a>
<li><a href="sound.html">Sound</a>
<li><a href="clock.html">Clock</a>
<li><a href="card-ssc.html">Super Serial card</a>
<li><a href="uthernet.html">Uthernet network card</a>
<li><a href="CommandLine.html">Command line</a>
<li><a href="configuration.html">AppleWin Configuration</a>

View File

@ -1,6 +1,7 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#include "version.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
@ -88,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,
@ -174,6 +176,7 @@ BEGIN
GROUPBOX "Hard Disk Drives",IDC_STATIC,5,83,200,64
CONTROL "&Enable hard disk controller in slot 7",IDC_HDD_ENABLE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,96,122,10
PUSHBUTTON "Swap",IDC_HDD_SWAP,156,92,40,14
LTEXT "&Path to CiderPress:",IDC_STATIC,7,155,74,8
EDITTEXT IDC_CIDERPRESS_FILENAME,7,165,143,12,ES_AUTOHSCROLL | ES_READONLY
PUSHBUTTON "&Browse...",IDC_CIDERPRESS_BROWSE,156,164,50,14
@ -252,8 +255,8 @@ DISK_ICON ICON "DISK.ICO"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,27,3,0
PRODUCTVERSION 1,27,3,0
FILEVERSION APPLEWIN_VERSION
PRODUCTVERSION APPLEWIN_VERSION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -271,12 +274,12 @@ BEGIN
VALUE "Comments", "https://github.com/AppleWin"
VALUE "CompanyName", "AppleWin"
VALUE "FileDescription", "Apple //e Emulator for Windows"
VALUE "FileVersion", "1, 27, 3, 0"
VALUE "FileVersion", APPLEWIN_VERSION_STR
VALUE "InternalName", "APPLEWIN"
VALUE "LegalCopyright", " 1994-2018 Michael O'Brien, Oliver Schmidt, Tom Charlesworth, Michael Pohoreski, Nick Westgate, Linards Ticmanis"
VALUE "LegalCopyright", " 1994-2019 Michael O'Brien, Oliver Schmidt, Tom Charlesworth, Michael Pohoreski, Nick Westgate, Linards Ticmanis"
VALUE "OriginalFilename", "APPLEWIN.EXE"
VALUE "ProductName", "Apple //e Emulator"
VALUE "ProductVersion", "1, 27, 3, 0"
VALUE "ProductVersion", APPLEWIN_VERSION_STR
END
END
BLOCK "VarFileInfo"

View File

@ -66,6 +66,7 @@
#define IDC_EDIT_HDD1 1019
#define IDC_EDIT_HDD2 1020
#define IDC_HDD_ENABLE 1021
#define IDC_HDD_SWAP 1022
#define IDC_SPIN_XTRIM 1026
#define IDC_SPIN_YTRIM 1027
#define IDC_PHASOR_ENABLE 1029
@ -114,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

5
resource/version.h Normal file
View File

@ -0,0 +1,5 @@
#define APPLEWIN_VERSION 1,28,5,0
#define xstr(a) str(a)
#define str(a) #a
#define APPLEWIN_VERSION_STR xstr(APPLEWIN_VERSION)

View File

@ -36,6 +36,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "Frame.h"
#include "Harddisk.h"
#include "Joystick.h"
#include "Keyboard.h"
#include "LanguageCard.h"
#include "Log.h"
#include "Memory.h"
#include "Mockingboard.h"
@ -51,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"
@ -59,6 +62,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
static UINT16 g_AppleWinVersion[4] = {0};
char VERSIONSTRING[16] = "xx.yy.zz.ww";
static UINT16 g_OldAppleWinVersion[4] = {0};
const TCHAR *g_pAppTitle = NULL;
@ -78,6 +82,10 @@ TCHAR g_sProgramDir[MAX_PATH] = TEXT(""); // Directory of where AppleWin exe
TCHAR g_sDebugDir [MAX_PATH] = TEXT(""); // TODO: Not currently used
TCHAR g_sScreenShotDir[MAX_PATH] = TEXT(""); // TODO: Not currently used
bool g_bCapturePrintScreenKey = true;
static bool g_bHookSystemKey = true;
static bool g_bHookAltTab = false;
static bool g_bHookAltGrControl = false;
TCHAR g_sCurrentDir[MAX_PATH] = TEXT(""); // Also Starting Dir. Debugger uses this when load/save
bool g_bRestart = false;
bool g_bRestartFullScreen = false;
@ -98,8 +106,10 @@ IPropertySheet& sg_PropertySheet = * new CPropertySheet;
CSuperSerialCard sg_SSC;
CMouseInterface sg_Mouse;
SS_CARDTYPE g_Slot4 = CT_Empty;
SS_CARDTYPE g_Slot5 = CT_Empty;
SS_CARDTYPE g_Slot0 = CT_LanguageCard; // Just for Apple II or II+ or similar clones
SS_CARDTYPE g_Slot4 = CT_Empty;
SS_CARDTYPE g_Slot5 = CT_Empty;
SS_CARDTYPE g_SlotAux = CT_Extended80Col; // For Apple //e and above
HANDLE g_hCustomRomF8 = INVALID_HANDLE_VALUE; // Cmd-line specified custom ROM at $F800..$FFFF
static bool g_bCustomRomF8Failed = false; // Set if custom ROM file failed
@ -125,13 +135,16 @@ void LogFileTimeUntilFirstKeyReadReset(void)
}
// Log the time from emulation restart/reboot until the first key read: BIT $C000
// . NB. AZTEC.DSK does prior LDY $C000 reads, but the BIT $C000 is at the "Press any key" message
// . AZTEC.DSK (DOS 3.3) does prior LDY $C000 reads, but the BIT $C000 is at the "Press any key" message
// . Phasor1.dsk / ProDOS 1.1.1: PC=E797: B1 50: LDA ($50),Y / "Select an Option:" message
void LogFileTimeUntilFirstKeyRead(void)
{
if (!g_fh || bLogKeyReadDone)
return;
if (mem[regs.pc-3] != 0x2C) // bit $c000
if ( (mem[regs.pc-3] != 0x2C) // AZTEC: bit $c000
&& !((regs.pc-2) == 0xE797 && mem[regs.pc-2] == 0xB1 && mem[regs.pc-1] == 0x50) // Phasor1: lda ($50),y
)
return;
DWORD dwTime = GetTickCount() - dwLogKeyReadTickStart;
@ -154,9 +167,9 @@ void SetApple2Type(eApple2Type type)
SetMainCpuDefault(type);
}
const UINT16* GetAppleWinVersion(void)
const UINT16* GetOldAppleWinVersion(void)
{
return &g_AppleWinVersion[0];
return g_OldAppleWinVersion;
}
bool GetLoadedSaveStateFlag(void)
@ -169,6 +182,11 @@ void SetLoadedSaveStateFlag(const bool bFlag)
g_bLoadedSaveState = bFlag;
}
bool GetHookAltGrControl(void)
{
return g_bHookAltGrControl;
}
static void ResetToLogoMode(void)
{
g_nAppMode = MODE_LOGO;
@ -433,7 +451,7 @@ void EnterMessageLoop(void)
else if (g_nAppMode == MODE_PAUSED)
Sleep(1); // Stop process hogging CPU - 1ms, as need to fade-out speaker sound buffer
else if (g_nAppMode == MODE_LOGO)
Sleep(100); // Stop process hogging CPU
Sleep(1); // Stop process hogging CPU (NB. don't delay for too long otherwise key input can be slow in other apps - GH#569)
}
}
}
@ -821,7 +839,7 @@ void RegisterExtensions(void)
//===========================================================================
// NB. On a restart, it's OK to call RegisterHotKey() again since the old g_hFrameWindow has been destroyed
static void AppleWin_RegisterHotKeys(void)
static void RegisterHotKeys(void)
{
BOOL bStatus[3] = {0,0,0};
@ -865,6 +883,115 @@ static void AppleWin_RegisterHotKeys(void)
}
}
//---------------------------------------------------------------------------
static HINSTANCE g_hinstDLL = 0;
static HHOOK g_hhook = 0;
static HANDLE g_hHookThread = NULL;
static DWORD g_HookThreadId = 0;
// Pre: g_hFrameWindow must be valid
static bool HookFilterForKeyboard()
{
g_hinstDLL = LoadLibrary(TEXT("HookFilter.dll"));
_ASSERT(g_hFrameWindow);
typedef void (*RegisterHWNDProc)(HWND, bool, bool);
RegisterHWNDProc RegisterHWND = (RegisterHWNDProc) GetProcAddress(g_hinstDLL, "RegisterHWND");
if (RegisterHWND)
RegisterHWND(g_hFrameWindow, g_bHookAltTab, g_bHookAltGrControl);
HOOKPROC hkprcLowLevelKeyboardProc = (HOOKPROC) GetProcAddress(g_hinstDLL, "LowLevelKeyboardProc");
g_hhook = SetWindowsHookEx(
WH_KEYBOARD_LL,
hkprcLowLevelKeyboardProc,
g_hinstDLL,
0);
if (g_hhook != 0 && g_hFrameWindow != 0)
return true;
std::string msg("Failed to install hook filter for system keys");
DWORD dwErr = GetLastError();
MessageBox(GetDesktopWindow(), msg.c_str(), "Warning", MB_ICONASTERISK | MB_OK);
msg += "\n";
LogFileOutput(msg.c_str());
return false;
}
static void UnhookFilterForKeyboard()
{
UnhookWindowsHookEx(g_hhook);
FreeLibrary(g_hinstDLL);
}
static DWORD WINAPI HookThread(LPVOID lpParameter)
{
if (!HookFilterForKeyboard())
return -1;
MSG msg;
while(GetMessage(&msg, NULL, 0, 0) > 0)
{
if (msg.message == WM_QUIT)
break;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
UnhookFilterForKeyboard();
return 0;
}
static bool InitHookThread()
{
g_hHookThread = CreateThread(NULL, // lpThreadAttributes
0, // dwStackSize
(LPTHREAD_START_ROUTINE) HookThread,
0, // lpParameter
0, // dwCreationFlags : 0 = Run immediately
&g_HookThreadId); // lpThreadId
if (g_hHookThread == NULL)
return false;
return true;
}
static void UninitHookThread()
{
if (g_hHookThread)
{
if (!PostThreadMessage(g_HookThreadId, WM_QUIT, 0, 0))
{
_ASSERT(0);
return;
}
do
{
DWORD dwExitCode;
if (GetExitCodeThread(g_hHookThread, &dwExitCode))
{
if(dwExitCode == STILL_ACTIVE)
Sleep(10);
else
break;
}
}
while(1);
CloseHandle(g_hHookThread);
g_hHookThread = NULL;
g_HookThreadId = 0;
}
}
//===========================================================================
LPSTR GetCurrArg(LPSTR lpCmdLine)
@ -1010,6 +1137,29 @@ static void InsertHardDisks(LPSTR szImageName_harddisk[NUM_HARDDISKS], bool& bBo
MessageBox(g_hFrameWindow, "Failed to insert harddisk(s) - see log file", "Warning", MB_ICONASTERISK | MB_OK);
}
static bool CheckOldAppleWinVersion(void)
{
char szOldAppleWinVersion[sizeof(VERSIONSTRING)] = {0};
RegLoadString(TEXT(REG_CONFIG), TEXT(REGVALUE_VERSION), 1, szOldAppleWinVersion, sizeof(szOldAppleWinVersion));
const bool bShowAboutDlg = strcmp(szOldAppleWinVersion, VERSIONSTRING) != 0;
// version: xx.yy.zz.ww
// offset : 0123456789
char* p0 = szOldAppleWinVersion;
szOldAppleWinVersion[strlen(szOldAppleWinVersion)] = '.'; // Overwrite null terminator with '.'
for (UINT i=0; i<4; i++)
{
char* p1 = strstr(p0, ".");
if (!p1)
break;
*p1 = 0;
g_OldAppleWinVersion[i] = atoi(p0);
p0 = p1+1;
}
return bShowAboutDlg;
}
//---------------------------------------------------------------------------
int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
@ -1018,12 +1168,19 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
bool bSetFullScreen = false;
bool bBoot = false;
bool bChangedDisplayResolution = false;
bool bSlot0LanguageCard = false;
bool bSlot7Empty = false;
UINT bestWidth = 0, bestHeight = 0;
LPSTR szImageName_drive[NUM_DRIVES] = {NULL,NULL};
LPSTR szImageName_harddisk[NUM_HARDDISKS] = {NULL,NULL};
LPSTR szSnapshotName = NULL;
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;
LPSTR szScreenshotFilename = NULL;
while (*lpCmdLine)
{
@ -1031,12 +1188,7 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
if (((strcmp(lpCmdLine, "-l") == 0) || (strcmp(lpCmdLine, "-log") == 0)) && (g_fh == NULL))
{
g_fh = fopen("AppleWin.log", "a+t"); // Open log file (append & text mode)
setvbuf(g_fh, NULL, _IONBF, 0); // No buffering (so implicit fflush after every fprintf)
CHAR aDateStr[80], aTimeStr[80];
GetDateFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, (LPTSTR)aDateStr, sizeof(aDateStr));
GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, (LPTSTR)aTimeStr, sizeof(aTimeStr));
fprintf(g_fh, "*** Logging started: %s %s\n", aDateStr, aTimeStr);
LogInit();
}
else if (strcmp(lpCmdLine, "-noreg") == 0)
{
@ -1133,45 +1285,56 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
#ifdef RAMWORKS
else if (strcmp(lpCmdLine, "-r") == 0) // RamWorks size [1..127]
{
g_eMemType = MEM_TYPE_RAMWORKS;
lpCmdLine = GetCurrArg(lpNextArg);
lpNextArg = GetNextArg(lpNextArg);
g_uMaxExPages = atoi(lpCmdLine);
if (g_uMaxExPages > kMaxExMemoryBanks)
g_uMaxExPages = kMaxExMemoryBanks;
uRamWorksExPages = atoi(lpCmdLine);
if (uRamWorksExPages > kMaxExMemoryBanks)
uRamWorksExPages = kMaxExMemoryBanks;
else
if (g_uMaxExPages < 1)
g_uMaxExPages = 1;
if (uRamWorksExPages < 1)
uRamWorksExPages = 1;
}
#endif
#ifdef SATURN
else if (strcmp(lpCmdLine, "-saturn") == 0) // 64 = Saturn 64K (4 banks), 128 = Saturn 128K (8 banks)
else if (strcmp(lpCmdLine, "-s0") == 0)
{
g_eMemType = MEM_TYPE_SATURN;
lpCmdLine = GetCurrArg(lpNextArg);
lpNextArg = GetNextArg(lpNextArg);
// " The boards consist of 16K banks of memory
// (4 banks for the 64K board,
// 8 banks for the 128K), accessed one at a time"
g_uSaturnTotalBanks = atoi(lpCmdLine) / 16; // number of 16K Banks [1..8]
if (g_uSaturnTotalBanks > 8)
g_uSaturnTotalBanks = 8;
else
if (g_uSaturnTotalBanks < 1)
g_uSaturnTotalBanks = 1;
if (strcmp(lpCmdLine, "saturn") == 0 || strcmp(lpCmdLine, "saturn128") == 0)
uSaturnBanks = Saturn128K::kMaxSaturnBanks;
else if (strcmp(lpCmdLine, "saturn64") == 0)
uSaturnBanks = Saturn128K::kMaxSaturnBanks/2;
else if (strcmp(lpCmdLine, "languagecard") == 0 || strcmp(lpCmdLine, "lc") == 0)
bSlot0LanguageCard = true;
}
#endif
else if (strcmp(lpCmdLine, "-f8rom") == 0) // Use custom 2K ROM at [$F800..$FFFF]
{
lpCmdLine = GetCurrArg(lpNextArg);
lpNextArg = GetNextArg(lpNextArg);
if (g_hCustomRomF8 != INVALID_HANDLE_VALUE) // Stop resource leak if -f8rom is specified twice!
CloseHandle(g_hCustomRomF8);
g_hCustomRomF8 = CreateFile(lpCmdLine, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL);
if ((g_hCustomRomF8 == INVALID_HANDLE_VALUE) || (GetFileSize(g_hCustomRomF8, NULL) != 0x800))
g_bCustomRomF8Failed = true;
}
else if (strcmp(lpCmdLine, "-videorom") == 0) // Use 2K (for II/II+). Use 4K,8K or 16K video ROM (for Enhanced //e)
{
lpCmdLine = GetCurrArg(lpNextArg);
lpNextArg = GetNextArg(lpNextArg);
if (!ReadVideoRomFile(lpCmdLine))
{
std::string msg = "Failed to load video rom (not found or not exactly 2/4/8/16KiB)\n";
LogFileOutput("%s", msg.c_str());
MessageBox(g_hFrameWindow, msg.c_str(), TEXT("AppleWin Error"), MB_OK);
}
else
{
SetVideoRomRockerSwitch(true); // Use PAL char set
}
}
else if (strcmp(lpCmdLine, "-printscreen") == 0) // Turn on display of the last filename print screen was saved to
{
g_bDisplayPrintScreenFileName = true;
@ -1184,6 +1347,26 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
{
g_bShowPrintScreenWarningDialog = false;
}
else if (strcmp(lpCmdLine, "-no-hook-system-key") == 0) // Don't hook the System keys (eg. Left-ALT+ESC/SPACE/TAB) GH#556
{
g_bHookSystemKey = false;
}
else if (strcmp(lpCmdLine, "-hook-alt-tab") == 0) // GH#556
{
g_bHookAltTab = true;
}
else if (strcmp(lpCmdLine, "-hook-altgr-control") == 0) // GH#556
{
g_bHookAltGrControl = true;
}
else if (strcmp(lpCmdLine, "-altgr-sends-wmchar") == 0) // GH#625
{
KeybSetAltGrSendsWM_CHAR(true);
}
else if (strcmp(lpCmdLine, "-no-hook-alt") == 0) // GH#583
{
JoySetHookAltKeys(false);
}
else if (strcmp(lpCmdLine, "-spkr-inc") == 0)
{
lpCmdLine = GetCurrArg(lpNextArg);
@ -1210,23 +1393,38 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
{
g_bMultiMon = true;
}
else if (strcmp(lpCmdLine, "-dcd") == 0) // GH#386
else if ((strcmp(lpCmdLine, "-dcd") == 0) || (strcmp(lpCmdLine, "-modem") == 0)) // GH#386
{
sg_SSC.SupportDCD(true);
}
else if (strcmp(lpCmdLine, "-dsr") == 0) // GH#386
else if (strcmp(lpCmdLine, "-alt-enter=toggle-full-screen") == 0) // GH#556
{
sg_SSC.SupportDSR(true);
SetAltEnterToggleFullScreen(true);
}
else if (strcmp(lpCmdLine, "-dtr") == 0) // GH#386
else if (strcmp(lpCmdLine, "-alt-enter=open-apple-enter") == 0) // GH#556
{
sg_SSC.SupportDTR(true);
SetAltEnterToggleFullScreen(false);
}
else if (strcmp(lpCmdLine, "-modem") == 0) // GH#386
else if (strcmp(lpCmdLine, "-video-mode=rgb-monitor") == 0) // GH#616
{
sg_SSC.SupportDCD(true);
sg_SSC.SupportDSR(true);
sg_SSC.SupportDTR(true);
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 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);
lpNextArg = GetNextArg(lpNextArg);
}
else // unsupported
{
@ -1280,6 +1478,8 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
unsigned long fix_minor = g_AppleWinVersion[3] = pFixedFileInfo->dwFileVersionLS & 0xffff;
sprintf(VERSIONSTRING, "%d.%d.%d.%d", major, minor, fix, fix_minor); // potential buffer overflow
}
delete [] pVerInfoBlock;
}
LogFileOutput("AppleWin version: %s\n", VERSIONSTRING);
@ -1332,9 +1532,38 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
g_bRestart = false;
ResetToLogoMode();
// NB. g_OldAppleWinVersion needed by LoadConfiguration() -> Config_Load_Video()
const bool bShowAboutDlg = CheckOldAppleWinVersion(); // Post: g_OldAppleWinVersion
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)
{
SetRamWorksMemorySize(uRamWorksExPages);
SetExpansionMemType(CT_RamWorksIII);
uRamWorksExPages = 0; // Don't reapply after a restart
}
#endif
if (uSaturnBanks)
{
SetSaturnMemorySize(uSaturnBanks); // Set number of banks before constructing Saturn card
SetExpansionMemType(CT_Saturn128K);
uSaturnBanks = 0; // Don't reapply after a restart
}
if (bSlot0LanguageCard)
{
SetExpansionMemType(CT_LanguageCard);
bSlot0LanguageCard = false; // Don't reapply after a restart
}
DebugInitialize();
LogFileOutput("Main: DebugInitialize()\n");
@ -1364,10 +1593,7 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
MemInitialize();
LogFileOutput("Main: MemInitialize()\n");
char szOldAppleWinVersion[sizeof(VERSIONSTRING)] = {0};
RegLoadString(TEXT(REG_CONFIG), TEXT(REGVALUE_VERSION), 1, szOldAppleWinVersion, sizeof(szOldAppleWinVersion));
const bool bShowAboutDlg = strcmp(szOldAppleWinVersion, VERSIONSTRING) != 0;
// Show About dialog after creating main window (need g_hFrameWindow)
if (bShowAboutDlg)
{
if (!AboutDlg())
@ -1376,10 +1602,17 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
RegSaveString(TEXT(REG_CONFIG), TEXT(REGVALUE_VERSION), 1, VERSIONSTRING); // Only save version after user accepts license
}
// PrintScrn support
if (g_bCapturePrintScreenKey)
AppleWin_RegisterHotKeys(); // needs valid g_hFrameWindow
LogFileOutput("Main: AppleWin_RegisterHotKeys()\n");
{
RegisterHotKeys(); // needs valid g_hFrameWindow
LogFileOutput("Main: RegisterHotKeys()\n");
}
if (g_bHookSystemKey)
{
if (InitHookThread()) // needs valid g_hFrameWindow (for message pump)
LogFileOutput("Main: HookFilterForKeyboard()\n");
}
// Need to test if it's safe to call ResetMachineState(). In the meantime, just call DiskReset():
DiskReset(); // Switch from a booting A][+ to a non-autostart A][, so need to turn off floppy motor
@ -1395,7 +1628,9 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
if (g_bCustomRomF8Failed)
{
MessageBox(g_hFrameWindow, "Failed to load custom F8 rom (not found or not exactly 2KB)", TEXT("AppleWin Error"), MB_OK);
std::string msg = "Failed to load custom F8 rom (not found or not exactly 2KiB)\n";
LogFileOutput("%s", msg.c_str());
MessageBox(g_hFrameWindow, msg.c_str(), TEXT("AppleWin Error"), MB_OK);
bShutdown = true;
}
@ -1431,6 +1666,12 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
LogFileOutput("Main: Snapshot_Startup()\n");
}
if (szScreenshotFilename)
{
Video_RedrawAndTakeScreenShot(szScreenshotFilename);
bShutdown = true;
}
if (bShutdown)
{
PostMessage(g_hFrameWindow, WM_DESTROY, 0, 0); // Close everything down
@ -1486,6 +1727,12 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
DSUninit();
LogFileOutput("Main: DSUninit()\n");
if (g_bHookSystemKey)
{
UninitHookThread();
LogFileOutput("Main: UnhookFilterForKeyboard()\n");
}
}
while (g_bRestart);
@ -1502,12 +1749,7 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int)
tfe_shutdown();
LogFileOutput("Exit: tfe_shutdown()\n");
if (g_fh)
{
fprintf(g_fh,"*** Logging ended\n\n");
fclose(g_fh);
g_fh = NULL;
}
LogDone();
RiffFinishWriteFile();

View File

@ -9,7 +9,7 @@ void LogFileTimeUntilFirstKeyRead(void);
void SetCurrentCLK6502();
bool SetCurrentImageDir(const char* pszImageDir);
extern const UINT16* GetAppleWinVersion(void);
extern const UINT16* GetOldAppleWinVersion(void);
extern char VERSIONSTRING[]; // Constructed in WinMain()
extern const TCHAR *g_pAppTitle;
@ -30,6 +30,7 @@ extern HINSTANCE g_hInstance;
extern AppMode_e g_nAppMode;
bool GetLoadedSaveStateFlag(void);
void SetLoadedSaveStateFlag(const bool bFlag);
bool GetHookAltGrControl(void);
extern TCHAR g_sProgramDir[MAX_PATH];
extern TCHAR g_sCurrentDir[MAX_PATH];
@ -48,8 +49,10 @@ extern bool g_bDisableDirectSound; // Cmd line switch: don't init DS (s
extern bool g_bDisableDirectSoundMockingboard; // Cmd line switch: don't init MB support
extern int g_nMemoryClearType; // Cmd line switch: use specific MIP (Memory Initialization Pattern)
extern SS_CARDTYPE g_Slot0; // LC or Saturn in slot0
extern SS_CARDTYPE g_Slot4; // Mockingboard, Z80, Mouse in slot4
extern SS_CARDTYPE g_Slot5; // Mockingboard, Z80, in slot5
extern SS_CARDTYPE g_SlotAux;
extern HANDLE g_hCustomRomF8; // NULL if no custom rom

View File

@ -427,6 +427,13 @@ static __forceinline void CheckInterruptSources(ULONG uExecutedCycles)
}
}
// GH#608: IRQ needs to occur within 17 cycles (6 opcodes) of configuring the timer interrupt
void CpuAdjustIrqCheck(UINT uCyclesUntilInterrupt)
{
if (uCyclesUntilInterrupt < IRQ_CHECK_TIMEOUT)
g_nIrqCheckTimeout = uCyclesUntilInterrupt;
}
//===========================================================================
#include "CPU/cpu6502.h" // MOS 6502
@ -650,22 +657,6 @@ void CpuReset()
//===========================================================================
void CpuSetSnapshot_v1(const BYTE A, const BYTE X, const BYTE Y, const BYTE P, const BYTE SP, const USHORT PC, const unsigned __int64 CumulativeCycles)
{
regs.a = A;
regs.x = X;
regs.y = Y;
regs.ps = P | (AF_RESERVED | AF_BREAK);
regs.sp = ((USHORT)SP) | 0x100;
regs.pc = PC;
CpuIrqReset();
CpuNmiReset();
g_nCumulativeCycles = CumulativeCycles;
}
//
#define SS_YAML_KEY_CPU_TYPE "Type"
#define SS_YAML_KEY_REGA "A"
#define SS_YAML_KEY_REGX "X"

View File

@ -14,6 +14,7 @@ struct regsrec
extern regsrec regs;
extern unsigned __int64 g_nCumulativeCycles;
void CpuAdjustIrqCheck(UINT uCyclesUntilInterrupt);
void CpuDestroy ();
void CpuCalcCycles(ULONG nExecutedCycles);
DWORD CpuExecute(const DWORD uCycles, const bool bVideoUpdate);
@ -27,7 +28,6 @@ void CpuNmiReset();
void CpuNmiAssert(eIRQSRC Device);
void CpuNmiDeassert(eIRQSRC Device);
void CpuReset ();
void CpuSetSnapshot_v1(const BYTE A, const BYTE X, const BYTE Y, const BYTE P, const BYTE SP, const USHORT PC, const unsigned __int64 CumulativeCycles);
void CpuSaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
void CpuLoadSnapshot(class YamlLoadHelper& yamlLoadHelper);

View File

@ -20,7 +20,6 @@ const DWORD dwClksPerFrame = uCyclesPerLine * uLinesPerFrame; // 17030
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define RAMWORKS // 8MB RamWorks III support
//#define SATURN // SATURN 128K
// Use a base freq so that DirectX (or sound h/w) doesn't have to up/down-sample
// Assume base freqs are 44.1KHz & 48KHz
@ -105,13 +104,15 @@ 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"
#define REGVALUE_CUSTOM_SPEED "Custom Speed"
#define REGVALUE_EMULATION_SPEED "Emulation Speed"
#define REGVALUE_WINDOW_SCALE "Window Scale"
#define REGVALUE_SLOT0 "Slot 0"
#define REGVALUE_SLOT1 "Slot 1"
#define REGVALUE_SLOT2 "Slot 2"
#define REGVALUE_SLOT3 "Slot 3"
@ -162,8 +163,8 @@ enum eIRQSRC {IS_6522=0, IS_SPEECH, IS_SSC, IS_MOUSE};
#define APPLECLONE_MASK 0x100
#define IS_APPLE2 ((g_Apple2Type & (APPLE2E_MASK|APPLE2C_MASK)) == 0)
#define IS_APPLE2E (g_Apple2Type & APPLE2E_MASK)
#define IS_APPLE2C (g_Apple2Type & APPLE2C_MASK)
#define IS_APPLE2E() (g_Apple2Type & APPLE2E_MASK)
#define IS_APPLE2C() (g_Apple2Type & APPLE2C_MASK)
#define IS_CLONE() (g_Apple2Type & APPLECLONE_MASK)
// NB. These get persisted to the Registry & save-state file, so don't change the values for these enums!
@ -193,9 +194,14 @@ enum eApple2Type {
A2TYPE_MAX
};
inline bool IsApple2(eApple2Type type)
inline bool IsApple2Original(eApple2Type type) // Apple ][
{
return (type & (APPLE2E_MASK|APPLE2C_MASK)) == 0;
return type == A2TYPE_APPLE2;
}
inline bool IsApple2Plus(eApple2Type type) // Apple ][,][+
{
return ((type & (APPLE2E_MASK|APPLE2C_MASK)) == 0) && !(type & APPLECLONE_MASK);
}
inline bool IsClone(eApple2Type type)
@ -203,10 +209,20 @@ inline bool IsClone(eApple2Type type)
return (type & APPLECLONE_MASK) != 0;
}
extern eApple2Type g_Apple2Type;
inline bool IsOriginal2E(void)
inline bool IsApple2PlusOrClone(eApple2Type type) // Apple ][,][+ or clone ][,][+
{
return (g_Apple2Type == A2TYPE_APPLE2E);
return (type & (APPLE2E_MASK|APPLE2C_MASK)) == 0;
}
extern eApple2Type g_Apple2Type;
inline bool IsEnhancedIIE(void)
{
return ( (g_Apple2Type == A2TYPE_APPLE2EENHANCED) || (g_Apple2Type == A2TYPE_TK30002E) );
}
inline bool IsEnhancedIIEorIIC(void)
{
return ( (g_Apple2Type == A2TYPE_APPLE2EENHANCED) || (g_Apple2Type == A2TYPE_TK30002E) || IS_APPLE2C() );
}
enum eBUTTON {BUTTON0=0, BUTTON1};

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

@ -259,8 +259,8 @@ int CPageAdvanced::GetCloneMenuItem(void)
void CPageAdvanced::InitFreezeDlgButton(HWND hWnd)
{
const bool bIsApple2 = IsApple2( m_PropertySheetHelper.GetConfigNew().m_Apple2Type );
EnableWindow(GetDlgItem(hWnd, IDC_THE_FREEZES_F8_ROM_FW), bIsApple2 ? TRUE : FALSE);
const bool bIsApple2Plus = IsApple2Plus( m_PropertySheetHelper.GetConfigNew().m_Apple2Type );
EnableWindow(GetDlgItem(hWnd, IDC_THE_FREEZES_F8_ROM_FW), bIsApple2Plus ? TRUE : FALSE);
const UINT CheckTheFreezesRom = m_PropertySheetHelper.GetConfigNew().m_bEnableTheFreezesF8Rom ? BST_CHECKED : BST_UNCHECKED;
CheckDlgButton(hWnd, IDC_THE_FREEZES_F8_ROM_FW, CheckTheFreezesRom);

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

@ -115,7 +115,9 @@ BOOL CPageDisk::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM l
case IDC_HDD_ENABLE:
EnableHDD(hWnd, IsDlgButtonChecked(hWnd, IDC_HDD_ENABLE));
break;
case IDC_HDD_SWAP:
HandleHDDSwap(hWnd);
break;
case IDC_CIDERPRESS_BROWSE:
{
std::string CiderPressLoc = m_PropertySheetHelper.BrowseToFile(hWnd, TEXT("Select path to CiderPress"), REGVALUE_CIDERPRESSLOC, TEXT("Applications (*.exe)\0*.exe\0") TEXT("All Files\0*.*\0") );
@ -131,8 +133,6 @@ BOOL CPageDisk::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM l
m_PropertySheetHelper.FillComboBox(hWnd, IDC_DISKTYPE, m_discchoices, Disk_GetEnhanceDisk() ? 1 : 0);
m_PropertySheetHelper.FillComboBox(hWnd, IDC_COMBO_DISK1, m_defaultDiskOptions, -1);
m_PropertySheetHelper.FillComboBox(hWnd, IDC_COMBO_DISK2, m_defaultDiskOptions, -1);
m_PropertySheetHelper.FillComboBox(hWnd, IDC_COMBO_HDD1, m_defaultHDDOptions, -1);
m_PropertySheetHelper.FillComboBox(hWnd, IDC_COMBO_HDD2, m_defaultHDDOptions, -1);
if (strlen(DiskGetFullName(DRIVE_1)) > 0)
{
@ -146,17 +146,7 @@ BOOL CPageDisk::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM l
SendDlgItemMessage(hWnd, IDC_COMBO_DISK2, CB_SETCURSEL, 0, 0);
}
if (strlen(HD_GetFullName(HARDDISK_1)) > 0)
{
SendDlgItemMessage(hWnd, IDC_COMBO_HDD1, CB_INSERTSTRING, 0, (LPARAM)HD_GetFullName(HARDDISK_1));
SendDlgItemMessage(hWnd, IDC_COMBO_HDD1, CB_SETCURSEL, 0, 0);
}
if (strlen(HD_GetFullName(HARDDISK_2)) > 0)
{
SendDlgItemMessage(hWnd, IDC_COMBO_HDD2, CB_INSERTSTRING, 0, (LPARAM)HD_GetFullName(HARDDISK_2));
SendDlgItemMessage(hWnd, IDC_COMBO_HDD2, CB_SETCURSEL, 0, 0);
}
InitComboHDD(hWnd);
TCHAR PathToCiderPress[MAX_PATH] = "";
RegLoadString(TEXT(REG_CONFIG), REGVALUE_CIDERPRESSLOC, 1, PathToCiderPress,MAX_PATH);
@ -176,6 +166,24 @@ BOOL CPageDisk::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM l
return FALSE;
}
void CPageDisk::InitComboHDD(HWND hWnd)
{
m_PropertySheetHelper.FillComboBox(hWnd, IDC_COMBO_HDD1, m_defaultHDDOptions, -1);
m_PropertySheetHelper.FillComboBox(hWnd, IDC_COMBO_HDD2, m_defaultHDDOptions, -1);
if (strlen(HD_GetFullName(HARDDISK_1)) > 0)
{
SendDlgItemMessage(hWnd, IDC_COMBO_HDD1, CB_INSERTSTRING, 0, (LPARAM)HD_GetFullName(HARDDISK_1));
SendDlgItemMessage(hWnd, IDC_COMBO_HDD1, CB_SETCURSEL, 0, 0);
}
if (strlen(HD_GetFullName(HARDDISK_2)) > 0)
{
SendDlgItemMessage(hWnd, IDC_COMBO_HDD2, CB_INSERTSTRING, 0, (LPARAM)HD_GetFullName(HARDDISK_2));
SendDlgItemMessage(hWnd, IDC_COMBO_HDD2, CB_SETCURSEL, 0, 0);
}
}
void CPageDisk::DlgOK(HWND hWnd)
{
const bool bNewEnhanceDisk = SendDlgItemMessage(hWnd, IDC_DISKTYPE,CB_GETCURSEL, 0, 0) ? true : false;
@ -207,6 +215,7 @@ void CPageDisk::EnableHDD(HWND hWnd, BOOL bEnable)
{
EnableWindow(GetDlgItem(hWnd, IDC_COMBO_HDD1), bEnable);
EnableWindow(GetDlgItem(hWnd, IDC_COMBO_HDD2), bEnable);
EnableWindow(GetDlgItem(hWnd, IDC_HDD_SWAP), bEnable);
}
void CPageDisk::EnableDisk(HWND hWnd, BOOL bEnable)
@ -340,19 +349,34 @@ void CPageDisk::HandleDiskCombo(HWND hWnd, UINT driveSelected, UINT comboSelecte
}
}
void CPageDisk::HandleHDDSwap(HWND hWnd)
{
if (!RemovalConfirmation(IDC_HDD_SWAP))
return;
if (!HD_ImageSwap())
return;
InitComboHDD(hWnd);
}
UINT CPageDisk::RemovalConfirmation(UINT uCommand)
{
TCHAR szText[100];
const size_t strLen = sizeof(szText)-1;
bool bMsgBox = true;
if (uCommand == IDC_COMBO_DISK1 || uCommand == IDC_COMBO_DISK2)
wsprintf(szText, "Do you really want to eject the disk in drive-%c ?", '1' + uCommand - IDC_COMBO_DISK1);
_snprintf(szText, strLen, "Do you really want to eject the disk in drive-%c ?", '1' + uCommand - IDC_COMBO_DISK1);
else if (uCommand == IDC_COMBO_HDD1 || uCommand == IDC_COMBO_HDD2)
wsprintf(szText, "Do you really want to unplug harddisk-%c ?", '1' + uCommand - IDC_COMBO_HDD1);
_snprintf(szText, strLen, "Do you really want to unplug harddisk-%c ?", '1' + uCommand - IDC_COMBO_HDD1);
else if (uCommand == IDC_HDD_SWAP)
_snprintf(szText, strLen, "Do you really want to swap the harddisk images?");
else
bMsgBox = false;
szText[strLen] = 0;
if (bMsgBox)
{
int nRes = MessageBox(g_hFrameWindow, szText, TEXT("Eject/Unplug Warning"), MB_ICONWARNING | MB_YESNO | MB_SETFOREGROUND);

View File

@ -25,10 +25,12 @@ protected:
private:
void InitOptions(HWND hWnd);
void InitComboHDD(HWND hWnd);
void EnableHDD(HWND hWnd, BOOL bEnable);
void EnableDisk(HWND hWnd, BOOL bEnable);
void HandleHDDCombo(HWND hWnd, UINT driveSelected, UINT comboSelected);
void HandleDiskCombo(HWND hWnd, UINT driveSelected, UINT comboSelected);
void HandleHDDSwap(HWND hWnd);
UINT RemovalConfirmation(UINT uCommand);
static CPageDisk* ms_this;

View File

@ -780,7 +780,7 @@ Update_t CmdBenchmarkStop (int nArgs)
DWORD currtime = GetTickCount();
while ((extbench = GetTickCount()) != currtime)
; // intentional busy-waiting
KeybQueueKeypress(TEXT(' '),1);
KeybQueueKeypress(TEXT(' ') ,ASCII);
return UPDATE_ALL; // 0;
}
@ -2096,7 +2096,7 @@ Update_t CmdUnassemble (int nArgs)
Update_t CmdKey (int nArgs)
{
KeybQueueKeypress(
nArgs ? g_aArgs[1].nValue ? g_aArgs[1].nValue : g_aArgs[1].sArg[0] : TEXT(' '), 1); // FIXME!!!
nArgs ? g_aArgs[1].nValue ? g_aArgs[1].nValue : g_aArgs[1].sArg[0] : TEXT(' '), ASCII); // FIXME!!!
return UPDATE_CONSOLE_DISPLAY;
}
@ -3639,7 +3639,7 @@ Update_t CmdFlagClear (int nArgs)
{
int iFlag = (g_iCommand - CMD_FLAG_CLR_C);
if (g_iCommand == CMD_FLAG_CLEAR)
if (g_iCommand == CMD_FLAG_CLEAR) // Undocumented: "cl f f ... f", eg: "se n v c" (TODO: Conflicts with monitor command #L -> 000CL)
{
int iArg = nArgs;
while (iArg)
@ -3648,9 +3648,10 @@ Update_t CmdFlagClear (int nArgs)
while (iFlag < _6502_NUM_FLAGS)
{
// if (g_aFlagNames[iFlag] == g_aArgs[iArg].sArg[0])
if (g_aBreakpointSource[ BP_SRC_FLAG_N + iFlag ][0] == g_aArgs[iArg].sArg[0])
if (g_aBreakpointSource[ BP_SRC_FLAG_N - iFlag ][0] == toupper(g_aArgs[iArg].sArg[0]))
{
regs.ps &= ~(1 << iFlag);
regs.ps &= ~(1 << (7-iFlag));
break;
}
iFlag++;
}
@ -3670,7 +3671,7 @@ Update_t CmdFlagSet (int nArgs)
{
int iFlag = (g_iCommand - CMD_FLAG_SET_C);
if (g_iCommand == CMD_FLAG_SET)
if (g_iCommand == CMD_FLAG_SET) // Undocumented: "se f f ... f", eg: "se n v c"
{
int iArg = nArgs;
while (iArg)
@ -3679,9 +3680,10 @@ Update_t CmdFlagSet (int nArgs)
while (iFlag < _6502_NUM_FLAGS)
{
// if (g_aFlagNames[iFlag] == g_aArgs[iArg].sArg[0])
if (g_aBreakpointSource[ BP_SRC_FLAG_N + iFlag ][0] == g_aArgs[iArg].sArg[0])
if (g_aBreakpointSource[ BP_SRC_FLAG_N - iFlag ][0] == toupper(g_aArgs[iArg].sArg[0]))
{
regs.ps |= (1 << iFlag);
regs.ps |= (1 << (7-iFlag));
break;
}
iFlag++;
}
@ -4151,8 +4153,12 @@ Update_t CmdConfigSetDebugDir (int nArgs)
{
_tcsncpy( sPath, g_sCurrentDir, 2 ); // Prefix with drive letter & colon
sPath[2] = 0;
_tcscat( sPath, g_aArgs[1].sArg );
}
else
{
_tcscpy( sPath, g_aArgs[1].sArg );
}
_tcscat( sPath, g_aArgs[1].sArg );
}
else // Relative
{
@ -6464,7 +6470,8 @@ Update_t CmdOutputRun (int nArgs)
// if (g_aArgs[1].bType & TYPE_QUOTED_2)
_tcscpy( sMiniFileName, pFileName );
_tcsncpy( sMiniFileName, pFileName, sizeof(sMiniFileName) );
sMiniFileName[sizeof(sMiniFileName)-1] = 0;
// _tcscat( sMiniFileName, ".aws" ); // HACK: MAGIC STRING
if (pFileName[0] == '\\' || pFileName[1] == ':') // NB. Any prefix quote has already been stripped
@ -7626,7 +7633,7 @@ Update_t CmdZeroPagePointer (int nArgs)
// int nPtrNum = g_aArgs[0].sArg[1] - '0'; // HACK: hard-coded to command length
int iZP = g_iCommand - CMD_ZEROPAGE_POINTER_0;
if( (iZP < 0) || (iZP > MAX_ZEROPAGE_POINTERS) )
if( (iZP < 0) || (iZP >= MAX_ZEROPAGE_POINTERS) )
return Help_Arg_1( g_iCommand );
if (nArgs == 0)
@ -9364,7 +9371,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())
{
@ -9690,7 +9697,7 @@ void DebuggerCursorUpdate()
}
else
{
Sleep(10); // Stop process hogging CPU
Sleep(1); // Stop process hogging CPU
}
}
@ -9719,11 +9726,11 @@ void DebuggerMouseClick( int x, int y )
if (g_nAppMode != MODE_DEBUG)
return;
// NOTE: KeybUpdateCtrlShiftStatus() should be called before
KeybUpdateCtrlShiftStatus();
int iAltCtrlShift = 0;
iAltCtrlShift |= (g_bAltKey & 1) << 0;
iAltCtrlShift |= (g_bCtrlKey & 1) << 1;
iAltCtrlShift |= (g_bShiftKey & 1) << 2;
iAltCtrlShift |= KeybGetAltStatus() ? 1<<0 : 0;
iAltCtrlShift |= KeybGetCtrlStatus() ? 1<<1 : 0;
iAltCtrlShift |= KeybGetShiftStatus() ? 1<<2 : 0;
// GH#462 disasm click #
if (iAltCtrlShift != g_bConfigDisasmClick)

View File

@ -81,16 +81,21 @@ WORD _CmdDefineByteRange(int nArgs,int iArg,DisasmData_t & tData_)
// tData_.nArraySize = 0;
char *pSymbolName = "";
char aSymbolName[ 32 ];
char aSymbolName[ MAX_SYMBOLS_LEN+1 ];
SymbolTable_Index_e eSymbolTable = SYMBOLS_ASSEMBLY;
bool bAutoDefineName = false; // 2.7.0.34
if( nArgs > 1 )
{
if( g_aArgs[ 2 ].eToken == TOKEN_COLON ) // 2.7.0.31 Bug fix: DB range, i.e. DB 174E:174F
{
bAutoDefineName = true;
}
else
{
pSymbolName = g_aArgs[ 1 ].sArg;
pSymbolName[MAX_SYMBOLS_LEN] = 0; // truncate to max symbol length
}
}
else
{

View File

@ -34,6 +34,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "../Applewin.h"
#include "../CPU.h"
#include "../Frame.h"
#include "../LanguageCard.h"
#include "../Memory.h"
#include "../Mockingboard.h"
#include "../Video.h"
@ -1493,7 +1494,7 @@ int GetDisassemblyLine ( WORD nBaseAddress, DisasmLine_t & line_ )
if (! (bDisasmFormatFlags & DISASM_FORMAT_SYMBOL))
{
pTarget = FormatAddress( nTarget, nOpbyte );
pTarget = FormatAddress( nTarget, (iOpmode != AM_R) ? nOpbyte : 3 ); // GH#587: For Bcc opcodes, pretend it's a 3-byte opcode to print a 16-bit target addr
}
// sprintf( sTarget, g_aOpmodes[ iOpmode ]._sFormat, pTarget );
@ -1517,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
@ -1791,7 +1792,8 @@ void FormatDisassemblyLine( const DisasmLine_t & line, char * sDisassembly, cons
if (line.bTargetImmediate)
{
strcat( sDisassembly, "#" );
strcpy( sTarget, line.sTarget ); // sTarget
strncpy( sTarget, line.sTarget, sizeof(sTarget) );
sTarget[sizeof(sTarget)-1] = 0;
}
else
sprintf( sTarget, g_aOpmodes[ line.iOpmode ].m_sFormat, line.nTarget );
@ -2459,7 +2461,7 @@ void DrawMemory ( int line, int iMemDump )
char sText[ MAX_MEM_VIEW_TXT * 2 ];
char sData[ MAX_MEM_VIEW_TXT * 2 ];
char sType [ 4 ] = "Mem";
char sType [ 6 ] = "Mem";
char sAddress[ 8 ] = "";
int iForeground = FG_INFO_OPCODE;
@ -2891,11 +2893,9 @@ void _DrawSoftSwitchLanguageCardBank( RECT & rect, int iBankDisplay, int bg_defa
int iActiveBank = -1;
char sText[ 4 ] = "?"; // Default to RAMWORKS
#ifdef RAMWORKS
if (g_eMemType == MEM_TYPE_RAMWORKS) { sText[0] = 'r'; iActiveBank = g_uActiveBank; } // RAMWORKS
if (GetCurrentExpansionMemType() == CT_RamWorksIII) { sText[0] = 'r'; iActiveBank = GetRamWorksActiveBank(); } // RAMWORKS
#endif
#ifdef SATURN
if (g_eMemType == MEM_TYPE_SATURN ) { sText[0] = 's'; iActiveBank = g_uSaturnActiveBank; } // SATURN 64K 128K
#endif // SATURN
if (GetCurrentExpansionMemType() == CT_Saturn128K) { sText[0] = 's'; iActiveBank = GetLanguageCard()->GetActiveBank(); } // SATURN 64K 128K
if (iActiveBank >= 0)
{
@ -3089,7 +3089,7 @@ void DrawSoftSwitches( int iSoftSwitch )
_DrawSoftSwitch( rect, 0xC00C, bSet, "Col", "40", "80", NULL, bgMemory );
// C00E = off, C00F = on
bSet = VideoGetSWAltCharSet();
bSet = !VideoGetSWAltCharSet();
_DrawSoftSwitch( rect, 0xC00E, bSet, NULL, "ASC", "MOUS", NULL, bgMemory ); // ASCII/MouseText
#if SOFTSWITCH_LANGCARD

View File

@ -127,7 +127,7 @@ int _Arg_Shift( int iSrc, int iEnd, int iDst )
{
if (iDst < 0)
return ARG_SYNTAX_ERROR;
if (iDst > MAX_ARGS)
if (iDst >= MAX_ARGS)
return ARG_SYNTAX_ERROR;
int nArgs = (iEnd - iSrc);
@ -151,10 +151,10 @@ int _Args_Insert( int iSrc, int iEnd, int nLen )
iSrc += nLen;
int iDst = iEnd + nLen;
if (iDst > MAX_ARGS)
if (iDst >= MAX_ARGS)
return ARG_SYNTAX_ERROR;
if (iSrc > MAX_ARGS)
if (iSrc >= MAX_ARGS)
return ARG_SYNTAX_ERROR;
while (nLen--)

View File

@ -86,6 +86,7 @@ static WORD phases = 0; // state bits for stepper magnet phases 0 - 3
static bool g_bSaveDiskImage = true; // Save the DiskImage name to Registry
static UINT g_uSlot = 0;
static unsigned __int64 g_uDiskLastCycle = 0;
static unsigned __int64 g_uDiskLastReadLatchCycle = 0;
static FormatTrack g_formatTrack;
static bool IsDriveValid( const int iDrive );
@ -891,11 +892,31 @@ static void __stdcall DiskReadWrite(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULO
}
}
// Should really test for drive off - after 1 second drive off delay (UTAIIe page 9-13)
// but Sherwood Forest sets shift mode and reads with the drive off, so don't check for now
if (!floppywritemode)
{
// Don't change latch if drive off after 1 second drive-off delay (UTAIIe page 9-13)
// "DRIVES OFF forces the data register to hold its present state." (UTAIIe page 9-12)
// Note: Sherwood Forest sets shift mode and reads with the drive off.
if (!pDrive->spinning) // GH#599
return;
const ULONG nReadCycleDiff = (ULONG) (g_nCumulativeCycles - g_uDiskLastReadLatchCycle);
// Support partial nibble read if disk reads are very close: (GH#582)
// . 6 cycles (1st->2nd read) for DOS 3.3 / $BD34: "read with delays to see if disk is spinning." (Beneath Apple DOS)
// . 6 cycles (1st->2nd read) for Curse of the Azure Bonds (loop to see if disk is spinning)
// . 31 cycles is the max for a partial 8-bit nibble
const ULONG kReadAccessThreshold = enhancedisk ? 6 : 31;
if (nReadCycleDiff <= kReadAccessThreshold)
{
UINT invalidBits = 8 - (nReadCycleDiff / 4); // 4 cycles per bit-cell
floppylatch = *(pFloppy->trackimage + pFloppy->byte) >> invalidBits;
return; // Early return so don't update: g_uDiskLastReadLatchCycle & pFloppy->byte
}
floppylatch = *(pFloppy->trackimage + pFloppy->byte);
g_uDiskLastReadLatchCycle = g_nCumulativeCycles;
#if LOG_DISK_NIBBLES_READ
#if LOG_DISK_NIBBLES_USE_RUNTIME_VAR
@ -937,10 +958,8 @@ static void __stdcall DiskReadWrite(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULO
if (++pFloppy->byte >= pFloppy->nibbles)
pFloppy->byte = 0;
// Feature Request #201 Show track status
// https://github.com/AppleWin/AppleWin/issues/201
// NB. Prevent flooding of forcing UI to redraw!!!
if( ((pFloppy->byte) & 0xFF) == 0 )
// Show track status (GH#201) - NB. Prevent flooding of forcing UI to redraw!!!
if ((pFloppy->byte & 0xFF) == 0)
FrameDrawDiskStatus( (HDC)0 );
}
@ -959,6 +978,10 @@ void DiskReset(const bool bIsPowerCycle/*=false*/)
if (bIsPowerCycle) // GH#460
{
// NB. This doesn't affect the drive head (ie. drive's track position)
// . The initial machine start-up state is track=0, but after a power-cycle the track could be any value.
// . (For DiskII firmware, this results in a subtle extra latch read in this latter case, for the track!=0 case)
g_aFloppyDrive[DRIVE_1].spinning = 0;
g_aFloppyDrive[DRIVE_1].writelight = 0;
g_aFloppyDrive[DRIVE_2].spinning = 0;
@ -1031,11 +1054,16 @@ bool DiskSelect(const int iDrive)
static void __stdcall DiskLoadWriteProtect(WORD, WORD, BYTE write, BYTE value, ULONG)
{
/* floppyloadmode = 1; */
// Don't change latch if drive off after 1 second drive-off delay (UTAIIe page 9-13)
// "DRIVES OFF forces the data register to hold its present state." (UTAIIe page 9-12)
// Note: Gemstone Warrior sets load mode with the drive off.
if (!g_aFloppyDrive[currdrive].spinning) // GH#599
return;
if (!write)
{
// Notes:
// . Should really test for drive off - after 1 second drive off delay (UTAIIe page 9-13)
// but Gemstone Warrior sets load mode with the drive off, so don't check for now
// . Phase 1 on also forces write protect in the Disk II drive (UTAIIe page 9-7) but we don't implement that
// . write mode doesn't prevent reading write protect (GH#537):
// "If for some reason the above write protect check were entered with the READ/WRITE switch in WRITE,
@ -1273,97 +1301,10 @@ static BYTE __stdcall Disk_IOWrite(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULON
//===========================================================================
int DiskSetSnapshot_v1(const SS_CARD_DISK2* const pSS)
{
if(pSS->Hdr.UnitHdr.hdr.v1.dwVersion > MAKE_VERSION(1,0,0,2))
return -1;
phases = pSS->phases;
currdrive = pSS->currdrive;
//diskaccessed = pSS->diskaccessed; // deprecated
enhancedisk = pSS->enhancedisk ? true : false;
floppylatch = pSS->floppylatch;
floppymotoron = pSS->floppymotoron;
floppywritemode = pSS->floppywritemode;
// Eject all disks first in case Drive-2 contains disk to be inserted into Drive-1
for(UINT i=0; i<NUM_DRIVES; i++)
{
DiskEject(i); // Remove any disk & update Registry to reflect empty drive
g_aFloppyDrive[i].clear();
}
for(UINT i=0; i<NUM_DRIVES; i++)
{
if(pSS->Unit[i].szFileName[0] == 0x00)
continue;
DWORD dwAttributes = GetFileAttributes(pSS->Unit[i].szFileName);
if(dwAttributes == INVALID_FILE_ATTRIBUTES)
{
// Get user to browse for file
DiskSelectImage(i, pSS->Unit[i].szFileName);
dwAttributes = GetFileAttributes(pSS->Unit[i].szFileName);
}
bool bImageError = false;
if(dwAttributes != INVALID_FILE_ATTRIBUTES)
{
if(DiskInsert(i, pSS->Unit[i].szFileName, dwAttributes & FILE_ATTRIBUTE_READONLY, IMAGE_DONT_CREATE) != eIMAGE_ERROR_NONE)
bImageError = true;
// DiskInsert() sets up:
// . imagename
// . fullname
// . writeprotected
}
//
// strcpy(g_aFloppyDrive[i].fullname, pSS->Unit[i].szFileName);
g_aFloppyDrive[i].track = pSS->Unit[i].track;
g_aFloppyDrive[i].phase = pSS->Unit[i].phase;
g_aFloppyDrive[i].spinning = pSS->Unit[i].spinning;
g_aFloppyDrive[i].writelight = pSS->Unit[i].writelight;
g_aFloppyDrive[i].disk.byte = pSS->Unit[i].byte;
// g_aFloppyDrive[i].disk.writeprotected = pSS->Unit[i].writeprotected;
g_aFloppyDrive[i].disk.trackimagedata = pSS->Unit[i].trackimagedata ? true : false;
g_aFloppyDrive[i].disk.trackimagedirty = pSS->Unit[i].trackimagedirty ? true : false;
g_aFloppyDrive[i].disk.nibbles = pSS->Unit[i].nibbles;
//
if(!bImageError)
{
if((g_aFloppyDrive[i].disk.trackimage == NULL) && g_aFloppyDrive[i].disk.nibbles)
AllocTrack(i);
if(g_aFloppyDrive[i].disk.trackimage == NULL)
bImageError = true;
else
memcpy(g_aFloppyDrive[i].disk.trackimage, pSS->Unit[i].nTrack, NIBBLES_PER_TRACK);
}
if(bImageError)
{
g_aFloppyDrive[i].disk.trackimagedata = false;
g_aFloppyDrive[i].disk.trackimagedirty = false;
g_aFloppyDrive[i].disk.nibbles = 0;
}
}
FrameRefreshStatus(DRAW_LEDS | DRAW_BUTTON_DRIVES);
return 0;
}
//===========================================================================
// Unit version history:
// Unit version history:
// 2: Added: Format Track state & DiskLastCycle
static const UINT kUNIT_VERSION = 2;
// 3: Added: DiskLastReadLatchCycle
static const UINT kUNIT_VERSION = 3;
#define SS_YAML_VALUE_CARD_DISK2 "Disk]["
@ -1375,6 +1316,7 @@ static const UINT kUNIT_VERSION = 2;
#define SS_YAML_KEY_FLOPPY_MOTOR_ON "Floppy Motor On"
#define SS_YAML_KEY_FLOPPY_WRITE_MODE "Floppy Write Mode"
#define SS_YAML_KEY_LAST_CYCLE "Last Cycle"
#define SS_YAML_KEY_LAST_READ_LATCH_CYCLE "Last Read Latch Cycle"
#define SS_YAML_KEY_DISK2UNIT "Unit"
#define SS_YAML_KEY_FILENAME "Filename"
@ -1429,6 +1371,7 @@ void DiskSaveSnapshot(class YamlSaveHelper& yamlSaveHelper)
yamlSaveHelper.SaveBool(SS_YAML_KEY_FLOPPY_MOTOR_ON, floppymotoron == TRUE);
yamlSaveHelper.SaveBool(SS_YAML_KEY_FLOPPY_WRITE_MODE, floppywritemode == TRUE);
yamlSaveHelper.SaveHexUint64(SS_YAML_KEY_LAST_CYCLE, g_uDiskLastCycle); // v2
yamlSaveHelper.SaveHexUint64(SS_YAML_KEY_LAST_READ_LATCH_CYCLE, g_uDiskLastReadLatchCycle); // v3
g_formatTrack.SaveSnapshot(yamlSaveHelper); // v2
DiskSaveSnapshotDisk2Unit(yamlSaveHelper, DRIVE_1);
@ -1534,6 +1477,11 @@ bool DiskLoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT slot, UINT vers
g_formatTrack.LoadSnapshot(yamlLoadHelper);
}
if (version >= 3)
{
g_uDiskLastReadLatchCycle = yamlLoadHelper.LoadUint64(SS_YAML_KEY_LAST_READ_LATCH_CYCLE);
}
// Eject all disks first in case Drive-2 contains disk to be inserted into Drive-1
for(UINT i=0; i<NUM_DRIVES; i++)
{

View File

@ -72,7 +72,6 @@ void DiskUpdateDriveState(DWORD);
bool DiskDriveSwap(void);
void DiskLoadRom(LPBYTE pCxRomPeripheral, UINT uSlot);
int DiskSetSnapshot_v1(const struct SS_CARD_DISK2* const pSS);
std::string DiskGetSnapshotCardName(void);
void DiskSaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
bool DiskLoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version);

View File

@ -1214,41 +1214,53 @@ ImageError_e CImageHelperBase::CheckZipFile(LPCTSTR pszImageFilename, ImageInfo*
return eIMAGE_ERROR_UNABLE_TO_OPEN_ZIP;
unz_global_info global_info;
int nRes = unzGetGlobalInfo(hZipFile, &global_info);
if (nRes != UNZ_OK)
return eIMAGE_ERROR_ZIP;
nRes = unzGoToFirstFile(hZipFile); // Only support 1st file in zip archive for now
if (nRes != UNZ_OK)
return eIMAGE_ERROR_ZIP;
unz_file_info file_info;
char szFilename[MAX_PATH];
memset(szFilename, 0, sizeof(szFilename));
nRes = unzGetCurrentFileInfo(hZipFile, &file_info, szFilename, MAX_PATH, NULL, 0, NULL, 0);
if (nRes != UNZ_OK)
return eIMAGE_ERROR_ZIP;
int nRes = 0, nLen = 0;
const UINT uFileSize = file_info.uncompressed_size;
if (uFileSize > GetMaxImageSize())
return eIMAGE_ERROR_BAD_SIZE;
pImageInfo->pImageBuffer = new BYTE[uFileSize];
nRes = unzOpenCurrentFile(hZipFile);
if (nRes != UNZ_OK)
return eIMAGE_ERROR_ZIP;
int nLen = unzReadCurrentFile(hZipFile, pImageInfo->pImageBuffer, uFileSize);
if (nLen < 0)
try
{
unzCloseCurrentFile(hZipFile); // Must CloseCurrentFile before Close
return eIMAGE_ERROR_UNSUPPORTED;
}
nRes = unzGetGlobalInfo(hZipFile, &global_info);
if (nRes != UNZ_OK)
throw eIMAGE_ERROR_ZIP;
nRes = unzCloseCurrentFile(hZipFile);
if (nRes != UNZ_OK)
return eIMAGE_ERROR_ZIP;
nRes = unzGoToFirstFile(hZipFile); // Only support 1st file in zip archive for now
if (nRes != UNZ_OK)
throw eIMAGE_ERROR_ZIP;
nRes = unzGetCurrentFileInfo(hZipFile, &file_info, szFilename, MAX_PATH, NULL, 0, NULL, 0);
if (nRes != UNZ_OK)
throw eIMAGE_ERROR_ZIP;
const UINT uFileSize = file_info.uncompressed_size;
if (uFileSize > GetMaxImageSize())
throw eIMAGE_ERROR_BAD_SIZE;
pImageInfo->pImageBuffer = new BYTE[uFileSize];
nRes = unzOpenCurrentFile(hZipFile);
if (nRes != UNZ_OK)
throw eIMAGE_ERROR_ZIP;
nLen = unzReadCurrentFile(hZipFile, pImageInfo->pImageBuffer, uFileSize);
if (nLen < 0)
{
unzCloseCurrentFile(hZipFile); // Must CloseCurrentFile before Close
throw eIMAGE_ERROR_UNSUPPORTED;
}
nRes = unzCloseCurrentFile(hZipFile);
if (nRes != UNZ_OK)
throw eIMAGE_ERROR_ZIP;
}
catch (ImageError_e error)
{
if (hZipFile)
unzClose(hZipFile);
return error;
}
nRes = unzClose(hZipFile);
hZipFile = NULL;
@ -1256,6 +1268,7 @@ ImageError_e CImageHelperBase::CheckZipFile(LPCTSTR pszImageFilename, ImageInfo*
return eIMAGE_ERROR_ZIP;
strncpy(pImageInfo->szFilenameInZip, szFilename, MAX_PATH);
pImageInfo->szFilenameInZip[MAX_PATH-1] = 0;
memcpy(&pImageInfo->zipFileInfo.tmz_date, &file_info.tmu_date, sizeof(file_info.tmu_date));
pImageInfo->zipFileInfo.dosDate = file_info.dosDate;
pImageInfo->zipFileInfo.internal_fa = file_info.internal_fa;
@ -1445,11 +1458,11 @@ ImageError_e CImageHelperBase::Open( LPCTSTR pszImageFilename,
ImageError_e Err;
const size_t uStrLen = strlen(pszImageFilename);
if (uStrLen > GZ_SUFFIX_LEN && strcmp(pszImageFilename+uStrLen-GZ_SUFFIX_LEN, GZ_SUFFIX) == 0)
if (uStrLen > GZ_SUFFIX_LEN && _stricmp(pszImageFilename+uStrLen-GZ_SUFFIX_LEN, GZ_SUFFIX) == 0)
{
Err = CheckGZipFile(pszImageFilename, pImageInfo);
}
else if (uStrLen > ZIP_SUFFIX_LEN && strcmp(pszImageFilename+uStrLen-ZIP_SUFFIX_LEN, ZIP_SUFFIX) == 0)
else if (uStrLen > ZIP_SUFFIX_LEN && _stricmp(pszImageFilename+uStrLen-ZIP_SUFFIX_LEN, ZIP_SUFFIX) == 0)
{
Err = CheckZipFile(pszImageFilename, pImageInfo, strFilenameInZip);
}

View File

@ -40,6 +40,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "Memory.h"
#include "Mockingboard.h"
#include "MouseInterface.h"
#include "NTSC.h"
#include "ParallelPrinter.h"
#include "Pravets.h"
#include "Registry.h"
@ -57,6 +58,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "Debugger/Debug.h"
//#define ENABLE_MENU 0
#define DEBUG_KEY_MESSAGES 0
// 3D border around the 560x384 Apple II display
#define VIEWPORTX 5
@ -175,6 +177,15 @@ void ScreenWindowResize(const bool bCtrlKey);
void FrameResizeWindow(int nNewScale);
// ==========================================================================
static bool g_bAltEnter_ToggleFullScreen = true; // Default for ALT+ENTER is to toggle between windowed and full-screen modes
void SetAltEnterToggleFullScreen(bool mode)
{
g_bAltEnter_ToggleFullScreen = mode;
}
// ==========================================================================
// Display construction:
@ -189,7 +200,7 @@ void FrameResizeWindow(int nNewScale);
UINT GetFrameBufferBorderlessWidth(void)
{
static const UINT uFrameBufferBorderlessW = 560; // 560 = Double Hi-Res
static const UINT uFrameBufferBorderlessW = NTSC_GetFrameBufferBorderlessWidth(); // 560 = Double Hi-Res, +1 for GH#555
return uFrameBufferBorderlessW;
}
@ -264,7 +275,7 @@ static void GetAppleWindowTitle()
// TODO: g_bDisplayVideoModeInTitle
_tcscat( g_pAppleWindowTitle, " - " );
if( g_uHalfScanLines )
if( IsVideoStyle(VS_HALF_SCANLINES) )
{
_tcscat( g_pAppleWindowTitle," 50% " );
}
@ -1082,25 +1093,32 @@ LRESULT CALLBACK FrameWndProc (
g_TimerIDEvent_100msec = 0;
}
LogFileOutput("WM_CLOSE (done)\n");
// Exit via DefWindowProc(), which does the default action for WM_CLOSE, which is to call DestroyWindow(), posting WM_DESTROY
break;
case WM_CHAR:
if ((g_nAppMode == MODE_RUNNING) || (g_nAppMode == MODE_STEPPING) || (g_nAppMode == MODE_LOGO))
{
if( !g_bDebuggerEatKey )
{
KeybQueueKeypress((int)wparam, ASCII);
}
else
{
g_bDebuggerEatKey = false;
}
}
else if (g_nAppMode == MODE_DEBUG)
{
DebuggerInputConsoleChar((TCHAR)wparam);
}
break;
case WM_DESTROY:
LogFileOutput("WM_DESTROY\n");
DragAcceptFiles(window,0);
if (!g_bRestart) // GH#564: Only save-state on shutdown (not on a restart)
Snapshot_Shutdown();
DebugDestroy();
if (!g_bRestart) {
DiskDestroy();
ImageDestroy();
HD_Destroy();
}
PrintDestroy();
sg_SSC.CommDestroy();
CpuDestroy();
MemDestroy();
SpkrDestroy();
VideoDestroy();
MB_Destroy();
DeleteGdiObjects();
DIMouse::DirectInputUninit(window); // NB. do before window is destroyed
PostQuitMessage(0); // Post WM_QUIT message to the thread's message queue
LogFileOutput("WM_DESTROY (done)\n");
break;
case WM_CREATE:
LogFileOutput("WM_CREATE\n");
@ -1160,29 +1178,6 @@ LRESULT CALLBACK FrameWndProc (
break;
}
case WM_DESTROY:
LogFileOutput("WM_DESTROY\n");
DragAcceptFiles(window,0);
Snapshot_Shutdown();
DebugDestroy();
if (!g_bRestart) {
DiskDestroy();
ImageDestroy();
HD_Destroy();
}
PrintDestroy();
sg_SSC.CommDestroy();
CpuDestroy();
MemDestroy();
SpkrDestroy();
VideoDestroy();
MB_Destroy();
DeleteGdiObjects();
DIMouse::DirectInputUninit(window); // NB. do before window is destroyed
PostQuitMessage(0); // Post WM_QUIT message to the thread's message queue
LogFileOutput("WM_DESTROY (done)\n");
break;
case WM_DISPLAYCHANGE:
VideoReinitialize();
break;
@ -1280,27 +1275,28 @@ LRESULT CALLBACK FrameWndProc (
// CTRL+SHIFT+F9 Toggle 50% Scan Lines
// ALT+F9 Can't use Alt-F9 as Alt is Open-Apple = Joystick Button #1
if ( !g_bCtrlKey && !g_bShiftKey ) // F9
if ( !KeybGetCtrlStatus() && !KeybGetShiftStatus() ) // F9
{
g_eVideoType++;
if (g_eVideoType >= NUM_VIDEO_MODES)
g_eVideoType = 0;
}
else if ( !g_bCtrlKey && g_bShiftKey ) // SHIFT+F9
else if ( !KeybGetCtrlStatus() && KeybGetShiftStatus() ) // SHIFT+F9
{
if (g_eVideoType <= 0)
g_eVideoType = NUM_VIDEO_MODES;
g_eVideoType--;
}
else if ( g_bCtrlKey && g_bShiftKey ) // CTRL+SHIFT+F9
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)
DrawStatusArea( (HDC)0, DRAW_TITLE );
VideoReinitialize();
VideoReinitialize(false);
if (g_nAppMode != MODE_LOGO)
{
if (g_nAppMode == MODE_DEBUG)
@ -1319,7 +1315,19 @@ LRESULT CALLBACK FrameWndProc (
Config_Save_Video();
}
else if ((wparam == VK_F11) && (GetKeyState(VK_CONTROL) >= 0)) // Save state (F11)
else if (wparam == VK_F10)
{
if (g_Apple2Type == A2TYPE_APPLE2E || g_Apple2Type == A2TYPE_APPLE2EENHANCED)
{
SetVideoRomRockerSwitch( !GetVideoRomRockerSwitch() ); // F10: toggle rocker switch
NTSC_VideoInitAppleType();
}
else if (g_Apple2Type == A2TYPE_PRAVETS8A)
{
KeybToggleP8ACapsLock (); // F10: Toggles Pravets8A Capslock
}
}
else if (wparam == VK_F11 && !KeybGetCtrlStatus()) // Save state (F11)
{
SoundCore_SetFade(FADE_OUT);
if(sg_PropertySheet.SaveStateSelectImage(window, true))
@ -1328,7 +1336,7 @@ LRESULT CALLBACK FrameWndProc (
}
SoundCore_SetFade(FADE_IN);
}
else if (wparam == VK_F12) // Load state (F12 or Ctrl+F12)
else if (wparam == VK_F12) // Load state (F12 or Ctrl+F12)
{
SoundCore_SetFade(FADE_OUT);
if(sg_PropertySheet.SaveStateSelectImage(window, false))
@ -1371,33 +1379,51 @@ LRESULT CALLBACK FrameWndProc (
}
else if ((g_nAppMode == MODE_RUNNING) || (g_nAppMode == MODE_LOGO) || (g_nAppMode == MODE_STEPPING))
{
// Note about Alt Gr (Right-Alt):
// . WM_KEYDOWN[Left-Control], then:
// . WM_KEYDOWN[Right-Alt]
BOOL extended = ((lparam & 0x01000000) != 0);
BOOL down = 1;
BOOL autorep = ((lparam & 0x40000000) != 0);
if ((!JoyProcessKey((int)wparam,extended,down,autorep)) && (g_nAppMode != MODE_LOGO))
KeybQueueKeypress((int)wparam,NOT_ASCII);
// NB. Alt Gr (Right-Alt): this normally send 2 WM_KEYDOWN messages for: VK_LCONTROL, then VK_RMENU
// . NB. The keyboard hook filter will suppress VK_LCONTROL (if -hook-altgr-control is passed on the cmd-line)
bool extended = (HIWORD(lparam) & KF_EXTENDED) != 0;
bool down = true;
bool autorep = (HIWORD(lparam) & KF_REPEAT) != 0;
BOOL IsJoyKey = JoyProcessKey((int)wparam, extended, down, autorep);
#if DEBUG_KEY_MESSAGES
LogOutput("WM_KEYDOWN: %08X (scanCode=%04X)\n", wparam, (lparam>>16)&0xfff);
#endif
if (!IsJoyKey &&
(g_nAppMode != MODE_LOGO)) // !MODE_LOGO - not emulating so don't pass to the VM's keyboard
{
KeybQueueKeypress(wparam, NOT_ASCII);
if (!autorep)
KeybAnyKeyDown(WM_KEYDOWN, wparam, extended);
}
}
else if (g_nAppMode == MODE_DEBUG)
{
DebuggerProcessKey(wparam); // Debugger already active, re-direct key to debugger
}
if (wparam == VK_F10)
{
if ((g_Apple2Type == A2TYPE_PRAVETS8A) && (GetKeyState(VK_CONTROL) >= 0))
{
KeybToggleP8ACapsLock ();//Toggles P8 Capslock
}
else
{
SetUsingCursor(FALSE);
}
}
break;
case WM_CHAR:
if ((g_nAppMode == MODE_RUNNING) || (g_nAppMode == MODE_STEPPING) || (g_nAppMode == MODE_LOGO))
{
if (!g_bDebuggerEatKey)
{
#if DEBUG_KEY_MESSAGES
LogOutput("WM_CHAR: %08X\n", wparam);
#endif
if (g_nAppMode != MODE_LOGO) // !MODE_LOGO - not emulating so don't pass to the VM's keyboard
KeybQueueKeypress(wparam, ASCII);
}
g_bDebuggerEatKey = false;
}
else if (g_nAppMode == MODE_DEBUG)
{
DebuggerInputConsoleChar((TCHAR)wparam);
}
break;
case WM_KEYUP:
// Process is done in WM_KEYUP: VK_F1 VK_F2 VK_F3 VK_F4 VK_F5 VK_F6 VK_F7 VK_F8
if ((wparam >= VK_F1) && (wparam <= VK_F8) && (buttondown == (int)wparam-VK_F1))
@ -1411,10 +1437,16 @@ LRESULT CALLBACK FrameWndProc (
}
else
{
BOOL extended = ((lparam & 0x01000000) != 0);
BOOL down = 0;
BOOL autorep = 0;
JoyProcessKey((int)wparam,extended,down,autorep);
bool extended = (HIWORD(lparam) & KF_EXTENDED) != 0;
bool down = false;
bool autorep = false;
BOOL bIsJoyKey = JoyProcessKey((int)wparam, extended, down, autorep);
#if DEBUG_KEY_MESSAGES
LogOutput("WM_KEYUP: %08X\n", wparam);
#endif
if (!bIsJoyKey)
KeybAnyKeyDown(WM_KEYUP, wparam, extended);
}
break;
@ -1724,30 +1756,37 @@ LRESULT CALLBACK FrameWndProc (
}
break;
case WM_SYSKEYDOWN:
case WM_SYSKEYDOWN: // ALT + any key; or F10
KeybUpdateCtrlShiftStatus();
// http://msdn.microsoft.com/en-us/library/windows/desktop/gg153546(v=vs.85).aspx
// v1.25.0: Alt-Return Alt-Enter toggle fullscreen
if (g_bAltKey && (wparam == VK_RETURN)) // NB. VK_RETURN = 0x0D; Normally WM_CHAR will be 0x0A but ALT key triggers as WM_SYSKEYDOWN and VK_MENU
if (g_bAltEnter_ToggleFullScreen && KeybGetAltStatus() && (wparam == VK_RETURN)) // NB. VK_RETURN = 0x0D; Normally WM_CHAR will be 0x0A but ALT key triggers as WM_SYSKEYDOWN and VK_MENU
return 0; // NOP -- eat key
else
PostMessage(window,WM_KEYDOWN,wparam,lparam);
PostMessage(window,WM_KEYDOWN,wparam,lparam);
if ((wparam == VK_F10) || (wparam == VK_MENU)) // VK_MENU == ALT Key
return 0;
break;
case WM_SYSKEYUP:
KeybUpdateCtrlShiftStatus();
// v1.25.0: Alt-Return Alt-Enter toggle fullscreen
if (g_bAltKey && (wparam == VK_RETURN)) // NB. VK_RETURN = 0x0D; Normally WM_CHAR will be 0x0A but ALT key triggers as WM_SYSKEYDOWN and VK_MENU
// F10: no WM_KEYUP handler for VK_F10. Don't allow WM_KEYUP to pass to default handler which will show the app window's "menu" (and lose focus)
if (wparam == VK_F10)
return 0;
if (g_bAltEnter_ToggleFullScreen && KeybGetAltStatus() && (wparam == VK_RETURN)) // NB. VK_RETURN = 0x0D; Normally WM_CHAR will be 0x0A but ALT key triggers as WM_SYSKEYDOWN and VK_MENU
ScreenWindowResize(false);
else
PostMessage(window,WM_KEYUP,wparam,lparam);
break;
case WM_MENUCHAR: // GH#556 - Suppress the Windows Default Beep (ie. Ding) whenever ALT+<key> is pressed
return (MNC_CLOSE << 16) | (wparam & 0xffff);
case WM_USER_BENCHMARK: {
UpdateWindow(window);
ResetMachineState();
@ -1761,10 +1800,7 @@ LRESULT CALLBACK FrameWndProc (
}
case WM_USER_RESTART:
// . Changed Apple computer type (][+ or //e)
// . Changed slot configuration
// . Changed disk speed (normal or enhanced)
// . Changed Freeze F8 rom setting
// Changed h/w config, eg. Apple computer type (][+ or //e), slot configuration, etc.
g_bRestart = true;
PostMessage(window,WM_CLOSE,0,0);
break;
@ -1921,7 +1957,7 @@ static void ProcessButtonClick(int button, bool bFromButtonUI /*=false*/)
case BTN_RUN:
KeybUpdateCtrlShiftStatus();
if( g_bCtrlKey )
if( KeybGetCtrlStatus() )
{
CtrlReset();
if (g_nAppMode == MODE_DEBUG)
@ -1965,7 +2001,7 @@ static void ProcessButtonClick(int button, bool bFromButtonUI /*=false*/)
case BTN_FULLSCR:
KeybUpdateCtrlShiftStatus();
ScreenWindowResize(g_bCtrlKey);
ScreenWindowResize( KeybGetCtrlStatus() );
break;
case BTN_DEBUG:
@ -2366,14 +2402,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

@ -3,10 +3,6 @@
// 1.19.0.0 Hard Disk Status/Indicator Light
#define HD_LED 1
// Keyboard -- keystroke type
enum {NOT_ASCII=0, ASCII};
// Win32
extern HWND g_hFrameWindow;
extern int g_nViewportCX;
@ -61,3 +57,5 @@
UINT GetFrameBufferHeight(void);
UINT Get3DBorderWidth(void);
UINT Get3DBorderHeight(void);
void SetAltEnterToggleFullScreen(bool mode);

View File

@ -695,6 +695,18 @@ void HD_GetLightStatus (Disk_Status_e *pDisk1Status_)
}
}
bool HD_ImageSwap(void)
{
std::swap(g_HardDisk[HARDDISK_1], g_HardDisk[HARDDISK_2]);
HD_SaveLastDiskImage(HARDDISK_1);
HD_SaveLastDiskImage(HARDDISK_2);
FrameRefreshStatus(DRAW_LEDS, false);
return true;
}
//===========================================================================
#define SS_YAML_VALUE_CARD_HDD "Generic HDD"

View File

@ -45,6 +45,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// 1.19.0.0 Hard Disk Status/Indicator Light
void HD_GetLightStatus (Disk_Status_e *pDisk1Status_);
bool HD_ImageSwap(void);
std::string HD_GetSnapshotCardName(void);
void HD_SaveSnapshot(class YamlSaveHelper& yamlSaveHelper);

View File

@ -111,6 +111,15 @@ static UINT g_bJoyportEnabled = 0; // Set to use Joyport to drive the 3 button i
static UINT g_uJoyportActiveStick = 0;
static UINT g_uJoyportReadMode = JOYPORT_LEFTRIGHT;
static bool g_bHookAltKeys = true;
//===========================================================================
void JoySetHookAltKeys(bool hook)
{
g_bHookAltKeys = hook;
}
//===========================================================================
void CheckJoystick0()
{
@ -296,7 +305,7 @@ void JoyInitialize()
#define SUPPORT_CURSOR_KEYS
BOOL JoyProcessKey(int virtkey, BOOL extended, BOOL down, BOOL autorep)
BOOL JoyProcessKey(int virtkey, bool extended, bool down, bool autorep)
{
static struct
{
@ -314,6 +323,9 @@ BOOL JoyProcessKey(int virtkey, BOOL extended, BOOL down, BOOL autorep)
return 0;
}
if (!g_bHookAltKeys && virtkey == VK_MENU) // GH#583
return 0;
//
BOOL keychange = 0;
@ -631,7 +643,7 @@ void JoyReset()
}
//===========================================================================
BYTE __stdcall JoyResetPosition(WORD, WORD, BYTE, BYTE, ULONG nExecutedCycles)
void JoyResetPosition(ULONG nExecutedCycles)
{
CpuCalcCycles(nExecutedCycles);
g_nJoyCntrResetCycle = g_nCumulativeCycles;
@ -640,8 +652,6 @@ BYTE __stdcall JoyResetPosition(WORD, WORD, BYTE, BYTE, ULONG nExecutedCycles)
CheckJoystick0();
if((joyinfo[joytype[1]] == DEVICE_JOYSTICK) || (joyinfo[joytype[1]] == DEVICE_JOYSTICK_THUMBSTICK2))
CheckJoystick1();
return MemReadFloatingBus(nExecutedCycles);
}
//===========================================================================
@ -919,13 +929,6 @@ void JoyportControl(const UINT uControl)
//===========================================================================
void JoySetSnapshot_v1(const unsigned __int64 JoyCntrResetCycle)
{
g_nJoyCntrResetCycle = JoyCntrResetCycle;
}
//
#define SS_YAML_KEY_COUNTERRESETCYCLE "Counter Reset Cycle"
#define SS_YAML_KEY_JOY0TRIMX "Joystick0 TrimX"
#define SS_YAML_KEY_JOY0TRIMY "Joystick0 TrimY"

View File

@ -8,7 +8,7 @@ enum JOY1CHOICE {J1C_DISABLED=0, J1C_JOYSTICK2, J1C_KEYBD_CURSORS, J1C_KEYBD_NUM
enum {JOYSTICK_MODE_FLOATING=0, JOYSTICK_MODE_CENTERING}; // Joystick centering control
void JoyInitialize();
BOOL JoyProcessKey(int,BOOL,BOOL,BOOL);
BOOL JoyProcessKey(int,bool,bool,bool);
void JoyReset();
void JoySetButton(eBUTTON,eBUTTONSTATE);
BOOL JoySetEmulationType(HWND,DWORD,int, const bool bMousecardActive);
@ -24,10 +24,10 @@ DWORD JoyGetJoyType(UINT num);
void JoySetTrim(short nValue, bool bAxisX);
short JoyGetTrim(bool bAxisX);
void JoyportControl(const UINT uControl);
void JoySetSnapshot_v1(const unsigned __int64 JoyCntrResetCycle);
void JoySetHookAltKeys(bool hook);
void JoySaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
void JoyLoadSnapshot(class YamlLoadHelper& yamlLoadHelper);
BYTE __stdcall JoyReadButton(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles);
BYTE __stdcall JoyReadPosition(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles);
BYTE __stdcall JoyResetPosition(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles);
void JoyResetPosition(ULONG nExecutedCycles);

View File

@ -35,10 +35,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "Tape.h"
#include "YamlHelper.h"
#include "Video.h" // Needed by TK3000 //e, to refresh the frame at each |Mode| change
#include "Log.h"
static BYTE asciicode[2][10] = {
{0x08,0x0D,0x15,0x2F,0x00,0x00,0x00,0x00,0x00,0x00},
{0x08,0x0B,0x15,0x0A,0x00,0x00,0x00,0x00,0x00,0x7F}
// VK_LEFT/UP/RIGHT/DOWN/SELECT, VK_PRINT/EXECUTE/SNAPSHOT/INSERT/DELETE
{0x08,0x00,0x15,0x00,0x00, 0x00,0x00,0x00,0x00,0x00}, // Apple II
{0x08,0x0B,0x15,0x0A,0x00, 0x00,0x00,0x00,0x00,0x7F} // Apple //e
}; // Convert PC arrow keys to Apple keycodes
bool g_bShiftKey = false;
@ -49,17 +51,19 @@ static bool g_bTK3KModeKey = false; //TK3000 //e |Mode| key
static bool g_bCapsLock = true; //Caps lock key for Apple2 and Lat/Cyr lock for Pravets8
static bool g_bP8CapsLock = true; //Caps lock key of Pravets 8A/C
static int lastvirtkey = 0; // Current PC keycode
static BYTE keycode = 0; // Current Apple keycode
static BOOL keywaiting = 0;
static BYTE g_nLastKey = 0x00;
static bool g_bAltGrSendsWM_CHAR = false;
//
// ----- ALL GLOBALLY ACCESSIBLE FUNCTIONS ARE BELOW THIS LINE -----
//
void KeybSetAltGrSendsWM_CHAR(bool state)
{
g_bAltGrSendsWM_CHAR = state;
}
//===========================================================================
void KeybReset()
@ -68,36 +72,31 @@ void KeybReset()
}
//===========================================================================
bool KeybGetAltStatus ()
{
return g_bAltKey;
}
//===========================================================================
bool KeybGetCapsStatus ()
bool KeybGetCapsStatus()
{
return g_bCapsLock;
}
//===========================================================================
bool KeybGetP8CapsStatus()
{
return g_bP8CapsLock;
}
//===========================================================================
/*
bool KeybGetCapsAllowed() //For Pravets 8A/C only
bool KeybGetAltStatus()
{
return g_CapsLockAllowed;
return g_bAltKey;
}
*/
//===========================================================================
bool KeybGetCtrlStatus ()
bool KeybGetCtrlStatus()
{
return g_bCtrlKey;
}
//===========================================================================
bool KeybGetShiftStatus ()
bool KeybGetShiftStatus()
{
return g_bShiftKey;
}
@ -105,21 +104,24 @@ bool KeybGetShiftStatus ()
//===========================================================================
void KeybUpdateCtrlShiftStatus()
{
g_bShiftKey = (GetKeyState( VK_SHIFT ) & KF_UP) ? true : false; // 0x8000 KF_UP
g_bCtrlKey = (GetKeyState( VK_CONTROL) & KF_UP) ? true : false;
g_bAltKey = (GetKeyState( VK_MENU ) & KF_UP) ? true : false;
g_bAltKey = (GetKeyState( VK_MENU ) < 0) ? true : false; // L or R alt
g_bCtrlKey = (GetKeyState( VK_CONTROL) < 0) ? true : false; // L or R ctrl
g_bShiftKey = (GetKeyState( VK_SHIFT ) < 0) ? true : false; // L or R shift
}
//===========================================================================
BYTE KeybGetKeycode () // Used by MemCheckPaging() & VideoCheckMode()
BYTE KeybGetKeycode () // Used by IORead_C01x() and TapeRead() for Pravets8A
{
return keycode;
}
//===========================================================================
void KeybQueueKeypress (int key, BOOL bASCII)
bool IsVirtualKeyAnAppleIIKey(WPARAM wparam);
void KeybQueueKeypress (WPARAM key, Keystroke_e bASCII)
{
if (bASCII == ASCII)
if (bASCII == ASCII) // WM_CHAR
{
if (g_bFreshReset && key == VK_CANCEL) // OLD HACK: 0x03
{
@ -199,7 +201,7 @@ void KeybQueueKeypress (int key, BOOL 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))
@ -208,7 +210,7 @@ void KeybQueueKeypress (int key, BOOL bASCII)
}
else //i.e. latin letters
{
if (GetCapsLockAllowed() == false)
if (GetCapsLockAllowed() == false)
{
if (key == '{') keycode = '[';
if (key == '}') keycode = ']';
@ -235,24 +237,24 @@ void KeybQueueKeypress (int key, BOOL 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))
@ -274,9 +276,8 @@ void KeybQueueKeypress (int key, BOOL bASCII)
keycode = key;
}
}
lastvirtkey = LOBYTE(VkKeyScan(key));
}
else //(bASCII != ASCII)
else //(bASCII != ASCII) // WM_KEYDOWN
{
// Note: VK_CANCEL is Control-Break
if ((key == VK_CANCEL) && (GetKeyState(VK_CONTROL) < 0))
@ -301,13 +302,42 @@ void KeybQueueKeypress (int key, BOOL bASCII)
FrameRefreshStatus(DRAW_LEDS); // TODO: Implement |Mode| LED in the UI; make it appear only when in TK3000 mode
VideoRedrawScreen(); // TODO: Still need to implement page mode switching and 'whatnot'
}
return;
}
if (!((key >= VK_LEFT) && (key <= VK_DELETE) && asciicode[IS_APPLE2 ? 0 : 1][key - VK_LEFT]))
return;
if (key >= VK_LEFT && key <= VK_DELETE)
{
BYTE n = asciicode[IS_APPLE2 ? 0 : 1][key - VK_LEFT]; // Convert to Apple arrow keycode
if (!n)
return;
keycode = n;
}
else if (g_bAltGrSendsWM_CHAR && (GetKeyState(VK_RMENU) < 0)) // Right Alt (aka Alt Gr) - GH#558, GH#625
{
if (IsVirtualKeyAnAppleIIKey(key))
{
// When Alt Gr is down, then WM_CHAR is not posted - so fix this.
// NB. Still get WM_KEYDOWN/WM_KEYUP for the virtual key, so AKD works.
WPARAM newKey = key;
keycode = asciicode[IS_APPLE2 ? 0 : 1][key - VK_LEFT]; // Convert to Apple arrow keycode
lastvirtkey = key;
// Translate if shift or ctrl is down
if (key >= 'A' && key <= 'Z')
{
if ( (GetKeyState(VK_SHIFT) >= 0) && !g_bCapsLock )
newKey += 'a' - 'A'; // convert to lowercase key
else if (GetHookAltGrControl() && GetKeyState(VK_CONTROL) < 0)
newKey -= 'A' - 1; // convert to control-key
}
PostMessage(g_hFrameWindow, WM_CHAR, newKey, 0);
}
return;
}
else
{
return;
}
}
keywaiting = 1;
@ -389,14 +419,77 @@ static char ClipboardCurrChar(bool bIncPtr)
//===========================================================================
BYTE __stdcall KeybReadData (WORD, WORD, BYTE, BYTE, ULONG)
const UINT kAKDNumElements = 256/64;
static uint64_t g_AKDFlags[2][kAKDNumElements] = { {0,0,0,0}, // normal
{0,0,0,0}}; // extended
static bool IsVirtualKeyAnAppleIIKey(WPARAM wparam)
{
if (wparam == VK_BACK ||
wparam == VK_TAB ||
wparam == VK_RETURN ||
wparam == VK_ESCAPE ||
wparam == VK_SPACE ||
(wparam >= VK_LEFT && wparam <= VK_DOWN) ||
wparam == VK_DELETE ||
(wparam >= '0' && wparam <= '9') ||
(wparam >= 'A' && wparam <= 'Z') ||
(wparam >= VK_NUMPAD0 && wparam <= VK_NUMPAD9) ||
(wparam >= VK_MULTIPLY && wparam <= VK_DIVIDE) ||
(wparam >= VK_OEM_1 && wparam <= VK_OEM_3) || // 7 in total
(wparam >= VK_OEM_4 && wparam <= VK_OEM_8) || // 5 in total
(wparam == VK_OEM_102))
{
return true;
}
return false;
}
// NB. Don't need to be concerned about if numpad/cursors are used for joystick,
// since parent calls JoyProcessKey() just before this.
void KeybAnyKeyDown(UINT message, WPARAM wparam, bool bIsExtended)
{
if (wparam > 255)
{
_ASSERT(0);
return;
}
if (IsVirtualKeyAnAppleIIKey(wparam))
{
UINT offset = wparam >> 6;
UINT bit = wparam & 0x3f;
UINT idx = !bIsExtended ? 0 : 1;
if (message == WM_KEYDOWN)
g_AKDFlags[idx][offset] |= (1LL<<bit);
else
g_AKDFlags[idx][offset] &= ~(1LL<<bit);
}
}
static bool IsAKD(void)
{
uint64_t* p = &g_AKDFlags[0][0];
for (UINT i=0; i<sizeof(g_AKDFlags)/sizeof(g_AKDFlags[0][0]); i++)
if (p[i])
return true;
return false;
}
//===========================================================================
BYTE KeybReadData (void)
{
LogFileTimeUntilFirstKeyRead();
if(g_bPasteFromClipboard)
if (g_bPasteFromClipboard)
ClipboardInit();
if(g_bClipboardActive)
if (g_bClipboardActive)
{
if(*lptstr == 0)
ClipboardDone();
@ -411,12 +504,12 @@ BYTE __stdcall KeybReadData (WORD, WORD, BYTE, BYTE, ULONG)
//===========================================================================
BYTE __stdcall KeybReadFlag (WORD, WORD, BYTE, BYTE, ULONG)
BYTE KeybReadFlag (void)
{
if(g_bPasteFromClipboard)
if (g_bPasteFromClipboard)
ClipboardInit();
if(g_bClipboardActive)
if (g_bClipboardActive)
{
if(*lptstr == 0)
ClipboardDone();
@ -428,7 +521,12 @@ BYTE __stdcall KeybReadFlag (WORD, WORD, BYTE, BYTE, ULONG)
keywaiting = 0;
return keycode | ((GetKeyState(lastvirtkey) < 0) ? 0x80 : 0);
if (IS_APPLE2) // Include Pravets machines too?
return keycode;
// AKD
return keycode | (IsAKD() ? 0x80 : 0);
}
//===========================================================================
@ -452,14 +550,8 @@ void KeybToggleP8ACapsLock ()
//===========================================================================
void KeybSetSnapshot_v1(const BYTE LastKey)
{
g_nLastKey = LastKey;
}
//
#define SS_YAML_KEY_LASTKEY "Last Key"
#define SS_YAML_KEY_KEYWAITING "Key Waiting"
static std::string KeybGetSnapshotStructName(void)
{
@ -470,15 +562,19 @@ static std::string KeybGetSnapshotStructName(void)
void KeybSaveSnapshot(YamlSaveHelper& yamlSaveHelper)
{
YamlSaveHelper::Label state(yamlSaveHelper, "%s:\n", KeybGetSnapshotStructName().c_str());
yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_LASTKEY, g_nLastKey);
yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_LASTKEY, keycode);
yamlSaveHelper.SaveBool(SS_YAML_KEY_KEYWAITING, keywaiting ? true : false);
}
void KeybLoadSnapshot(YamlLoadHelper& yamlLoadHelper)
void KeybLoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version)
{
if (!yamlLoadHelper.GetSubMap(KeybGetSnapshotStructName()))
return;
g_nLastKey = (BYTE) yamlLoadHelper.LoadUint(SS_YAML_KEY_LASTKEY);
keycode = (BYTE) yamlLoadHelper.LoadUint(SS_YAML_KEY_LASTKEY);
if (version == 2)
keywaiting = (BOOL) yamlLoadHelper.LoadBool(SS_YAML_KEY_KEYWAITING);
yamlLoadHelper.PopMap();
}

View File

@ -1,27 +1,23 @@
#pragma once
enum Keystroke_e {NOT_ASCII=0, ASCII};
void ClipboardInitiatePaste();
void KeybReset();
bool KeybGetAltStatus();
void KeybSetAltGrSendsWM_CHAR(bool state);
bool KeybGetCapsStatus();
bool KeybGetP8CapsStatus();
bool KeybGetAltStatus();
bool KeybGetCtrlStatus();
bool KeybGetShiftStatus();
bool KeybGetCapsAllowed(); //For Pravets8A/C only
void KeybUpdateCtrlShiftStatus();
BYTE KeybGetKeycode ();
void KeybQueueKeypress (int,BOOL);
void KeybQueueKeypress(WPARAM key, Keystroke_e bASCII);
void KeybToggleCapsLock ();
void KeybToggleP8ACapsLock ();
void KeybSetSnapshot_v1(const BYTE LastKey);
void KeybAnyKeyDown(UINT message, WPARAM wparam, bool bIsExtended);
BYTE KeybReadData (void);
BYTE KeybReadFlag (void);
void KeybSaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
void KeybLoadSnapshot(class YamlLoadHelper& yamlLoadHelper);
BYTE __stdcall KeybReadData (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles);
BYTE __stdcall KeybReadFlag (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles);
BYTE __stdcall KbdAllow8Bit (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles); //For Pravets A/C only
extern bool g_bShiftKey;
extern bool g_bCtrlKey;
extern bool g_bAltKey;
void KeybLoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT version);

428
source/LanguageCard.cpp Normal file
View File

@ -0,0 +1,428 @@
/*
AppleWin : An Apple //e emulator for Windows
Copyright (C) 1994-1996, Michael O'Brien
Copyright (C) 1999-2001, Oliver Schmidt
Copyright (C) 2002-2005, Tom Charlesworth
Copyright (C) 2006-2018, Tom Charlesworth, Michael Pohoreski, Nick Westgate
AppleWin is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
AppleWin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with AppleWin; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Description: Language Card and Saturn 128K emulation
*
* Author: various
*/
#include "StdAfx.h"
#include "Applewin.h"
#include "LanguageCard.h"
#include "Log.h"
#include "Memory.h"
#include "YamlHelper.h"
const UINT LanguageCardUnit::kMemModeInitialState = MF_BANK2 | MF_WRITERAM; // !INTCXROM
LanguageCardUnit::LanguageCardUnit(void) :
m_uLastRamWrite(0),
m_type(CT_LanguageCardIIe)
{
SetMemMainLanguageCard(NULL, true);
}
LanguageCardUnit::~LanguageCardUnit(void)
{
SetMemMainLanguageCard(NULL);
}
void LanguageCardUnit::InitializeIO(void)
{
RegisterIoHandler(kSlot0, &LanguageCardUnit::IO, &LanguageCardUnit::IO, NULL, NULL, this, NULL);
}
BYTE __stdcall LanguageCardUnit::IO(WORD PC, WORD uAddr, BYTE bWrite, BYTE uValue, ULONG nExecutedCycles)
{
LanguageCardUnit* pLC = (LanguageCardUnit*) MemGetSlotParameters(kSlot0);
DWORD memmode = GetMemMode();
DWORD lastmemmode = memmode;
memmode &= ~(MF_BANK2 | MF_HIGHRAM);
if (!(uAddr & 8))
memmode |= MF_BANK2;
if (((uAddr & 2) >> 1) == (uAddr & 1))
memmode |= MF_HIGHRAM;
if (uAddr & 1) // GH#392
{
if (!bWrite && pLC->GetLastRamWrite())
{
memmode |= MF_WRITERAM; // UTAIIe:5-23
}
}
else
{
memmode &= ~MF_WRITERAM; // UTAIIe:5-23
}
pLC->SetLastRamWrite( ((uAddr & 1) && !bWrite) ); // UTAIIe:5-23
SetMemMode(memmode);
//
if (MemOptimizeForModeChanging(PC, uAddr))
return bWrite ? 0 : MemReadFloatingBus(nExecutedCycles);
// IF THE MEMORY PAGING MODE HAS CHANGED, UPDATE OUR MEMORY IMAGES AND
// WRITE TABLES.
if (lastmemmode != memmode)
{
MemUpdatePaging(0); // Initialize=0
}
return bWrite ? 0 : MemReadFloatingBus(nExecutedCycles);
}
//-------------------------------------
LanguageCardSlot0::LanguageCardSlot0(void)
{
m_type = CT_LanguageCard;
m_pMemory = (LPBYTE) VirtualAlloc(NULL, kMemBankSize, MEM_COMMIT, PAGE_READWRITE);
SetMemMainLanguageCard(m_pMemory);
}
LanguageCardSlot0::~LanguageCardSlot0(void)
{
VirtualFree(m_pMemory, 0, MEM_RELEASE);
m_pMemory = NULL;
}
//
static const UINT kUNIT_LANGUAGECARD_VER = 1;
static const UINT kSLOT_LANGUAGECARD = LanguageCardUnit::kSlot0;
#define SS_YAML_VALUE_CARD_LANGUAGECARD "Language Card"
#define SS_YAML_KEY_MEMORYMODE "Memory Mode"
#define SS_YAML_KEY_LASTRAMWRITE "Last RAM Write"
std::string LanguageCardSlot0::GetSnapshotMemStructName(void)
{
static const std::string name("Memory Bank");
return name;
}
std::string LanguageCardSlot0::GetSnapshotCardName(void)
{
static const std::string name(SS_YAML_VALUE_CARD_LANGUAGECARD);
return name;
}
void LanguageCardSlot0::SaveLCState(YamlSaveHelper& yamlSaveHelper)
{
yamlSaveHelper.SaveHexUint32(SS_YAML_KEY_MEMORYMODE, GetMemMode() & (MF_WRITERAM|MF_HIGHRAM|MF_BANK2));
yamlSaveHelper.SaveUint(SS_YAML_KEY_LASTRAMWRITE, GetLastRamWrite() ? 1 : 0);
}
void LanguageCardSlot0::LoadLCState(YamlLoadHelper& yamlLoadHelper)
{
DWORD memMode = yamlLoadHelper.LoadUint(SS_YAML_KEY_MEMORYMODE) & MF_LANGCARD_MASK;
BOOL lastRamWrite = yamlLoadHelper.LoadUint(SS_YAML_KEY_LASTRAMWRITE) ? TRUE : FALSE;
SetMemMode( (GetMemMode() & ~MF_LANGCARD_MASK) | memMode );
SetLastRamWrite(lastRamWrite);
}
void LanguageCardSlot0::SaveSnapshot(YamlSaveHelper& yamlSaveHelper)
{
if (!IsApple2PlusOrClone(GetApple2Type()))
{
_ASSERT(0);
LogFileOutput("Warning: Save-state attempted to save %s for //e or above\n", GetSnapshotCardName().c_str());
return; // No Language Card support for //e and above
}
YamlSaveHelper::Slot slot(yamlSaveHelper, GetSnapshotCardName(), kSLOT_LANGUAGECARD, kUNIT_LANGUAGECARD_VER);
YamlSaveHelper::Label state(yamlSaveHelper, "%s:\n", SS_YAML_KEY_STATE);
SaveLCState(yamlSaveHelper);
{
YamlSaveHelper::Label state(yamlSaveHelper, "%s:\n", GetSnapshotMemStructName().c_str());
yamlSaveHelper.SaveMemory(m_pMemory, kMemBankSize);
}
}
bool LanguageCardSlot0::LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version)
{
if (slot != kSLOT_LANGUAGECARD)
throw std::string("Card: wrong slot");
if (version != kUNIT_LANGUAGECARD_VER)
throw std::string("Card: wrong version");
// "State"
LoadLCState(yamlLoadHelper);
if (!m_pMemory)
{
m_pMemory = (LPBYTE) VirtualAlloc(NULL, kMemBankSize, MEM_COMMIT, PAGE_READWRITE);
if (!m_pMemory)
throw std::string("Card: mem alloc failed");
}
if (!yamlLoadHelper.GetSubMap(GetSnapshotMemStructName()))
throw std::string("Memory: Missing map name: " + GetSnapshotMemStructName());
yamlLoadHelper.LoadMemory(m_pMemory, kMemBankSize);
yamlLoadHelper.PopMap();
// NB. MemUpdatePaging(TRUE) called at end of Snapshot_LoadState_v2()
return true;
}
//-------------------------------------
Saturn128K::Saturn128K(UINT banks)
{
m_type = CT_Saturn128K;
m_uSaturnTotalBanks = (banks == 0) ? kMaxSaturnBanks : banks;
m_uSaturnActiveBank = 0;
for (UINT i=0; i<kMaxSaturnBanks; i++)
m_aSaturnBanks[i] = NULL;
m_aSaturnBanks[0] = m_pMemory; // Reuse memory allocated in base ctor
for (UINT i = 1; i < m_uSaturnTotalBanks; i++)
m_aSaturnBanks[i] = (LPBYTE) VirtualAlloc(NULL, kMemBankSize, MEM_COMMIT, PAGE_READWRITE); // Saturn banks are 16K, max 8 banks/card
SetMemMainLanguageCard( m_aSaturnBanks[ m_uSaturnActiveBank ] );
}
Saturn128K::~Saturn128K(void)
{
m_aSaturnBanks[0] = NULL; // just zero this - deallocated in base ctor
for (UINT i = 1; i < m_uSaturnTotalBanks; i++)
{
if (m_aSaturnBanks[i])
{
VirtualFree(m_aSaturnBanks[i], 0, MEM_RELEASE);
m_aSaturnBanks[i] = NULL;
}
}
}
void Saturn128K::SetMemorySize(UINT banks)
{
m_uSaturnTotalBanks = banks;
}
UINT Saturn128K::GetActiveBank(void)
{
return m_uSaturnActiveBank;
}
void Saturn128K::InitializeIO(void)
{
RegisterIoHandler(kSlot0, &Saturn128K::IO, &Saturn128K::IO, NULL, NULL, this, NULL);
}
BYTE __stdcall Saturn128K::IO(WORD PC, WORD uAddr, BYTE bWrite, BYTE uValue, ULONG nExecutedCycles)
{
/*
Bin Addr.
$C0N0 4K Bank A, RAM read, Write protect
$C0N1 4K Bank A, ROM read, Write enabled
$C0N2 4K Bank A, ROM read, Write protect
$C0N3 4K Bank A, RAM read, Write enabled
0100 $C0N4 select 16K Bank 1
0101 $C0N5 select 16K Bank 2
0110 $C0N6 select 16K Bank 3
0111 $C0N7 select 16K Bank 4
$C0N8 4K Bank B, RAM read, Write protect
$C0N9 4K Bank B, ROM read, Write enabled
$C0NA 4K Bank B, ROM read, Write protect
$C0NB 4K Bank B, RAM read, Write enabled
1100 $C0NC select 16K Bank 5
1101 $C0ND select 16K Bank 6
1110 $C0NE select 16K Bank 7
1111 $C0NF select 16K Bank 8
*/
Saturn128K* pLC = (Saturn128K*) MemGetSlotParameters(kSlot0);
_ASSERT(pLC->m_uSaturnTotalBanks);
if (!pLC->m_uSaturnTotalBanks)
return bWrite ? 0 : MemReadFloatingBus(nExecutedCycles);
bool bBankChanged = false;
DWORD memmode=0, lastmemmode=0;
if (uAddr & (1<<2))
{
pLC->m_uSaturnActiveBank = 0 // Saturn 128K Language Card Bank 0 .. 7
| (uAddr >> 1) & 4
| (uAddr >> 0) & 3;
if (pLC->m_uSaturnActiveBank >= pLC->m_uSaturnTotalBanks)
{
// EG. Run RAMTEST128K tests on a Saturn 64K card
// TODO: Saturn::UpdatePaging() should deal with this case:
// . Technically read floating-bus, write to nothing
// . But the mem cache doesn't support floating-bus reads from non-I/O space
pLC->m_uSaturnActiveBank = pLC->m_uSaturnTotalBanks-1; // FIXME: just prevent crash for now!
}
SetMemMainLanguageCard( pLC->m_aSaturnBanks[ pLC->m_uSaturnActiveBank ] );
bBankChanged = true;
}
else
{
memmode = GetMemMode();
lastmemmode = memmode;
memmode &= ~(MF_BANK2 | MF_HIGHRAM);
if (!(uAddr & 8))
memmode |= MF_BANK2;
if (((uAddr & 2) >> 1) == (uAddr & 1))
memmode |= MF_HIGHRAM;
if (uAddr & 1 && pLC->GetLastRamWrite())// Saturn differs from Apple's 16K LC: any access (LC is read-only)
memmode |= MF_WRITERAM;
else
memmode &= ~MF_WRITERAM;
pLC->SetLastRamWrite(uAddr & 1); // Saturn differs from Apple's 16K LC: any access (LC is read-only)
SetMemMode(memmode);
}
// NB. Unlike LC, no need to check if next opcode is STA $C002-5, as Saturn is not for //e
// IF THE MEMORY PAGING MODE HAS CHANGED, UPDATE OUR MEMORY IMAGES AND
// WRITE TABLES.
if ((lastmemmode != memmode) || bBankChanged)
{
MemUpdatePaging(0); // Initialize=0
}
return bWrite ? 0 : MemReadFloatingBus(nExecutedCycles);
}
//
static const UINT kUNIT_SATURN_VER = 1;
static const UINT kSLOT_SATURN = LanguageCardUnit::kSlot0;
#define SS_YAML_VALUE_CARD_SATURN128 "Saturn 128"
#define SS_YAML_KEY_NUM_SATURN_BANKS "Num Saturn Banks"
#define SS_YAML_KEY_ACTIVE_SATURN_BANK "Active Saturn Bank"
std::string Saturn128K::GetSnapshotMemStructName(void)
{
static const std::string name("Memory Bank");
return name;
}
std::string Saturn128K::GetSnapshotCardName(void)
{
static const std::string name(SS_YAML_VALUE_CARD_SATURN128);
return name;
}
void Saturn128K::SaveSnapshot(YamlSaveHelper& yamlSaveHelper)
{
if (!IsApple2PlusOrClone(GetApple2Type()))
{
_ASSERT(0);
LogFileOutput("Warning: Save-state attempted to save %s for //e or above\n", GetSnapshotCardName().c_str());
return; // No Saturn support for //e and above
}
YamlSaveHelper::Slot slot(yamlSaveHelper, GetSnapshotCardName(), kSLOT_SATURN, kUNIT_SATURN_VER);
YamlSaveHelper::Label state(yamlSaveHelper, "%s:\n", SS_YAML_KEY_STATE);
SaveLCState(yamlSaveHelper);
yamlSaveHelper.Save("%s: 0x%02X # [1..8] 4=64K, 8=128K card\n", SS_YAML_KEY_NUM_SATURN_BANKS, m_uSaturnTotalBanks);
yamlSaveHelper.Save("%s: 0x%02X # [0..7]\n", SS_YAML_KEY_ACTIVE_SATURN_BANK, m_uSaturnActiveBank);
for(UINT uBank = 0; uBank < m_uSaturnTotalBanks; uBank++)
{
LPBYTE pMemBase = m_aSaturnBanks[uBank];
YamlSaveHelper::Label state(yamlSaveHelper, "%s%02X:\n", GetSnapshotMemStructName().c_str(), uBank);
yamlSaveHelper.SaveMemory(pMemBase, kMemBankSize);
}
}
bool Saturn128K::LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version)
{
if (slot != kSLOT_SATURN) // fixme
throw std::string("Card: wrong slot");
if (version != kUNIT_SATURN_VER)
throw std::string("Card: wrong version");
// "State"
LoadLCState(yamlLoadHelper);
UINT numBanks = yamlLoadHelper.LoadUint(SS_YAML_KEY_NUM_SATURN_BANKS);
UINT activeBank = yamlLoadHelper.LoadUint(SS_YAML_KEY_ACTIVE_SATURN_BANK);
if (numBanks < 1 || numBanks > kMaxSaturnBanks || activeBank >= numBanks)
throw std::string(SS_YAML_KEY_UNIT ": Bad Saturn card state");
m_uSaturnTotalBanks = numBanks;
m_uSaturnActiveBank = activeBank;
//
for(UINT uBank = 0; uBank < m_uSaturnTotalBanks; uBank++)
{
LPBYTE pBank = m_aSaturnBanks[uBank];
if (!pBank)
{
pBank = m_aSaturnBanks[uBank] = (LPBYTE) VirtualAlloc(NULL, kMemBankSize, MEM_COMMIT, PAGE_READWRITE);
if (!pBank)
throw std::string("Card: mem alloc failed");
}
// "Memory Bankxx"
char szBank[3];
sprintf(szBank, "%02X", uBank);
std::string memName = GetSnapshotMemStructName() + szBank;
if (!yamlLoadHelper.GetSubMap(memName))
throw std::string("Memory: Missing map name: " + memName);
yamlLoadHelper.LoadMemory(pBank, kMemBankSize);
yamlLoadHelper.PopMap();
}
SetMemMainLanguageCard( m_aSaturnBanks[ m_uSaturnActiveBank ] );
// NB. MemUpdatePaging(TRUE) called at end of Snapshot_LoadState_v2()
return true;
}

89
source/LanguageCard.h Normal file
View File

@ -0,0 +1,89 @@
#pragma once
//
// Language Card (base unit) for Apple //e and above
//
class LanguageCardUnit
{
public:
LanguageCardUnit(void);
virtual ~LanguageCardUnit(void);
virtual void InitializeIO(void);
virtual void SetMemorySize(UINT banks) {} // No-op for //e and slot-0 16K LC
virtual UINT GetActiveBank(void) { return 0; } // Always 0 as only 1x 16K bank
virtual void SaveSnapshot(class YamlSaveHelper& yamlSaveHelper) { _ASSERT(0); } // Not used for //e
virtual bool LoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version) { _ASSERT(0); return false; } // Not used for //e
BOOL GetLastRamWrite(void) { return m_uLastRamWrite; }
void SetLastRamWrite(BOOL count) { m_uLastRamWrite = count; }
SS_CARDTYPE GetMemoryType(void) { return m_type; }
static BYTE __stdcall IO(WORD PC, WORD uAddr, BYTE bWrite, BYTE uValue, ULONG nExecutedCycles);
static const UINT kMemModeInitialState;
static const UINT kSlot0 = 0;
protected:
SS_CARDTYPE m_type;
private:
UINT m_uLastRamWrite;
};
//
// Language Card (slot-0) for Apple II or II+
//
class LanguageCardSlot0 : public LanguageCardUnit
{
public:
LanguageCardSlot0(void);
virtual ~LanguageCardSlot0(void);
virtual void SaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
virtual bool LoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version);
static const UINT kMemBankSize = 16*1024;
static std::string GetSnapshotCardName(void);
protected:
void SaveLCState(class YamlSaveHelper& yamlSaveHelper);
void LoadLCState(class YamlLoadHelper& yamlLoadHelper);
LPBYTE m_pMemory;
private:
std::string GetSnapshotMemStructName(void);
};
//
// Saturn 128K
//
class Saturn128K : public LanguageCardSlot0
{
public:
Saturn128K(UINT banks);
virtual ~Saturn128K(void);
virtual void InitializeIO(void);
virtual void SetMemorySize(UINT banks);
virtual UINT GetActiveBank(void);
virtual void SaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
virtual bool LoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version);
static BYTE __stdcall IO(WORD PC, WORD uAddr, BYTE bWrite, BYTE uValue, ULONG nExecutedCycles);
// "The boards consist of 16K banks of memory (4 banks for the 64K board, 8 banks for the 128K), accessed one at a time" - Ref: "64K/128K RAM BOARD", Saturn Systems, Ch.1 Introduction(pg-5)
static const UINT kMaxSaturnBanks = 8; // 8 * 16K = 128K
static std::string GetSnapshotCardName(void);
private:
std::string GetSnapshotMemStructName(void);
UINT m_uSaturnTotalBanks; // Will be > 0 if Saturn card is installed
UINT m_uSaturnActiveBank; // Saturn 128K Language Card Bank 0 .. 7
LPBYTE m_aSaturnBanks[kMaxSaturnBanks];
};

View File

@ -32,6 +32,31 @@ FILE* g_fh = NULL;
//---------------------------------------------------------------------------
void LogInit(void)
{
if (g_fh)
return;
g_fh = fopen("AppleWin.log", "a+t"); // Open log file (append & text mode)
setvbuf(g_fh, NULL, _IONBF, 0); // No buffering (so implicit fflush after every fprintf)
CHAR aDateStr[80], aTimeStr[80];
GetDateFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, (LPTSTR)aDateStr, sizeof(aDateStr));
GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, (LPTSTR)aTimeStr, sizeof(aTimeStr));
fprintf(g_fh, "*** Logging started: %s %s\n", aDateStr, aTimeStr);
}
void LogDone(void)
{
if (!g_fh)
return;
fprintf(g_fh,"*** Logging ended\n\n");
fclose(g_fh);
g_fh = NULL;
}
//---------------------------------------------------------------------------
void LogOutput(LPCTSTR format, ...)
{
TCHAR output[256];

View File

@ -10,5 +10,7 @@
extern FILE* g_fh; // Filehandle for log file
extern void LogOutput(LPCTSTR format, ...);
extern void LogFileOutput(LPCTSTR format, ...);
void LogInit(void);
void LogDone(void);
void LogOutput(LPCTSTR format, ...);
void LogFileOutput(LPCTSTR format, ...);

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,10 @@
#define MF_SLOTC3ROM 0x00000100
#define MF_INTCXROM 0x00000200
#define MF_WRITERAM 0x00000400 // Language Card RAM is Write Enabled
#define MF_IOUDIS 0x00000800 // Disable IOU access for addresses $C058 to $C05F; enable access to DHIRES switch (0=on) (Enhanced //e only)
#define MF_IMAGEMASK 0x000003F7
#define MF_LANGCARD_MASK (MF_WRITERAM|MF_HIGHRAM|MF_BANK2)
enum
{
@ -39,18 +42,8 @@ enum MemoryInitPattern_e
, NUM_MIP
};
enum MemoryType_e
{
MEM_TYPE_NATIVE = 0,
MEM_TYPE_RAMWORKS = 1,
MEM_TYPE_SATURN = 2,
NUM_MEM_TYPE = 3
};
typedef BYTE (__stdcall *iofunction)(WORD nPC, WORD nAddr, BYTE nWriteFlag, BYTE nWriteValue, ULONG nExecutedCycles);
extern MemoryType_e g_eMemType;
extern iofunction IORead[256];
extern iofunction IOWrite[256];
extern LPBYTE memwrite[0x100];
@ -63,11 +56,6 @@ extern UINT g_uMaxExPages; // user requested ram pages (from cmd line)
extern UINT g_uActiveBank;
#endif
#ifdef SATURN
extern UINT g_uSaturnTotalBanks;
extern UINT g_uSaturnActiveBank; // Saturn 128K Language Card Bank 0 .. 7
#endif // SATURN
void RegisterIoHandler(UINT uSlot, iofunction IOReadC0, iofunction IOWriteC0, iofunction IOReadCx, iofunction IOWriteCx, LPVOID lpSlotParameter, BYTE* pExpansionRom);
void MemDestroy ();
@ -78,6 +66,8 @@ LPBYTE MemGetMainPtr(const WORD);
LPBYTE MemGetBankPtr(const UINT nBank);
LPBYTE MemGetCxRomPeripheral();
DWORD GetMemMode(void);
void SetMemMode(DWORD memmode);
bool MemOptimizeForModeChanging(WORD programcounter, WORD address);
bool MemIsAddrCodeMemory(const USHORT addr);
void MemInitialize ();
void MemInitializeROM(void);
@ -90,14 +80,24 @@ void MemReset ();
void MemResetPaging ();
void MemUpdatePaging(BOOL initialize);
LPVOID MemGetSlotParameters (UINT uSlot);
void MemSetSnapshot_v1(const DWORD MemMode, const BOOL LastWriteRam, const BYTE* const pMemMain, const BYTE* const pMemAux);
bool MemGetAnnunciator(UINT annunciator);
std::string MemGetSnapshotUnitAuxSlotName(void);
void MemSaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
bool MemLoadSnapshot(class YamlLoadHelper& yamlLoadHelper);
bool MemLoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT unitVersion);
void MemSaveSnapshotAux(class YamlSaveHelper& yamlSaveHelper);
bool MemLoadSnapshotAux(class YamlLoadHelper& yamlLoadHelper, UINT version);
bool MemLoadSnapshotAux(class YamlLoadHelper& yamlLoadHelper, UINT unitVersion);
BYTE __stdcall IO_Null(WORD programcounter, WORD address, BYTE write, BYTE value, ULONG nCycles);
BYTE __stdcall MemCheckPaging (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles);
BYTE __stdcall MemSetPaging(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles);
enum SS_CARDTYPE;
void SetExpansionMemType(const SS_CARDTYPE type);
SS_CARDTYPE GetCurrentExpansionMemType(void);
void CreateLanguageCard(void);
void SetRamWorksMemorySize(UINT pages);
UINT GetRamWorksActiveBank(void);
void SetSaturnMemorySize(UINT banks);
void SetMemMainLanguageCard(LPBYTE ptr, bool bMemMain=false);
class LanguageCardUnit* GetLanguageCard(void);

View File

@ -427,6 +427,7 @@ static void SY6522_Write(BYTE nDevice, BYTE nReg, BYTE nValue)
pMB->sy6522.TIMER1_COUNTER.w = pMB->sy6522.TIMER1_LATCH.w;
StartTimer1(pMB);
CpuAdjustIrqCheck(pMB->sy6522.TIMER1_LATCH.w); // Sync IRQ check timeout with 6522 counter underflow - GH#608
break;
case 0x07: // TIMER1H_LATCH
// Clear Timer1 Interrupt Flag.
@ -444,6 +445,7 @@ static void SY6522_Write(BYTE nDevice, BYTE nReg, BYTE nValue)
pMB->sy6522.TIMER2_COUNTER.w = pMB->sy6522.TIMER2_LATCH.w;
StartTimer2(pMB);
CpuAdjustIrqCheck(pMB->sy6522.TIMER1_LATCH.w); // Sync IRQ check timeout with 6522 counter underflow - GH#608
break;
case 0x0a: // SERIAL_SHIFT
break;
@ -480,11 +482,11 @@ static void SY6522_Write(BYTE nDevice, BYTE nReg, BYTE nValue)
pMB->sy6522.IER |= nValue;
UpdateIFR(pMB, 0);
// Check if active timer changed from non-interrupt (polling IFR) to interrupt:
if ((pMB->sy6522.IER & IxR_TIMER1) && pMB->bTimer1Active)
// Check if a timer interrupt has been enabled (regardless of if there's an active timer or not): GH#567
if (pMB->sy6522.IER & IxR_TIMER1)
StartTimer1(pMB);
if ((pMB->sy6522.IER & IxR_TIMER2) && pMB->bTimer2Active)
if (pMB->sy6522.IER & IxR_TIMER2)
StartTimer2(pMB);
}
break;
@ -549,7 +551,7 @@ static BYTE SY6522_Read(BYTE nDevice, BYTE nReg)
nValue = pMB->sy6522.IFR;
break;
case 0x0e: // IER
nValue = 0x80; // Datasheet says this is 0x80|IER
nValue = 0x80 | pMB->sy6522.IER; // GH#567
break;
case 0x0f: // ORA_NO_HS
nValue = pMB->sy6522.ORA;
@ -1374,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
{
@ -1409,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
@ -1451,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;
@ -1613,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
@ -1634,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);
}
//-----------------------------------------------------------------------------
@ -1773,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]
@ -1871,52 +1898,6 @@ void MB_GetSnapshot_v1(SS_CARD_MOCKINGBOARD_v1* const pSS, const DWORD dwSlot)
}
}
int MB_SetSnapshot_v1(const SS_CARD_MOCKINGBOARD_v1* const pSS, const DWORD /*dwSlot*/)
{
if(pSS->Hdr.UnitHdr.hdr.v1.dwVersion != MAKE_VERSION(1,0,0,0))
return -1;
UINT nMbCardNum = pSS->Hdr.Slot - SLOT4;
UINT nDeviceNum = nMbCardNum*2;
SY6522_AY8910* pMB = &g_MB[nDeviceNum];
g_nSSI263Device = 0;
g_nCurrentActivePhoneme = -1;
for(UINT i=0; i<MB_UNITS_PER_CARD_v1; i++)
{
memcpy(&pMB->sy6522, &pSS->Unit[i].RegsSY6522, sizeof(SY6522));
memcpy(AY8910_GetRegsPtr(nDeviceNum), &pSS->Unit[i].RegsAY8910, 16);
memcpy(&pMB->SpeechChip, &pSS->Unit[i].RegsSSI263, sizeof(SSI263A));
pMB->nAYCurrentRegister = pSS->Unit[i].nAYCurrentRegister;
pMB->state = AY_INACTIVE;
StartTimer1_LoadStateV1(pMB); // Attempt to start timer
//
// Crude - currently only support a single speech chip
// FIX THIS:
// . Speech chip could be Votrax instead
// . Is this IRQ compatible with Phasor?
if(pMB->SpeechChip.DurationPhoneme)
{
g_nSSI263Device = nDeviceNum;
if((pMB->SpeechChip.CurrentMode != MODE_IRQ_DISABLED) && (pMB->sy6522.PCR == 0x0C) && (pMB->sy6522.IER & IxR_PERIPHERAL))
{
UpdateIFR(pMB, 0, IxR_PERIPHERAL);
pMB->SpeechChip.CurrentMode |= 1; // Set SSI263's D7 pin
}
}
nDeviceNum++;
pMB++;
}
return 0;
}
//===========================================================================
// Unit version history:
@ -2152,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;
}
@ -2277,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,13 +13,11 @@ 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);
void MB_GetSnapshot_v1(struct SS_CARD_MOCKINGBOARD_v1* const pSS, const DWORD dwSlot); // For debugger
int MB_SetSnapshot_v1(const struct SS_CARD_MOCKINGBOARD_v1* const pSS, const DWORD dwSlot);
std::string MB_GetSnapshotCardName(void);
void MB_SaveSnapshot(class YamlSaveHelper& yamlSaveHelper, const UINT uSlot);
bool MB_LoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version);

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,3 @@
// Constants
const int VIDEO_SCANNER_6502_CYCLES = 17030;
// Globals (Public)
extern uint16_t g_nVideoClockVert;
extern uint16_t g_nVideoClockHorz;
@ -14,9 +11,9 @@
extern void NTSC_VideoClockResync( const DWORD dwCyclesThisFrame );
extern uint16_t NTSC_VideoGetScannerAddress( const ULONG uExecutedCycles );
extern void NTSC_VideoInit( uint8_t *pFramebuffer );
extern void NTSC_VideoReinitialize( DWORD cyclesThisFrame );
extern void NTSC_VideoReinitialize( DWORD cyclesThisFrame, bool bInitVideoScannerAddress );
extern void NTSC_VideoInitAppleType();
extern void NTSC_VideoInitChroma();
extern void NTSC_VideoUpdateCycles( long cycles6502 );
extern void NTSC_VideoRedrawWholeScreen( void );
extern bool NTSC_GetColorBurst( void );
extern UINT NTSC_GetFrameBufferBorderlessWidth( void );

View File

@ -21,10 +21,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "Applewin.h"
#include "Video.h"
#include "NTSC_CharSet.h"
unsigned char csbits_enhanced2e[2][256][8]; // Enhanced //e
unsigned char csbits_enhanced2e[2][256][8]; // Enhanced //e (2732 4K video ROM)
static unsigned char csbits_2e_pal[2][256][8]; // PAL Original or Enhanced //e (2764 8K video ROM - low 4K) via rocker switch under keyboard
unsigned char csbits_2e[2][256][8]; // Original //e (no mousetext)
unsigned char csbits_a2[1][256][8]; // ][ and ][+
unsigned char csbits_pravets82[1][256][8]; // Pravets 82
@ -86,6 +88,132 @@ static void get_csbits(csbits_t csbits, const char* resourceName, const UINT cy0
delete [] pBuffer;
}
//-------------------------------------
// ROM address (RA):
// -----------------
// . RA10,..,RA3;SEGC,SEGB,SEGA => [2^8][2^3] => 256 chars of 8 lines (total = 2KiB)
// . VID7,..,VID0 is the 8-bit video character (eg. from TEXT/$400 memory)
//
// UTAIIe:8-13, Table 8.2:
//
// ALTCHRSET | RA10 | RA9
//------------------------------------------
// 0 | VID7 + VID6.FLASH | VID6.VID7
// 1 | VID7 | VID6
//
// FLASH toggles every 16 VBLs, so alternates between selecting NORMAL control/special and INVERSE control/special
//
void userVideoRom4K(csbits_t csbits, const BYTE* pVideoRom)
{
int RA = 0; // rom address
int i = 0;
// regular char set
for (; i<64; i++, RA+=8) // [00..3F] INVERSE / [40..7F] FLASH
{
for (int y=0; y<8; y++)
{
csbits[0][i][y] = pVideoRom[RA+y] ^ 0xff; // UTAIIe:8-11 "dot patterns in the video ROM are inverted..."
csbits[0][i+64][y] = pVideoRom[RA+y] ^ 0xff; // UTAIIe:8-14 (Table 8.3) we use FLASH=0, so RA=00ccccccsss
}
}
RA = (1<<10 | 0<<9); // UTAIIe:8-14 (Table 8.3)
for (i=128; i<256; i++, RA+=8) // [80..BF] NORMAL
{
for (int y=0; y<8; y++)
{
csbits[0][i][y] = pVideoRom[RA+y] ^ 0xff; // UTAIIe:8-11 "dot patterns in the video ROM are inverted..."
}
}
RA = (1<<10 | 1<<9); // UTAIIe:8-14 (Table 8.3)
for (i=192; i<256; i++, RA+=8) // [C0..FF] NORMAL
{
for (int y=0; y<8; y++)
{
csbits[0][i][y] = pVideoRom[RA+y] ^ 0xff; // UTAIIe:8-11 "dot patterns in the video ROM are inverted..."
}
}
// alt char set
RA = 0;
for (i=0; i<256; i++, RA+=8) // [00..7F] INVERSE / [80..FF] NORMAL
{
for (int y=0; y<8; y++)
{
csbits[1][i][y] = pVideoRom[RA+y] ^ 0xff; // UTAIIe:8-11 "dot patterns in the video ROM are inverted..."
}
}
}
void userVideoRomForIIe(void)
{
const BYTE* pVideoRom;
UINT size = GetVideoRom(pVideoRom); // 2K or 4K or 8K
if (size < kVideoRomSize4K)
return;
if (size == kVideoRomSize4K)
{
userVideoRom4K(&csbits_enhanced2e[0], pVideoRom);
}
else
{
userVideoRom4K(&csbits_2e_pal[0], pVideoRom);
userVideoRom4K(&csbits_enhanced2e[0], &pVideoRom[4*1024]);
}
// NB. Same *custom* US video ROM for Original & Enhanced //e
memcpy(csbits_2e, csbits_enhanced2e, sizeof(csbits_enhanced2e));
}
//-------------------------------------
void userVideoRom2K(csbits_t csbits, const BYTE* pVideoRom)
{
int RA = 0; // rom address
for (int i=0; i<256; i++, RA+=8)
{
for (int y=0; y<8; y++)
{
BYTE n = pVideoRom[RA+y];
// UTAII:8-30 "Bit 7 of your EPROM fonts will control flashing in the lower 1024 bytes of the EPROM"
// UTAII:8-31 "If you leave O7 (EPROM Output7) reset in these patterns, the resulting characters will be inversions..."
if (!(n & 0x80) && RA < 1024)
n = n ^ 0x7f;
// UTAII:8-30 "TEXT ROM pattern is ... reversed"
BYTE d = 0;
for (BYTE j=0; j<7; j++, n >>= 1) // Just bits [0..6]
d = (d << 1) | (n & 1);
csbits[0][i][y] = d;
}
}
}
void userVideoRomForIIPlus(void)
{
const BYTE* pVideoRom;
UINT size = GetVideoRom(pVideoRom); // 2K or 4K or 8K
if (size != kVideoRomSize2K)
return;
userVideoRom2K(&csbits_a2[0], pVideoRom);
}
//-------------------------------------
void make_csbits(void)
{
get_csbits(&csbits_enhanced2e[0], TEXT("CHARSET40"), 0); // Enhanced //e: Alt char set off
@ -99,4 +227,20 @@ void make_csbits(void)
// Original //e is just Enhanced //e with the 32 mousetext chars [0x40..0x5F] replaced by the non-alt charset chars [0x40..0x5F]
memcpy(csbits_2e, csbits_enhanced2e, sizeof(csbits_enhanced2e));
memcpy(&csbits_2e[1][64], &csbits_2e[0][64], 32*8);
// Try to use any user-provided video ROM for Original/Enhanced //e
userVideoRomForIIe();
// Try to use any user-provided video ROM for II/II+
userVideoRomForIIPlus();
}
csbits_t Get2e_csbits(void)
{
const csbits_t videoRom4K = (GetApple2Type() == A2TYPE_APPLE2E) ? csbits_2e : csbits_enhanced2e;
if (IsVideoRom4K()) // 4K means US-only, so no secondary PAL video ROM
return videoRom4K;
return GetVideoRomRockerSwitch() == false ? videoRom4K : csbits_2e_pal; // NB. Same PAL video ROM for Original & Enhanced //e
}

View File

@ -2,11 +2,11 @@
typedef unsigned char (*csbits_t)[256][8];
extern unsigned char csbits_enhanced2e[2][256][8]; // Enhanced //e
extern unsigned char csbits_2e[2][256][8]; // Original //e (no mousetext)
extern unsigned char csbits_enhanced2e[2][256][8]; // Enhanced //e (2732 4K video ROM)
extern unsigned char csbits_a2[1][256][8]; // ][ and ][+
extern unsigned char csbits_pravets82[1][256][8]; // Pravets 82
extern unsigned char csbits_pravets8M[1][256][8]; // Pravets 8M
extern unsigned char csbits_pravets8C[2][256][8]; // Pravets 8A & 8C
void make_csbits(void);
csbits_t Get2e_csbits(void);

View File

@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "Applewin.h"
#include "Frame.h" // g_hFrameWindow
#include "Memory.h"
#include "ParallelPrinter.h"
#include "Registry.h"
@ -160,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())
{
@ -234,14 +235,26 @@ char* Printer_GetFilename()
void Printer_SetFilename(char* prtFilename)
{
if(*prtFilename)
if (*prtFilename)
{
strcpy(g_szPrintFilename, (const char *) prtFilename);
}
else //No registry entry is available
{
_tcsncpy(g_szPrintFilename, g_sProgramDir, MAX_PATH);
g_szPrintFilename[MAX_PATH - 1] = 0;
_tcsncat(g_szPrintFilename, _T(DEFAULT_PRINT_FILENAME), MAX_PATH);
RegSaveString(TEXT("Configuration"),REGVALUE_PRINTER_FILENAME,1,g_szPrintFilename);
// NB. _tcsncat_s() terminates program if buffer is too small! So continue to use manual buffer check & _tcsncat()
int nLen = sizeof(g_szPrintFilename) - strlen(g_szPrintFilename) - (sizeof(DEFAULT_PRINT_FILENAME)-1) - 1;
if (nLen < 0)
{
MessageBox(g_hFrameWindow, "Printer - SetFilename(): folder too deep", "Warning", MB_ICONWARNING | MB_OK);
return;
}
_tcsncat(g_szPrintFilename, DEFAULT_PRINT_FILENAME, sizeof(DEFAULT_PRINT_FILENAME)-1);
RegSaveString(REG_CONFIG, REGVALUE_PRINTER_FILENAME, 1, g_szPrintFilename);
}
}
@ -302,6 +315,7 @@ bool Printer_LoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT slot, UINT
inactivity = yamlLoadHelper.LoadUint(SS_YAML_KEY_INACTIVITY);
g_PrinterIdleLimit = yamlLoadHelper.LoadUint(SS_YAML_KEY_IDLELIMIT);
strncpy(g_szPrintFilename, yamlLoadHelper.LoadString(SS_YAML_KEY_FILENAME).c_str(), sizeof(g_szPrintFilename));
g_szPrintFilename[sizeof(g_szPrintFilename)-1] = 0;
if (yamlLoadHelper.LoadBool(SS_YAML_KEY_FILEOPEN))
{

860
source/RGBMonitor.cpp Normal file
View File

@ -0,0 +1,860 @@
// Sync'd with 1.25.0.4 source
#include "StdAfx.h"
#include "Frame.h"
#include "Memory.h" // MemGetMainPtr() MemGetAuxPtr()
#include "Video.h"
#include "RGBMonitor.h"
#include "YamlHelper.h"
const int HIRES_COLUMN_SUBUNIT_SIZE = 16;
const int HIRES_COLUMN_UNIT_SIZE = (HIRES_COLUMN_SUBUNIT_SIZE)*2;
const int HIRES_NUMBER_COLUMNS = (1<<5); // 5 bits
const int SRCOFFS_LORES = 0; // 0
const int SRCOFFS_HIRES = (SRCOFFS_LORES + 16); // 16
const int SRCOFFS_DHIRES = (SRCOFFS_HIRES + (HIRES_NUMBER_COLUMNS*HIRES_COLUMN_UNIT_SIZE)); // 1040
const int SRCOFFS_TOTAL = (SRCOFFS_DHIRES + 2560); // 3600
const int MAX_SOURCE_Y = 256;
static LPBYTE g_aSourceStartofLine[ MAX_SOURCE_Y ];
#define SETSOURCEPIXEL(x,y,c) g_aSourceStartofLine[(y)][(x)] = (c)
// TC: Tried to remove HiresToPalIndex[] translation table, so get purple bars when hires data is: 0x80 0x80...
// . V_CreateLookup_HiResHalfPixel_Authentic() uses both ColorMapping (CM_xxx) indices and Color_Palette_Index_e (HGR_xxx)!
#define DO_OPT_PALETTE 0
enum Color_Palette_Index_e
{
// hires (don't change order) - For tv emulation HGR Video Mode
#if DO_OPT_PALETTE
HGR_VIOLET // HCOLOR=2 VIOLET , 2800: 01 00 55 2A
, HGR_BLUE // HCOLOR=6 BLUE , 3000: 81 00 D5 AA
, HGR_GREEN // HCOLOR=1 GREEN , 2400: 02 00 2A 55
, HGR_ORANGE // HCOLOR=5 ORANGE , 2C00: 82 00 AA D5
, HGR_BLACK
, HGR_WHITE
#else
HGR_BLACK
, HGR_WHITE
, HGR_BLUE // HCOLOR=6 BLUE , 3000: 81 00 D5 AA
, HGR_ORANGE // HCOLOR=5 ORANGE , 2C00: 82 00 AA D5
, 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
, HGR_YELLOW
, HGR_AQUA
, HGR_PURPLE
, HGR_PINK
// lores & dhires
, BLACK
, DEEP_RED
, DARK_BLUE
, MAGENTA
, DARK_GREEN
, DARK_GRAY
, BLUE
, LIGHT_BLUE
, BROWN
, ORANGE
, LIGHT_GRAY
, PINK
, GREEN
, YELLOW
, AQUA
, WHITE
};
// __ Map HGR color index to Palette index
enum ColorMapping
{
CM_Violet
, CM_Blue
, CM_Green
, CM_Orange
, CM_Black
, CM_White
, NUM_COLOR_MAPPING
};
const BYTE HiresToPalIndex[ NUM_COLOR_MAPPING ] =
{
HGR_VIOLET
, HGR_BLUE
, HGR_GREEN
, HGR_ORANGE
, HGR_BLACK
, HGR_WHITE
};
const BYTE LoresResColors[16] = {
BLACK, DEEP_RED, DARK_BLUE, MAGENTA,
DARK_GREEN,DARK_GRAY,BLUE, LIGHT_BLUE,
BROWN, ORANGE, LIGHT_GRAY,PINK,
GREEN, YELLOW, AQUA, WHITE
};
const BYTE DoubleHiresPalIndex[16] = {
BLACK, DARK_BLUE, DARK_GREEN,BLUE,
BROWN, LIGHT_GRAY,GREEN, AQUA,
DEEP_RED,MAGENTA, DARK_GRAY, LIGHT_BLUE,
ORANGE, PINK, YELLOW, WHITE
};
#define SETRGBCOLOR(r,g,b) {b,g,r,0}
static RGBQUAD PalIndex2RGB[] =
{
// hires
#if DO_OPT_PALETTE
SETRGBCOLOR(/*MAGENTA, */ 0xC7,0x34,0xFF), // FD Linards Tweaked 0xFF,0x00,0xFF -> 0xC7,0x34,0xFF
SETRGBCOLOR(/*BLUE, */ 0x0D,0xA1,0xFF), // FC Linards Tweaked 0x00,0x00,0xFF -> 0x0D,0xA1,0xFF
SETRGBCOLOR(/*GREEN, */ 0x38,0xCB,0x00), // FA Linards Tweaked 0x00,0xFF,0x00 -> 0x38,0xCB,0x00
SETRGBCOLOR(/*ORANGE, */ 0xF2,0x5E,0x00), // 0xFF,0x80,0x00 -> Linards Tweaked 0xF2,0x5E,0x00
SETRGBCOLOR(/*HGR_BLACK, */ 0x00,0x00,0x00), // For TV emulation HGR Video Mode
SETRGBCOLOR(/*HGR_WHITE, */ 0xFF,0xFF,0xFF),
#else
SETRGBCOLOR(/*HGR_BLACK, */ 0x00,0x00,0x00), // For TV emulation HGR Video Mode
SETRGBCOLOR(/*HGR_WHITE, */ 0xFF,0xFF,0xFF),
SETRGBCOLOR(/*BLUE, */ 0x0D,0xA1,0xFF), // FC Linards Tweaked 0x00,0x00,0xFF -> 0x0D,0xA1,0xFF
SETRGBCOLOR(/*ORANGE, */ 0xF2,0x5E,0x00), // 0xFF,0x80,0x00 -> Linards Tweaked 0xF2,0x5E,0x00
SETRGBCOLOR(/*GREEN, */ 0x38,0xCB,0x00), // FA Linards Tweaked 0x00,0xFF,0x00 -> 0x38,0xCB,0x00
SETRGBCOLOR(/*MAGENTA, */ 0xC7,0x34,0xFF), // FD Linards Tweaked 0xFF,0x00,0xFF -> 0xC7,0x34,0xFF
#endif
// TV emu
SETRGBCOLOR(/*HGR_GREY1, */ 0x80,0x80,0x80),
SETRGBCOLOR(/*HGR_GREY2, */ 0x80,0x80,0x80),
SETRGBCOLOR(/*HGR_YELLOW,*/ 0x9E,0x9E,0x00), // 0xD0,0xB0,0x10 -> 0x9E,0x9E,0x00
SETRGBCOLOR(/*HGR_AQUA, */ 0x00,0xCD,0x4A), // 0x20,0xB0,0xB0 -> 0x00,0xCD,0x4A
SETRGBCOLOR(/*HGR_PURPLE,*/ 0x61,0x61,0xFF), // 0x60,0x50,0xE0 -> 0x61,0x61,0xFF
SETRGBCOLOR(/*HGR_PINK, */ 0xFF,0x32,0xB5), // 0xD0,0x40,0xA0 -> 0xFF,0x32,0xB5
// lores & dhires
SETRGBCOLOR(/*BLACK,*/ 0x00,0x00,0x00), // 0
SETRGBCOLOR(/*DEEP_RED,*/ 0x9D,0x09,0x66), // 0xD0,0x00,0x30 -> Linards Tweaked 0x9D,0x09,0x66
SETRGBCOLOR(/*DARK_BLUE,*/ 0x2A,0x2A,0xE5), // 4 // Linards Tweaked 0x00,0x00,0x80 -> 0x2A,0x2A,0xE5
SETRGBCOLOR(/*MAGENTA,*/ 0xC7,0x34,0xFF), // FD Linards Tweaked 0xFF,0x00,0xFF -> 0xC7,0x34,0xFF
SETRGBCOLOR(/*DARK_GREEN,*/ 0x00,0x80,0x00), // 2 // not used
SETRGBCOLOR(/*DARK_GRAY,*/ 0x80,0x80,0x80), // F8
SETRGBCOLOR(/*BLUE,*/ 0x0D,0xA1,0xFF), // FC Linards Tweaked 0x00,0x00,0xFF -> 0x0D,0xA1,0xFF
SETRGBCOLOR(/*LIGHT_BLUE,*/ 0xAA,0xAA,0xFF), // 0x60,0xA0,0xFF -> Linards Tweaked 0xAA,0xAA,0xFF
SETRGBCOLOR(/*BROWN,*/ 0x55,0x55,0x00), // 0x80,0x50,0x00 -> Linards Tweaked 0x55,0x55,0x00
SETRGBCOLOR(/*ORANGE,*/ 0xF2,0x5E,0x00), // 0xFF,0x80,0x00 -> Linards Tweaked 0xF2,0x5E,0x00
SETRGBCOLOR(/*LIGHT_GRAY,*/ 0xC0,0xC0,0xC0), // 7 // GR: COLOR=10
SETRGBCOLOR(/*PINK,*/ 0xFF,0x89,0xE5), // 0xFF,0x90,0x80 -> Linards Tweaked 0xFF,0x89,0xE5
SETRGBCOLOR(/*GREEN,*/ 0x38,0xCB,0x00), // FA Linards Tweaked 0x00,0xFF,0x00 -> 0x38,0xCB,0x00
SETRGBCOLOR(/*YELLOW,*/ 0xD5,0xD5,0x1A), // FB Linards Tweaked 0xFF,0xFF,0x00 -> 0xD5,0xD5,0x1A
SETRGBCOLOR(/*AQUA,*/ 0x62,0xF6,0x99), // 0x40,0xFF,0x90 -> Linards Tweaked 0x62,0xF6,0x99
SETRGBCOLOR(/*WHITE,*/ 0xFF,0xFF,0xFF),
};
//===========================================================================
static void V_CreateLookup_DoubleHires ()
{
#define OFFSET 3
#define SIZE 10
for (int column = 0; column < 256; column++) {
int coloffs = SIZE * column;
for (unsigned byteval = 0; byteval < 256; byteval++) {
int color[SIZE];
ZeroMemory(color,sizeof(color));
unsigned pattern = MAKEWORD(byteval,column);
int pixel;
for (pixel = 1; pixel < 15; pixel++) {
if (pattern & (1 << pixel)) {
int pixelcolor = 1 << ((pixel-OFFSET) & 3);
if ((pixel >= OFFSET+2) && (pixel < SIZE+OFFSET+2) && (pattern & (0x7 << (pixel-4))))
color[pixel-(OFFSET+2)] |= pixelcolor;
if ((pixel >= OFFSET+1) && (pixel < SIZE+OFFSET+1) && (pattern & (0xF << (pixel-4))))
color[pixel-(OFFSET+1)] |= pixelcolor;
if ((pixel >= OFFSET+0) && (pixel < SIZE+OFFSET+0))
color[pixel-(OFFSET+0)] |= pixelcolor;
if ((pixel >= OFFSET-1) && (pixel < SIZE+OFFSET-1) && (pattern & (0xF << (pixel+1))))
color[pixel-(OFFSET-1)] |= pixelcolor;
if ((pixel >= OFFSET-2) && (pixel < SIZE+OFFSET-2) && (pattern & (0x7 << (pixel+2))))
color[pixel-(OFFSET-2)] |= pixelcolor;
}
}
#if 0
if (g_eVideoType == VT_COLOR_TEXT_OPTIMIZED)
{
// Activate for fringe reduction on white HGR text - drawback: loss of color mix patterns in HGR Video Mode.
for (pixel = 0; pixel < 13; pixel++)
{
if ((pattern & (0xF << pixel)) == (unsigned)(0xF << pixel))
for (int pos = pixel; pos < pixel + 4; pos++)
if (pos >= OFFSET && pos < SIZE+OFFSET)
color[pos-OFFSET] = 15;
}
}
#endif
int y = byteval;
for (int x = 0; x < SIZE; x++) {
SETSOURCEPIXEL(SRCOFFS_DHIRES+coloffs+x,y ,DoubleHiresPalIndex[ color[x] ]);
}
}
}
#undef SIZE
#undef OFFSET
}
//===========================================================================
void V_CreateLookup_Lores()
{
for (int color = 0; color < 16; color++)
for (int x = 0; x < 16; x++)
for (int y = 0; y < 16; y++)
SETSOURCEPIXEL(SRCOFFS_LORES+x,(color << 4)+y,LoresResColors[color]);
}
//===========================================================================
// Lookup Table:
// y (0-255) * 32 columns of 32 bytes
// . each column is: high-bit (prev byte) & 2 pixels from previous byte & 2 pixels from next byte
// . each 32-byte unit is 2 * 16-byte sub-units: 16 bytes for even video byte & 16 bytes for odd video byte
// . where 16 bytes represent the 7 Apple pixels, expanded to 14 pixels
// currHighBit=0: {14 pixels + 2 pad} * 2
// currHighBit=1: {1 pixel + 14 pixels + 1 pad} * 2
// . and each byte is an index into the colour palette
void V_CreateLookup_HiResHalfPixel_Authentic(VideoType_e videoType)
{
// high-bit & 2-bits from previous byte, 2-bits from next byte = 2^5 = 32 total permutations
for (int iColumn = 0; iColumn < HIRES_NUMBER_COLUMNS; iColumn++)
{
const int offsetx = iColumn * HIRES_COLUMN_UNIT_SIZE; // every column is 32 bytes wide
const int prevHighBit = (iColumn >= 16) ? 1 : 0;
int aPixels[11]; // c2 c3 b6 b5 b4 b3 b2 b1 b0 c0 c1
aPixels[ 0] = iColumn & 4; // previous byte, 2nd last pixel
aPixels[ 1] = iColumn & 8; // previous byte, last pixel
aPixels[ 9] = iColumn & 1; // next byte, first pixel
aPixels[10] = iColumn & 2; // next byte, second pixel
for (unsigned int iByte = 0; iByte < 256; iByte++)
{
// Convert raw pixel iByte value to binary and stuff into bit array of pixels on off
for (int iPixel = 2, nBitMask = 1; iPixel < 9; iPixel++)
{
aPixels[iPixel] = ((iByte & nBitMask) != 0);
nBitMask <<= 1;
}
const int currHighBit = (iByte >> 7) & 1;
const int y = iByte;
// Fixup missing pixels that normally have been scan-line shifted -- Apple "half-pixel" -- but crosses video byte boundaries.
// NB. Setup first byte in each 16-byte sub-unit
if( currHighBit )
{
if ( aPixels[1] ) // prev pixel on?
{
if (aPixels[2] || aPixels[0]) // White if pixel from previous byte and first pixel of this byte is on
{
SETSOURCEPIXEL(SRCOFFS_HIRES+offsetx+0 ,y , HGR_WHITE );
SETSOURCEPIXEL(SRCOFFS_HIRES+offsetx+HIRES_COLUMN_SUBUNIT_SIZE,y , HGR_WHITE );
}
else
{
if ( !prevHighBit ) // GH#616
{
// colour the half-pixel black (was orange - not good for Nox Archaist, eg. 2000:00 40 E0; 2000:00 40 9E)
SETSOURCEPIXEL(SRCOFFS_HIRES+offsetx+0 ,y , HGR_BLACK );
}
else
{
SETSOURCEPIXEL(SRCOFFS_HIRES+offsetx+0 ,y , HGR_ORANGE ); // left half of orange pixels
}
SETSOURCEPIXEL(SRCOFFS_HIRES+offsetx+HIRES_COLUMN_SUBUNIT_SIZE,y , HGR_BLUE ); // right half of blue pixels 4, 11, 18, ...
}
}
else if ( aPixels[0] ) // prev prev pixel on
{
if ( aPixels[2] )
{
if ((videoType == VT_COLOR_MONITOR_RGB) || ( !aPixels[3] ))
{
SETSOURCEPIXEL(SRCOFFS_HIRES+offsetx+0 ,y , HGR_BLUE ); // 2000:D5 AA D5
SETSOURCEPIXEL(SRCOFFS_HIRES+offsetx+HIRES_COLUMN_SUBUNIT_SIZE,y , HGR_ORANGE ); // 2000: AA D5
}
}
}
}
//
int x = currHighBit;
for (int odd = 0; odd < 2; odd++) // even then odd sub-units
{
if (odd)
x = HIRES_COLUMN_SUBUNIT_SIZE + currHighBit;
for (int iPixel = 2; iPixel < 9; iPixel++)
{
int color = CM_Black;
if (aPixels[iPixel]) // pixel on
{
color = CM_White;
if (aPixels[iPixel-1] || aPixels[iPixel+1]) // adjacent pixels are always white
color = CM_White;
else
color = ((odd ^ (iPixel&1)) << 1) | currHighBit; // map raw color to our hi-res colors
}
else if (aPixels[iPixel-1] && aPixels[iPixel+1]) // IF prev_pixel && next_pixel THEN
{
// Activate fringe reduction on white HGR text - drawback: loss of color mix patterns in HGR video mode.
if (
(videoType == VT_COLOR_MONITOR_RGB) // Fill in colors in between white pixels
|| !(aPixels[iPixel-2] && aPixels[iPixel+2]) ) // VT_COLOR_TEXT_OPTIMIZED -> Don't fill in colors in between white
{
color = ((odd ^ !(iPixel&1)) << 1) | currHighBit; // No white HGR text optimization
}
}
// Each HGR 7M pixel is a left 14M & right 14M DHGR pixel
SETSOURCEPIXEL(SRCOFFS_HIRES+offsetx+x ,y ,HiresToPalIndex[color]); // Color for left 14M pixel
SETSOURCEPIXEL(SRCOFFS_HIRES+offsetx+x+1,y ,HiresToPalIndex[color]); // Color for right 14M pixel
x += 2;
}
} // even/odd sub-units
} // iByte
} // iColumn
}
//===========================================================================
// 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][FRAMEBUFFER_H/2 + 2 * HGR_MATRIX_YOFFSET]; // 2 extra scan lines on top & 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, bool isSWMIXED)
{
int bot1idx, bot2idx;
if (isSWMIXED && 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);
}
static void CopyMixedSource(int x, int y, int sx, int sy, bgra_t *pVideoAddress)
{
const BYTE* const pSrc = g_aSourceStartofLine[ sy ] + sx;
const int matx = x*14;
const int maty = HGR_MATRIX_YOFFSET + y;
const bool isSWMIXED = VideoGetSWMIXED();
// transfer 14 pixels (i.e. the visible part of an apple hgr-byte) from row to pixelmatrix
for (int nBytes=13; nBytes>=0; nBytes--)
{
hgrpixelmatrix[matx+nBytes][maty] = *(pSrc+nBytes);
}
const bool bIsHalfScanLines = IsVideoStyle(VS_HALF_SCANLINES);
const UINT frameBufferWidth = GetFrameBufferWidth();
for (int nBytes=13; nBytes>=0; nBytes--)
{
// color mixing between adjacent scanlines at current x position
MixColorsVertical(matx+nBytes, maty, isSWMIXED); //Post: colormixbuffer[]
UINT32* pDst = (UINT32*) pVideoAddress;
for (int h=HGR_MATRIX_YOFFSET; h<=HGR_MATRIX_YOFFSET+1; h++)
{
if (bIsHalfScanLines && (h & 1))
{
// 50% Half Scan Line clears every odd scanline (and SHIFT+PrintScreen saves only the even rows)
*(pDst+nBytes) = 0;
}
else
{
_ASSERT( colormixbuffer[h] < (sizeof(PalIndex2RGB)/sizeof(PalIndex2RGB[0])) );
const RGBQUAD& rRGB = PalIndex2RGB[ colormixbuffer[h] ];
const UINT32 rgb = (((UINT32)rRGB.rgbRed)<<16) | (((UINT32)rRGB.rgbGreen)<<8) | ((UINT32)rRGB.rgbBlue);
*(pDst+nBytes) = rgb;
}
pDst -= frameBufferWidth;
}
}
}
//===========================================================================
// 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;
const BYTE* const pSrc = g_aSourceStartofLine[ sy ] + sx;
while (h--)
{
int nBytes = w;
while (nBytes)
{
--nBytes;
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+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;
}
}
pDst -= GetFrameBufferWidth();
}
}
//===========================================================================
#define HIRES_COLUMN_OFFSET (((byteval1 & 0xE0) << 2) | ((byteval3 & 0x03) << 5)) // (prevHighBit | last 2 pixels | next 2 pixesl) * HIRES_COLUMN_UNIT_SIZE
void UpdateHiResCell (int x, int y, uint16_t addr, bgra_t *pVideoAddress)
{
uint8_t *pMain = MemGetMainPtr(addr);
BYTE byteval1 = (x > 0) ? *(pMain-1) : 0;
BYTE byteval2 = *(pMain);
BYTE byteval3 = (x < 39) ? *(pMain+1) : 0;
if (IsVideoStyle(VS_COLOR_VERTICAL_BLEND))
{
CopyMixedSource(x, y, SRCOFFS_HIRES+HIRES_COLUMN_OFFSET+((x & 1)*HIRES_COLUMN_SUBUNIT_SIZE), (int)byteval2, pVideoAddress);
}
else
{
CopySource(14,2, SRCOFFS_HIRES+HIRES_COLUMN_OFFSET+((x & 1)*HIRES_COLUMN_SUBUNIT_SIZE), (int)byteval2, pVideoAddress);
}
}
//===========================================================================
#define COLOR ((xpixel + PIXEL) & 3)
#define VALUE (dwordval >> (4 + PIXEL - COLOR))
void UpdateDHiResCell (int x, int y, uint16_t addr, bgra_t *pVideoAddress, bool updateAux, bool updateMain)
{
const int xpixel = x*14;
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 & 0x70) | ((byteval2 & 0x7F) << 7) |
((byteval3 & 0x7F) << 14) | ((byteval4 & 0x07) << 21);
#define PIXEL 0
if (updateAux)
{
CopySource(7,2, SRCOFFS_DHIRES+10*HIBYTE(VALUE)+COLOR, LOBYTE(VALUE), pVideoAddress);
pVideoAddress += 7;
}
#undef PIXEL
#define PIXEL 7
if (updateMain)
{
CopySource(7,2, SRCOFFS_DHIRES+10*HIBYTE(VALUE)+COLOR, LOBYTE(VALUE), pVideoAddress);
}
#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), pVideoAddress, 1);
pVideoAddress += 7;
#undef PIXEL
#define PIXEL 8
CopySource(7,2, SRCOFFS_DHIRES+10*HIBYTE(VALUE)+COLOR, LOBYTE(VALUE), 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), pVideoAddress);
pVideoAddress += 8;
#undef PIXEL
#define PIXEL 8
CopySource(8,2, SRCOFFS_DHIRES+10*HIBYTE(VALUE)+COLOR, LOBYTE(VALUE), pVideoAddress);
#undef PIXEL
return 8*2;
}
#endif
//===========================================================================
// Tested with Deater's Cycle-Counting Megademo
void UpdateLoResCell (int x, int y, uint16_t addr, bgra_t *pVideoAddress)
{
const BYTE val = *MemGetMainPtr(addr);
if ((y & 4) == 0)
{
CopySource(14,2, SRCOFFS_LORES+((x & 1) << 1), ((val & 0xF) << 4), pVideoAddress);
}
else
{
CopySource(14,2, SRCOFFS_LORES+((x & 1) << 1), (val & 0xF0), pVideoAddress);
}
}
//===========================================================================
#define ROL_NIB(x) ( (((x)<<1)&0xF) | (((x)>>3)&1) )
// Tested with FT's Ansi Story
void UpdateDLoResCell (int x, int y, uint16_t addr, bgra_t *pVideoAddress)
{
BYTE auxval = *MemGetAuxPtr(addr);
const BYTE mainval = *MemGetMainPtr(addr);
const BYTE auxval_h = auxval >> 4;
const BYTE auxval_l = auxval & 0xF;
auxval = (ROL_NIB(auxval_h)<<4) | ROL_NIB(auxval_l);
if ((y & 4) == 0)
{
CopySource(7,2, SRCOFFS_LORES+((x & 1) << 1), ((auxval & 0xF) << 4), pVideoAddress);
CopySource(7,2, SRCOFFS_LORES+((x & 1) << 1), ((mainval & 0xF) << 4), pVideoAddress+7);
}
else
{
CopySource(7,2, SRCOFFS_LORES+((x & 1) << 1), (auxval & 0xF0), pVideoAddress);
CopySource(7,2, SRCOFFS_LORES+((x & 1) << 1), (mainval & 0xF0), pVideoAddress+7);
}
}
//===========================================================================
static LPBYTE g_pSourcePixels = NULL;
static void V_CreateDIBSections(void)
{
g_pSourcePixels = new BYTE[SRCOFFS_TOTAL * MAX_SOURCE_Y];
// CREATE THE OFFSET TABLE FOR EACH SCAN LINE IN THE SOURCE IMAGE
for (int y = 0; y < MAX_SOURCE_Y; y++)
g_aSourceStartofLine[ y ] = g_pSourcePixels + SRCOFFS_TOTAL*((MAX_SOURCE_Y-1) - y);
// DRAW THE SOURCE IMAGE INTO THE SOURCE BIT BUFFER
ZeroMemory(g_pSourcePixels, SRCOFFS_TOTAL*MAX_SOURCE_Y);
V_CreateLookup_Lores();
V_CreateLookup_HiResHalfPixel_Authentic(VT_COLOR_MONITOR_RGB);
V_CreateLookup_DoubleHires();
CreateColorMixMap();
}
void VideoInitializeOriginal(baseColors_t pBaseNtscColors)
{
// CREATE THE SOURCE IMAGE AND DRAW INTO THE SOURCE BIT BUFFER
V_CreateDIBSections();
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];
}
//===========================================================================
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
// . Clocking done by toggling AN3
// . NB. There's a final 5th AN3 transition to set DHGR mode
void RGB_SetVideoMode(WORD address)
{
if ((address&~1) == 0x0C) // 0x0C or 0x0D? (80COL)
{
g_rgbSet80COL = true;
return;
}
if ((address&~1) != 0x5E) // 0x5E or 0x5F? (DHIRES)
return;
// 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)
// . Apple II desktop sets DHGR B&W mode with HIRES off! (GH#631)
// Maybe there is no video-mode precondition?
// . After setting 80COL on/off then need a 0x5E->0x5F toggle. So if we see a 0x5F then reset (GH#633)
if ((g_uVideoMode & VF_MIXED) || (g_rgbSet80COL && address == 0x5F))
{
g_rgbMode = 0;
g_rgbPrevAN3Addr = 0;
g_rgbSet80COL = false;
return;
}
if (address == 0x5F && g_rgbPrevAN3Addr == 0x5E) // Check for AN3 clock transition
{
g_rgbFlags = (g_rgbFlags<<1) & 3;
g_rgbFlags |= ((g_uVideoMode & VF_80COL) ? 0 : 1); // clock in !80COL
g_rgbMode = g_rgbFlags; // latch F2,F1
}
g_rgbPrevAN3Addr = address;
g_rgbSet80COL = false;
}
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_IsMixMode(void) // Extended 80-Column Text/AppleColor Card's Mode 3
{
return g_rgbMode == 2;
}
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;
g_rgbMode = 0;
g_rgbPrevAN3Addr = 0;
}
void RGB_SetInvertBit7(bool state)
{
g_rgbInvertBit7 = state;
}
//===========================================================================
#define SS_YAML_KEY_RGB_CARD "AppleColor RGB Adaptor"
// NB. No version - this is determined by the parent card
#define SS_YAML_KEY_RGB_FLAGS "RGB mode flags"
#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)
{
YamlSaveHelper::Label label(yamlSaveHelper, "%s:\n", SS_YAML_KEY_RGB_CARD);
yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_RGB_FLAGS, g_rgbFlags);
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)
{
if (!yamlLoadHelper.GetSubMap(SS_YAML_KEY_RGB_CARD))
throw std::string("Card: Expected key: ") + std::string(SS_YAML_KEY_RGB_CARD);
g_rgbFlags = yamlLoadHelper.LoadUint(SS_YAML_KEY_RGB_FLAGS);
g_rgbMode = yamlLoadHelper.LoadUint(SS_YAML_KEY_RGB_MODE);
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();
}

21
source/RGBMonitor.h Normal file
View File

@ -0,0 +1,21 @@
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);
const UINT kNumBaseColors = 16;
typedef bgra_t (*baseColors_t)[kNumBaseColors];
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);
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);

View File

@ -28,7 +28,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "SaveState_Structs_v1.h"
#include "YamlHelper.h"
#include "Applewin.h"
@ -37,6 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "Frame.h"
#include "Joystick.h"
#include "Keyboard.h"
#include "LanguageCard.h"
#include "Memory.h"
#include "Mockingboard.h"
#include "MouseInterface.h"
@ -64,7 +64,11 @@ static YamlHelper yamlHelper;
#define SS_FILE_VER 2
#define UNIT_APPLE2_VER 1
// Unit version history:
// v2: Extended: keyboard (added 'Key Waiting'), memory (LC mem type for II/II+, inverted MF_INTCXROM bit)
// v3: Extended: memory (added 'AnnunciatorN')
#define UNIT_APPLE2_VER 3
#define UNIT_SLOTS_VER 1
//-----------------------------------------------------------------------------
@ -111,127 +115,6 @@ const char* Snapshot_GetPath()
//-----------------------------------------------------------------------------
static void Snapshot_LoadState_v1() // .aws v1.0.0.1, up to (and including) AppleWin v1.25.0
{
std::string strOldImageDir(g_sCurrentDir);
APPLEWIN_SNAPSHOT_v1* pSS = (APPLEWIN_SNAPSHOT_v1*) new char[sizeof(APPLEWIN_SNAPSHOT_v1)]; // throw's bad_alloc
try
{
#if _MSC_VER >= 1600 // static_assert supported from VS2010 (cl.exe v16.00)
static_assert(kSnapshotSize_v1 == sizeof(APPLEWIN_SNAPSHOT_v1), "Save-state v1 struct size mismatch");
#else
// A compile error here means sizeof(APPLEWIN_SNAPSHOT_v1) is wrong, eg. one of the constituent structs has been modified
typedef char VerifySizesAreEqual[kSnapshotSize_v1 == sizeof(APPLEWIN_SNAPSHOT_v1) ? 1 : -1];
#endif
if (kSnapshotSize_v1 != sizeof(APPLEWIN_SNAPSHOT_v1))
throw std::string("Save-state v1 struct size mismatch");
SetCurrentImageDir(g_strSaveStatePath.c_str()); // Allow .dsk's load without prompting
memset(pSS, 0, sizeof(APPLEWIN_SNAPSHOT_v1));
//
HANDLE hFile = CreateFile( g_strSaveStatePathname.c_str(),
GENERIC_READ,
0,
0,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
0);
if(hFile == INVALID_HANDLE_VALUE)
throw std::string("File not found: ") + g_strSaveStatePathname;
DWORD dwBytesRead;
BOOL bRes = ReadFile( hFile,
pSS,
sizeof(APPLEWIN_SNAPSHOT_v1),
&dwBytesRead,
NULL);
CloseHandle(hFile);
if(!bRes || (dwBytesRead != sizeof(APPLEWIN_SNAPSHOT_v1)))
// File size wrong: probably because of version mismatch or corrupt file
throw std::string("File size mismatch");
if(pSS->Hdr.dwTag != AW_SS_TAG)
throw std::string("File corrupt");
if(pSS->Hdr.dwVersion != MAKE_VERSION(1,0,0,1))
throw std::string("Version mismatch");
// TO DO: Verify checksum
//
// Reset all sub-systems
MemReset();
DiskReset();
HD_Reset();
KeybReset();
VideoResetState();
MB_Reset();
sg_SSC.CommReset();
//
// Apple2 unit
//
SS_CPU6502& CPU = pSS->Apple2Unit.CPU6502;
CpuSetSnapshot_v1(CPU.A, CPU.X, CPU.Y, CPU.P, CPU.S, CPU.PC, CPU.nCumulativeCycles);
SS_IO_Comms& SSC = pSS->Apple2Unit.Comms;
sg_SSC.SetSnapshot_v1(SSC.baudrate, SSC.bytesize, SSC.commandbyte, SSC.comminactivity, SSC.controlbyte, SSC.parity, SSC.stopbits);
JoySetSnapshot_v1(pSS->Apple2Unit.Joystick.nJoyCntrResetCycle);
KeybSetSnapshot_v1(pSS->Apple2Unit.Keyboard.nLastKey);
SpkrSetSnapshot_v1(pSS->Apple2Unit.Speaker.nSpkrLastCycle);
VideoSetSnapshot_v1(pSS->Apple2Unit.Video.bAltCharSet, pSS->Apple2Unit.Video.dwVidMode);
MemSetSnapshot_v1(pSS->Apple2Unit.Memory.dwMemMode, pSS->Apple2Unit.Memory.bLastWriteRam, pSS->Apple2Unit.Memory.nMemMain, pSS->Apple2Unit.Memory.nMemAux);
//
//
// Slot4: Mockingboard
MB_SetSnapshot_v1(&pSS->Mockingboard1, 4);
//
// Slot5: Mockingboard
MB_SetSnapshot_v1(&pSS->Mockingboard2, 5);
//
// Slot6: Disk][
DiskSetSnapshot_v1(&pSS->Disk2);
SetLoadedSaveStateFlag(true);
MemUpdatePaging(TRUE);
// NB. g_Apple2Type doesn't change for v1, but replicate this (like v2)
VideoReinitialize(); // g_CharsetType changed
FrameUpdateApple2Type();
}
catch(std::string szMessage)
{
MessageBox( g_hFrameWindow,
szMessage.c_str(),
TEXT("Load State"),
MB_ICONEXCLAMATION | MB_SETFOREGROUND);
SetCurrentImageDir(strOldImageDir.c_str());
PostMessage(g_hFrameWindow, WM_USER_RESTART, 0, 0); // Power-cycle VM (undoing all the new state just loaded)
}
delete [] pSS;
}
//-----------------------------------------------------------------------------
static HANDLE m_hFile = INVALID_HANDLE_VALUE;
static CConfigNeedingRestart m_ConfigNew;
@ -323,7 +206,7 @@ static UINT ParseFileHdr(void)
static void ParseUnitApple2(YamlLoadHelper& yamlLoadHelper, UINT version)
{
if (version != UNIT_APPLE2_VER)
if (version == 0 || version > UNIT_APPLE2_VER)
throw std::string(SS_YAML_KEY_UNIT ": Apple2: Version mismatch");
std::string model = yamlLoadHelper.LoadString(SS_YAML_KEY_MODEL);
@ -334,21 +217,21 @@ static void ParseUnitApple2(YamlLoadHelper& yamlLoadHelper, UINT version)
m_ConfigNew.m_CpuType = GetMainCpu();
JoyLoadSnapshot(yamlLoadHelper);
KeybLoadSnapshot(yamlLoadHelper);
KeybLoadSnapshot(yamlLoadHelper, version);
SpkrLoadSnapshot(yamlLoadHelper);
VideoLoadSnapshot(yamlLoadHelper);
MemLoadSnapshot(yamlLoadHelper);
MemLoadSnapshot(yamlLoadHelper, version);
// g_Apple2Type may've changed: so redraw frame (title, buttons, leds, etc)
VideoReinitialize(); // g_CharsetType changed
FrameUpdateApple2Type();
FrameUpdateApple2Type(); // Calls VideoRedrawScreen() before the aux mem has been loaded (so if DHGR is enabled, then aux mem will be zeros at this stage)
}
//---
static void ParseSlots(YamlLoadHelper& yamlLoadHelper, UINT version)
static void ParseSlots(YamlLoadHelper& yamlLoadHelper, UINT unitVersion)
{
if (version != UNIT_SLOTS_VER)
if (unitVersion != UNIT_SLOTS_VER)
throw std::string(SS_YAML_KEY_UNIT ": Slots: Version mismatch");
while (1)
@ -358,69 +241,82 @@ static void ParseSlots(YamlLoadHelper& yamlLoadHelper, UINT version)
break; // done all slots
const int slot = strtoul(scalar.c_str(), NULL, 10); // NB. aux slot supported as a different "unit"
if (slot < 1 || slot > 7)
// NB. slot-0 only supported for Apple II or II+ (or similar clones)
if (slot < 0 || slot > 7)
throw std::string("Slots: Invalid slot #: ") + scalar;
yamlLoadHelper.GetSubMap(scalar);
std::string card = yamlLoadHelper.LoadString(SS_YAML_KEY_CARD);
UINT version = yamlLoadHelper.LoadUint(SS_YAML_KEY_VERSION);
UINT cardVersion = yamlLoadHelper.LoadUint(SS_YAML_KEY_VERSION);
if (!yamlLoadHelper.GetSubMap(std::string(SS_YAML_KEY_STATE)))
throw std::string(SS_YAML_KEY_UNIT ": Expected sub-map name: " SS_YAML_KEY_STATE);
bool bIsCardSupported = true;
SS_CARDTYPE type = CT_Empty;
bool bRes = false;
if (card == Printer_GetSnapshotCardName())
{
bRes = Printer_LoadSnapshot(yamlLoadHelper, slot, version);
bRes = Printer_LoadSnapshot(yamlLoadHelper, slot, cardVersion);
type = CT_GenericPrinter;
}
else if (card == sg_SSC.GetSnapshotCardName())
{
bRes = sg_SSC.LoadSnapshot(yamlLoadHelper, slot, version);
bRes = sg_SSC.LoadSnapshot(yamlLoadHelper, slot, cardVersion);
type = CT_SSC;
}
else if (card == sg_Mouse.GetSnapshotCardName())
{
bRes = sg_Mouse.LoadSnapshot(yamlLoadHelper, slot, version);
bRes = sg_Mouse.LoadSnapshot(yamlLoadHelper, slot, cardVersion);
type = CT_MouseInterface;
}
else if (card == Z80_GetSnapshotCardName())
{
bRes = Z80_LoadSnapshot(yamlLoadHelper, slot, version);
bRes = Z80_LoadSnapshot(yamlLoadHelper, slot, cardVersion);
type = CT_Z80;
}
else if (card == MB_GetSnapshotCardName())
{
bRes = MB_LoadSnapshot(yamlLoadHelper, slot, version);
bRes = MB_LoadSnapshot(yamlLoadHelper, slot, cardVersion);
type = CT_MockingboardC;
}
else if (card == Phasor_GetSnapshotCardName())
{
bRes = Phasor_LoadSnapshot(yamlLoadHelper, slot, version);
bRes = Phasor_LoadSnapshot(yamlLoadHelper, slot, cardVersion);
type = CT_Phasor;
}
else if (card == DiskGetSnapshotCardName())
{
bRes = DiskLoadSnapshot(yamlLoadHelper, slot, version);
bRes = DiskLoadSnapshot(yamlLoadHelper, slot, cardVersion);
type = CT_Disk2;
}
else if (card == HD_GetSnapshotCardName())
{
bRes = HD_LoadSnapshot(yamlLoadHelper, slot, version, g_strSaveStatePath);
bRes = HD_LoadSnapshot(yamlLoadHelper, slot, cardVersion, g_strSaveStatePath);
m_ConfigNew.m_bEnableHDD = true;
type = CT_GenericHDD;
}
else if (card == LanguageCardSlot0::GetSnapshotCardName())
{
type = CT_LanguageCard;
SetExpansionMemType(type);
CreateLanguageCard();
bRes = GetLanguageCard()->LoadSnapshot(yamlLoadHelper, slot, cardVersion);
}
else if (card == Saturn128K::GetSnapshotCardName())
{
type = CT_Saturn128K;
SetExpansionMemType(type);
CreateLanguageCard();
bRes = GetLanguageCard()->LoadSnapshot(yamlLoadHelper, slot, cardVersion);
}
else
{
bIsCardSupported = false;
throw std::string("Slots: Unknown card: " + card); // todo: don't throw - just ignore & continue
}
if (bRes && bIsCardSupported)
if (bRes)
{
m_ConfigNew.m_Slot[slot] = type;
}
@ -439,22 +335,22 @@ static void ParseUnit(void)
YamlLoadHelper yamlLoadHelper(yamlHelper);
std::string unit = yamlLoadHelper.LoadString(SS_YAML_KEY_TYPE);
UINT version = yamlLoadHelper.LoadUint(SS_YAML_KEY_VERSION);
UINT unitVersion = yamlLoadHelper.LoadUint(SS_YAML_KEY_VERSION);
if (!yamlLoadHelper.GetSubMap(std::string(SS_YAML_KEY_STATE)))
throw std::string(SS_YAML_KEY_UNIT ": Expected sub-map name: " SS_YAML_KEY_STATE);
if (unit == GetSnapshotUnitApple2Name())
{
ParseUnitApple2(yamlLoadHelper, version);
ParseUnitApple2(yamlLoadHelper, unitVersion);
}
else if (unit == MemGetSnapshotUnitAuxSlotName())
{
MemLoadSnapshotAux(yamlLoadHelper, version);
MemLoadSnapshotAux(yamlLoadHelper, unitVersion);
}
else if (unit == GetSnapshotUnitSlotsName())
{
ParseSlots(yamlLoadHelper, version);
ParseSlots(yamlLoadHelper, unitVersion);
}
else
{
@ -464,19 +360,22 @@ 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
ConfigOld.m_Slot[2] = CT_SSC; // fixme
//ConfigOld.m_Slot[3] = CT_Uthernet; // todo
@ -489,7 +388,6 @@ static void Snapshot_LoadState_v2(void)
m_ConfigNew.m_SlotAux = CT_Empty;
m_ConfigNew.m_bEnableHDD = false;
//m_ConfigNew.m_bEnableTheFreezesF8Rom = ?; // todo: when support saving config
//m_ConfigNew.m_bEnhanceDisk = ?; // todo: when support saving config
MemReset();
PravetsReset();
@ -497,7 +395,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();
@ -538,7 +436,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();
@ -550,7 +449,12 @@ void Snapshot_LoadState()
const size_t pos = g_strSaveStatePathname.size() - ext_aws.size();
if (g_strSaveStatePathname.find(ext_aws, pos) != std::string::npos) // find ".aws" at end of pathname
{
Snapshot_LoadState_v1();
MessageBox( g_hFrameWindow,
"Save-state v1 no longer supported.\n"
"Please load using AppleWin 1.27, and re-save as a v2 state file.",
TEXT("Load State"),
MB_ICONEXCLAMATION | MB_SETFOREGROUND);
return;
}
@ -591,6 +495,9 @@ void Snapshot_SaveState(void)
yamlSaveHelper.UnitHdr(GetSnapshotUnitSlotsName(), UNIT_SLOTS_VER);
YamlSaveHelper::Label state(yamlSaveHelper, "%s:\n", SS_YAML_KEY_STATE);
if (g_Slot0 != CT_Empty && IsApple2PlusOrClone(GetApple2Type()))
GetLanguageCard()->SaveSnapshot(yamlSaveHelper); // Language Card or Saturn 128K
Printer_SaveSnapshot(yamlSaveHelper);
sg_SSC.SaveSnapshot(yamlSaveHelper);
@ -637,17 +544,19 @@ void Snapshot_Startup()
Snapshot_LoadState();
bDone = true;
bDone = true; // Prevents a g_bRestart from loading an old save-state
}
void Snapshot_Shutdown()
{
static bool bDone = false;
_ASSERT(!bDone);
_ASSERT(!g_bRestart);
if(!g_bSaveStateOnExit || bDone)
return;
Snapshot_SaveState();
bDone = true;
bDone = true; // Debug flag: this func should only be called once, and never on a g_bRestart
}

View File

@ -46,9 +46,6 @@ enum SS_UNIT_TYPE
const UINT nMemMainSize = 64*1024;
const UINT nMemAuxSize = 64*1024;
const UINT kSLOT_LANG = 0;
const UINT kSLOT_AUX = 8;
struct SS_CARD_HDR
{
SS_UNIT_HDR UnitHdr;
@ -70,10 +67,13 @@ enum SS_CARDTYPE
CT_Phasor, // Soundcard
CT_Echo, // Soundcard
CT_SAM, // Soundcard: Software Automated Mouth
CT_80Col, // 80 column card (no memory)
CT_80Col, // 80 column card (1K)
CT_Extended80Col, // Extended 80-col card (64K)
CT_RamWorksIII, // RamWorksIII (up to 8MB)
CT_Uthernet,
CT_LanguageCard, // Apple][ or ][+ in slot-0
CT_LanguageCardIIe, // Apple//e LC instance (not a card)
CT_Saturn128K, // Saturn 128K (but may be populated with less RAM, in multiples of 16K)
};
/////////////////////////////////////////////////////////////////////////////////

View File

@ -47,11 +47,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define TCP_SERIAL_PORT 1977
// Default: 19200-8-N-1
// Default: 9600-8-N-1
SSC_DIPSW CSuperSerialCard::m_DIPSWDefault =
{
// DIPSW1:
CBR_19200,
CBR_9600, // Use 9600, as a 1MHz Apple II can only handle up to 9600 bps [Ref.1]
FWMODE_CIC,
// DIPSW2:
@ -68,9 +68,7 @@ CSuperSerialCard::CSuperSerialCard() :
m_aySerialPortChoices(NULL),
m_uTCPChoiceItemIdx(0),
m_uSlot(0),
m_bCfgSupportDCD(false),
m_bCfgSupportDSR(false),
m_bCfgSupportDTR(false)
m_bCfgSupportDCD(false)
{
memset(m_ayCurrentSerialPortName, 0, sizeof(m_ayCurrentSerialPortName));
m_dwSerialPortItem = 0;
@ -93,32 +91,25 @@ void CSuperSerialCard::InternalReset()
{
GetDIPSW();
// SY6551 datasheet: Hardware reset sets Control register to 0 - the DIPSW settings are not used by h/w to setup this register
m_uControlByte = 0;
// SY6551 datasheet: Hardware reset sets Command register to 0
// . NB. MOS6551 datasheet: Hardware reset: b#00000010 (so ACIA not init'd on IN#2!)
UpdateCommandReg(0);
m_uBaudRate = CBR_19200; // Undefined, as CONTROL.CLK_SOURCE=0=External clock is not supported for SSC - so nominally use 19200
m_uStopBits = ONESTOPBIT;
m_uByteSize = 8;
m_uParity = NOPARITY;
// SY6551 datasheet: Hardware reset sets Control register to 0 - the DIPSW settings are not used by h/w to setup this register
UpdateCommandAndControlRegs(0, 0); // Baud=External clock! 8-N-1
//
m_vuRxCurrBuffer = 0;
m_vbTxIrqPending = false;
m_vbRxIrqPending = false;
m_vbTxEmpty = true;
m_vuRxCurrBuffer = 0;
m_qComSerialBuffer[0].clear();
m_qComSerialBuffer[1].clear();
m_qTcpSerialBuffer.clear();
m_uDTR = DTR_CONTROL_DISABLE;
m_uRTS = RTS_CONTROL_DISABLE;
m_dwModemStatus = m_kDefaultModemStatus;
}
CSuperSerialCard::~CSuperSerialCard()
@ -172,7 +163,7 @@ UINT CSuperSerialCard::BaudRateToIndex(UINT uBaudRate)
_ASSERT(0);
LogFileOutput("SSC: BaudRateToIndex(): unsupported rate: %d\n", uBaudRate);
return BaudRateToIndex(CBR_19200); // nominally use 19200
return BaudRateToIndex(m_kDefaultBaudRate); // nominally use AppleWin default
}
//===========================================================================
@ -225,6 +216,7 @@ bool CSuperSerialCard::CheckComm()
// have socket so attempt to bind it
SOCKADDR_IN saAddress;
memset(&saAddress, 0, sizeof(SOCKADDR_IN));
saAddress.sin_family = AF_INET;
saAddress.sin_port = htons(TCP_SERIAL_PORT); // TODO: get from registry / GUI
saAddress.sin_addr.s_addr = htonl(INADDR_ANY);
@ -469,6 +461,13 @@ BYTE __stdcall CSuperSerialCard::CommProgramReset(WORD, WORD, BYTE, BYTE, ULONG)
//===========================================================================
void CSuperSerialCard::UpdateCommandAndControlRegs(BYTE uCommandByte, BYTE uControlByte)
{
// UpdateCommandReg() first to initialise m_uParity, before calling UpdateControlReg()
UpdateCommandReg(uCommandByte);
UpdateControlReg(uControlByte);
}
void CSuperSerialCard::UpdateCommandReg(BYTE command)
{
m_uCommandByte = command;
@ -515,6 +514,10 @@ void CSuperSerialCard::UpdateCommandReg(BYTE command)
if (m_DIPSWCurrent.bInterrupts && m_uCommandByte & CMD_DTR)
{
// Assume enabling Rx IRQ if STATUS.ST_RX_FULL *does not* trigger an IRQ
// . EG. Disable Rx IRQ, receive a byte (don't read STATUS or RX_DATA register), enable Rx IRQ
// Assume enabling Tx IRQ if STATUS.ST_TX_EMPTY *does not* trigger an IRQ
// . otherwise there'd be a "false" TX Empty IRQ even if nothing had ever been transferred!
m_bTxIrqEnabled = (m_uCommandByte & CMD_TX_MASK) == CMD_TX_IRQ_ENA_RTS_LOW;
m_bRxIrqEnabled = (m_uCommandByte & CMD_RX_IRQ_DIS) == 0;
}
@ -524,11 +527,8 @@ void CSuperSerialCard::UpdateCommandReg(BYTE command)
m_bRxIrqEnabled = false;
}
if (m_bCfgSupportDTR) // GH#386
{
// Data Terminal Ready (DTR) setting (0=set DTR high (indicates 'not ready'))
m_uDTR = (m_uCommandByte & CMD_DTR) ? DTR_CONTROL_ENABLE : DTR_CONTROL_DISABLE;
}
// Data Terminal Ready (DTR) setting (0=set DTR high (indicates 'not ready')) (GH#386)
m_uDTR = (m_uCommandByte & CMD_DTR) ? DTR_CONTROL_ENABLE : DTR_CONTROL_DISABLE;
}
BYTE __stdcall CSuperSerialCard::CommCommand(WORD, WORD, BYTE write, BYTE value, ULONG)
@ -547,6 +547,67 @@ BYTE __stdcall CSuperSerialCard::CommCommand(WORD, WORD, BYTE write, BYTE value,
//===========================================================================
void CSuperSerialCard::UpdateControlReg(BYTE control)
{
m_uControlByte = control;
// UPDATE THE BAUD RATE
switch (m_uControlByte & 0x0F)
{
// Note that 1 MHz Apples (everything other than the Apple IIgs and //c
// Plus running in "fast" mode) cannot handle 19.2 kbps, and even 9600
// bps on these machines requires either some highly optimised code or
// a decent buffer in the device being accessed. The faster Apples
// have no difficulty with this speed, however. [Ref.1]
case 0x00: m_uBaudRate = CBR_115200; break; // Internal clk: undoc'd 115.2K (or 16x external clock)
case 0x01: // fall through [50 bps]
case 0x02: // fall through [75 bps]
case 0x03: // fall through [109.92 bps]
case 0x04: // fall through [134.58 bps]
case 0x05: m_uBaudRate = CBR_110; break; // [150 bps]
case 0x06: m_uBaudRate = CBR_300; break;
case 0x07: m_uBaudRate = CBR_600; break;
case 0x08: m_uBaudRate = CBR_1200; break;
case 0x09: // fall through [1800 bps]
case 0x0A: m_uBaudRate = CBR_2400; break;
case 0x0B: // fall through [3600 bps]
case 0x0C: m_uBaudRate = CBR_4800; break;
case 0x0D: // fall through [7200 bps]
case 0x0E: m_uBaudRate = CBR_9600; break;
case 0x0F: m_uBaudRate = CBR_19200; break;
}
if (m_uControlByte & 0x10)
{
// receiver clock source [0= external, 1= internal]
}
// UPDATE THE BYTE SIZE
switch (m_uControlByte & 0x60)
{
case 0x00: m_uByteSize = 8; break;
case 0x20: m_uByteSize = 7; break;
case 0x40: m_uByteSize = 6; break;
case 0x60: m_uByteSize = 5; break;
}
// UPDATE THE NUMBER OF STOP BITS
if (m_uControlByte & 0x80)
{
if ((m_uByteSize == 8) && (m_uParity != NOPARITY))
m_uStopBits = ONESTOPBIT;
else if ((m_uByteSize == 5) && (m_uParity == NOPARITY))
m_uStopBits = ONE5STOPBITS;
else
m_uStopBits = TWOSTOPBITS;
}
else
{
m_uStopBits = ONESTOPBIT;
}
}
BYTE __stdcall CSuperSerialCard::CommControl(WORD, WORD, BYTE write, BYTE value, ULONG)
{
if (!CheckComm())
@ -554,64 +615,7 @@ BYTE __stdcall CSuperSerialCard::CommControl(WORD, WORD, BYTE write, BYTE value,
if (write && (value != m_uControlByte))
{
m_uControlByte = value;
// UPDATE THE BAUD RATE
switch (m_uControlByte & 0x0F)
{
// Note that 1 MHz Apples (everything other than the Apple IIgs and //c
// Plus running in "fast" mode) cannot handle 19.2 kbps, and even 9600
// bps on these machines requires either some highly optimised code or
// a decent buffer in the device being accessed. The faster Apples
// have no difficulty with this speed, however.
case 0x00: m_uBaudRate = CBR_115200; break; // Internal clk: undoc'd 115.2K (or 16x external clock)
case 0x01: // fall through [50 bps]
case 0x02: // fall through [75 bps]
case 0x03: // fall through [109.92 bps]
case 0x04: // fall through [134.58 bps]
case 0x05: m_uBaudRate = CBR_110; break; // [150 bps]
case 0x06: m_uBaudRate = CBR_300; break;
case 0x07: m_uBaudRate = CBR_600; break;
case 0x08: m_uBaudRate = CBR_1200; break;
case 0x09: // fall through [1800 bps]
case 0x0A: m_uBaudRate = CBR_2400; break;
case 0x0B: // fall through [3600 bps]
case 0x0C: m_uBaudRate = CBR_4800; break;
case 0x0D: // fall through [7200 bps]
case 0x0E: m_uBaudRate = CBR_9600; break;
case 0x0F: m_uBaudRate = CBR_19200; break;
}
if (m_uControlByte & 0x10)
{
// receiver clock source [0= external, 1= internal]
}
// UPDATE THE BYTE SIZE
switch (m_uControlByte & 0x60)
{
case 0x00: m_uByteSize = 8; break;
case 0x20: m_uByteSize = 7; break;
case 0x40: m_uByteSize = 6; break;
case 0x60: m_uByteSize = 5; break;
}
// UPDATE THE NUMBER OF STOP BITS
if (m_uControlByte & 0x80)
{
if ((m_uByteSize == 8) && (m_uParity != NOPARITY))
m_uStopBits = ONESTOPBIT;
else if ((m_uByteSize == 5) && (m_uParity == NOPARITY))
m_uStopBits = ONE5STOPBITS;
else
m_uStopBits = TWOSTOPBITS;
}
else
{
m_uStopBits = ONESTOPBIT;
}
UpdateControlReg(value);
UpdateCommState();
}
@ -754,29 +758,21 @@ BYTE __stdcall CSuperSerialCard::CommStatus(WORD, WORD, BYTE, BYTE, ULONG)
if (!CheckComm())
return ST_DSR | ST_DCD | ST_TX_EMPTY;
static DWORD modemStatus = 0;
if (m_bCfgSupportDCD || m_bCfgSupportDSR)
DWORD modemStatus = m_kDefaultModemStatus;
if (m_hCommHandle != INVALID_HANDLE_VALUE)
{
if (m_hCommHandle != INVALID_HANDLE_VALUE)
modemStatus = m_dwModemStatus; // Take a copy of this volatile variable
if (!m_bCfgSupportDCD) // Default: DSR state is mirrored to DCD (GH#553)
{
// Call GetCommModemStatus() outside of the critical section. For Win7-64: takes 1-2msecs!
static DWORD dwLastTimeGettingModemStatus = 0;
DWORD dwCurrTime = GetTickCount();
if (dwCurrTime - dwLastTimeGettingModemStatus > 8) // Limit reading status to twice a 16.6ms video frame (arbitrary throttle limit)
{
// Only permit periodic reading, otherwise a tight 6502 polling loop can kill emulator performance!
GetCommModemStatus(m_hCommHandle, &modemStatus); // Returns 0x30 = MS_DSR_ON|MS_CTS_ON
dwLastTimeGettingModemStatus = dwCurrTime;
}
}
else if (m_hCommListenSocket != INVALID_SOCKET)
{
if (m_hCommAcceptSocket != INVALID_SOCKET)
modemStatus = MS_RLSD_ON | MS_DSR_ON | MS_CTS_ON;
else
modemStatus = 0;
modemStatus &= ~MS_RLSD_ON;
if (modemStatus & MS_DSR_ON)
modemStatus |= MS_RLSD_ON;
}
}
else if (m_hCommListenSocket != INVALID_SOCKET && m_hCommAcceptSocket != INVALID_SOCKET)
{
modemStatus = MS_RLSD_ON | MS_DSR_ON | MS_CTS_ON;
}
//
@ -803,17 +799,8 @@ BYTE __stdcall CSuperSerialCard::CommStatus(WORD, WORD, BYTE, BYTE, ULONG)
//
BYTE DSR = 0;
BYTE DCD = 0;
if ((m_hCommHandle != INVALID_HANDLE_VALUE) && (m_bCfgSupportDCD || m_bCfgSupportDSR)) // GH#386
{
if (m_bCfgSupportDSR)
DSR = (modemStatus & MS_DSR_ON) ? 0x00 : ST_DSR;
if (m_bCfgSupportDCD)
DCD = (modemStatus & MS_RLSD_ON) ? 0x00 : ST_DCD;
}
BYTE DSR = (modemStatus & MS_DSR_ON) ? 0x00 : ST_DSR; // DSR is active low (see SY6551 datasheet) (GH#386)
BYTE DCD = (modemStatus & MS_RLSD_ON) ? 0x00 : ST_DCD; // DCD is active low (see SY6551 datasheet) (GH#386)
//
@ -825,7 +812,7 @@ BYTE __stdcall CSuperSerialCard::CommStatus(WORD, WORD, BYTE, BYTE, ULONG)
BYTE uStatus =
IRQ
| DSR
| DCD // Need 0x00 (ie. DCD is active) to allow ZLink to start up
| DCD
| TX_EMPTY
| RX_FULL;
@ -882,17 +869,11 @@ BYTE __stdcall CSuperSerialCard::CommDipSw(WORD, WORD addr, BYTE, BYTE, ULONG)
BYTE SW2_5 = m_DIPSWCurrent.bLinefeed ? 0 : 1; // SW2-5 (LF: yes-ON(0); no-OFF(1))
BYTE CTS = 0; // GH#311
BYTE CTS = 1; // Default to CTS being false. (Support CTS in DIPSW: GH#311)
if (CheckComm() && m_hCommHandle != INVALID_HANDLE_VALUE)
{
DWORD modemStatus = 0;
if (GetCommModemStatus(m_hCommHandle, &modemStatus))
CTS = (modemStatus & MS_CTS_ON) ? 0 : 1; // CTS is true when 0
}
CTS = (m_dwModemStatus & MS_CTS_ON) ? 0 : 1; // CTS active low (see SY6551 datasheet)
else if (m_hCommListenSocket != INVALID_SOCKET)
{
CTS = (m_hCommAcceptSocket != INVALID_SOCKET) ? 0 : 1;
}
// SSC-54:
sw = SW2_1<<7 | // b7 : SW2-1
@ -1070,10 +1051,18 @@ void CSuperSerialCard::CheckCommEvent(DWORD dwEvtMask)
LeaveCriticalSection(&m_CriticalSection);
}
}
else if (dwEvtMask & EV_TXEMPTY)
if (dwEvtMask & EV_TXEMPTY)
{
TransmitDone();
}
if (dwEvtMask & (EV_RLSD|EV_DSR|EV_CTS))
{
// For Win7-64: takes 1-2msecs!
// Don't read from main emulation thread, otherwise a tight 6502 polling loop can kill emulator performance!
GetCommModemStatus(m_hCommHandle, const_cast<DWORD*>(&m_dwModemStatus));
}
}
DWORD WINAPI CSuperSerialCard::CommThread(LPVOID lpParameter)
@ -1081,8 +1070,7 @@ DWORD WINAPI CSuperSerialCard::CommThread(LPVOID lpParameter)
CSuperSerialCard* pSSC = (CSuperSerialCard*) lpParameter;
char szDbg[100];
BOOL bRes = SetCommMask(pSSC->m_hCommHandle, EV_TXEMPTY | EV_RXCHAR);
// BOOL bRes = SetCommMask(pSSC->m_hCommHandle, EV_RXCHAR); // Just RX
BOOL bRes = SetCommMask(pSSC->m_hCommHandle, EV_RLSD | EV_DSR | EV_CTS | EV_TXEMPTY | EV_RXCHAR);
if (!bRes)
{
sprintf(szDbg, "SSC: CommThread(): SetCommMask() failed\n");
@ -1328,6 +1316,7 @@ char* CSuperSerialCard::GetSerialPortChoices()
void CSuperSerialCard::SetSerialPortName(const char* pSerialPortName)
{
strncpy(m_ayCurrentSerialPortName, pSerialPortName, SIZEOF_SERIALCHOICE_ITEM);
m_ayCurrentSerialPortName[SIZEOF_SERIALCHOICE_ITEM-1] = 0;
// Init m_aySerialPortChoices, so that we have choices to show if serial is active when we 1st open Config dialog
GetSerialPortChoices();
@ -1366,27 +1355,10 @@ void CSuperSerialCard::SetSerialPortName(const char* pSerialPortName)
//===========================================================================
void CSuperSerialCard::SetSnapshot_v1( const DWORD baudrate,
const BYTE bytesize,
const BYTE commandbyte,
const DWORD comminactivity,
const BYTE controlbyte,
const BYTE parity,
const BYTE stopbits)
{
m_uBaudRate = baudrate;
m_uStopBits = stopbits;
m_uByteSize = bytesize;
// m_dwCommInactivity = comminactivity; // Obsolete
m_uControlByte = controlbyte;
// m_uParity = parity; // Redundant: derived from commandbyte in UpdateCommandReg()
// memcpy(m_RecvBuffer, pSS->recvbuffer, uRecvBufferSize);
// m_vRecvBytes = recvbytes;
UpdateCommandReg(commandbyte);
}
//===========================================================================
// Unit version history:
// 2: Added: Support DCD flag
// Removed: redundant data (encapsulated in Command & Control bytes)
static const UINT kUNIT_VERSION = 2;
#define SS_YAML_VALUE_CARD_SSC "Super Serial Card"
@ -1409,6 +1381,7 @@ void CSuperSerialCard::SetSnapshot_v1( const DWORD baudrate,
#define SS_YAML_KEY_RXIRQPENDING "RX IRQ Pending"
#define SS_YAML_KEY_WRITTENTX "Written TX"
#define SS_YAML_KEY_SERIALPORTNAME "Serial Port Name"
#define SS_YAML_KEY_SUPPORT_DCD "Support DCD"
std::string CSuperSerialCard::GetSnapshotCardName(void)
{
@ -1430,23 +1403,17 @@ void CSuperSerialCard::SaveSnapshotDIPSW(YamlSaveHelper& yamlSaveHelper, std::st
void CSuperSerialCard::SaveSnapshot(YamlSaveHelper& yamlSaveHelper)
{
YamlSaveHelper::Slot slot(yamlSaveHelper, GetSnapshotCardName(), m_uSlot, 1);
YamlSaveHelper::Slot slot(yamlSaveHelper, GetSnapshotCardName(), m_uSlot, kUNIT_VERSION);
YamlSaveHelper::Label unit(yamlSaveHelper, "%s:\n", SS_YAML_KEY_STATE);
SaveSnapshotDIPSW(yamlSaveHelper, SS_YAML_KEY_DIPSWDEFAULT, m_DIPSWDefault);
SaveSnapshotDIPSW(yamlSaveHelper, SS_YAML_KEY_DIPSWCURRENT, m_DIPSWCurrent);
yamlSaveHelper.SaveUint(SS_YAML_KEY_BAUDRATE, m_uBaudRate);
yamlSaveHelper.SaveUint(SS_YAML_KEY_STOPBITS, m_uStopBits);
yamlSaveHelper.SaveUint(SS_YAML_KEY_BYTESIZE, m_uByteSize);
yamlSaveHelper.SaveUint(SS_YAML_KEY_PARITY, m_uParity); // Redundant
yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_CONTROL, m_uControlByte);
yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_COMMAND, m_uCommandByte);
yamlSaveHelper.SaveUint(SS_YAML_KEY_INACTIVITY, 0); // Obsolete
yamlSaveHelper.SaveBool(SS_YAML_KEY_TXIRQENABLED, m_bTxIrqEnabled); // Redundant
yamlSaveHelper.SaveBool(SS_YAML_KEY_RXIRQENABLED, m_bRxIrqEnabled); // Redundant
yamlSaveHelper.SaveBool(SS_YAML_KEY_TXIRQPENDING, m_vbTxIrqPending);
yamlSaveHelper.SaveBool(SS_YAML_KEY_RXIRQPENDING, m_vbRxIrqPending);
yamlSaveHelper.SaveBool(SS_YAML_KEY_WRITTENTX, m_vbTxEmpty);
yamlSaveHelper.SaveBool(SS_YAML_KEY_SUPPORT_DCD, m_bCfgSupportDCD);
yamlSaveHelper.SaveString(SS_YAML_KEY_SERIALPORTNAME, GetSerialPortName());
}
@ -1471,27 +1438,37 @@ bool CSuperSerialCard::LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, U
if (slot != 2) // fixme
throw std::string("Card: wrong slot");
if (version != 1)
if (version < 1 || version > kUNIT_VERSION)
throw std::string("Card: wrong version");
LoadSnapshotDIPSW(yamlLoadHelper, SS_YAML_KEY_DIPSWDEFAULT, m_DIPSWDefault);
LoadSnapshotDIPSW(yamlLoadHelper, SS_YAML_KEY_DIPSWCURRENT, m_DIPSWCurrent);
m_uBaudRate = yamlLoadHelper.LoadUint(SS_YAML_KEY_BAUDRATE);
m_uStopBits = yamlLoadHelper.LoadUint(SS_YAML_KEY_STOPBITS);
m_uByteSize = yamlLoadHelper.LoadUint(SS_YAML_KEY_BYTESIZE);
yamlLoadHelper.LoadUint(SS_YAML_KEY_PARITY); // Redundant: derived from uCommandByte in UpdateCommandReg()
m_uControlByte = yamlLoadHelper.LoadUint(SS_YAML_KEY_CONTROL);
if (version == 1) // Consume redundant/obsolete data
{
yamlLoadHelper.LoadUint(SS_YAML_KEY_PARITY); // Redundant: derived from uCommandByte in UpdateCommandReg()
yamlLoadHelper.LoadBool(SS_YAML_KEY_TXIRQENABLED); // Redundant: derived from uCommandByte in UpdateCommandReg()
yamlLoadHelper.LoadBool(SS_YAML_KEY_RXIRQENABLED); // Redundant: derived from uCommandByte in UpdateCommandReg()
yamlLoadHelper.LoadUint(SS_YAML_KEY_BAUDRATE); // Redundant: derived from uControlByte in UpdateControlReg()
yamlLoadHelper.LoadUint(SS_YAML_KEY_STOPBITS); // Redundant: derived from uControlByte in UpdateControlReg()
yamlLoadHelper.LoadUint(SS_YAML_KEY_BYTESIZE); // Redundant: derived from uControlByte in UpdateControlReg()
yamlLoadHelper.LoadUint(SS_YAML_KEY_INACTIVITY); // Obsolete (so just consume)
}
else if (version >= 2)
{
SupportDCD( yamlLoadHelper.LoadBool(SS_YAML_KEY_SUPPORT_DCD) );
}
UINT uCommandByte = yamlLoadHelper.LoadUint(SS_YAML_KEY_COMMAND);
yamlLoadHelper.LoadUint(SS_YAML_KEY_INACTIVITY); // Obsolete (so just consume)
yamlLoadHelper.LoadBool(SS_YAML_KEY_TXIRQENABLED); // Redundant: derived from uCommandByte in UpdateCommandReg()
yamlLoadHelper.LoadBool(SS_YAML_KEY_RXIRQENABLED); // Redundant: derived from uCommandByte in UpdateCommandReg()
UINT uControlByte = yamlLoadHelper.LoadUint(SS_YAML_KEY_CONTROL);
UpdateCommandAndControlRegs(uCommandByte, uControlByte);
m_vbTxIrqPending = yamlLoadHelper.LoadBool(SS_YAML_KEY_TXIRQPENDING);
m_vbRxIrqPending = yamlLoadHelper.LoadBool(SS_YAML_KEY_RXIRQPENDING);
m_vbTxEmpty = yamlLoadHelper.LoadBool(SS_YAML_KEY_WRITTENTX);
UpdateCommandReg(uCommandByte);
std::string serialPortName = yamlLoadHelper.LoadString(SS_YAML_KEY_SERIALPORTNAME);
SetSerialPortName(serialPortName.c_str());

View File

@ -32,7 +32,6 @@ public:
void CommReset();
void CommDestroy();
void CommSetSerialPort(HWND hWindow, DWORD dwNewSerialPortItem);
void SetSnapshot_v1(const DWORD baudrate, const BYTE bytesize, const BYTE commandbyte, const DWORD comminactivity, const BYTE controlbyte, const BYTE parity, const BYTE stopbits);
std::string GetSnapshotCardName(void);
void SaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
bool LoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version);
@ -43,8 +42,6 @@ public:
void SetSerialPortName(const char* pSerialPortName);
bool IsActive() { return (m_hCommHandle != INVALID_HANDLE_VALUE) || (m_hCommListenSocket != INVALID_SOCKET); }
void SupportDCD(bool bEnable) { m_bCfgSupportDCD = bEnable; } // Status
void SupportDSR(bool bEnable) { m_bCfgSupportDSR = bEnable; } // Status
void SupportDTR(bool bEnable) { m_bCfgSupportDTR = bEnable; } // Control
void CommTcpSerialAccept();
void CommTcpSerialReceive();
@ -64,7 +61,9 @@ private:
BYTE __stdcall CommProgramReset(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG nExecutedCycles);
void InternalReset();
void UpdateCommandAndControlRegs(BYTE command, BYTE control);
void UpdateCommandReg(BYTE command);
void UpdateControlReg(BYTE control);
void GetDIPSW();
void SetDIPSWDefaults();
UINT BaudRateToIndex(UINT uBaudRate);
@ -98,6 +97,7 @@ private:
static SSC_DIPSW m_DIPSWDefault;
SSC_DIPSW m_DIPSWCurrent;
static const UINT m_kDefaultBaudRate = CBR_9600;
UINT m_uBaudRate;
UINT m_uStopBits;
UINT m_uByteSize;
@ -139,12 +139,11 @@ private:
BYTE* m_pExpansionRom;
UINT m_uSlot;
// Modem
bool m_bCfgSupportDCD;
bool m_bCfgSupportDSR;
bool m_bCfgSupportDTR;
UINT m_uDTR;
// Modem (end)
static const DWORD m_kDefaultModemStatus = 0; // MS_RLSD_OFF(=DCD_OFF), MS_DSR_OFF, MS_CTS_OFF
volatile DWORD m_dwModemStatus; // Updated by CommThread when any of RLSD|DSR|CTS changes / Read by main thread - CommStatus()& CommDipSw()
UINT m_uRTS;
};

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

@ -931,13 +931,6 @@ void Spkr_DSUninit()
//=============================================================================
void SpkrSetSnapshot_v1(const unsigned __int64 SpkrLastCycle)
{
g_nSpkrLastCycle = SpkrLastCycle;
}
//
#define SS_YAML_KEY_LASTCYCLE "Last Cycle"
static std::string SpkrGetSnapshotStructName(void)

View File

@ -33,7 +33,6 @@ void Spkr_Demute();
bool Spkr_IsActive();
bool Spkr_DSInit();
void Spkr_DSUninit();
void SpkrSetSnapshot_v1(const unsigned __int64 SpkrLastCycle);
void SpkrSaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
void SpkrLoadSnapshot(class YamlLoadHelper& yamlLoadHelper);

View File

@ -31,6 +31,7 @@
typedef UINT8 uint8_t;
typedef UINT16 uint16_t;
typedef UINT32 uint32_t;
typedef UINT64 uint64_t;
#endif
#include <windows.h>

View File

@ -37,6 +37,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "Registry.h"
#include "Video.h"
#include "NTSC.h"
#include "RGBMonitor.h"
#include "../resource/resource.h"
#include "Configuration/PropertySheet.h"
@ -83,26 +84,24 @@ static LPBITMAPINFO g_pFramebufferinfo = NULL;
HBITMAP g_hLogoBitmap;
const int MAX_SOURCE_Y = 512;
static LPBYTE g_aSourceStartofLine[ MAX_SOURCE_Y ];
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_COLOR_TV;
DWORD g_uHalfScanLines = 1; // drop 50% scan lines for a more authentic look
DWORD g_eVideoType = VT_DEFAULT;
static VideoStyle_e g_eVideoStyle = VS_HALF_SCANLINES;
static const bool bVideoScannerNTSC = true; // NTSC video scanning (or PAL)
static const bool g_bVideoScannerNTSC = true; // NTSC video scanning (or PAL)
//-------------------------------------
// NOTE: KEEP IN SYNC: VideoType_e g_aVideoChoices g_apVideoModeDesc
TCHAR g_aVideoChoices[] =
TEXT("Monochrome (Custom)\0")
TEXT("Color Monitor\0")
TEXT("B&W TV\0")
TEXT("Color (RGB Monitor)\0")
TEXT("Color (NTSC Monitor)\0")
TEXT("Color TV\0")
TEXT("B&W TV\0")
TEXT("Monochrome (Amber)\0")
TEXT("Monochrome (Green)\0")
TEXT("Monochrome (White)\0")
@ -113,9 +112,10 @@ static const bool bVideoScannerNTSC = true; // NTSC video scanning (or PAL)
char *g_apVideoModeDesc[ NUM_VIDEO_MODES ] =
{
"Monochrome Monitor (Custom)"
, "Color Monitor"
, "B&W TV"
, "Color (RGB Monitor)"
, "Color (NTSC Monitor)"
, "Color TV"
, "B&W TV"
, "Amber Monitor"
, "Green Monitor"
, "White Monitor"
@ -127,7 +127,7 @@ static const bool bVideoScannerNTSC = true; // NTSC video scanning (or PAL)
bool g_bShowPrintScreenWarningDialog = true;
void Util_MakeScreenShotFileName( char *pFinalFileName_ );
bool Util_TestScreenShotFileName( const char *pFileName );
void Video_SaveScreenShot( const char *pScreenShotFileName, const VideoScreenShot_e ScreenShotType );
void Video_SaveScreenShot( const VideoScreenShot_e ScreenShotType, const char *pScreenShotFileName );
void Video_MakeScreenShot( FILE *pFile, const VideoScreenShot_e ScreenShotType );
void videoCreateDIBSection();
@ -338,34 +338,6 @@ void VideoBenchmark () {
MB_ICONINFORMATION | MB_SETFOREGROUND);
}
//===========================================================================
BYTE VideoCheckMode (WORD, WORD address, BYTE, BYTE, ULONG uExecutedCycles)
{
address &= 0xFF;
if (address == 0x7F)
return MemReadFloatingBus(SW_DHIRES != 0, uExecutedCycles);
else {
BOOL result = 0;
switch (address) {
case 0x1A: result = SW_TEXT; break;
case 0x1B: result = SW_MIXED; break;
case 0x1D: result = SW_HIRES; break;
case 0x1E: result = g_nAltCharSetOffset; break;
case 0x1F: result = SW_80COL; break;
case 0x7F: result = SW_DHIRES; break;
}
return KeybGetKeycode() | (result ? 0x80 : 0);
}
}
//===========================================================================
BYTE VideoCheckVbl ( ULONG uExecutedCycles )
{
bool bVblBar = VideoGetVblBar(uExecutedCycles);
BYTE r = KeybGetKeycode();
return (r & ~0x80) | (bVblBar ? 0x80 : 0);
}
// This is called from PageConfig
//===========================================================================
void VideoChooseMonochromeColor ()
@ -570,7 +542,7 @@ void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInit /*=fal
void VideoRedrawScreenAfterFullSpeed(DWORD dwCyclesThisFrame)
{
if (bVideoScannerNTSC)
if (g_bVideoScannerNTSC)
{
NTSC_VideoClockResync(dwCyclesThisFrame);
}
@ -595,6 +567,7 @@ void VideoRedrawScreen (void)
//===========================================================================
// TC: Hacky-fix for GH#341 - better to draw to the correct position in the framebuffer to start with! (in NTSC.cpp)
// . NB. Now the dx is corrected in NTSC.cpp, updateVideoScannerAddress()
static void VideoFrameBufferAdjust(int& xSrc, int& ySrc, bool bInvertY=false)
{
int dx=0, dy=0;
@ -602,15 +575,8 @@ static void VideoFrameBufferAdjust(int& xSrc, int& ySrc, bool bInvertY=false)
if (g_eVideoType == VT_MONO_TV || g_eVideoType == VT_COLOR_TV)
{
// Adjust the src locations for the NTSC video modes
dx = 2;
dy = -1;
}
else if (g_eVideoType == VT_COLOR_MONITOR)
{
//if ((g_uVideoMode & VF_TEXT) == 0) // NB. Not sufficient, eg. ANSI STORY...
if ( NTSC_GetColorBurst() == true ) // ANSI STORY (end credits): split DGR/TEXT80/DGR on scanline
dx = 2;
}
if (bInvertY)
dy =- dy;
@ -659,9 +625,9 @@ void VideoRefreshScreen ( uint32_t uRedrawWholeScreenVideoMode /* =0*/, bool bRe
}
//===========================================================================
void VideoReinitialize ()
void VideoReinitialize (bool bInitVideoScannerAddress /*= true*/)
{
NTSC_VideoReinitialize( g_dwCyclesThisFrame );
NTSC_VideoReinitialize( g_dwCyclesThisFrame, bInitVideoScannerAddress );
NTSC_VideoInitAppleType();
NTSC_SetVideoStyle();
NTSC_SetVideoTextMode( g_uVideoMode & VF_80COL ? 80 : 40 );
@ -676,12 +642,13 @@ void VideoResetState ()
NTSC_SetVideoTextMode( 40 );
NTSC_SetVideoMode( g_uVideoMode );
}
RGB_ResetState();
}
//===========================================================================
BYTE VideoSetMode (WORD, WORD address, BYTE write, BYTE, ULONG uExecutedCycles)
BYTE VideoSetMode(WORD, WORD address, BYTE write, BYTE, ULONG uExecutedCycles)
{
address &= 0xFF;
@ -705,6 +672,9 @@ BYTE VideoSetMode (WORD, WORD address, BYTE write, BYTE, ULONG uExecutedCycles)
case 0x5F: if (!IS_APPLE2) g_uVideoMode &= ~VF_DHIRES; break;
}
if (!IS_APPLE2)
RGB_SetVideoMode(address);
NTSC_SetVideoMode( g_uVideoMode );
return MemReadFloatingBus(uExecutedCycles);
@ -754,15 +724,6 @@ bool VideoGetSWAltCharSet(void)
//===========================================================================
void VideoSetSnapshot_v1(const UINT AltCharSet, const UINT VideoMode)
{
g_nAltCharSetOffset = !AltCharSet ? 0 : 256;
g_uVideoMode = VideoMode;
g_dwCyclesThisFrame = 0;
}
//
#define SS_YAML_KEY_ALTCHARSET "Alt Char Set"
#define SS_YAML_KEY_VIDEOMODE "Video Mode"
#define SS_YAML_KEY_CYCLESTHISFRAME "Cycles This Frame"
@ -798,24 +759,20 @@ void VideoLoadSnapshot(YamlLoadHelper& yamlLoadHelper)
// References to Jim Sather's books are given as eg:
// UTAIIe:5-7,P3 (Understanding the Apple IIe, chapter 5, page 7, Paragraph 3)
//
WORD VideoGetScannerAddress(bool* pbVblBar_OUT, const DWORD uExecutedCycles)
WORD VideoGetScannerAddress(DWORD nCycles, VideoScanner_e videoScannerAddr /*= VS_FullAddr*/)
{
// get video scanner position
//
int nCycles = CpuGetCyclesThisVideoFrame(uExecutedCycles);
// machine state switches
//
int nHires = (SW_HIRES && !SW_TEXT) ? 1 : 0;
int nPage2 = SW_PAGE2 ? 1 : 0;
int n80Store = SW_80STORE ? 1 : 0;
bool bHires = VideoGetSWHIRES() && !VideoGetSWTEXT();
bool bPage2 = VideoGetSWPAGE2();
bool b80Store = VideoGetSW80STORE();
// calculate video parameters according to display standard
//
int nScanLines = bVideoScannerNTSC ? kNTSCScanLines : kPALScanLines;
int nVSyncLine = bVideoScannerNTSC ? kNTSCVSyncLine : kPALVSyncLine;
int nScanCycles = nScanLines * kHClocks;
nCycles %= nScanCycles;
const int kScanLines = g_bVideoScannerNTSC ? kNTSCScanLines : kPALScanLines;
const int kScanCycles = kScanLines * kHClocks;
_ASSERT(nCycles < kScanCycles);
nCycles %= kScanCycles;
// calculate horizontal scanning state
//
@ -836,9 +793,9 @@ WORD VideoGetScannerAddress(bool* pbVblBar_OUT, const DWORD uExecutedCycles)
//
int nVLine = nCycles / kHClocks; // which vertical scanning line
int nVState = kVLine0State + nVLine; // V state bits
if ((nVLine >= kVPresetLine)) // check for previous vertical state preset
if (nVLine >= kVPresetLine) // check for previous vertical state preset
{
nVState -= nScanLines; // compensate for preset
nVState -= kScanLines; // compensate for preset
}
int v_A = (nVState >> 0) & 1; // get vertical state bits
int v_B = (nVState >> 1) & 1;
@ -852,9 +809,9 @@ WORD VideoGetScannerAddress(bool* pbVblBar_OUT, const DWORD uExecutedCycles)
// calculate scanning memory address
//
if (nHires && SW_MIXED && v_4 && v_2) // HIRES TIME signal (UTAIIe:5-7,P3)
if (bHires && SW_MIXED && v_4 && v_2) // HIRES TIME signal (UTAIIe:5-7,P3)
{
nHires = 0; // address is in text memory for mixed hires
bHires = false; // address is in text memory for mixed hires
}
int nAddend0 = 0x0D; // 1 1 0 1
@ -862,51 +819,58 @@ WORD VideoGetScannerAddress(bool* pbVblBar_OUT, const DWORD uExecutedCycles)
int nAddend2 = (v_4 << 3) | (v_3 << 2) | (v_4 << 1) | (v_3 << 0);
int nSum = (nAddend0 + nAddend1 + nAddend2) & 0x0F; // SUM (UTAIIe:5-9)
int nAddress = 0; // build address from video scanner equations (UTAIIe:5-8,T5.1)
nAddress |= h_0 << 0; // a0
nAddress |= h_1 << 1; // a1
nAddress |= h_2 << 2; // a2
nAddress |= nSum << 3; // a3 - a6
nAddress |= v_0 << 7; // a7
nAddress |= v_1 << 8; // a8
nAddress |= v_2 << 9; // a9
WORD nAddressH = 0; // build address from video scanner equations (UTAIIe:5-8,T5.1)
nAddressH |= h_0 << 0; // a0
nAddressH |= h_1 << 1; // a1
nAddressH |= h_2 << 2; // a2
nAddressH |= nSum << 3; // a3 - a6
if (!bHires)
{
// Apple ][ (not //e) and HBL?
//
if (IS_APPLE2 && // Apple II only (UTAIIe:I-4,#5)
!h_5 && (!h_4 || !h_3)) // HBL (UTAIIe:8-10,F8.5)
{
nAddressH |= 1 << 12; // Y: a12 (add $1000 to address!)
}
}
int p2a = !(nPage2 && !n80Store);
int p2b = nPage2 && !n80Store;
WORD nAddressV = 0;
nAddressV |= v_0 << 7; // a7
nAddressV |= v_1 << 8; // a8
nAddressV |= v_2 << 9; // a9
if (nHires) // hires?
int p2a = !(bPage2 && !b80Store) ? 1 : 0;
int p2b = (bPage2 && !b80Store) ? 1 : 0;
WORD nAddressP = 0; // Page bits
if (bHires) // hires?
{
// Y: insert hires-only address bits
//
nAddress |= v_A << 10; // a10
nAddress |= v_B << 11; // a11
nAddress |= v_C << 12; // a12
nAddress |= p2a << 13; // a13
nAddress |= p2b << 14; // a14
nAddressV |= v_A << 10; // a10
nAddressV |= v_B << 11; // a11
nAddressV |= v_C << 12; // a12
nAddressP |= p2a << 13; // a13
nAddressP |= p2b << 14; // a14
}
else
{
// N: insert text-only address bits
//
nAddress |= p2a << 10; // a10
nAddress |= p2b << 11; // a11
// Apple ][ (not //e) and HBL?
//
if (IS_APPLE2 && // Apple II only (UTAIIe:I-4,#5)
!h_5 && (!h_4 || !h_3)) // HBL (UTAIIe:8-10,F8.5)
{
nAddress |= 1 << 12; // Y: a12 (add $1000 to address!)
}
}
// update VBL' state
//
if (pbVblBar_OUT != NULL)
{
*pbVblBar_OUT = !v_4 || !v_3; // VBL' = (v_4 & v_3)' (UTAIIe:5-10,#3)
nAddressP |= p2a << 10; // a10
nAddressP |= p2b << 11; // a11
}
return static_cast<WORD>(nAddress);
// VBL' = v_4' | v_3' = (v_4 & v_3)' (UTAIIe:5-10,#3)
if (videoScannerAddr == VS_PartialAddrH)
return nAddressH;
if (videoScannerAddr == VS_PartialAddrV)
return nAddressV;
return nAddressP | nAddressV | nAddressH;
}
//===========================================================================
@ -917,7 +881,7 @@ bool VideoGetVblBar(const DWORD uExecutedCycles)
int nCycles = CpuGetCyclesThisVideoFrame(uExecutedCycles);
// calculate video parameters according to display standard
const int kScanLines = bVideoScannerNTSC ? kNTSCScanLines : kPALScanLines;
const int kScanLines = g_bVideoScannerNTSC ? kNTSCScanLines : kPALScanLines;
const int kScanCycles = kScanLines * kHClocks;
nCycles %= kScanCycles;
@ -995,10 +959,20 @@ void Video_TakeScreenShot( const VideoScreenShot_e ScreenShotType )
g_nLastScreenShot++;
}
Video_SaveScreenShot( sScreenShotFileName, ScreenShotType );
Video_SaveScreenShot( ScreenShotType, sScreenShotFileName );
g_nLastScreenShot++;
}
void Video_RedrawAndTakeScreenShot( const char* pScreenshotFilename )
{
_ASSERT(pScreenshotFilename);
if (!pScreenshotFilename)
return;
VideoRedrawScreen();
Video_SaveScreenShot( SCREENSHOT_560x384, pScreenshotFilename );
}
WinBmpHeader_t g_tBmpHeader;
#if SCREENSHOT_TGA
@ -1157,7 +1131,7 @@ static void Video_MakeScreenShot(FILE *pFile, const VideoScreenShot_e ScreenShot
}
//===========================================================================
static void Video_SaveScreenShot( const char *pScreenShotFileName, const VideoScreenShot_e ScreenShotType )
static void Video_SaveScreenShot( const VideoScreenShot_e ScreenShotType, const char *pScreenShotFileName )
{
FILE *pFile = fopen( pScreenShotFileName, "wb" );
if( pFile )
@ -1172,26 +1146,158 @@ static void Video_SaveScreenShot( const char *pScreenShotFileName, const VideoSc
}
}
//===========================================================================
static const UINT kVideoRomSize8K = kVideoRomSize4K*2;
static const UINT kVideoRomSize16K = kVideoRomSize8K*2;
static const UINT kVideoRomSizeMax = kVideoRomSize16K;
static BYTE g_videoRom[kVideoRomSizeMax];
static UINT g_videoRomSize = 0;
static bool g_videoRomRockerSwitch = false;
bool ReadVideoRomFile(const char* pRomFile)
{
g_videoRomSize = 0;
HANDLE h = CreateFile(pRomFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL);
if (h == INVALID_HANDLE_VALUE)
return false;
const ULONG size = GetFileSize(h, NULL);
if (size == kVideoRomSize2K || size == kVideoRomSize4K || size == kVideoRomSize8K || size == kVideoRomSize16K)
{
DWORD bytesRead;
if (ReadFile(h, g_videoRom, size, &bytesRead, NULL) && bytesRead == size)
g_videoRomSize = size;
}
if (g_videoRomSize == kVideoRomSize16K)
{
// Use top 8K (assume bottom 8K is all 0xFF's)
memcpy(&g_videoRom[0], &g_videoRom[kVideoRomSize8K], kVideoRomSize8K);
g_videoRomSize = kVideoRomSize8K;
}
CloseHandle(h);
return g_videoRomSize != 0;
}
UINT GetVideoRom(const BYTE*& pVideoRom)
{
pVideoRom = &g_videoRom[0];
return g_videoRomSize;
}
bool GetVideoRomRockerSwitch(void)
{
return g_videoRomRockerSwitch;
}
void SetVideoRomRockerSwitch(bool state)
{
g_videoRomRockerSwitch = state;
}
bool IsVideoRom4K(void)
{
return g_videoRomSize <= kVideoRomSize4K;
}
//===========================================================================
enum VideoType127_e
{
VT127_MONO_CUSTOM
, VT127_COLOR_MONITOR_NTSC
, VT127_MONO_TV
, VT127_COLOR_TV
, VT127_MONO_AMBER
, VT127_MONO_GREEN
, VT127_MONO_WHITE
, VT127_NUM_VIDEO_MODES
};
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)
{
case VT127_MONO_CUSTOM: g_eVideoType = VT_MONO_CUSTOM; break;
case VT127_COLOR_MONITOR_NTSC: g_eVideoType = VT_COLOR_MONITOR_NTSC; break;
case VT127_MONO_TV: g_eVideoType = VT_MONO_TV; break;
case VT127_COLOR_TV: g_eVideoType = VT_COLOR_TV; break;
case VT127_MONO_AMBER: g_eVideoType = VT_MONO_AMBER; break;
case VT127_MONO_GREEN: g_eVideoType = VT_MONO_GREEN; break;
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)
g_eVideoType = VT_COLOR_MONITOR;
g_eVideoType = VT_DEFAULT;
}
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;
}
//===========================================================================
static void videoCreateDIBSection()
@ -1216,9 +1322,9 @@ static void videoCreateDIBSection()
);
SelectObject(g_hDeviceDC,g_hDeviceBitmap);
// CREATE THE OFFSET TABLE FOR EACH SCAN LINE IN THE FRAME BUFFER
// DRAW THE SOURCE IMAGE INTO THE SOURCE BIT BUFFER
ZeroMemory( g_pFramebufferbits, GetFrameBufferWidth()*GetFrameBufferHeight()*sizeof(bgra_t) );
// CREATE THE OFFSET TABLE FOR EACH SCAN LINE IN THE FRAME BUFFER
NTSC_VideoInit( g_pFramebufferbits );
}

View File

@ -7,24 +7,34 @@
enum VideoType_e
{
VT_MONO_CUSTOM
, VT_COLOR_MONITOR
, VT_MONO_TV
, VT_COLOR_MONITOR_RGB // Color rendering from AppleWin 1.25 (GH#357)
, VT_COLOR_MONITOR_NTSC
, VT_COLOR_TV
, VT_MONO_TV
, VT_MONO_AMBER
, VT_MONO_GREEN
, VT_MONO_WHITE
, NUM_VIDEO_MODES
, VT_DEFAULT = VT_COLOR_TV
};
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,
VF_DHIRES = 0x00000002,
VF_HIRES = 0x00000004,
VF_80STORE= 0x00000008, // was called VF_MASK2
VF_80STORE= 0x00000008,
VF_MIXED = 0x00000010,
VF_PAGE2 = 0x00000020,
VF_TEXT = 0x00000040
@ -61,6 +71,7 @@
#define PACKED // TODO: FIXME: gcc/clang __attribute__
#endif
// TODO: Replace with WinGDI.h / RGBQUAD
struct bgra_t
{
uint8_t b;
@ -153,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 _______________________________________________________
@ -167,9 +177,10 @@ void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInit = f
void VideoRedrawScreenAfterFullSpeed(DWORD dwCyclesThisFrame);
void VideoRedrawScreen (void);
void VideoRefreshScreen (uint32_t uRedrawWholeScreenVideoMode = 0, bool bRedrawWholeScreen = false);
void VideoReinitialize ();
void VideoReinitialize (bool bInitVideoScannerAddress = true);
void VideoResetState ();
WORD VideoGetScannerAddress(bool* pbVblBar_OUT, const DWORD uExecutedCycles);
enum VideoScanner_e {VS_FullAddr, VS_PartialAddrV, VS_PartialAddrH};
WORD VideoGetScannerAddress(DWORD nCycles, VideoScanner_e videoScannerAddr = VS_FullAddr);
bool VideoGetVblBar(DWORD uExecutedCycles);
bool VideoGetSW80COL(void);
@ -181,7 +192,6 @@ bool VideoGetSWPAGE2(void);
bool VideoGetSWTEXT(void);
bool VideoGetSWAltCharSet(void);
void VideoSetSnapshot_v1(const UINT AltCharSet, const UINT VideoMode);
void VideoSaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
void VideoLoadSnapshot(class YamlLoadHelper& yamlLoadHelper);
@ -194,14 +204,25 @@ enum VideoScreenShot_e
SCREENSHOT_560x384 = 0,
SCREENSHOT_280x192
};
void Video_TakeScreenShot( VideoScreenShot_e iScreenShotType );
void Video_TakeScreenShot( VideoScreenShot_e ScreenShotType );
void Video_RedrawAndTakeScreenShot( const char* pScreenshotFilename );
void Video_SetBitmapHeader( WinBmpHeader_t *pBmp, int nWidth, int nHeight, int nBitsPerPixel );
BYTE VideoSetMode(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles);
// Win32/MSVC: __stdcall
BYTE VideoCheckMode (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles);
BYTE VideoCheckVbl ( ULONG uExecutedCycles );
BYTE VideoSetMode (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles);
const UINT kVideoRomSize2K = 1024*2;
const UINT kVideoRomSize4K = kVideoRomSize2K*2;
bool ReadVideoRomFile(const char* pRomFile);
UINT GetVideoRom(const BYTE*& pVideoRom);
bool GetVideoRomRockerSwitch(void);
void SetVideoRomRockerSwitch(bool state);
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:

View File

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="crypt.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="ioapi.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="iowin32.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="mztools.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="unzip.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="zip.h">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ioapi.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="iowin32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mztools.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="unzip.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="zip.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More