mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-11-17 06:08:58 +00:00
Modified harddisk firmware to support Apple Oasis' entrypoint:
. for DOSMaster images created with Apple Oasis (Feature #5557). Ported & added a Win32 build of the a65 assembler (see a65v106_w32.zip for source).
This commit is contained in:
parent
249e18b8e6
commit
f5f77a445c
Binary file not shown.
BIN
AppleWin/firmware/HDD/a65_w32.exe
Normal file
BIN
AppleWin/firmware/HDD/a65_w32.exe
Normal file
Binary file not shown.
BIN
AppleWin/firmware/HDD/a65v106_w32.zip
Normal file
BIN
AppleWin/firmware/HDD/a65v106_w32.zip
Normal file
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
a65 -b -l HDDRVR.A65 >hddrvr.lst
|
a65_w32 -b -l HDDRVR.A65 >hddrvr.lst
|
||||||
@del HDDRVR.BIN
|
@del HDDRVR.BIN
|
||||||
rename 6502.bin HDDRVR.BIN
|
rename 6502.bin HDDRVR.BIN
|
||||||
copy HDDRVR.BIN ..\..\resource
|
copy HDDRVR.BIN ..\..\resource
|
@ -3,7 +3,7 @@
|
|||||||
;Copyright (C) 1994-1996, Michael O'Brien
|
;Copyright (C) 1994-1996, Michael O'Brien
|
||||||
;Copyright (C) 1999-2001, Oliver Schmidt
|
;Copyright (C) 1999-2001, Oliver Schmidt
|
||||||
;Copyright (C) 2002-2005, Tom Charlesworth
|
;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
|
;AppleWin is free software; you can redistribute it and/or modify
|
||||||
;it under the terms of the GNU General Public License as published by
|
;it under the terms of the GNU General Public License as published by
|
||||||
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
; Modified by Tom Charlesworth:
|
; Modified by Tom Charlesworth:
|
||||||
; . Fixed so it can be assembled by a65 v1.06
|
; . 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
|
; . TO DO: Make code relocatable
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -102,19 +103,33 @@ noerr0
|
|||||||
; no image ready, boot diskette image instead
|
; no image ready, boot diskette image instead
|
||||||
jmp slot6
|
jmp slot6
|
||||||
|
|
||||||
; 24 unused bytes
|
;======================================
|
||||||
|
; 24 unused bytes
|
||||||
|
|
||||||
*= $c746 ; org $c746
|
*= $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.
|
; Keep this for any DOSMaster HDD images created with old AppleWin HDD f/w.
|
||||||
; DOSMaster hardcodes the entrypoint addr into its bootstrapping code:
|
; DOSMaster hardcodes the entrypoint addr into its bootstrapping code:
|
||||||
; - So DOSMaster images are tied to the HDD's controller's f/w
|
; - So DOSMaster images are tied to the HDD's controller's f/w
|
||||||
sec
|
sec
|
||||||
bcs Entrypoint
|
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.
|
; image ready. Lets boot from it.
|
||||||
; we want to load block 1 from s7,d1 to $800 then jump there
|
; we want to load block 1 from s7,d1 to $800 then jump there
|
||||||
hdboot
|
hdboot
|
||||||
@ -203,7 +218,8 @@ loop2
|
|||||||
tay
|
tay
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
;======================================
|
||||||
|
; 37 unused bytes
|
||||||
|
|
||||||
; $CsFE = status bits (BAP p7-14)
|
; $CsFE = status bits (BAP p7-14)
|
||||||
; 7 = medium is removable
|
; 7 = medium is removable
|
||||||
|
Binary file not shown.
@ -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)
|
static __forceinline int Fetch(BYTE& iOpcode, ULONG uExecutedCycles)
|
||||||
{
|
{
|
||||||
const USHORT PC = regs.pc;
|
const USHORT PC = regs.pc;
|
||||||
|
|
||||||
|
#if defined(_DEBUG) && defined(DBG_HDD_ENTRYPOINT)
|
||||||
|
DebugHddEntrypoint(PC);
|
||||||
|
#endif
|
||||||
|
|
||||||
iOpcode = ((PC & 0xF000) == 0xC000)
|
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[]
|
? IORead[(PC>>4) & 0xFF](PC,PC,0,0,uExecutedCycles) // Fetch opcode from I/O memory, but params are still from mem[]
|
||||||
: *(mem+PC);
|
: *(mem+PC);
|
||||||
|
Loading…
Reference in New Issue
Block a user