Merge remote-tracking branch 'upstream/master'
# Conflicts: # source/Disk.h # source/DiskImageHelper.cpp # source/Harddisk.cpp # source/Harddisk.h # source/Memory.cpp Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
commit
afa366259e
43 changed files with 186 additions and 136 deletions
|
@ -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;
|
||||
|
||||
|
@ -777,25 +777,25 @@ void RegisterExtensions(void)
|
|||
// sprintf(command, "\"%s\" \"-d1 %%1\"", szCommandTmp); // Wrap path & filename in quotes & null terminate
|
||||
|
||||
// NB. Reflect extensions in DELREG.INF
|
||||
// RegSetValue(HKEY_CLASSES_ROOT,".bin",REG_SZ,"DiskImage",10); // Removed as .bin is too generic
|
||||
// RegSetValue(HKEY_CLASSES_ROOT,".bin",REG_SZ,"DiskImage",0); // Removed as .bin is too generic
|
||||
long Res = RegDeleteValue(HKEY_CLASSES_ROOT, ".bin"); // TODO: This isn't working :-/
|
||||
|
||||
RegSetValue(HKEY_CLASSES_ROOT,".do" ,REG_SZ,"DiskImage",10);
|
||||
RegSetValue(HKEY_CLASSES_ROOT,".dsk",REG_SZ,"DiskImage",10);
|
||||
RegSetValue(HKEY_CLASSES_ROOT,".nib",REG_SZ,"DiskImage",10);
|
||||
RegSetValue(HKEY_CLASSES_ROOT,".po" ,REG_SZ,"DiskImage",10);
|
||||
// RegSetValue(HKEY_CLASSES_ROOT,".2mg",REG_SZ,"DiskImage",10); // Don't grab this, as not all .2mg images are supported (so defer to CiderPress)
|
||||
// RegSetValue(HKEY_CLASSES_ROOT,".2img",REG_SZ,"DiskImage",10); // Don't grab this, as not all .2mg images are supported (so defer to CiderPress)
|
||||
// RegSetValue(HKEY_CLASSES_ROOT,".aws",REG_SZ,"DiskImage",10); // TO DO
|
||||
// RegSetValue(HKEY_CLASSES_ROOT,".hdv",REG_SZ,"DiskImage",10); // TO DO
|
||||
RegSetValue(HKEY_CLASSES_ROOT,".do" ,REG_SZ,"DiskImage",0);
|
||||
RegSetValue(HKEY_CLASSES_ROOT,".dsk",REG_SZ,"DiskImage",0);
|
||||
RegSetValue(HKEY_CLASSES_ROOT,".nib",REG_SZ,"DiskImage",0);
|
||||
RegSetValue(HKEY_CLASSES_ROOT,".po" ,REG_SZ,"DiskImage",0);
|
||||
// RegSetValue(HKEY_CLASSES_ROOT,".2mg",REG_SZ,"DiskImage",0); // Don't grab this, as not all .2mg images are supported (so defer to CiderPress)
|
||||
// RegSetValue(HKEY_CLASSES_ROOT,".2img",REG_SZ,"DiskImage",0); // Don't grab this, as not all .2mg images are supported (so defer to CiderPress)
|
||||
// RegSetValue(HKEY_CLASSES_ROOT,".aws",REG_SZ,"DiskImage",0); // TO DO
|
||||
// RegSetValue(HKEY_CLASSES_ROOT,".hdv",REG_SZ,"DiskImage",0); // TO DO
|
||||
|
||||
RegSetValue(HKEY_CLASSES_ROOT,
|
||||
"DiskImage",
|
||||
REG_SZ,"Disk Image",21);
|
||||
REG_SZ,"Disk Image",0);
|
||||
|
||||
RegSetValue(HKEY_CLASSES_ROOT,
|
||||
"DiskImage\\DefaultIcon",
|
||||
REG_SZ,icon,_tcslen(icon)+1);
|
||||
REG_SZ,icon,0);
|
||||
|
||||
// This key can interfere....
|
||||
// HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExt\.dsk
|
||||
|
|
|
@ -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\
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -2755,6 +2755,8 @@ bool _CmdConfigFont ( int iFont, LPCSTR pFontName, int iPitchFamily, int nFontHe
|
|||
|
||||
if (iFont < NUM_FONTS)
|
||||
pFont = & g_aFontConfig[ iFont ];
|
||||
else
|
||||
return bStatus;
|
||||
|
||||
if (pFontName)
|
||||
{
|
||||
|
@ -6673,7 +6675,7 @@ bool ParseAssemblyListing( bool bBytesToMemory, bool bAddSymbols )
|
|||
int nLen = pLabelEnd - pLabelStart;
|
||||
nLen = MIN( nLen, MAX_SYMBOLS_LEN );
|
||||
strncpy( sName, pLabelStart, nLen );
|
||||
sName[ nLen ] = 0;
|
||||
sName[ nLen - 1 ] = 0;
|
||||
|
||||
char *pAddressEQU = strstr( pLabel, "$" );
|
||||
char *pAddressDFB = strstr( sLine, ":" ); // Get address from start of line
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 _______________________________________________________________________________________
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -3770,7 +3770,9 @@ void DrawSubWindow_Source2 (Update_t bUpdate)
|
|||
char sTitle[ CONSOLE_WIDTH ];
|
||||
char sText [ CONSOLE_WIDTH ];
|
||||
strcpy ( sTitle, " Source: " );
|
||||
strncpy( sText , g_aSourceFileName, g_nConsoleDisplayWidth - strlen( sTitle ) - 1 );
|
||||
int maxSizeToCopy = g_nConsoleDisplayWidth - strlen(sTitle) - 1;
|
||||
strncpy( sText , g_aSourceFileName, maxSizeToCopy );
|
||||
sText[ maxSizeToCopy - 1 ] = 0;
|
||||
strcat ( sTitle, sText );
|
||||
|
||||
DebuggerSetColorBG( DebuggerGetColor( BG_SOURCE_TITLE ));
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ___________________________________________________________________________________________
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -228,6 +228,7 @@ bool String2Address( LPCTSTR pText, WORD & nAddress_ )
|
|||
|
||||
_tcscpy( sHexApple, "0x" );
|
||||
_tcsncpy( sHexApple+2, pText+1, MAX_SYMBOLS_LEN - 3 );
|
||||
sHexApple[2 + (MAX_SYMBOLS_LEN - 3) - 1] = 0;
|
||||
pText = sHexApple;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,6 @@ static unsigned __int64 g_uDiskLastCycle = 0;
|
|||
static FormatTrack g_formatTrack;
|
||||
|
||||
static void CheckSpinning(const ULONG nCyclesLeft);
|
||||
static Disk_Status_e GetDriveLightStatus( const int iDrive );
|
||||
static bool IsDriveValid( const int iDrive );
|
||||
static void ReadTrack (int drive);
|
||||
static void RemoveDisk (int drive);
|
||||
|
@ -794,7 +793,7 @@ bool Disk_IsDriveEmpty(const int iDrive)
|
|||
static UINT64 g_uWriteLastCycle = 0;
|
||||
static UINT g_uSyncFFCount = 0;
|
||||
|
||||
static bool LogWriteCheckSyncFF(BYTE floppylatch, ULONG& uCycleDelta)
|
||||
static bool LogWriteCheckSyncFF(ULONG& uCycleDelta)
|
||||
{
|
||||
bool bIsSyncFF = false;
|
||||
|
||||
|
@ -886,15 +885,20 @@ static void __stdcall DiskReadWrite(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULO
|
|||
*(fptr->trackimage + fptr->byte) = floppylatch;
|
||||
fptr->trackimagedirty = 1;
|
||||
|
||||
g_formatTrack.DecodeLatchNibbleWrite(floppylatch, uSpinNibbleCount, fptr); // GH#125
|
||||
bool bIsSyncFF = false;
|
||||
#if LOG_DISK_NIBBLES_WRITE
|
||||
ULONG uCycleDelta = 0;
|
||||
bIsSyncFF = LogWriteCheckSyncFF(uCycleDelta);
|
||||
#endif
|
||||
|
||||
g_formatTrack.DecodeLatchNibbleWrite(floppylatch, uSpinNibbleCount, fptr, bIsSyncFF); // GH#125
|
||||
|
||||
#if LOG_DISK_NIBBLES_WRITE
|
||||
#if LOG_DISK_NIBBLES_USE_RUNTIME_VAR
|
||||
if (g_bLogDisk_NibblesRW)
|
||||
#endif
|
||||
{
|
||||
ULONG uCycleDelta = 0;
|
||||
if (!LogWriteCheckSyncFF(floppylatch, uCycleDelta))
|
||||
if (!bIsSyncFF)
|
||||
LOG_DISK("write %04X = %02X (cy=+%d)\r\n", fptr->byte, floppylatch, uCycleDelta);
|
||||
else
|
||||
LOG_DISK("write %04X = %02X (cy=+%d) sync #%d\r\n", fptr->byte, floppylatch, uCycleDelta, g_uSyncFFCount);
|
||||
|
|
|
@ -121,7 +121,7 @@ struct Disk_t
|
|||
phase = 0;
|
||||
byte = 0;
|
||||
trackimagedata = FALSE;
|
||||
trackimagedirty = 0;
|
||||
trackimagedirty = FALSE;
|
||||
spinning = 0;
|
||||
writelight = 0;
|
||||
nibbles = 0;
|
||||
|
|
|
@ -26,6 +26,22 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
* Author: Various
|
||||
*/
|
||||
|
||||
/*
|
||||
DOS 3.2 INIT notes
|
||||
------------------
|
||||
Writes the following: (in 1 continuous write operation)
|
||||
. 0x26A0 x 36-cycle (9-bit) sync FFs - wraps track
|
||||
. Address Field (Prologue=D5AAB5, Epilogue=DEAAEB)
|
||||
. NB. this trailing EB gets overwritten when sector is written to
|
||||
. Sector order: {0,A,7,4,1,B,8,5,2,C,9,6,3}
|
||||
. 432 x 32-cycle FFs
|
||||
. Gap2: 10
|
||||
. Data Field:3+410+1+3=417
|
||||
. NB. no Data Field pro/epilogue written during track format
|
||||
. 79 x 36-cycle (9-bit) sync FFs (gap3?)
|
||||
. Address Field (Prologue=D5AAB5, ...), etc.
|
||||
*/
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "Disk.h"
|
||||
|
@ -59,6 +75,7 @@ void FormatTrack::DriveNotWritingTrack(void)
|
|||
m_WriteTrackStartIndex = 0;
|
||||
m_WriteTrackHasWrapped = false;
|
||||
m_WriteDataFieldPrologueCount = 0;
|
||||
m_bAddressPrologueIsDOS3_2 = false;
|
||||
|
||||
#if LOG_DISK_NIBBLES_WRITE_TRACK_GAPS
|
||||
m_DbgGap1Size = 0;
|
||||
|
@ -113,8 +130,16 @@ void FormatTrack::UpdateOnWriteLatch(UINT uSpinNibbleCount, const Disk_t* const
|
|||
|
||||
void FormatTrack::DriveSwitchedToReadMode(Disk_t* const fptr)
|
||||
{
|
||||
if (m_bmWrittenSectorAddrFields != 0xFFFF || m_WriteDataFieldPrologueCount != 16) // written all 16 sectors?
|
||||
return;
|
||||
if (m_bAddressPrologueIsDOS3_2)
|
||||
{
|
||||
if (m_bmWrittenSectorAddrFields != 0x1FFF) // written all 13 sectors? (NB. data field not written by formatter)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_bmWrittenSectorAddrFields != 0xFFFF || m_WriteDataFieldPrologueCount != 16) // written all 16 sectors?
|
||||
return;
|
||||
}
|
||||
|
||||
// Zero-fill the remainder of the track buffer:
|
||||
// Either up to 0x18F0 (if less than 0x18F0) or up to 0x1A00 (for .nib).
|
||||
|
@ -188,16 +213,16 @@ void FormatTrack::DriveSwitchedToWriteMode(UINT uTrackIndex)
|
|||
// This is just for debug/logging: used to output when a new Address Field has been read
|
||||
void FormatTrack::DecodeLatchNibbleRead(BYTE floppylatch)
|
||||
{
|
||||
DecodeLatchNibble(floppylatch, false);
|
||||
DecodeLatchNibble(floppylatch, false, false);
|
||||
}
|
||||
|
||||
void FormatTrack::DecodeLatchNibbleWrite(BYTE floppylatch, UINT uSpinNibbleCount, const Disk_t* const fptr)
|
||||
void FormatTrack::DecodeLatchNibbleWrite(BYTE floppylatch, UINT uSpinNibbleCount, const Disk_t* const fptr, bool bIsSyncFF)
|
||||
{
|
||||
DecodeLatchNibble(floppylatch, true);
|
||||
DecodeLatchNibble(floppylatch, true, bIsSyncFF);
|
||||
UpdateOnWriteLatch(uSpinNibbleCount, fptr);
|
||||
}
|
||||
|
||||
void FormatTrack::DecodeLatchNibble(BYTE floppylatch, BOOL bIsWrite)
|
||||
void FormatTrack::DecodeLatchNibble(BYTE floppylatch, bool bIsWrite, bool bIsSyncFF)
|
||||
{
|
||||
m_uLast3Bytes <<= 8;
|
||||
m_uLast3Bytes |= floppylatch;
|
||||
|
@ -207,7 +232,7 @@ void FormatTrack::DecodeLatchNibble(BYTE floppylatch, BOOL bIsWrite)
|
|||
m_trackState = TS_GAP2;
|
||||
|
||||
#if LOG_DISK_NIBBLES_WRITE_TRACK_GAPS
|
||||
if (floppylatch == 0xFF && bIsWrite && (m_trackState == TS_GAP1 || m_trackState == TS_GAP2 || m_trackState == TS_GAP3))
|
||||
if (bIsSyncFF && (m_trackState == TS_GAP1 || m_trackState == TS_GAP2 || m_trackState == TS_GAP3))
|
||||
{
|
||||
if (m_bmWrittenSectorAddrFields == 0x0000 && m_trackState == TS_GAP1)
|
||||
m_DbgGap1Size++;
|
||||
|
@ -220,8 +245,11 @@ void FormatTrack::DecodeLatchNibble(BYTE floppylatch, BOOL bIsWrite)
|
|||
#endif
|
||||
|
||||
// Beneath Apple ProDOS 3-14: NB. $D5 and $AA are reserved (never written as data)
|
||||
if (m_uLast3Bytes == 0xD5AA96)
|
||||
const UINT32 kADDR_PROLOGUE_DOS3_3 = 0xD5AA96; // D5AA96 is used by DOS3.3/ProDOS
|
||||
const UINT32 kADDR_PROLOGUE_DOS3_2 = 0xD5AAB5; // D5AAB5 is used by DOS3.2/3.2.1
|
||||
if (m_uLast3Bytes == kADDR_PROLOGUE_DOS3_3 || m_uLast3Bytes == kADDR_PROLOGUE_DOS3_2)
|
||||
{
|
||||
m_bAddressPrologueIsDOS3_2 = (m_uLast3Bytes == kADDR_PROLOGUE_DOS3_2);
|
||||
m_trackState = TS_ADDRFIELD;
|
||||
m_4and4idx = 0;
|
||||
return;
|
||||
|
@ -240,13 +268,15 @@ void FormatTrack::DecodeLatchNibble(BYTE floppylatch, BOOL bIsWrite)
|
|||
#if LOG_DISK_NIBBLES_READ
|
||||
if (!bIsWrite)
|
||||
{
|
||||
LOG_DISK("read D5AA96 detected - Vol:%02X Trk:%02X Sec:%02X Chk:%02X\r\n", m_VolTrkSecChk[0], m_VolTrkSecChk[1], m_VolTrkSecChk[2], m_VolTrkSecChk[3]);
|
||||
BYTE addrPrologue = m_bAddressPrologueIsDOS3_2 ? (BYTE)kADDR_PROLOGUE_DOS3_2 : (BYTE)kADDR_PROLOGUE_DOS3_3;
|
||||
LOG_DISK("read D5AA%02X detected - Vol:%02X Trk:%02X Sec:%02X Chk:%02X\r\n", addrPrologue, m_VolTrkSecChk[0], m_VolTrkSecChk[1], m_VolTrkSecChk[2], m_VolTrkSecChk[3]);
|
||||
}
|
||||
#endif
|
||||
#if LOG_DISK_NIBBLES_WRITE
|
||||
if (bIsWrite)
|
||||
{
|
||||
LOG_DISK("write D5AA96 detected - Vol:%02X Trk:%02X Sec:%02X Chk:%02X\r\n", m_VolTrkSecChk[0], m_VolTrkSecChk[1], m_VolTrkSecChk[2], m_VolTrkSecChk[3]);
|
||||
BYTE addrPrologue = m_bAddressPrologueIsDOS3_2 ? (BYTE)kADDR_PROLOGUE_DOS3_2 : (BYTE)kADDR_PROLOGUE_DOS3_3;
|
||||
LOG_DISK("write D5AA%02X detected - Vol:%02X Trk:%02X Sec:%02X Chk:%02X\r\n", addrPrologue, m_VolTrkSecChk[0], m_VolTrkSecChk[1], m_VolTrkSecChk[2], m_VolTrkSecChk[3]);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -331,6 +361,7 @@ void FormatTrack::LoadSnapshot(class YamlLoadHelper& yamlLoadHelper)
|
|||
m_uLast3Bytes = yamlLoadHelper.LoadUint(SS_YAML_KEY_LAST3BYTES);
|
||||
*(UINT64*)m_VolTrkSecChk4and4 = yamlLoadHelper.LoadUint64(SS_YAML_KEY_VTSC_4AND4);
|
||||
m_4and4idx = yamlLoadHelper.LoadUint(SS_YAML_KEY_VTSC_4AND4_IDX);
|
||||
m_bAddressPrologueIsDOS3_2 = false; // Doesn't matter if this is wrong - for DOS 3.2 INIT, will just get a long (non-truncated) track-0
|
||||
|
||||
yamlLoadHelper.PopMap();
|
||||
}
|
||||
|
|
|
@ -38,13 +38,13 @@ public:
|
|||
void DriveSwitchedToReadMode(Disk_t* const fptr);
|
||||
void DriveSwitchedToWriteMode(UINT uTrackIndex);
|
||||
void DecodeLatchNibbleRead(BYTE floppylatch);
|
||||
void DecodeLatchNibbleWrite(BYTE floppylatch, UINT uSpinNibbleCount, const Disk_t* const fptr);
|
||||
void DecodeLatchNibbleWrite(BYTE floppylatch, UINT uSpinNibbleCount, const Disk_t* const fptr, bool bIsSyncFF);
|
||||
void SaveSnapshot(class YamlSaveHelper& yamlSaveHelper);
|
||||
void LoadSnapshot(class YamlLoadHelper& yamlLoadHelper);
|
||||
|
||||
private:
|
||||
void UpdateOnWriteLatch(UINT uSpinNibbleCount, const Disk_t* const fptr);
|
||||
void DecodeLatchNibble(BYTE floppylatch, BOOL bIsWrite);
|
||||
void DecodeLatchNibble(BYTE floppylatch, bool bIsWrite, bool bIsSyncFF);
|
||||
|
||||
BYTE m_VolTrkSecChk[4];
|
||||
|
||||
|
@ -52,6 +52,7 @@ private:
|
|||
UINT m_WriteTrackStartIndex;
|
||||
bool m_WriteTrackHasWrapped;
|
||||
BYTE m_WriteDataFieldPrologueCount;
|
||||
bool m_bAddressPrologueIsDOS3_2;
|
||||
|
||||
enum TRACKSTATE_e {TS_GAP1, TS_ADDRFIELD, TS_GAP2_START, TS_GAP2, TS_DATAFIELD, TS_GAP3}; // Take care: value written to save-state
|
||||
TRACKSTATE_e m_trackState;
|
||||
|
|
|
@ -1142,6 +1142,7 @@ void GetCharLowerExt(TCHAR* pszExt, LPCTSTR pszImageFilename, const UINT uExtSiz
|
|||
pImageFileExt = _tcsrchr(pImageFileExt, TEXT('.'));
|
||||
|
||||
_tcsncpy(pszExt, pImageFileExt, uExtSize);
|
||||
pszExt[uExtSize - 1] = 0;
|
||||
|
||||
CharLowerBuff(pszExt, _tcslen(pszExt));
|
||||
}
|
||||
|
@ -1150,6 +1151,7 @@ void GetCharLowerExt2(TCHAR* pszExt, LPCTSTR pszImageFilename, const UINT uExtSi
|
|||
{
|
||||
TCHAR szFilename[MAX_PATH];
|
||||
_tcsncpy(szFilename, pszImageFilename, MAX_PATH);
|
||||
szFilename[MAX_PATH - 1] = 0;
|
||||
|
||||
TCHAR* pLastDot = _tcsrchr(szFilename, TEXT('.'));
|
||||
if (pLastDot)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define LOG_DISK_TRACKS 1
|
||||
#define LOG_DISK_MOTOR 1
|
||||
#define LOG_DISK_PHASES 0
|
||||
#define LOG_DISK_PHASES 1
|
||||
#define LOG_DISK_RW_MODE 1
|
||||
#define LOG_DISK_ENABLE_DRIVE 1
|
||||
#define LOG_DISK_NIBBLES_SPIN 1
|
||||
|
|
|
@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#include "StdAfx.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
#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
|
||||
|
||||
|
|
|
@ -132,11 +132,11 @@ struct HDD
|
|||
hd_memblock = 0;
|
||||
hd_diskblock = 0;
|
||||
hd_buf_ptr = 0;
|
||||
hd_imageloaded = 0;
|
||||
hd_imageloaded = false;
|
||||
ZeroMemory(hd_buf, sizeof(hd_buf));
|
||||
#if HD_LED
|
||||
hd_status_next = Disk_Status_e(0);
|
||||
hd_status_prev = Disk_Status_e(0);
|
||||
hd_status_next = DISK_STATUS_OFF;
|
||||
hd_status_prev = DISK_STATUS_OFF;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -169,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 std::vector<HDD> g_HardDisk(NUM_HARDDISKS);
|
||||
static HDD g_HardDisk[NUM_HARDDISKS];
|
||||
|
||||
static bool g_bSaveDiskImage = true; // Save the DiskImage name to Registry
|
||||
static UINT g_uSlot = 7;
|
||||
|
|
|
@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
void HD_Reset(void);
|
||||
void HD_Load_Rom(const LPBYTE pCxRomPeripheral, const UINT uSlot);
|
||||
bool HD_Select(const int iDrive);
|
||||
BOOL HD_Insert(const int iDrive, LPCTSTR pszImageFilename);
|
||||
BOOL HD_Insert(const int iDrive, LPCTSTR pszImageFilename);
|
||||
void HD_Unplug(const int iDrive);
|
||||
bool HD_IsDriveUnplugged(const int iDrive);
|
||||
void HD_LoadLastDiskImage(const int iDrive);
|
||||
|
|
|
@ -39,12 +39,12 @@ 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 "Memory.h"
|
||||
#include "YamlHelper.h"
|
||||
|
||||
#include "Configuration\PropertySheet.h"
|
||||
#include "Configuration/PropertySheet.h"
|
||||
|
||||
#define BUTTONTIME 5000 // This is the latch (debounce) time in usecs for the joystick buttons
|
||||
|
||||
|
|
|
@ -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 "Pravets.h"
|
||||
|
|
|
@ -39,6 +39,7 @@ void LogOutput(LPCTSTR format, ...)
|
|||
va_start(args, format);
|
||||
|
||||
_vsntprintf(output, sizeof(output) - 1, format, args);
|
||||
output[sizeof(output) - 1] = 0;
|
||||
OutputDebugString(output);
|
||||
}
|
||||
|
||||
|
@ -57,5 +58,6 @@ void LogFileOutput(LPCTSTR format, ...)
|
|||
va_start(args, format);
|
||||
|
||||
_vsntprintf(output, sizeof(output) - 1, format, args);
|
||||
output[sizeof(output) - 1] = 0;
|
||||
fprintf(g_fh, "%s", output);
|
||||
}
|
||||
|
|
|
@ -1242,6 +1242,10 @@ void MemInitialize()
|
|||
g_pAppTitle,
|
||||
MB_ICONEXCLAMATION | MB_SETFOREGROUND);
|
||||
|
||||
// memimage has been freed
|
||||
// if we have come here we should use newloc
|
||||
//
|
||||
// this happens when running under valgrind
|
||||
memimage = (LPBYTE)newloc;
|
||||
|
||||
#ifdef RAMWORKS
|
||||
|
|
|
@ -79,7 +79,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 "Log.h"
|
||||
#include "Memory.h"
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -239,6 +239,7 @@ void Printer_SetFilename(char* prtFilename)
|
|||
else //No registry entry is available
|
||||
{
|
||||
_tcsncpy(g_szPrintFilename, g_sProgramDir, MAX_PATH);
|
||||
g_szPrintFilename[MAX_PATH - 1] = 0;
|
||||
_tcsncat(g_szPrintFilename, _T(DEFAULT_PRINT_FILENAME), MAX_PATH);
|
||||
RegSaveString(TEXT("Configuration"),REGVALUE_PRINTER_FILENAME,1,g_szPrintFilename);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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:
|
||||
//
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "..\StdAfx.h"
|
||||
#include "../StdAfx.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
@ -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 **/
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#ifndef _TFE_H
|
||||
#define _TFE_H
|
||||
|
||||
#include "..\CommonVICE\types.h"
|
||||
#include "../CommonVICE/types.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/* define this only if VICE should write each and every frame received
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue