diff --git a/AppleWinExpress2008.sln b/AppleWinExpress2008.sln
index 29bd31cc..aa8e1d14 100644
--- a/AppleWinExpress2008.sln
+++ b/AppleWinExpress2008.sln
@@ -1,12 +1,13 @@
Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppleWin", "AppleWinExpress2008.vcproj", "{1DA0C491-B5F4-4EC8-B1D2-CF6BE635DADC}"
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Applewin", "AppleWinExpress2008.vcproj", "{1DA0C491-B5F4-4EC8-B1D2-CF6BE635DADC}"
ProjectSection(ProjectDependencies) = postProject
{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}
{709278B8-C583-4BD8-90DE-4E4F35A3BD8B} = {709278B8-C583-4BD8-90DE-4E4F35A3BD8B}
+ {0AE28CF0-15B0-4DDF-B6D2-4562D8E456BB} = {0AE28CF0-15B0-4DDF-B6D2-4562D8E456BB}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib-Express2008.vcproj", "{7935B998-C713-42AE-8F6D-9FF9080A1B1B}"
@@ -17,6 +18,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCPU6502", "test\TestCPU
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml", "libyaml\win32\yaml2008.vcproj", "{5CE8051A-3F0C-4C39-B1C0-3338E48BA60F}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestDebugger", "test\TestDebugger\TestDebugger.vcproj", "{0AE28CF0-15B0-4DDF-B6D2-4562D8E456BB}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -43,6 +46,10 @@ Global
{5CE8051A-3F0C-4C39-B1C0-3338E48BA60F}.Debug|Win32.Build.0 = Debug|Win32
{5CE8051A-3F0C-4C39-B1C0-3338E48BA60F}.Release|Win32.ActiveCfg = Release|Win32
{5CE8051A-3F0C-4C39-B1C0-3338E48BA60F}.Release|Win32.Build.0 = Release|Win32
+ {0AE28CF0-15B0-4DDF-B6D2-4562D8E456BB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/AppleWinExpress2008.vcproj b/AppleWinExpress2008.vcproj
index 95f88eb8..0402dd56 100644
--- a/AppleWinExpress2008.vcproj
+++ b/AppleWinExpress2008.vcproj
@@ -26,8 +26,8 @@
>
!"; // input, assembler // NUM_PROMPTS
+ char g_sConsolePrompt[] = ">"; // No, NOT Integer Basic! The nostalgic '*' "Monitor" doesn't look as good, IMHO. :-(
+
+Update_t ConsoleUpdate ()
+{
+ return 0;
+}
+
+bool ConsoleBufferPush ( const char * pText )
+{
+ return false;
+}
+
+bool ConsoleBufferPushVa ( char* buf, size_t bufsz, const char * pFormat, va_list va )
+{
+ return false;
+}
+
+// From Debugger_DisassemblerData.cpp
+DisasmData_t* Disassembly_IsDataAddress ( WORD nAddress )
+{
+ return NULL;
+}
+
+// From Debugger_Parser.cpp
+ int g_nArgRaw;
+ Arg_t g_aArgRaw[ MAX_ARGS ]; // pre-processing
+ Arg_t g_aArgs [ MAX_ARGS ]; // post-processing (cooked)
+
+bool ArgsGetValue ( Arg_t *pArg, WORD * pAddressValue_, const int nBase )
+{
+ return false;
+}
+
+// From Debugger_Symbols.cpp
+bool FindAddressFromSymbol ( const char* pSymbol, WORD * pAddress_, int * iTable_ )
+{
+ return false;
+}
+
+//-------------------------------------
+
+void init(void)
+{
+ mem = (LPBYTE)VirtualAlloc(NULL,64*1024,MEM_COMMIT,PAGE_READWRITE);
+}
+
+void reset(void)
+{
+ regs.a = 0;
+ regs.x = 0;
+ regs.y = 0;
+ regs.pc = 0x300;
+ regs.sp = 0x1FF;
+ regs.ps = 0;
+ regs.bJammed = 0;
+}
+
+//-------------------------------------
+
+int GH445_test_sub_PHn(BYTE op)
+{
+ bool bRes;
+ int TargetAddr[3];
+ int TargetBytes;
+
+ mem[regs.pc] = op;
+
+ regs.sp = 0x1FE;
+ bRes = _6502_GetTargets(regs.pc, &TargetAddr[0], &TargetAddr[1], &TargetAddr[2], &TargetBytes);
+ if (!bRes || TargetAddr[2] != regs.sp) return 1;
+
+ regs.sp = 0x1FF;
+ bRes = _6502_GetTargets(regs.pc, &TargetAddr[0], &TargetAddr[1], &TargetAddr[2], &TargetBytes);
+ if (!bRes || TargetAddr[2] != regs.sp) return 1;
+
+ regs.sp = 0x100;
+ bRes = _6502_GetTargets(regs.pc, &TargetAddr[0], &TargetAddr[1], &TargetAddr[2], &TargetBytes);
+ if (!bRes || TargetAddr[2] != regs.sp) return 1;
+
+ return 0;
+}
+
+int GH445_test_sub_PLn(BYTE op)
+{
+ bool bRes;
+ int TargetAddr[3];
+ int TargetBytes;
+
+ mem[regs.pc] = op;
+
+ regs.sp = 0x1FE;
+ bRes = _6502_GetTargets(regs.pc, &TargetAddr[0], &TargetAddr[1], &TargetAddr[2], &TargetBytes);
+ if (!bRes || TargetAddr[2] != (regs.sp+1)) return 1;
+
+ regs.sp = 0x1FF;
+ bRes = _6502_GetTargets(regs.pc, &TargetAddr[0], &TargetAddr[1], &TargetAddr[2], &TargetBytes);
+ if (!bRes || TargetAddr[2] != 0x100) return 1;
+
+ regs.sp = 0x100;
+ bRes = _6502_GetTargets(regs.pc, &TargetAddr[0], &TargetAddr[1], &TargetAddr[2], &TargetBytes);
+ if (!bRes || TargetAddr[2] != (regs.sp+1)) return 1;
+
+ return 0;
+}
+
+
+int GH445_test_sub(bool bIs65C02)
+{
+ int res;
+
+ regs.pc = 0x300;
+
+ res = GH445_test_sub_PHn(0x08); // PHP
+ if (res) return res;
+ res = GH445_test_sub_PHn(0x48); // PHA
+ if (res) return res;
+
+ if (bIs65C02)
+ {
+ res = GH445_test_sub_PHn(0x5A); // PHY
+ if (res) return res;
+ res = GH445_test_sub_PHn(0xDA); // PHX
+ if (res) return res;
+ }
+
+ //
+
+ res = GH445_test_sub_PLn(0x28); // PLP
+ if (res) return res;
+ res = GH445_test_sub_PLn(0x68); // PLA
+ if (res) return res;
+
+ if (bIs65C02)
+ {
+ res = GH445_test_sub_PLn(0x7A); // PLY
+ if (res) return res;
+ res = GH445_test_sub_PLn(0xFA); // PLX
+ if (res) return res;
+ }
+
+ return 0;
+}
+
+int GH445_test(void)
+{
+ int res;
+
+ g_aOpcodes = g_aOpcodes65C02;
+ res = GH445_test_sub(true);
+ if (res) return res;
+
+ g_aOpcodes = g_aOpcodes6502;
+ res = GH445_test_sub(false);
+
+ return res;
+}
+
+//-------------------------------------
+
+int _tmain(int argc, _TCHAR* argv[])
+{
+ int res = 1;
+ init();
+ reset();
+
+ res = GH445_test();
+ if (res) return res;
+
+ return 0;
+}
diff --git a/test/TestDebugger/TestDebugger.vcproj b/test/TestDebugger/TestDebugger.vcproj
new file mode 100644
index 00000000..b8aa98cb
--- /dev/null
+++ b/test/TestDebugger/TestDebugger.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/TestDebugger/stdafx.cpp b/test/TestDebugger/stdafx.cpp
new file mode 100644
index 00000000..f2e94bd5
--- /dev/null
+++ b/test/TestDebugger/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// TestDebugger.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/test/TestDebugger/stdafx.h b/test/TestDebugger/stdafx.h
new file mode 100644
index 00000000..4bb17e80
--- /dev/null
+++ b/test/TestDebugger/stdafx.h
@@ -0,0 +1,16 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+#include
+#include
+
+#include
+#include
+
+#include
+#include