From 6051bc55d0888349694009afb7c58b1008589279 Mon Sep 17 00:00:00 2001 From: Andrea Date: Sat, 24 Feb 2018 15:12:40 +0000 Subject: [PATCH] Changes to ease code compilation in gcc. (#541) Changes to ease code compilation in GCC. Disk_t and HDD contain a std::string and for this reason they need a proper constructor, ZeroMemory is not guaranteed to work. --- source/Applewin.cpp | 10 ++--- source/Applewin.h | 2 +- source/CPU.cpp | 16 ++++---- source/CPU/cpu65d02.h | 2 +- source/CommonVICE/alarm.h | 2 +- source/CommonVICE/interrupt.h | 2 +- source/CommonVICE/mem.h | 2 +- source/Configuration/About.cpp | 8 ++-- source/Configuration/Config.h | 8 ++-- source/Configuration/PageAdvanced.cpp | 10 ++--- source/Configuration/PageConfig.cpp | 12 +++--- source/Configuration/PageConfigTfe.cpp | 10 ++--- source/Configuration/PageConfigTfe.h | 2 +- source/Configuration/PageDisk.cpp | 8 ++-- source/Configuration/PageInput.cpp | 10 ++--- source/Configuration/PageInput.h | 2 +- source/Configuration/PageSound.cpp | 12 +++--- source/Configuration/PropertySheet.cpp | 6 +-- source/Configuration/PropertySheetHelper.cpp | 14 +++---- source/Debugger/Debug.cpp | 18 ++++----- source/Debugger/Debug.h | 4 +- source/Debugger/Debugger_Assembler.cpp | 6 +-- source/Debugger/Debugger_Commands.cpp | 2 +- source/Debugger/Debugger_Display.cpp | 12 +++--- source/Debugger/Debugger_Help.cpp | 2 +- source/Debugger/Debugger_Parser.cpp | 4 +- source/Debugger/Debugger_Symbols.cpp | 2 +- source/Disk.cpp | 20 +++++----- source/Disk.h | 38 ++++++++++--------- source/DiskImage.cpp | 2 +- source/DiskImageHelper.cpp | 40 +++++++++----------- source/DiskImageHelper.h | 4 +- source/Frame.cpp | 8 ++-- source/Harddisk.cpp | 40 ++++++++++++++++---- source/Harddisk.h | 1 + source/Joystick.cpp | 4 +- source/Keyboard.cpp | 2 +- source/Memory.cpp | 16 +++++--- source/Mockingboard.cpp | 2 +- source/MouseInterface.cpp | 6 +-- source/NTSC.cpp | 2 +- source/NTSC_CharSet.cpp | 2 +- source/ParallelPrinter.cpp | 6 +-- source/Pravets.cpp | 2 +- source/Registry.h | 2 + source/Riff.cpp | 2 +- source/SAM.cpp | 2 +- source/SaveState.cpp | 10 ++--- source/SerialComms.cpp | 4 +- source/SoundCore.cpp | 2 +- source/Speaker.cpp | 4 +- source/Tape.cpp | 2 +- source/Tfe/Tfe.cpp | 6 +-- source/Tfe/Tfe.h | 2 +- source/Tfe/Tfearch.h | 2 +- source/Video.cpp | 6 +-- source/YamlHelper.cpp | 4 +- source/Z80VICE/daa.cpp | 2 +- source/Z80VICE/daa.h | 2 +- source/Z80VICE/z80.cpp | 20 +++++----- source/Z80VICE/z80mem.cpp | 2 +- source/Z80VICE/z80mem.h | 4 +- source/Z80VICE/z80regs.h | 2 +- source/z80emu.cpp | 2 +- test/TestCPU6502/TestCPU6502.cpp | 8 ++-- 65 files changed, 253 insertions(+), 220 deletions(-) diff --git a/source/Applewin.cpp b/source/Applewin.cpp index 1ff05a0e..b85ec2e5 100644 --- a/source/Applewin.cpp +++ b/source/Applewin.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "CPU.h" #include "Debug.h" #include "Disk.h" @@ -53,14 +53,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Video.h" #include "NTSC.h" -#include "Configuration\About.h" -#include "Configuration\PropertySheet.h" -#include "Tfe\Tfe.h" +#include "Configuration/About.h" +#include "Configuration/PropertySheet.h" +#include "Tfe/Tfe.h" static UINT16 g_AppleWinVersion[4] = {0}; char VERSIONSTRING[16] = "xx.yy.zz.ww"; -TCHAR *g_pAppTitle = NULL; +const TCHAR *g_pAppTitle = NULL; eApple2Type g_Apple2Type = A2TYPE_APPLE2EENHANCED; diff --git a/source/Applewin.h b/source/Applewin.h index 220fb39c..16c047bc 100644 --- a/source/Applewin.h +++ b/source/Applewin.h @@ -12,7 +12,7 @@ bool SetCurrentImageDir(const char* pszImageDir); extern const UINT16* GetAppleWinVersion(void); extern char VERSIONSTRING[]; // Constructed in WinMain() -extern TCHAR *g_pAppTitle; +extern const TCHAR *g_pAppTitle; extern eApple2Type g_Apple2Type; eApple2Type GetApple2Type(void); diff --git a/source/CPU.cpp b/source/CPU.cpp index f6bdc0fd..a5ea247a 100644 --- a/source/CPU.cpp +++ b/source/CPU.cpp @@ -86,7 +86,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "CPU.h" #include "Frame.h" #include "Memory.h" @@ -99,8 +99,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "NTSC.h" #include "z80emu.h" -#include "Z80VICE\z80.h" -#include "Z80VICE\z80mem.h" +#include "Z80VICE/z80.h" +#include "Z80VICE/z80mem.h" #include "YamlHelper.h" @@ -195,9 +195,9 @@ void SetActiveCpu(eCpuType cpu) // -#include "cpu/cpu_general.inl" +#include "CPU/cpu_general.inl" -#include "cpu/cpu_instructions.inl" +#include "CPU/cpu_instructions.inl" // Break into debugger on invalid opcodes //#define INV IsDebugBreakOnInvalid(AM_1); @@ -429,9 +429,9 @@ static __forceinline void CheckInterruptSources(ULONG uExecutedCycles) //=========================================================================== -#include "cpu/cpu6502.h" // MOS 6502 -#include "cpu/cpu65C02.h" // WDC 65C02 -#include "cpu/cpu65d02.h" // Debug CPU Memory Visualizer +#include "CPU/cpu6502.h" // MOS 6502 +#include "CPU/cpu65C02.h" // WDC 65C02 +#include "CPU/cpu65d02.h" // Debug CPU Memory Visualizer //=========================================================================== diff --git a/source/CPU/cpu65d02.h b/source/CPU/cpu65d02.h index 7161f824..e7e5b2e9 100644 --- a/source/CPU/cpu65d02.h +++ b/source/CPU/cpu65d02.h @@ -91,7 +91,7 @@ inline u8 ReadByte( u16 addr, int uExecutedCycles ) IOWrite[(addr>>4) & 0xFF](regs.pc,addr,1,(BYTE)(a),uExecutedCycles); \ } -#include "cpu/cpu_instructions.inl" +#include "CPU/cpu_instructions.inl" //=========================================================================== diff --git a/source/CommonVICE/alarm.h b/source/CommonVICE/alarm.h index ea166f2b..a2400afd 100644 --- a/source/CommonVICE/alarm.h +++ b/source/CommonVICE/alarm.h @@ -28,7 +28,7 @@ #ifndef _ALARM_H #define _ALARM_H -#include "..\CommonVICE\types.h" +#include "../CommonVICE/types.h" #define ALARM_CONTEXT_MAX_PENDING_ALARMS 0x100 diff --git a/source/CommonVICE/interrupt.h b/source/CommonVICE/interrupt.h index 2961a0b5..58e976d4 100644 --- a/source/CommonVICE/interrupt.h +++ b/source/CommonVICE/interrupt.h @@ -31,7 +31,7 @@ #include -#include "..\CommonVICE\types.h" +#include "../CommonVICE/types.h" /* Define the number of cycles needed by the CPU to detect the NMI or IRQ. */ #define INTERRUPT_DELAY 2 diff --git a/source/CommonVICE/mem.h b/source/CommonVICE/mem.h index 26f1a4b9..c8da5fa7 100644 --- a/source/CommonVICE/mem.h +++ b/source/CommonVICE/mem.h @@ -29,7 +29,7 @@ #ifndef _MEM_H_ #define _MEM_H_ -#include "..\CommonVICE\types.h" +#include "../CommonVICE/types.h" typedef BYTE REGPARM1 read_func_t(WORD addr); typedef read_func_t *read_func_ptr_t; diff --git a/source/Configuration/About.cpp b/source/Configuration/About.cpp index 1d862b70..bc082cc9 100644 --- a/source/Configuration/About.cpp +++ b/source/Configuration/About.cpp @@ -21,11 +21,11 @@ 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 "StdAfx.h" -#include "..\AppleWin.h" -#include "..\Frame.h" -#include "..\resource\resource.h" +#include "../Applewin.h" +#include "../Frame.h" +#include "../resource/resource.h" static const char g_szGPL[] = "This program 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.\r\n\ diff --git a/source/Configuration/Config.h b/source/Configuration/Config.h index 36be83af..657a28e1 100644 --- a/source/Configuration/Config.h +++ b/source/Configuration/Config.h @@ -1,9 +1,9 @@ #pragma once -#include "..\AppleWin.h" -#include "..\CPU.h" -#include "..\Disk.h" // BOOL enhancedisk -#include "..\HardDisk.h" // HD_CardIsEnabled() +#include "../Applewin.h" +#include "../CPU.h" +#include "../Disk.h" // BOOL enhancedisk +#include "../Harddisk.h" // HD_CardIsEnabled() class CConfigNeedingRestart { diff --git a/source/Configuration/PageAdvanced.cpp b/source/Configuration/PageAdvanced.cpp index e96cc063..d7ed2d7a 100644 --- a/source/Configuration/PageAdvanced.cpp +++ b/source/Configuration/PageAdvanced.cpp @@ -22,12 +22,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "StdAfx.h" -#include "..\Common.h" +#include "../Common.h" -#include "..\ParallelPrinter.h" -#include "..\Registry.h" -#include "..\SaveState.h" -#include "..\resource\resource.h" +#include "../ParallelPrinter.h" +#include "../Registry.h" +#include "../SaveState.h" +#include "../resource/resource.h" #include "PageAdvanced.h" #include "PropertySheetHelper.h" diff --git a/source/Configuration/PageConfig.cpp b/source/Configuration/PageConfig.cpp index 656ba2c5..6edd612a 100644 --- a/source/Configuration/PageConfig.cpp +++ b/source/Configuration/PageConfig.cpp @@ -23,12 +23,12 @@ 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 "../Applewin.h" +#include "../Frame.h" +#include "../Registry.h" +#include "../SerialComms.h" +#include "../Video.h" +#include "../resource/resource.h" #include "PageConfig.h" #include "PropertySheetHelper.h" diff --git a/source/Configuration/PageConfigTfe.cpp b/source/Configuration/PageConfigTfe.cpp index 96cc5814..c12f644b 100644 --- a/source/Configuration/PageConfigTfe.cpp +++ b/source/Configuration/PageConfigTfe.cpp @@ -23,11 +23,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "StdAfx.h" -#include "..\Common.h" -#include "..\Registry.h" -#include "..\resource\resource.h" -#include "..\Tfe\Tfe.h" -#include "..\Tfe\Tfesupp.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 diff --git a/source/Configuration/PageConfigTfe.h b/source/Configuration/PageConfigTfe.h index 96388d4a..58f8bd2c 100644 --- a/source/Configuration/PageConfigTfe.h +++ b/source/Configuration/PageConfigTfe.h @@ -1,7 +1,7 @@ #pragma once #include "IPropertySheetPage.h" -#include "..\Tfe\Uilib.h" +#include "../Tfe/Uilib.h" class CPageConfigTfe : private IPropertySheetPage { diff --git a/source/Configuration/PageDisk.cpp b/source/Configuration/PageDisk.cpp index 757ada9e..00968b67 100644 --- a/source/Configuration/PageDisk.cpp +++ b/source/Configuration/PageDisk.cpp @@ -23,10 +23,10 @@ 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 "../Applewin.h" +#include "../Frame.h" +#include "../Registry.h" +#include "../resource/resource.h" #include "PageDisk.h" #include "PropertySheetHelper.h" diff --git a/source/Configuration/PageInput.cpp b/source/Configuration/PageInput.cpp index 61aec80e..9badd74f 100644 --- a/source/Configuration/PageInput.cpp +++ b/source/Configuration/PageInput.cpp @@ -22,12 +22,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "StdAfx.h" -#include "..\SaveState_Structs_common.h" -#include "..\Common.h" +#include "../SaveState_Structs_common.h" +#include "../Common.h" -#include "..\Keyboard.h" -#include "..\Registry.h" -#include "..\resource\resource.h" +#include "../Keyboard.h" +#include "../Registry.h" +#include "../resource/resource.h" #include "PageInput.h" #include "PropertySheetHelper.h" diff --git a/source/Configuration/PageInput.h b/source/Configuration/PageInput.h index 163606f8..1c2641e2 100644 --- a/source/Configuration/PageInput.h +++ b/source/Configuration/PageInput.h @@ -2,7 +2,7 @@ #include "IPropertySheetPage.h" #include "PropertySheetDefs.h" -#include "..\Joystick.h" +#include "../Joystick.h" class CPropertySheetHelper; class CConfigNeedingRestart; diff --git a/source/Configuration/PageSound.cpp b/source/Configuration/PageSound.cpp index 5e94acf7..c132b47d 100644 --- a/source/Configuration/PageSound.cpp +++ b/source/Configuration/PageSound.cpp @@ -22,13 +22,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "StdAfx.h" -#include "..\SaveState_Structs_common.h" -#include "..\Common.h" +#include "../SaveState_Structs_common.h" +#include "../Common.h" -#include "..\Mockingboard.h" -#include "..\Registry.h" -#include "..\Speaker.h" -#include "..\resource\resource.h" +#include "../Mockingboard.h" +#include "../Registry.h" +#include "../Speaker.h" +#include "../resource/resource.h" #include "PageSound.h" #include "PropertySheetHelper.h" diff --git a/source/Configuration/PropertySheet.cpp b/source/Configuration/PropertySheet.cpp index 293f22c9..71848beb 100644 --- a/source/Configuration/PropertySheet.cpp +++ b/source/Configuration/PropertySheet.cpp @@ -29,9 +29,9 @@ 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" +#include "../Applewin.h" +#include "../Frame.h" +#include "../resource/resource.h" #include "PropertySheet.h" void CPropertySheet::Init(void) diff --git a/source/Configuration/PropertySheetHelper.cpp b/source/Configuration/PropertySheetHelper.cpp index b2d7040c..35c2bbaf 100644 --- a/source/Configuration/PropertySheetHelper.cpp +++ b/source/Configuration/PropertySheetHelper.cpp @@ -21,14 +21,14 @@ 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 "StdAfx.h" -#include "..\AppleWin.h" // g_nAppMode, g_uScrollLockToggle, sg_PropertySheet -#include "..\Disk.h" -#include "..\Frame.h" -#include "..\Log.h" -#include "..\Registry.h" -#include "..\SaveState.h" +#include "../Applewin.h" // g_nAppMode, g_uScrollLockToggle, sg_PropertySheet +#include "../Disk.h" +#include "../Frame.h" +#include "../Log.h" +#include "../Registry.h" +#include "../SaveState.h" #include "IPropertySheet.h" #include "PropertySheetHelper.h" diff --git a/source/Debugger/Debug.cpp b/source/Debugger/Debug.cpp index 495c7c01..a9dfdb89 100644 --- a/source/Debugger/Debug.cpp +++ b/source/Debugger/Debug.cpp @@ -34,15 +34,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #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 "..\NTSC.h" -#include "..\SoundCore.h" // SoundCore_SetFade() -#include "..\Video.h" +#include "../Applewin.h" +#include "../CPU.h" +#include "../Disk.h" +#include "../Frame.h" +#include "../Keyboard.h" +#include "../Memory.h" +#include "../NTSC.h" +#include "../SoundCore.h" // SoundCore_SetFade() +#include "../Video.h" // #define DEBUG_COMMAND_HELP 1 // #define DEBUG_ASM_HASH 1 diff --git a/source/Debugger/Debug.h b/source/Debugger/Debug.h index 27ee49a7..921ec797 100644 --- a/source/Debugger/Debug.h +++ b/source/Debugger/Debug.h @@ -1,7 +1,7 @@ #pragma once -#include "..\SaveState_Structs_v1.h" // For SS_CARD_MOCKINGBOARD -#include "..\Common.h" +#include "../SaveState_Structs_v1.h" // For SS_CARD_MOCKINGBOARD +#include "../Common.h" #include "Debugger_Types.h" #include "Debugger_DisassemblerData.h" diff --git a/source/Debugger/Debugger_Assembler.cpp b/source/Debugger/Debugger_Assembler.cpp index db74dcb5..3fb211a6 100644 --- a/source/Debugger/Debugger_Assembler.cpp +++ b/source/Debugger/Debugger_Assembler.cpp @@ -30,9 +30,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Debug.h" -#include "..\CPU.h" -#include "..\Frame.h" -#include "..\Memory.h" +#include "../CPU.h" +#include "../Frame.h" +#include "../Memory.h" #define DEBUG_ASSEMBLER 0 diff --git a/source/Debugger/Debugger_Commands.cpp b/source/Debugger/Debugger_Commands.cpp index 515504b1..26c7ba48 100644 --- a/source/Debugger/Debugger_Commands.cpp +++ b/source/Debugger/Debugger_Commands.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Debug.h" -#include "..\Frame.h" +#include "../Frame.h" // Commands _______________________________________________________________________________________ diff --git a/source/Debugger/Debugger_Display.cpp b/source/Debugger/Debugger_Display.cpp index 15e8932e..362b57ff 100644 --- a/source/Debugger/Debugger_Display.cpp +++ b/source/Debugger/Debugger_Display.cpp @@ -31,12 +31,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #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" +#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 diff --git a/source/Debugger/Debugger_Help.cpp b/source/Debugger/Debugger_Help.cpp index 4b8c54e0..6e6c19c4 100644 --- a/source/Debugger/Debugger_Help.cpp +++ b/source/Debugger/Debugger_Help.cpp @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Debug.h" -#include "..\AppleWin.h" +#include "../Applewin.h" #define DEBUG_COLOR_CONSOLE 0 diff --git a/source/Debugger/Debugger_Parser.cpp b/source/Debugger/Debugger_Parser.cpp index ebd3e02f..f28a4b8d 100644 --- a/source/Debugger/Debugger_Parser.cpp +++ b/source/Debugger/Debugger_Parser.cpp @@ -30,8 +30,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Debug.h" -#include "..\CPU.h" -#include "..\Memory.h" +#include "../CPU.h" +#include "../Memory.h" // Args ___________________________________________________________________________________________ diff --git a/source/Debugger/Debugger_Symbols.cpp b/source/Debugger/Debugger_Symbols.cpp index d84b430e..e140f212 100644 --- a/source/Debugger/Debugger_Symbols.cpp +++ b/source/Debugger/Debugger_Symbols.cpp @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Debug.h" -#include "..\AppleWin.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 diff --git a/source/Disk.cpp b/source/Disk.cpp index 2f0eea65..87c43e15 100644 --- a/source/Disk.cpp +++ b/source/Disk.cpp @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "SaveState_Structs_v1.h" -#include "AppleWin.h" +#include "Applewin.h" #include "CPU.h" #include "Disk.h" #include "DiskLog.h" @@ -45,7 +45,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Video.h" #include "YamlHelper.h" -#include "..\resource\resource.h" +#include "../resource/resource.h" #if LOG_DISK_NIBBLES_USE_RUNTIME_VAR static bool g_bLogDisk_NibblesRW = false; // From VS Debugger, change this to true/false during runtime for precise nibble logging @@ -92,7 +92,7 @@ const char* DiskGetDiskPathFilename(const int iDrive) return g_aFloppyDisk[iDrive].fullname; } -char* DiskGetCurrentState(void) +const char* DiskGetCurrentState(void) { if (g_aFloppyDisk[currdrive].imagehandle == NULL) return "Empty"; @@ -134,7 +134,7 @@ void Disk_LoadLastDiskImage(const int iDrive) char sFilePath[ MAX_PATH + 1]; sFilePath[0] = 0; - char *pRegKey = (iDrive == DRIVE_1) + const char *pRegKey = (iDrive == DRIVE_1) ? REGVALUE_PREF_LAST_DISK_1 : REGVALUE_PREF_LAST_DISK_2; @@ -541,7 +541,7 @@ void DiskInitialize(void) { int loop = NUM_DRIVES; while (loop--) - ZeroMemory(&g_aFloppyDisk[loop], sizeof(Disk_t)); + g_aFloppyDisk[loop].clear(); } //=========================================================================== @@ -557,7 +557,7 @@ ImageError_e DiskInsert(const int iDrive, LPCTSTR pszImageFilename, const bool b { int track = fptr->track; int phase = fptr->phase; - ZeroMemory(fptr, sizeof(Disk_t)); + fptr->clear(); fptr->track = track; fptr->phase = phase; } @@ -1256,7 +1256,7 @@ int DiskSetSnapshot_v1(const SS_CARD_DISK2* const pSS) for(UINT i=0; i track; - track.resize(NIBBLES_PER_TRACK); - memset(&track[0], 0, track.size()); + std::vector track(NIBBLES_PER_TRACK); if (yamlLoadHelper.GetSubMap(SS_YAML_KEY_TRACK_IMAGE)) { yamlLoadHelper.LoadMemory(&track[0], NIBBLES_PER_TRACK); @@ -1505,7 +1503,7 @@ bool DiskLoadSnapshot(class YamlLoadHelper& yamlLoadHelper, UINT slot, UINT vers for(UINT i=0; i ImageReadTrack() - const Disk_t& operator= (const Disk_t& other) + Disk_t() { - memcpy(imagename, other.imagename, sizeof(imagename)); - memcpy(fullname , other.fullname, sizeof(fullname)); - strFilenameInZip = other.strFilenameInZip; - imagehandle = other.imagehandle; - bWriteProtected = other.bWriteProtected; - track = other.track; - trackimage = other.trackimage; - phase = other.phase; - byte = other.byte; - trackimagedata = other.trackimagedata; - trackimagedirty = other.trackimagedirty; - spinning = other.spinning; - writelight = other.writelight; - nibbles = other.nibbles; - return *this; + clear(); + } + + void clear() + { + ZeroMemory(imagename, sizeof(imagename)); + ZeroMemory(fullname, sizeof(fullname)); + strFilenameInZip.clear(); + imagehandle = NULL; + bWriteProtected = false; + track = 0; + trackimage = NULL; + phase = 0; + byte = 0; + trackimagedata = FALSE; + trackimagedirty = FALSE; + spinning = 0; + writelight = 0; + nibbles = 0; } }; diff --git a/source/DiskImage.cpp b/source/DiskImage.cpp index 3db7b727..6640124c 100644 --- a/source/DiskImage.cpp +++ b/source/DiskImage.cpp @@ -236,7 +236,7 @@ bool ImageIsMultiFileZip(ImageInfo* const pImageInfo) const char* ImageGetPathname(ImageInfo* const pImageInfo) { - static char* szEmpty = ""; + static const char* szEmpty = ""; return pImageInfo ? pImageInfo->szFilename : szEmpty; } diff --git a/source/DiskImageHelper.cpp b/source/DiskImageHelper.cpp index 56b9f688..dbabe768 100644 --- a/source/DiskImageHelper.cpp +++ b/source/DiskImageHelper.cpp @@ -27,12 +27,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "stdafx.h" +#include "StdAfx.h" #include "Common.h" #include "zlib.h" #include "unzip.h" -#include "iowin32.h" #include "CPU.h" #include "Disk.h" @@ -650,8 +649,8 @@ public: virtual UINT GetImageSizeForCreate(void) { return TRACK_DENIBBLIZED_SIZE * TRACKS_STANDARD; } virtual eImageType GetType(void) { return eImageDO; } - virtual char* GetCreateExtensions(void) { return ".do;.dsk"; } - virtual char* GetRejectExtensions(void) { return ".nib;.iie;.po;.prg"; } + virtual const char* GetCreateExtensions(void) { return ".do;.dsk"; } + virtual const char* GetRejectExtensions(void) { return ".nib;.iie;.po;.prg"; } }; //------------------------------------- @@ -713,8 +712,8 @@ public: } virtual eImageType GetType(void) { return eImagePO; } - virtual char* GetCreateExtensions(void) { return ".po"; } - virtual char* GetRejectExtensions(void) { return ".do;.iie;.nib;.prg"; } + virtual const char* GetCreateExtensions(void) { return ".po"; } + virtual const char* GetRejectExtensions(void) { return ".do;.iie;.nib;.prg"; } }; //------------------------------------- @@ -753,8 +752,8 @@ public: virtual UINT GetImageSizeForCreate(void) { return NIB1_TRACK_SIZE * TRACKS_STANDARD; } virtual eImageType GetType(void) { return eImageNIB1; } - virtual char* GetCreateExtensions(void) { return ".nib"; } - virtual char* GetRejectExtensions(void) { return ".do;.iie;.po;.prg"; } + virtual const char* GetCreateExtensions(void) { return ".nib"; } + virtual const char* GetRejectExtensions(void) { return ".do;.iie;.po;.prg"; } }; //------------------------------------- @@ -790,8 +789,8 @@ public: } virtual eImageType GetType(void) { return eImageNIB2; } - virtual char* GetCreateExtensions(void) { return ".nb2"; } - virtual char* GetRejectExtensions(void) { return ".do;.iie;.po;.prg;.2mg;.2img"; } + virtual const char* GetCreateExtensions(void) { return ".nb2"; } + virtual const char* GetRejectExtensions(void) { return ".do;.iie;.po;.prg;.2mg;.2img"; } }; //------------------------------------- @@ -831,8 +830,8 @@ public: } virtual eImageType GetType(void) { return eImageHDV; } - virtual char* GetCreateExtensions(void) { return ".hdv"; } - virtual char* GetRejectExtensions(void) { return ".do;.iie;.prg"; } + virtual const char* GetCreateExtensions(void) { return ".hdv"; } + virtual const char* GetRejectExtensions(void) { return ".do;.iie;.prg"; } }; //------------------------------------- @@ -900,8 +899,8 @@ public: } virtual eImageType GetType(void) { return eImageIIE; } - virtual char* GetCreateExtensions(void) { return ".iie"; } - virtual char* GetRejectExtensions(void) { return ".do.;.nib;.po;.prg;.2mg;.2img"; } + virtual const char* GetCreateExtensions(void) { return ".iie"; } + virtual const char* GetRejectExtensions(void) { return ".do.;.nib;.po;.prg;.2mg;.2img"; } private: void ConvertSectorOrder(LPBYTE sourceorder) @@ -974,8 +973,8 @@ public: virtual bool AllowRW(void) { return false; } virtual eImageType GetType(void) { return eImageAPL; } - virtual char* GetCreateExtensions(void) { return ".apl"; } - virtual char* GetRejectExtensions(void) { return ".do;.dsk;.iie;.nib;.po;.2mg;.2img"; } + virtual const char* GetCreateExtensions(void) { return ".apl"; } + virtual const char* GetRejectExtensions(void) { return ".do;.dsk;.iie;.nib;.po;.2mg;.2img"; } }; //------------------------------------- @@ -1025,8 +1024,8 @@ public: virtual bool AllowRW(void) { return false; } virtual eImageType GetType(void) { return eImagePRG; } - virtual char* GetCreateExtensions(void) { return ".prg"; } - virtual char* GetRejectExtensions(void) { return ".do;.dsk;.iie;.nib;.po;.2mg;.2img"; } + virtual const char* GetCreateExtensions(void) { return ".prg"; } + virtual const char* GetRejectExtensions(void) { return ".do;.dsk;.iie;.nib;.po;.2mg;.2img"; } }; //----------------------------------------------------------------------------- @@ -1208,10 +1207,7 @@ ImageError_e CImageHelperBase::CheckGZipFile(LPCTSTR pszImageFilename, ImageInfo ImageError_e CImageHelperBase::CheckZipFile(LPCTSTR pszImageFilename, ImageInfo* pImageInfo, std::string& strFilenameInZip) { - zlib_filefunc_def ffunc; - fill_win32_filefunc(&ffunc); // TODO: Ditch this and use unzOpen() instead? - - unzFile hZipFile = unzOpen2(pszImageFilename, &ffunc); + unzFile hZipFile = unzOpen(pszImageFilename); if (hZipFile == NULL) return eIMAGE_ERROR_UNABLE_TO_OPEN_ZIP; diff --git a/source/DiskImageHelper.h b/source/DiskImageHelper.h index 2b8a8a4d..3eaafe23 100644 --- a/source/DiskImageHelper.h +++ b/source/DiskImageHelper.h @@ -65,8 +65,8 @@ public: virtual UINT GetImageSizeForCreate(void) { _ASSERT(0); return (UINT)-1; } virtual eImageType GetType(void) = 0; - virtual char* GetCreateExtensions(void) = 0; - virtual char* GetRejectExtensions(void) = 0; + virtual const char* GetCreateExtensions(void) = 0; + virtual const char* GetRejectExtensions(void) = 0; void SetVolumeNumber(const BYTE uVolumeNumber) { m_uVolumeNumber = uVolumeNumber; } bool IsValidImageSize(const DWORD uImageSize); diff --git a/source/Frame.cpp b/source/Frame.cpp index 6618a91f..efcd19fc 100644 --- a/source/Frame.cpp +++ b/source/Frame.cpp @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "StdAfx.h" #include -#include "AppleWin.h" +#include "Applewin.h" #include "CPU.h" #include "Disk.h" #include "DiskImage.h" @@ -52,9 +52,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #endif #include "Video.h" -#include "..\resource\resource.h" -#include "Configuration\PropertySheet.h" -#include "Debugger\Debug.h" +#include "../resource/resource.h" +#include "Configuration/PropertySheet.h" +#include "Debugger/Debug.h" //#define ENABLE_MENU 0 diff --git a/source/Harddisk.cpp b/source/Harddisk.cpp index 7132dfe4..a2147916 100644 --- a/source/Harddisk.cpp +++ b/source/Harddisk.cpp @@ -28,16 +28,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "DiskImage.h" // ImageError_e, Disk_Status_e #include "DiskImageHelper.h" #include "Frame.h" -#include "HardDisk.h" +#include "Harddisk.h" #include "Memory.h" #include "Registry.h" #include "YamlHelper.h" -#include "..\resource\resource.h" +#include "../resource/resource.h" /* Memory map: @@ -114,6 +114,32 @@ Overview struct HDD { + HDD() + { + clear(); + } + + void clear() + { + // This is not a POD (there is a std::string) + // ZeroMemory does not work + ZeroMemory(imagename, sizeof(imagename)); + ZeroMemory(fullname, sizeof(fullname)); + strFilenameInZip.clear(); + imagehandle = NULL; + bWriteProtected = false; + hd_error = 0; + hd_memblock = 0; + hd_diskblock = 0; + hd_buf_ptr = 0; + hd_imageloaded = false; + ZeroMemory(hd_buf, sizeof(hd_buf)); +#if HD_LED + hd_status_next = DISK_STATUS_OFF; + hd_status_prev = DISK_STATUS_OFF; +#endif + } + // From Disk_t TCHAR imagename[ MAX_DISK_IMAGE_NAME + 1 ]; // (ie. no extension) [not used] TCHAR fullname[ MAX_DISK_FULL_NAME + 1 ]; // or @@ -143,7 +169,7 @@ static BYTE g_nHD_UnitNum = HARDDISK_1<<7; // b7=unit // . ProDOS will write to Command before switching drives static BYTE g_nHD_Command; -static HDD g_HardDisk[NUM_HARDDISKS] = {0}; +static HDD g_HardDisk[NUM_HARDDISKS]; static bool g_bSaveDiskImage = true; // Save the DiskImage name to Registry static UINT g_uSlot = 7; @@ -187,7 +213,7 @@ void HD_LoadLastDiskImage(const int iDrive) char sFilePath[ MAX_PATH + 1]; sFilePath[0] = 0; - char *pRegKey = (iDrive == HARDDISK_1) + const char *pRegKey = (iDrive == HARDDISK_1) ? REGVALUE_PREF_LAST_HARDDISK_1 : REGVALUE_PREF_LAST_HARDDISK_2; @@ -340,7 +366,7 @@ void HD_Destroy(void) } // pszImageFilename is qualified with path -static BOOL HD_Insert(const int iDrive, LPCTSTR pszImageFilename) +BOOL HD_Insert(const int iDrive, LPCTSTR pszImageFilename) { if (*pszImageFilename == 0x00) return FALSE; @@ -806,7 +832,7 @@ bool HD_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version, co for (UINT i=0; i extern bool g_bDisableDirectInput; // currently in AppleWin.h diff --git a/source/NTSC.cpp b/source/NTSC.cpp index bd8cc8c7..b3ed5520 100644 --- a/source/NTSC.cpp +++ b/source/NTSC.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Includes #include "StdAfx.h" - #include "AppleWin.h" + #include "Applewin.h" #include "CPU.h" #include "Frame.h" // FRAMEBUFFER_W FRAMEBUFFER_H #include "Memory.h" // MemGetMainPtr() MemGetBankPtr() diff --git a/source/NTSC_CharSet.cpp b/source/NTSC_CharSet.cpp index ce940e51..4fa37822 100644 --- a/source/NTSC_CharSet.cpp +++ b/source/NTSC_CharSet.cpp @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "NTSC_CharSet.h" diff --git a/source/ParallelPrinter.cpp b/source/ParallelPrinter.cpp index f17609db..71609517 100644 --- a/source/ParallelPrinter.cpp +++ b/source/ParallelPrinter.cpp @@ -28,13 +28,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "Memory.h" #include "ParallelPrinter.h" #include "Registry.h" #include "YamlHelper.h" -#include "..\resource\resource.h" +#include "../resource/resource.h" static DWORD inactivity = 0; static unsigned int g_PrinterIdleLimit = 10; @@ -169,7 +169,7 @@ static BYTE __stdcall PrintTransmit(WORD, WORD, BYTE, BYTE value, ULONG) return 0; } - char c = NULL; + char c = 0; if ((g_Apple2Type == A2TYPE_PRAVETS8A) && g_bConvertEncoding) //This is print conversion for Pravets 8A/C. Print conversion for Pravets82/M is still to be done. { if ((value > 90) && (value < 128)) //This range shall be set more precisely diff --git a/source/Pravets.cpp b/source/Pravets.cpp index 296cf4f7..a216c62c 100644 --- a/source/Pravets.cpp +++ b/source/Pravets.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "Frame.h" #include "Keyboard.h" #include "Tape.h" diff --git a/source/Registry.h b/source/Registry.h index a9f2b990..62defc4d 100644 --- a/source/Registry.h +++ b/source/Registry.h @@ -7,3 +7,5 @@ BOOL RegLoadString (LPCTSTR,LPCTSTR,BOOL,LPTSTR,DWORD); BOOL RegLoadValue (LPCTSTR,LPCTSTR,BOOL,DWORD *); void RegSaveString (LPCTSTR,LPCTSTR,BOOL,LPCTSTR); void RegSaveValue (LPCTSTR,LPCTSTR,BOOL,DWORD); + +BOOL RegLoadValue (LPCTSTR,LPCTSTR,BOOL,BOOL *); diff --git a/source/Riff.cpp b/source/Riff.cpp index 0f914e0a..19897a99 100644 --- a/source/Riff.cpp +++ b/source/Riff.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Author: Various */ -#include "Stdafx.h" +#include "StdAfx.h" #include "Riff.h" static HANDLE g_hRiffFile = INVALID_HANDLE_VALUE; diff --git a/source/SAM.cpp b/source/SAM.cpp index 2fa4c420..84a56ed4 100644 --- a/source/SAM.cpp +++ b/source/SAM.cpp @@ -32,7 +32,7 @@ */ #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "Memory.h" #include "SAM.h" #include "Speaker.h" diff --git a/source/SaveState.cpp b/source/SaveState.cpp index aa64fad9..ad762717 100644 --- a/source/SaveState.cpp +++ b/source/SaveState.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "SaveState_Structs_v1.h" #include "YamlHelper.h" -#include "AppleWin.h" +#include "Applewin.h" #include "CPU.h" #include "Disk.h" #include "Frame.h" @@ -48,8 +48,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Video.h" #include "z80emu.h" -#include "Configuration\Config.h" -#include "Configuration\IPropertySheet.h" +#include "Configuration/Config.h" +#include "Configuration/IPropertySheet.h" #define DEFAULT_SNAPSHOT_NAME "SaveState.aws.yaml" @@ -138,10 +138,10 @@ static void Snapshot_LoadState_v1() // .aws v1.0.0.1, up to (and including) Appl HANDLE hFile = CreateFile( g_strSaveStatePathname.c_str(), GENERIC_READ, 0, - NULL, + 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, - NULL); + 0); if(hFile == INVALID_HANDLE_VALUE) throw std::string("File not found: ") + g_strSaveStatePathname; diff --git a/source/SerialComms.cpp b/source/SerialComms.cpp index c63533a5..10627676 100644 --- a/source/SerialComms.cpp +++ b/source/SerialComms.cpp @@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "CPU.h" #include "Disk.h" // DiskIsSpinning() #include "Frame.h" @@ -48,7 +48,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "SerialComms.h" #include "YamlHelper.h" -#include "..\resource\resource.h" +#include "../resource/resource.h" //#define SUPPORT_MODEM #define TCP_SERIAL_PORT 1977 diff --git a/source/SoundCore.cpp b/source/SoundCore.cpp index 4733bc5e..d3963f98 100644 --- a/source/SoundCore.cpp +++ b/source/SoundCore.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "Frame.h" #include "SoundCore.h" #include "Speaker.h" diff --git a/source/Speaker.cpp b/source/Speaker.cpp index f565e3c0..712b4b2b 100644 --- a/source/Speaker.cpp +++ b/source/Speaker.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "CPU.h" #include "Frame.h" #include "Memory.h" @@ -37,7 +37,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Video.h" // VideoRedrawScreen() #include "YamlHelper.h" -#include "Debugger\Debug.h" // For DWORD extbench +#include "Debugger/Debug.h" // For DWORD extbench // Notes: // diff --git a/source/Tape.cpp b/source/Tape.cpp index 76eb8084..cbf437f2 100644 --- a/source/Tape.cpp +++ b/source/Tape.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "Keyboard.h" #include "Memory.h" #include "Pravets.h" diff --git a/source/Tfe/Tfe.cpp b/source/Tfe/Tfe.cpp index 14fb65f9..b0630d13 100644 --- a/source/Tfe/Tfe.cpp +++ b/source/Tfe/Tfe.cpp @@ -24,7 +24,7 @@ * */ -#include "..\StdAfx.h" +#include "../StdAfx.h" #include #include @@ -43,8 +43,8 @@ #endif typedef unsigned int UINT; -#include "..\Common.h" // For: IS_APPLE2 -#include "..\Memory.h" +#include "../Common.h" // For: IS_APPLE2 +#include "../Memory.h" /**/ /** #define TFE_DEBUG_DUMP 1 **/ diff --git a/source/Tfe/Tfe.h b/source/Tfe/Tfe.h index a933249d..5f79cee2 100644 --- a/source/Tfe/Tfe.h +++ b/source/Tfe/Tfe.h @@ -27,7 +27,7 @@ #ifndef _TFE_H #define _TFE_H -#include "..\CommonVICE\types.h" +#include "../CommonVICE/types.h" #include /* define this only if VICE should write each and every frame received diff --git a/source/Tfe/Tfearch.h b/source/Tfe/Tfearch.h index a852f1aa..ecd95f3d 100644 --- a/source/Tfe/Tfearch.h +++ b/source/Tfe/Tfearch.h @@ -28,7 +28,7 @@ #ifndef _TFEARCH_H #define _TFEARCH_H -#include "..\CommonVICE\types.h" +#include "../CommonVICE/types.h" extern int tfe_arch_init(void); extern void tfe_arch_pre_reset(void); diff --git a/source/Video.cpp b/source/Video.cpp index c9c4eedc..670ce778 100644 --- a/source/Video.cpp +++ b/source/Video.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "CPU.h" #include "Frame.h" #include "Keyboard.h" @@ -37,8 +37,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "Video.h" #include "NTSC.h" -#include "..\resource\resource.h" -#include "Configuration\PropertySheet.h" +#include "../resource/resource.h" +#include "Configuration/PropertySheet.h" #include "YamlHelper.h" #define SW_80COL (g_uVideoMode & VF_80COL) diff --git a/source/YamlHelper.cpp b/source/YamlHelper.cpp index 56b519fd..0e9f96cb 100644 --- a/source/YamlHelper.cpp +++ b/source/YamlHelper.cpp @@ -154,7 +154,7 @@ int YamlHelper::ParseMap(MapYaml& mapYaml) mapValue.value = pValue; mapValue.subMap = NULL; mapYaml[std::string(pKey)] = mapValue; - delete [] pKey; pKey = NULL; + free(pKey); pKey = NULL; } bKey = bKey ? false : true; @@ -166,7 +166,7 @@ int YamlHelper::ParseMap(MapYaml& mapYaml) } if (pKey) - delete [] pKey; + free(pKey); return res; } diff --git a/source/Z80VICE/daa.cpp b/source/Z80VICE/daa.cpp index 6618c479..f155df78 100644 --- a/source/Z80VICE/daa.cpp +++ b/source/Z80VICE/daa.cpp @@ -25,7 +25,7 @@ */ #include "daa.h" -#include "..\CommonVICE\types.h" // [AppleWin-TC] +#include "../CommonVICE/types.h" // [AppleWin-TC] const BYTE daa_reg_a[2048] = { diff --git a/source/Z80VICE/daa.h b/source/Z80VICE/daa.h index ede77b9f..30a569c3 100644 --- a/source/Z80VICE/daa.h +++ b/source/Z80VICE/daa.h @@ -27,7 +27,7 @@ #ifndef _DAA_H #define _DAA_H -#include "..\CommonVICE\types.h" // [AppleWin-TC] +#include "../CommonVICE/types.h" // [AppleWin-TC] extern const BYTE daa_reg_a[]; extern const BYTE daa_reg_f[]; diff --git a/source/Z80VICE/z80.cpp b/source/Z80VICE/z80.cpp index 7738cb40..c4b1ba5c 100644 --- a/source/Z80VICE/z80.cpp +++ b/source/Z80VICE/z80.cpp @@ -24,12 +24,12 @@ * */ -#include "..\StdAfx.h" +#include "../StdAfx.h" -#include "..\AppleWin.h" -#include "..\CPU.h" -#include "..\Memory.h" -#include "..\YamlHelper.h" +#include "../Applewin.h" +#include "../CPU.h" +#include "../Memory.h" +#include "../YamlHelper.h" #undef IN // Defined in windef.h @@ -39,15 +39,15 @@ #include -#include "..\CommonVICE\6510core.h" // [AppleWin-TC] -#include "..\CommonVICE\alarm.h" +#include "../CommonVICE/6510core.h" // [AppleWin-TC] +#include "../CommonVICE/alarm.h" #include "daa.h" //#include "debug.h" // [AppleWin-TC] -#include "..\CommonVICE\interrupt.h" +#include "../CommonVICE/interrupt.h" //#include "log.h" // [AppleWin-TC] //#include "maincpu.h" // [AppleWin-TC] //#include "monitor.h" // [AppleWin-TC] -#include "..\CommonVICE\types.h" +#include "../CommonVICE/types.h" #include "z80.h" #include "z80mem.h" #include "z80regs.h" @@ -55,7 +55,7 @@ /*#define DEBUG_Z80*/ -static CLOCK maincpu_clk = 0; // [AppleWin-TC] +CLOCK maincpu_clk = 0; // [AppleWin-TC] static BYTE reg_a = 0; static BYTE reg_b = 0; diff --git a/source/Z80VICE/z80mem.cpp b/source/Z80VICE/z80mem.cpp index d9e21d1b..19bea8e1 100644 --- a/source/Z80VICE/z80mem.cpp +++ b/source/Z80VICE/z80mem.cpp @@ -44,7 +44,7 @@ //#include "vdc.h" //#include "vicii-mem.h" //#include "vicii.h" -#include "..\CommonVICE\types.h" // [AppleWin-TC] +#include "../CommonVICE/types.h" // [AppleWin-TC] #include "z80mem.h" #include "z80.h" // [AppleWin-TC] Added for z80_RDMEM() & z80_WRMEM diff --git a/source/Z80VICE/z80mem.h b/source/Z80VICE/z80mem.h index fc374d7f..091591ba 100644 --- a/source/Z80VICE/z80mem.h +++ b/source/Z80VICE/z80mem.h @@ -30,10 +30,10 @@ #ifdef WATCOM_COMPILE #include "../mem.h" #else -#include "..\CommonVICE\mem.h" // [AppleWin-TC] +#include "../CommonVICE/mem.h" // [AppleWin-TC] #endif -#include "..\CommonVICE\types.h" // [AppleWin-TC] +#include "../CommonVICE/types.h" // [AppleWin-TC] extern int z80mem_resources_init(void); extern int z80mem_cmdline_options_init(void); diff --git a/source/Z80VICE/z80regs.h b/source/Z80VICE/z80regs.h index 54c59e81..e52e89fd 100644 --- a/source/Z80VICE/z80regs.h +++ b/source/Z80VICE/z80regs.h @@ -27,7 +27,7 @@ #ifndef _Z80REGS_H #define _Z80REGS_H -#include "..\CommonVICE\types.h" // [AppleWin-TC] +#include "../CommonVICE/types.h" // [AppleWin-TC] typedef struct z80_regs_s { WORD reg_af; diff --git a/source/z80emu.cpp b/source/z80emu.cpp index 01542099..a60f5bd1 100644 --- a/source/z80emu.cpp +++ b/source/z80emu.cpp @@ -15,7 +15,7 @@ #include "StdAfx.h" -#include "AppleWin.h" +#include "Applewin.h" #include "CPU.h" #include "Memory.h" #include "z80emu.h" diff --git a/test/TestCPU6502/TestCPU6502.cpp b/test/TestCPU6502/TestCPU6502.cpp index c1ca6e41..08342e73 100644 --- a/test/TestCPU6502/TestCPU6502.cpp +++ b/test/TestCPU6502/TestCPU6502.cpp @@ -79,10 +79,10 @@ void NTSC_VideoUpdateCycles( long cycles6502 ) //------------------------------------- -#include "../../source/cpu/cpu_general.inl" -#include "../../source/cpu/cpu_instructions.inl" -#include "../../source/cpu/cpu6502.h" // MOS 6502 -#include "../../source/cpu/cpu65C02.h" // WDC 65C02 +#include "../../source/CPU/cpu_general.inl" +#include "../../source/CPU/cpu_instructions.inl" +#include "../../source/CPU/cpu6502.h" // MOS 6502 +#include "../../source/CPU/cpu65C02.h" // WDC 65C02 void init(void) {