diff --git a/AppleWin/firmware/HDD/HDDRVR.BIN b/AppleWin/firmware/HDD/HDDRVR.BIN index 13c1128e..d81950b7 100644 Binary files a/AppleWin/firmware/HDD/HDDRVR.BIN and b/AppleWin/firmware/HDD/HDDRVR.BIN differ diff --git a/AppleWin/firmware/HDD/a65_w32.exe b/AppleWin/firmware/HDD/a65_w32.exe new file mode 100644 index 00000000..5316c33e Binary files /dev/null and b/AppleWin/firmware/HDD/a65_w32.exe differ diff --git a/AppleWin/firmware/HDD/a65v106_w32.zip b/AppleWin/firmware/HDD/a65v106_w32.zip new file mode 100644 index 00000000..8793ec91 Binary files /dev/null and b/AppleWin/firmware/HDD/a65v106_w32.zip differ diff --git a/AppleWin/firmware/HDD/build.bat b/AppleWin/firmware/HDD/build.bat index 9cb85865..c412496c 100644 --- a/AppleWin/firmware/HDD/build.bat +++ b/AppleWin/firmware/HDD/build.bat @@ -1,4 +1,4 @@ -a65 -b -l HDDRVR.A65 >hddrvr.lst +a65_w32 -b -l HDDRVR.A65 >hddrvr.lst @del HDDRVR.BIN rename 6502.bin HDDRVR.BIN copy HDDRVR.BIN ..\..\resource \ No newline at end of file diff --git a/AppleWin/firmware/HDD/hddrvr.a65 b/AppleWin/firmware/HDD/hddrvr.a65 index 073c33e3..9b031894 100644 --- a/AppleWin/firmware/HDD/hddrvr.a65 +++ b/AppleWin/firmware/HDD/hddrvr.a65 @@ -3,7 +3,7 @@ ;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-2012, 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,8 @@ ; Modified by Tom Charlesworth: ; . Fixed so it can be assembled by a65 v1.06 -; . Fixed so that ProDOS entrypoint is $c70a +; . Fixed so that ProDOS entrypoint is $c70a (26 Dev 2007) (Bug #12723) +; . Modified to support Apple Oasis' entrypoint: $c761 (8 Sept 2012) (Feature #5557) ; . TO DO: Make code relocatable ; @@ -102,19 +103,33 @@ noerr0 ; no image ready, boot diskette image instead jmp slot6 - ; 24 unused bytes +;====================================== +; 24 unused bytes *= $c746 ; org $c746 -Entrypont_C746 ; Old f/w 'cmdproc' entrypoint +Entrypoint_C746 ; Old f/w 'cmdproc' entrypoint ; Keep this for any DOSMaster HDD images created with old AppleWin HDD f/w. ; DOSMaster hardcodes the entrypoint addr into its bootstrapping code: ; - So DOSMaster images are tied to the HDD's controller's f/w sec bcs Entrypoint + + +;====================================== +; 23 unused bytes - ; - +*= $c761 ; org $c761 + +Entrypoint_C761 ; Apple Oasis HDD controller entrypoint + ; Keep this for any DOSMaster HDD images created with Apple Oasis HDD f/w. + ; DOSMaster hardcodes the entrypoint addr into its bootstrapping code: + ; - So DOSMaster images are tied to the HDD's controller's f/w + sec + bcs Entrypoint + +;====================================== + ; image ready. Lets boot from it. ; we want to load block 1 from s7,d1 to $800 then jump there hdboot @@ -203,7 +218,8 @@ loop2 tay rts - +;====================================== +; 37 unused bytes ; $CsFE = status bits (BAP p7-14) ; 7 = medium is removable diff --git a/AppleWin/resource/Hddrvr.bin b/AppleWin/resource/Hddrvr.bin index 13c1128e..d81950b7 100644 Binary files a/AppleWin/resource/Hddrvr.bin and b/AppleWin/resource/Hddrvr.bin differ diff --git a/AppleWin/source/CPU.cpp b/AppleWin/source/CPU.cpp index 4db7cd37..cf0755c9 100644 --- a/AppleWin/source/CPU.cpp +++ b/AppleWin/source/CPU.cpp @@ -282,10 +282,43 @@ void CaptureCOUT(void) //=========================================================================== +//#define DBG_HDD_ENTRYPOINT +#if defined(_DEBUG) && defined(DBG_HDD_ENTRYPOINT) +// Output a debug msg whenever the HDD f/w is called or jump to. +static void DebugHddEntrypoint(const USHORT PC) +{ + static bool bOldPCAtC7xx = false; + static WORD OldPC = 0; + static UINT Count = 0; + + if ((PC >> 8) == 0xC7) + { + if (!bOldPCAtC7xx /*&& PC != 0xc70a*/) + { + Count++; + char szDebug[100]; + sprintf(szDebug, "HDD Entrypoint: $%04X\n", PC); + OutputDebugString(szDebug); + } + + bOldPCAtC7xx = true; + } + else + { + bOldPCAtC7xx = false; + } + OldPC = PC; +} +#endif + static __forceinline int Fetch(BYTE& iOpcode, ULONG uExecutedCycles) { const USHORT PC = regs.pc; +#if defined(_DEBUG) && defined(DBG_HDD_ENTRYPOINT) + DebugHddEntrypoint(PC); +#endif + iOpcode = ((PC & 0xF000) == 0xC000) ? IORead[(PC>>4) & 0xFF](PC,PC,0,0,uExecutedCycles) // Fetch opcode from I/O memory, but params are still from mem[] : *(mem+PC);