Merge remote-tracking branch 'origin/master' into vs2013-and-gitignore

This commit is contained in:
tomcw 2014-08-20 22:00:09 +01:00
commit 598b04c025
77 changed files with 1096 additions and 585 deletions

View File

@ -48,6 +48,7 @@
<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" />
@ -58,7 +59,9 @@
<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_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" />
@ -91,7 +94,7 @@
<ClInclude Include="source\Tfe\Tfearch.h" />
<ClInclude Include="source\Tfe\Tfesupp.h" />
<ClInclude Include="source\Tfe\Uilib.h" />
<ClInclude Include="source\Util_MemoryTextFile.h" />
<ClInclude Include="source\Debugger\Util_MemoryTextFile.h" />
<ClInclude Include="source\Video.h" />
<ClInclude Include="source\z80emu.h" />
<ClInclude Include="source\Z80VICE\daa.h" />
@ -103,7 +106,7 @@
<Text Include="docs\CodingConventions.txt" />
<Text Include="docs\Debugger_Changelog.txt" />
<Text Include="docs\FAQ.txt" />
<Text Include="docs\History.txt" />
<Text Include="bin\History.txt" />
<Text Include="docs\ToDo.txt" />
<Text Include="docs\Video_Cleanup.txt" />
<Text Include="docs\Wishlist.txt" />
@ -184,7 +187,7 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="source\Util_MemoryTextFile.cpp" />
<ClCompile Include="source\Debugger\Util_MemoryTextFile.cpp" />
<ClCompile Include="source\Video.cpp" />
<ClCompile Include="source\z80emu.cpp" />
<ClCompile Include="source\Z80VICE\daa.cpp">

View File

@ -162,7 +162,7 @@
<ClInclude Include="source\Debugger\Debugger_Types.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Util_MemoryTextFile.h">
<ClInclude Include="source\Debugger\Util_MemoryTextFile.h">
<Filter>Source Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Disk.h">
@ -282,6 +282,15 @@
<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>
</ItemGroup>
<ItemGroup>
<Text Include="docs\CodingConventions.txt">
@ -293,7 +302,7 @@
<Text Include="docs\FAQ.txt">
<Filter>Docs</Filter>
</Text>
<Text Include="docs\History.txt">
<Text Include="bin\History.txt">
<Filter>Docs</Filter>
</Text>
<Text Include="docs\ToDo.txt">
@ -376,7 +385,7 @@
<ClCompile Include="source\Debugger\Debugger_Symbols.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Util_MemoryTextFile.cpp">
<ClCompile Include="source\Debugger\Util_MemoryTextFile.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Disk.cpp">

View File

@ -113,6 +113,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(MSBuildProjectDirectory)\ddraw_lib\x86;</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">
@ -161,6 +162,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(MSBuildProjectDirectory)\ddraw_lib\x86;</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@ -201,6 +203,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(MSBuildProjectDirectory)\ddraw_lib\x86;</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug NoDX|Win32'">
@ -241,6 +244,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(MSBuildProjectDirectory)\ddraw_lib\x86;</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
@ -267,7 +271,7 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NoDX|Win32'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="source\Util_MemoryTextFile.cpp" />
<ClCompile Include="source\Debugger\Util_MemoryTextFile.cpp" />
<ClCompile Include="source\Tfe\Tfe.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
@ -387,7 +391,7 @@
<ClInclude Include="source\Debugger\Debugger_Range.h" />
<ClInclude Include="source\Debugger\Debugger_Symbols.h" />
<ClInclude Include="source\Debugger\Debugger_Types.h" />
<ClInclude Include="source\Util_MemoryTextFile.h" />
<ClInclude Include="source\Debugger\Util_MemoryTextFile.h" />
<ClInclude Include="source\Tfe\Bittypes.h" />
<ClInclude Include="source\Tfe\Bpf.h" />
<ClInclude Include="source\Tfe\Ip6_misc.h" />
@ -461,7 +465,7 @@
<None Include="docs\CodingConventions.txt" />
<None Include="docs\Debugger_Changelog.txt" />
<None Include="docs\FAQ.txt" />
<None Include="docs\History.txt" />
<None Include="bin\History.txt" />
<None Include="docs\ToDo.txt" />
<None Include="docs\Video_Cleanup.txt" />
<None Include="docs\Wishlist.txt" />

View File

@ -80,7 +80,7 @@
<ClCompile Include="source\Debugger\Debugger_Symbols.cpp">
<Filter>Source\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Util_MemoryTextFile.cpp">
<ClCompile Include="source\Debugger\Util_MemoryTextFile.cpp">
<Filter>Source\Debugger</Filter>
</ClCompile>
<ClCompile Include="source\Tfe\Tfe.cpp">
@ -250,7 +250,7 @@
<ClInclude Include="source\Debugger\Debugger_Types.h">
<Filter>Source\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Util_MemoryTextFile.h">
<ClInclude Include="source\Debugger\Util_MemoryTextFile.h">
<Filter>Source\Debugger</Filter>
</ClInclude>
<ClInclude Include="source\Tfe\Bittypes.h">
@ -468,7 +468,7 @@
<None Include="docs\FAQ.txt">
<Filter>Docs</Filter>
</None>
<None Include="docs\History.txt">
<None Include="bin\History.txt">
<Filter>Docs</Filter>
</None>
<None Include="docs\ToDo.txt">

View File

@ -401,11 +401,11 @@
>
</File>
<File
RelativePath=".\source\Util_MemoryTextFile.cpp"
RelativePath=".\source\Debugger\Util_MemoryTextFile.cpp"
>
</File>
<File
RelativePath=".\source\Util_MemoryTextFile.h"
RelativePath=".\source\Debugger\Util_MemoryTextFile.h"
>
</File>
<File
@ -777,7 +777,7 @@
>
</File>
<File
RelativePath=".\docs\History.txt"
RelativePath=".\bin\History.txt"
>
</File>
<File

View File

@ -266,6 +266,10 @@
RelativePath=".\source\Debugger\Debug.h"
>
</File>
<File
RelativePath=".\source\Debugger\DebugDefs.h"
>
</File>
<File
RelativePath=".\source\Debugger\Debugger_Assembler.cpp"
>
@ -347,11 +351,15 @@
>
</File>
<File
RelativePath=".\source\Util_MemoryTextFile.cpp"
RelativePath=".\source\Debugger\Util_MemoryTextFile.cpp"
>
</File>
<File
RelativePath=".\source\Util_MemoryTextFile.h"
RelativePath=".\source\Debugger\Util_MemoryTextFile.h"
>
</File>
<File
RelativePath=".\source\Debugger\Util_Text.h"
>
</File>
</Filter>
@ -798,6 +806,10 @@
RelativePath=".\source\Disk.h"
>
</File>
<File
RelativePath=".\source\DiskDefs.h"
>
</File>
<File
RelativePath=".\source\DiskImage.cpp"
>
@ -952,7 +964,7 @@
>
</File>
<File
RelativePath=".\docs\History.txt"
RelativePath=".\bin\History.txt"
>
</File>
<File

View File

@ -7,16 +7,12 @@ Bug reports and feature requests should be submitted here:
https://github.com/AppleWin/AppleWin/issues/new
Tom Charlesworth
tomch at users.berlios.de
Restrictions/bugs:
- SSI263 emulation is very basic: there is no attempt to emulate rate, inflection or filters.
- During Mockingboard playback, Speaker emulation isn't precise
In Development:
---------------
Changes:
. Changed the AppleWin project host from BerliOS to GitHub.
. Added command line switch to specify the type of memory initialization pattern.
-memclear #
Where # ranges from 0 to 7.
@ -31,8 +27,18 @@ Changes:
(current memory address low byte)
-memclear 7 Initialize memory to page address
(current memory address high byte)
Fixed:
. [Bug #206] Pooyan freezes due to RNDL/RNDH not initialized to non-zero values
. [Feature #198] Alt-Return toggles full screen.
. [Feature #199] Added the option to skip the reboot confirmation in the configuration.
. [Feature #201] Added display of current Track/Sector for the floppy drives.
- In 2x window mode the status is displayed below the drive LEDs.
- In full screen mode the status is displayed above the drive LEDS. The track/sector
is shown only for the last drive accessed.
Note: DOS3.3 Track/Sector status should be accurate.
ProDOS support is preliminary -- the track/sector may show zero after an operation.
Fixes:
. [Bug #206] Pooyan would freeze due to RNDL/RNDH not initialized to non-zero values on
a cold boot.
. [Bug #177] Full-screen under Windows8/8.1 would show a corrupt, pastelle color palette.
Latest:
@ -45,7 +51,7 @@ Changes:
. Support cursor keys (in addition to numpad) when using keyboard for joystick emulation
. Support auto-fire for all 3 joystick buttons (via Config->Input)
. Debugger: Added "disk info" command
. [Feature #5668] Added confirmation message box for reboot (F2)
. Added confirmation message box for reboot (F2)
. [Feature #5715] Added -no-printscreen-dlg to suppress the warning if AppleWin fails to capture the PrintScreen key
. Changed save-state file persisted to Registry from filename to pathame
Fixes:
@ -56,7 +62,7 @@ Fixes:
1.23.2 - 14 Sep 2013
--------------------
Changes:
. [Feature #5105] Added About dialog showing GPL (at startup, but only when AppleWin version changes).
. Added About dialog showing GPL (at startup, but only when AppleWin version changes).
. [Bug #18940] Extend BSAVE and BLOAD Command To Memory Banks 0 and 1
Extended debugger BLOAD with bank support:
. BLOAD [file],[bank:]address[,length]
@ -262,7 +268,7 @@ Fixes:
. [Bug #14879] Double-Lo-Res Graphics colors not correct
1.16.1 - 20 Jun 2009
1.16.1 - 21 Jun 2009
--------------------
Changes:
. Ctrl-F2 now functions as CONTROL-RESET (same as Ctrl-Break)

View File

@ -3,6 +3,12 @@ To-do list (Tom)
This is a (non-exhaustive) list of stuff that I personally would like to get done:
(14/8/2014) Having moved all non-system headers out of stdafx.h, it looks like
many headers are included just to call Init() or Reset() methods for Apple II sub-systems.
Cut down on the headers by:
- Using the Visitor pattern (for all Apple II sub-systems)?
- Or just a vector which contains all sub-system Reset() methods?
. Consolidate the Spkr_SubmitWaveBuffer() & Spkr_SubmitWaveBuffer_FullSpeed() funcs.
This will make the code cleaner & simpler.
@ -20,21 +26,16 @@ So that the sound is continuous when dragging the window or starting other appli
. Fix SSI263 so that phonemes are overlapped (like Votrax).
. Support for zipped disk images (r/w) & harddisk images (read-only, but maybe write too?)
. Save-state supporting Phasor, harddisk & Ramworks III
. [NICK] Floating-bus support (using Nick Westgate's code)
For Drol, Lock'n'Chase, TetrisII, etc
. Support for switching display modes mid-frame
To support Bob Bishop's intros
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
. The arrays ioread[] & iowrite[] in Memory.cpp should be switched from units of 1 byte to 16 bytes.
. [DONE] 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
b) $CFFF (ROMs out) can be emulated

View File

@ -90,6 +90,7 @@ 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
GROUPBOX "Video",IDC_STATIC,5,22,200,43
LTEXT "Mo&de:",IDC_STATIC,12,33,33,8
COMBOBOX IDC_VIDEOTYPE,45,30,95,100,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP

View File

@ -46,6 +46,7 @@
#define IDR_MENU_DISK_POPUP 143
#define IDR_MENU_DISK_CFG_POPUP 144
#define IDD_ABOUT 145
#define IDC_CHECK_CONFIRM_REBOOT 146
#define IDC_KEYB_BUFFER_ENABLE 1005
#define IDC_SAVESTATE 1006
#define IDC_SAVESTATE_ON_EXIT 1007
@ -121,7 +122,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 146
#define _APS_NEXT_RESOURCE_VALUE 147
#define _APS_NEXT_COMMAND_VALUE 40012
#define _APS_NEXT_CONTROL_VALUE 1069
#define _APS_NEXT_SYMED_VALUE 101

View File

@ -28,7 +28,6 @@
#include "StdAfx.h"
#include "6821.h"
#define PIA_W_CALLBACK(st, val) \

View File

@ -26,14 +26,11 @@
#include "StdAfx.h"
#include <windows.h>
#include <stdio.h>
#include <crtdbg.h>
#include "AY8910.h"
#include "Common.h"
#include "Structs.h"
#include "Applewin.h" // For g_fh
#include "Mockingboard.h" // For g_uTimer1IrqCount

View File

@ -27,13 +27,30 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
#include "DiskImage.h"
#include "Harddisk.h"
#include "AppleWin.h"
#include "CPU.h"
#include "Debug.h"
#include "Disk.h"
#include "DiskImage.h"
#include "Frame.h"
#include "Harddisk.h"
#include "Log.h"
#include "Memory.h"
#include "Mockingboard.h"
#include "MouseInterface.h"
#include "ParallelPrinter.h"
#include "Registry.h"
#include "Riff.h"
#include "SaveState.h"
#include "SerialComms.h"
#include "SoundCore.h"
#include "Speaker.h"
#ifdef USE_SPEECH_API
#include "Speech.h"
#endif
#include "Video.h"
#include "Configuration\About.h"
#include "Configuration\PropertySheet.h"
#include "Tfe\Tfe.h"
@ -594,6 +611,9 @@ void LoadConfiguration(void)
if (REGLOAD(TEXT(REGVALUE_WINDOW_SCALE), &dwTmp))
SetViewportScale(dwTmp);
if (REGLOAD(TEXT(REGVALUE_CONFIRM_REBOOT), &dwTmp))
g_bConfirmReboot = dwTmp;
}
//===========================================================================
@ -747,7 +767,7 @@ LPSTR GetNextArg(LPSTR lpCmdLine)
static int DoDiskInsert(const int nDrive, LPCSTR szFileName)
{
string strPathName;
std::string strPathName;
if (szFileName[0] == '\\' || szFileName[1] == ':')
{

View File

@ -1,5 +1,8 @@
#pragma once
#include "Structs.h"
#include "Common.h"
void SetCurrentCLK6502();
void SetCurrentImageDir(const char* pszImageDir);

View File

@ -85,15 +85,24 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "AppleWin.h"
#include "CPU.h"
#include "Frame.h"
#include "Memory.h"
#include "Mockingboard.h"
#include "MouseInterface.h"
#ifdef USE_SPEECH_API
#include "Speech.h"
#endif
#include "Video.h"
#include "z80emu.h"
#include "Z80VICE\z80.h"
#include "Z80VICE\z80mem.h"
#ifdef USE_SPEECH_API
#include "Speech.h"
#endif
#include "Debugger\Debug.h"
#define AF_SIGN 0x80
#define AF_OVERFLOW 0x40

View File

@ -1,7 +1,5 @@
#pragma once
#define USE_SPEECH_API
const double _M14 = (157500000.0 / 11.0); // 14.3181818... * 10^6
const double CLK_6502 = ((_M14 * 65.0) / 912.0); // 65 cycles per 912 14M clocks
//const double CLK_6502 = 23 * 44100; // 1014300
@ -39,10 +37,11 @@ enum AppMode_e
#define SPEED_NORMAL 10
#define SPEED_MAX 40
#define DRAW_BACKGROUND 1
#define DRAW_LEDS 2
#define DRAW_TITLE 4
#define DRAW_BUTTON_DRIVES 8
#define DRAW_BACKGROUND (1 << 0)
#define DRAW_LEDS (1 << 1)
#define DRAW_TITLE (1 << 2)
#define DRAW_BUTTON_DRIVES (1 << 3)
#define DRAW_DISK_STATUS (1 << 4)
#define BTN_HELP 0
#define BTN_RUN 1
@ -67,13 +66,11 @@ enum AppMode_e
#define TITLE_PAUSED TEXT("* PAUSED *")
#define TITLE_STEPPING TEXT("Stepping")
#define REGLOAD(a,b) RegLoadValue(TEXT(REG_CONFIG),a,1,b)
#define REGSAVE(a,b) RegSaveValue(TEXT(REG_CONFIG),a,1,b)
// Configuration
#define REG_CONFIG "Configuration"
#define REGVALUE_APPLE2_TYPE "Apple2 Type"
#define REGVALUE_OLD_APPLE2_TYPE "Computer Emulation" // Deprecated
#define REGVALUE_OLD_APPLE2_TYPE "Computer Emulation" // Deprecated
#define REGVALUE_CONFIRM_REBOOT "Confirm Reboot" // Added at 1.24.1 PageConfig
#define REGVALUE_SPKR_VOLUME "Speaker Volume"
#define REGVALUE_MB_VOLUME "Mockingboard Volume"
#define REGVALUE_SAVESTATE_FILENAME "Save State Filename"

View File

@ -1,4 +1,30 @@
/*
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-2014, 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
*/
#include "stdafx.h"
#include "..\AppleWin.h"
#include "..\Frame.h"
#include "..\resource\resource.h"
static const char g_szGPL[] =

View File

@ -1,6 +1,8 @@
#pragma once
#include "..\HardDisk.h"
#include "..\AppleWin.h"
#include "..\Disk.h" // BOOL enhancedisk
#include "..\HardDisk.h" // HD_CardIsEnabled()
class CConfigNeedingRestart
{

View File

@ -1,7 +1,36 @@
/*
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-2014, 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
*/
#include "StdAfx.h"
#include "..\Structs.h"
#include "..\Common.h"
#include "..\ParallelPrinter.h"
#include "..\Registry.h"
#include "..\SaveState.h"
#include "..\resource\resource.h"
#include "PageAdvanced.h"
#include "PropertySheetHelper.h"
#include "..\resource\resource.h"
CPageAdvanced* CPageAdvanced::ms_this = 0; // reinit'd in ctor
@ -61,7 +90,7 @@ BOOL CPageAdvanced::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPAR
break;
case IDC_PRINTER_DUMP_FILENAME_BROWSE:
{
string strPrinterDumpLoc = m_PropertySheetHelper.BrowseToFile(hWnd, TEXT("Select printer dump file"), REGVALUE_PRINTER_FILENAME, TEXT("Text files (*.txt)\0*.txt\0") TEXT("All Files\0*.*\0"));
std::string strPrinterDumpLoc = m_PropertySheetHelper.BrowseToFile(hWnd, TEXT("Select printer dump file"), REGVALUE_PRINTER_FILENAME, TEXT("Text files (*.txt)\0*.txt\0") TEXT("All Files\0*.*\0"));
SendDlgItemMessage(hWnd, IDC_PRINTER_DUMP_FILENAME, WM_SETTEXT, 0, (LPARAM)strPrinterDumpLoc.c_str());
}
break;

View File

@ -1,7 +1,36 @@
/*
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-2014, 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
*/
#include "StdAfx.h"
#include "..\AppleWin.h"
#include "..\Frame.h"
#include "..\Registry.h"
#include "..\SerialComms.h"
#include "..\Video.h"
#include "..\resource\resource.h"
#include "PageConfig.h"
#include "PropertySheetHelper.h"
#include "..\resource\resource.h"
CPageConfig* CPageConfig::ms_this = 0; // reinit'd in ctor
@ -88,6 +117,9 @@ BOOL CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
VideoChooseColor();
break;
case IDC_CHECK_CONFIRM_REBOOT:
g_bConfirmReboot = IsDlgButtonChecked(hWnd, IDC_CHECK_CONFIRM_REBOOT) ? 1 : 0;
case IDC_CHECK_HALF_SCAN_LINES:
g_uHalfScanLines = IsDlgButtonChecked(hWnd, IDC_CHECK_HALF_SCAN_LINES) ? 1 : 0;
@ -140,6 +172,8 @@ BOOL CPageConfig::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM
m_PropertySheetHelper.FillComboBox(hWnd, IDC_COMPUTER, m_ComputerChoices, nCurrentChoice);
}
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);
@ -207,6 +241,8 @@ void CPageConfig::DlgOK(HWND hWnd)
}
}
REGSAVE(TEXT(REGVALUE_CONFIRM_REBOOT), g_bConfirmReboot);
const DWORD newserialport = (DWORD) SendDlgItemMessage(hWnd, IDC_SERIALPORT, CB_GETCURSEL, 0, 0);
sg_SSC.CommSetSerialPort(hWnd, newserialport);
RegSaveString( TEXT(REG_CONFIG),

View File

@ -1,8 +1,34 @@
/*
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-2014, 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
*/
#include "StdAfx.h"
#include "PageConfigTfe.h"
#include "..\Common.h"
#include "..\Registry.h"
#include "..\resource\resource.h"
#include "..\Tfe\Tfe.h"
#include "..\Tfe\Tfesupp.h"
#include "PageConfigTfe.h"
CPageConfigTfe* CPageConfigTfe::ms_this = 0; // reinit'd in ctor

View File

@ -1,8 +1,34 @@
/*
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-2014, 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
*/
#include "StdAfx.h"
#include "..\AppleWin.h"
#include "..\Frame.h"
#include "..\Registry.h"
#include "..\resource\resource.h"
#include "PageDisk.h"
#include "PropertySheetHelper.h"
#include "..\Harddisk.h"
#include "..\resource\resource.h"
CPageDisk* CPageDisk::ms_this = 0; // reinit'd in ctor
@ -86,7 +112,7 @@ BOOL CPageDisk::DlgProcInternal(HWND hWnd, UINT message, WPARAM wparam, LPARAM l
case IDC_CIDERPRESS_BROWSE:
{
string CiderPressLoc = m_PropertySheetHelper.BrowseToFile(hWnd, TEXT("Select path to CiderPress"), REGVALUE_CIDERPRESSLOC, TEXT("Applications (*.exe)\0*.exe\0") TEXT("All Files\0*.*\0") );
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") );
RegSaveString(TEXT(REG_CONFIG), REGVALUE_CIDERPRESSLOC, 1, CiderPressLoc.c_str());
SendDlgItemMessage(hWnd, IDC_CIDERPRESS_FILENAME, WM_SETTEXT, 0, (LPARAM) CiderPressLoc.c_str());
}

View File

@ -1,7 +1,35 @@
/*
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-2014, 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
*/
#include "StdAfx.h"
#include "..\Structs.h"
#include "..\Common.h"
#include "..\Keyboard.h"
#include "..\Registry.h"
#include "..\resource\resource.h"
#include "PageInput.h"
#include "PropertySheetHelper.h"
#include "..\resource\resource.h"
CPageInput* CPageInput::ms_this = 0; // reinit'd in ctor

View File

@ -1,7 +1,36 @@
/*
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-2014, 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
*/
#include "StdAfx.h"
#include "..\Structs.h"
#include "..\Common.h"
#include "..\Mockingboard.h"
#include "..\Registry.h"
#include "..\Speaker.h"
#include "..\resource\resource.h"
#include "PageSound.h"
#include "PropertySheetHelper.h"
#include "..\resource\resource.h"
CPageSound* CPageSound::ms_this = 0; // reinit'd in ctor

View File

@ -28,8 +28,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
#include "PropertySheet.h"
#include "..\AppleWin.h"
#include "..\Frame.h"
#include "..\resource\resource.h"
#include "PropertySheet.h"
void CPropertySheet::Init(void)
{

View File

@ -22,9 +22,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "stdafx.h"
#include "PropertySheetHelper.h"
#include "..\AppleWin.h" // g_nAppMode, g_uScrollLockToggle, sg_PropertySheet
#include "..\Disk.h"
#include "..\Frame.h"
#include "..\Registry.h"
#include "..\SaveState.h"
#include "IPropertySheet.h"
#include "PropertySheetHelper.h"
/*
Config causing AfterClose msgs:
@ -114,7 +119,7 @@ void CPropertySheetHelper::SetSlot5(SS_CARDTYPE NewCardType)
// Used by:
// . CPageDisk: IDC_CIDERPRESS_BROWSE
// . CPageAdvanced: IDC_PRINTER_DUMP_FILENAME_BROWSE
string CPropertySheetHelper::BrowseToFile(HWND hWindow, TCHAR* pszTitle, TCHAR* REGVALUE, TCHAR* FILEMASKS)
std::string CPropertySheetHelper::BrowseToFile(HWND hWindow, TCHAR* pszTitle, TCHAR* REGVALUE, TCHAR* FILEMASKS)
{
static char PathToFile[MAX_PATH] = {0}; //This is a really awkward way to prevent mixing CiderPress and SaveStated values (RAPCS), but it seem the quickest. Here is its Line 1.
strcpy(PathToFile, Snapshot_GetFilename()); //RAPCS, line 2.
@ -122,7 +127,7 @@ string CPropertySheetHelper::BrowseToFile(HWND hWindow, TCHAR* pszTitle, TCHAR*
TCHAR szFilename[MAX_PATH];
strcpy(szFilename, "");
RegLoadString(TEXT("Configuration"), REGVALUE, 1, szFilename ,MAX_PATH);
string PathName = szFilename;
std::string PathName = szFilename;
OPENFILENAME ofn;
ZeroMemory(&ofn,sizeof(OPENFILENAME));

View File

@ -16,7 +16,7 @@ public:
void FillComboBox(HWND window, int controlid, LPCTSTR choices, int currentchoice);
void SetSlot4(SS_CARDTYPE NewCardType);
void SetSlot5(SS_CARDTYPE NewCardType);
string BrowseToFile(HWND hWindow, TCHAR* pszTitle, TCHAR* REGVALUE,TCHAR* FILEMASKS);
std::string BrowseToFile(HWND hWindow, TCHAR* pszTitle, TCHAR* REGVALUE,TCHAR* FILEMASKS);
void SaveStateUpdate();
void GetDiskBaseNameWithAWS(TCHAR* pszFilename);
int SaveStateSelectImage(HWND hWindow, TCHAR* pszTitle, bool bSave);

View File

@ -30,7 +30,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//#pragma warning(disable: 4786)
#include "StdAfx.h"
#include "debugger_display.h" // dup from stdafx.h, but CPP analysis isn't picking up APPLE_FONT_NEW
#include "Debug.h"
#include "DebugDefs.h"
#include "..\AppleWin.h"
#include "..\CPU.h"
#include "..\Disk.h"
#include "..\Frame.h"
#include "..\Keyboard.h"
#include "..\Memory.h"
#include "..\Video.h"
// #define DEBUG_COMMAND_HELP 1
// #define DEBUG_ASM_HASH 1
@ -46,7 +56,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
bool g_bDebuggerEatKey = false;
// Bookmarks __________________________________________________________________
// vector<int> g_aBookmarks;
int g_nBookmarks = 0;
Bookmark_t g_aBookmarks[ MAX_BOOKMARKS ];
@ -116,8 +125,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
int g_iCommand; // last command (enum) // used for consecutive commands
vector<int> g_vPotentialCommands; // global, since TAB-completion also needs
vector<Command_t> g_vSortedCommands;
std::vector<int> g_vPotentialCommands; // global, since TAB-completion also needs
std::vector<Command_t> g_vSortedCommands;
// static const char g_aFlagNames[_6502_NUM_FLAGS+1] = TEXT("CZIDBRVN");// Reversed since arrays are from left-to-right
@ -202,15 +211,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Memory _____________________________________________________________________
const int _6502_BRANCH_POS = +127;
const int _6502_BRANCH_NEG = -128;
const unsigned int _6502_ZEROPAGE_END = 0x00FF;
const unsigned int _6502_STACK_END = 0x01FF;
const unsigned int _6502_IO_BEGIN = 0xC000;
const unsigned int _6502_IO_END = 0xC0FF;
const unsigned int _6502_MEM_BEGIN = 0x0000;
const unsigned int _6502_MEM_END = 0xFFFF;
MemoryDump_t g_aMemDump[ NUM_MEM_DUMPS ];
// Made global so operator @# can be used with other commands.
@ -1614,7 +1614,7 @@ void _BWZ_ListAll( const Breakpoint_t * aBreakWatchZero, const int nMax )
Update_t CmdBreakpointList (int nArgs)
{
// ConsoleBufferPush( );
// vector<int> vBreakpoints;
// std::vector<int> vBreakpoints;
// int iBreakpoint = MAX_BREAKPOINTS;
// while (iBreakpoint--)
// {
@ -1623,7 +1623,7 @@ Update_t CmdBreakpointList (int nArgs)
// vBreakpoints.push_back( g_aBreakpoints[iBreakpoint].address );
// }
// }
// sort( vBreakpoints.begin(), vBreakpoints.end() );
// std::sort( vBreakpoints.begin(), vBreakpoints.end() );
// iBreakpoint = vBreakPoints.size();
if (! g_nBreakpoints)
@ -3193,7 +3193,7 @@ Update_t CmdCursorLineUp (int nArgs)
const int MAX_LOOK_AHEAD = g_nDisasmWinHeight;
static vector<LookAhead_t> aTopCandidates;
static std::vector<LookAhead_t> aTopCandidates;
LookAhead_t tCandidate;
// if (! aBestTop.capacity() )
@ -5255,9 +5255,7 @@ Update_t CmdOutputPrintf (int nArgs)
TCHAR sText[ CONSOLE_WIDTH ] = TEXT("");
// vector<PrintFormat_t> aValues;
// PrintFormat_t entry;
vector<Arg_t> aValues;
std::vector<Arg_t> aValues;
Arg_t entry;
int iValue = 0;
int nValue = 0;
@ -6714,7 +6712,7 @@ int FindCommand( LPTSTR pName, CmdFuncPtr_t & pFunction_, int * iCommand_ )
g_iCommand = g_aCommands[iCommand].iCommand;
// Don't push the same comamnd/alias if already on the list
if (find( g_vPotentialCommands.begin(), g_vPotentialCommands.end(), g_iCommand) == g_vPotentialCommands.end())
if (std::find( g_vPotentialCommands.begin(), g_vPotentialCommands.end(), g_iCommand) == g_vPotentialCommands.end())
{
nFound++;
g_vPotentialCommands.push_back( g_iCommand );
@ -7194,12 +7192,12 @@ void ProfileFormat( bool bExport, ProfileFormat_e eFormatMode )
bool bOpcodeGood = true;
bool bOpmodeGood = true;
vector< ProfileOpcode_t > vProfileOpcode( &g_aProfileOpcodes[0], &g_aProfileOpcodes[ NUM_OPCODES ] );
vector< ProfileOpmode_t > vProfileOpmode( &g_aProfileOpmodes[0], &g_aProfileOpmodes[ NUM_OPMODES ] );
std::vector< ProfileOpcode_t > vProfileOpcode( &g_aProfileOpcodes[0], &g_aProfileOpcodes[ NUM_OPCODES ] );
std::vector< ProfileOpmode_t > vProfileOpmode( &g_aProfileOpmodes[0], &g_aProfileOpmodes[ NUM_OPMODES ] );
// sort >
sort( vProfileOpcode.begin(), vProfileOpcode.end(), ProfileOpcode_t() );
sort( vProfileOpmode.begin(), vProfileOpmode.end(), ProfileOpmode_t() );
std::sort( vProfileOpcode.begin(), vProfileOpcode.end(), ProfileOpcode_t() );
std::sort( vProfileOpmode.begin(), vProfileOpmode.end(), ProfileOpmode_t() );
Profile_t nOpcodeTotal = 0;
Profile_t nOpmodeTotal = 0;

View File

@ -1,9 +1,7 @@
#pragma once
#include <vector>
#include <algorithm> // sort, find
#include <map>
using namespace std;
#include "..\Structs.h"
#include "..\Common.h"
#include "Debugger_Types.h"
#include "Debugger_DisassemblerData.h"
@ -27,7 +25,6 @@ using namespace std;
// Bookmarks
extern int g_nBookmarks;
extern Bookmark_t g_aBookmarks[ MAX_BOOKMARKS ];
// extern vector<int> g_aBookmarks;
// Breakpoints
enum BreakpointHit_t
@ -118,7 +115,7 @@ using namespace std;
extern MemoryDump_t g_aMemDump[ NUM_MEM_DUMPS ];
// extern MemorySearchArray_t g_vMemSearchMatches;
extern vector<int> g_vMemorySearchResults;
extern std::vector<int> g_vMemorySearchResults;
// Source Level Debugging
extern TCHAR g_aSourceFileName[ MAX_PATH ];

View File

@ -0,0 +1,10 @@
#pragma once
const int _6502_BRANCH_POS = +127;
const int _6502_BRANCH_NEG = -128;
const unsigned int _6502_ZEROPAGE_END = 0x00FF;
const unsigned int _6502_STACK_END = 0x01FF;
const unsigned int _6502_IO_BEGIN = 0xC000;
const unsigned int _6502_IO_END = 0xC0FF;
const unsigned int _6502_MEM_BEGIN = 0x0000;
const unsigned int _6502_MEM_END = 0xFFFF;

View File

@ -28,6 +28,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "Debug.h"
#include "..\CPU.h"
#include "..\Frame.h"
#include "..\Memory.h"
#define DEBUG_ASSEMBLER 0
// Globals __________________________________________________________________
@ -69,7 +75,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Disassembler Data _____________________________________________________________________________
vector<DisasmData_t> g_aDisassemblerData;
std::vector<DisasmData_t> g_aDisassemblerData;
// Instructions / Opcodes _________________________________________________________________________
@ -395,7 +401,7 @@ Fx BEQ r SBC (d),Y sbc (d) --- --- SBC d,X INC d,X --- SED SBC a,Y
};
int m_bAsmFlags;
vector<int> m_vAsmOpcodes;
std::vector<int> m_vAsmOpcodes;
int m_iAsmAddressMode = AM_IMPLIED;
struct DelayedTarget_t
@ -406,7 +412,7 @@ Fx BEQ r SBC (d),Y sbc (d) --- --- SBC d,X INC d,X --- SED SBC a,Y
int m_iOpmode ; // AddressingMode_e
};
vector <DelayedTarget_t> m_vDelayedTargets;
std::vector <DelayedTarget_t> m_vDelayedTargets;
bool m_bDelayedTargetsDirty = false;
int m_nAsmBytes = 0;
@ -880,7 +886,7 @@ void AssemblerStartup()
void _CmdAssembleHashDump ()
{
// #if DEBUG_ASM_HASH
vector<HashOpcode_t> vHashes;
std::vector<HashOpcode_t> vHashes;
HashOpcode_t tHash;
TCHAR sText[ CONSOLE_WIDTH ];
@ -892,7 +898,7 @@ void _CmdAssembleHashDump ()
vHashes.push_back( tHash );
}
sort( vHashes.begin(), vHashes.end(), HashOpcode_t() );
std::sort( vHashes.begin(), vHashes.end(), HashOpcode_t() );
Hash_t nPrevHash = vHashes.at( 0 ).m_nValue;
Hash_t nThisHash = 0;
@ -1343,7 +1349,7 @@ void AssemblerProcessDelayedSymols()
{
bModified = false;
vector<DelayedTarget_t>::iterator iSymbol;
std::vector<DelayedTarget_t>::iterator iSymbol;
for( iSymbol = m_vDelayedTargets.begin(); iSymbol != m_vDelayedTargets.end(); ++iSymbol )
{
DelayedTarget_t *pTarget = & (*iSymbol); // m_vDelayedTargets.at( iSymbol );

View File

@ -201,7 +201,7 @@ extern int g_aAssemblerFirstDirective[ NUM_ASSEMBLERS ];
bool _6502_IsOpcodeValid( int nOpcode );
int AssemblerHashMnemonic ( const TCHAR * pMnemonic );
// bool AssemblerGetAddressingMode ( int iArg, int nArgs, WORD nAddress, vector<int> & vOpcodes );
// bool AssemblerGetAddressingMode ( int iArg, int nArgs, WORD nAddress, std::vector<int> & vOpcodes );
void _CmdAssembleHashDump ();
int AssemblerDelayedTargetsSize();

View File

@ -25,6 +25,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "Debug.h"
// Color ______________________________________________________________________
int g_iColorScheme = SCHEME_COLOR;

View File

@ -25,6 +25,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "Debug.h"
#include "..\Frame.h"
// Commands _______________________________________________________________________________________
#define DEBUGGER__COMMANDS_VERIFY_TXT__ "\xDE\xAD\xC0\xDE"

View File

@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "Debug.h"
// Console ________________________________________________________________________________________
@ -49,7 +50,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Buffer
bool g_bConsoleBufferPaused = false; // buffered output is waiting for user to continue
int g_nConsoleBuffer = 0;
conchar_t g_aConsoleBuffer[ CONSOLE_BUFFER_HEIGHT ][ CONSOLE_WIDTH ]; // TODO: stl::vector< line_t >
conchar_t g_aConsoleBuffer[ CONSOLE_BUFFER_HEIGHT ][ CONSOLE_WIDTH ]; // TODO: std::vector< line_t >
// Cursor
char g_sConsoleCursor[] = "_";

View File

@ -189,7 +189,7 @@
// Buffer
extern bool g_bConsoleBufferPaused;
extern int g_nConsoleBuffer;
extern conchar_t g_aConsoleBuffer[ CONSOLE_BUFFER_HEIGHT ][ CONSOLE_WIDTH ]; // TODO: stl::vector< line_t >
extern conchar_t g_aConsoleBuffer[ CONSOLE_BUFFER_HEIGHT ][ CONSOLE_WIDTH ]; // TODO: std::vector< line_t >
// Cursor
extern char g_sConsoleCursor[];

View File

@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "Debug.h"
// Disassembler Data ______________________________________________________________________________

View File

@ -14,6 +14,6 @@
void Disassembly_DelData( DisasmData_t tData);
DisasmData_t* Disassembly_Enumerate( DisasmData_t *pCurrent = NULL );
extern vector<DisasmData_t> g_aDisassemblerData;
extern std::vector<DisasmData_t> g_aDisassemblerData;
#endif

View File

@ -27,7 +27,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
#include "debugger_display.h" // dup from stdafx.h, but CPP analysis isn't picking up USE_APPLE_FONT
#include "Debug.h"
#include "Debugger_Display.h"
#include "..\AppleWin.h"
#include "..\CPU.h"
#include "..\Frame.h"
#include "..\Memory.h"
#include "..\Mockingboard.h"
#include "..\Video.h"
// NEW UI debugging - force display ALL meta-info (regs, stack, bp, watches, zp) for debugging purposes
#define DEBUG_FORCE_DISPLAY 0

View File

@ -28,6 +28,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "Debug.h"
#include "..\AppleWin.h"
#define DEBUG_COLOR_CONSOLE 0
@ -1435,7 +1439,7 @@ Update_t CmdHelpList (int nArgs)
int nMaxWidth = g_nConsoleDisplayWidth - 1;
int iCommand;
extern vector<Command_t> g_vSortedCommands;
extern std::vector<Command_t> g_vSortedCommands;
if (! g_vSortedCommands.size())
{

View File

@ -28,6 +28,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "Debug.h"
#include "..\CPU.h"
#include "..\Memory.h"
// Args ___________________________________________________________________________________________
@ -954,155 +958,3 @@ int RemoveWhiteSpaceReverse ( TCHAR *pSrc )
}
return nLen;
}
//===========================================================================
/*
inline
const TCHAR* SkipEOL ( const TCHAR *pSrc )
{
while (pSrc && ((*pSrc == CHAR_LF) || (*pSrc == CHAR_CR)))
{
pSrc++;
}
return pSrc;
}
*/
//===========================================================================
/*
inline
const TCHAR* SkipUntilChar ( const TCHAR *pSrc, const TCHAR nDelim )
{
while (pSrc && (*pSrc))
{
if (*pSrc == nDelim)
break;
pSrc++;
}
return pSrc;
}
*/
//===========================================================================
/*
inline
const TCHAR* SkipUntilEOL ( const TCHAR *pSrc )
{
while (pSrc && (*pSrc))
{
if ((*pSrc == CHAR_LF) || (*pSrc == CHAR_CR))
{
break;
}
pSrc++;
}
return pSrc;
}
*/
//===========================================================================
/*
inline
const TCHAR* SkipUntilTab ( const TCHAR *pSrc )
{
while (pSrc && (*pSrc))
{
if (*pSrc == CHAR_TAB)
{
break;
}
pSrc++;
}
return pSrc;
}
*/
//===========================================================================
/*
const TCHAR* SkipUntilToken ( const TCHAR *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e *pToken_ )
{
if ( pToken_)
*pToken_ = NO_TOKEN;
while (pSrc && (*pSrc))
{
// Common case is TOKEN_ALPHANUMERIC, so continue until we don't have one
if (ParserFindToken( pSrc, aTokens, pToken_ ))
return pSrc;
pSrc++;
}
return pSrc;
}
*/
//===========================================================================
/*
inline
const TCHAR* SkipUntilWhiteSpace ( const TCHAR *pSrc )
{
while (pSrc && (*pSrc))
{
if ((*pSrc == CHAR_SPACE) || (*pSrc == CHAR_TAB))
{
break;
}
pSrc++;
}
return pSrc;
}
*/
// @param pStart Start of line.
//===========================================================================
/*
inline
const TCHAR *SkipUntilWhiteSpaceReverse ( const TCHAR *pSrc, const TCHAR *pStart )
{
while (pSrc && (pSrc > pStart))
{
if ((*pSrc == CHAR_SPACE) || (*pSrc == CHAR_TAB))
{
break;
}
pSrc--;
}
return pSrc;
}
*/
//===========================================================================
/*
inline
const TCHAR* SkipWhiteSpace ( const TCHAR *pSrc )
{
while (pSrc && ((*pSrc == CHAR_SPACE) || (*pSrc == CHAR_TAB)))
{
pSrc++;
}
return pSrc;
}
*/
// @param pStart Start of line.
//===========================================================================
/*
inline
const TCHAR *SkipWhiteSpaceReverse ( const TCHAR *pSrc, const TCHAR *pStart )
{
while (pSrc && ((*pSrc == CHAR_SPACE) || (*pSrc == CHAR_TAB)) && (pSrc > pStart))
{
pSrc--;
}
return pSrc;
}
*/
// EOF

View File

@ -1,13 +1,27 @@
#ifndef DEBUGGER_PARSER_H
#define DEBUGGER_PARSER_H
#define CHAR_LF '\x0D'
#define CHAR_CR '\x0A'
#define CHAR_SPACE ' '
#define CHAR_TAB '\t'
#define CHAR_QUOTE_DOUBLE '"'
#define CHAR_QUOTE_SINGLE '\''
#define CHAR_ESCAPE '\x1B'
#include "Util_Text.h"
const char * ParserFindToken( const char *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e * pToken_ );
const TCHAR * FindTokenOrAlphaNumeric ( const TCHAR *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e * pToken_ );
int RemoveWhiteSpaceReverse( char *pSrc );
void TextConvertTabsToSpaces( TCHAR *pDeTabified_, LPCTSTR pText, const int nDstSize, int nTabStop = 0 );
inline const char* SkipUntilToken( const char *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e *pToken_ )
{
if ( pToken_)
*pToken_ = NO_TOKEN;
while (pSrc && (*pSrc))
{
if (ParserFindToken( pSrc, aTokens, nTokens, pToken_ ))
return pSrc;
pSrc++;
}
return pSrc;
}
// Globals __________________________________________________________________
@ -43,198 +57,4 @@
void ArgsRawParse ( void );
int ArgsCook ( const int nArgs ); // const int bProcessMask );
// Token
const char * ParserFindToken( const char *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e * pToken_ );
// Text Util
/*
inline const char* SkipEOL ( const char *pSrc )
{
while (pSrc && ((*pSrc == CHAR_LF) || (*pSrc == CHAR_CR)))
if (pSrc)
{
pSrc++;
}
return pSrc;
}
*/
inline const char* EatEOL ( const char *pSrc )
{
if (pSrc)
{
if (*pSrc == CHAR_LF)
pSrc++;
if (*pSrc == CHAR_CR)
pSrc++;
}
return pSrc;
}
inline const char* SkipWhiteSpace ( const char *pSrc )
{
while (pSrc && ((*pSrc == CHAR_SPACE) || (*pSrc == CHAR_TAB)))
{
pSrc++;
}
return pSrc;
}
inline const char* SkipWhiteSpaceReverse ( const char *pSrc, const char *pStart )
{
while (pSrc && ((*pSrc == CHAR_SPACE) || (*pSrc == CHAR_TAB)) && (pSrc > pStart))
{
pSrc--;
}
return pSrc;
}
inline const char* SkipUntilChar ( const char *pSrc, const char nDelim )
{
while (pSrc && (*pSrc))
{
if (*pSrc == nDelim)
break;
pSrc++;
}
return pSrc;
}
inline const char* SkipUntilEOL ( const char *pSrc )
{
// EOL delims: NULL, LF, CR
while (pSrc && (*pSrc))
{
if ((*pSrc == CHAR_LF) || (*pSrc == CHAR_CR))
{
break;
}
pSrc++;
}
return pSrc;
}
inline const char* SkipUntilTab ( const char *pSrc)
{
while (pSrc && (*pSrc))
{
if (*pSrc == CHAR_TAB)
{
break;
}
pSrc++;
}
return pSrc;
}
inline const char* SkipUntilToken ( const char *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e *pToken_ )
{
if ( pToken_)
*pToken_ = NO_TOKEN;
while (pSrc && (*pSrc))
{
if (ParserFindToken( pSrc, aTokens, nTokens, pToken_ ))
return pSrc;
pSrc++;
}
return pSrc;
}
inline const char* SkipUntilWhiteSpace ( const char *pSrc )
{
while (pSrc && (*pSrc))
{
if ((*pSrc == CHAR_SPACE) || (*pSrc == CHAR_TAB))
{
break;
}
pSrc++;
}
return pSrc;
}
inline const char* SkipUntilWhiteSpaceReverse ( const char *pSrc, const char *pStart )
{
while (pSrc && (pSrc > pStart))
{
if ((*pSrc == CHAR_SPACE) || (*pSrc == CHAR_TAB))
{
break;
}
pSrc--;
}
return pSrc;
}
/*
const TCHAR* SkipEOL ( const TCHAR *pSrc );
const TCHAR* SkipWhiteSpace ( const TCHAR *pSrc );
const TCHAR* SkipWhiteSpaceReverse ( const TCHAR *pSrc, const TCHAR *pStart );
const TCHAR* SkipUntilChar ( const TCHAR *pSrc, const TCHAR nDelim );
const TCHAR* SkipUntilEOL ( const TCHAR *pSrc );
const TCHAR* SkipUntilToken ( const TCHAR *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e *pToken_ );
const TCHAR* SkipUntilWhiteSpace ( const TCHAR *pSrc );
const TCHAR* SkipUntilWhiteSpaceReverse ( const TCHAR *pSrc, const TCHAR *pStart );
const TCHAR* SkipUntilTab ( const TCHAR *pSrc);
*/
const TCHAR * FindTokenOrAlphaNumeric ( const TCHAR *pSrc, const TokenTable_t *aTokens, const int nTokens, ArgToken_e * pToken_ );
// TextRemoveWhiteSpaceReverse
int RemoveWhiteSpaceReverse ( char *pSrc );
// TextExpandTabsToSpaces
void TextConvertTabsToSpaces( TCHAR *pDeTabified_, LPCTSTR pText, const int nDstSize, int nTabStop = 0 );
/** Assumes text are valid hex digits!
//=========================================================================== */
inline BYTE TextConvert2CharsToByte ( char *pText )
{
BYTE n = ((pText[0] <= '@') ? (pText[0] - '0') : (pText[0] - 'A' + 10)) << 4;
n += ((pText[1] <= '@') ? (pText[1] - '0') : (pText[1] - 'A' + 10)) << 0;
return n;
}
//===========================================================================
inline bool TextIsHexChar( char nChar )
{
if ((nChar >= '0') && (nChar <= '9'))
return true;
if ((nChar >= 'A') && (nChar <= 'F'))
return true;
if ((nChar >= 'a') && (nChar <= 'f'))
return true;
return false;
}
//===========================================================================
inline bool TextIsHexByte( char *pText )
{
if (TextIsHexChar( pText[0] ) &&
TextIsHexChar( pText[1] ))
return true;
return false;
}
//===========================================================================
inline bool TextIsHexString ( LPCSTR pText )
{
while (*pText)
{
if (! TextIsHexChar( *pText ))
return false;
pText++;
}
return true;
}
#endif

View File

@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "Debug.h"
// Util - Range _______________________________________________________________

View File

@ -28,6 +28,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "Debug.h"
#include "..\AppleWin.h"
// 2.6.2.13 Added: Can now enable/disable selected symbol table(s) !
// Allow the user to disable/enable symbol tables
@ -103,7 +106,7 @@ const char* FindSymbolFromAddress (WORD nAddress, int * iTable_ )
if (! (g_bDisplaySymbolTables & (1 << iTable)))
continue;
map<WORD, string>::iterator iSymbols = g_aSymbols[iTable].find(nAddress);
std::map<WORD, std::string>::iterator iSymbols = g_aSymbols[iTable].find(nAddress);
if(g_aSymbols[iTable].find(nAddress) != g_aSymbols[iTable].end())
{
if (iTable_)
@ -128,7 +131,6 @@ bool FindAddressFromSymbol ( const char* pSymbol, WORD * pAddress_, int * iTable
if (! (g_bDisplaySymbolTables & (1 << iTable)))
continue;
// map<WORD, string>::iterator iSymbol = g_aSymbols[iTable].begin();
SymbolTable_t :: iterator iSymbol = g_aSymbols[iTable].begin();
while (iSymbol != g_aSymbols[iTable].end())
{
@ -452,7 +454,6 @@ Update_t _CmdSymbolsListTables (int nArgs, int bSymbolTables )
int nSymbols = g_aSymbols[iTable].size();
if (nSymbols)
{
// map<WORD, string>::iterator iSymbol = g_aSymbols[iTable].begin();
SymbolTable_t :: iterator iSymbol = g_aSymbols[iTable].begin();
while (iSymbol != g_aSymbols[iTable].end())
{

View File

@ -1161,8 +1161,8 @@ const DisasmData_t* pDisasmData;
bool m_bFound ; //
};
typedef vector<MemorySearch_t> MemorySearchValues_t;
typedef vector<int> MemorySearchResults_t;
typedef std::vector<MemorySearch_t> MemorySearchValues_t;
typedef std::vector<int> MemorySearchResults_t;
// Parameters _____________________________________________________________________________________
@ -1419,7 +1419,7 @@ const DisasmData_t* pDisasmData;
NO_SOURCE_LINE = -1
};
typedef map<WORD, int> SourceAssembly_t; // Address -> Line # & FileName
typedef std::map<WORD, int> SourceAssembly_t; // Address -> Line # & FileName
// Symbols ________________________________________________________________________________________
@ -1459,7 +1459,7 @@ const DisasmData_t* pDisasmData;
SYMBOL_TABLE_PRODOS = (1 << 8),
};
typedef map<WORD, string> SymbolTable_t;
typedef std::map<WORD, std::string> SymbolTable_t;
// Watches ________________________________________________________________________________________

View File

@ -1,5 +1,30 @@
/*
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-2014, Tom Charlesworth, Michael Pohoreski
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
*/
#include "StdAfx.h"
#include "Util_Text.h"
#include "Util_MemoryTextFile.h"
// MemoryTextFile _________________________________________________________________________________

View File

@ -1,12 +1,11 @@
#pragma once
// Memory Text File _________________________________________________________
class MemoryTextFile_t
{
vector<char > m_vBuffer;
vector<char *> m_vLines ; // array of pointers to start of lines
std::vector<char > m_vBuffer;
std::vector<char *> m_vLines ; // array of pointers to start of lines
bool m_bDirty ; // line pointers not up-to-date
void GetLinePointers();

156
source/Debugger/Util_Text.h Normal file
View File

@ -0,0 +1,156 @@
#pragma once
#define CHAR_LF '\x0D'
#define CHAR_CR '\x0A'
#define CHAR_SPACE ' '
#define CHAR_TAB '\t'
#define CHAR_QUOTE_DOUBLE '"'
#define CHAR_QUOTE_SINGLE '\''
#define CHAR_ESCAPE '\x1B'
// Text Util
inline const char* EatEOL ( const char *pSrc )
{
if (pSrc)
{
if (*pSrc == CHAR_LF)
pSrc++;
if (*pSrc == CHAR_CR)
pSrc++;
}
return pSrc;
}
inline const char* SkipWhiteSpace ( const char *pSrc )
{
while (pSrc && ((*pSrc == CHAR_SPACE) || (*pSrc == CHAR_TAB)))
{
pSrc++;
}
return pSrc;
}
inline const char* SkipWhiteSpaceReverse ( const char *pSrc, const char *pStart )
{
while (pSrc && ((*pSrc == CHAR_SPACE) || (*pSrc == CHAR_TAB)) && (pSrc > pStart))
{
pSrc--;
}
return pSrc;
}
inline const char* SkipUntilChar ( const char *pSrc, const char nDelim )
{
while (pSrc && (*pSrc))
{
if (*pSrc == nDelim)
break;
pSrc++;
}
return pSrc;
}
inline const char* SkipUntilEOL ( const char *pSrc )
{
// EOL delims: NULL, LF, CR
while (pSrc && (*pSrc))
{
if ((*pSrc == CHAR_LF) || (*pSrc == CHAR_CR))
{
break;
}
pSrc++;
}
return pSrc;
}
inline const char* SkipUntilTab ( const char *pSrc)
{
while (pSrc && (*pSrc))
{
if (*pSrc == CHAR_TAB)
{
break;
}
pSrc++;
}
return pSrc;
}
inline const char* SkipUntilWhiteSpace ( const char *pSrc )
{
while (pSrc && (*pSrc))
{
if ((*pSrc == CHAR_SPACE) || (*pSrc == CHAR_TAB))
{
break;
}
pSrc++;
}
return pSrc;
}
inline const char* SkipUntilWhiteSpaceReverse ( const char *pSrc, const char *pStart )
{
while (pSrc && (pSrc > pStart))
{
if ((*pSrc == CHAR_SPACE) || (*pSrc == CHAR_TAB))
{
break;
}
pSrc--;
}
return pSrc;
}
/** Assumes text are valid hex digits!
//=========================================================================== */
inline BYTE TextConvert2CharsToByte ( char *pText )
{
BYTE n = ((pText[0] <= '@') ? (pText[0] - '0') : (pText[0] - 'A' + 10)) << 4;
n += ((pText[1] <= '@') ? (pText[1] - '0') : (pText[1] - 'A' + 10)) << 0;
return n;
}
//===========================================================================
inline bool TextIsHexChar( char nChar )
{
if ((nChar >= '0') && (nChar <= '9'))
return true;
if ((nChar >= 'A') && (nChar <= 'F'))
return true;
if ((nChar >= 'a') && (nChar <= 'f'))
return true;
return false;
}
//===========================================================================
inline bool TextIsHexByte( char *pText )
{
if (TextIsHexChar( pText[0] ) &&
TextIsHexChar( pText[1] ))
return true;
return false;
}
//===========================================================================
inline bool TextIsHexString ( LPCSTR pText )
{
while (*pText)
{
if (! TextIsHexChar( *pText ))
return false;
pText++;
}
return true;
}

View File

@ -4,7 +4,7 @@ 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-2007, Tom Charlesworth, Michael Pohoreski
Copyright (C) 2006-2014, Tom Charlesworth, Michael Pohoreski
AppleWin is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -27,7 +27,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
#include "AppleWin.h"
#include "Disk.h"
#include "DiskImage.h"
#include "Frame.h"
#include "Memory.h"
#include "Registry.h"
#include "Video.h"
#include "..\resource\resource.h"
#define LOG_DISK_ENABLED 0
@ -60,8 +68,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
{
TCHAR imagename[ MAX_DISK_IMAGE_NAME + 1 ]; // <FILENAME> (ie. no extension)
TCHAR fullname [ MAX_DISK_FULL_NAME + 1 ]; // <FILENAME.EXT> or <FILENAME.zip> : This is persisted to the snapshot file
string strDiskPathFilename;
string strFilenameInZip; // 0x00 or <FILENAME.EXT>
std::string strDiskPathFilename;
std::string strFilenameInZip; // 0x00 or <FILENAME.EXT>
HIMAGE imagehandle; // Init'd by DiskInsert() -> ImageOpen()
int track;
LPBYTE trackimage;
@ -117,13 +125,14 @@ int DiskGetCurrentDrive(void) { return currdrive; }
int DiskGetCurrentTrack(void) { return g_aFloppyDisk[currdrive].track; }
int DiskGetCurrentPhase(void) { return g_aFloppyDisk[currdrive].phase; }
int DiskGetCurrentOffset(void) { return g_aFloppyDisk[currdrive].byte; }
int DiskGetTrack( int drive ) { return g_aFloppyDisk[ drive ].track; }
const string& DiskGetDiskPathFilename(const int iDrive)
const std::string& DiskGetDiskPathFilename(const int iDrive)
{
return g_aFloppyDisk[iDrive].strDiskPathFilename;
}
static void DiskSetDiskPathFilename(const int iDrive, const string strPathName)
static void DiskSetDiskPathFilename(const int iDrive, const std::string strPathName)
{
g_aFloppyDisk[iDrive].strDiskPathFilename = strPathName;
}
@ -206,10 +215,13 @@ void Disk_SaveLastDiskImage(const int iDrive)
static void CheckSpinning(void)
{
DWORD modechange = (floppymotoron && !g_aFloppyDisk[currdrive].spinning);
if (floppymotoron)
g_aFloppyDisk[currdrive].spinning = 20000;
if (modechange)
FrameRefreshStatus(DRAW_LEDS);
//FrameRefreshStatus(DRAW_LEDS);
FrameDrawDiskLEDS( (HDC)0 );
}
//===========================================================================
@ -295,8 +307,8 @@ static bool IsDriveValid(const int iDrive)
static void AllocTrack(const int iDrive)
{
Disk_t * fptr = &g_aFloppyDisk[iDrive];
fptr->trackimage = (LPBYTE)VirtualAlloc(NULL, NIBBLES_PER_TRACK, MEM_COMMIT, PAGE_READWRITE);
Disk_t * fptr = &g_aFloppyDisk[iDrive];
fptr->trackimage = (LPBYTE)VirtualAlloc(NULL, NIBBLES_PER_TRACK, MEM_COMMIT, PAGE_READWRITE);
}
//===========================================================================
@ -461,6 +473,10 @@ static BYTE __stdcall DiskControlStepper(WORD, WORD address, BYTE, BYTE, ULONG)
fptr->track = newtrack;
fptr->trackimagedata = 0;
}
// Feature Request #201 Show track status
// https://github.com/AppleWin/AppleWin/issues/201
FrameDrawDiskStatus( (HDC)0 );
}
#else // Old 1.13.1 code for Chessmaster 2000 to work! (see bug#18109)
const int nNumTracksInImage = ImageGetNumTracks(fptr->imagehandle);
@ -551,11 +567,9 @@ LPCTSTR DiskGetBaseName(const int iDrive)
void DiskGetLightStatus(Disk_Status_e *pDisk1Status_, Disk_Status_e *pDisk2Status_)
{
// *drive1 = g_aFloppyDisk[0].spinning ? g_aFloppyDisk[0].writelight ? 2 : 1 : 0;
// *drive2 = g_aFloppyDisk[1].spinning ? g_aFloppyDisk[1].writelight ? 2 : 1 : 0;
if (pDisk1Status_)
*pDisk1Status_ = GetDriveLightStatus( 0 );
if (pDisk2Status_)
*pDisk2Status_ = GetDriveLightStatus( 1 );
}
@ -812,6 +826,12 @@ static BYTE __stdcall DiskReadWrite (WORD programcounter, WORD, BYTE, BYTE, ULON
if (++fptr->byte >= fptr->nibbles)
fptr->byte = 0;
// Feature Request #201 Show track status
// https://github.com/AppleWin/AppleWin/issues/201
// NB. Prevent flooding of forcing UI to redraw!!!
if( ((fptr->byte) & 0xFF) == 0 )
FrameDrawDiskStatus( (HDC)0 );
return result;
}
@ -904,7 +924,10 @@ static BYTE __stdcall DiskSetWriteMode(WORD, WORD, BYTE, BYTE, ULONG)
BOOL modechange = !g_aFloppyDisk[currdrive].writelight;
g_aFloppyDisk[currdrive].writelight = 20000;
if (modechange)
FrameRefreshStatus(DRAW_LEDS);
{
//FrameRefreshStatus(DRAW_LEDS);
FrameDrawDiskLEDS( (HDC)0 );
}
return MemReturnRandomData(1);
}
@ -919,7 +942,11 @@ void DiskUpdatePosition(DWORD cycles)
if (fptr->spinning && !floppymotoron) {
if (!(fptr->spinning -= MIN(fptr->spinning, (cycles >> 6))))
FrameRefreshStatus(DRAW_LEDS);
{
// FrameRefreshStatus(DRAW_LEDS);
FrameDrawDiskLEDS( (HDC)0 );
FrameDrawDiskStatus( (HDC)0 );
}
}
if (floppywritemode && (currdrive == loop) && fptr->spinning)
@ -929,7 +956,11 @@ void DiskUpdatePosition(DWORD cycles)
else if (fptr->writelight)
{
if (!(fptr->writelight -= MIN(fptr->writelight, (cycles >> 6))))
FrameRefreshStatus(DRAW_LEDS);
{
//FrameRefreshStatus(DRAW_LEDS);
FrameDrawDiskLEDS( (HDC)0 );
FrameDrawDiskStatus( (HDC)0 );
}
}
if ((!enhancedisk) && (!diskaccessed) && fptr->spinning)
@ -954,12 +985,12 @@ bool DiskDriveSwap(void)
// Swap disks between drives
// . NB. We swap trackimage ptrs (so don't need to swap the buffers' data)
// . TODO: Consider array of Pointers: Disk_t* g_aDrive[]
swap(g_aFloppyDisk[0], g_aFloppyDisk[1]);
std::swap(g_aFloppyDisk[0], g_aFloppyDisk[1]);
Disk_SaveLastDiskImage(DRIVE_1);
Disk_SaveLastDiskImage(DRIVE_2);
FrameRefreshStatus(DRAW_LEDS | DRAW_BUTTON_DRIVES);
FrameRefreshStatus(DRAW_LEDS | DRAW_BUTTON_DRIVES, false );
return true;
}

View File

@ -40,7 +40,7 @@ const bool IMAGE_DONT_CREATE = false;
const bool IMAGE_CREATE = true;
extern BOOL enhancedisk;
const string& DiskGetDiskPathFilename(const int iDrive);
const std::string& DiskGetDiskPathFilename(const int iDrive);
void DiskInitialize(void); // DiskIIManagerStartup()
void DiskDestroy(void); // no, doesn't "destroy" the disk image. DiskIIManagerShutdown()
@ -62,6 +62,7 @@ bool DiskGetProtect(const int iDrive);
void DiskSetProtect(const int iDrive, const bool bWriteProtect);
int DiskGetCurrentDrive();
int DiskGetCurrentTrack();
int DiskGetTrack( int drive );
int DiskGetCurrentPhase();
int DiskGetCurrentOffset();
char* DiskGetCurrentState();

3
source/DiskDefs.h Normal file
View File

@ -0,0 +1,3 @@
#pragma once
#define NIBBLES_PER_TRACK 0x1A00

View File

@ -26,13 +26,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Author: Various
*/
#include "StdAfx.h"
#include "Structs.h"
#include "Common.h"
#include "DiskImage.h"
#include "DiskImageHelper.h"
static CDiskImageHelper sg_DiskImageHelper;
//===========================================================================

View File

@ -23,7 +23,8 @@ along with AppleWin; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define NIBBLES_PER_TRACK 0x1A00
#include "DiskDefs.h"
#define TRACK_DENIBBLIZED_SIZE (16 * 256) // #Sectors x Sector-size
#define TRACKS_STANDARD 35

View File

@ -28,8 +28,18 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "stdafx.h"
#include "DiskImageHelper.h"
#include "Structs.h"
#include "Common.h"
#include "zlib.h"
#include "unzip.h"
#include "iowin32.h"
#include "CPU.h"
#include "Disk.h"
#include "DiskImage.h"
#include "DiskImageHelper.h"
#include "Memory.h"
/* DO logical order 0 1 2 3 4 5 6 7 8 9 A B C D E F */

View File

@ -1,5 +1,7 @@
#pragma once
#include "zip.h"
#define GZ_SUFFIX ".gz"
#define GZ_SUFFIX_LEN (sizeof(GZ_SUFFIX)-1)

View File

@ -4,7 +4,7 @@ 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-2007, Tom Charlesworth, Michael Pohoreski
Copyright (C) 2006-2014, Tom Charlesworth, Michael Pohoreski
AppleWin is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -27,15 +27,33 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
#include <sys/stat.h>
#include "AppleWin.h"
#include "CPU.h"
#include "Disk.h"
#include "DiskImage.h"
#include "Harddisk.h"
#include "Frame.h"
#include "Keyboard.h"
#include "Log.h"
#include "Memory.h"
#include "Mockingboard.h"
#include "MouseInterface.h"
#include "..\resource\resource.h"
#include <sys/stat.h>
#include "ParallelPrinter.h"
#include "Registry.h"
#include "SaveState.h"
#include "SerialComms.h"
#include "SoundCore.h"
#include "Speaker.h"
#ifdef USE_SPEECH_API
#include "Speech.h"
#endif
#include "Video.h"
#include "..\resource\resource.h"
#include "Configuration\PropertySheet.h"
#include "Debugger\Debug.h"
//#define ENABLE_MENU 0
@ -46,7 +64,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
static const int kDEFAULT_VIEWPORT_SCALE = 2;
static int g_nViewportCX = FRAMEBUFFER_W * kDEFAULT_VIEWPORT_SCALE;
static int g_nViewportCY = FRAMEBUFFER_H * kDEFAULT_VIEWPORT_SCALE;
static int g_nViewportScale = kDEFAULT_VIEWPORT_SCALE;
static int g_nViewportScale = kDEFAULT_VIEWPORT_SCALE; // saved REGSAVE
static int g_nOldViewportScale = kDEFAULT_VIEWPORT_SCALE;
static int g_nMaxViewportScale = kDEFAULT_VIEWPORT_SCALE;
@ -72,6 +90,16 @@ static int g_nMaxViewportScale = kDEFAULT_VIEWPORT_SCALE;
static HBITMAP g_hDiskWindowedLED[ NUM_DISK_STATUS ];
//static HBITMAP g_hDiskFullScreenLED[ NUM_DISK_STATUS ];
static int g_nTrackDrive1 = -1;
static int g_nTrackDrive2 = -1;
static int g_nSectorDrive1 = -1;
static int g_nSectorDrive2 = -1;
static TCHAR g_sTrackDrive1 [8] = TEXT("??");
static TCHAR g_sTrackDrive2 [8] = TEXT("??");
static TCHAR g_sSectorDrive1[8] = TEXT("??");
static TCHAR g_sSectorDrive2[8] = TEXT("??");
Disk_Status_e g_eStatusDrive1 = DISK_STATUS_OFF;
Disk_Status_e g_eStatusDrive2 = DISK_STATUS_OFF;
// Must keep in sync with Disk_Status_e g_aDiskFullScreenColors
static DWORD g_aDiskFullScreenColorsLED[ NUM_DISK_STATUS ] =
@ -99,9 +127,10 @@ static HRGN clipregion = (HRGN)0;
static HDC g_hFrameDC = (HDC)0;
static RECT framerect = {0,0,0,0};
HWND g_hFrameWindow = (HWND)0;
BOOL g_bIsFullScreen = 0;
BOOL g_bMultiMon = 0; // OFF = load window position & clamp initial frame to screen, ON = use window position as is
HWND g_hFrameWindow = (HWND)0;
BOOL g_bIsFullScreen = 0;
BOOL g_bConfirmReboot = 1; // saved PageConfig REGSAVE
BOOL g_bMultiMon = 0; // OFF = load window position & clamp initial frame to screen, ON = use window position as is
static BOOL helpquit = 0;
static BOOL g_bPaintingWindow = 0;
@ -129,7 +158,7 @@ void ResetMachineState ();
void SetFullScreenMode ();
void SetNormalMode ();
void SetUsingCursor (BOOL);
static bool FileExists(string strFilename);
static bool FileExists(std::string strFilename);
bool g_bScrollLock_FullSpeed = false;
bool g_bFreshReset = false;
@ -527,7 +556,7 @@ static void DrawFrameWindow ()
}
// DRAW THE STATUS AREA
DrawStatusArea(dc,DRAW_BACKGROUND | DRAW_LEDS);
DrawStatusArea(dc,DRAW_BACKGROUND | DRAW_LEDS | DRAW_DISK_STATUS);
// DRAW THE CONTENTS OF THE EMULATED SCREEN
if (g_nAppMode == MODE_LOGO)
@ -547,24 +576,21 @@ static void DrawFrameWindow ()
}
//===========================================================================
static void DrawStatusArea (HDC passdc, int drawflags)
void FrameDrawDiskLEDS( HDC passdc )
{
FrameReleaseDC();
HDC dc = (passdc ? passdc : GetDC(g_hFrameWindow));
int x = buttonx;
int y = buttony+BUTTONS*BUTTONCY+1;
const bool bCaps = KeybGetCapsStatus();
//const bool bP8Caps = KeybGetP8CapsStatus(); // TODO: FIXME: Not used ?! Should show the LED status ...
Disk_Status_e eDrive1Status = DISK_STATUS_OFF;
Disk_Status_e eDrive2Status = DISK_STATUS_OFF;
static Disk_Status_e eDrive1Status = DISK_STATUS_OFF;
static Disk_Status_e eDrive2Status = DISK_STATUS_OFF;
DiskGetLightStatus(&eDrive1Status, &eDrive2Status);
#if HD_LED
// 1.19.0.0 Hard Disk Status/Indicator Light
Disk_Status_e eHardDriveStatus = DISK_STATUS_OFF;
HD_GetLightStatus(&eHardDriveStatus);
#endif
g_eStatusDrive1 = eDrive1Status;
g_eStatusDrive2 = eDrive2Status;
// Draw Track/Sector
FrameReleaseDC();
HDC dc = (passdc ? passdc : GetDC(g_hFrameWindow));
int x = buttonx;
int y = buttony+BUTTONS*BUTTONCY+1;
if (g_bIsFullScreen)
{
@ -578,6 +604,181 @@ static void DrawStatusArea (HDC passdc, int drawflags)
SetTextColor(dc, g_aDiskFullScreenColorsLED[ eDrive2Status ] );
TextOut(dc,x+13,y+2,TEXT("2"),1);
}
else
{
RECT rDiskLed = {0,0,8,8};
DrawBitmapRect(dc,x+12,y+6,&rDiskLed,g_hDiskWindowedLED[eDrive1Status]);
DrawBitmapRect(dc,x+31,y+6,&rDiskLed,g_hDiskWindowedLED[eDrive2Status]);
}
}
// Feature Request #201 Show track status
// https://github.com/AppleWin/AppleWin/issues/201
//===========================================================================
void FrameDrawDiskStatus( HDC passdc )
{
// We use the actual drive since probing from memory doesn't tell us anything we don't already know.
// DOS3.3 ProDOS
// Drive $B7EA $BE3D
// Track $B7EC LC1 $D356
// Sector $B7ED LC1 $D357
// RWTS LC1 $D300
int nActiveFloppy = DiskGetCurrentDrive();
int nDisk1Track = DiskGetTrack(0);
int nDisk2Track = DiskGetTrack(1);
// Probe known OS's for Track/Sector
int isProDOS = mem[ 0xBF00 ] == 0x4C;
bool isValid = true;
// Try DOS3.3 Sector
if ( !isProDOS )
{
int nDOS33track = mem[ 0xB7EC ];
int nDOS33sector = mem[ 0xB7ED ];
if ((nDOS33track >= 0 && nDOS33track < 40)
&& (nDOS33sector >= 0 && nDOS33sector < 16))
{
#if _DEBUG && 0
if (nDOS33track != nDisk1Track)
{
char text[128];
sprintf( text, "\n\n\nWARNING: DOS33Track: %d (%02X) != nDisk1Track: %d (%02X)\n\n\n", nDOS33track, nDOS33track, nDisk1Track, nDisk1Track );
OutputDebugString( text );
}
#endif // _DEBUG
/**/ if (nActiveFloppy == 0) g_nSectorDrive1 = nDOS33sector;
else if (nActiveFloppy == 1) g_nSectorDrive2 = nDOS33sector;
}
else
isValid = false;
}
else // isProDOS
{
// we can't just read from mem[ 0xD357 ] since it might be bank-switched from ROM
// and we need the Language Card RAM
// memrom[ 0xD350 ] = " ERROR\x07\x00" Applesoft error message
// T S
int nProDOStrack = *MemGetMainPtr( 0xC356 ); // LC1 $D356
int nProDOSsector = *MemGetMainPtr( 0xC357 ); // LC1 $D357
if ((nProDOStrack >= 0 && nProDOStrack < 40)
&& (nProDOSsector >= 0 && nProDOSsector < 16))
{
/**/ if (nActiveFloppy == 0) g_nSectorDrive1 = nProDOSsector;
else if (nActiveFloppy == 1) g_nSectorDrive2 = nProDOSsector;
}
else
isValid = false;
}
g_nTrackDrive1 = nDisk1Track;
g_nTrackDrive2 = nDisk2Track;
if( !isValid )
{
if (nActiveFloppy == 0) g_nSectorDrive1 = -1;
else g_nSectorDrive2 = -1;
}
sprintf_s( g_sTrackDrive1 , sizeof(g_sTrackDrive1 ), "%2d", g_nTrackDrive1 );
if (g_nSectorDrive1 < 0) sprintf_s( g_sSectorDrive1, sizeof(g_sSectorDrive1), "??" , g_nSectorDrive1 );
else sprintf_s( g_sSectorDrive1, sizeof(g_sSectorDrive1), "%2d", g_nSectorDrive1 );
sprintf_s( g_sTrackDrive2 , sizeof(g_sTrackDrive2), "%2d", g_nTrackDrive2 );
if (g_nSectorDrive2 < 0) sprintf_s( g_sSectorDrive2, sizeof(g_sSectorDrive2), "??" , g_nSectorDrive2 );
else sprintf_s( g_sSectorDrive2, sizeof(g_sSectorDrive2), "%2d", g_nSectorDrive2 );
// Draw Track/Sector
FrameReleaseDC();
HDC dc = (passdc ? passdc : GetDC(g_hFrameWindow));
int x = buttonx;
int y = buttony+BUTTONS*BUTTONCY+1;
SelectObject(dc,smallfont);
SetBkMode(dc,OPAQUE);
SetBkColor(dc,RGB(0,0,0));
SetTextAlign(dc,TA_LEFT | TA_TOP);
char text[ 16 ];
if (g_bIsFullScreen)
{
#if _DEBUG && 0
SetBkColor(dc,RGB(255,0,255));
#endif
SetTextColor(dc, g_aDiskFullScreenColorsLED[ g_eStatusDrive1 ] );
TextOut(dc,x+ 3,y+2,TEXT("1"),1);
SetTextColor(dc, g_aDiskFullScreenColorsLED[ g_eStatusDrive2 ] );
TextOut(dc,x+13,y+2,TEXT("2"),1);
int dx = 0;
if( nActiveFloppy == 0 )
sprintf( text, "%s/%s ", g_sTrackDrive1, g_sSectorDrive1 );
else
sprintf( text, "%s/%s ", g_sTrackDrive2, g_sSectorDrive2 );
SetTextColor(dc, g_aDiskFullScreenColorsLED[ DISK_STATUS_READ ] );
TextOut(dc,x+dx,y-12,text, strlen(text) ); // original: y+2; y-12 puts status in the Configuration Button Icon
}
else
{
// NB. Only draw Track/Sector if 2x windowed
if (g_nOldViewportScale == 1)
return;
// Erase background
SelectObject(dc,GetStockObject(NULL_PEN));
#if _DEBUG && 0
SelectObject( dc, CreateSolidBrush( RGB(255,0,255) ) );
#else
SelectObject(dc,btnfacebrush);
#endif
Rectangle(dc,x+4,y+32,x+BUTTONCX+1,y+56); // y+35 -> 44 -> 56
SetTextColor(dc,RGB(0,0,0));
SetBkMode(dc,TRANSPARENT);
sprintf( text, "T%s", g_sTrackDrive1 );
TextOut(dc,x+6 ,y+32,text, strlen(text) );
sprintf( text, "S%s", g_sSectorDrive1 );
TextOut(dc,x+ 6,y+42, text, strlen(text) );
sprintf( text, "T%s", g_sTrackDrive2 );
TextOut(dc,x+26,y+32,text, strlen(text) );
sprintf( text, "S%s", g_sSectorDrive2 );
TextOut(dc,x+26,y+42, text, strlen(text) );
}
}
//===========================================================================
static void DrawStatusArea (HDC passdc, int drawflags)
{
FrameReleaseDC();
HDC dc = (passdc ? passdc : GetDC(g_hFrameWindow));
int x = buttonx;
int y = buttony+BUTTONS*BUTTONCY+1;
const bool bCaps = KeybGetCapsStatus();
//const bool bP8Caps = KeybGetP8CapsStatus(); // TODO: FIXME: Not used ?! Should show the LED status ...
#if HD_LED
// 1.19.0.0 Hard Disk Status/Indicator Light
Disk_Status_e eHardDriveStatus = DISK_STATUS_OFF;
HD_GetLightStatus(&eHardDriveStatus);
#endif
if (g_bIsFullScreen)
{
SelectObject(dc,smallfont);
if (drawflags & DRAW_DISK_STATUS)
FrameDrawDiskStatus( dc );
#if HD_LED
SetTextColor(dc, g_aDiskFullScreenColorsLED[ eHardDriveStatus ] );
@ -609,7 +810,7 @@ static void DrawStatusArea (HDC passdc, int drawflags)
// const int nCapsLen = sizeof(sCapsStatus) / sizeof(TCHAR);
// TextOut(dc,x+BUTTONCX,y+2,"Caps",4); // sCapsStatus,nCapsLen - 1);
TextOut(dc,x+BUTTONCX,y+2,TEXT("A"),1);
TextOut(dc,x+BUTTONCX,y+2,TEXT("A"),1); // NB. Caps Lock indicator is already flush right!
}
SetTextAlign(dc,TA_CENTER | TA_TOP);
SetTextColor(dc,(g_nAppMode == MODE_PAUSED || g_nAppMode == MODE_STEPPING
@ -618,16 +819,16 @@ static void DrawStatusArea (HDC passdc, int drawflags)
TextOut(dc,x+BUTTONCX/2,y+13,(g_nAppMode == MODE_PAUSED
? TITLE_PAUSED
: TITLE_STEPPING) ,8);
}
else
else // g_bIsFullScreen
{
if (drawflags & DRAW_BACKGROUND)
{
SelectObject(dc,GetStockObject(NULL_PEN));
SelectObject(dc,btnfacebrush);
Rectangle(dc,x,y,x+BUTTONCX+2,y+35);
Draw3dRect(dc,x+1,y+3,x+BUTTONCX,y+31,0);
Rectangle(dc,x,y,x+BUTTONCX+2,y+60); // y+35 --> 48 --> 60
Draw3dRect(dc,x+1,y+3,x+BUTTONCX,y+56,0); // y+31 --> 44 --> 56
SelectObject(dc,smallfont);
SetTextAlign(dc,TA_CENTER | TA_TOP);
SetTextColor(dc,RGB(0,0,0));
@ -638,12 +839,13 @@ static void DrawStatusArea (HDC passdc, int drawflags)
// 1.19.0.0 Hard Disk Status/Indicator Light
TextOut(dc,x+ 7,y+17,TEXT("H"),1);
}
if (drawflags & DRAW_LEDS)
{
RECT rDiskLed = {0,0,8,8};
FrameDrawDiskLEDS( dc );
DrawBitmapRect(dc,x+12,y+6,&rDiskLed,g_hDiskWindowedLED[eDrive1Status]);
DrawBitmapRect(dc,x+31,y+6,&rDiskLed,g_hDiskWindowedLED[eDrive2Status]);
if (drawflags & DRAW_DISK_STATUS)
FrameDrawDiskStatus( dc );
if (!IS_APPLE2)
{
@ -662,6 +864,7 @@ static void DrawStatusArea (HDC passdc, int drawflags)
#if HD_LED
// 1.19.0.0 Hard Disk Status/Indicator Light
RECT rDiskLed = {0,0,8,8};
DrawBitmapRect(dc,x+12,y+18,&rDiskLed,g_hDiskWindowedLED[eHardDriveStatus]);
#endif
}
@ -672,6 +875,7 @@ static void DrawStatusArea (HDC passdc, int drawflags)
GetAppleWindowTitle(); // SetWindowText() // WindowTitle
SendMessage(g_hFrameWindow,WM_SETTEXT,0,(LPARAM)g_pAppTitle);
}
if (drawflags & DRAW_BUTTON_DRIVES)
{
DrawButton(dc, BTN_DRIVE1);
@ -1368,6 +1572,10 @@ LRESULT CALLBACK FrameWndProc (
break;
case WM_SYSKEYDOWN:
KeybUpdateCtrlShiftStatus();
if (g_bAltKey && (wparam == VK_RETURN)) // NB. VK_RETURN = 0x0D; Normally WM_CHAR will be 0x0A but ALT key triggers as WM_SYSKEYDOWN
ScreenWindowResize(true);
else
PostMessage(window,WM_KEYDOWN,wparam,lparam);
if ((wparam == VK_F10) || (wparam == VK_MENU)) // VK_MENU == ALT Key
return 0;
@ -1500,10 +1708,20 @@ static void ScreenWindowResize(const bool bCtrlKey)
static bool ConfirmReboot(bool bFromButtonUI)
{
if (!bFromButtonUI)
if (!bFromButtonUI || !g_bConfirmReboot)
return true;
int res = MessageBox(g_hFrameWindow, "Are you sure you want to reboot?\n(All data will be lost!)", "Reboot", MB_ICONWARNING|MB_YESNO);
int res = MessageBox(g_hFrameWindow,
"Are you sure you want to reboot?\n"
"(All data will be lost!)\n"
"\n"
"You can skip this dialog from displaying\n"
"in the future by unchecking:\n"
"\n"
" [ ] Confirm reboot\n"
"\n"
"in the Configuration dialog.\n"
, "Reboot", MB_ICONWARNING|MB_YESNO);
return res == IDYES;
}
@ -1636,10 +1854,10 @@ void ProcessDiskPopupMenu(HWND hwnd, POINT pt, const int iDrive)
RegLoadString(TEXT("Configuration"), REGVALUE_CIDERPRESSLOC, 1, PathToCiderPress,MAX_PATH);
//TODO: A directory is open if an empty path to CiderPress is set. This has to be fixed.
string filename1= "\"";
std::string filename1= "\"";
filename1.append( DiskGetDiskPathFilename(iDrive) );
filename1.append("\"");
string sFileNameEmpty = "\"";
std::string sFileNameEmpty = "\"";
sFileNameEmpty.append("\"");
// Load the menu template containing the shortcut menu from the
@ -2149,8 +2367,10 @@ HDC FrameGetVideoDC (LPBYTE *pAddr_, LONG *pPitch_)
}
//===========================================================================
void FrameRefreshStatus (int drawflags) {
DrawStatusArea((HDC)0,drawflags);
void FrameRefreshStatus (int drawflags, bool bUpdateDiskStatus) {
// NB. 99% of the time we draw the disk status. On DiskDriveSwap() we don't.
drawflags |= bUpdateDiskStatus ? DRAW_DISK_STATUS : 0;
DrawStatusArea((HDC)0,drawflags);
}
//===========================================================================
@ -2203,7 +2423,7 @@ void FrameReleaseVideoDC ()
//===========================================================================
// TODO: FIXME: Util_TestFileExists()
static bool FileExists(string strFilename)
static bool FileExists(std::string strFilename)
{
struct stat stFileInfo;
int intStat = stat(strFilename.c_str(),&stFileInfo);

View File

@ -23,11 +23,12 @@
// Win32
extern HWND g_hFrameWindow;
extern BOOL g_bIsFullScreen;
extern BOOL g_bConfirmReboot; // saved PageConfig REGSAVE
extern BOOL g_bMultiMon;
// Emulator
extern bool g_bFreshReset;
extern string PathFilename[2];
extern std::string PathFilename[2];
extern bool g_bScrollLock_FullSpeed;
extern int g_nCharsetType;
@ -37,7 +38,7 @@
void FrameCreateWindow(void);
HDC FrameGetDC ();
HDC FrameGetVideoDC (LPBYTE *,LONG *);
void FrameRefreshStatus (int);
void FrameRefreshStatus (int, bool bUpdateDiskStatus = true );
void FrameRegisterClass ();
void FrameReleaseDC ();
void FrameReleaseVideoDC ();
@ -48,6 +49,9 @@
bool GetFullScreen32Bit(void);
void SetFullScreen32Bit(bool b32Bit);
void FrameDrawDiskLEDS( HDC hdc );
void FrameDrawDiskStatus( HDC hdc );
LRESULT CALLBACK FrameWndProc (
HWND window,
UINT message,

View File

@ -27,9 +27,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
#include "HardDisk.h"
#include "AppleWin.h"
#include "DiskImage.h" // ImageError_e, Disk_Status_e
#include "DiskImageHelper.h"
#include "Frame.h"
#include "HardDisk.h"
#include "Memory.h"
#include "Registry.h"
#include "..\resource\resource.h"
/*
@ -229,7 +235,7 @@ static void NotifyInvalidImage(TCHAR* pszImageFilename)
static BOOL HD_Load_Image(const int iDrive, LPCSTR pszImageFilename)
{
const bool bCreateIfNecessary = false; // NB. Don't allow creation of HDV files
string strFilenameInZip; // TODO: Use this
std::string strFilenameInZip; // TODO: Use this
ImageError_e Error = ImageOpen(pszImageFilename, iDrive, bCreateIfNecessary, strFilenameInZip);
g_HardDisk[iDrive].hd_imageloaded = (Error == eIMAGE_ERROR_NONE);

View File

@ -38,7 +38,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// - This is because the 2-joystick version of Mario Bros expects the 2nd joystick to control Apple switch #2.
#include "StdAfx.h"
#include "MouseInterface.h"
#include "AppleWin.h"
#include "CPU.h"
#include "Memory.h"
#include "Configuration\PropertySheet.h"
#define BUTTONTIME 5000 // TODO: Describe this magic number

View File

@ -28,6 +28,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "AppleWin.h"
#include "Frame.h"
#include "Keyboard.h"
#include "Tape.h"
static bool g_bKeybBufferEnable = false;

View File

@ -27,14 +27,30 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
#include "AppleWin.h"
#include "CPU.h"
#include "Disk.h"
#include "Frame.h"
#include "Harddisk.h"
#include "Joystick.h"
#include "Keyboard.h"
#include "Memory.h"
#include "Mockingboard.h"
#include "MouseInterface.h"
#include "NoSlotClock.h"
#include "ParallelPrinter.h"
#include "Registry.h"
#include "SerialComms.h"
#include "Speaker.h"
#include "Tape.h"
#include "Video.h"
#include "z80emu.h"
#include "Z80VICE\z80.h"
#include "Z80VICE\z80mem.h"
#include "..\resource\resource.h"
#include "Configuration\PropertySheet.h"
#include "Debugger\DebugDefs.h"
// Memory Flag
#define MF_80STORE 0x00000001

View File

@ -77,14 +77,18 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#define LOG_SSI263 0
#include <wchar.h>
#include "AppleWin.h"
#include "CPU.h"
#include "Log.h"
#include "Memory.h"
#include "Mockingboard.h"
#include "SoundCore.h"
#include "AY8910.h"
#include "SSI263Phonemes.h"
#define LOG_SSI263 0
#define SY6522_DEVICE_A 0
#define SY6522_DEVICE_B 1

View File

@ -41,16 +41,22 @@ Etc.
#include "stdafx.h"
#include "Structs.h"
#include "Common.h"
#include "CPU.h"
#include "Frame.h" // FrameSetCursorPosByMousePos()
#include "Log.h"
#include "Memory.h"
#include "MouseInterface.h"
#include "SoundCore.h" // SAFE_RELEASE()
#include "..\resource\resource.h"
#ifdef _DEBUG
#define _DEBUG_SPURIOUS_IRQ
#endif
#include "..\resource\resource.h"
#include "MouseInterface.h"
#include "Frame.h" // FrameSetCursorPosByMousePos()
// Sets mouse mode
#define MOUSE_SET 0x00
// Reads mouse position

View File

@ -27,6 +27,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
#include "AppleWin.h"
#include "Memory.h"
#include "ParallelPrinter.h"
#include "Registry.h"
#include "..\resource\resource.h"
static DWORD inactivity = 0;
@ -100,7 +106,7 @@ static void ClosePrint()
{
fclose(file);
file = NULL;
string ExtendedFileName = "copy \"";
std::string ExtendedFileName = "copy \"";
ExtendedFileName.append (Printer_GetFilename());
ExtendedFileName.append ("\" prn");
//if (g_bDumpToPrinter) ShellExecute(NULL, "print", Printer_GetFilename(), NULL, NULL, 0); //Print through Notepad

View File

@ -1,5 +1,8 @@
#pragma once
#define REGLOAD(a,b) RegLoadValue(TEXT(REG_CONFIG),a,1,b)
#define REGSAVE(a,b) RegSaveValue(TEXT(REG_CONFIG),a,1,b)
BOOL RegLoadString (LPCTSTR,LPCTSTR,BOOL,LPTSTR,DWORD);
BOOL RegLoadValue (LPCTSTR,LPCTSTR,BOOL,DWORD *);
void RegSaveString (LPCTSTR,LPCTSTR,BOOL,LPCTSTR);

View File

@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Stdafx.h"
#include "riff.h"
#include "Riff.h"
static HANDLE g_hRiffFile = INVALID_HANDLE_VALUE;
static DWORD dwTotalOffset;

View File

@ -27,7 +27,18 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
#include "AppleWin.h"
#include "CPU.h"
#include "Disk.h"
#include "Frame.h"
#include "Joystick.h"
#include "Keyboard.h"
#include "Memory.h"
#include "Mockingboard.h"
#include "SerialComms.h"
#include "Speaker.h"
#include "Video.h"
#define DEFAULT_SNAPSHOT_NAME "SaveState.aws"

View File

@ -39,6 +39,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#include "StdAfx.h"
#include "AppleWin.h"
#include "CPU.h"
#include "Disk.h" // DiskIsSpinning()
#include "Frame.h"
#include "Memory.h"
#include "SerialComms.h"
#include "..\resource\resource.h"
//#define SUPPORT_MODEM

View File

@ -112,9 +112,9 @@ private:
//
CRITICAL_SECTION m_CriticalSection; // To guard /g_vRecvBytes/
deque<BYTE> m_qComSerialBuffer[2];
std::deque<BYTE> m_qComSerialBuffer[2];
volatile UINT m_vuRxCurrBuffer; // Written to on COM recv. SSC reads from other one
deque<BYTE> m_qTcpSerialBuffer;
std::deque<BYTE> m_qTcpSerialBuffer;
//

View File

@ -28,6 +28,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "AppleWin.h"
#include "Frame.h"
#include "SoundCore.h"
#include "Speaker.h"
//-----------------------------------------------------------------------------

View File

@ -27,7 +27,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
#include <wchar.h>
#include "AppleWin.h"
#include "CPU.h"
#include "Frame.h"
#include "Memory.h"
#include "SoundCore.h"
#include "Speaker.h"
#include "Video.h" // VideoRedrawScreen()
#include "Debugger\Debug.h" // For DWORD extbench
// Notes:
//

View File

@ -33,33 +33,9 @@
#include <htmlhelp.h>
#include <assert.h>
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
#include "zlib.h"
#include "unzip.h"
#include "zip.h"
#include "iowin32.h"
#include "Common.h"
#include "Structs.h"
#include "AppleWin.h"
#include "AY8910.h"
#include "CPU.h"
#include "Video.h" // Debugger needs: VideoUpdateFuncPtr_t
#include "Debug.h"
#include "Disk.h"
#include "Frame.h"
#include "Keyboard.h"
#include "Log.h"
#include "Memory.h"
#include "Mockingboard.h"
#include "ParallelPrinter.h"
#include "Registry.h"
#include "Riff.h"
#include "SaveState.h"
#include "SerialComms.h"
#include "SoundCore.h"
#include "Speaker.h"
#include "Tape.h"
#define USE_SPEECH_API

View File

@ -1,6 +1,6 @@
#pragma once
#include "DiskImage.h"
#include "DiskDefs.h"
// Structs used by save-state file

View File

@ -30,6 +30,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "StdAfx.h"
#include "AppleWin.h"
#include "Keyboard.h"
#include "Memory.h"
static bool g_CapsLockAllowed = false;
//---------------------------------------------------------------------------

View File

@ -27,8 +27,18 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
#include "AppleWin.h"
#include "CPU.h"
#include "Frame.h"
#include "Keyboard.h"
#include "Memory.h"
#include "Registry.h"
#include "Video.h"
#include "..\resource\resource.h"
#include "Configuration\PropertySheet.h"
#include "Debugger\Debugger_Color.h" // For NUM_DEBUG_COLORS
#define HALF_PIXEL_SOLID 1
#define HALF_PIXEL_BLEED 0

View File

@ -24,7 +24,11 @@
*
*/
#include "..\stdafx.h"
#include "..\StdAfx.h"
#include "..\AppleWin.h"
#include "..\CPU.h"
#include "..\Memory.h"
#undef IN // Defined in windef.h

View File

@ -14,6 +14,9 @@
// Emula a CPU Z80
#include "StdAfx.h"
#include "AppleWin.h"
#include "Memory.h"
#include "z80emu.h"
// Variaveis