happy commit

This commit is contained in:
Elliot Nunn 2020-03-22 16:44:21 +08:00
parent 33cd9271f4
commit 2e2dcbd827
165 changed files with 13455 additions and 2355 deletions

View File

@ -1,3 +1,10 @@
#
# Hacks to match MacOS (most recent first):
#
# <Sys7.1> 8/3/92 Added rule to build .Display_Video_Apple_TFB DRVR from TFBDriver.a
# 9/2/94 SuperMario ROM source dump (header preserved below)
#
# #
# File: VideoDrivers.make # File: VideoDrivers.make
# #
@ -358,6 +365,10 @@ VideoDriverObjs = "{ObjDir}JMFBDriver.a.o" ∂
"{IntAIncludes}ComVideoEqu.a" "{IntAIncludes}ComVideoEqu.a"
Asm {StdAOpts} -o "{Targ}" "{VideoDriverDir}TFBDriver.a" Asm {StdAOpts} -o "{Targ}" "{VideoDriverDir}TFBDriver.a"
# <Sys7.1>
"{RsrcDir}TFBDriver.a.rsrc" ƒ "{ObjDir}TFBDriver.a.o"
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} "{ObjDir}TFBDriver.a.o"
"{ObjDir}TFBPrimaryInit.a.o" ƒ "{VideoDriverDir}TFBDepVideoEqu.a" ∂ "{ObjDir}TFBPrimaryInit.a.o" ƒ "{VideoDriverDir}TFBDepVideoEqu.a" ∂
"{VideoDriverDir}TFBPrimaryInit.a" ∂ "{VideoDriverDir}TFBPrimaryInit.a" ∂

View File

@ -1,3 +1,11 @@
#
# Hacks to match MacOS (most recent first):
#
# <Sys7.1> 8/3/92 Restored missing source files to the Backlight DRVR build
# Made build rule for linked patch file backlightpatch.a
# 9/2/94 SuperMario ROM source dump (header preserved below)
#
# #
# File: Backlight.make # File: Backlight.make
# #
@ -20,13 +28,20 @@
# Backlight driver # Backlight driver
BL_DRVR_OBJ = "{ObjDir}backlight.c.o" ∂ BL_DRVR_OBJ = "{ObjDir}backlight.c.o" ∂
"{ObjDir}backlight.a.o" "{ObjDir}backlight.a.o" ∂
"{ObjDir}pwm.c.o" # <Sys7.1> ∂
"{ObjDir}register.c.o" # <Sys7.1> ∂
"{CLibraries}StdCLib.o" # <Sys7.1>
"{ObjDir}backlight.a.o" ƒ "{AIncludes}SysEqu.a" ∂ "{ObjDir}backlight.a.o" ƒ "{AIncludes}SysEqu.a" ∂
"{AIncludes}SysErr.a" ∂ "{AIncludes}SysErr.a" ∂
"{BackLightDir}backlight.a" "{BackLightDir}backlight.a"
Asm -o {Targ} "{BackLightDir}backlight.a" {StdAOpts} Asm -o {Targ} "{BackLightDir}backlight.a" {StdAOpts}
# <Sys7.1>
"{ObjDir}backlightpatch.a.o" ƒ "{BackLightDir}backlightpatch.a"
Asm -o {Targ} "{BackLightDir}backlightpatch.a" {StdAOpts}
"{ObjDir}backlight.c.o" ƒ "{BackLightDir}backlight.h" ∂ "{ObjDir}backlight.c.o" ƒ "{BackLightDir}backlight.h" ∂
"{BackLightDir}PowerMgr.h" ∂ "{BackLightDir}PowerMgr.h" ∂
"{CIncludes}SysEqu.h" ∂ "{CIncludes}SysEqu.h" ∂

View File

@ -1,3 +1,13 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Reverted Horror and SuperMario changes
Brought Get_AtoD/Get_PGEButton/GetPortableValues/PotControl back from backlightinput.c
Recreated PWMStatus (similar code to PWMControl)
Reduced the amount of indirection through global procedure pointers
9/2/94 SuperMario ROM source dump (header preserved below)
*/
/* /*
File: PWM.c File: PWM.c
@ -78,30 +88,86 @@
#include "PowerMgr.h" #include "PowerMgr.h"
#include "backlight.h" #include "backlight.h"
/* <Sys7.1> copied from backlightcpu.c */
#define BACKLIGHT_POT_CHANNEL 0
#define STATUS 0
#define POWERBYTE 1
#define TEMPBYTE 2
/* <Sys7.1> reclaimed from backlightinput.c */
#define READ_ATOD_CHANNEL 0xD8
#define READ_BUTTON_VALUE 0xD9
extern short PotInputRangeShiftTblPWM[];
/* <Sys7.1> enable access to these assembly "procedures" (really tables) */
extern unsigned char timTblLow[];
extern unsigned char timTbl[];
extern unsigned char asahiTbl[];
extern short PWMMaxTbl[];
/*page /*page
*************************************************************************************************** ***************************************************************************************************
** PWM software *********************************************************************************** ** PWM software ***********************************************************************************
*************************************************************************************************** ***************************************************************************************************
*/ */
OSErr InitPWMControls(driverGlobalPtr globalPtr) /* <Sys7.1> don't return OSErr */
/* <Sys7.1> reverted to old-style tables despite <H8> */
void InitPWMControls(driverGlobalPtr globalPtr)
{ {
unsigned int startvalue; unsigned int startvalue;
int boxFlag;
/* <Sys7.1> setup default values */
globalPtr->flyByWire = true;
globalPtr->freeflag = true;
globalPtr->dualTable = true;
globalPtr->userInputSampleRate = 10;
globalPtr->maximumTable = &PWMMaxTbl;
globalPtr->settingTableLow = &timTblLow;
globalPtr->settingTable = globalPtr->settingTableHigh = &timTbl;
/* <Sys7.1> override for some specific machines */
boxFlag = *(unsigned char *)0xCB3;
switch (boxFlag)
{
case 18: // PowerBook 100, Asahi
globalPtr->freeflag = false;
globalPtr->dualTable = false;
globalPtr->settingTable = &asahiTbl;
break;
case 15: // PowerBook 170, TIM
if (*JAWS_SPEED_FSTN_REG_PTR & JAWS_FSTN)
globalPtr->dualTable = false;
break;
}
/* initialize dual table variables */ /* initialize dual table variables */
if (globalPtr->dualTable) if (globalPtr->dualTable)
{ {
globalPtr->slewLimit = true; /* maximum change per/accrun */ globalPtr->slewLimit = true; /* maximum change per/accrun */
(*globalPtr->tableProc)(globalPtr); /* determine table based on current charger state */
/* <Sys7.1> determine table directly instead of using a tableProc */
globalPtr->lowThreshold = 163;
globalPtr->hiThreshold = 173;
globalPtr->tableProc = ChargerAdjust;
globalPtr->lowTable = LowTable(globalPtr);
if (globalPtr->lowTable)
globalPtr->settingTable = globalPtr->settingTableLow;
}; };
/* <Sys7.1> not really sure why these procs weren't being set */
globalPtr->setlevelproc = SetPWM;
globalPtr->userInputProc = PotControl;
globalPtr->closeProc = PWMCloseRoutine;
globalPtr->controlProc = PWMControl;
globalPtr->statusProc = PWMStatus;
/* initialize backlight hardware */ /* initialize backlight hardware */
startvalue = (*globalPtr->userInputProc)(globalPtr); /* <H8> */ startvalue = PotControl(globalPtr); /* <H8> */
globalPtr->userBrightness = -1; globalPtr->userBrightness = -1;
globalPtr->userBrightness = (*globalPtr->setlevelproc)(startvalue,globalPtr); /* <H8> */ globalPtr->userBrightness = SetPWM(startvalue,globalPtr); /* <H8> */
return(noErr);
}; };
/* /*
@ -113,10 +179,155 @@ OSErr InitPWMControls(driverGlobalPtr globalPtr)
int PWMCloseRoutine (driverGlobalPtr globalPtr) int PWMCloseRoutine (driverGlobalPtr globalPtr)
{ {
(*globalPtr->setlevelproc)(globalPtr->settingTable->minimum,globalPtr); SetPWM(0,globalPtr); /* <Sys7.1> no global setlevelproc */
return(0); return(0);
}; };
/*
***************************************************************************************************
*
*
***************************************************************************************************
*/
/* <Sys7.1> moved from bottom of file and edited */
/* <Sys7.1> reverted to old-style tables despite <H8> */
int SetPWM(int new,driverGlobalPtr globalPtr)
{
PMgrPBlock pb; /* power manager pb */
unsigned char val; /* hardware value setting */
PEG_TO_LIMITS(new, globalPtr->maximumTable[globalPtr->powerRange], 0); /* <H8> use new tables */ /* limit value to valid range */
val = globalPtr->settingTable[new]; /* look up value from table */
if ((globalPtr->userBrightness >= 0) && (val == globalPtr->lastHWSetting)) return(new);/* nothing to do; 90/05/15 just turn on; 90/07/02 avoid touching */
if (globalPtr->slewChange)
{
if (abs(globalPtr->lastHWSetting - val) > globalPtr->slewLimit)
val = globalPtr->lastHWSetting + ((globalPtr->lastHWSetting > val) ? -globalPtr->slewLimit : globalPtr->slewLimit);
else
globalPtr->slewChange = false;
};
globalPtr->lastHWSetting = val; /* save the new hardware setting */
pb.pmgrCmd = ScreenSetCmd; /* <Sys7.1> don't do what they do */ /* everyone else uses "set brightness" */
pb.pmgrCnt = 1;
pb.pmgrXPtr = &val;
pb.pmgrRPtr = nil;
PMgr(&pb); /* set the pwm */
return(new); /* return the current value */
};
/*page
***************************************************************************************************
*
*
***************************************************************************************************
*/
/* <Sys7.1> verbatim from backlightinput.c */
unsigned char Get_AtoD(int channel)
{
PMgrPBlock pb; /* power manager pb */
char atodChannel; /* a to d channel to read [0-8] */
unsigned char value; /* return value */
OSErr error; /* pmgr error */
atodChannel = channel; /* load channel value into buffer */
pb.pmgrCmd = READ_ATOD_CHANNEL; /* load read channel command */
pb.pmgrCnt = 1; /* transmit buffer count is 1 byte */
pb.pmgrXPtr = &atodChannel; /* pointer to transmit buffer */
pb.pmgrRPtr = &value; /* pointer to receive buffer */
error = PMgr(&pb);
return( (error) ? 0 : value);
};
/*page
***************************************************************************************************
*
*
***************************************************************************************************
*/
/* <Sys7.1> verbatim from backlightinput.c */
unsigned char Get_PGEButton(int channel)
{
PMgrPBlock pb; /* power manager pb */
char atodChannel; /* a to d channel to read [0-8] */
unsigned char value; /* return value */
OSErr error; /* pmgr error */
atodChannel = channel; /* load channel value into buffer */
pb.pmgrCmd = READ_BUTTON_VALUE; /* load read channel command */
pb.pmgrCnt = 1; /* transmit buffer count is 1 byte */
pb.pmgrXPtr = &atodChannel; /* pointer to transmit buffer */
pb.pmgrRPtr = &value; /* pointer to receive buffer */
error = PMgr(&pb);
return( (error) ? 0 : value);
};
/*page
***************************************************************************************************
*
*
***************************************************************************************************
*/
/* <Sys7.1> verbatim from backlightinput.c */
unsigned char GetPortableValues(int parameter)
{
PMgrPBlock pb; /* power manager pb */
OSErr err; /* power manager error */
unsigned char rbuf[3]; /* buffer for send command */
pb.pmgrCmd = BatteryStatusImmCmd; /* on old pmgr, read battery status (immediate not averaged) */
pb.pmgrCnt = 0;
pb.pmgrXPtr = nil;
pb.pmgrRPtr = rbuf;
err = PMgr(&pb);
return( (err) ? 0 : rbuf[parameter]); /* return 0 if error, else read value */
}
/*page
***************************************************************************************************
*
*
***************************************************************************************************
*/
/* <Sys7.1> modified from backlightinput.c */
int PotControl (driverGlobalPtr globalPtr)
{
#pragma unused (globalPtr)
unsigned int potvalue;
/* <Sys7.1> no proc for this in driver globals */
potvalue = globalPtr->freeflag ? Get_AtoD(BACKLIGHT_POT_CHANNEL) : GetPortableValues(TEMPBYTE);
if (abs(globalPtr->lastatod - potvalue) <= 5) /* was the change less than 100mv */
potvalue = globalPtr->lastatod; /* is less than, the use old value */
globalPtr->lastatod = potvalue; /* update last a to d value */
potvalue >>= 3; /* scale to 0 to 31 */
if (potvalue) /* if non-zero, check for subrange limiting */
{
potvalue >>= PotInputRangeShiftTblPWM[globalPtr->powerRange]; /* rescale in low power levels */
if (!potvalue) potvalue = 1; /* make sure we don't change the backlight state */
};
return(potvalue);
};
/*page /*page
*************************************************************************************************** ***************************************************************************************************
* *
@ -144,7 +355,7 @@ OSErr PWMControl(CntrlParam *ctlPB,driverGlobalPtr globalPtr) /* 'open' entry p
{ {
case kSetScreenBrightness: /* set brightness level */ case kSetScreenBrightness: /* set brightness level */
tempvalue = ctlPB->csParam[0]; tempvalue = ctlPB->csParam[0];
globalPtr->userBrightness = (*globalPtr->setlevelproc)(tempvalue,globalPtr); globalPtr->userBrightness = SetPWM(tempvalue,globalPtr); /* <Sys7.1> no proc for this in driver globals */
break; break;
default: default:
@ -154,37 +365,44 @@ OSErr PWMControl(CntrlParam *ctlPB,driverGlobalPtr globalPtr) /* 'open' entry p
return(error); return(error);
}; };
/* /*page
*************************************************************************************************** ***************************************************************************************************
* *
* The status routine
*
* return:
* noErr - task completed successfully
* statusErr - illegal status selector
*
* *
*************************************************************************************************** ***************************************************************************************************
*/ */
int SetPWM(int new,driverGlobalPtr globalPtr) /* <Sys7.1> recreated from scratch */
OSErr PWMStatus(CntrlParam *ctlPB,driverGlobalPtr globalPtr)
{ {
PMgrPBlock pb; /* power manager pb */ OSErr error;
unsigned char val; /* hardware value setting */
PEG_TO_LIMITS(new, globalPtr->maximumTable[globalPtr->powerRange], globalPtr->settingTable->minimum); /* <H8> use new tables */ /* limit value to valid range */
val = globalPtr->settingTable->table[new]; /* look up value from table */
if ((globalPtr->userBrightness >= 0) && (val == globalPtr->lastHWSetting)) return(new);/* nothing to do; 90/05/15 just turn on; 90/07/02 avoid touching */ error = noErr;
if (globalPtr->slewChange)
switch(ctlPB->csCode)
{ {
if (abs(globalPtr->lastHWSetting - val) > globalPtr->slewLimit) case kGetScreenBrightness: /* get brightness level */
val = globalPtr->lastHWSetting + ((globalPtr->lastHWSetting > val) ? -globalPtr->slewLimit : globalPtr->slewLimit); ctlPB->csParam[0] = globalPtr->userBrightness;
else break;
globalPtr->slewChange = false;
case kGetBrightnessRange:
ctlPB->csParam[0] = 31;
ctlPB->csParam[1] = 0;
break;
case kGetMaximum:
ctlPB->csParam[0] = globalPtr->maximumTable[globalPtr->powerRange];
break;
default:
error = statusErr;
}; };
globalPtr->lastHWSetting = val; /* save the new hardware setting */
pb.pmgrCmd = SetBrightnessCmd; /* everyone else uses "set brightness" */
pb.pmgrCnt = 1;
pb.pmgrXPtr = &val;
pb.pmgrRPtr = nil;
PMgr(&pb); /* set the pwm */
return(new); /* return the current value */
};
return(error);
}

View File

@ -1,3 +1,11 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Reverted Horror and SuperMario changes
Brought ChargerAdjust/LowTable back from backlight.c
9/2/94 SuperMario ROM source dump (header preserved below)
*/
/* /*
File: register.c File: register.c
@ -117,7 +125,10 @@ typedef struct
char keymodifiers; char keymodifiers;
short unused; short unused;
} posteventtype, *posteventtypeptr; } posteventtype, *posteventtypeptr;
extern setTableType PortableTbl5V; extern posteventtype postEventData;
extern unsigned char PortableTbl5V[];
extern unsigned char PortableTable7V[];
extern short PortableMaxTbl[];
int GetBacklightInfo(short mask, short shift); int GetBacklightInfo(short mask, short shift);
void SaveBacklightInfo(short new,short mask, short shift); void SaveBacklightInfo(short new,short mask, short shift);
@ -125,23 +136,86 @@ void SaveBacklightInfo(short new,short mask, short shift);
TurnOnOff(Boolean on); TurnOnOff(Boolean on);
setNewKeys(int keycombo); setNewKeys(int keycombo);
/*page
***************************************************************************************************
*
*
***************************************************************************************************
*/
/* <Sys7.1> verbatim from backlight.c */
void ChargerAdjust (driverGlobalPtr globalPtr)
{
unsigned int oldTable;
oldTable = globalPtr->lowTable; /* save the current table being used */
globalPtr->lowTable = LowTable(globalPtr); /* get the new table to use */
if (globalPtr->lowTable == oldTable) return; /* are we changing tables ???, no exit */
globalPtr->slewChange = true; /* if change, set tmp slew on */
globalPtr->settingTable = globalPtr->lowTable ? globalPtr->settingTableLow :globalPtr->settingTableHigh ;
};
/*page
***************************************************************************************************
*
*
***************************************************************************************************
*/
/* <Sys7.1> verbatim from backlight.c */
unsigned int LowTable (driverGlobalPtr globalPtr)
{
PmgrGlobals **pmgrglobalhdl; /* handle to power manager globals */
Boolean wasLowTable; /* current table being used */
Boolean hiTable; /* use hi level table now */
pmgrglobalhdl = (PmgrGlobals **) 0x0D18; /* handle to power manager globals */
wasLowTable = globalPtr->lowTable; /* current table */
hiTable = false; /* assume low table */
if ((wasLowTable && ((*pmgrglobalhdl)->BatAvg >= globalPtr->hiThreshold)) ||
(!wasLowTable && ((*pmgrglobalhdl)->BatAvg >= globalPtr->lowThreshold)))
{
hiTable = (*pmgrglobalhdl)->Charger & 0x01; /* qualify table with charger */
};
return(hiTable ? 0 : 1); /* return 1 if low table, 0 if high */
};
/*page /*page
*************************************************************************************************** ***************************************************************************************************
** Register control software ********************************************************************** ** Register control software **********************************************************************
*************************************************************************************************** ***************************************************************************************************
*/ */
OSErr InitRegControls(driverGlobalPtr globalPtr) /* <Sys7.1> don't return OSErr */
/* <Sys7.1> reverted to old-style tables despite <H3> */
void InitRegControls(driverGlobalPtr globalPtr)
{ {
int SetBrightness(); int SetBrightness();
int KbdControl(); int KbdControl();
int RegisterClose(); int RegisterClose();
unsigned int pramBrightness; OSErr RegisterStatus(CntrlParam *, driverGlobalPtr);
OSErr RegisterControl(CntrlParam *, driverGlobalPtr);
int pramBrightness;
void ShutdownBacklight(); void ShutdownBacklight();
posteventtypeptr postdataptr;
if (BACKLIGHTSIGREG & TABLE_5V) globalPtr->settingTable = &PortableTbl5V; postdataptr = &postEventData;
postdataptr->keysActive = 0;
postdataptr->keymodifiers = 0;
globalPtr->userInputSampleRate = 1;
globalPtr->settingTable = (BACKLIGHTSIGREG & TABLE_5V) ? PortableTbl5V : PortableTable7V;
globalPtr->maximumTable = &PortableMaxTbl;
globalPtr->setlevelproc = SetBrightness;
globalPtr->userInputProc = KbdControl;
globalPtr->closeProc = RegisterClose;
globalPtr->statusProc = RegisterStatus;
globalPtr->controlProc = RegisterControl;
globalPtr->keycodes = GetPramKeyData(); globalPtr->keycodes = GetPramKeyData();
pramBrightness = GetPramBrightness(); /* get pram setting */ pramBrightness = GetPramBrightness(); /* get pram setting */
@ -149,13 +223,14 @@ OSErr InitRegControls(driverGlobalPtr globalPtr)
setNewKeys(globalPtr->keycodes); setNewKeys(globalPtr->keycodes);
if (pramBrightness < 0) /* check for valid brightness value */ if (pramBrightness < 0) /* check for valid brightness value */
{ {
pramBrightness = globalPtr->settingTable->minimum+1; /* <H3> load default brightness */ pramBrightness = 1; /* <H3> load default brightness */
SaveBrightness(globalPtr->settingTable->minimum+1); /* <H3> validate, as save new brightness */ SaveBrightness(1); /* <H3> validate, as save new brightness */
}; };
globalPtr->userBrightness = globalPtr->settingTable->maximum; /* <H3> */ globalPtr->userBrightness = 30; /* <H3> */
globalPtr->userBrightness = SetBrightness(globalPtr->settingTable->minimum,globalPtr); /* <H3> initialize pot */ globalPtr->lastHWSetting = globalPtr->settingTable[30];
globalPtr->userBrightness = SetBrightness(0,globalPtr); /* <H3> initialize pot */
globalPtr->userBrightness = SetBrightness(pramBrightness,globalPtr); /* set brightness level */ globalPtr->userBrightness = SetBrightness(pramBrightness,globalPtr); /* set brightness level */
if (BACKLIGHTSIGREG == BACKLIGHTSIG_UPGRD) if (BACKLIGHTSIGREG == BACKLIGHTSIG_UPGRD)
@ -166,8 +241,6 @@ OSErr InitRegControls(driverGlobalPtr globalPtr)
}; };
ShutDwnInstall( (ShutDwnProcPtr) ShutdownBacklight,sdRestartOrPower); /* install shutdown task */ ShutDwnInstall( (ShutDwnProcPtr) ShutdownBacklight,sdRestartOrPower); /* install shutdown task */
return(noErr);
}; };
/*page /*page
@ -266,6 +339,7 @@ TurnOnOff(Boolean on)
* *
*************************************************************************************************** ***************************************************************************************************
*/ */
/* <Sys7.1> reverted to old-style tables despite <H3> */
int SetBrightness(int new, driverGlobalPtr globalPtr) int SetBrightness(int new, driverGlobalPtr globalPtr)
{ {
unsigned char regvalue; unsigned char regvalue;
@ -274,20 +348,16 @@ int SetBrightness(int new, driverGlobalPtr globalPtr)
char signature; char signature;
Boolean onBitHigh; Boolean onBitHigh;
Boolean countDownBit; Boolean countDownBit;
int current;
unsigned char tablevalue; unsigned char tablevalue;
Boolean initialize; Boolean initialize;
initialize = (globalPtr->userBrightness < 0); initialize = (globalPtr->userBrightness < 0);
PEG_TO_LIMITS(new, globalPtr->maximumTable[globalPtr->powerRange], globalPtr->settingTable->minimum); /* <H3> limit value to valid range */ PEG_TO_LIMITS(new, globalPtr->maximumTable[globalPtr->powerRange], 0); /* <H3> limit value to valid range */
current = (initialize)
? globalPtr->settingTable->minimum /* <H3> */
: globalPtr->userBrightness;
tablevalue = globalPtr->settingTable->table[new]; /* <H3> look up value from table */ tablevalue = globalPtr->settingTable[new]; /* <H3> look up value from table */
if (!initialize && (tablevalue == globalPtr->lastHWSetting) ) if (tablevalue == globalPtr->lastHWSetting)
return(new); /* nothing to do; 90/05/15 just turn on; 90/07/02 avoid touching */ return(new); /* nothing to do; 90/05/15 just turn on; 90/07/02 avoid touching */
/* setup control bits */ /* setup control bits */
@ -297,13 +367,13 @@ int SetBrightness(int new, driverGlobalPtr globalPtr)
backlightreg = (Ptr) PORTABLE_HW; backlightreg = (Ptr) PORTABLE_HW;
regvalue = COUNT_BIT + L_CS_BIT; /* start with count and CS inactive */ regvalue = COUNT_BIT + L_CS_BIT; /* start with count and CS inactive */
if ((onBitHigh && (new != globalPtr->settingTable->minimum)) || (!onBitHigh && (new == globalPtr->settingTable->minimum))) /* <H3> */ if ((onBitHigh && new) || (!onBitHigh && !new)) /* <H3> */
regvalue |= ON_BIT; /* upgrade has opposite polarity */ regvalue |= ON_BIT; /* upgrade has opposite polarity */
if ((countDownBit && (new <= current)) || (!countDownBit && (new >= current))) if ((countDownBit && (new <= globalPtr->userBrightness)) || (!countDownBit && (new >= globalPtr->userBrightness)))
regvalue |= COUNTDN_BIT; /* set the count down bit if new > current */ regvalue |= COUNTDN_BIT; /* set the count down bit if new > current */
strobes = (new == globalPtr->settingTable->minimum) /* <H3> */ strobes = (new == 0) /* <H3> */
? MAXSTROBECOUNT /* if minimum, bang against stops */ ? MAXSTROBECOUNT /* if minimum, bang against stops */
: abs(globalPtr->lastHWSetting - tablevalue); : abs(globalPtr->lastHWSetting - tablevalue);
@ -407,11 +477,12 @@ int KbdControl (driverGlobalPtr globalPtr)
* *
*************************************************************************************************** ***************************************************************************************************
*/ */
/* <Sys7.1> reverted to old-style tables despite <H3> */
int RegisterClose (driverGlobalPtr globalPtr) int RegisterClose (driverGlobalPtr globalPtr)
{ {
globalPtr->userBrightness = globalPtr->settingTable->maximum; /* <H3> */ globalPtr->userBrightness = 30; /* <H3> */
globalPtr->userBrightness = SetBrightness(globalPtr->settingTable->minimum,globalPtr); /* <H3> initialize pot */ globalPtr->userBrightness = SetBrightness(0,globalPtr); /* <H3> initialize pot */
SleepQRemove(&globalPtr->sleepQelement); /* remove sleep task */ SleepQRemove(&globalPtr->sleepQelement); /* remove sleep task */
ShutDwnRemove( (ShutDwnProcPtr) ShutdownBacklight); /* remove shutdown task */ ShutDwnRemove( (ShutDwnProcPtr) ShutdownBacklight); /* remove shutdown task */
@ -445,7 +516,7 @@ OSErr RegisterControl(CntrlParam *ctlPB,driverGlobalPtr globalPtr) /* 'open' en
{ {
case kSetScreenBrightness: /* set brightness level */ case kSetScreenBrightness: /* set brightness level */
tempvalue = ctlPB->csParam[0]; tempvalue = ctlPB->csParam[0];
globalPtr->userBrightness = (*globalPtr->setlevelproc)(tempvalue,globalPtr); globalPtr->userBrightness = SetBrightness(tempvalue,globalPtr); /* <Sys7.1> no proc for this in driver globals */
break; break;
case kSaveScreenBrightness: /* save brightness level */ case kSaveScreenBrightness: /* save brightness level */
SaveBrightness(globalPtr->userBrightness); SaveBrightness(globalPtr->userBrightness);
@ -488,15 +559,25 @@ OSErr RegisterStatus(CntrlParam *ctlPB,driverGlobalPtr globalPtr) /* 'open' en
error = noErr; error = noErr;
switch(ctlPB->csCode) switch(ctlPB->csCode)
{ {
case kGetScreenBrightness: /* <Sys7.1> */
ctlPB->csParam[0] = globalPtr->userBrightness;
break;
case kGetBrightnessKeys: /* return current saved brightness */ case kGetBrightnessKeys: /* return current saved brightness */
ctlPB->csParam[0] = globalPtr->keycodes; ctlPB->csParam[0] = globalPtr->keycodes;
break; break;
case kGetBrightnessRange: /* <Sys7.1> */
ctlPB->csParam[0] = 30;
ctlPB->csParam[1] = 0;
break;
case kGetPBacklight: case kGetPBacklight:
ctlPB->csParam[0] = GetPramBrightness(); ctlPB->csParam[0] = GetPramBrightness();
break; break;
case kGetPKey: case kGetPKey:
ctlPB->csParam[0] = GetPramKeyData(); ctlPB->csParam[0] = GetPramKeyData();
break; break;
case kGetMaximum: /* <Sys7.1> */
ctlPB->csParam[0] = globalPtr->maximumTable[globalPtr->powerRange];
break;
default: default:
error = statusErr; error = statusErr;
@ -508,11 +589,15 @@ setNewKeys(int keycombo)
{ {
char newKey; char newKey;
posteventtypeptr postdataptr;
newKey = 0; newKey = 0;
if (keycombo & 0x01) newKey |= 0x10; if (keycombo & 0x01) newKey |= 0x10;
if (keycombo & 0x02) newKey |= 0x02; if (keycombo & 0x02) newKey |= 0x02;
if (keycombo & 0x04) newKey |= 0x08; if (keycombo & 0x04) newKey |= 0x08;
/* <Sys7.1> would interact with (alas unused) MyPostEvent patch */
postdataptr = &postEventData;
postdataptr->keymodifiers = newKey;
}; };

View File

@ -1,3 +1,14 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted Horror and SuperMario changes
; For some reason, <6> needed to be put back in
; Guessed the name of the unused _PostEvent patch
; Removed tables for DB and Dartanian
; Removed per-machine tables (in favour of C init code)
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: backlight.a ; File: backlight.a
; ;
@ -92,6 +103,40 @@ VBLEntry PROC EXPORT
rts rts
;----------------------------------------------------------------------------------
;
MyPostEvent PROC EXPORT ; <Sys7.1>
movem.l d1/a1,-(sp)
lea postEventData,a1
move.l a0,d1
tst.b 5(a1) ; postEventData.keymodifiers
beq.s @noKey
cmp.w #3,d1
beq.s @specialMode
tst.b 4(a1) ; postEventData.keysActive
beq.s @noKey
cmp.w #5,d1
bne.s @noKey
bra.s @return
@specialMode move.w $17A,d1
rol.w #1,d1 ; d1=1 if command key down
cmp.b 5(a1),d1
bne.s @noKey
@yesKey st 4(a1) ; postEventData.keysActive
bra.s @return
@noKey sf 4(a1) ; postEventData.keysActive
move.l 0(a1),a1
jsr (a1)
@return movem.l (sp)+,d1/a1
rts
EXPORT postEventData
postEventData dcb.b 8,0 ; see struct in Register.c
;----------------------------------------------------------------------------------- ;-----------------------------------------------------------------------------------
; ;
; ;
@ -105,28 +150,11 @@ SleepEntry PROC EXPORT
move.l (sp)+,d0 move.l (sp)+,d0
clr.l d0 clr.l d0
rts ; rts ;
;--------------------------------------------------------------------------------------------------------------
;
GetBkltPrimInfo proc export
with PmgrRec,PmgrPrimitivesRec
movea.l PmgrBase,a0 ; point to power manager globals
LoadTbl BklightTblPtr,a0,a0 ; get backlight table pointer in a0
move.l a0,d0 ; move pointer to d0 for C return
rts
END
;----------------------------------------------------------------------------------- ;-----------------------------------------------------------------------------------
; ;
PortableTable7V PROC EXPORT PortableTable7V PROC EXPORT
dc.w 0 ; minimum value <H7> dc.b 0 ; 0 ; ex<H7> <Sys7.1>
dc.w @end - @start ; <H7>
@start dc.b 0 ; 0 <H7>
dc.b 1 ; 1 dc.b 1 ; 1
dc.b 2 ; 2 dc.b 2 ; 2
dc.b 3 ; 3 dc.b 3 ; 3
@ -156,16 +184,14 @@ PortableTable7V PROC EXPORT
dc.b 36 ; 27 dc.b 36 ; 27
dc.b 40 ; 28 dc.b 40 ; 28
dc.b 45 ; 29 dc.b 45 ; 29
@end dc.b 50 ; 30 <H7> dc.b 50 ; 30
dc.b 0
;-------------------------------------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------------------------------------
; ;
PortableTbl5V PROC EXPORT PortableTbl5V PROC EXPORT
dc.w 0 ; minimum value <H7> dc.b 0 ; 0 ; ex<H7> <Sys7.1>
dc.w @end - @start ; <H7>
@start
dc.b 0 ; 0 <H7>
dc.b 2 ; 1 dc.b 2 ; 1
dc.b 5 ; 2 dc.b 5 ; 2
dc.b 7 ; 3 dc.b 7 ; 3
@ -195,55 +221,62 @@ PortableTbl5V PROC EXPORT
dc.b 66 ; 27 dc.b 66 ; 27
dc.b 70 ; 28 dc.b 70 ; 28
dc.b 75 ; 29 dc.b 75 ; 29
@end dc.b 80 ; 30 <H7> dc.b 80 ; 30
dc.b 0
;-------------------------------------------------------------------------------------------------------------
;
; <Sys7.1> moved from lower down in the file
PortableMaxTbl PROC EXPORT ; power range
dc.w 30 ; 0
dc.w 15 ; 1
dc.w 15 ; 2
dc.w 7 ; 3
dc.w 3 ; 4
;-------------------------------------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------------------------------------
; ;
asahiTbl PROC EXPORT asahiTbl PROC EXPORT
dc.w 0 ; minimum value <H7> dc.b 0 ; 0 ; ex<H7> <Sys7.1> and redo <6>
dc.w @end - @start ; <H7> dc.b 5 ; 1
dc.b 6 ; 2
@start dc.b 0 ; 0 <H7> dc.b 7 ; 3
dc.b 1 ; 1 dc.b 8 ; 4
dc.b 2 ; 2 dc.b 9 ; 5
dc.b 3 ; 3 dc.b 10 ; 6
dc.b 4 ; 4 dc.b 10 ; 7
dc.b 5 ; 5 dc.b 11 ; 8
dc.b 6 ; 6 dc.b 12 ; 9
dc.b 7 ; 7 dc.b 13 ; 10
dc.b 8 ; 8 dc.b 14 ; 11
dc.b 9 ; 9 dc.b 15 ; 12
dc.b 10 ; 10 dc.b 15 ; 13
dc.b 11 ; 11 dc.b 16 ; 14
dc.b 12 ; 12 dc.b 17 ; 15
dc.b 13 ; 13 dc.b 18 ; 16
dc.b 14 ; 14 dc.b 19 ; 17
dc.b 15 ; 15 dc.b 20 ; 18
dc.b 16 ; 16 dc.b 20 ; 19
dc.b 17 ; 17 dc.b 21 ; 20
dc.b 18 ; 18 dc.b 22 ; 21
dc.b 19 ; 19 dc.b 23 ; 22
dc.b 20 ; 20 dc.b 24 ; 23
dc.b 21 ; 21 dc.b 25 ; 24
dc.b 22 ; 22
dc.b 23 ; 23
dc.b 24 ; 24
dc.b 25 ; 25 dc.b 25 ; 25
dc.b 26 ; 26 dc.b 26 ; 26
dc.b 27 ; 27 dc.b 27 ; 27
dc.b 28 ; 28 dc.b 28 ; 28
dc.b 29 ; 29 dc.b 29 ; 29
dc.b 30 ; 30 dc.b 30 ; 30
@end dc.b 31 ; 31 <H7> dc.b 31 ; 31
;-------------------------------------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------------------------------------
; ;
timTbl PROC EXPORT timTbl PROC EXPORT ; ex<H7> <Sys7.1>
dc.w 0 ; minimum value <H7> dc.b 31 ; 0
dc.w @end - @start ; <H7>
@start dc.b 31 ; 0 <H7>
dc.b 30 ; 1 dc.b 30 ; 1
dc.b 29 ; 2 dc.b 29 ; 2
dc.b 28 ; 3 dc.b 28 ; 3
@ -274,15 +307,13 @@ timTbl PROC EXPORT
dc.b 3 ; 28 dc.b 3 ; 28
dc.b 2 ; 29 dc.b 2 ; 29
dc.b 1 ; 30 dc.b 1 ; 30
@end dc.b 0 ; 31 <H7> dc.b 0 ; 31
;-------------------------------------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------------------------------------
; ;
timTblLow PROC EXPORT timTblLow PROC EXPORT ; ex<H7> <Sys7.1>
dc.w 0 ; minimum value <H7> dc.b 31 ; 0
dc.w @end - @start ; <H7>
@start dc.b 31 ; 0 <H7>
dc.b 30 ; 1 dc.b 30 ; 1
dc.b 30 ; 2 dc.b 30 ; 2
dc.b 29 ; 3 dc.b 29 ; 3
@ -313,16 +344,8 @@ timTblLow PROC EXPORT
dc.b 11 ; 28 dc.b 11 ; 28
dc.b 11 ; 29 dc.b 11 ; 29
dc.b 10 ; 30 dc.b 10 ; 30
@end dc.b 10 ; 31 <H7> dc.b 10 ; 31
;--------------------------------------------------------------------------------------------------------------
;
PortableMaxTbl PROC EXPORT ; power range
dc.w 30 ; 0
dc.w 15 ; 1
dc.w 15 ; 2
dc.w 7 ; 3
dc.w 3 ; 4
;-------------------------------------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------------------------------------
; ;
@ -342,289 +365,4 @@ PotInputRangeShiftTblPWM PROC EXPORT
dc.w 2 ; 3 dc.w 2 ; 3
dc.w 3 ; 4 dc.w 3 ; 4
;--------------------------------------------------------------------------------------------------------------
;
dbTbl PROC EXPORT ; <H2>
dc.w 0 ; minimum value <H7>
dc.w @end - @start ; <H7>
@start DC.B 127 ; 0 <H7>
DC.B 89 ; 1
DC.B 87 ; 2
DC.B 86 ; 3
DC.B 84 ; 4
DC.B 82 ; 5
DC.B 81 ; 6
DC.B 79 ; 7
DC.B 77 ; 8
DC.B 76 ; 9
DC.B 74 ; 10
DC.B 71 ; 11
DC.B 69 ; 12
DC.B 67 ; 13
DC.B 66 ; 14
DC.B 64 ; 15
DC.B 62 ; 16
DC.B 61 ; 17
DC.B 59 ; 18
DC.B 57 ; 19
DC.B 56 ; 20
DC.B 54 ; 21
DC.B 52 ; 22
DC.B 51 ; 23
DC.B 49 ; 24
DC.B 47 ; 25
DC.B 46 ; 26
DC.B 44 ; 27
DC.B 42 ; 28
DC.B 41 ; 29
DC.B 39 ; 30
@end DC.B 38 ; 31 <H7>
;--------------------------------------------------------------------------------------------------------------
;
DartTable proc export
dc.w 0 ; minimum value
dc.w @end - @start
@start dc.b 3 ; 0
dc.b 2 ; 1
dc.b 1 ; 2
@end dc.b 0 ; 3
;
;
DartMaxTbl PROC EXPORT ; power range
dc.w 3 ; 0
dc.w 2 ; 1
dc.w 2 ; 2
dc.w 1 ; 3
dc.w 0 ; 4
;--------------------------------------------------------------------------------------------------------------
;
; generic exit for non-supported functions
;
StandardExit PROC EXPORT
rts
;--------------------------------------------------------------------------------------------------------------
;
; list to supported cpu's (boxflags)
;
cpuTable PROC EXPORT
dc.w boxPortable
dc.l Portableinfo - cpuTable
dc.w boxPowerBook100
dc.l PowerBook100info - cpuTable
dc.w boxPowerBookDuo250 ; <SM3>
dc.l PowerBookDuoinfo - cpuTable
dc.w boxDBLite20
dc.l PowerBookDuoinfo - cpuTable
dc.w boxPowerBookDuo210
dc.l PowerBookDuoinfo - cpuTable
dc.w boxPowerBookDuo230
dc.l PowerBookDuoinfo - cpuTable
dc.w boxPowerBook140 ; cpu id
dc.l PowerBook170info - cpuTable
dc.w boxPowerBook170 ; cpu id
dc.l PowerBook170info - cpuTable
dc.w boxPowerBook180
dc.l PowerBook180info - cpuTable
dc.w boxPowerBook160
dc.l PowerBook180info - cpuTable
dc.w boxYeagerFSTN ; <SM3>
dc.l PowerBookDuoinfo - cpuTable
dc.w boxPowerBookDuo270C ; <SM3>
dc.l PowerBookDuoinfo - cpuTable
dc.w -1
;--------------------------------------------------------------------------------------------------------------
;
;
import StandardExit
import SetBrightness,KbdControl,InitRegControls,RegisterClose,RegisterControl,RegisterStatus
import SetPWM,PotControl,InitPWMControls,PWMCloseRoutine,PWMControl,GenericStatus,PortableBacklightValue
import SetDart,GetDart,InitTimControls,InitDartControls,PowerMgrPot,ChargerAdjust
import PGE_button
with backlightflags
;--------------------------------------------------------------------------------------------------------------
;
;
Portableinfo
dc.l (0 << disableHWinput)\ ; operating flag (stops user input)
+(0 << kbdactive)\ ; operating flag (kbd control inprogress)
+(1 << vbl_ok)\ ; operating flag (allow vbl operations)
+(0 << flyByWire)\ ; config flag (hardware input)
+(0 << freeflag)\ ; (n/a) unused flag
+(0 << dualTable)\ ; config flag (use multi tables)
+(0 << lowTable)\ ; operating flag (currently using low table)
+(0 << slewChange) ; operating flag (table transition inprogress)
dc.l SetBrightness - Portableinfo ; set routine
dc.l KbdControl - Portableinfo ; get user input routine
dc.l InitRegControls - Portableinfo ; initialization routine
dc.l RegisterClose - Portableinfo ; close routine
dc.l RegisterControl - Portableinfo ; control routine
dc.l RegisterStatus - Portableinfo ; status routine
dc.l StandardExit - Portableinfo ; (n/a) charger state change routine
dc.l PortableMaxTbl - Portableinfo ; table of maximum value for different power ranges
dc.l PortableTable7V - Portableinfo ; low range table
dc.l PortableTable7V - Portableinfo ; high range table
dc.l PowerMgrPot - Portableinfo ; hardware dependent var
dc.w 1 ; vbl count SampleRate
dc.w 0 ; (n/a) lowThreshold
dc.w 0 ; (n/a) hiThreshold
;--------------------------------------------------------------------------------------------------------------
;
;
PowerBook100info
dc.l (0 << disableHWinput)\ ; operating flag (stops user input)
+(0 << kbdactive)\ ; operating flag (kbd control inprogress)
+(1 << vbl_ok)\ ; operating flag (allow vbl operations)
+(1 << flyByWire)\ ; config flag (hardware input)
+(0 << freeflag)\ ; unused flag
+(0 << dualTable)\ ; config flag (use multi tables)
+(0 << lowTable)\ ; operating flag (currently using low table)
+(0 << slewChange) ; operating flag (table transition inprogress)
dc.l SetPWM - PowerBook100info ; set routine
dc.l PotControl - PowerBook100info ; get user input routine
dc.l InitPWMControls - PowerBook100info ; initialization routine
dc.l PWMCloseRoutine - PowerBook100info ; close routine
dc.l PWMControl - PowerBook100info ; control routine
dc.l GenericStatus - PowerBook100info ; status routine
dc.l StandardExit - PowerBook100info ; (n/a) charger state change routine
dc.l PWMMaxTbl - PowerBook100info ; table of maximum value for different power ranges
dc.l asahiTbl - PowerBook100info ; low range table
dc.l asahiTbl - PowerBook100info ; high range table
dc.l PortableBacklightValue- PowerBook100info; hardware dependent var
dc.w 10 ; vbl count SampleRate
dc.w 0 ; (n/a) lowThreshold
dc.w 0 ; (n/a) hiThreshold
;--------------------------------------------------------------------------------------------------------------
;
;
HITABLETHRESHOLD170 equ (685 - 512)
LOWTABLETHRESHOLD170 equ (675 - 512)
PowerBook170info
dc.l (0 << disableHWinput)\ ; operating flag (stops user input)
+(0 << kbdactive)\ ; (n/a) operating flag (kbd control inprogress)
+(1 << vbl_ok)\ ; operating flag (allow vbl operations)
+(1 << flyByWire)\ ; config flag (hardware input)
+(1 << freeflag)\ ; (n/a)
+(0 << dualTable)\ ; config flag (use multi tables)
+(0 << lowTable)\ ; operating flag (currently using low table)
+(0 << slewChange) ; operating flag (table transition inprogress)
dc.l SetPWM - PowerBook170info ; set routine
dc.l PotControl - PowerBook170info ; get user input routine
dc.l InitTimControls - PowerBook170info ; initialization routine
dc.l PWMCloseRoutine - PowerBook170info ; close routine
dc.l PWMControl - PowerBook170info ; control routine
dc.l GenericStatus - PowerBook170info ; status routine
dc.l ChargerAdjust - PowerBook170info ; charger state change routine
dc.l PWMMaxTbl - PowerBook170info ; table of maximum value for different power ranges
dc.l timTblLow - PowerBook170info ; low range table
dc.l timTbl - PowerBook170info ; high range table
dc.l PowerMgrPot - PowerBook170info ; hardware dependent var
dc.w 10 ; vbl count SampleRate
dc.w LOWTABLETHRESHOLD170 ; voltage threshold before switching from high to low table
dc.w HITABLETHRESHOLD170 ; voltage threshold before switching from low to high table
;--------------------------------------------------------------------------------------------------------------
;
;
PowerBook180info
dc.l (0 << disableHWinput)\ ; operating flag (stops user input)
+(0 << kbdactive)\ ; (n/a) operating flag (kbd control inprogress)
+(1 << vbl_ok)\ ; operating flag (allow vbl operations)
+(1 << flyByWire)\ ; config flag (hardware input)
+(1 << freeflag)\ ; (n/a)
+(1 << dualTable)\ ; config flag (use multi tables)
+(0 << lowTable)\ ; operating flag (currently using low table)
+(0 << slewChange) ; operating flag (table transition inprogress)
dc.l SetPWM - PowerBook180info ; set routine
dc.l PotControl - PowerBook180info ; get user input routine
dc.l InitPWMControls - PowerBook180info ; initialization routine
dc.l PWMCloseRoutine - PowerBook180info ; close routine
dc.l PWMControl - PowerBook180info ; control routine
dc.l GenericStatus - PowerBook180info ; status routine
dc.l ChargerAdjust - PowerBook180info ; charger state change routine
dc.l PWMMaxTbl - PowerBook180info ; table of maximum value for different power ranges
dc.l timTblLow - PowerBook180info ; low range table
dc.l timTbl - PowerBook180info ; high range table
dc.l PowerMgrPot - PowerBook180info ; hardware dependent var
dc.w 10 ; vbl count SampleRate
dc.w LOWTABLETHRESHOLD170 ; voltage threshold before switching from high to low table
dc.w HITABLETHRESHOLD170 ; voltage threshold before switching from low to high table
PowerBook180infoHWControl
dc.l (0 << disableHWinput)\ ; operating flag (stops user input)
+(0 << kbdactive)\ ; operating flag (kbd control inprogress)
+(1 << vbl_ok)\ ; operating flag (allow vbl operations)
+(1 << flyByWire)\ ; config flag (hardware input)
+(1 << freeflag)\
+(0 << dualTable)\ ; config flag (use multi tables)
+(0 << lowTable)\ ; operating flag (currently using low table)
+(0 << slewChange) ; operating flag (table transition inprogress)
dc.l SetPWM - PowerBook180info ; set routine
dc.l PotControl - PowerBook180info ; get user input routine
dc.l InitDartControls - PowerBook180info ; initialization routine
dc.l PWMCloseRoutine - PowerBook180info ; close routine
dc.l PWMControl - PowerBook180info ; control routine
dc.l GenericStatus - PowerBook180info ; status routine
dc.l 0 ; (n/a) charger state change routine
dc.l DartMaxTbl - PowerBook180info ; table of maximum value for different power ranges
dc.l DartTable - PowerBook180info ; low range table
dc.l DartTable - PowerBook180info ; high range table
dc.l PowerMgrPot - PowerBook180info ; hardware dependent var
dc.w 10 ; vbl count SampleRate
dc.w 0 ; (n/a) lowThreshold
dc.w 0 ; (n/a) hiThreshold
;--------------------------------------------------------------------------------------------------------------
;
;
PowerBookDuoinfo
dc.l (0 << disableHWinput)\ ; operating flag (stops user input)
+(0 << kbdactive)\ ; operating flag (kbd control inprogress)
+(1 << vbl_ok)\ ; operating flag (allow vbl operations)
+(1 << flyByWire)\ ; config flag (hardware input)
+(1 << freeflag)\
+(0 << dualTable)\ ; config flag (use multi tables)
+(0 << lowTable)\ ; operating flag (currently using low table)
+(0 << slewChange) ; operating flag (table transition inprogress)
dc.l SetPWM - PowerBookDuoinfo ; set routine
dc.l PotControl - PowerBookDuoinfo ; get user input routine
dc.l InitPWMControls - PowerBookDuoinfo ; initialize routine
dc.l PWMCloseRoutine - PowerBookDuoinfo ; close routine
dc.l PWMControl - PowerBookDuoinfo ; control routine
dc.l GenericStatus - PowerBookDuoinfo ; status routine
dc.l StandardExit - PowerBookDuoinfo ; (n/a) charger state change routine
dc.l PWMMaxTbl - PowerBookDuoinfo ; table of maximum value for different power ranges
dc.l dbTbl - PowerBookDuoinfo ; low range table
dc.l dbTbl - PowerBookDuoinfo ; high range table
dc.l PGE_button - PowerBookDuoinfo ; hardware dependent var
dc.w 10 ; vbl count SampleRate
dc.w 0 ; (n/a) lowThreshold
dc.w 0 ; (n/a) hiThreshold
END END

View File

@ -1,3 +1,13 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Reverted Horror (except <H2>) and SuperMario changes
Constants used instead of boxFlag equates for clarity
GetBacklightInfo/SaveBacklightInfo recreated from disassembly
ChargerAdjust/LowTable put back into PWM.c
9/2/94 SuperMario ROM source dump (header preserved below)
*/
/* /*
File: backlight.c File: backlight.c
@ -166,19 +176,15 @@ cpuDependentInfoPtr GetBkltPrimInfo();
*************************************************************************************************** ***************************************************************************************************
*/ */
/* <Sys7.1> many changes */
pascal OSErr DRVROpen(CntrlParam *ctlPB,DCtlPtr dCtl) /* 'open' entry point */ pascal OSErr DRVROpen(CntrlParam *ctlPB,DCtlPtr dCtl) /* 'open' entry point */
{ {
#pragma unused (ctlPB) #pragma unused (ctlPB)
register driverGlobalPtr globalPtr; /* pointer to globals */ register driverGlobalPtr globalPtr; /* pointer to globals */
PmgrGlobals **pmgrglobalhdl; /* handle to power manager globals */ PmgrGlobals **pmgrglobalhdl; /* handle to power manager globals */
OSErr error; char boxFlag;
cpuDependentInfoType *cpuinfo;
OSErr (*openProc)();
cpuinfo = GetBkltPrimInfo();
if (!cpuinfo) return(openErr);
globalPtr = (driverGlobalPtr) NewPtrSysClear(sizeof(driverGlobaltypes)); globalPtr = (driverGlobalPtr) NewPtrSysClear(sizeof(driverGlobaltypes));
if (!globalPtr) return(openErr); /* not enough memory, return error */ if (!globalPtr) return(openErr); /* not enough memory, return error */
@ -188,45 +194,25 @@ pascal OSErr DRVROpen(CntrlParam *ctlPB,DCtlPtr dCtl) /* 'open' entry point *
/* setup variables */ /* setup variables */
globalPtr->version = DRIVERVERSION; /* driver version number, in globals for easy patching */ globalPtr->version = DRIVERVERSION; /* driver version number, in globals for easy patching */
*((unsigned int *)(((int)&(globalPtr->version)) + sizeof(globalPtr->version))) = cpuinfo->bkltinfo->flags; globalPtr->vbl_ok = true;
globalPtr->lowThreshold = cpuinfo->bkltinfo->lowThreshold; /*low hysteresis threshold */
globalPtr->hiThreshold = cpuinfo->bkltinfo->hiThreshold; /* high hysteresis threshold */
globalPtr->userInputSampleRate = cpuinfo->bkltinfo->userInputSampleRate; /* sample every 160ms */
globalPtr->lastLevel = (*pmgrglobalhdl)->LastLevel; /* get current power level */ globalPtr->lastLevel = (*pmgrglobalhdl)->LastLevel; /* get current power level */
// globalPtr->userRange = 0; /* allow full power level */ // globalPtr->userRange = 0; /* allow full power level */
globalPtr->powerRange = Larger(globalPtr->lastLevel,globalPtr->userRange); globalPtr->powerRange = Larger(globalPtr->lastLevel,globalPtr->userRange);
/* initialize tables */ /* <Sys7.1> */
globalPtr->maximumTable = (short *) (cpuinfo->bkltroutines->maxTable); boxFlag = *(char *)0xCB3;
globalPtr->settingTableLow = (setTableType *) (cpuinfo->bkltroutines->lowTable); /* <H8> */ switch (boxFlag)
globalPtr->settingTableHigh = (setTableType *) (cpuinfo->bkltroutines->hiTable); /* <H8> */
globalPtr->settingTable = globalPtr->settingTableHigh;
/* initialize vectors */
globalPtr->setlevelproc = (intFunction) (cpuinfo->bkltroutines->setProc); /* proc to set level */
globalPtr->userInputProc = (intFunction) (cpuinfo->bkltroutines->getProc); /* proc to read user input */
openProc = (osFunction) (cpuinfo->bkltroutines->open); /* routine to close pwm hardware */
globalPtr->closeProc = (intFunction) (cpuinfo->bkltroutines->close); /* routine to close pwm hardware */
globalPtr->controlProc = (osFunction) (cpuinfo->bkltroutines->control); /* passed control routine */
globalPtr->statusProc = (osFunction) (cpuinfo->bkltroutines->status); /* passed status routine */
globalPtr->hardwareDependentPtr = (Ptr) (cpuinfo->bkltroutines->hwDependentVar);
globalPtr->tableProc = (voidFunction) (cpuinfo->bkltroutines->tableProc);
/* call custom initialization routine */
if (openProc)
{ {
error = (*openProc)(globalPtr); case 4: // Portable
if (error) InitRegControls(globalPtr);
{ break;
DisposPtr((Ptr) globalPtr); /* release memory */ case 15: // PowerBook 170, TIM
dCtl->dCtlStorage = NULL; case 18: // PowerBook 100, Asahi
return(error); /* clear out saved value for next open */ default:
}; InitPWMControls(globalPtr);
}; break;
}
globalPtr->brightnessVbl.globals = (Ptr) globalPtr; globalPtr->brightnessVbl.globals = (Ptr) globalPtr;
globalPtr->brightnessVbl.vblpb.qType = vType; globalPtr->brightnessVbl.vblpb.qType = vType;
@ -257,7 +243,6 @@ pascal OSErr DRVRClose(CntrlParam *ctlPB,DCtlPtr dCtl) /* 'open' entry point *
globalPtr = (driverGlobalPtr) dCtl->dCtlStorage; /* set context to my global data area */ globalPtr = (driverGlobalPtr) dCtl->dCtlStorage; /* set context to my global data area */
globalPtr->slewChange = false; /* always turn off slew during close <H6> */
VRemove((QElemPtr) &globalPtr->brightnessVbl.vblpb); /* remove vbl task */ VRemove((QElemPtr) &globalPtr->brightnessVbl.vblpb); /* remove vbl task */
if (globalPtr->closeProc != NULL) /* if hw close proc … */ if (globalPtr->closeProc != NULL) /* if hw close proc … */
(*globalPtr->closeProc)(globalPtr); /* … call close proc */ (*globalPtr->closeProc)(globalPtr); /* … call close proc */
@ -375,6 +360,7 @@ OSErr GenericControl(CntrlParam *ctlPB,driverGlobalPtr globalPtr)
* *
*************************************************************************************************** ***************************************************************************************************
*/ */
/* <Sys7.1> removed kGetUserInput/kGetScreenBrightness/kGetBrightnessRange/kGetMaximum */
pascal OSErr DRVRStatus(CntrlParam *ctlPB,DCtlPtr dCtl) /* 'open' entry point */ pascal OSErr DRVRStatus(CntrlParam *ctlPB,DCtlPtr dCtl) /* 'open' entry point */
{ {
@ -390,27 +376,10 @@ pascal OSErr DRVRStatus(CntrlParam *ctlPB,DCtlPtr dCtl) /* 'open' entry point
globalPtr->vbl_ok = false; /* disable vbl task */ globalPtr->vbl_ok = false; /* disable vbl task */
switch(ctlPB->csCode) switch(ctlPB->csCode)
{ {
case kGetUserInput:
ctlPB->csParam[0] = globalPtr->
userInputProc( globalPtr ); /* Get the button inputs */
break;
case KGetVersion: case KGetVersion:
ctlPB->csParam[0] = globalPtr->version; /* return current driver version */ ctlPB->csParam[0] = globalPtr->version; /* return current driver version */
break; break;
case kGetScreenBrightness: /* <H4> return current saved brightness */
ctlPB->csParam[0] = globalPtr->userBrightness;
break;
case kGetBrightnessRange: /* <H4> return range of brightness values */
ctlPB->csParam[0] = globalPtr->settingTable->maximum;/* <H4> using new tables, return max setting */
ctlPB->csParam[1] = globalPtr->settingTable->minimum;/* <H4> using new tables, return min setting */
break;
case kGetMaximum: /* <H4> */
ctlPB->csParam[0] = globalPtr->maximumTable[globalPtr->powerRange];
break;
default: default:
error = (*globalPtr->statusProc)(ctlPB,globalPtr); error = (*globalPtr->statusProc)(ctlPB,globalPtr);
}; };
@ -526,7 +495,7 @@ PowerChange (driverGlobalPtr globalPtr, int currentPowerLevel)
{ {
if (!globalPtr->flyByWire && userInput) /* if only software controls and backlight on */ if (!globalPtr->flyByWire && userInput) /* if only software controls and backlight on */
{ {
userInput >>= 1; /* reduce power by 1/2 */ userInput = globalPtr->userBrightness >> 1; /* reduce power by 1/2 */
if (!userInput) userInput = 1; /* insure at least on */ if (!userInput) userInput = 1; /* insure at least on */
}; };
}; };
@ -539,47 +508,22 @@ PowerChange (driverGlobalPtr globalPtr, int currentPowerLevel)
* *
*************************************************************************************************** ***************************************************************************************************
*/ */
/* <Sys7.1> from scratch */
/*page int GetBacklightInfo(short mask, short shift)
***************************************************************************************************
*
*
***************************************************************************************************
*/
unsigned int LowTable (driverGlobalPtr globalPtr)
{ {
PmgrGlobals **pmgrglobalhdl; /* handle to power manager globals */ unsigned char buf;
Boolean wasLowTable; /* current table being used */ ReadXPram(0x74, sizeof(buf), &buf);
Boolean hiTable; /* use hi level table now */ return (buf & mask) >> shift;
}
pmgrglobalhdl = (PmgrGlobals **) 0x0D18; /* handle to power manager globals */ /* <Sys7.1> from scratch */
void SaveBacklightInfo(short new, short mask, short shift)
wasLowTable = globalPtr->lowTable; /* current table */ {
hiTable = false; /* assume low table */ int addr = 0x70;
if ((wasLowTable && ((*pmgrglobalhdl)->BatAvg >= globalPtr->hiThreshold)) || unsigned char buf;
(!wasLowTable && ((*pmgrglobalhdl)->BatAvg >= globalPtr->lowThreshold))) ReadXPram(addr + 4, sizeof(buf), &buf);
{ buf &= ~mask;
hiTable = (*pmgrglobalhdl)->Charger & 0x01; /* qualify table with charger */ buf |= (new << shift) & mask;
}; WriteXPram(addr + 4, sizeof(buf), &buf);
return(hiTable ? 0 : 1); /* return 1 if low table, 0 if high */ }
};
/*page
***************************************************************************************************
*
*
***************************************************************************************************
*/
void ChargerAdjust (driverGlobalPtr globalPtr)
{
unsigned int oldTable;
oldTable = globalPtr->lowTable; /* save the current table being used */
globalPtr->lowTable = LowTable(globalPtr); /* get the new table to use */
if (globalPtr->lowTable == oldTable) return; /* are we changing tables ???, no exit */
globalPtr->slewChange = true; /* if change, set tmp slew on */
globalPtr->settingTable = globalPtr->lowTable ? globalPtr->settingTableLow :globalPtr->settingTableHigh ;
};

View File

@ -1,3 +1,12 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Reverted Horror and SuperMario changes
Left out boxFlag definitions, because they use obscure codenames
Version somehow increased from 1.0.1 to 1.0.2
9/2/94 SuperMario ROM source dump (header preserved below)
*/
/* /*
File: backlight.h File: backlight.h
@ -65,7 +74,7 @@
* *
*/ */
#define DRIVERMAJORVERSION 0x0100 #define DRIVERMAJORVERSION 0x0100
#define DRIVERMINORVERSION 0x0001 #define DRIVERMINORVERSION 0x0002
#define DRIVERVERSION (DRIVERMAJORVERSION + DRIVERMINORVERSION) #define DRIVERVERSION (DRIVERMAJORVERSION + DRIVERMINORVERSION)
/* Control Calls */ /* Control Calls */
@ -154,13 +163,6 @@ typedef struct
VBLTask vblpb; VBLTask vblpb;
} vblstruct; } vblstruct;
typedef struct
{
short minimum;
short maximum;
unsigned char table[];
} setTableType; /* <H8> new structure for tables */
typedef struct typedef struct
{ {
SleepQRec sleepQelement; /* sleep queue element, MUST stay on top */ SleepQRec sleepQelement; /* sleep queue element, MUST stay on top */
@ -187,9 +189,9 @@ typedef struct
short slewLimit; short slewLimit;
unsigned short lowThreshold; unsigned short lowThreshold;
unsigned short hiThreshold; unsigned short hiThreshold;
setTableType *settingTable; /* <H8> pointer to record now */ unsigned char *settingTable;
setTableType *settingTableLow; /* <H8> pointer to record now */ unsigned char *settingTableLow;
setTableType *settingTableHigh; /* <H8> pointer to record now */ unsigned char *settingTableHigh;
short *maximumTable; short *maximumTable;
short lastLevel; /* last power level */ short lastLevel; /* last power level */
@ -203,8 +205,6 @@ typedef struct
short mousedownTicks; /* first notice of mouse down in tick count */ short mousedownTicks; /* first notice of mouse down in tick count */
short keycodes; /* key combinations */ short keycodes; /* key combinations */
short lastatod; /* last raw a to d value */ short lastatod; /* last raw a to d value */
Ptr hardwareDependentPtr; /* private storage for hardware dependent code */
} driverGlobaltypes, *driverGlobalPtr; } driverGlobaltypes, *driverGlobalPtr;
typedef struct typedef struct
@ -248,20 +248,20 @@ typedef struct
#define SaveBrightness(new) SaveBacklightInfo(new+1,VALUE_MASK, 0) #define SaveBrightness(new) SaveBacklightInfo(new+1,VALUE_MASK, 0)
#define SaveKeyData(new) SaveBacklightInfo(new,KEY_MASK, 5) #define SaveKeyData(new) SaveBacklightInfo(new,KEY_MASK, 5)
/* <H8> new ponti defintions */
#define PONTILMPCTLREG *((unsigned char *) 0x50f96C00)
#define PONTILMPON 0
#define PONTILMPHWCTL 1
#define PONTILMPMUX0 2
#define PONTILMPMUX1 3
typedef int (*intFunction)(); typedef int (*intFunction)();
typedef OSErr (*osFunction)(); typedef OSErr (*osFunction)();
typedef void (*voidFunction)(); typedef void (*voidFunction)();
int abs(int); int abs(int);
unsigned char GetPortableValues(int parameter); unsigned char GetPortableValues(int parameter);
OSErr InitPWMControls(driverGlobalPtr globalPtr); void InitPWMControls(driverGlobalPtr globalPtr);
unsigned char Get_AtoD(int channel); unsigned char Get_AtoD(int channel);
unsigned char Get_PGEButton(int channel); unsigned char Get_PGEButton(int channel);
int SetPWM(int new, driverGlobalPtr globalPtr); int SetPWM(int new, driverGlobalPtr globalPtr);
void InitRegControls(driverGlobalPtr globalPtr);
int PotControl (driverGlobalPtr globalPtr);
int PWMCloseRoutine (driverGlobalPtr globalPtr);
OSErr PWMControl(CntrlParam *ctlPB,driverGlobalPtr globalPtr);
OSErr PWMStatus(CntrlParam *ctlPB,driverGlobalPtr globalPtr);
unsigned int LowTable (driverGlobalPtr globalPtr);
void ChargerAdjust (driverGlobalPtr globalPtr);

View File

@ -1,3 +1,10 @@
#
# Hacks to match MacOS (most recent first):
#
# <Sys7.1> 8/3/92 Un-#included the missing files Serial.make and SerialDMA.make
# 9/2/94 SuperMario ROM source dump (header preserved below)
#
# #
# File: Drivers.make # File: Drivers.make
# #
@ -22,9 +29,6 @@ BackLightDir = {DriverDir}BackLight:
#include {SonyDir}Sony.make #include {SonyDir}Sony.make
#include {SerialDir}Serial.make
#include {SerialDMADir}SerialDMA.make
#include {NewAgeDir}NewAge.make #include {NewAgeDir}NewAge.make
#include {IOPDir}IOP.make #include {IOPDir}IOP.make

View File

@ -1,3 +1,10 @@
#
# Hacks to match MacOS (most recent first):
#
# <Sys7.1> 8/3/92 Made build rule for linked patch file SonyPatches.a
# 9/2/94 SuperMario ROM source dump (header preserved below)
#
# #
# File: Sony.make # File: Sony.make
# #
@ -41,3 +48,8 @@
"{RsrcDir}Sony.rsrc" ƒ "{ObjDir}SonyHdr.a.o" "{RsrcDir}Sony.rsrc" ƒ "{ObjDir}SonyHdr.a.o"
Link {StdLOpts} {StdAlign} -o "{Targ}" "{ObjDir}SonyHdr.a.o" -sn Main=".Sony" -rt DRVR=4 Link {StdLOpts} {StdAlign} -o "{Targ}" "{ObjDir}SonyHdr.a.o" -sn Main=".Sony" -rt DRVR=4
# <Sys7.1>
"{ObjDir}SonyPatches.a.o" ƒ "{SonyDir}SonyPatches.a"
Asm {StdAOpts} -o "{Targ}" -d SonyNonPortable=1 -d onMac32=1 "{SonyDir}SonyPatches.a"

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM2>
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: TFBDriver.a ; File: TFBDriver.a
; ;
@ -811,11 +818,11 @@ SetGamma ; <C522/15Dec86> DAF
MOVE.L D0,A1 ; get pointer to new gamma table MOVE.L D0,A1 ; get pointer to new gamma table
TST.L GVersion(A1) ; version, type = 0? TST.L GVersion(A1) ; version, type = 0?
BNE BadCtl ; => no, return error <SM2> CSS BNE.S BadCtl ; => no, return error <SM2> CSS <Sys7.1>
CMP #8,GDataWidth(A1) ; is data width 8? CMP #8,GDataWidth(A1) ; is data width 8?
BNE BadCtl ; => no, return error <SM2> CSS BNE.S BadCtl ; => no, return error <SM2> CSS <Sys7.1>
CMP #256,GDataCnt(A1) ; 256 values per channel? CMP #256,GDataCnt(A1) ; 256 values per channel?
BNE BadCtl ; => no, return error <SM2> CSS BNE.S BadCtl ; => no, return error <SM2> CSS <Sys7.1>
; if new table is different size, reallocate memory ; if new table is different size, reallocate memory

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'AppleTalk.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM2>
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: AppleTalk.a ; File: AppleTalk.a
; ;
@ -136,7 +143,7 @@ lengthErr EQU -4
; ;
; SCC interrupt priority Should NEVER MOVE.W this value, just ORI.W <SM2> rb ; SCC interrupt priority Should NEVER MOVE.W this value, just ORI.W <SM2> rb
; ;
sccLockout EQU $600 ; This value works on both Mac and Lisa <SM2> rb sccLockout EQU $2600 ; This value works on both Mac and Lisa <SM2> rb <Sys7.1>
; ;
; ;
;+ MPP (control calls to NBP, DDP and ABLAP) ;+ MPP (control calls to NBP, DDP and ABLAP)

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM2>
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; Version: 2.96 ; Version: 2.96
; Created: Friday, October 20, 1989 at 9:18:00 PM ; Created: Friday, October 20, 1989 at 9:18:00 PM
; ;
@ -122,7 +129,7 @@ maxHFSTrap EQU 17 ; Highest TFS trap dispatch index
hfsVars EQU $36A ; Start of TFS variables in RAM version hfsVars EQU $36A ; Start of TFS variables in RAM version
; (previously RgSvArea) ; (previously RgSvArea)
hfsTmpSize EQU 16 ; Additional temporary space for TFS hfsTmpSize EQU 16 ; Additional temporary space for TFS
hfsStkLen EQU 1792 ; Allocate a decent-sized chunk of memory <SM2> hfsStkLen EQU 1280 ; Allocate a decent-sized chunk of memory <SM2> <Sys7.1>
HFSStkTop EQU $36A ; Temporary location of pointer to top of Stack HFSStkTop EQU $36A ; Temporary location of pointer to top of Stack
HFSStkPtr EQU $36E ; Temporary location of TFS Stack pointer HFSStkPtr EQU $36E ; Temporary location of TFS Stack pointer
WDCBsPtr EQU $372 ; Working Directory queue header WDCBsPtr EQU $372 ; Working Directory queue header
@ -384,7 +391,7 @@ btcNodeSize EQU 42 ; BTree node size in bytes (word)
btcKeyLen EQU 44 ; max key length (word) btcKeyLen EQU 44 ; max key length (word)
btcNNodes EQU 46 ; total number of nodes (long) btcNNodes EQU 46 ; total number of nodes (long)
btcFree EQU 50 ; number of free nodes (long) btcFree EQU 50 ; number of free nodes (long)
LenBTCB EQU 74 ; length of a BTCB <SM2> LenBTCB EQU 54 ; length of a BTCB <SM2> <Sys7.1>
; ;
; BTree Variables (btVars) layout ; BTree Variables (btVars) layout

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Recreated gestaltIconUtilities equate (no 'Attr') for compatibility
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
;__________________________________________________________________________________________________ ;__________________________________________________________________________________________________
; ;
; File: GestaltEqu.a ; File: GestaltEqu.a
@ -515,6 +522,7 @@ gestaltTranslationAttr EQU 'xlat' ; Translation manager attributes
gestaltTranslationMgrExists EQU 0 ; TRUE if translation manager exists gestaltTranslationMgrExists EQU 0 ; TRUE if translation manager exists
gestaltIconUtilitiesAttr EQU 'icon' ; Icon Utilities attributes gestaltIconUtilitiesAttr EQU 'icon' ; Icon Utilities attributes
gestaltIconUtilities EQU 'icon' ; Recreated for old code <Sys7.1>
gestaltIconUtilitiesPresent EQU 0 ; true if icon utilities are present gestaltIconUtilitiesPresent EQU 0 ; true if icon utilities are present
gestaltCompressionMgr EQU 'icmp' ; returns version of the Image Compression Manager gestaltCompressionMgr EQU 'icmp' ; returns version of the Image Compression Manager

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'Packages.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'Palettes.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'Printing.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'PrintTrapsEqu.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'QDOffscreen.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'QuickDraw.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'SCSI.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'Script.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'ShutDown.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'Slots.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -1,3 +1,11 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Removed the struct elements inserted by <H3>. Worked around
; hasPwrControls/hasPowerMgr being incorrectly set on Plus/Portable.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: SonyEqu.a ; File: SonyEqu.a
; ;
@ -362,7 +370,7 @@ chipState EQU sonyVarEnd ; Byte holds flag to indicate IWM on or off
sonyVarEnd SET chipState+2 ; end of sony vars excluding DCD sonyVarEnd SET chipState+2 ; end of sony vars excluding DCD
ENDIF ENDIF
IF hasPwrControls | hasPowerMgr THEN ; <1.1> IF (hasPwrControls | hasPowerMgr) and NOT onHcMac and NOT onMac THEN ; <1.1> <Sys7.1>
chipState EQU sonyVarEnd ; Bit7 - saved VIA dir, 6..0 - pmgr enables <1.1> chipState EQU sonyVarEnd ; Bit7 - saved VIA dir, 6..0 - pmgr enables <1.1>
diskSleepQEL EQU chipState+2 ; sleep/wakeup queue element diskSleepQEL EQU chipState+2 ; sleep/wakeup queue element
sonyVarEnd SET diskSleepQEL+SleepqRec.SleepqSize ; end of sony vars excluding DCD sonyVarEnd SET diskSleepQEL+SleepqRec.SleepqSize ; end of sony vars excluding DCD
@ -371,9 +379,7 @@ sonyVarEnd SET diskSleepQEL+SleepqRec.SleepqSize ; end of sony vars excluding
IF forDiskDup THEN IF forDiskDup THEN
fmtParams EQU sonyVarEnd ;pointer to parameters for special format command fmtParams EQU sonyVarEnd ;pointer to parameters for special format command
gcrFmtByte EQU fmtParams+4 ; saved GCR format byte for duplicator gcrFmtByte EQU fmtParams+4 ; saved GCR format byte for duplicator
clock32Mhz EQU gcrFmtByte+2 ; ( 1) Clock speed: $FF=32Mhz, $00=16Mhz <H3><SM4> sonyVarEnd SET gcrFmtByte+1 ; <Sys7.1> removed clock32Mhz <H3> and DisableRetries <H4> (1 byte each)
DisableRetries EQU clock32Mhz+1 ; ( 1) $FF=Don't perform retries, $00=normal <H4><SM4>
sonyVarEnd SET DisableRetries+1
ENDIF ENDIF

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'ToolUtils.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -1,3 +1,11 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Restored SwapMMUMode/StripAddress/Translate24To32 to OPWORDs, as they
; were before <SM9>.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; Version: 3.29 ; Version: 3.29
; Created: Friday, October 20, 1989 at 10:06:13 PM ; Created: Friday, October 20, 1989 at 10:06:13 PM
; ;
@ -2110,17 +2118,9 @@ _HGetState OPWORD $A069
_HSetState OPWORD $A06A _HSetState OPWORD $A06A
_InitFS OPWORD $A06C _InitFS OPWORD $A06C
_InitEvents OPWORD $A06D _InitEvents OPWORD $A06D
_SwapMMUMode OPWORD $A05D ; ex<SM9> <Sys7.1>
Macro ; SuperMario is a 32-bit only ROM _StripAddress OPWORD $A055 ; ex<SM9> <Sys7.1>
_SwapMMUMode _Translate24To32 OPWORD $A091 ; ex<SM9> <Sys7.1>
EndM
Macro ; SuperMario is a 32-bit only ROM
_StripAddress
EndM
Macro ; SuperMario is a 32-bit only ROM
_Translate24To32
EndM
_SetAppBase OPWORD $A057 _SetAppBase OPWORD $A057
_SlotVInstall OPWORD $A06F _SlotVInstall OPWORD $A06F
_SlotVRemove OPWORD $A070 _SlotVRemove OPWORD $A070

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'Video.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -1,3 +1,9 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Worked around accRun double define in Devices.h and Desk.h
9/2/94 SuperMario ROM source dump (header preserved below)
*/
/************************************************************ /************************************************************
@ -45,7 +51,9 @@ Created: Saturday, July 27, 1991 at 2:53 PM
enum { enum {
accEvent = 64, accEvent = 64,
#ifndef __DEVICES__ // <Sys7.1>
accRun = 65, accRun = 65,
#endif
accCursor = 66, accCursor = 66,
accMenu = 67, accMenu = 67,
accUndo = 68, accUndo = 68,

View File

@ -1,3 +1,10 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Worked around accRun double define in Devices.h and Desk.h
9/2/94 SuperMario ROM source dump (header preserved below)
*/
/************************************************************ /************************************************************
Devices.h Devices.h
@ -173,7 +180,9 @@ enum {
/* special csCodes */ /* special csCodes */
goodBye = -1, goodBye = -1,
killCode = 1, killCode = 1,
#ifndef __DESK__ // <Sys7.1>
accRun = 65 accRun = 65
#endif
}; };

View File

@ -1,3 +1,10 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Reverted <60> by removing inline glue for NewGestalt and ReplaceGestalt
9/2/94 SuperMario ROM source dump (header preserved below)
*/
/************************************************************ /************************************************************
Created: Sunday, January 6, 1991 at 9:27 PM Created: Sunday, January 6, 1991 at 9:27 PM
@ -646,25 +653,19 @@ typedef pascal OSErr (*SelectorFunctionProcPtr)(OSType selector, long *response)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
pascal OSErr NewGestalt(OSType selector,SelectorFunctionProcPtr gestaltFunction);
pascal OSErr ReplaceGestalt(OSType selector,SelectorFunctionProcPtr gestaltFunction,SelectorFunctionProcPtr *oldGestaltFunction);
#if SystemSevenOrLater #if SystemSevenOrLater
#pragma parameter __D0 Gestalt(__D0,__A1) #pragma parameter __D0 Gestalt(__D0,__A1)
pascal OSErr Gestalt(OSType selector,long *response) pascal OSErr Gestalt(OSType selector,long *response)
= {0xA1AD,0x2288}; = {0xA1AD,0x2288};
#pragma parameter __D0 NewGestalt(__D0,__A0)
pascal OSErr NewGestalt(OSType selector,SelectorFunctionProcPtr gestaltFunction)
= {0xA3AD};
#pragma parameter __D0 ReplaceGestalt(__D0,__A0,__A1)
pascal OSErr ReplaceGestalt(OSType selector,SelectorFunctionProcPtr gestaltFunction,SelectorFunctionProcPtr *oldGestaltFunction)
= {0x2F09, 0xA5AD, 0x225F, 0x2288};
#else #else
pascal OSErr Gestalt(OSType selector,long *response); pascal OSErr Gestalt(OSType selector,long *response);
pascal OSErr NewGestalt(OSType selector,SelectorFunctionProcPtr gestaltFunction);
pascal OSErr ReplaceGestalt(OSType selector,SelectorFunctionProcPtr gestaltFunction,SelectorFunctionProcPtr *oldGestaltFunction);
#endif #endif

View File

@ -0,0 +1,517 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Copied from MPW Interfaces because SoundMgr and headers are missing from
SuperMario ROM source (header preserved below)
*/
/************************************************************
Created: Monday, January 28, 1991 at 6:54 PM
Sound.h
C Interface to the Macintosh Libraries
Copyright Apple Computer, Inc. 1986-1990
All rights reserved
************************************************************/
#ifndef __SOUND__
#define __SOUND__
#ifndef __TYPES__
#include <Types.h>
#endif
#ifndef __FILES__
#include <Files.h>
#endif
enum {
swMode = -1, /* Sound Driver modes */
ftMode = 1,
ffMode = 0,
#define synthCodeRsrc 'snth' /* Resource types used by Sound Manager */
#define soundListRsrc 'snd '
#define twelfthRootTwo 1.05946309434
rate22khz = 0x56EE8BA3, /* 22254.54545 in fixed-point */
rate11khz = 0x2B7745D1, /* 11127.27273 in fixed-point */
/* synthesizer numbers for SndNewChannel */
squareWaveSynth = 1, /*square wave synthesizer*/
waveTableSynth = 3, /*wave table synthesizer*/
sampledSynth = 5, /*sampled sound synthesizer*/
/* old Sound Manager MACE synthesizer numbers */
MACE3snthID = 11,
MACE6snthID = 13,
/* command numbers for SndDoCommand and SndDoImmediate */
nullCmd = 0,
initCmd = 1,
freeCmd = 2,
quietCmd = 3,
flushCmd = 4,
reInitCmd = 5,
waitCmd = 10,
pauseCmd = 11,
resumeCmd = 12,
callBackCmd = 13
};
enum {
syncCmd = 14,
emptyCmd = 15,
tickleCmd = 20,
requestNextCmd = 21,
howOftenCmd = 22,
wakeUpCmd = 23,
availableCmd = 24,
versionCmd = 25,
totalLoadCmd = 26,
loadCmd = 27,
scaleCmd = 30,
tempoCmd = 31,
freqDurationCmd = 40,
restCmd = 41,
freqCmd = 42,
ampCmd = 43,
timbreCmd = 44,
getAmpCmd = 45,
waveTableCmd = 60,
phaseCmd = 61
};
enum {
soundCmd = 80,
bufferCmd = 81,
rateCmd = 82,
continueCmd = 83,
doubleBufferCmd = 84,
getRateCmd = 85,
sizeCmd = 90,
convertCmd = 91,
stdQLength = 128,
dataOffsetFlag = 0x8000,
waveInitChannelMask = 0x07,
waveInitChannel0 = 0x04,
waveInitChannel1 = 0x05,
waveInitChannel2 = 0x06,
waveInitChannel3 = 0x07,
/* channel initialization parameters */
initPanMask = 0x0003, /* mask for right/left pan values */
initSRateMask = 0x0030, /* mask for sample rate values */
initStereoMask = 0x00C0, /* mask for mono/stereo values */
initCompMask = 0xFF00, /* mask for compression IDs */
initChanLeft = 0x0002 /* left stereo channel */
};
enum {
initChanRight = 0x0003, /* right stereo channel */
initNoInterp = 0x0004, /* no linear interpolation */
initNoDrop = 0x0008, /* no drop-sample conversion */
initMono = 0x0080, /* monophonic channel */
initStereo = 0x00C0, /* stereo channel */
initMACE3 = 0x0300, /* MACE 3:1 */
initMACE6 = 0x0400, /* MACE 6:1 */
initChan0 = 0x0004, /* channel 0 - wave table only */
initChan1 = 0x0005, /* channel 1 - wave table only */
initChan2 = 0x0006, /* channel 2 - wave table only */
initChan3 = 0x0007, /* channel 3 - wave table only */
stdSH = 0x00, /* Standard sound header encode value */
extSH = 0xFF, /* Extended sound header encode value */
cmpSH = 0xFE, /* Compressed sound header encode value */
notCompressed = 0, /* compression ID's */
twoToOne = 1,
eightToThree = 2,
threeToOne = 3,
sixToOne = 4,
outsideCmpSH = 0 /* MACE constants */
};
enum {
insideCmpSH = 1,
aceSuccess = 0,
aceMemFull = 1,
aceNilBlock = 2,
aceBadComp = 3,
aceBadEncode = 4,
aceBadDest = 5,
aceBadCmd = 6,
sixToOnePacketSize = 8,
threeToOnePacketSize = 16,
stateBlockSize = 64,
leftOverBlockSize = 32,
firstSoundFormat = 0x0001, /* general sound format */
secondSoundFormat = 0x0002, /* special sampled sound format (HyperCard) */
dbBufferReady = 0x00000001, /* double buffer is filled */
dbLastBuffer = 0x00000004, /* last double buffer to play */
sysBeepDisable = 0x0000, /* SysBeep() enable flags */
sysBeepEnable = 0x0001,
unitTypeNoSelection = 0xFFFF, /* unitTypes for AudioSelection.unitType */
unitTypeSeconds = 0x0000
};
/* Structures for Sound Driver */
typedef unsigned char FreeWave[30001];
struct FFSynthRec {
short mode;
Fixed count;
FreeWave waveBytes;
};
typedef struct FFSynthRec FFSynthRec;
typedef FFSynthRec *FFSynthPtr;
struct Tone {
short count;
short amplitude;
short duration;
};
typedef struct Tone Tone;
typedef Tone Tones[5001];
struct SWSynthRec {
short mode;
Tones triplets;
};
typedef struct SWSynthRec SWSynthRec;
typedef SWSynthRec *SWSynthPtr;
typedef unsigned char Wave[256];
typedef Wave *WavePtr;
struct FTSoundRec {
short duration;
Fixed sound1Rate;
long sound1Phase;
Fixed sound2Rate;
long sound2Phase;
Fixed sound3Rate;
long sound3Phase;
Fixed sound4Rate;
long sound4Phase;
WavePtr sound1Wave;
WavePtr sound2Wave;
WavePtr sound3Wave;
WavePtr sound4Wave;
};
typedef struct FTSoundRec FTSoundRec;
typedef FTSoundRec *FTSndRecPtr;
struct FTSynthRec {
short mode;
FTSndRecPtr sndRec;
};
typedef struct FTSynthRec FTSynthRec;
typedef FTSynthRec *FTSynthPtr;
typedef pascal void (*SndCompletionProcPtr)(void);
/* Structures for Sound Manager */
struct SndCommand {
unsigned short cmd;
short param1;
long param2;
};
typedef struct SndCommand SndCommand;
typedef long Time; /* in half milliseconds */
typedef struct SndChannel SndChannel;
typedef SndChannel *SndChannelPtr;
typedef pascal void (*SndCallBackProcPtr)(SndChannelPtr chan, SndCommand cmd);
struct SndChannel {
struct SndChannel *nextChan;
Ptr firstMod; /* reserved for the Sound Manager */
SndCallBackProcPtr callBack;
long userInfo;
Time wait; /* The following is for internal Sound Manager use only.*/
SndCommand cmdInProgress;
short flags;
short qLength;
short qHead; /* next spot to read or -1 if empty */
short qTail; /* next spot to write = qHead if full */
SndCommand queue[stdQLength];
};
/* MACE structures */
struct StateBlock {
short stateVar[stateBlockSize];
};
typedef struct StateBlock StateBlock;
typedef StateBlock *StateBlockPtr;
struct LeftOverBlock {
unsigned long count;
char sampleArea[leftOverBlockSize];
};
typedef struct LeftOverBlock LeftOverBlock;
typedef LeftOverBlock *LeftOverBlockPtr;
struct ModRef {
unsigned short modNumber;
long modInit;
};
typedef struct ModRef ModRef;
struct SndListResource {
short format;
short numModifiers;
ModRef modifierPart[1]; /*This is a variable length array*/
short numCommands;
SndCommand commandPart[1]; /*This is a variable length array*/
char dataPart[1]; /*This is a variable length array*/
};
typedef struct SndListResource SndListResource;
typedef SndListResource *SndListPtr;
struct SoundHeader {
Ptr samplePtr; /* if NIL then samples are in sampleArea */
unsigned long length; /* length of sound in bytes */
Fixed sampleRate; /* sample rate for this sound */
unsigned long loopStart; /* start of looping portion */
unsigned long loopEnd; /* end of looping portion */
unsigned char encode; /* header encoding */
unsigned char baseFrequency; /* baseFrequency value */
char sampleArea[1];
};
typedef struct SoundHeader SoundHeader;
typedef SoundHeader *SoundHeaderPtr;
struct CmpSoundHeader {
Ptr samplePtr; /* if nil then samples are in sample area */
unsigned long numChannels; /* number of channels i.e. mono = 1 */
Fixed sampleRate; /* sample rate in Apples Fixed point representation */
unsigned long loopStart; /* loopStart of sound before compression */
unsigned long loopEnd; /* loopEnd of sound before compression */
unsigned char encode; /* data structure used , stdSH, extSH, or cmpSH */
unsigned char baseFrequency; /* same meaning as regular SoundHeader */
unsigned long numFrames; /* length in frames ( packetFrames or sampleFrames ) */
extended AIFFSampleRate; /* IEEE sample rate */
Ptr markerChunk; /* sync track */
Ptr futureUse1; /* reserved by Apple */
Ptr futureUse2; /* reserved by Apple */
StateBlockPtr stateVars; /* pointer to State Block */
LeftOverBlockPtr leftOverSamples; /* used to save truncated samples between compression calls */
unsigned short compressionID; /* 0 means no compression, non zero means compressionID */
unsigned short packetSize; /* number of bits in compressed sample packet */
unsigned short snthID; /* resource ID of Sound Manager snth that contains NRT C/E */
unsigned short sampleSize; /* number of bits in non-compressed sample */
char sampleArea[1]; /* space for when samples follow directly */
};
typedef struct CmpSoundHeader CmpSoundHeader;
typedef CmpSoundHeader *CmpSoundHeaderPtr;
struct ExtSoundHeader {
Ptr samplePtr; /* if nil then samples are in sample area */
unsigned long numChannels; /* number of channels, ie mono = 1 */
Fixed sampleRate; /* sample rate in Apples Fixed point representation */
unsigned long loopStart; /* same meaning as regular SoundHeader */
unsigned long loopEnd; /* same meaning as regular SoundHeader */
unsigned char encode; /* data structure used , stdSH, extSH, or cmpSH */
unsigned char baseFrequency; /* same meaning as regular SoundHeader */
unsigned long numFrames; /* length in total number of frames */
extended AIFFSampleRate; /* IEEE sample rate */
Ptr markerChunk; /* sync track */
Ptr instrumentChunks; /* AIFF instrument chunks */
Ptr AESRecording;
unsigned short sampleSize; /* number of bits in sample */
unsigned short futureUse1; /* reserved by Apple */
unsigned long futureUse2; /* reserved by Apple */
unsigned long futureUse3; /* reserved by Apple */
unsigned long futureUse4; /* reserved by Apple */
char sampleArea[1]; /* space for when samples follow directly */
};
typedef struct ExtSoundHeader ExtSoundHeader;
typedef ExtSoundHeader *ExtSoundHeaderPtr;
struct ConversionBlock {
short destination;
short unused;
CmpSoundHeaderPtr inputPtr;
CmpSoundHeaderPtr outputPtr;
};
typedef struct ConversionBlock ConversionBlock;
typedef ConversionBlock *ConversionBlockPtr;
struct SMStatus {
short smMaxCPULoad;
short smNumChannels;
short smCurCPULoad;
};
typedef struct SMStatus SMStatus;
typedef SMStatus *SMStatusPtr;
struct SCStatus {
Fixed scStartTime;
Fixed scEndTime;
Fixed scCurrentTime;
Boolean scChannelBusy;
Boolean scChannelDisposed;
Boolean scChannelPaused;
Boolean scUnused;
unsigned long scChannelAttributes;
long scCPULoad;
};
typedef struct SCStatus SCStatus;
typedef SCStatus *SCStatusPtr;
struct AudioSelection {
long unitType;
Fixed selStart;
Fixed selEnd;
};
typedef struct AudioSelection AudioSelection;
typedef AudioSelection *AudioSelectionPtr;
struct SndDoubleBuffer {
long dbNumFrames;
long dbFlags;
long dbUserInfo[2];
char dbSoundData[1];
};
typedef struct SndDoubleBuffer SndDoubleBuffer;
typedef SndDoubleBuffer *SndDoubleBufferPtr;
typedef pascal void (*SndDoubleBackProcPtr) (SndChannelPtr channel,
SndDoubleBufferPtr doubleBufferPtr);
struct SndDoubleBufferHeader {
short dbhNumChannels;
short dbhSampleSize;
short dbhCompressionID;
short dbhPacketSize;
Fixed dbhSampleRate;
SndDoubleBufferPtr dbhBufferPtr[2];
SndDoubleBackProcPtr dbhDoubleBack;
};
typedef struct SndDoubleBufferHeader SndDoubleBufferHeader;
typedef SndDoubleBufferHeader *SndDoubleBufferHeaderPtr;
#ifdef __cplusplus
extern "C" {
#endif
pascal OSErr SndDoCommand(SndChannelPtr chan,const SndCommand *cmd,Boolean noWait)
= 0xA803;
pascal OSErr SndDoImmediate(SndChannelPtr chan,const SndCommand *cmd)
= 0xA804;
pascal OSErr SndNewChannel(SndChannelPtr *chan,short synth,long init,SndCallBackProcPtr userRoutine)
= 0xA807;
pascal OSErr SndDisposeChannel(SndChannelPtr chan,Boolean quietNow)
= 0xA801;
pascal OSErr SndPlay(SndChannelPtr chan,Handle sndHdl,Boolean async)
= 0xA805;
pascal OSErr SndAddModifier(SndChannelPtr chan,ProcPtr modifier,short id,
long init)
= 0xA802;
pascal OSErr SndControl(short id,SndCommand *cmd)
= 0xA806;
pascal void SetSoundVol(short level);
#pragma parameter GetSoundVol(__A0)
pascal void GetSoundVol(short *level)
= {0x4218,0x10B8,0x0260};
pascal void StartSound(const void *synthRec,long numBytes,SndCompletionProcPtr completionRtn);
pascal void StopSound(void);
pascal Boolean SoundDone(void);
pascal NumVersion SndSoundManagerVersion(void)
= {0x203C,0x000C,0x0008,0xA800};
pascal OSErr SndStartFilePlay(SndChannelPtr chan,short fRefNum,short resNum,
long bufferSize,void *theBuffer,AudioSelectionPtr theSelection,ProcPtr theCompletion,
Boolean async)
= {0x203C,0x0D00,0x0008,0xA800};
pascal OSErr SndPauseFilePlay(SndChannelPtr chan)
= {0x203C,0x0204,0x0008,0xA800};
pascal OSErr SndStopFilePlay(SndChannelPtr chan,Boolean async)
= {0x203C,0x0308,0x0008,0xA800};
pascal OSErr SndChannelStatus(SndChannelPtr chan,short theLength,SCStatusPtr theStatus)
= {0x203C,0x0010,0x0008,0xA800};
pascal OSErr SndManagerStatus(short theLength,SMStatusPtr theStatus)
= {0x203C,0x0014,0x0008,0xA800};
pascal void SndGetSysBeepState(short *sysBeepState)
= {0x203C,0x0018,0x0008,0xA800};
pascal OSErr SndSetSysBeepState(short sysBeepState)
= {0x203C,0x001C,0x0008,0xA800};
pascal OSErr SndPlayDoubleBuffer(SndChannelPtr chan,SndDoubleBufferHeaderPtr theParams)
= {0x203C,0x0020,0x0008,0xA800};
pascal NumVersion MACEVersion(void)
= {0x203C,0x0000,0x0010,0xA800};
pascal void Comp3to1(const void *inBuffer,void *outBuffer,unsigned long cnt,
const void *inState,void *outState,unsigned long numChannels,unsigned long whichChannel)
= {0x203C,0x0004,0x0010,0xA800};
pascal void Exp1to3(const void *inBuffer,void *outBuffer,unsigned long cnt,
const void *inState,void *outState,unsigned long numChannels,unsigned long whichChannel)
= {0x203C,0x0008,0x0010,0xA800};
pascal void Comp6to1(const void *inBuffer,void *outBuffer,unsigned long cnt,
const void *inState,void *outState,unsigned long numChannels,unsigned long whichChannel)
= {0x203C,0x000C,0x0010,0xA800};
pascal void Exp1to6(const void *inBuffer,void *outBuffer,unsigned long cnt,
const void *inState,void *outState,unsigned long numChannels,unsigned long whichChannel)
= {0x203C,0x0010,0x0010,0xA800};
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,176 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0042 01E3 01CF 026E" /* ..Monaco.B.....n */
$"01CF 027E 0000 0000 0000 0000 8200 0014" /* ...~............ */
$"0001 0006 0004 002A 0003 0142 01E3 002A" /* .......*...B...* */
$"0003 0142 01E3 A42B A620 0000 0000 0000" /* ...B...+. ...... */
$"0000 0000 0000 0100" /* ........ */
};
data 'MPSR' (1007) {
$"0076 0000 01BE 0000 0202 0773 774D 6F64" /* .v.........swMod */
$"6500 0000 0203 0000 0212 0766 744D 6F64" /* e..........ftMod */
$"6500 0000 0213 0000 0222 0766 664D 6F64" /* e........".ffMod */
$"6500 0000 0225 0000 027B 0D73 796E 7468" /* e....%...{.synth */
$"436F 6465 5273 7263 0000 027C 0000 0298" /* CodeRsrc...|.... */
$"0D73 6F75 6E64 4C69 7374 5273 7263 0000" /* .soundListRsrc.. */
$"030D 0000 0359 0972 6174 6531 316B 687A" /* .....Y.rate11khz */
$"0000 0387 0000 03CE 0F73 7175 6172 6557" /* .........squareW */
$"6176 6553 796E 7468 0000 03CF 0000 0415" /* aveSynth........ */
$"0F77 6176 6554 6162 6C65 5379 6E74 6800" /* .waveTableSynth. */
$"0000 0416 0000 2BB9 0D73 616D 706C 6564" /* ......+..sampled */
$"5379 6E74 6800 0000 0492 0000 2E8C 0B4D" /* Synth..........M */
$"4143 4533 736E 7468 4944 0000 04A8 0000" /* ACE3snthID...... */
$"04BD 0B4D 4143 4536 736E 7468 4944 0000" /* ...MACE6snthID.. */
$"04F9 0000 0509 076E 756C 6C43 6D64 0000" /* .......nullCmd.. */
$"050A 0000 051A 0769 6E69 7443 6D64 0000" /* .......initCmd.. */
$"051B 0000 052B 0766 7265 6543 6D64 0000" /* .....+.freeCmd.. */
$"052C 0000 053D 0971 7569 6574 436D 6400" /* .,...=.quietCmd. */
$"0000 053E 0000 054F 0966 6C75 7368 436D" /* ...>...O.flushCm */
$"6400 0000 0550 0000 0562 0972 6549 6E69" /* d....P...b.reIni */
$"7443 6D64 0000 0564 0000 0575 0777 6169" /* tCmd...d...u.wai */
$"7443 6D64 0000 0576 0000 0588 0970 6175" /* tCmd...v.....pau */
$"7365 436D 6400 0000 0589 0000 059C 0972" /* seCmd..........r */
$"6573 756D 6543 6D64 0000 059D 0000 05B1" /* esumeCmd........ */
$"0B63 616C 6C42 6163 6B43 6D64 0000 05BC" /* .callBackCmd.... */
$"0000 05CD 0773 796E 6343 6D64 0000 05CE" /* .....syncCmd.... */
$"0000 05E0 0965 6D70 7479 436D 6400 0000" /* .....emptyCmd... */
$"05E2 0000 05F5 0974 6963 6B6C 6543 6D64" /* .......tickleCmd */
$"0000 05F6 0000 060E 0F72 6571 7565 7374" /* .........request */
$"4E65 7874 436D 6400 0000 060F 0000 0624" /* NextCmd........$ */
$"0B68 6F77 4F66 7465 6E43 6D64 0000 0625" /* .howOftenCmd...% */
$"0000 0638 0977 616B 6555 7043 6D64 0000" /* ...8.wakeUpCmd.. */
$"0639 0000 064F 0D61 7661 696C 6162 6C65" /* .9...O.available */
$"436D 6400 0000 0650 0000 0664 0B76 6572" /* Cmd....P...d.ver */
$"7369 6F6E 436D 6400 0000 0665 0000 067B" /* sionCmd....e...{ */
$"0D74 6F74 616C 4C6F 6164 436D 6400 0000" /* .totalLoadCmd... */
$"067C 0000 068D 076C 6F61 6443 6D64 0000" /* .|.....loadCmd.. */
$"068F 0000 06A1 0973 6361 6C65 436D 6400" /* .......scaleCmd. */
$"0000 06A2 0000 06B4 0974 656D 706F 436D" /* .........tempoCm */
$"6400 0000 06B6 0000 06CF 0F66 7265 7144" /* d..........freqD */
$"7572 6174 696F 6E43 6D64 0000 06D0 0000" /* urationCmd...... */
$"06E1 0772 6573 7443 6D64 0000 06E2 0000" /* ...restCmd...... */
$"06F3 0766 7265 7143 6D64 0000 06F4 0000" /* ...freqCmd...... */
$"0704 0761 6D70 436D 6400 0000 0705 0000" /* ...ampCmd....... */
$"0718 0974 696D 6272 6543 6D64 0000 0719" /* ...timbreCmd.... */
$"0000 072C 0967 6574 416D 7043 6D64 0000" /* ...,.getAmpCmd.. */
$"072E 0000 0744 0D77 6176 6554 6162 6C65" /* .....D.waveTable */
$"436D 6400 0000 0745 0000 0756 0970 6861" /* Cmd....E...V.pha */
$"7365 436D 6400 0000 0762 0000 0774 0973" /* seCmd....b...t.s */
$"6F75 6E64 436D 6400 0000 0775 0000 0788" /* oundCmd....u.... */
$"0962 7566 6665 7243 6D64 0000 0789 0000" /* .bufferCmd...... */
$"079A 0772 6174 6543 6D64 0000 079B 0000" /* ...rateCmd...... */
$"07B0 0B63 6F6E 7469 6E75 6543 6D64 0000" /* ...continueCmd.. */
$"07B1 0000 07CA 0F64 6F75 626C 6542 7566" /* .......doubleBuf */
$"6665 7243 6D64 0000 07CB 0000 07DF 0B67" /* ferCmd.........g */
$"6574 5261 7465 436D 6400 0000 07E1 0000" /* etRateCmd....... */
$"07F2 0773 697A 6543 6D64 0000 07F3 0000" /* ...sizeCmd...... */
$"0807 0B63 6F6E 7665 7274 436D 6400 0000" /* ...convertCmd... */
$"0809 0000 081E 0B73 7464 514C 656E 6774" /* .......stdQLengt */
$"6800 0000 08B4 0000 08D0 1177 6176 6549" /* h..........waveI */
$"6E69 7443 6861 6E6E 656C 3300 0000 08FA" /* nitChannel3..... */
$"0000 094A 0B69 6E69 7450 616E 4D61 736B" /* ...J.initPanMask */
$"0000 094B 0000 0998 0D69 6E69 7453 5261" /* ...K.....initSRa */
$"7465 4D61 736B 0000 0999 0000 09E6 0F69" /* teMask.........i */
$"6E69 7453 7465 7265 6F4D 6173 6B00 0000" /* nitStereoMask... */
$"09E7 0000 0A31 0D69 6E69 7443 6F6D 704D" /* .....1.initCompM */
$"6173 6B00 0000 0A33 0000 0A78 0D69 6E69" /* ask....3...x.ini */
$"7443 6861 6E4C 6566 7400 0000 0A83 0000" /* tChanLeft....... */
$"0AC9 0D69 6E69 7443 6861 6E52 6967 6874" /* ...initChanRight */
$"0000 0ACA 0000 0B13 0D69 6E69 744E 6F49" /* .........initNoI */
$"6E74 6572 7000 0000 0B14 0000 0B5F 0B69" /* nterp........_.i */
$"6E69 744E 6F44 726F 7000 0000 0B60 0000" /* nitNoDrop....`.. */
$"0BA4 0969 6E69 744D 6F6E 6F00 0000 0D47" /* ...initMono....G */
$"0000 0D94 0969 6E69 7443 6861 6E33 0000" /* .....initChan3.. */
$"0D96 0000 0DEA 0573 7464 5348 0000 0DEB" /* .......stdSH.... */
$"0000 0E3F 0565 7874 5348 0000 0E40 0000" /* ...?.extSH...@.. */
$"0E96 0563 6D70 5348 0000 0E98 0000 0EDA" /* ...cmpSH........ */
$"0D6E 6F74 436F 6D70 7265 7373 6564 0000" /* .notCompressed.. */
$"0EDB 0000 0EEC 0974 776F 546F 4F6E 6500" /* .......twoToOne. */
$"0000 0EED 0000 0F02 0D65 6967 6874 546F" /* .........eightTo */
$"5468 7265 6500 0000 0F03 0000 0F16 0B74" /* Three..........t */
$"6872 6565 546F 4F6E 6500 0000 0F17 0000" /* hreeToOne....... */
$"0F28 0973 6978 546F 4F6E 6500 0000 0F2A" /* .(.sixToOne....* */
$"0000 0F6A 0D6F 7574 7369 6465 436D 7053" /* ...j.outsideCmpS */
$"4800 0000 0F75 0000 0F89 0B69 6E73 6964" /* H....u.....insid */
$"6543 6D70 5348 0000 0F8A 0000 0F9D 0B61" /* eCmpSH.........a */
$"6365 5375 6363 6573 7300 0000 0F9E 0000" /* ceSuccess....... */
$"0FB1 0B61 6365 4D65 6D46 756C 6C00 0000" /* ...aceMemFull... */
$"0FB2 0000 0FC6 0B61 6365 4E69 6C42 6C6F" /* .......aceNilBlo */
$"636B 0000 0FC7 0000 0FDA 0B61 6365 4261" /* ck.........aceBa */
$"6443 6F6D 7000 0000 0FDB 0000 0FF0 0D61" /* dComp..........a */
$"6365 4261 6445 6E63 6F64 6500 0000 0FF1" /* ceBadEncode..... */
$"0000 1004 0B61 6365 4261 6444 6573 7400" /* .....aceBadDest. */
$"0000 1034 0000 1052 1574 6872 6565 546F" /* ...4...R.threeTo */
$"4F6E 6550 6163 6B65 7453 697A 6500 0000" /* OnePacketSize... */
$"10D0 0000 112A 1173 6563 6F6E 6453 6F75" /* .....*.secondSou */
$"6E64 466F 726D 6174 0000 112C 0000 1175" /* ndFormat...,...u */
$"0D64 6242 7566 6665 7252 6561 6479 0000" /* .dbBufferReady.. */
$"1176 0000 11C2 0D64 624C 6173 7442 7566" /* .v.....dbLastBuf */
$"6665 7200 0000 11C4 0000 120C 0F73 7973" /* fer..........sys */
$"4265 6570 4469 7361 626C 6500 0000 122A" /* BeepDisable....* */
$"0000 1281 1375 6E69 7454 7970 654E 6F53" /* .....unitTypeNoS */
$"656C 6563 7469 6F6E 0000 1282 0000 129E" /* election........ */
$"0F75 6E69 7454 7970 6553 6563 6F6E 6473" /* .unitTypeSeconds */
$"0000 12DE 0000 1305 0946 7265 6557 6176" /* .........FreeWav */
$"6500 0000 1307 0000 139D 0B46 4653 796E" /* e..........FFSyn */
$"7468 5265 6300 0000 139F 0000 1404 0554" /* thRec..........T */
$"6F6E 6500 0000 1407 0000 1420 0554 6F6E" /* one........ .Ton */
$"6573 0000 1422 0000 14A3 0B53 5753 796E" /* es...".....SWSyn */
$"7468 5265 6300 0000 14A6 0000 14C7 0557" /* thRec..........W */
$"6176 6500 0000 14C8 0000 14DE 0757 6176" /* ave..........Wav */
$"6550 7472 0000 14E0 0000 1662 0B46 5453" /* ePtr.......b.FTS */
$"6F75 6E64 5265 6300 0000 16EC 0000 171E" /* oundRec......... */
$"1553 6E64 436F 6D70 6C65 7469 6F6E 5072" /* .SndCompletionPr */
$"6F63 5074 7200 0000 175A 0000 17D2 0B53" /* ocPtr....Z.....S */
$"6E64 436F 6D6D 616E 6400 0000 17D5 0000" /* ndCommand....... */
$"181B 0554 696D 6500 0000 181F 0000 1AE9" /* ...Time......... */
$"0B53 6E64 4368 616E 6E65 6C00 0000 1B01" /* .SndChannel..... */
$"0000 1B85 0B53 7461 7465 426C 6F63 6B00" /* .....StateBlock. */
$"0000 1B87 0000 1C37 0D4C 6566 744F 7665" /* .......7.LeftOve */
$"7242 6C6F 636B 0000 1C39 0000 1C9A 074D" /* rBlock...9.....M */
$"6F64 5265 6600 0000 1C9C 0000 1E3E 0F53" /* odRef........>.S */
$"6E64 4C69 7374 5265 736F 7572 6365 0000" /* ndListResource.. */
$"1E40 0000 20C9 0B53 6F75 6E64 4865 6164" /* .@.. ..SoundHead */
$"6572 0000 20CC 0000 27B3 0F43 6D70 536F" /* er.. ...'..CmpSo */
$"756E 6448 6561 6465 7200 0000 2D81 0000" /* undHeader...-... */
$"2E64 0F43 6F6E 7665 7273 696F 6E42 6C6F" /* .d.ConversionBlo */
$"636B 0000 2E66 0000 2F05 0953 4D53 7461" /* ck...f../..SMSta */
$"7475 7300 0000 2F07 0000 304A 0953 4353" /* tus.../...0J.SCS */
$"7461 7475 7300 0000 3266 0000 33CE 1553" /* tatus...2f..3..S */
$"6E64 446F 7562 6C65 4275 6666 6572 4865" /* ndDoubleBufferHe */
$"6164 6572 0000 33F8 0000 3459 0D53 6E64" /* ader..3...4Y.Snd */
$"446F 436F 6D6D 616E 6400 0000 345A 0000" /* DoCommand...4Z.. */
$"34AE 0F53 6E64 446F 496D 6D65 6469 6174" /* 4..SndDoImmediat */
$"6500 0000 3523 0000 3575 1153 6E64 4469" /* e...5#..5u.SndDi */
$"7370 6F73 6543 6861 6E6E 656C 0000 3576" /* sposeChannel..5v */
$"0000 35C9 0753 6E64 506C 6179 0000 35CA" /* ..5..SndPlay..5. */
$"0000 3631 0F53 6E64 4164 644D 6F64 6966" /* ..61.SndAddModif */
$"6965 7200 0000 3632 0000 3672 0B53 6E64" /* ier...62..6r.Snd */
$"436F 6E74 726F 6C00 0000 3674 0000 369A" /* Control...6t..6. */
$"0B53 6574 536F 756E 6456 6F6C 0000 369B" /* .SetSoundVol..6. */
$"0000 3703 0B47 6574 536F 756E 6456 6F6C" /* ..7..GetSoundVol */
$"0000 3704 0000 3763 0B53 7461 7274 536F" /* ..7...7c.StartSo */
$"756E 6400 0000 3764 0000 3781 0953 746F" /* und...7d..7..Sto */
$"7053 6F75 6E64 0000 3B33 0000 3BB0 1353" /* pSound..;3..;..S */
$"6E64 506C 6179 446F 7562 6C65 4275 6666" /* ndPlayDoubleBuff */
$"6572 0000 3E6B 0000 3F39 0745 7870 3174" /* er..>k..?9.Exp1t */
$"6F36" /* o6 */
};
data 'MPSR' (1008) {
$"002A 0003 0142 01E3 002A 0003 0142 01E3" /* .*...B...*...B.. */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'vers' (1, purgeable) {
$"0320 8000 0000 0533 2E32 2E30 2433 2E32" /* . .....3.2.0$3.2 */
$"2E30 20A9 2041 7070 6C65 2043 6F6D 7075" /* .0 . Apple Compu */
$"7465 722C 2049 6E63 2E20 3139 3835 2D39" /* ter, Inc. 1985-9 */
$"31" /* 1 */
};
data 'vers' (2, purgeable) {
$"0320 8000 0000 0333 2E32 074D 5057 2033" /* . .....3.2.MPW 3 */
$"2E32" /* .2 */
};

View File

@ -0,0 +1,461 @@
{
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Copied from MPW Interfaces because SoundMgr and headers are missing from
SuperMario ROM source (header preserved below)
}
{
Created: Monday, December 2, 1991 at 5:09 PM
Sound.p
Pascal Interface to the Macintosh Libraries
Copyright Apple Computer, Inc. 1986-1991
All rights reserved
}
{$IFC UNDEFINED UsingIncludes}
{$SETC UsingIncludes := 0}
{$ENDC}
{$IFC NOT UsingIncludes}
UNIT Sound;
INTERFACE
{$ENDC}
{$IFC UNDEFINED UsingSound}
{$SETC UsingSound := 1}
{$I+}
{$SETC SoundIncludes := UsingIncludes}
{$SETC UsingIncludes := 1}
{$IFC UNDEFINED UsingTypes}
{$I $$Shell(PInterfaces)Types.p}
{$ENDC}
{$IFC UNDEFINED UsingFiles}
{$I $$Shell(PInterfaces)Files.p}
{$ENDC}
{$SETC UsingIncludes := SoundIncludes}
CONST
swMode = -1; { Sound Driver modes }
ftMode = 1;
ffMode = 0;
synthCodeRsrc = 'snth'; { Resource types used by Sound Manager }
soundListRsrc = 'snd ';
twelfthRootTwo = 1.05946309434;
rate22khz = $56EE8BA3; { 22254.54545 in fixed-point }
rate11khz = $2B7745D1; { 11127.27273 in fixed-point }
{ synthesizer numbers for SndNewChannel }
squareWaveSynth = 1; {square wave synthesizer}
waveTableSynth = 3; {wave table synthesizer}
sampledSynth = 5; {sampled sound synthesizer}
{ old Sound Manager MACE synthesizer numbers }
MACE3snthID = 11;
MACE6snthID = 13;
{ command numbers for SndDoCommand and SndDoImmediate }
nullCmd = 0;
initCmd = 1;
freeCmd = 2;
quietCmd = 3;
flushCmd = 4;
reInitCmd = 5;
waitCmd = 10;
pauseCmd = 11;
resumeCmd = 12;
callBackCmd = 13;
syncCmd = 14;
emptyCmd = 15;
tickleCmd = 20;
requestNextCmd = 21;
howOftenCmd = 22;
wakeUpCmd = 23;
availableCmd = 24;
versionCmd = 25;
totalLoadCmd = 26;
loadCmd = 27;
scaleCmd = 30;
tempoCmd = 31;
freqDurationCmd = 40;
restCmd = 41;
freqCmd = 42;
ampCmd = 43;
timbreCmd = 44;
getAmpCmd = 45;
waveTableCmd = 60;
phaseCmd = 61;
soundCmd = 80;
bufferCmd = 81;
rateCmd = 82;
continueCmd = 83;
doubleBufferCmd = 84;
getRateCmd = 85;
sizeCmd = 90;
convertCmd = 91;
stdQLength = 128;
dataOffsetFlag = $8000;
waveInitChannelMask = $07;
waveInitChannel0 = $04;
waveInitChannel1 = $05;
waveInitChannel2 = $06;
waveInitChannel3 = $07;
{ channel initialization parameters }
initPanMask = $0003; { mask for right/left pan values }
initSRateMask = $0030; { mask for sample rate values }
initStereoMask = $00C0; { mask for mono/stereo values }
initCompMask = $FF00; { mask for compression IDs }
initChanLeft = $0002; { left stereo channel }
initChanRight = $0003; { right stereo channel }
initNoInterp = $0004; { no linear interpolation }
initNoDrop = $0008; { no drop-sample conversion }
initMono = $0080; { monophonic channel }
initStereo = $00C0; { stereo channel }
initMACE3 = $0300; { MACE 3:1 }
initMACE6 = $0400; { MACE 6:1 }
initChan0 = $0004; { channel 0 - wave table only }
initChan1 = $0005; { channel 1 - wave table only }
initChan2 = $0006; { channel 2 - wave table only }
initChan3 = $0007; { channel 3 - wave table only }
stdSH = $00; { Standard sound header encode value }
extSH = $FF; { Extended sound header encode value }
cmpSH = $FE; { Compressed sound header encode value }
notCompressed = 0; { compression ID's }
twoToOne = 1;
eightToThree = 2;
threeToOne = 3;
sixToOne = 4;
outsideCmpSH = 0; { MACE constants }
insideCmpSH = 1;
aceSuccess = 0;
aceMemFull = 1;
aceNilBlock = 2;
aceBadComp = 3;
aceBadEncode = 4;
aceBadDest = 5;
aceBadCmd = 6;
sixToOnePacketSize = 8;
threeToOnePacketSize = 16;
stateBlockSize = 64;
leftOverBlockSize = 32;
firstSoundFormat = $0001; { general sound format }
secondSoundFormat = $0002; { special sampled sound format (HyperCard) }
dbBufferReady = $00000001; { double buffer is filled }
dbLastBuffer = $00000004; { last double buffer to play }
sysBeepDisable = $0000; { SysBeep() enable flags }
sysBeepEnable = $0001;
unitTypeNoSelection = $FFFF; { unitTypes for AudioSelection.unitType }
unitTypeSeconds = $0000;
TYPE
{ Structures for Sound Driver }
FreeWave = PACKED ARRAY [0..30000] OF Byte;
FFSynthPtr = ^FFSynthRec;
FFSynthRec = RECORD
mode: INTEGER;
count: Fixed;
waveBytes: FreeWave;
END;
Tone = RECORD
count: INTEGER;
amplitude: INTEGER;
duration: INTEGER;
END;
Tones = ARRAY [0..5000] OF Tone;
SWSynthPtr = ^SWSynthRec;
SWSynthRec = RECORD
mode: INTEGER;
triplets: Tones;
END;
Wave = PACKED ARRAY [0..255] OF Byte;
WavePtr = ^Wave;
FTSndRecPtr = ^FTSoundRec;
FTSoundRec = RECORD
duration: INTEGER;
sound1Rate: Fixed;
sound1Phase: LONGINT;
sound2Rate: Fixed;
sound2Phase: LONGINT;
sound3Rate: Fixed;
sound3Phase: LONGINT;
sound4Rate: Fixed;
sound4Phase: LONGINT;
sound1Wave: WavePtr;
sound2Wave: WavePtr;
sound3Wave: WavePtr;
sound4Wave: WavePtr;
END;
FTSynthPtr = ^FTSynthRec;
FTSynthRec = RECORD
mode: INTEGER;
sndRec: FTSndRecPtr;
END;
{ Structures for Sound Manager }
SndCommand = PACKED RECORD
cmd: INTEGER;
param1: INTEGER;
param2: LONGINT;
END;
Time = LONGINT; { in half milliseconds }
SndChannelPtr = ^SndChannel;
SndChannel = PACKED RECORD
nextChan: SndChannelPtr;
firstMod: Ptr; { reserved for the Sound Manager }
callBack: ProcPtr;
userInfo: LONGINT;
wait: Time; { The following is for internal Sound Manager use only.}
cmdInProgress: SndCommand;
flags: INTEGER;
qLength: INTEGER;
qHead: INTEGER; { next spot to read or -1 if empty }
qTail: INTEGER; { next spot to write = qHead if full }
queue: ARRAY [0..stdQLength - 1] OF SndCommand;
END;
{ MACE structures }
StateBlockPtr = ^StateBlock;
StateBlock = RECORD
stateVar: ARRAY [0..stateBlockSize - 1] OF INTEGER;
END;
LeftOverBlockPtr = ^LeftOverBlock;
LeftOverBlock = RECORD
count: LONGINT;
sampleArea: PACKED ARRAY [0..leftOverBlockSize - 1] OF Byte;
END;
ModRef = RECORD
modNumber: INTEGER;
modInit: LONGINT;
END;
SndListPtr = ^SndListResource;
SndListResource = RECORD
format: INTEGER;
numModifiers: INTEGER;
modifierPart: ARRAY [0..0] OF ModRef; {This is a variable length array}
numCommands: INTEGER;
commandPart: ARRAY [0..0] OF SndCommand; {This is a variable length array}
dataPart: PACKED ARRAY [0..0] OF Byte; {This is a variable length array}
END;
SoundHeaderPtr = ^SoundHeader;
SoundHeader = PACKED RECORD
samplePtr: Ptr; { if NIL then samples are in sampleArea }
length: LONGINT; { length of sound in bytes }
sampleRate: Fixed; { sample rate for this sound }
loopStart: LONGINT; { start of looping portion }
loopEnd: LONGINT; { end of looping portion }
encode: Byte; { header encoding }
baseFrequency: Byte; { baseFrequency value }
sampleArea: PACKED ARRAY [0..0] OF Byte;
END;
CmpSoundHeaderPtr = ^CmpSoundHeader;
CmpSoundHeader = PACKED RECORD
samplePtr: Ptr; { if nil then samples are in sample area }
numChannels: LONGINT; { number of channels i.e. mono = 1 }
sampleRate: Fixed; { sample rate in Apples Fixed point representation }
loopStart: LONGINT; { loopStart of sound before compression }
loopEnd: LONGINT; { loopEnd of sound before compression }
encode: Byte; { data structure used , stdSH, extSH, or cmpSH }
baseFrequency: Byte; { same meaning as regular SoundHeader }
numFrames: LONGINT; { length in frames ( packetFrames or sampleFrames ) }
AIFFSampleRate: Extended80; { IEEE sample rate }
markerChunk: Ptr; { sync track }
futureUse1: Ptr; { reserved by Apple }
futureUse2: Ptr; { reserved by Apple }
stateVars: StateBlockPtr; { pointer to State Block }
leftOverSamples: LeftOverBlockPtr; { used to save truncated samples between compression calls }
compressionID: INTEGER; { 0 means no compression, non zero means compressionID }
packetSize: INTEGER; { number of bits in compressed sample packet }
snthID: INTEGER; { resource ID of Sound Manager snth that contains NRT C/E }
sampleSize: INTEGER; { number of bits in non-compressed sample }
sampleArea: PACKED ARRAY [0..0] OF Byte; { space for when samples follow directly }
END;
ExtSoundHeaderPtr = ^ExtSoundHeader;
ExtSoundHeader = PACKED RECORD
samplePtr: Ptr; { if nil then samples are in sample area }
numChannels: LONGINT; { number of channels, ie mono = 1 }
sampleRate: Fixed; { sample rate in Apples Fixed point representation }
loopStart: LONGINT; { same meaning as regular SoundHeader }
loopEnd: LONGINT; { same meaning as regular SoundHeader }
encode: Byte; { data structure used , stdSH, extSH, or cmpSH }
baseFrequency: Byte; { same meaning as regular SoundHeader }
numFrames: LONGINT; { length in total number of frames }
AIFFSampleRate: Extended80; { IEEE sample rate }
markerChunk: Ptr; { sync track }
instrumentChunks: Ptr; { AIFF instrument chunks }
AESRecording: Ptr;
sampleSize: INTEGER; { number of bits in sample }
futureUse1: INTEGER; { reserved by Apple }
futureUse2: LONGINT; { reserved by Apple }
futureUse3: LONGINT; { reserved by Apple }
futureUse4: LONGINT; { reserved by Apple }
sampleArea: PACKED ARRAY [0..0] OF Byte; { space for when samples follow directly }
END;
ConversionBlockPtr = ^ConversionBlock;
ConversionBlock = RECORD
destination: INTEGER;
unused: INTEGER;
inputPtr: CmpSoundHeaderPtr;
outputPtr: CmpSoundHeaderPtr;
END;
SMStatusPtr = ^SMStatus;
SMStatus = PACKED RECORD
smMaxCPULoad: INTEGER;
smNumChannels: INTEGER;
smCurCPULoad: INTEGER;
END;
SCStatusPtr = ^SCStatus;
SCStatus = RECORD
scStartTime: Fixed;
scEndTime: Fixed;
scCurrentTime: Fixed;
scChannelBusy: BOOLEAN;
scChannelDisposed: BOOLEAN;
scChannelPaused: BOOLEAN;
scUnused: BOOLEAN;
scChannelAttributes: LONGINT;
scCPULoad: LONGINT;
END;
AudioSelectionPtr = ^AudioSelection;
AudioSelection = PACKED RECORD
unitType: LONGINT;
selStart: Fixed;
selEnd: Fixed;
END;
SndDoubleBufferPtr = ^SndDoubleBuffer;
SndDoubleBuffer = PACKED RECORD
dbNumFrames: LONGINT;
dbFlags: LONGINT;
dbUserInfo: ARRAY [0..1] OF LONGINT;
dbSoundData: PACKED ARRAY [0..0] OF Byte;
END;
SndDoubleBufferHeaderPtr = ^SndDoubleBufferHeader;
SndDoubleBufferHeader = PACKED RECORD
dbhNumChannels: INTEGER;
dbhSampleSize: INTEGER;
dbhCompressionID: INTEGER;
dbhPacketSize: INTEGER;
dbhSampleRate: Fixed;
dbhBufferPtr: ARRAY [0..1] OF SndDoubleBufferPtr;
dbhDoubleBack: ProcPtr;
END;
FUNCTION SndDoCommand(chan: SndChannelPtr;cmd: SndCommand;noWait: BOOLEAN): OSErr;
INLINE $A803;
FUNCTION SndDoImmediate(chan: SndChannelPtr;cmd: SndCommand): OSErr;
INLINE $A804;
FUNCTION SndNewChannel(VAR chan: SndChannelPtr;synth: INTEGER;init: LONGINT;
userRoutine: ProcPtr): OSErr;
INLINE $A807;
FUNCTION SndDisposeChannel(chan: SndChannelPtr;quietNow: BOOLEAN): OSErr;
INLINE $A801;
FUNCTION SndPlay(chan: SndChannelPtr;sndHdl: Handle;async: BOOLEAN): OSErr;
INLINE $A805;
FUNCTION SndAddModifier(chan: SndChannelPtr;modifier: ProcPtr;id: INTEGER;
init: LONGINT): OSErr;
INLINE $A802;
FUNCTION SndControl(id: INTEGER;VAR cmd: SndCommand): OSErr;
INLINE $A806;
PROCEDURE SetSoundVol(level: INTEGER);
PROCEDURE GetSoundVol(VAR level: INTEGER);
PROCEDURE StartSound(synthRec: Ptr;numBytes: LONGINT;completionRtn: ProcPtr);
PROCEDURE StopSound;
FUNCTION SoundDone: BOOLEAN;
FUNCTION SndSoundManagerVersion: NumVersion;
INLINE $203C,$000C,$0008,$A800;
FUNCTION SndStartFilePlay(chan: SndChannelPtr;fRefNum: INTEGER;resNum: INTEGER;
bufferSize: LONGINT;theBuffer: Ptr;theSelection: AudioSelectionPtr;theCompletion: ProcPtr;
async: BOOLEAN): OSErr;
INLINE $203C,$0D00,$0008,$A800;
FUNCTION SndPauseFilePlay(chan: SndChannelPtr): OSErr;
INLINE $203C,$0204,$0008,$A800;
FUNCTION SndStopFilePlay(chan: SndChannelPtr;async: BOOLEAN): OSErr;
INLINE $203C,$0308,$0008,$A800;
FUNCTION SndChannelStatus(chan: SndChannelPtr;theLength: INTEGER;theStatus: SCStatusPtr): OSErr;
INLINE $203C,$0010,$0008,$A800;
FUNCTION SndManagerStatus(theLength: INTEGER;theStatus: SMStatusPtr): OSErr;
INLINE $203C,$0014,$0008,$A800;
PROCEDURE SndGetSysBeepState(VAR sysBeepState: INTEGER);
INLINE $203C,$0018,$0008,$A800;
FUNCTION SndSetSysBeepState(sysBeepState: INTEGER): OSErr;
INLINE $203C,$001C,$0008,$A800;
FUNCTION SndPlayDoubleBuffer(chan: SndChannelPtr;theParams: SndDoubleBufferHeaderPtr): OSErr;
INLINE $203C,$0020,$0008,$A800;
FUNCTION MACEVersion: NumVersion;
INLINE $203C,$0000,$0010,$A800;
PROCEDURE Comp3to1(inBuffer: Ptr;outBuffer: Ptr;cnt: LONGINT;inState: Ptr;
outState: Ptr;numChannels: LONGINT;whichChannel: LONGINT);
INLINE $203C,$0004,$0010,$A800;
PROCEDURE Exp1to3(inBuffer: Ptr;outBuffer: Ptr;cnt: LONGINT;inState: Ptr;
outState: Ptr;numChannels: LONGINT;whichChannel: LONGINT);
INLINE $203C,$0008,$0010,$A800;
PROCEDURE Comp6to1(inBuffer: Ptr;outBuffer: Ptr;cnt: LONGINT;inState: Ptr;
outState: Ptr;numChannels: LONGINT;whichChannel: LONGINT);
INLINE $203C,$000C,$0010,$A800;
PROCEDURE Exp1to6(inBuffer: Ptr;outBuffer: Ptr;cnt: LONGINT;inState: Ptr;
outState: Ptr;numChannels: LONGINT;whichChannel: LONGINT);
INLINE $203C,$0010,$0010,$A800;
{$ENDC} { UsingSound }
{$IFC NOT UsingIncludes}
END.
{$ENDC}

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -1,3 +1,11 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Reverted <SM4>: replaced new 'actb' with old, and old with older
Referred to the MPW 3.2 version of this file (1990, E.T.O. #4)
9/2/94 SuperMario ROM source dump (header preserved below)
*/
/* /*
File: Types.r File: Types.r
@ -148,23 +156,15 @@ type 'acur' {
#ifdef oldTemp #ifdef oldTemp
/*--------------------------actbAlert Color old Lookup Table--------------------------*/ /*--------------------------actbAlert Color old Lookup Table--------------------------*/
type 'actb' { type 'actb' {
unsigned hex longint = 0; /* ctSeed */ unsigned hex longint; /* ctSeed */
integer = 0; /* ctFlags */ integer; /* ctFlags */
integer = $$Countof(ColorSpec) - 1; /* ctSize */ integer = $$Countof(ColorSpec) - 1; /* ctSize */
wide array ColorSpec { wide array ColorSpec {
integer wContentColor, /* value */ integer wContentColor, /* value */
wFrameColor, wFrameColor,
wTextColor, wTextColor,
wHiliteColor, wHiliteColor,
wTitleBarColor, wTitleBarColor;
wHiliteLight,
wHiliteDark,
wTitleBarLight,
wTitleBarDark,
wDialogLight,
wDialogDark,
wTingeLight,
wTingeDark;
unsigned integer; /* RGB: red */ unsigned integer; /* RGB: red */
unsigned integer; /* green */ unsigned integer; /* green */
unsigned integer; /* blue */ unsigned integer; /* blue */
@ -174,7 +174,7 @@ type 'acur' {
/*----------------------------actbAlert Color Lookup Table----------------------------*/ /*----------------------------actbAlert Color Lookup Table----------------------------*/
type 'actb' { type 'actb' {
unsigned hex longint = 0; /* ctSeed */ unsigned hex longint = 0; /* ctSeed */
integer = 1; /* ctFlags */ integer = 0; /* ctFlags */
integer = $$Countof(ColorSpec) - 1; /* ctSize */ integer = $$Countof(ColorSpec) - 1; /* ctSize */
wide array ColorSpec { wide array ColorSpec {
integer wContentColor, /* value */ integer wContentColor, /* value */

View File

@ -1,3 +1,12 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM2> by uncommenting talkCmd and listenCmd
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; Clean diff against SuperMario
;
; ;
; File: AppleDeskBusPriv.a ; File: AppleDeskBusPriv.a
; ;
@ -48,8 +57,8 @@ __INCLUDINGAPPLEDESKBUSPRIV__ SET 1
maskADBCmd EQU $0C ; Mask for ADB command maskADBCmd EQU $0C ; Mask for ADB command
resetCmd EQU $00 ; Command for Bus Reset resetCmd EQU $00 ; Command for Bus Reset
; <SM2> rb talkCmd EQU $0C ; Command for Talk R0 talkCmd EQU $0C ; Command for Talk R0 ex<SM2> <Sys7.1>
; <SM2> rb listenCmd EQU $08 ; Command for Listen R0 listenCmd EQU $08 ; Command for Listen R0 ex<SM2> <Sys7.1>
kbdAddr EQU $02 ; keyboard type device kbdAddr EQU $02 ; keyboard type device
mouseAddr EQU $03 ; mouse type device mouseAddr EQU $03 ; mouse type device
numFDBAdr EQU 16 ; number of avaiblae FDB address numFDBAdr EQU 16 ; number of avaiblae FDB address

View File

@ -1,3 +1,12 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM2>, slimming CTBBlock back down
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; Clean diff against SuperMario
;
; ;
; File: CommToolboxPriv.a ; File: CommToolboxPriv.a
; ;
@ -260,7 +269,7 @@ private DS.W 1 ; INTEGER;
appList DS.L 1 ; CRMAppRecPtr; appList DS.L 1 ; CRMAppRecPtr;
resFiles DS.L 1 ; ResFileRecHdl; resFiles DS.L 1 ; ResFileRecHdl;
toolResChain DS.L 1 ; ResourceMapHandle; toolResChain DS.L 1 ; ResourceMapHandle;
CommToolBoxTable DS.L 1 ; ptr to table ; ex<SM2> <Sys7.1>
secret DS.L 16 ; LONGINT secret DS.L 16 ; LONGINT
CTBBlockSize EQU * CTBBlockSize EQU *
ENDR ENDR

View File

@ -1,3 +1,12 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Restored the misspelt 'signiture' that was corrected by <19>
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; Clean diff against SuperMario
;
; ;
; File: Decompression.a ; File: Decompression.a
; ;
@ -195,6 +204,7 @@ maxReplacement EQU 6 ;end of substitution list.
; ;
;--------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------
ExtendedResource Record 0 ExtendedResource Record 0
signiture ;<Sys7.1>
signature DS.L 1 ;used for robustness. Tells if data is compressed now. signature DS.L 1 ;used for robustness. Tells if data is compressed now.
headerLength DS.W 1 ;length of this header in bytes. headerLength DS.W 1 ;length of this header in bytes.
headerVersion DS.B 1 ;number of items in this header. ( must be < 128 ). headerVersion DS.B 1 ;number of items in this header. ( must be < 128 ).

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'Decompression.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -1,3 +1,16 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Restored the machine-specific equates for Plus/SE/Portable/"Universal
; 16-bit", which required some of the default equates to be
; conditionalised for onMac32 ("Universal 32-bit") to prevent double-
; defines. Restored vBufD equate for SE. Reconstructed some of the
; "private sound defines" that <SM27> moved to the lost SoundPrivate.a.
; Commented out a small number of newer equates that conflict with other
; files.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
;__________________________________________________________________________________________________ ;__________________________________________________________________________________________________
; ;
; File: HardwarePrivateEqu.a ; File: HardwarePrivateEqu.a
@ -218,6 +231,25 @@ __INCLUDINGHARDWAREPRIVATEEQU__ SET 1
; <Sys7.1> Assume onMac32 unless one of the old machines is defined
IF (&TYPE('onMac') = 'UNDEFINED') THEN
onMac: EQU 0
ENDIF
IF (&TYPE('onMacPP') = 'UNDEFINED') THEN
onMacPP: EQU 0
ENDIF
IF (&TYPE('onHcMac') = 'UNDEFINED') THEN
onHcMac: EQU 0
ENDIF
IF (&TYPE('onMac16') = 'UNDEFINED') THEN
onMac16: EQU 0
ENDIF
IF (&TYPE('onMac32') = 'UNDEFINED') THEN
onMac32: EQU NOT (onMac OR onMacPP OR onHcMac OR onMac16)
ENDIF
;__________________________________________________________________________________________ ;__________________________________________________________________________________________
; ;
; Welcome to the New Hardware Equates File. By following some simple procedures this file ; Welcome to the New Hardware Equates File. By following some simple procedures this file
@ -432,6 +464,34 @@ sDTIME EQU $140
sTEST equ $180 sTEST equ $180
;---------------------------------------------------
; Apple Sound Chip register offsets ex<SM27> <Sys7.1>
;---------------------------------------------------
ascVersion EQU $800 ; [byte]
ascMode EQU $801 ; [byte] 2 means waveform
ascChipControl EQU $802 ; [byte]
ascFifoControl EQU $803 ; [byte]
ascFifoInt EQU $804 ; [byte]
ascWaveOneShot EQU $805 ; [byte]
ascVolControl EQU $806 ; [byte]
ascClockRate EQU $807 ; [byte]
ascPlayRecA EQU $80a ; [byte]
ascPlayRecB EQU $80b ; [byte]
ascTestReg EQU $80f ; [byte]
bmSrcTimeIncrA EQU $f04 ; [byte]
bmSrcTimeIncrB EQU $f24 ; [byte]
bmLeftScaleA EQU $f06 ; [byte]
bmLeftScaleB EQU $f26 ; [byte]
bmRightScaleA EQU $f07 ; [byte]
bmRightScaleB EQU $f27 ; [byte]
bmFifoControlA EQU $f08 ; [byte]
bmFifoControlB EQU $f28 ; [byte]
bmIntControlA EQU $f09 ; [byte]
bmIntControlB EQU $f29 ; [byte]
;__________________________________________________________________________________________ ;__________________________________________________________________________________________
; ;
; ;
@ -651,7 +711,9 @@ vPCR EQU $1800 ; PERIPH. CONTROL REG.
vIFR EQU $1A00 ; INT. FLAG REG. vIFR EQU $1A00 ; INT. FLAG REG.
vIER EQU $1C00 ; INT. ENABLE REG. vIER EQU $1C00 ; INT. ENABLE REG.
vBufA EQU $1E00 ; BUFFER A vBufA EQU $1E00 ; BUFFER A
IF onMac32 THEN ; <Sys7.1> Prevent double-define below
vBufD EQU vBufA ; disk head select is buffer A <3.5> vBufD EQU vBufA ; disk head select is buffer A <3.5>
ENDIF ; <Sys7.1>
;--------------------------------------------------- ;---------------------------------------------------
; VIA IFR/IER bits ; VIA IFR/IER bits
@ -673,7 +735,9 @@ ifIRQ EQU 7 ; any interrupt
vSound EQU $7 ; sound volume bits (0..2) (output) vSound EQU $7 ; sound volume bits (0..2) (output)
IF onMac32 THEN ; <Sys7.1> Prevent double-define below
vTestJ EQU 0 ; Burn In Test jumper (input) vTestJ EQU 0 ; Burn In Test jumper (input)
ENDIF ; <Sys7.1>
vCpuId0 EQU 1 ; CPU Identification bit 0 (input) vCpuId0 EQU 1 ; CPU Identification bit 0 (input)
vCpuId1 EQU 2 ; CPU Identification bit 1 (input) vCpuId1 EQU 2 ; CPU Identification bit 1 (input)
@ -2235,20 +2299,28 @@ MEMCRefresh EQU MEMCconfig+4 ; DRAM refresh rate register
; Interrupt Masks ; Interrupt Masks
;--------------------------------------------------- ;---------------------------------------------------
IF onMac32 THEN ; <Sys7.1> Prevent double-define below
hiIntMask EQU $0700 ; programmer switch only hiIntMask EQU $0700 ; programmer switch only
ENDIF ; <Sys7.1>
pwrOffEnbl EQU $2500 ; mask to allow poweroff interrupts pwrOffEnbl EQU $2500 ; mask to allow poweroff interrupts
IF onMac32 THEN ; <Sys7.1> Prevent double-define below
sccIntMask EQU $0400 ; SCC interrupt level sccIntMask EQU $0400 ; SCC interrupt level
sccEnblMask EQU $FBFF ; mask to enable SCC interrupts sccEnblMask EQU $FBFF ; mask to enable SCC interrupts
ENDIF ; <Sys7.1>
slotIntMask EQU $0200 ; slot's interrupt level <v1.4><1.9> slotIntMask EQU $0200 ; slot's interrupt level <v1.4><1.9>
IF onMac32 THEN ; <Sys7.1> Prevent double-define below
viaIntMask EQU $0100 ; VIA1 interrupt level viaIntMask EQU $0100 ; VIA1 interrupt level
loIntMask EQU $0100 loIntMask EQU $0100
ENDIF ; <Sys7.1>
;--------------------------------------------------- ;---------------------------------------------------
; Hardware Base Addresses ; Hardware Base Addresses
;--------------------------------------------------- ;---------------------------------------------------
IF onMac32 THEN ; <Sys7.1> Prevent double-define below
WrOffs EQU 0 ; SCSI write addrs are same as read base WrOffs EQU 0 ; SCSI write addrs are same as read base
ENDIF ; <Sys7.1>
MskIOP1 EQU 1 ; IOP 1 (SWIM) is level 1 interrupt MskIOP1 EQU 1 ; IOP 1 (SWIM) is level 1 interrupt
MskVIA1 EQU 1 ; VIA 1 is level 1 MskVIA1 EQU 1 ; VIA 1 is level 1
MskADB EQU 1 ; ADB is level 1 MskADB EQU 1 ; ADB is level 1
@ -2336,23 +2408,30 @@ CACR_WA_030 EQU 13 ; bit # of write allocate enable on 030s <T8>
IF onMac32 THEN ; <Sys7.1> Prevent double-define below
Machine EQU 7 ; new Machine number for patches <18> Machine EQU 7 ; new Machine number for patches <18>
ENDIF ; <Sys7.1>
;--------------------------------------------------- ;---------------------------------------------------
; System Software Information ; System Software Information
;--------------------------------------------------- ;---------------------------------------------------
IF onMac32 THEN ; <Sys7.1> Prevent double-define below
numOsTrap EQU 256 ; number of os traps numOsTrap EQU 256 ; number of os traps
ToolTable EQU $0E00 ; start of toolbox trap table ToolTable EQU $0E00 ; start of toolbox trap table
numTbTrap EQU 1024 ; number of toolbox traps numTbTrap EQU 1024 ; number of toolbox traps
numTrapMask EQU numTbTrap-1 ; mask for number of tb traps numTrapMask EQU numTbTrap-1 ; mask for number of tb traps
ENDIF ; <Sys7.1>
JMemMgr24 EQU $1E00 ; jump vector start for 24 bit Memory Manager <v1.9> JMemMgr24 EQU $1E00 ; jump vector start for 24 bit Memory Manager <v1.9>
JMemMgr32 EQU $1F00 ; jump vector start for 32 bit Memory Manager <v1.9> JMemMgr32 EQU $1F00 ; jump vector start for 32 bit Memory Manager <v1.9>
IF onMac32 THEN ; <Sys7.1> Prevent double-define below
HeapStart EQU $2800 ; Low mem is now 10k bytes <SM13> HeapStart EQU $2800 ; Low mem is now 10k bytes <SM13>
defSysHeap EQU $18000 ; Default size of the system heap defSysHeap EQU $18000 ; Default size of the system heap
nDfltStackSize EQU $6000 ; Default stack size nDfltStackSize EQU $6000 ; Default stack size
ENDIF ; <Sys7.1>
**** maybe not so temporary to allow things to build **** <3.5> **** maybe not so temporary to allow things to build **** <3.5>
IF onMac32 THEN ; <Sys7.1> Prevent double-define below
oneSecConst EQU 8 ; gets converted to $80000 for onesec constant<3.5> oneSecConst EQU 8 ; gets converted to $80000 for onesec constant<3.5>
IF BlackBirdDebug THEN IF BlackBirdDebug THEN
ROMStart EQU $40000000 ; ••PN BlackBirdstarting address of final ROM code <3.5> ROMStart EQU $40000000 ; ••PN BlackBirdstarting address of final ROM code <3.5>
@ -2362,13 +2441,15 @@ ROMStart EQU $40800000 ; starting address of final ROM code <3.5>
snd2MemTop EQU $300 ; SoundLow to Memtop snd2MemTop EQU $300 ; SoundLow to Memtop
pwm2MemTop EQU $2FF ; PWMBuffer to MemTop pwm2MemTop EQU $2FF ; PWMBuffer to MemTop
bufWorldSize EQU 8192 ; total size of the BufPtr world <H16> bufWorldSize EQU 8192 ; total size of the BufPtr world <H16>
ENDIF ; <Sys7.1>
;--------------------------------------------------- <SM4> rb, start ;--------------------------------------------------- <SM4> rb, start
; Sound parameters <P4> ; Sound parameters <P4>
; <Sys7.1> Commented out because they conflict with TextEditPriv.a
;--------------------------------------------------- ;---------------------------------------------------
sampleSize equ 4 ; number of bytes per sample ;sampleSize equ 4 ; number of bytes per sample
bufferSize equ 960 ; number of samples per buffer ;bufferSize equ 960 ; number of samples per buffer
sampleRate equ 24 * 1024 ; 24KHz sample rate ;sampleRate equ 24 * 1024 ; 24KHz sample rate
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
; Whitney Sound Register Offsets (from ASC base in UniversalTables.a) ; Whitney Sound Register Offsets (from ASC base in UniversalTables.a)
@ -2718,7 +2799,11 @@ pdspSet equ 7 ; "0" clears, "1" sets for any bit field [0:6] containing a
; ??? ; ???
;--------------------------------------------------- ;---------------------------------------------------
IF onMac OR onMacPP THEN ; <Sys7.1> Work around this definition being moved up here
seRegs EQU $3FFC80 ; <Sys7.1>
ELSE ; <Sys7.1>
seRegs EQU $0C30 ; offset to Sys Error Regs w/o Overlay seRegs EQU $0C30 ; offset to Sys Error Regs w/o Overlay
ENDIF ; <Sys7.1>
;--------------------------------------------------- ;---------------------------------------------------
; Hardware configuration bits. ; Hardware configuration bits.
@ -2932,16 +3017,16 @@ PrattSysStatReg EQU $50080007
btst.b #PrattFlashLBit,PrattSysStatReg ; Is this a flash rom system btst.b #PrattFlashLBit,PrattSysStatReg ; Is this a flash rom system
ENDM ENDM
ForAmusementOnly equ 0
If ForAmusementOnly then
;__________________________________________________________________________________________ ;__________________________________________________________________________________________
; ;
; ;
; Old 16 bit Equates for onMac, onMacPP, and onHcMac ; Old 16 bit Equates for onMac, onMacPP, and onHcMac
; <Sys7.1> Removed forAmusementOnly conditional, and restored onMac etc
; ;
; ;
;__________________________________________________________________________________________ ;__________________________________________________________________________________________
IF onMac THEN ; <Sys7.1>
;=======================================; ;=======================================;
; Macintosh Plus Hardware Information ; ; Macintosh Plus Hardware Information ;
;=======================================; ;=======================================;
@ -3063,8 +3148,10 @@ halfSec EQU onesec/2 ; *** patch only ***
stlDelay EQU $30 ; default bus settle delay *** patch only *** stlDelay EQU $30 ; default bus settle delay *** patch only ***
ROMDoEject EQU $40001E ; jump to DoEject utility *** patch only *** ROMDoEject EQU $40001E ; jump to DoEject utility *** patch only ***
dACKRd EQU $200 ; offset of psuedo-DMA - READ *** patch only *** dACKRd EQU $200 ; offset of psuedo-DMA - READ *** patch only ***
ENDIF ; onMac <Sys7.1>
IF onMacPP THEN ; <Sys7.1>
;=======================================; ;=======================================;
; Macintosh SE Hardware Information ; ; Macintosh SE Hardware Information ;
;=======================================; ;=======================================;
@ -3102,6 +3189,7 @@ vAInit EQU (1)|\ ; sound volume level initially 1
(1<<vPage2)|\ ; main screen buffer selected (1<<vPage2)|\ ; main screen buffer selected
(0<<vSCCWrReq) ; SCC write/request line is an input (0<<vSCCWrReq) ; SCC write/request line is an input
vBufD EQU vBufA ; disk head select is buffer A <Sys7.1> restored
; === VIA1 BUFFER B === ; === VIA1 BUFFER B ===
@ -3182,8 +3270,10 @@ HeapStart EQU $1600 ; Aladdin starting point
defSysHeap EQU $18000 ; Default size of the system heap defSysHeap EQU $18000 ; Default size of the system heap
nDfltStackSize EQU $2000 ; Default stack size nDfltStackSize EQU $2000 ; Default stack size
ENDIF ; onMacPP <Sys7.1>
IF onHcMac THEN ; <Sys7.1>
;===========================================; ;===========================================;
; Macintosh Portable Hardware Information ; ; Macintosh Portable Hardware Information ;
;===========================================; ;===========================================;
@ -3299,8 +3389,10 @@ numTrapMask EQU numTbTrap-1 ; mask for number of tb traps
HeapStart EQU $1E00 ; Portable starting point <1.2> HeapStart EQU $1E00 ; Portable starting point <1.2>
DefSysHeap EQU $18000 ; Default size of the system heap DefSysHeap EQU $18000 ; Default size of the system heap
NDfltStackSize EQU $2000 ; Default stack size NDfltStackSize EQU $2000 ; Default stack size
ENDIF ; onHcMac <Sys7.1>
IF onMac16 THEN ; <Sys7.1>
;===================================================; ;===================================================;
; Universal 16 bit Macintosh Hardware Information ; ; Universal 16 bit Macintosh Hardware Information ;
;===================================================; ;===================================================;
@ -3365,11 +3457,10 @@ numTrapMask EQU numTbTrap-1 ; mask for number of tb traps
HeapStart EQU $1E00 ; Laguna starting point <1.2> HeapStart EQU $1E00 ; Laguna starting point <1.2>
DefSysHeap EQU $18000 ; Default size of the system heap DefSysHeap EQU $18000 ; Default size of the system heap
NDfltStackSize EQU $2000 ; Default stack size NDfltStackSize EQU $2000 ; Default stack size
ENDIF ; onMac16 <Sys7.1>
ENDIF ; ForAmusementOnly
HardwarePrivate EQU 1 HardwarePrivate EQU 1
ENDIF ; __INCLUDINGHARDWAREPRIVATEEQU__ ENDIF ; __INCLUDINGHARDWAREPRIVATEEQU__

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Added superseded boxFlag equates for code compatibility.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: InternalOnlyEqu.a ; File: InternalOnlyEqu.a
; ;
@ -645,6 +652,7 @@ boxQuadra700 EQU 16 ; Spike (25MHz 040)
boxClassicII EQU 17 ; Apollo boxClassicII EQU 17 ; Apollo
boxPowerBook100 EQU 18 ; Asahi (Its a Sony!) Portable <2> boxPowerBook100 EQU 18 ; Asahi (Its a Sony!) Portable <2>
boxPowerBook140 EQU 19 ; TimLC 16 Mhz Tim; no FPU boxPowerBook140 EQU 19 ; TimLC 16 Mhz Tim; no FPU
boxZydeco EQU 20 ; code-compatibility equate <Sys7.1>
boxQuadra950 EQU 20 ; a Mac Quadra 950 (33MHz 040, 5 slots+PDS, VIA1&2, Orwell MCA, 2 IOPs, SCSI 2*53c96) <H18> boxQuadra950 EQU 20 ; a Mac Quadra 950 (33MHz 040, 5 slots+PDS, VIA1&2, Orwell MCA, 2 IOPs, SCSI 2*53c96) <H18>
boxLCIII EQU 21 ; Vail (25 MHz, 030, optional FPU, 1 PDS, Sonora) <H14><SM41> boxLCIII EQU 21 ; Vail (25 MHz, 030, optional FPU, 1 PDS, Sonora) <H14><SM41>
boxSoftmacSUN EQU 22 ; Softmac on Sun, (recycled, was boxCarnation33) <SM52> boxSoftmacSUN EQU 22 ; Softmac on Sun, (recycled, was boxCarnation33) <SM52>

View File

@ -0,0 +1,5 @@
;
; Shim to point source to a compatible include file
;
INCLUDE 'PowerPrivEqu.a'

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -1,3 +1,14 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted ExpandMem to <66> (version $128, size $1F4) by moving the
; "size" equate. By leaving newer fields in the record after "size", we
; keep newer code building. Restored emNumer and emDenom as removed by
; <84>. Restored emFFSwapMMUMode, which was repurposed to
; emButtonIntGlobals by <SM22> (and not used anywhere).
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: SysPrivateEqu.a ; File: SysPrivateEqu.a
; ;
@ -336,7 +347,9 @@ emItlSysCachePtr ds.l 1 ; pointer to system itl cache <7><20>
emScriptMapPtr ds.l 1 ; pointer to script mapping/sorting data <8> emScriptMapPtr ds.l 1 ; pointer to script mapping/sorting data <8>
emLangMapPtr ds.l 1 ; pointer to language mapping/sorting data <8> emLangMapPtr ds.l 1 ; pointer to language mapping/sorting data <8>
emNumer ; Resurrect the field below... <Sys7.1>
ds.l 1 ; was emNumer (obsolete), now unused <11><84> ds.l 1 ; was emNumer (obsolete), now unused <11><84>
emDenom ; Resurrect the field below... <Sys7.1>
ds.l 1 ; was emDenom (obsolete), now unused <11><84> ds.l 1 ; was emDenom (obsolete), now unused <11><84>
emIconCluts ds.l 1 ; Ptr to global icon info <13> emIconCluts ds.l 1 ; Ptr to global icon info <13>
emScriptAppGlobals ds.l 1 ; Handle to application-specific script globals <16><20><21> emScriptAppGlobals ds.l 1 ; Handle to application-specific script globals <16><20><21>
@ -388,6 +401,7 @@ emPrintingGlobals ds.l 1 ; Tsunami Printing Manager non-swapped printing gl
emCursorGlobals ds.l 1 ; Ptr to CursorDev globals <46> emCursorGlobals ds.l 1 ; Ptr to CursorDev globals <46>
emFFSwapMMUMode ; Resurrect the field below... <Sys7.1>
emButtonIntGlobals ds.l 1 ; Ptr to Button Interrupt globals. previously Ptr to "real" SwapMMUMode routine <SM22> CSS emButtonIntGlobals ds.l 1 ; Ptr to Button Interrupt globals. previously Ptr to "real" SwapMMUMode routine <SM22> CSS
emAppleTalkInactiveOnBoot ds.w 1 ; True if AppleTalk was inactive on boot <48> emAppleTalkInactiveOnBoot ds.w 1 ; True if AppleTalk was inactive on boot <48>
@ -398,6 +412,9 @@ emLowMemoryPrintingGlobals ds.l 1 ; Handle to globals used by LowMemoryPrinti
emNetBootGlobals ds.l 1 ; Handle to globals used by emNetBootGlobals for Network Booting and Appletalk stuff. <65> emNetBootGlobals ds.l 1 ; Handle to globals used by emNetBootGlobals for Network Booting and Appletalk stuff. <65>
emRecSize equ * ; size for this version <Sys7.1>
size equ *
emFndrDeskRgn ds.l 1 ; Handle to region maintained by Bungee Finder if fndrDeskRgnTracking is true <67> <69> emFndrDeskRgn ds.l 1 ; Handle to region maintained by Bungee Finder if fndrDeskRgnTracking is true <67> <69>
emFndrDeskRgnTracking ds.w 1 ; If true, the Bungee Finder will keep an up-to-date region handle in fndrDeskRgn of the icons on the desktop <67> <69> emFndrDeskRgnTracking ds.w 1 ; If true, the Bungee Finder will keep an up-to-date region handle in fndrDeskRgn of the icons on the desktop <67> <69>
@ -440,10 +457,7 @@ jSWModemSoundVector ds.l 1 ; Vector to control routine for software modem s
; (currently {CInternal}ExpandMemPriv.h is the one) ; (currently {CInternal}ExpandMemPriv.h is the one)
; Be sure to update the Reality sources when you change this file (and the version number) ; Be sure to update the Reality sources when you change this file (and the version number)
emCurVersion EQU $0133 ; version emCurVersion EQU $0128 ; version <Sys7.1>
emRecSize equ * ; size for this version
size equ *
ENDR ENDR

View File

@ -1,3 +1,11 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted MaxPseudoCmd to disregard the new Egret commands from <SM3> and
; later.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
Eject Eject
************************************************************************ ************************************************************************
; EGRET Manager Equates ; EGRET Manager Equates
@ -273,7 +281,7 @@ EnDisPDM equ $21 ; Enable/Disable PowerDown Message <T2>
RdWrIIC equ $22 ; Read or Write IIC (I sqared C) <SM3>[rbm]<3> RdWrIIC equ $22 ; Read or Write IIC (I sqared C) <SM3>[rbm]<3>
WakeUpMode equ $23 ; Enable/Disable WakeUpMode <P1> WakeUpMode equ $23 ; Enable/Disable WakeUpMode <P1>
TimerTickle equ $24 ; ShutDown Timer Tickle <P1> TimerTickle equ $24 ; ShutDown Timer Tickle <P1>
MaxPseudoCmd equ TimerTickle ; largest possible pseudo command number <P1> MaxPseudoCmd equ EnDisPDM ; largest possible pseudo command number <P1><Sys7.1>
; ;
;__________________________________________________________________________________________________ ;__________________________________________________________________________________________________

653
Make/ForceRomBindOrder.a Normal file
View File

@ -0,0 +1,653 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Generated using information extracted from the System file
;
INCLUDE 'LinkedPatchMacros.a'
; This proc is included in the input of LinkPatch to force a known-good order on
; the RomBind table. This was needed to get round-tripping working, because
; LinkPatch orders this table as ROM$*$ strings appear in object file dictionary
; records. The proc itself is not included in the final binary.
ForceRomBindOrder PROC ENTRY
CASE ON
dcROM ROMVCBLOOP ; entry $000, lpch 1 (Plus)
dcROM AFTERGETBLOCKINGETBMBLK ; entry $001, lpch 1 (Plus)
dcROM AFTERGETBMBLKINREADBM ; entry $002, lpch 1 (Plus)
dcROM AFTERSECTRECTINCALLCONTROL ; entry $003, lpch 1 (Plus)
dcROM ROMNOTRGN ; entry $004, lpch 1 (Plus)
dcROM ROMNOTFR ; entry $005, lpch 1 (Plus)
dcROM PLUSSETHSIZE ; entry $006, lpch 1 (Plus)
dcROM PLUSPUTRGNDONE ; entry $007, lpch 1 (Plus)
dcROM PLUSNOTRECT ; entry $008, lpch 1 (Plus)
dcROM ROMFROMHBLOCK ; entry $009, lpch 1 (Plus)
dcROM ROMFROMRELOCREL ; entry $00a, lpch 1 (Plus)
dcROM ROMFROMCOMPACT ; entry $00b, lpch 1 (Plus)
dcROM ROMFROMPURGEHEAP ; entry $00c, lpch 1 (Plus)
dcROM ROMFROMMAKEPTR ; entry $00d, lpch 1 (Plus)
dcROM ROMBACKMPS ; entry $00e, lpch 1 (Plus)
dcROM ROMFROMCGZ ; entry $00f, lpch 1 (Plus)
dcROM ROMFROMBCS ; entry $010, lpch 1 (Plus)
dcROM GETMAXLOADAFTERPRELOCK ; entry $011, lpch 1 (Plus)
dcROM SIZEFITS ; entry $012, lpch 1 (Plus)
dcROM GETMAXLOAD@4 ; entry $013, lpch 1 (Plus)
dcROM AFTERMAXBLOCKINGETMAXLOAD ; entry $014, lpch 1 (Plus)
dcROM AFTERDISPOSEHANDLEINUPDATERESFILE ; entry $015, lpch 1 (Plus)
dcROM AFTERNEWHANDLEINUPDATERESFILE ; entry $016, lpch 1 (Plus)
dcROM AFTERBSRREADDATAINNEWMAP ; entry $017, lpch 1 (Plus)
dcROM AFTERREADINRDDATA ; entry $018, lpch 1 (Plus)
dcROM DONEGNE ; entry $019, lpch 1 (Plus)
dcROM AFTERBTOPENINACCESSBT ; entry $01a, lpch 3 (Plus,SE)
dcROM AFTER2NDACCESSBTINMOUNTVOL ; entry $01b, lpch 3 (Plus,SE)
dcROM MTCHECK ; entry $01c, lpch 3 (Plus,SE)
dcROM AFTERREADBMINUPDATEFREE ; entry $01d, lpch 3 (Plus,SE)
dcROM AFTERUPDATEFREEINMTCHECK ; entry $01e, lpch 3 (Plus,SE)
dcROM ROMCOLORMAP ; entry $01f, lpch 3 (Plus,SE)
dcROM ROMRSECT ; entry $020, lpch 3 (Plus,SE)
dcROM ROMTRIMRECT ; entry $021, lpch 3 (Plus,SE)
dcROM ROMSHIELDCURSOR ; entry $022, lpch 3 (Plus,SE)
dcROM ROMINITRGN ; entry $023, lpch 3 (Plus,SE)
dcROM ROMXORSLAB ; entry $024, lpch 3 (Plus,SE)
dcROM ROMFASTSLABMODE ; entry $025, lpch 3 (Plus,SE)
dcROM ROMSLABMODE ; entry $026, lpch 3 (Plus,SE)
dcROM ROMPATEXPAND ; entry $027, lpch 3 (Plus,SE)
dcROM ROMSEEKMASK ; entry $028, lpch 3 (Plus,SE)
dcROM ROMMASKTAB ; entry $029, lpch 3 (Plus,SE)
dcROM ROMDRAWSLAB ; entry $02a, lpch 3 (Plus,SE)
dcROM ROMDRAWRECT ; entry $02b, lpch 3 (Plus,SE)
dcROM ROMFRPOLY ; entry $02c, lpch 3 (Plus,SE)
dcROM ROMPUSHVERB ; entry $02d, lpch 3 (Plus,SE)
dcROM AFTERRELEASERESOURCEINGETNEWCONTROL ; entry $02e, lpch 3 (Plus,SE)
dcROM AFTERRELEASERESOURCEINGETNEWWINDOW ; entry $02f, lpch 3 (Plus,SE)
dcROM FLUSHAPPLVBLS ; entry $030, lpch 3 (Plus,SE)
dcROM ROMDONEINSERT ; entry $031, lpch 4 (II)
dcROM ROMCALLMBARPROC ; entry $032, lpch 4 (II)
dcROM ROMGETA1LIST ; entry $033, lpch 4 (II)
dcROM ROMIIGETHINDEX ; entry $034, lpch 4 (II)
dcROM ROMIIGETHA0LIST ; entry $035, lpch 4 (II)
dcROM ROMGETINDEX ; entry $036, lpch 4 (II)
dcROM ROMIIGETA0LIST ; entry $037, lpch 4 (II)
dcROM SETITEMPROPERTY ; entry $038, lpch 4 (II)
dcROM GETITEMPROPERTY ; entry $039, lpch 4 (II)
dcROM ROMFINDPARENTEND ; entry $03a, lpch 4 (II)
dcROM AFTERSYSERRINMENUKEY ; entry $03b, lpch 4 (II)
dcROM AFTERSYSERRININITMENUS ; entry $03c, lpch 4 (II)
dcROM MKEYDONE ; entry $03d, lpch 4 (II)
dcROM HMINMENUKEY ; entry $03e, lpch 4 (II)
dcROM ROMHLNONE ; entry $03f, lpch 4 (II)
dcROM TURNINDEXOFF ; entry $040, lpch 4 (II)
dcROM RESTOREALLBITS ; entry $041, lpch 4 (II)
dcROM FLASHFEEDBACK ; entry $042, lpch 4 (II)
dcROM GETITEMRECORD ; entry $043, lpch 4 (II)
dcROM GETMENUPTR ; entry $044, lpch 4 (II)
dcROM CHOOSEITEM ; entry $045, lpch 4 (II)
dcROM RESETRECTSCROLLDATA ; entry $046, lpch 4 (II)
dcROM MENUCHANGED ; entry $047, lpch 4 (II)
dcROM CALLMBARPROC ; entry $048, lpch 4 (II)
dcROM SETTICKCOUNTERS ; entry $049, lpch 4 (II)
dcROM DONECHECKDRAG ; entry $04a, lpch 4 (II)
dcROM RESTORESOMEBITS ; entry $04b, lpch 4 (II)
dcROM DRAWTHEMENU ; entry $04c, lpch 4 (II)
dcROM CALLDRAWMDEF ; entry $04d, lpch 4 (II)
dcROM ROMNULLMDEFPROC ; entry $04e, lpch 4 (II)
dcROM DIRTYMENUSIZE ; entry $04f, lpch 4 (II)
dcROM GETHA0LIST ; entry $050, lpch 4 (II)
dcROM GOTRMENU ; entry $051, lpch 4 (II)
dcROM TWOBYTEXIT ; entry $052, lpch 4 (II)
dcROM FOUNDRMENU ; entry $053, lpch 4 (II)
dcROM GETINDEX ; entry $054, lpch 4 (II)
dcROM FOUNDHMENU ; entry $055, lpch 4 (II)
dcROM GETHINDEX ; entry $056, lpch 4 (II)
dcROM AFTERSECTRECTINCALLDRAWMDEF ; entry $057, lpch 4 (II)
dcROM RTSINDRAWTHEMENU ; entry $058, lpch 4 (II)
dcROM ROMINSERTTHEITEM ; entry $059, lpch 4 (II)
dcROM ROMIIGETITEMRECORD ; entry $05a, lpch 4 (II)
dcROM ROMJUMPINTOINSERTTHEITEM ; entry $05b, lpch 4 (II)
dcROM ROMDODELENABLEBIT ; entry $05c, lpch 4 (II)
dcROM ROMSKIPDELENABLEBIT ; entry $05d, lpch 4 (II)
dcROM TENBYTEXIT ; entry $05e, lpch 4 (II)
dcROM CLOSEITEM ; entry $05f, lpch 4 (II)
dcROM SPECIALCHAR ; entry $060, lpch 4 (II)
dcROM ROMFINDCENTRY ; entry $061, lpch 4 (II)
dcROM ROMMENUCTBLSANITYCHK ; entry $062, lpch 4 (II)
dcROM AFTERLOADRESOURCEINGETTHEMPROC ; entry $063, lpch 4 (II)
dcROM AFTERRESTORESETPORTINDRAWITEM ; entry $064, lpch 4 (II)
dcROM AFTERGETAUXWININCLOSEDIALOG ; entry $065, lpch 4 (II)
dcROM ATNODITLINCLOSEDIALOG ; entry $066, lpch 4 (II)
dcROM AFTERDETACHRESOURCEINDOCOLOR ; entry $067, lpch 4 (II)
dcROM AFTERSETWINCOLORINGOTSTORAGE ; entry $068, lpch 4 (II)
dcROM AFTERFIXDIVINCHAREXTRA ; entry $069, lpch 4 (II)
dcROM AFTERSTACKSPACEINRGNOP ; entry $06a, lpch 4 (II)
dcROM AFTERBUFFERSIZECALCINRGNOP ; entry $06b, lpch 4 (II)
dcROM AFTERGETKEYSINGETPINMOUSE ; entry $06c, lpch 4 (II)
dcROM AFTERMOVEGWKEYMAPINGETPINMOUSE ; entry $06d, lpch 4 (II)
dcROM AFTERHILITEWINDOWINDOACTIVATE ; entry $06e, lpch 4 (II)
dcROM ROMINITADBDRVR ; entry $06f, lpch 6 (SE,II)
dcROM KBDDRVR ; entry $070, lpch 6 (SE,II)
dcROM FINDFDBINFO ; entry $071, lpch 6 (SE,II)
dcROM GEMPTYADDR ; entry $072, lpch 6 (SE,II)
dcROM TRYSYSEVENT ; entry $073, lpch 6 (SE,II)
dcROM FROMWAITFORDSK ; entry $074, lpch 7 (Plus,SE,II)
dcROM AFTERLOADRESOURCEINCALLCONTROL ; entry $075, lpch 7 (Plus,SE,II)
dcROM AFTERDISPOSEHANDLEINCLOSEDIALOG ; entry $076, lpch 7 (Plus,SE,II)
dcROM AFTERVALIDRECTINSETITEXT ; entry $077, lpch 7 (Plus,SE,II)
dcROM AFTERBSRDOCOMPACTINGOCONT ; entry $078, lpch 7 (Plus,SE,II)
dcROM COMPACTMEM ; entry $079, lpch 7 (Plus,SE,II)
dcROM MOVEREST ; entry $07a, lpch 7 (Plus,SE,II)
dcROM FILLSTKBUF ; entry $07b, lpch 7 (Plus,SE,II)
dcROM DOCOMPACT ; entry $07c, lpch 7 (Plus,SE,II)
dcROM FINDRGNTOP ; entry $07d, lpch 7 (Plus,SE,II)
dcROM MNSFINISH ; entry $07e, lpch 7 (Plus,SE,II)
dcROM CKDRVNUM ; entry $07f, lpch 7 (Plus,SE,II)
dcROM SEEK ; entry $080, lpch 7 (Plus,SE,II)
dcROM AFTERLOADRESOURCEINCALLWINDOW ; entry $081, lpch 7 (Plus,SE,II)
dcROM ROMSTDPOLYRTN ; entry $082, lpch 8 (Portable)
dcROM ROMSTDPOLYNOTPIC ; entry $083, lpch 8 (Portable)
dcROM SOMESLEEPPROC ; entry $084, lpch 8 (Portable)
dcROM ALLCLOSE ; entry $085, lpch 8 (Portable)
dcROM INITSCSI ; entry $086, lpch 8 (Portable)
dcROM KBDRESET ; entry $087, lpch 8 (Portable)
dcROM DOQUEUE ; entry $088, lpch 8 (Portable)
dcROM GETDRIVE ; entry $089, lpch 8 (Portable)
dcROM INVALTRKCACHE ; entry $08a, lpch 8 (Portable)
dcROM SETCHIPMODE ; entry $08b, lpch 8 (Portable)
dcROM ADRANDSTRB ; entry $08c, lpch 8 (Portable)
dcROM RECALSLOW ; entry $08d, lpch 8 (Portable)
dcROM ADRANDSENSE ; entry $08e, lpch 8 (Portable)
dcROM PULSE ; entry $08f, lpch 8 (Portable)
dcROM WAIT100 ; entry $090, lpch 8 (Portable)
dcROM ROMStdRgnRtn ; entry $091, lpch 10 (SE,Portable)
dcROM ROMStdRgnNotPic ; entry $092, lpch 10 (SE,Portable)
dcROM ROMTrimRect ; entry $093, lpch 11 (Plus,SE,Portable)
dcROM ROMRSect ; entry $094, lpch 11 (Plus,SE,Portable)
dcROM ROMDPUTPICBYTE ; entry $095, lpch 11 (Plus,SE,Portable)
dcROM ROMPUTPICRGN ; entry $096, lpch 11 (Plus,SE,Portable)
dcROM ROMXRGNBLT ; entry $097, lpch 11 (Plus,SE,Portable)
dcROM ROMSETUPSTRETCH ; entry $098, lpch 11 (Plus,SE,Portable)
dcROM ROMBACKTOROM ; entry $099, lpch 11 (Plus,SE,Portable)
dcROM ROMPUTPICDATA ; entry $09a, lpch 11 (Plus,SE,Portable)
dcROM ROMPUTPICWORD ; entry $09b, lpch 11 (Plus,SE,Portable)
dcROM ROMPUTPICLONG ; entry $09c, lpch 11 (Plus,SE,Portable)
dcROM ROMPUTPICBYTE ; entry $09d, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDBITSNOTPIC ; entry $09e, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDBITSOK ; entry $09f, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDBITSSTART2 ; entry $0a0, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDRECTRTN ; entry $0a1, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDRECTNOTPIC ; entry $0a2, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDLINERTN ; entry $0a3, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDLINENOTPIC ; entry $0a4, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDRRECTRTN ; entry $0a5, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDRRECTNOTPIC ; entry $0a6, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDOVALRTN ; entry $0a7, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDOVALNOTPIC ; entry $0a8, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDARCRTN ; entry $0a9, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDARCNOTPIC ; entry $0aa, lpch 11 (Plus,SE,Portable)
dcROM ROMSTDCOMMENT ; entry $0ab, lpch 11 (Plus,SE,Portable)
dcROM ROMEQUALRGN ; entry $0ac, lpch 11 (Plus,SE,Portable)
dcROM ROMCOPYRGN ; entry $0ad, lpch 11 (Plus,SE,Portable)
dcROM OPENPICTPTCHENTRY ; entry $0ae, lpch 11 (Plus,SE,Portable)
dcROM OPENPICTDONE ; entry $0af, lpch 11 (Plus,SE,Portable)
dcROM CLOSEPICTPTCHENTRYNEW ; entry $0b0, lpch 11 (Plus,SE,Portable)
dcROM CLOSEPICTGOHOME ; entry $0b1, lpch 11 (Plus,SE,Portable)
dcROM ROMSHOWCRSR ; entry $0b2, lpch 11 (Plus,SE,Portable)
dcROM ROMSEEDFILL ; entry $0b3, lpch 11 (Plus,SE,Portable)
dcROM ROMGOHOME ; entry $0b4, lpch 11 (Plus,SE,Portable)
dcROM ROMXCLIP ; entry $0b5, lpch 11 (Plus,SE,Portable)
dcROM ROMXCLIP2 ; entry $0b6, lpch 11 (Plus,SE,Portable)
dcROM ROMXPNSIZE ; entry $0b7, lpch 11 (Plus,SE,Portable)
dcROM OVALEND ; entry $0b8, lpch 11 (Plus,SE,Portable)
dcROM XORIGIN ; entry $0b9, lpch 11 (Plus,SE,Portable)
dcROM ROMLNOK ; entry $0ba, lpch 11 (Plus,SE,Portable)
dcROM ROMTEXTOP ; entry $0bb, lpch 11 (Plus,SE,Portable)
dcROM ROMRECTOP ; entry $0bc, lpch 11 (Plus,SE,Portable)
dcROM ROMRRECTOP ; entry $0bd, lpch 11 (Plus,SE,Portable)
dcROM ROMOVALOP ; entry $0be, lpch 11 (Plus,SE,Portable)
dcROM ROMARCOP ; entry $0bf, lpch 11 (Plus,SE,Portable)
dcROM ROMPOLYOP ; entry $0c0, lpch 11 (Plus,SE,Portable)
dcROM ROMRGNOP ; entry $0c1, lpch 11 (Plus,SE,Portable)
dcROM ROMBITS ; entry $0c2, lpch 11 (Plus,SE,Portable)
dcROM ROMCOMMENTOP ; entry $0c3, lpch 11 (Plus,SE,Portable)
dcROM ROMLONGCOM ; entry $0c4, lpch 11 (Plus,SE,Portable)
dcROM ROMGETRECT ; entry $0c5, lpch 11 (Plus,SE,Portable)
dcROM ROMKILL1 ; entry $0c6, lpch 11 (Plus,SE,Portable)
dcROM ROMABORT ; entry $0c7, lpch 11 (Plus,SE,Portable)
dcROM ROMDONE ; entry $0c8, lpch 11 (Plus,SE,Portable)
dcROM AFTERTEAUTOVIEWINSETNEWEDIT ; entry $0c9, lpch 11 (Plus,SE,Portable)
dcROM AFTERLOADRESOURCEINSYSTEMCLICK ; entry $0ca, lpch 15 (Plus,SE,II,Portable)
dcROM RWPOWERUP ; entry $0cb, lpch 15 (Plus,SE,II,Portable)
dcROM BACKTOGETCSTRING ; entry $0cc, lpch 16 (IIci)
dcROM THEDONELABEL ; entry $0cd, lpch 16 (IIci)
dcROM ROM@GETSELWRAP ; entry $0ce, lpch 16 (IIci)
dcROM ROM@FINDLINEFINIS ; entry $0cf, lpch 16 (IIci)
dcROM ROMINFINDLINE ; entry $0d0, lpch 16 (IIci)
dcROM ROM@SETUP ; entry $0d1, lpch 16 (IIci)
dcROM ROMGETCURSTYLE ; entry $0d2, lpch 16 (IIci)
dcROM ROMSETSTYLE ; entry $0d3, lpch 16 (IIci)
dcROM ROMTEHITTESTHOOK ; entry $0d4, lpch 16 (IIci)
dcROM ROMPIXEL2CHAR ; entry $0d5, lpch 16 (IIci)
dcROM ROMFINDWORD ; entry $0d6, lpch 16 (IIci)
dcROM ROMTEEOLHOOK ; entry $0d7, lpch 16 (IIci)
dcROM ROMANYNULLSTYLE ; entry $0d8, lpch 16 (IIci)
dcROM ROMGETSTYLE ; entry $0d9, lpch 16 (IIci)
dcROM ROMSETRSRVED ; entry $0da, lpch 16 (IIci)
dcROM ROM@DONEINKEYBD2FONT ; entry $0db, lpch 16 (IIci)
dcROM ROMGETDIRECTION ; entry $0dc, lpch 16 (IIci)
dcROM ROM@FIXSTACK ; entry $0dd, lpch 16 (IIci)
dcROM ROM@USEC2P ; entry $0de, lpch 16 (IIci)
dcROM ROMDOUBLEBYTE ; entry $0df, lpch 16 (IIci)
dcROM ROMDEFWORDBRK ; entry $0e0, lpch 16 (IIci)
dcROM ENDTEINIT ; entry $0e1, lpch 16 (IIci)
dcROM ROM@NOMORESTYLES ; entry $0e2, lpch 16 (IIci)
dcROM ROM@BAILTOLEFT ; entry $0e3, lpch 16 (IIci)
dcROM ROMAFTER@HITIT ; entry $0e4, lpch 16 (IIci)
dcROM ROMFINDDONE ; entry $0e5, lpch 16 (IIci)
dcROM ROMTEDRAWHOOK ; entry $0e6, lpch 16 (IIci)
dcROM ROMFREEFMTORDERARRAY ; entry $0e7, lpch 16 (IIci)
dcROM ROMINDOHILITE ; entry $0e8, lpch 16 (IIci)
dcROM ROMPREAMBLE ; entry $0e9, lpch 16 (IIci)
dcROM ROMPTRTOLINE ; entry $0ea, lpch 16 (IIci)
dcROM ROMNEXTLINERECT ; entry $0eb, lpch 16 (IIci)
dcROM ROMPREPLINE ; entry $0ec, lpch 16 (IIci)
dcROM ROMINVERTHOOK ; entry $0ed, lpch 16 (IIci)
dcROM ROMTESTLINEENDS ; entry $0ee, lpch 16 (IIci)
dcROM ROMSETRUN ; entry $0ef, lpch 16 (IIci)
dcROM ROMENDTEFMTORDER ; entry $0f0, lpch 16 (IIci)
dcROM ROMGETFORMATORDERING ; entry $0f1, lpch 16 (IIci)
dcROM ROMGETLRPOSITION ; entry $0f2, lpch 16 (IIci)
dcROM ROM@DONE ; entry $0f3, lpch 16 (IIci)
dcROM BACKTODOMEASURE ; entry $0f4, lpch 16 (IIci)
dcROM ROM@MEASUREDONE ; entry $0f5, lpch 16 (IIci)
dcROM ROMINMEASUREIT ; entry $0f6, lpch 16 (IIci)
dcROM ROM@PLAINMEASURE ; entry $0f7, lpch 16 (IIci)
dcROM ROMMEASUREWIDTH ; entry $0f8, lpch 16 (IIci)
dcROM ROMTEHILITETEXT ; entry $0f9, lpch 16 (IIci)
dcROM ROM@TESTENDS ; entry $0fa, lpch 16 (IIci)
dcROM BACKTOTESTRUNDIRECTION ; entry $0fb, lpch 16 (IIci)
dcROM ROMFINDLINEHITE ; entry $0fc, lpch 16 (IIci)
dcROM ROMSELVIEW ; entry $0fd, lpch 16 (IIci)
dcROM ROMDRAWCARET ; entry $0fe, lpch 16 (IIci)
dcROM ROMSTDEXIT ; entry $0ff, lpch 16 (IIci)
dcROM ROMALTSETRSRVED ; entry $100, lpch 16 (IIci)
dcROM ROMDELETESTYLE ; entry $101, lpch 16 (IIci)
dcROM ROMCONCATSTYLES ; entry $102, lpch 16 (IIci)
dcROM ENDDELGUTS ; entry $103, lpch 16 (IIci)
dcROM OldPBSoundClose ; entry $104, lpch 16 (IIci)
dcROM OldPBSoundStatus ; entry $105, lpch 16 (IIci)
dcROM ROMEPILOG4 ; entry $106, lpch 16 (IIci)
dcROM ROMSETSTYLSCRAP ; entry $107, lpch 16 (IIci)
dcROM ROMSTDEXIT2 ; entry $108, lpch 16 (IIci)
dcROM ROMTESTYLINSERT ; entry $109, lpch 16 (IIci)
dcROM OldPBSoundControl ; entry $10a, lpch 16 (IIci)
dcROM OldPBSoundPrime ; entry $10b, lpch 16 (IIci)
dcROM OldPBSoundOpen ; entry $10c, lpch 16 (IIci)
dcROM ROMPSTSTYLGUTS ; entry $10d, lpch 16 (IIci)
dcROM ROMCONCATRUNS ; entry $10e, lpch 16 (IIci)
dcROM ROMRECALDRAW ; entry $10f, lpch 16 (IIci)
dcROM ROMINTEDISPATCH ; entry $110, lpch 16 (IIci)
dcROM ROMINTEGETTEXT ; entry $111, lpch 16 (IIci)
dcROM ROMINTESETTEXT ; entry $112, lpch 16 (IIci)
dcROM ROMINTECALTEXT ; entry $113, lpch 16 (IIci)
dcROM ROMINTECOPY ; entry $114, lpch 16 (IIci)
dcROM ROMINTECUT ; entry $115, lpch 16 (IIci)
dcROM ROM@GOHOME ; entry $116, lpch 16 (IIci)
dcROM ROMINTEPASTE ; entry $117, lpch 16 (IIci)
dcROM ROMAFTERINSERT ; entry $118, lpch 16 (IIci)
dcROM ROMMUNGESETUP ; entry $119, lpch 16 (IIci)
dcROM ROMINSRSRVED ; entry $11a, lpch 16 (IIci)
dcROM ROMINTESETJUST ; entry $11b, lpch 16 (IIci)
dcROM ROMGETLINEHITES ; entry $11c, lpch 16 (IIci)
dcROM ROMINTESELVIEW ; entry $11d, lpch 16 (IIci)
dcROM ROMINTEAUTOVIEW ; entry $11e, lpch 16 (IIci)
dcROM ROM@KEYBDOK ; entry $11f, lpch 16 (IIci)
dcROM ROMEPILOG8 ; entry $120, lpch 16 (IIci)
dcROM ROMDRAWIT ; entry $121, lpch 16 (IIci)
dcROM ROMCLEANUPSEL ; entry $122, lpch 16 (IIci)
dcROM ROM@NOSYNCHINSETSELECT ; entry $123, lpch 16 (IIci)
dcROM ROMCLEARRSRVED ; entry $124, lpch 16 (IIci)
dcROM ROMHILITE ; entry $125, lpch 16 (IIci)
dcROM ROMHIDECARET ; entry $126, lpch 16 (IIci)
dcROM ROMCLICKEXPAND ; entry $127, lpch 16 (IIci)
dcROM ROMDOTEXT ; entry $128, lpch 16 (IIci)
dcROM ROMSHOWCARET ; entry $129, lpch 16 (IIci)
dcROM ROMADDRTABLE ; entry $12a, lpch 16 (IIci)
dcROM ROMSELSORT ; entry $12b, lpch 16 (IIci)
dcROM ROMTEFEATUREFLAG ; entry $12c, lpch 16 (IIci)
dcROM ROMTEGETPOINT ; entry $12d, lpch 16 (IIci)
dcROM ROMTESETSTYLE ; entry $12e, lpch 16 (IIci)
dcROM ROMGETHITE ; entry $12f, lpch 16 (IIci)
dcROM ROMGETLINE ; entry $130, lpch 16 (IIci)
dcROM ROMLINERECT ; entry $131, lpch 16 (IIci)
dcROM ROMINTEGETPOINT ; entry $132, lpch 16 (IIci)
dcROM ROM@DOENDOFLINE ; entry $133, lpch 16 (IIci)
dcROM ROM@DOTHEJUSTTHING ; entry $134, lpch 16 (IIci)
dcROM ROMPASTEGUTS ; entry $135, lpch 16 (IIci)
dcROM ROM@MOREROOM ; entry $136, lpch 16 (IIci)
dcROM ROMINGETHANDLE ; entry $137, lpch 16 (IIci)
dcROM ROMONECURSOR ; entry $138, lpch 16 (IIci)
dcROM ROM@LINEEND ; entry $139, lpch 16 (IIci)
dcROM ROM@INRLMIDDLE ; entry $13a, lpch 16 (IIci)
dcROM ROM@RLDONE ; entry $13b, lpch 16 (IIci)
dcROM ROMINSETUP2RECTANGLES ; entry $13c, lpch 16 (IIci)
dcROM ROMFIXFORMATEND ; entry $13d, lpch 16 (IIci)
dcROM ROMMEASUREIT ; entry $13e, lpch 16 (IIci)
dcROM ROM@ROMANTRIM ; entry $13f, lpch 16 (IIci)
dcROM ROMGETNUMSTYLES ; entry $140, lpch 16 (IIci)
dcROM ROM@ZEROWIDTH ; entry $141, lpch 16 (IIci)
dcROM ROM@GOERASE ; entry $142, lpch 16 (IIci)
dcROM ROM@JUSTMEASURE ; entry $143, lpch 16 (IIci)
dcROM ROM@HILITEOFFSETRUN ; entry $144, lpch 16 (IIci)
dcROM ROM@EXIT ; entry $145, lpch 16 (IIci)
dcROM ROM@HILITERUN ; entry $146, lpch 16 (IIci)
dcROM ROMHILITELINEENDS ; entry $147, lpch 16 (IIci)
dcROM ROMXEOLHOOK ; entry $148, lpch 16 (IIci)
dcROM ROMXDRAWHOOK ; entry $149, lpch 16 (IIci)
dcROM ROMGETSIZE ; entry $14a, lpch 16 (IIci)
dcROM ROMSETDIRECTION ; entry $14b, lpch 16 (IIci)
dcROM ROMINTENEW ; entry $14c, lpch 16 (IIci)
dcROM ROMMYNEWHANDLE ; entry $14d, lpch 16 (IIci)
dcROM ROMGETDEFSTYLE ; entry $14e, lpch 16 (IIci)
dcROM ROMINTESTYLNEW ; entry $14f, lpch 16 (IIci)
dcROM ROMFINDLINE ; entry $150, lpch 16 (IIci)
dcROM ROMSTAGE2Y ; entry $151, lpch 16 (IIci)
dcROM ROMSTAGE2A ; entry $152, lpch 16 (IIci)
dcROM ROMCLRLINESTS ; entry $153, lpch 16 (IIci)
dcROM ROMINPTTOLINE ; entry $154, lpch 16 (IIci)
dcROM ROMINDOFIND ; entry $155, lpch 16 (IIci)
dcROM ROMINPINDISPLAY ; entry $156, lpch 16 (IIci)
dcROM ROMINREFRESH ; entry $157, lpch 16 (IIci)
dcROM RONINTEXTBOX ; entry $158, lpch 16 (IIci)
dcROM ROMAFTERGETFINFOINTEXTBOX ; entry $159, lpch 16 (IIci)
dcROM AFTERMOVETOINTEXTBOX ; entry $15a, lpch 16 (IIci)
dcROM ROMGO14EXIT ; entry $15b, lpch 16 (IIci)
dcROM ROMAFTERGETFINFOINGETSIZE ; entry $15c, lpch 16 (IIci)
dcROM ROMINTEDISPOSE ; entry $15d, lpch 16 (IIci)
dcROM AFTERHILITETEXT ; entry $15e, lpch 16 (IIci)
dcROM CHECKDESKHOOK ; entry $15f, lpch 16 (IIci)
dcROM DONESCLICK ; entry $160, lpch 16 (IIci)
dcROM SYSTEMCLICKCONTINUE ; entry $161, lpch 16 (IIci)
dcROM AFTERSETRETRYFLAGINMMHPROLOGUE ; entry $162, lpch 16 (IIci)
dcROM ROMBACKTORESRVMEM24 ; entry $163, lpch 16 (IIci)
dcROM ROMBACKTONEWPTR24 ; entry $164, lpch 16 (IIci)
dcROM ROMBACKTOMOREMASTERS24 ; entry $165, lpch 16 (IIci)
dcROM ROMBACKTOA24HMAKEMOREMASTERS ; entry $166, lpch 16 (IIci)
dcROM ROMA24ACTUALS ; entry $167, lpch 16 (IIci)
dcROM ROMA24GROWZONE ; entry $168, lpch 16 (IIci)
dcROM ROMA24PURGEBLOCK ; entry $169, lpch 16 (IIci)
dcROM ROMSUBTRACTFREE ; entry $16a, lpch 16 (IIci)
dcROM ROMA24ALLOCBK ; entry $16b, lpch 16 (IIci)
dcROM ROMA24GETSIZE ; entry $16c, lpch 16 (IIci)
dcROM ROMHBLOCKMOVE ; entry $16d, lpch 16 (IIci)
dcROM ROMRELEASEMP ; entry $16e, lpch 16 (IIci)
dcROM ROMADJUSTFREE ; entry $16f, lpch 16 (IIci)
dcROM ROMBACKTORESRVMEM32 ; entry $170, lpch 16 (IIci)
dcROM ROMBACKTONEWPTR32 ; entry $171, lpch 16 (IIci)
dcROM ROMBACKTOMOREMASTERS32 ; entry $172, lpch 16 (IIci)
dcROM ROMBACKTOA32HMAKEMOREMASTERS ; entry $173, lpch 16 (IIci)
dcROM ROMA32ACTUALS ; entry $174, lpch 16 (IIci)
dcROM ROMA32GROWZONE ; entry $175, lpch 16 (IIci)
dcROM ROMA32PURGEBLOCK ; entry $176, lpch 16 (IIci)
dcROM ROMA32ALLOCBK ; entry $177, lpch 16 (IIci)
dcROM ROMA32GETSIZE ; entry $178, lpch 16 (IIci)
dcROM SLPQINSTALL ; entry $179, lpch 16 (IIci)
dcROM SLPQREMOVE ; entry $17a, lpch 16 (IIci)
dcROM ROMCHECKAPPLETALK ; entry $17b, lpch 16 (IIci)
dcROM CLOSEAPPLETALK ; entry $17c, lpch 16 (IIci)
dcROM DIDQUEUE ; entry $17d, lpch 16 (IIci)
dcROM SETSUPERVISORMODE ; entry $17e, lpch 16 (IIci)
dcROM BATINTCONT ; entry $17f, lpch 16 (IIci)
dcROM ROMPMGROP ; entry $180, lpch 16 (IIci)
dcROM AFTERFIRSTDISPOSED0 ; entry $181, lpch 16 (IIci)
dcROM AFTERSECONDDISPOSED0 ; entry $182, lpch 16 (IIci)
dcROM AFTEROPENCPORTINNEWGWORLD ; entry $183, lpch 16 (IIci)
dcROM FROMPUTPICPIXPAT ; entry $184, lpch 16 (IIci)
dcROM FROMPUTPMDATA ; entry $185, lpch 16 (IIci)
dcROM AFTERGETSCREENBASEINCOPYBITS ; entry $186, lpch 16 (IIci)
dcROM AFTERCOPYBITSCALLSITSELFTOFLATTEN ; entry $187, lpch 16 (IIci)
dcROM FROMNEWTEMPSCREENBUFFER ; entry $188, lpch 16 (IIci)
dcROM FROMNEWGWORLD ; entry $189, lpch 16 (IIci)
dcROM NEWTEMPSCREENBUFFERPARAMERROR ; entry $18a, lpch 16 (IIci)
dcROM NEWGWORLDPARAMERROR ; entry $18b, lpch 16 (IIci)
dcROM CICLOSEPORTENTRY ; entry $18c, lpch 16 (IIci)
dcROM CIOPENPIXMAP ; entry $18d, lpch 16 (IIci)
dcROM CIINITPIXMAP ; entry $18e, lpch 16 (IIci)
dcROM AFTEROSEVENTAVAILINCHECKACTIVATE ; entry $18f, lpch 16 (IIci)
dcROM AFTERSYSTEMUSERWINDOWINCHECKACTIVATE ; entry $190, lpch 16 (IIci)
dcROM ROMINTERNALRAMDISKSTRING ; entry $191, lpch 16 (IIci)
dcROM CheckPic ; entry $192, lpch 20 (II,IIci)
dcROM PutPicWord ; entry $193, lpch 20 (II,IIci)
dcROM PutPicLong ; entry $194, lpch 20 (II,IIci)
dcROM DPutPicOp ; entry $195, lpch 20 (II,IIci)
dcROM DPutPicByte ; entry $196, lpch 20 (II,IIci)
dcROM PutPicData ; entry $197, lpch 20 (II,IIci)
dcROM GETCVARIANTINCALLCONTROL ; entry $198, lpch 20 (II,IIci)
dcROM OWNERPORTINROM ; entry $199, lpch 20 (II,IIci)
dcROM AFTERDRAGTHERGNINDRAGCONTROL ; entry $19a, lpch 20 (II,IIci)
dcROM AFTERFRAMERECTINFASTPAINT ; entry $19b, lpch 20 (II,IIci)
dcROM AFTERSETCTLCOLORINNEWCONTROL ; entry $19c, lpch 20 (II,IIci)
dcROM AFTERPLOTCICONINDOALERT ; entry $19d, lpch 20 (II,IIci)
dcROM BEGININWIND ; entry $19e, lpch 20 (II,IIci)
dcROM SETUPTEXT ; entry $19f, lpch 20 (II,IIci)
dcROM RESTORETE ; entry $1a0, lpch 20 (II,IIci)
dcROM ENDINWIND ; entry $1a1, lpch 20 (II,IIci)
dcROM DIALOGSTDEXIT ; entry $1a2, lpch 20 (II,IIci)
dcROM AFTERGETRESOURCEINDOCOLOR ; entry $1a3, lpch 20 (II,IIci)
dcROM AFTERPAINTONEINSETWINCOLOR ; entry $1a4, lpch 20 (II,IIci)
dcROM SETGUTSINROM ; entry $1a5, lpch 20 (II,IIci)
dcROM SETCTLCOLORAFTERSETGUTS ; entry $1a6, lpch 20 (II,IIci)
dcROM SETENDINROM ; entry $1a7, lpch 20 (II,IIci)
dcROM AFTERUNIONRGNINSETWTITLE ; entry $1a8, lpch 20 (II,IIci)
dcROM AFTERPAINTONEINSETDESKCPAT ; entry $1a9, lpch 20 (II,IIci)
dcROM OPENSLOTS ; entry $1aa, lpch 20 (II,IIci)
dcROM SYNCCALLRTN2 ; entry $1ab, lpch 22 (SE,II,IIci)
dcROM FMTTRKRET2 ; entry $1ac, lpch 22 (SE,II,IIci)
dcROM EMPTYPD2 ; entry $1ad, lpch 22 (SE,II,IIci)
dcROM AFTERFREEZETIMEINRMVTIME ; entry $1ae, lpch 24 (Portable,IIci)
dcROM MULTANDMERGE ; entry $1af, lpch 24 (Portable,IIci)
dcROM AFTERFREEZETIMEINPRIMETIME ; entry $1b0, lpch 24 (Portable,IIci)
dcROM AFTERFREEZETIMEINTIMER2INT ; entry $1b1, lpch 24 (Portable,IIci)
dcROM AFTERNMTASKINSYSTEMTASK ; entry $1b2, lpch 24 (Portable,IIci)
dcROM AFTERLOADRESOURCEINCALLMDEFPROC ; entry $1b3, lpch 24 (Portable,IIci)
dcROM AFTERCALLTOMDEFINCALLMDEFPROC ; entry $1b4, lpch 24 (Portable,IIci)
dcROM PMGRRECV ; entry $1b5, lpch 24 (Portable,IIci)
dcROM PMGRSEND ; entry $1b6, lpch 24 (Portable,IIci)
dcROM GETLEVEL ; entry $1b7, lpch 24 (Portable,IIci)
dcROM REMOVEMSG ; entry $1b8, lpch 24 (Portable,IIci)
dcROM INSTALLMSG ; entry $1b9, lpch 24 (Portable,IIci)
dcROM FROMDRAWARC ; entry $1ba, lpch 27 (Plus,SE,Portable,IIci)
dcROM ROMGETA0LIST ; entry $1bb, lpch 28 (II,Portable,IIci)
dcROM ROMGETMENUPTR ; entry $1bc, lpch 28 (II,Portable,IIci)
dcROM ROMGETITEMRECORD ; entry $1bd, lpch 28 (II,Portable,IIci)
dcROM ROMUPCHAR ; entry $1be, lpch 28 (II,Portable,IIci)
dcROM ROMGOTMKEY ; entry $1bf, lpch 28 (II,Portable,IIci)
dcROM ROMKEYNOTFOUND ; entry $1c0, lpch 28 (II,Portable,IIci)
dcROM ROMGETHA0LIST ; entry $1c1, lpch 28 (II,Portable,IIci)
dcROM ROMGETHINDEX ; entry $1c2, lpch 28 (II,Portable,IIci)
dcROM AFTERUPRSTRINGINUPCHAR ; entry $1c3, lpch 28 (II,Portable,IIci)
dcROM ClearASCInt ; entry $1c4, lpch 28 (II,Portable,IIci)
dcROM DisableASCInts ; entry $1c5, lpch 28 (II,Portable,IIci)
dcROM EnableASCInts ; entry $1c6, lpch 28 (II,Portable,IIci)
dcROM SEEKCK ; entry $1c7, lpch 30 (SE,II,Portable,IIci)
dcROM INITADBDRVR ; entry $1c8, lpch 30 (SE,II,Portable,IIci)
dcROM ALLOCFAKERGNS ; entry $1c9, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM SCSILOAD ; entry $1ca, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FLUSHVFILES ; entry $1cb, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMCACHERDIP ; entry $1cc, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMCHKNODE ; entry $1cd, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMLOCREC ; entry $1ce, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMBUILDKEY ; entry $1cf, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMFSQUEUE ; entry $1d0, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMDTRMV3 ; entry $1d1, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMEXTOFFLINCK ; entry $1d2, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMCMDDONE ; entry $1d3, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMBTDELETE ; entry $1d4, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMLOCCNODE ; entry $1d5, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMBTUPDATE ; entry $1d6, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMUPDVCNTS ; entry $1d7, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMMARKVCB ; entry $1d8, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMCMFLUSH ; entry $1d9, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMBTINSERT ; entry $1da, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMLOCCREC ; entry $1db, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMUPDRTCNTS ; entry $1dc, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMUPDCNAME ; entry $1dd, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMGT1STFCB ; entry $1de, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMGTNXTFCB ; entry $1df, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMFSQUEUESYNC ; entry $1e0, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMCKFILMOD ; entry $1e1, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMTFSVCBTST ; entry $1e2, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMCHGMFLLOCK ; entry $1e3, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMCMUPDATECN ; entry $1e4, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERSYSERRORINDSHOOK ; entry $1e5, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM DSEXIT ; entry $1e6, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM DTRMV2 ; entry $1e7, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERVOLCHECKINRENAME ; entry $1e8, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM RNMVOL1 ; entry $1e9, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMCVFLGS ; entry $1ea, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM RNMVOL@70 ; entry $1eb, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMDTRMV1 ; entry $1ec, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM CMRENAMECN ; entry $1ed, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERCMGETCNINRENAME ; entry $1ee, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMPOPCNAME ; entry $1ef, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERCMSETUPINCMCREATECN ; entry $1f0, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERCMSETUPINCMUPDATECN ; entry $1f1, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERCMSETUPINCMDELETECN ; entry $1f2, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERCMSETUPINCMMOVECN ; entry $1f3, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERCMSETUPINCMRENAMECN ; entry $1f4, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERCMRENAMECNINRENAME ; entry $1f5, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FOPEN1 ; entry $1f6, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMFINDDRIVE ; entry $1f7, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM MARKVCBDIRTY ; entry $1f8, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FLUSHMDB ; entry $1f9, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM OLDMTVOLAFTERFSQUEUE ; entry $1fa, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMCKEXTFS ; entry $1fb, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM EJECTIT ; entry $1fc, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM OFFLINEEJECTCALLSMFSFLUSH ; entry $1fd, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM OFFLINEEJECTCALLSFLUSHBUFFERS ; entry $1fe, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FLUNMNTAFTERMFSCHECK ; entry $1ff, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FLUNMNTCALLSFLUSHBUFFERS ; entry $200, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FCLOSE ; entry $201, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM DSPOSVBLKS ; entry $202, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM DSPOSVCB ; entry $203, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMBTGETRECORD ; entry $204, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMBTSEARCH ; entry $205, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMXFFLUSH ; entry $206, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMGT1STWDCB ; entry $207, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMFNDFILNAME ; entry $208, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMGTNXTWDCB ; entry $209, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMFILLWDCB ; entry $20a, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMFLUSHCACHE ; entry $20b, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMGT1STMATCH ; entry $20c, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMGTNXTMATCH ; entry $20d, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERTRUNCATEFILE ; entry $20e, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMPUSHCNAME ; entry $20f, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMLOCBTCB ; entry $210, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMROTATELT ; entry $211, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMSPLITLT ; entry $212, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMUPDDREC ; entry $213, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMCMGETCN ; entry $214, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMINITNODE ; entry $215, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMBUILDIREC ; entry $216, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMGETMAXKEY ; entry $217, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMINSERTREC ; entry $218, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMBTSETUP ; entry $219, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMTREESEARCH ; entry $21a, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMDELETEREC ; entry $21b, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMGETLTSIB ; entry $21c, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMGETRTSIB ; entry $21d, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMLOCTPR ; entry $21e, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMGETRECA ; entry $21f, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMUPDIKEY ; entry $220, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMCMSETUP ; entry $221, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMCLRNODE ; entry $222, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMBTCLEANUP ; entry $223, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM MTVOLOK ; entry $224, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FIXPTSTDENTRY ; entry $225, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ATLABEL2INFIXATAN ; entry $226, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM GOTSTVISINSETCTITLE ; entry $227, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERSETHANDLESIZEINSETCTITLE ; entry $228, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ERASECONTROLINDISPOSECONTROL ; entry $229, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERERASECONTROLINDISPOSECONTROL ; entry $22a, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM SYSEVTAFTERFRONTWINDOW ; entry $22b, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM SYSEVTDONESEVT ; entry $22c, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM SEARCHWINDOW ; entry $22d, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERFRONTWINDOWINSYSTEMCLICK ; entry $22e, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERTRACKGOAWAYINSYSTEMCLICK ; entry $22f, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM CLAIMEVENT ; entry $230, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FRAMEOUT ; entry $231, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM DIALOGSTDENTRY ; entry $232, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMINITDIALOGCONTINUE ; entry $233, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMISDIACLAIMEVENT ; entry $234, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ISDIAAFTERCLAIMEVENT ; entry $235, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ISDIANOTDLGEXIT ; entry $236, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM DSAFTERCLAIMEVENT ; entry $237, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM DSNOTMINEEXIT ; entry $238, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM TEKEYFROMEVENTAD ; entry $239, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERH2HINDOSTATIC ; entry $23a, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMSKIPPARAM ; entry $23b, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM STD1ENTRY ; entry $23c, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM REFHANDLE ; entry $23d, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM RRENTRY6 ; entry $23e, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM RDDATA ; entry $23f, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM RSTDEXIT ; entry $240, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM WRDATA ; entry $241, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM SPACEAT ; entry $242, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM SAVEREGS ; entry $243, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM CHECKGROWAT1 ; entry $244, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ADDNEWREFWITHOUTUPDATE ; entry $245, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ADDNAME ; entry $246, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM STDZENTRY ; entry $247, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERSTDZENTRYINCREATERESFILE ; entry $248, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMOPENRFPERM ; entry $249, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERCREATEINCREATERESFILE ; entry $24a, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTEROPENRFINORFCOMMON ; entry $24b, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERSETEOFINCHECKGROW ; entry $24c, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERSETHANDLESIZEINRESIZEMAP ; entry $24d, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERRESIZEMAPINRMVENAME ; entry $24e, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM GETRSRCCNT ; entry $24f, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AT9INRMVENAME ; entry $250, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM DOPUTAPPENDMEM ; entry $251, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM PUTSCRAPEXIT ; entry $252, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM DOPUTAPPENDFILE ; entry $253, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM SYNCCALLRTN ; entry $254, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FMTTRKRET ; entry $255, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM EMPTYPD ; entry $256, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERGETMOUSEINGETNEXTEVENT ; entry $257, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERGETRESOURCEINTRYFKEY ; entry $258, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTEROSEVENTAVAILINGETNEXTEVENT ; entry $259, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERGETOSEVENTINGETNEXTEVENT ; entry $25a, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERKILLCONTROLSINCLOSEWINDOW ; entry $25b, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERSHOWHIDEINSHOWWINDOW ; entry $25c, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FROMPAINTONE ; entry $25d, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM TESTCLIP ; entry $25e, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERCLIPABOVE ; entry $25f, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FROMDRAGWINDOW ; entry $260, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM CLIPGABOVE ; entry $261, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM NOBTF0 ; entry $262, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM STARTROMWMGR ; entry $263, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ENDROMWMGR ; entry $264, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FROMSELECTWINDOW ; entry $265, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM BTF1 ; entry $266, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM MAKEDEACTIVE ; entry $267, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM POSTDOACTIVATE ; entry $268, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM PRESKIPUNHILITE ; entry $269, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FROMBTF1 ; entry $26a, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FROMGETNEWWIND ; entry $26b, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM FROMGETADHNDL ; entry $26c, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM CALLWINDOW ; entry $26d, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM CALLWCALC ; entry $26e, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM INSERTWINDOW ; entry $26f, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM NODESKHOOK ; entry $270, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM IVALCOMMON ; entry $271, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERSECTRGNINGOPAINTONE ; entry $272, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM SKIPERASEINROM ; entry $273, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ERASEINROM ; entry $274, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERPAINTBEHINDINDRAWNEW ; entry $275, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERPAINTBEHINDINSENDBEHIND ; entry $276, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERPAINTONEINMOVEWINDOW ; entry $277, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERPAINTONEINBRINGTOFRONT ; entry $278, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERPENMODEINDRAGTHERGN ; entry $279, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM AFTERCALCVBEHINDINSENDBEHIND ; entry $27a, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM ROMGETRSRCCNT ; entry $27b, lpch 31 (Plus,SE,II,Portable,IIci)
dcROM SWAPROMMAP ; entry $27c, lpch 31 (Plus,SE,II,Portable,IIci)

551
Make/System.make Normal file
View File

@ -0,0 +1,551 @@
#
# Hacks to match MacOS (most recent first):
#
# <Sys7.1> 8/3/92 Written from scratch to replace missing makefile
#
SysVersMajor = 7 # 0-99
SysVersMinor = 1 # 0-9
SysVersBugfix = 0 # 0-9
SysVersStage = final # develop/alpha/beta/final=release (only first letter counted)
SysVersPre = 0 # 0-255
LangInt = 0 # 0=US
# Built-in Video Monitors (cdev) Extension for IIci and IIsi
VidExtVers = 1.0.1
# Directory variables for source code (trailing : essential)
BuildDir = {Sources}BuildResults:System:
ImageDir = {BuildDir}Image:
RsrcDir = {BuildDir}Rsrc:
LibDir = {BuildDir}Lib:
ObjDir = {BuildDir}Obj:
TextDir = {BuildDir}Text:
IfObjDir = {ObjDir}Interface:
MakeDir = {Sources}Make:
ResourceDir = {Sources}Resources:
DeclDir = {Sources}DeclData:
ToolDir = {Sources}Tools:
ToolSrcDir = {Sources}Tools:ToolSource:
MiscDir = {Sources}Misc:
TidbitsDir = {Sources}Tidbits:
DriverDir = {Sources}Drivers:
PatchDir = {Sources}Patches:
LinkPatchDir = {Sources}LinkedPatches:
ProcessMgrDir = {Sources}ProcessMgr:
# Directory variables for Asm/C/Pascal/Rez headers
AIncludes = {Sources}Interfaces:AIncludes:
CIncludes = {Sources}Interfaces:CIncludes:
PInterfaces = {Sources}Interfaces:PInterfaces:
RIncludes = {Sources}Interfaces:RIncludes:
IntAIncludes = {Sources}Internal:Asm:
IntCIncludes = {Sources}Internal:C:
IntPInterfaces = {Sources}Internal:Pascal:
IntRIncludes = {Sources}Internal:Rez:
Libraries = {Sources}Libs:Libraries:
CLibraries = {Sources}Libs:CLibraries:
PLibraries = {Sources}Libs:PLibraries:
# Resource and Rez files included by Sys.r into the System file
SystemResourceFiles = ∂
{MiscDir}APTK57.rsrc ∂
{MiscDir}SystemSounds.r ∂
{MiscDir}VM.rsrc ∂
{OSDir}Keyboard:Kbd.r ∂
{RsrcDir}AliasMgr.rsrc ∂
{RsrcDir}AppleEventMgr.rsrc ∂
{RsrcDir}Backlight.rsrc ∂
{RsrcDir}BalloonPack.a.rsrc ∂
{RsrcDir}BeforePatches.a.rsrc ∂
{RsrcDir}BootAlerts.a.rsrc ∂
{RsrcDir}BootBlocks.a.rsrc ∂
{RsrcDir}BootCode.a.rsrc ∂
{RsrcDir}BuiltInVideoExtension.p.rsrc ∂
{RsrcDir}ButtonCDEF.a.rsrc ∂
{RsrcDir}Choose.p.rsrc ∂
{RsrcDir}Choose.r.rsrc ∂
{RsrcDir}ChooseHelp.r.rsrc ∂
{RsrcDir}ColorPicker.p.rsrc ∂
{RsrcDir}CommResourceMgr.c.rsrc ∂
{RsrcDir}CommToolboxINIT.r.rsrc ∂
{RsrcDir}CommToolboxLDEF.p.rsrc ∂
{RsrcDir}CommToolboxUtilities.c.rsrc ∂
{RsrcDir}ConnectionMgr.c.rsrc ∂
{RsrcDir}DAHandler.rsrc ∂
{RsrcDir}DeCompressDefProc.a.rsrc ∂
{RsrcDir}DeCompressDefProc1.a.rsrc ∂
{RsrcDir}DictionaryMgr.a.rsrc ∂
{RsrcDir}DiskCache.a.rsrc ∂
{RsrcDir}DiskInit.rsrc ∂
{RsrcDir}DITL.p.rsrc ∂
{RsrcDir}EditionMgr.rsrc ∂
{RsrcDir}FileTransferMgr.c.rsrc ∂
{RsrcDir}GenericIcons.rsrc ∂
{RsrcDir}Gestalt.rsrc ∂
{RsrcDir}GreggyBitsDefProc.a.rsrc ∂
{RsrcDir}IconLDEF.a.rsrc ∂
{RsrcDir}IconUtils.rsrc ∂
{RsrcDir}International.rsrc ∂
{RsrcDir}InternationalPACK.a.rsrc ∂
{RsrcDir}itl4Roman.a.rsrc ∂
{RsrcDir}KbdInstall.a.rsrc ∂
{RsrcDir}LayerWDEF.c.rsrc ∂
{RsrcDir}LinkedPatches.rsrc ∂
{RsrcDir}LinkedPatchLoader.a.rsrc ∂
{RsrcDir}ListMgrPACK.a.rsrc ∂
{RsrcDir}MACE3.c.rsrc ∂
{RsrcDir}MACE6.c.rsrc ∂
{RsrcDir}Meter.c.rsrc ∂
{RsrcDir}mNote.c.rsrc ∂
{RsrcDir}mSamp.c.rsrc ∂
{RsrcDir}mWave.c.rsrc ∂
{RsrcDir}Note.c.rsrc ∂
{RsrcDir}ParityINIT.a.rsrc ∂
{RsrcDir}PartySamp.c.rsrc ∂
{RsrcDir}PatchIIciROM.a.rsrc ∂
{RsrcDir}PatchIIROM.a.rsrc ∂
{RsrcDir}PatchPlusROM.a.rsrc ∂
{RsrcDir}PatchPortableROM.a.rsrc ∂
{RsrcDir}PatchSEROM.a.rsrc ∂
{RsrcDir}PictButtonCDEF.a.rsrc ∂
{RsrcDir}PictUtilities.rsrc ∂
{RsrcDir}PictWhap.a.rsrc ∂
{RsrcDir}PictWhapSound.rsrc ∂
{RsrcDir}PopupCDEF.c.rsrc ∂
{RsrcDir}PopupCDEFMDEF.a.rsrc ∂
{RsrcDir}PopupTriangle.r.rsrc ∂
{RsrcDir}PPCBrowser.a.rsrc ∂
{RsrcDir}PreventSwitchLaunch.a.rsrc ∂
{RsrcDir}PrintDriver.a.rsrc ∂
{RsrcDir}QDciPatchROM.a.rsrc ∂
{RsrcDir}QuickDrawPatchII.rsrc ∂
{RsrcDir}RomanITL2.a.rsrc ∂
{RsrcDir}RoundedWDEF.a.rsrc ∂
{RsrcDir}ROvr.a.rsrc ∂
{RsrcDir}Scheduler.rsrc ∂
{RsrcDir}ScriptMgrExtensions.rsrc ∂
{RsrcDir}ScriptMgrPatch.rsrc ∂
{RsrcDir}ScriptMgrROMPatch.rsrc ∂
{RsrcDir}ScrollBarCDEF.a.rsrc ∂
{RsrcDir}SinDrvr.a.rsrc ∂
{RsrcDir}SinHighLevel.rsrc ∂
{RsrcDir}SnarfMan.a.rsrc ∂
{RsrcDir}SnthLoading.rsrc ∂
{RsrcDir}SoundInputProc.rsrc ∂
{RsrcDir}SoundPFDProc.rsrc ∂
{RsrcDir}StandardFile.rsrc ∂
{RsrcDir}StandardMBDF.a.rsrc ∂
{RsrcDir}StandardMDEF.a.rsrc ∂
{RsrcDir}StandardNBP.p.rsrc ∂
{RsrcDir}StandardNBP.r.rsrc ∂
{RsrcDir}StandardNBPHelp.r.rsrc ∂
{RsrcDir}StandardNBPLDEF.p.rsrc ∂
{RsrcDir}StandardWDEF.a.rsrc ∂
{RsrcDir}StartSystem.a.rsrc ∂
{RsrcDir}SystemFonts.rsrc ∂
{RsrcDir}TerminalClick.r.rsrc ∂
{RsrcDir}TerminalMgr.c.rsrc ∂
{RsrcDir}TextLDEF.a.rsrc ∂
{RsrcDir}TFBDriver.a.rsrc ∂
{RsrcDir}UserAlerts.a.rsrc ∂
{RsrcDir}Wave.c.rsrc ∂
{ToolBoxDir}ColorPicker:ColorPicker.r ∂
{ToolBoxDir}ColorPicker:ColorPickerWedge.r ∂
# Object files that make up the (big) 'lpch' resources
LinkedPatchObjs = ∂
{ObjDir}ForceRomBindOrder.a.o ∂
{ObjDir}PatchProtector.a.o ∂
{ObjDir}ProcessManagerSegmentTweaks.a.o ∂
{ObjDir}PatchROMAlarmNotify.a.o ∂
{ObjDir}GestaltExtensions.a.o ∂
{ObjDir}ShutDownMgr.a.o ∂
{ObjDir}HwPriv.a.o ∂
{ObjDir}MMUPatches.a.o ∂
{ObjDir}DispatchHelper.a.o ∂
{ObjDir}VMPatches.a.o ∂
{LibDir}TimeMgr.lib ∂
{LibDir}AliasMgr.lib ∂
{LibDir}SCSI.lib ∂
{LibDir}HFS.lib ∂
{LibDir}FontMgr.lib ∂
{LibDir}BTreeMgr.lib ∂
{LibDir}PPC.lib ∂
{LibDir}NotificationMgr.lib ∂
{LibDir}MenuMgr.lib ∂
{ObjDir}MungerPatches.a.o ∂
{LibDir}SlotMgr.lib ∂
{ObjDir}TextEditPatch.a.o ∂
{ObjDir}TextEditPatchIIciROM.a.o ∂
{LibDir}SoundMgr.lib ∂
{LibDir}IconUtils.lib ∂
{ObjDir}ADBMgrPatch.a.o ∂
{ObjDir}KbdPatches.a.o ∂
{ObjDir}AllBWQDPatch.a.o ∂
{ObjDir}CheckDevicesINIT.a.o ∂
{LibDir}CommToolboxPatch.Lib ∂
{LibDir}ControlMgr.lib ∂
{ObjDir}DeskMgrPatches.a.o ∂
{ObjDir}DeviceLoop.a.o ∂
{LibDir}DialogMgr.lib ∂
{ObjDir}GetMgrPatches.a.o ∂
{ObjDir}LayerMgr.c.o ∂
{ObjDir}MemoryMgrPatches.a.o ∂
{ObjDir}MiscPatches.a.o ∂
{LibDir}ModalDialogMenuPatches.lib ∂
{ObjDir}Mouse.a.o ∂
{ObjDir}OpenResFile.a.o ∂
{ObjDir}PaletteMgrPatches.a.o ∂
{ObjDir}PowerMgrPatches.a.o ∂
{ObjDir}PrintGlue.a.o ∂
{ObjDir}LowMemoryPrintingPatches.a.o ∂
{ObjDir}QuickDrawPatches.a.o ∂
{LibDir}ResourceMgr.lib ∂
{ObjDir}SaveRestoreBits.a.o ∂
{ObjDir}ScrapMgrPatches.a.o ∂
{ObjDir}SegmentLoaderPatches.a.o ∂
{ObjDir}SonyPatches.a.o ∂
{LibDir}ComponentMgr.lib ∂
{LibDir}ToolboxEventMgr.lib ∂
{LibDir}WindowMgr.lib ∂
{ObjDir}backlightpatch.a.o ∂
{ObjDir}BrightnessPatches.a.o ∂
{LibDir}HelpMgr.lib ∂
{LibDir}TextServicesMgr.lib ∂
{ObjDir}FontFolderExtension.a.o ∂
{ObjDir}ResourceOverridePatches.a.o ∂
{ObjDir}EDiskLocalNamePatch.a.o ∂
{ObjDir}LateLoad.a.o ∂
{CLibraries}StdCLib.o ∂
{IfObjDir}interface.o ∂
{Libraries}Runtime.o ∂
{ObjDir}FinalInitialization.a.o ∂
# Conditional compilation booleans for Asm/C/Pascal/Rez
Conds = ∂
BlackBirdDebug=FALSE ∂
CubeE=TRUE ∂
DBLite=FALSE ∂
forADBKeyboards=TRUE ∂
forPDMDebug=FALSE ∂
forPDMProto=FALSE ∂
forROM=FALSE ∂
forRomulator=FALSE ∂
forSmurf=FALSE ∂
forSTPnop=FALSE ∂
hasADBKeyLayouts=TRUE ∂
hasAppleEventMgr=TRUE ∂
hasAsyncSCSI=FALSE ∂
hasBalloonHelp=TRUE ∂
hasBitEdit=FALSE ∂
hasCommToolbox=TRUE ∂
hasDataAccessMgr=TRUE ∂
hasDisplayMgrWindows=FALSE ∂
hasEditionMgr=TRUE ∂
hasEgret=FALSE ∂
hasHMC=FALSE ∂
hasJaws=FALSE ∂
hasLayerlessApps=FALSE ∂
hasManEject=FALSE ∂
hasMMU=FALSE ∂
hasMSC=FALSE ∂
hasNiagra=FALSE ∂
hasNonADBKeyLayouts=TRUE ∂
hasPortableKeyLayouts=FALSE ∂
hasPowerMgr=FALSE ∂
hasPwrControls=TRUE ∂
hasPwrMgrClock=TRUE ∂
hasRISCV0ResMgrPatches=FALSE ∂
hasSlotMgr=TRUE ∂
hasSplineFonts=TRUE ∂
IopADB=FALSE ∂
NewBuildSystem=TRUE ∂
nonSerializedIO=TRUE ∂
padForOverPatch=FALSE ∂
Pre70=FALSE ∂
PwrMgrADB=TRUE ∂
ROMFastTraps=FALSE ∂
Supports24Bit=TRUE ∂
SystemSevenOrLater=TRUE ∂
SystemSixOrLater=TRUE ∂
TheFuture=FALSE ∂
ViaADB=TRUE ∂
# Stop newer MPW versions from using Symantec C
C = C
# Housekeeping defs not to be overriden by the Build script
MAOpts = -d TRUE=1 -d FALSE=0 -d Alignment=4 -d CPU=20 -blksize 62 -w
MCOpts = -d TRUE=1 -d FALSE=0 -d Alignment=4 -d CPU=00 -b3 -mbg off
MPOpts = -mbg off -r -noload # -r suppresses bounds checks, -noload ignores dirty 'unit' resources
# Build all targets if none is specified
All ƒ FeatureSet {BuildDir}System {BuildDir}ProcessMgrINIT
# Shell vars and precompiled headers first (Build script will always specify FeatureSet)
FeatureSet ƒ RealFeatureSet {ObjDir}StandardEqu.d {ObjDir}ProcessMgrIncludes.D
RealFeatureSet ƒ
Set Exit 1
Set StageChar `Echo {SysVersStage} | StreamEdit -d -e "/•r/ Pr 'f'; /•f/ Pr 'f'; /•b/ Pr 'b'; /•a/ Pr 'a'; /•d/ Pr 'd'"`
Set StageHex `Echo {SysVersStage} | StreamEdit -d -e "/•r/ Pr '0x80'; /•f/ Pr '0x80'; /•b/ Pr '0x60'; /•a/ Pr '0x40'; /•d/ Pr '0x20'"`
Set StageInt `Evaluate {StageHex}`
Set VersString `Echo {SysVersMajor}.{SysVersMinor}.{SysVersBugfix}{StageChar}{SysVersPre} | StreamEdit -e "/≈/ Rep /f0∞/ ''; Rep /(≈)®1.0/ ®1"`
Set VersInt `Evaluate 0x{SysVersMajor}{SysVersMinor}{SysVersBugfix}`
Set VersCommon "-d SysVers={VersInt} -d StageInt={StageInt} -d LangInt={LangInt}"
Set FeatureSet "`Echo {Conds} | StreamEdit -e "/≈/ Replace -c ∞ /([A-Za-z0-9]+=[A-Za-z0-9]+)®1/ '-d ' ®1"`" ; Export FeatureSet
Set Commands {ToolDir},{Commands}
Set ObjDir {ObjDir} ; Export ObjDir
Set RsrcDir {RsrcDir} ; Export RsrcDir
Set TextDir {TextDir} ; Export TextDir
Set MiscDir {MiscDir} ; Export MiscDir
Set TidbitsDir {TidbitsDir} ; Export TidbitsDir
Set AIncludes {AIncludes}
Set CIncludes {CIncludes}
Set PInterfaces {PInterfaces}
Set RIncludes {RIncludes}
Set Libraries {Libraries}
Set CLibraries {CLibraries}
Set PLibraries {PLibraries}
Set IntAIncludes {IntAIncludes} ; Export IntAIncludes
Set IntCIncludes {IntCIncludes} ; Export IntCIncludes
Set IntPInterfaces {IntPInterfaces} ; Export IntPInterfaces
Set IntRIncludes {IntRIncludes} ; Export IntRIncludes
Set StdAOpts "{MAOpts} {FeatureSet} -i {IntAIncludes} {AOpts} -i {ObjDir} {VersCommon} -d &SysVersion=∂∂'{VersString}∂∂'"
Set StdCOpts "{MCOpts} {FeatureSet} -i {IntCIncludes} {COpts} -n {VersCommon} -d SYS_VERSION=∂∂'{VersInt}∂∂'"
Set StdCPOpts "{MCPOpts} {FeatureSet} -i {IntCIncludes} {COpts} {VersCommon} -d SYS_VERSION=∂∂'{VersInt}∂∂'"
Set StdPOpts "{MPOpts} {FeatureSet} -i {IntPInterfaces} {POpts}"
Set StdROpts "{MROpts} {FeatureSet} -i {IntRIncludes} {ROpts} -i {RIncludes} {VersCommon} -d SysVersion=∂∂∂"{VersString}∂∂∂" -d LIntVers=0x{SysVersMajor},0x{SysVersMinor}{SysVersBugfix},{StageHex},`Evaluate -h {SysVersPre}`"
Set StdLOpts "-w {LOpts} -mf -t rsrc -c RSED -sg Main"
Set StdLibOpts "-w {LibOpts} -mf"
Set StdAlign "{Align}"
Set StdEquAOpts "-d StandardEquROMFastTraps=0 -d StandardEquSupports24Bit=1" # Compat with new conditionals in SuperMario headers
# For the Build script -- but easier just to trash BuildResults
Clean ƒ
Delete -i `Files -f -r -o -s {BuildDir}` ≥ Dev:Null
# Make's default rules with XOpts replaced by StdXOpts (defined as a Shell variable above)
.a.o ƒ .a
{Asm} {StdAOpts} -o {Targ} {DepDir}{Default}.a
.c.o ƒ .c
{C} {StdCOpts} -o {Targ} {DepDir}{Default}.c
.p.o ƒ .p
{Pascal} {StdPOpts} -o {Targ} {DepDir}{Default}.p
.cp.o ƒ .c
{CPlus} {StdCPOpts} -o {Targ} {DepDir}{Default}.cp
# Bring in other variables and rules
# (MainCode.make is for ROM, but it brings in other stuff)
#include {DriverDir}Drivers.make
#include {MakeDir}MainCode.make
#include {DeclDir}DeclData.make
#include {ResourceDir}Resources.make
#include {ProcessMgrDir}ProcessMgr.make
########################################################################
# Build tools
########################################################################
{RsrcDir}SysDF ƒ {ToolDir}SysDF.c {IfObjDir}Interface.o
C {COpts} -o {ObjDir}SysDF.c.o {ToolDir}SysDF.c
Link -o {Targ} -t 'MPST' -c 'MPS ' {ObjDir}SysDF.c.o {IfObjDir}Interface.o {CLibraries}StdCLib.o {Libraries}Runtime.o
########################################################################
# The System file
########################################################################
# Hacks adapt Sys.r to the changed build system
{BuildDir}System ƒ {ResourceDir}Sys.r {SystemResourceFiles} {PatchDir}LoadPatches.a {RsrcDir}SysDF
Set Misc {MiscDir}; Export Misc
Set ColorPicker {ColorPickerDir}; Export ColorPicker
Set DataAccessMgr {DataAccessDir}; Export DataAccessMgr
Set Keyboard {OSDir}Keyboard:; Export Keyboard
Set RealObjDir {ObjDir}; Set ObjDir {RsrcDir}
Rez {StdROpts} -t zsys -c MACS -d VidExtVers=∂"{VidExtVers}∂" {ResourceDir}Sys.r -o {Targ}
Set ObjDir {RealObjDir}
# Get rid of all the "Main" segment names
#DeRez {Targ} ∂
# | StreamEdit -d -e '/•data ([¬ ]+)®1 ∂(([¬,]+)®2,≈∂"Main∂"/ Print "Change "®1" ("®2") to $$Type ($$Id, $$Attributes);"' ∂
# | Rez -a -o {Targ}
# Compatibility code (and credits) in the data fork
Asm {StdAOpts} -o {ObjDir}LoadPatches.a.o {PatchDir}LoadPatches.a
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {RsrcDir}LoadPatches.a.rsrc {ObjDir}LoadPatches.a.o
{RsrcDir}SysDF {Targ} {RsrcDir}LoadPatches.a.rsrc
########################################################################
# Classical PTCH resources
########################################################################
# Patches and patch installation code for all ROMs (PTCH 0)
{RsrcDir}BeforePatches.a.rsrc ƒ {PatchDir}BeforePatches.a
Asm {StdAOpts} -o {ObjDir}BeforePatches.a.o {PatchDir}BeforePatches.a
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}BeforePatches.a.o
PatchOpts = -d SonyNonPortable -i {PatchDir} -i {GestaltDir} -i {QDPatchesDir} -i {Sources}QuickDraw: -i {DriverDir}Video:
# PTCH $75 (117) for Plus
{ObjDir}PatchPlusROM.a.o ƒ {PatchDir}PatchPlusROM.a
Asm {StdAOpts} {PatchOpts} -o {Targ} {PatchDir}PatchPlusROM.a
{RsrcDir}PatchPlusROM.a.rsrc ƒ {ObjDir}PatchPlusROM.a.o
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}PatchPlusROM.a.o
# PTCH $178 (376) for II
{ObjDir}PatchIIROM.a.o ƒ {PatchDir}PatchIIROM.a
Asm {StdAOpts} {PatchOpts} -o {Targ} {PatchDir}PatchIIROM.a
{RsrcDir}PatchIIROM.a.rsrc ƒ {ObjDir}PatchIIROM.a.o
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}PatchIIROM.a.o
# PTCH $276 (630) for SE
{ObjDir}PatchSEROM.a.o ƒ {PatchDir}PatchSEROM.a
Asm {StdAOpts} {PatchOpts} -o {Targ} {PatchDir}PatchSEROM.a
{RsrcDir}PatchSEROM.a.rsrc ƒ {ObjDir}PatchSEROM.a.o
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}PatchSEROM.a.o
# PTCH $37a (890) for Portable
{ObjDir}PatchPortableROM.a.o ƒ {PatchDir}PatchPortableROM.a
Asm {StdAOpts} {PatchOpts} -o {Targ} {PatchDir}PatchPortableROM.a
{RsrcDir}PatchPortableROM.a.rsrc ƒ {ObjDir}PatchPortableROM.a.o
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}PatchPortableROM.a.o
# PTCH $676 (1660) for IIci
{ObjDir}PatchIIciROM.a.o ƒ {PatchDir}PatchIIciROM.a
Asm {StdAOpts} {PatchOpts} -o {Targ} {PatchDir}PatchIIciROM.a
{RsrcDir}PatchIIciROM.a.rsrc ƒ {ObjDir}PatchIIciROM.a.o
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}PatchIIciROM.a.o
########################################################################
# The LinkedPatch mechanism
########################################################################
# Link LinkPatch, the LinkedPatch linker (object only, no source code!)
{RsrcDir}LinkPatch ƒ {LinkPatchDir}LinkPatchLib.o {ObjDir}LinkPatch.a.o
Link -t MPST -c 'MPS ' -o {Targ} {LinkPatchDir}LinkPatchLib.o {ObjDir}LinkPatch.a.o
# LinkPatch needs to know some constants in LinkedPatchMacros.a
{ObjDir}LinkPatch.a.o ƒ {LinkPatchDir}LinkPatch.a
Asm {StdAOpts} -o {Targ} {LinkPatchDir}LinkPatch.a
# Combine the linked patch objects into one lib...
{LibDir}LinkedPatches.lib ƒ {LinkedPatchObjs}
Lib {StdLibOpts} -o {Targ} {LinkedPatchObjs}
# ...and link them into several 'lpch' resource
{RsrcDir}LinkedPatches.rsrc ƒ {RsrcDir}LinkPatch {LibDir}LinkedPatches.lib
# -l for some table, -v for counts, -p for patches, -w for ?warnings-off
{RsrcDir}LinkPatch -l -w -o {Targ} {LibDir}LinkedPatches.lib > {TextDir}LinkPatchJumpTbl
# Assemble the runtime linked patch loader...
{ObjDir}LinkedPatchLoader.a.o ƒ {LinkPatchDir}LinkedPatchLoader.a
Asm {StdAOpts} -o {Targ} {LinkPatchDir}LinkedPatchLoader.a
# ...and link it into a 'lodr' resource
{RsrcDir}LinkedPatchLoader.a.rsrc ƒ {ObjDir}LinkedPatchLoader.a.o
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}LinkedPatchLoader.a.o
########################################################################
# LinkedPatch objects not built by another makefile
########################################################################
# My hack to ensure byte-perfect lpch builds
{ObjDir}ForceRomBindOrder.a.o ƒ {Sources}Make:ForceRomBindOrder.a
Asm {StdAOpts} -o {Targ} {Sources}Make:ForceRomBindOrder.a
# A patch to SetTrapAddress and GetTrapAddress that “protects” come-from patches
{ObjDir}PatchProtector.a.o ƒ {LinkPatchDir}PatchProtector.a
Asm {StdAOpts} -o {Targ} {LinkPatchDir}PatchProtector.a
# Do smarter loading of Process Manager segments to reduce system heap fragmentation
{ObjDir}ProcessManagerSegmentTweaks.a.o ƒ {PatchDir}ProcessManagerSegmentTweaks.a
Asm {StdAOpts} -o {Targ} {PatchDir}ProcessManagerSegmentTweaks.a
# Patches to backgroung printing when memory is low
{ObjDir}LowMemoryPrintingPatches.a.o ƒ {PatchDir}LowMemoryPrintingPatches.a
Asm {StdAOpts} -o {Targ} {PatchDir}LowMemoryPrintingPatches.a
# Patch Classic .Screen drvr to error on "GetScreenState" status call
{ObjDir}BrightnessPatches.a.o ƒ {PatchDir}BrightnessPatches.a
Asm {StdAOpts} -o {Targ} {PatchDir}BrightnessPatches.a
# RamDisk internal name localizer
{ObjDir}EDiskLocalNamePatch.a.o ƒ {PatchDir}EDiskLocalNamePatch.a
Asm {StdAOpts} -o {Targ} {PatchDir}EDiskLocalNamePatch.a
# Responsible for mounting slow SCSI drives on TERROR machines
{ObjDir}LateLoad.a.o ƒ {TidbitsDir}LateLoad.a
Asm {StdAOpts} -o {Targ} {TidbitsDir}LateLoad.a
# "Secondary initialization" patches
{ObjDir}FinalInitialization.a.o ƒ {PatchDir}FinalInitialization.a
Asm {StdAOpts} -o {Targ} {PatchDir}FinalInitialization.a
########################################################################
# Misc System file resources
########################################################################
# Deep shit alerts for booting
{RsrcDir}BootAlerts.a.rsrc ƒ {TidbitsDir}BootAlerts.a
Asm {StdAOpts} -o {ObjDir}BootAlerts.a.o {TidbitsDir}BootAlerts.a
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}BootAlerts.a.o
# Deep shit alerts (for after booting)
{RsrcDir}UserAlerts.a.rsrc ƒ {TidbitsDir}UserAlerts.a
Asm {StdAOpts} -o {ObjDir}UserAlerts.a.o {TidbitsDir}UserAlerts.a
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}UserAlerts.a.o
# Built-in Video Monitors (cdev) Extension for IIci and IIsi
{RsrcDir}BuiltInVideoExtension.p.rsrc ƒ {TidbitsDir}BuiltInVideoExtension.p
Pascal {StdPOpts} -o {ObjDir}BuiltInVideoExtension.p.o {TidbitsDir}BuiltInVideoExtension.p
Link {StdLOpts} {StdAlign} -m ENTRY -rt RSRC=0 -o {Targ} {ObjDir}BuiltInVideoExtension.p.o {LibraryDir}StandardLib.o {IfObjDir}interface.o
# The standard decompression DefProc
{RsrcDir}DeCompressDefProc.a.rsrc ƒ {PatchDir}DeCompressDefProc.a
Asm {StdAOpts} -o {ObjDir}DeCompressDefProc.a.o {PatchDir}DeCompressDefProc.a
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}DeCompressDefProc.a.o
# The standard decompression defproc for byte sized data
{RsrcDir}DeCompressDefProc1.a.rsrc ƒ {PatchDir}DeCompressDefProc1.a
Asm {StdAOpts} -o {ObjDir}DeCompressDefProc1.a.o {PatchDir}DeCompressDefProc1.a
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}DeCompressDefProc1.a.o
# Decompress defProc for GreggyBits decompression
{RsrcDir}GreggyBitsDefProc.a.rsrc ƒ {PatchDir}GreggyBitsDefProc.a
Asm {StdAOpts} -o {ObjDir}GreggyBitsDefProc.a.o {PatchDir}GreggyBitsDefProc.a
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}GreggyBitsDefProc.a.o
# Code to put up a dialog if we have a parity troubles
{RsrcDir}ParityINIT.a.rsrc ƒ {TidbitsDir}ParityINIT.a
Asm {StdAOpts} -o {ObjDir}ParityINIT.a.o {TidbitsDir}ParityINIT.a
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}ParityINIT.a.o
# FKEY that will save the screen as a PICT file
{RsrcDir}PictWhap.a.rsrc ƒ {TidbitsDir}PictWhap.a
Asm {StdAOpts} -o {ObjDir}PictWhap.a.o {TidbitsDir}PictWhap.a
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}PictWhap.a.o
# Sound resource which is played when FKEY 3 is executed
{RsrcDir}PictWhapSound.rsrc ƒ {TidbitsDir}PictWhapSound.r
Rez {StdROpts} -o {Targ} {TidbitsDir}PictWhapSound.r
# Prevents switch launching from System 6 to System 7
{RsrcDir}PreventSwitchLaunch.a.rsrc ƒ {TidbitsDir}PreventSwitchLaunch.a
Asm {StdAOpts} -o {ObjDir}PreventSwitchLaunch.a.o {TidbitsDir}PreventSwitchLaunch.a
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}PreventSwitchLaunch.a.o
# ROM resource override code
{RsrcDir}ROvr.a.rsrc ƒ {TidbitsDir}ROvr.a
Asm {StdAOpts} -o {ObjDir}ROvr.a.o {TidbitsDir}ROvr.a
Link {StdLOpts} {StdAlign} -rt RSRC=0 -o {Targ} {ObjDir}ROvr.a.o
{RsrcDir}SystemFonts.rsrc ƒ {MiscDir}SystemFonts.r
Rez {StdROpts} -o {Targ} {MiscDir}SystemFonts.r

View File

@ -1,3 +1,10 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Reverted the <SM4> fix.
9/2/94 SuperMario ROM source dump (header preserved below)
*/
/* /*
File: GestaltLookup.c File: GestaltLookup.c
@ -247,7 +254,7 @@ findLong(ulong selector, int* index)
min = 0; min = 0;
max = GestaltPtr->slotsUsed-1; max = GestaltPtr->slotsUsed-1;
do { do {
i = min + ((max - min) >> 1); /* get middle of range */ i = min + ((max - min) > 1); /* get middle of range ex<SM4> <Sys7.1> */
if (tablePtr[i][0] > selector) /* are we too high? (is that possible?) */ if (tablePtr[i][0] > selector) /* are we too high? (is that possible?) */
max = i; max = i;
else if (tablePtr[i][0] < selector) /* are we too low? */ else if (tablePtr[i][0] < selector) /* are we too low? */

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Conditionalized the 'bra fcExit' from <SM4> as forROM (all other SM changes are forROM)
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: DiskCache.a ; File: DiskCache.a
; ;
@ -453,7 +460,6 @@ fcFile MOVEA.L FCBSPtr,A1 ; A1 = FCB ptr
BNE.S @1 ; br if so (go flush) BNE.S @1 ; br if so (go flush)
BTST #noFlushBit,FHFlags(A4) ; avoid intermediate flushes? <08Dec85> BTST #noFlushBit,FHFlags(A4) ; avoid intermediate flushes? <08Dec85>
BEQ.S @1 ; br if not (go flush) <08Dec85> BEQ.S @1 ; br if not (go flush) <08Dec85>
bra.s fcExit ; exit if so (skip flush) <SM4>
IF NOT forROM THEN ; We don't need MacPlus ROM check <SM3> rb <SM4> IF NOT forROM THEN ; We don't need MacPlus ROM check <SM3> rb <SM4>
MOVE.L ROMBase,A3 ;<11Dec86> make sure we have the correct ROM MOVE.L ROMBase,A3 ;<11Dec86> make sure we have the correct ROM
@ -463,6 +469,7 @@ fcFile MOVEA.L FCBSPtr,A1 ; A1 = FCB ptr
BNE.S fcExit ; exit if not (skip flush) <08Dec85> BNE.S fcExit ; exit if not (skip flush) <08Dec85>
ELSE ; <SM3> rb ELSE ; <SM3> rb
; if FlushFlag is 0, then if this file is control file skip flushing ; if FlushFlag is 0, then if this file is control file skip flushing
bra.s fcExit ; exit if so (skip flush) <SM4> <Sys7.1>
ENDIF ; <SM3> rb ENDIF ; <SM3> rb
@1 BSR FlushFCache ; flush the A4 cache @1 BSR FlushFCache ; flush the A4 cache

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM1> by putting back the "ROM" prefixes.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: BTPScan.a ; File: BTPScan.a
; ;
@ -215,7 +222,7 @@ GetMultNodes: proc
MOVE.L D2, fcbCrPs(A3) ; put our current pos back into fcb MOVE.L D2, fcbCrPs(A3) ; put our current pos back into fcb
@RdTop: @RdTop:
jsrRom CACHERDIP ; go do the read jsrRom ROMCACHERDIP ; go do the read ex<SM1><Sys7.1> Put back "ROM"
@1: BNE.S @Exit @1: BNE.S @Exit
ADD.L D6, D5 ; advance current file position ADD.L D6, D5 ; advance current file position
ADD.L D6, ioActCount(A0) ; and tally up bytes read ADD.L D6, ioActCount(A0) ; and tally up bytes read
@ -348,7 +355,7 @@ ValidateNode: proc
MOVE.L A4, D2 ; save PSR around ChkNode MOVE.L A4, D2 ; save PSR around ChkNode
MOVEA.L PSR.btcbPtr(A4), A4 ; A4 = ptr(BTCB) MOVEA.L PSR.btcbPtr(A4), A4 ; A4 = ptr(BTCB)
jsrRom CHKNODE ; is this node valid? jsrRom ROMCHKNODE ; is this node valid? ex<SM1><Sys7.1> Put back "ROM"
MOVEA.L D2, A4 ; restore PSR MOVEA.L D2, A4 ; restore PSR
BNE.S @more ; not valid, get another node BNE.S @more ; not valid, get another node
@ -447,7 +454,7 @@ BTGetPhys: proc
MOVE.W PSR.curRec(A4), D1 ; D1 = record we want MOVE.W PSR.curRec(A4), D1 ; D1 = record we want
ADDQ.W #1, PSR.curRec(A4) ; advance to next record for next time <8> ADDQ.W #1, PSR.curRec(A4) ; advance to next record for next time <8>
MOVEA.L PSR.btcbPtr(A4), A4 ; A4 = ptr(BTCB) MOVEA.L PSR.btcbPtr(A4), A4 ; A4 = ptr(BTCB)
jsrRom LOCREC jsrRom ROMLOCREC ; ex<SM1><Sys7.1> Put back "ROM"
@1: MOVEA.L (A6)+, A4 ; restore PSR ptr @1: MOVEA.L (A6)+, A4 ; restore PSR ptr
@Exit: @Exit:
MOVE.L (A6)+, -(A7) ; restore return address MOVE.L (A6)+, -(A7) ; restore return address

View File

@ -1,3 +1,11 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM1> by putting back the "ROM" prefixes, and de-inlining
; romGtNxt/1stFCB. Reverted <SM2> word branches.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: BTreeFuncs.a ; File: BTreeFuncs.a
; ;
@ -521,8 +529,7 @@ GNMLoop CMP.W D1,D3 ; same FCB?
MOVE.L FCBBTCBptr(A1,D1),D0; D0 = ptr(BTCB)? <12Jan92 #39> MOVE.L FCBBTCBptr(A1,D1),D0; D0 = ptr(BTCB)? <12Jan92 #39>
BNE.S BOpened ; found it <12Jan92 #39> BNE.S BOpened ; found it <12Jan92 #39>
GtNxtMatch ADD.W FSFCBLen,D1 ; go to next FCB <03Feb87><SM1> GtNxtMatch jsrROM ROMGTNXTFCB ; go to next FCB <03Feb87><SM1><Sys7.1> De-inlined and put back "ROM"
CMP.W (A1),D1 ; reached the end yet? <SM1>
BCS.S GNMLoop ; loop thru them all BCS.S GNMLoop ; loop thru them all
;; This is the first time open ;; This is the first time open
@ -619,8 +626,7 @@ xBTClose BCLR #btAsyncBit,D1 ; sync only
BNE.S @NxtMatch ; <28Mar90> BNE.S @NxtMatch ; <28Mar90>
CMP.L FCBVPtr(A1,D1),A3 ; on the same volume? <28Mar90> CMP.L FCBVPtr(A1,D1),A3 ; on the same volume? <28Mar90>
BEQ.S @BCOpened ; found it <28Mar90> BEQ.S @BCOpened ; found it <28Mar90>
@NxtMatch ADD.W FSFCBLen,D1 ; go to next FCB <SM1> @NxtMatch jsrROM ROMGTNXTFCB ; go to next FCB <SM1><Sys7.1> De-inlined and put back "ROM"
CMP.W (A1),D1 ; reached the end yet? <SM1>
BCS.S @BCLoop ; loop thru them all <28Mar90> BCS.S @BCLoop ; loop thru them all <28Mar90>
IF btDebug THEN ; no match ??!! <28Mar90> IF btDebug THEN ; no match ??!! <28Mar90>
@ -871,7 +877,7 @@ xBTGetRec BSR ExtBTQueue
CMP.L BTCWcount(A4),D1 ; validate it CMP.L BTCWcount(A4),D1 ; validate it
BEQ.S @GetRec2 ; OK BEQ.S @GetRec2 ; OK
MOVE.L BTCWcount(A4),ioBTHint1(A3) ; return current Wcount MOVE.L BTCWcount(A4),ioBTHint1(A3) ; return current Wcount
BRA GetExit ; invalid marker <SM2> CSS BRA.S GetExit ; invalid marker <SM2> CSS <Sys7.1>
@2 @2
MOVE.L btcFNode(A4),D2 ; user wants to read the 1st record MOVE.L btcFNode(A4),D2 ; user wants to read the 1st record
@GetRec2 MOVE.L D2,btcNodeM(A4) ; get record in this node, (change the node marker) @GetRec2 MOVE.L D2,btcNodeM(A4) ; get record in this node, (change the node marker)
@ -1077,8 +1083,7 @@ xBTCleanUp
MOVE cbPBufULen(A2),D4 ; D4=ext. FCB unit size MOVE cbPBufULen(A2),D4 ; D4=ext. FCB unit size
LEA fcbPBufData(A2),A2 ; A2=ext. fcb array LEA fcbPBufData(A2),A2 ; A2=ext. fcb array
MOVE FSFCBLen,D5 ; D5=FCB len MOVE FSFCBLen,D5 ; D5=FCB len
MOVE.L FCBSPtr,A1 ; A1=FCB ptr <SM1> jsrROM ROMGT1STFCB ; A1=FCB ptrm, D1=FCB index <SM1><Sys7.1> De-inlined and put back "ROM"
MOVEQ #2,D1 ; D1=FCB index <SM1>
; First close all the open files belong to this process: ; First close all the open files belong to this process:
; A1=FCBptr, A2=Ext. FCBptr, D1.W=RefNum, D2=id2, D3.W=loop index, D4.W=ext FCBlen, ; A1=FCBptr, A2=Ext. FCBptr, D1.W=RefNum, D2=id2, D3.W=loop index, D4.W=ext FCBlen,

View File

@ -1,3 +1,10 @@
#
# Hacks to match MacOS (most recent first):
#
# <Sys7.1> 8/3/92 Gently reordered BTreeMgrObjects.
# 9/2/94 SuperMario ROM source dump (header preserved below)
#
# #
# File: BTreeMgr.make # File: BTreeMgr.make
# #
@ -12,12 +19,12 @@
# <SM1> 12/14/92 CSS Checkout to add BTreeGlue.a build which is required by DictionaryMgr.rsrc. # <SM1> 12/14/92 CSS Checkout to add BTreeGlue.a build which is required by DictionaryMgr.rsrc.
BTreeMgrObjects = "{ObjDir}BTreeAlloc.a.o" ∂ BTreeMgrObjects = "{ObjDir}BTreeFuncs.a.o" ∂
"{ObjDir}BTreeFuncs.a.o" ∂ "{ObjDir}BTreeAlloc.a.o" ∂
"{ObjDir}BTreeMaint1.a.o" ∂ "{ObjDir}BTreeMaint1.a.o" ∂
"{ObjDir}BTreeMaint2.a.o" ∂ "{ObjDir}BTreeMaint2.a.o" ∂
"{ObjDir}BTreeQueue.a.o" "{ObjDir}BTreeSvcs.a.o"
"{ObjDir}BTreeSvcs.a.o" "{ObjDir}BTreeQueue.a.o"
"{LibDir}BTreeMgr.lib" ƒ {BTreeMgrObjects} "{LibDir}BTreeMgr.lib" ƒ {BTreeMgrObjects}

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Re-routed the unused function ExtBTUpdate through the trap table.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: BTreeSvcs.a ; File: BTreeSvcs.a
; ;
@ -1234,6 +1241,9 @@ BSExit1
;__________________________________________________________________________________ ;__________________________________________________________________________________
ExtBTUpdate ExtBTUpdate
MOVE.L jBTUpdate,-(SP) ; jumptable entry for vBTUpdate <25Oct85> <Sys7.1>
RTS ; go there <25Oct85> <Sys7.1>
vExtBTUpdate ; <Sys7.1>
MOVE.L (SP)+,-(A6) ; save return address on A6 stack MOVE.L (SP)+,-(A6) ; save return address on A6 stack
MOVEM.L D1/A0-A1/A4,-(A6) ; save regs MOVEM.L D1/A0-A1/A4,-(A6) ; save regs

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM1> by putting back the "ROM" prefixes.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: CatSearch.a ; File: CatSearch.a
; ;
@ -872,7 +879,7 @@ CheckCSPB proc export
;__________________________________________________________________________________ ;__________________________________________________________________________________
CMCatSearch: proc export CMCatSearch: proc export
jsrRom FSQUEUE ; queue up the request jsrRom ROMFSQUEUE ; queue up the request ex<SM1><Sys7.1> Put back "ROM"
SUBA.W #CSSR.size, A6 ; allocate a CSSR on A6 moved here <1.3> SUBA.W #CSSR.size, A6 ; allocate a CSSR on A6 moved here <1.3>
CLR.B CSSR.flags(A6) ; clear the flags moved here <1.3> CLR.B CSSR.flags(A6) ; clear the flags moved here <1.3>
MOVEA.L A6, A3 ; move CSSR ptr to a safe register <12> MOVEA.L A6, A3 ; move CSSR ptr to a safe register <12>
@ -881,7 +888,7 @@ CMCatSearch: proc export
move.l ioSearchTime(a5), d0 ; get max search time (time mgr count) <12> move.l ioSearchTime(a5), d0 ; get max search time (time mgr count) <12>
bsr StartTimer ; start a timer, if needed, right away <12> bsr StartTimer ; start a timer, if needed, right away <12>
jsrRom DTRMV3 ; find vol using ioNamePtr & ioVRefNum (D023/A234 trashed) jsrRom ROMDTRMV3 ; find vol using ioNamePtr & ioVRefNum (D023/A234 trashed) ex<SM1><Sys7.1> Put back "ROM"
MOVEA.L A6, A3 ; reload pointer to CSSR (doesnt hurt CCs) <12> MOVEA.L A6, A3 ; reload pointer to CSSR (doesnt hurt CCs) <12>
BNE @Exit ; (DtrmV3 puts VCBPtr in A2) BNE @Exit ; (DtrmV3 puts VCBPtr in A2)
MOVE.W vcbSigWord(A2), D0 ; Check out the volume signature MOVE.W vcbSigWord(A2), D0 ; Check out the volume signature
@ -891,7 +898,7 @@ CMCatSearch: proc export
BRA @Exit ; and cruise BRA @Exit ; and cruise
@ItsHFS: @ItsHFS:
jsrRom EXTOFFLINCK ; Is this volume on-line and one of ours? <1.2> jsrRom ROMEXTOFFLINCK ; Is this volume on-line and one of ours? <1.2> ex<SM1><Sys7.1> Put back "ROM"
BEQ.S @VolumeIsCool ; Keep going if so <1.2> BEQ.S @VolumeIsCool ; Keep going if so <1.2>
BRA @Exit ; Go home if not (with extFSErr or volOffLinErr in D0) <1.2> BRA @Exit ; Go home if not (with extFSErr or volOffLinErr in D0) <1.2>
@ -1007,7 +1014,7 @@ CMCatSearch: proc export
@notBufferOnStack: @notBufferOnStack:
ADDA.W #CSSR.size, A6 ; deallocate CSSR ADDA.W #CSSR.size, A6 ; deallocate CSSR
suba.l a3, a3 ; clear WDCB pointer for external file systems <17> suba.l a3, a3 ; clear WDCB pointer for external file systems <17>
jmpRom CMDDONE jmpRom ROMCMDDONE ; ex<SM1><Sys7.1> Put back "ROM"
_CSDebugRts 'CMCatSearch', 0 _CSDebugRts 'CMCatSearch', 0
endproc endproc

View File

@ -1,3 +1,13 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM1> by putting back the "ROM" prefixes and removing the
; copied-in routines. Reverted the branch changes in <SM2> and <SM3>.
; Reverted <SM4> by changing pascalRegs back to interruptRegs (i.e. not
; saving a2/a3/d3).
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: DTDBMgr.a ; File: DTDBMgr.a
; ;
@ -258,213 +268,7 @@ DTKeyDescriptor: proc
proc proc
_DTDebugRts 'DTDBQueueManager', 0 _DTDebugRts 'DTDBQueueManager', 0
endproc endproc
;________________________________________________________________________________ <SM1> ; ex<SM1><Sys7.1> Removed DesktopCloseDownProc, DTDBMgrInit and CheckDesktopSupport
; <36>
; Routine: DesktopCloseDownProc
;
; Inputs param block to _Unmount
;
; Outputs: (none)
;
; Function: Close the desktop database on _Unmount calls
;
;________________________________________________________________________________
; Rolled into TFS.a for SuperMario <SM1> FM
; Called by UnMountVol in TFSVol.a
DesktopCloseDownProc Proc Export
import FindDTVol
@regs reg a0/a1/a3/d0/d1 ; <43>
movem.l @regs, -(sp)
movea.l a0,a3 ; save the user's pb <42>
; d0 - pascal length byte of string <43>
; d1 - size of string allocated on stack <43>
moveq.l #0,d1 ; assume no string on stack <43>
move.l ioNamePtr(a3),d0 ; d0 = callers name ptr <43>
beq.s @noName ; bail on nil <43>
movea.l d0,a0 ; get ready to copy <43>
moveq.l #0,d0 ; clear high bytes <43>
move.b (a0),d0 ; d0 = string length <43>
beq.s @noName ; bail on zero length (d0.l has nil) <43>
move.b d0,d1 ; d1 = copy of string length byte <43>
addq.b #2,d1 ; add length byte and rounding fodder <43>
bclr.l #0,d1 ; make it even <43>
suba.w d1,sp ; allocate a string of the right length <43>
movea.l sp,a1 ; point to it <43>
@1: move.b (a0)+,(a1)+ ; <43>
dbra d0,@1 ; copy string length+1 bytes <43>
move.l sp,d0 ; point to it again <43>
@noName:
suba.w #ioHVQElSize,sp ; get a pb <42>
movea.l sp,a0 ; point to it <42>
move.w ioVRefNum(a3),ioVRefNum(a0) ; copy caller's vRefNum <42>
move.l d0,ioNamePtr(a0) ; our version of the caller's name <42>
move.w #-1,ioVolIndex(a0) ; by name&vRef, please <42>
_GetVolInfo ; <42>
bne.s @done ; <42>
move.w ioVRefNum(a0), d0 ; grab the volume that's going away
bsr FindDTVol ; try to find a DTDBQElt for this volume
bne.s @done ; no work to do if the DTDB is closed
sub.w #ioDTQElSize, sp ; allocate a DT param block
movea.l sp, a0
move.w DTDBQElt.DTRefNum(a3), ioRefNum(a0) ; stash the DTRefNum for this volume
_DTCloseDown
add.w #ioDTQElSize, sp ; deallocate the param block
@done:
adda.w #ioHVQElSize,sp ; deallocate the pb <42>
adda.w d1,sp ; deallocate the string <43>
movem.l (sp)+, @regs
rts
endproc
;__________________________________________________________________________________
;
; Allocate the DTDBMgr's globals block
;
; FSVars has been allocated by btree patches.
;__________________________________________________________________________________ <SM1>
DTDBMgrInit proc export
export QMInit
move.l #DTGlobals.size, d0 ; we need this much space for DT manager
_NewPtr sys, clear
bne @fail ; no? Run away.
move.l FSVarsPtr, a1 ; a1 = ptr(FSVars block)
move.l a0, FSVars.DTDBMgr(a1) ; stuff ourselves into our slot in FSVars
rts
@fail
moveq.l #dsMemFullErr, d0 ; sys heap is full, so punt
_SysError
; Allocate the Queue Manager's globals block
QMInit
; Allocate a block big enough of all of the Queue Manager's needs:
; Queue manager globals
; Desktop manager QMRec
; Compatibility layer QMRec
; Desktop manager stack
; Compatibility layer stack
move.l #QMGlobals.size+QMRec.size*2+DTStackSize+clStackSize, d0
_NewPtr sys, clear
bne.s @fail ; fail if we can't get memory
move.l FSVarsPtr, a1 ; a1 = ptr(FSVars block)
move.l a0, FSVars.QMgr(a1) ; leave a pointer to globals in FSVars
move.l a0, a1 ; a1 = ptr(FSVars.QMgr)
adda.l #QMGlobals.size, a0 ; skip over globals
move.l a0, QMGlobals.DTQueuePtr(a1); stuff pointer to DTMgr's QMRec
adda.l #QMRec.size, a0 ; skip over DTMgr's QMRec
move.l a0, QMGlobals.CLQueuePtr(a1); stuff pointer to Comp Layer's QMRec
adda.l #QMRec.size+DTStackSize, a0 ; skip over QMRec and Stack
move.l QMGlobals.DTQueuePtr(a1), a1 ; a1 = ptr(DTMgr's QMRec)
move.l a0, QMRec.stackBase(a1) ; store stack address (stack grows down)
move.w #desktopQType, QMRec.qType(a1) ; set queue type/refnum
adda.l #CLStackSize, a0 ; skip to end of CLStack
move.l FSVarsPtr, a1 ; a1 = ptr(FSVars)
move.l FSVars.QMgr(a1), a1 ; a1 = ptr(QM globals)
move.l QMGlobals.CLQueuePtr(a1), a1 ; a1 = ptr(Comp Layer's QMRec)
move.l a0, QMRec.stackBase(a1) ; store stack address (stack grows down)
move.w #fsCompatQType, QMRec.qType(a1) ; set queue type/refnum
rts
@fail:
moveq.l #dsMemFullErr, d0 ; sys heap is full, so punt
_SysError
endproc
; <SM1> FM needed for GetVolParms
;________________________________________________________________________________ <SM1>
;
; Routine: CheckDesktopSupport
;
; Input: a2 - pointer to local volume's vcb
; Output: zero flag clear if we support the desktop on this volume
; zero flag set if we don't
;
; Function: Indicate whether a volume can support the desktop manager calls
;
; Only call this on local hfs volumes
;
; The rule: A local volume gets desktop support if it is either
; 1) non-ejectable
; 2) ejectable but bigger than DTMinVolSize
;
; AlkBlkSiz is stored as a long and used as a word throughout HFS
;________________________________________________________________________________
CDSRegs reg d0/d1/a1
CheckDesktopSupport proc export
movem.l CDSRegs, -(sp)
;
; Is this an MFS volume?
;
cmp.w #SigWord,vcbSigWord(a2) ; is this an MFS volume?
beq.s @NoSupport ; yes, so use the exciting resource file technique
;
; Is this volume bigger than DTMinVolSize?
;
move.w vcbNmBlks(a2), d0 ; d0 = # of allocation blocks on this volume
move.w vcbAlBlkSiz+2(a2), d1 ; d1 = allocation block size
; AlkBlkSiz is used as a word throughout HFS
mulu.w d1, d0 ; d0 = # bytes on this volume
cmp.l #DTMinVolSize, d0 ; is this a big volume?
bhs.s @SupportsDT ; then we always support the DTDB
;
; It's not a big volume, but check and see if the volume is ejectable
;
move.l DrvQHdr+qHead, a1 ; a1 = ptr (1st drive in Drive Queue)
move.w vcbDrvNum(a2), d0 ; d0 = drive number for this volume (if online)
bne.s @SearchDrvQ ; if it's online, we can go straight to the search
move.w vcbDRefNum(a2), d1 ; d1 = + or - DrvNum (since we know we're not online)
cmp.w d0, d1 ; = means volume is ejected
beq.s @NoSupport ; which means it gets no DT support
move.w d1, d0 ; d0 now = -DrvNum (since we know it's offline)
neg.w d0 ; d0 now = DrvNum, so we can search the drive Q
;
; We now have the drive number in d0, and we know that the drive is not big enough to
; automatically get DT support. We need to see if it is ejectable, and if it is a small
; non-ejectable volume (say, a ramdisk) we support it.
;
@SearchDrvQ:
cmp.w dQDrive(a1), d0 ; is this the dQ entry we want?
beq.s @GotDQ
move.l qLink(a1), d1 ; get the next dQ entry (test for zero)
movea.l d1, a1 ; move to an A reg where we can use it
bne.s @SearchDrvQ ; and keep going if there is one
move.w #nsvErr, d0 ; if we have a real vcb, we should find a dQ entry
bra.s @NoSupport ; but if we ever don't, let's return 'no support'
@GotDQ:
cmp.b #8, -3(a1) ; drive queue entry flag bytes => 8 (signed) are non-ejectable <19><51>
blt.s @NoSupport ; we don't support DT on small ejectable volumes
@SupportsDT:
moveq.l #1, d0 ; clear the zero flag
bra.s @CDSExit
@NoSupport:
moveq.l #0, d0 ; set the zero flag
@CDSExit: movem.l (sp)+, CDSRegs
rts
endproc
;________________________________________________________________________________ ;________________________________________________________________________________
; ;
; Routine: BottleNeckIO ; Routine: BottleNeckIO
@ -499,9 +303,7 @@ BottleNeckIO proc export
move.l a0, FSVars.dtOwnCall(a1); leave a bread crumb for FileShare <17> move.l a0, FSVars.dtOwnCall(a1); leave a bread crumb for FileShare <17>
moveq.l #desktopQType, d2 ; our queue type/refnum moveq.l #desktopQType, d2 ; our queue type/refnum
move.l a4,-(sp) ; save a4 <SM3> CSS bsr GetQMRecPtr ; ex<SM3><Sys7.1>
bigjsr GetQMRecPtr,a4 ; a1 = ptr(QMRec) <SM3> CSS
move.l (sp)+,a4 ; recover a4 <SM3> CSS
move.l a6, QMRec.curStack(a1) ; save current alt stack pointer move.l a6, QMRec.curStack(a1) ; save current alt stack pointer
; •• do high water mark checking here ; •• do high water mark checking here
@ -530,25 +332,19 @@ BottleNeckIO proc export
completionRoutine: completionRoutine:
moveq.l #desktopQType, d2 ; our queue type/refnum moveq.l #desktopQType, d2 ; our queue type/refnum
MACHINE mc68020 bsr GetQMRecPtr ; ex<SM3><Sys7.1>
move.l a4,-(sp) ; save a4 <SM3> CSS
bigjsr GetQMRecPtr,a4 ; a1 = ptr(QMRec) <SM3> CSS
move.l (sp)+,a4 ; recover a4 <SM3> CSS
move.l a6, -(sp) ; save a6 for a sec move.l a6, -(sp) ; save a6 for a sec
movea.l QMRec.curStack(a1), a6 ; get our a6 back movea.l QMRec.curStack(a1), a6 ; get our a6 back
bset.b #0, hasContinued(a6) ; mark that we've been back bset.b #0, hasContinued(a6) ; mark that we've been back
movea.l (sp)+, a6 ; restore a6 movea.l (sp)+, a6 ; restore a6
beq.s anRTSInstruction ; if we haven't returned from the trap, rts to driver beq.s anRTSInstruction ; if we haven't returned from the trap, rts to driver
movem.l pascalRegs, -(sp) ; save all regs that pascal callers need saved <SM4>pdw movem.l interruptRegs, -(sp) ; save all regs that pascal callers need saved <SM4>pdw<Sys7.1>
pea restorePascalRegs ; and get in the chain to restore them later <SM4>pdw pea restoreInterruptRegs ; and get in the chain to restore them later <Sys7.1>
contDeskThread: contDeskThread:
moveq.l #desktopQType, d2 ; our queue type/refnum moveq.l #desktopQType, d2 ; our queue type/refnum
MACHINE mc68020 bsr GetQMRecPtr ; ex<SM3><Sys7.1>
move.l a4,-(sp) ; save a4 <SM3> CSS
bigjsr GetQMRecPtr,a4 ; a1 = ptr(QMRec) <SM3> CSS
move.l (sp)+,a4 ; recover a4 <SM3> CSS
movea.l QMRec.curStack(a1), a6 ; restore alt stack pointer movea.l QMRec.curStack(a1), a6 ; restore alt stack pointer
adda.w #Lsize, a6 ; clear off the locals adda.w #Lsize, a6 ; clear off the locals
movem.l (a6)+, BottleNeckRegs ; restore desktop thread registers movem.l (a6)+, BottleNeckRegs ; restore desktop thread registers
@ -563,8 +359,8 @@ contAppThread:
; continue without saving registers ; continue without saving registers
rts ; return async time to application rts ; return async time to application
restorePascalRegs: ; <SM4>pdw restoreInterruptRegs: ; <SM4>pdw<Sys7.1>
movem.l (sp)+, pascalRegs ; restore the regs that we saved last time through movem.l (sp)+, interruptRegs ; restore the regs that we saved last time through <Sys7.1>
rts ; back to the app thread rts ; back to the app thread
_DTDebugTail 'Completion',0 _DTDebugTail 'Completion',0
@ -760,7 +556,7 @@ DTDone: proc
; ;
;________________________________________________________________________________ ;________________________________________________________________________________
DTVolExtFSCheck: proc DTVolExtFSCheck: proc
jsrROM DTRMV3 ; Excuse me, Mr. FS, please find us a volume jsrROM ROMDTRMV3 ; Excuse me, Mr. FS, please find us a volume ex<SM1><Sys7.1> Put back "ROM"
bne.s @LocalErr ; early trouble is a sign to leave bne.s @LocalErr ; early trouble is a sign to leave
tst.w vcbFSID(a2) ; is this a local volume? tst.w vcbFSID(a2) ; is this a local volume?
@ -775,10 +571,10 @@ DTVolExtFSCheck: proc
bne.s @ExternalExit ; if not, just let'em have the call bne.s @ExternalExit ; if not, just let'em have the call
@GrabAnFCB: @GrabAnFCB:
jsrROM GT1STFCB ; get (A1,D1) pointing to first FCB jsrROM ROMGT1STFCB ; get (A1,D1) pointing to first FCB ex<SM1><Sys7.1> Put back "ROM"
@1 tst.l FCBFlNm(a1,d1) ; FCB unused? @1 tst.l FCBFlNm(a1,d1) ; FCB unused?
beq.s @GotFCB ; br if so beq.s @GotFCB ; br if so
jsrROM GTNXTFCB ; get next one until we run out jsrROM ROMGTNXTFCB ; get next one until we run out ex<SM1><Sys7.1> Put back "ROM"
bcs.s @1 bcs.s @1
moveq.l #TMFOErr,d0 ; too many files open moveq.l #TMFOErr,d0 ; too many files open
@ -793,7 +589,7 @@ DTVolExtFSCheck: proc
@LocalErr: @LocalErr:
tst.l (sp)+ ; discard the return address to DTMgr caller tst.l (sp)+ ; discard the return address to DTMgr caller
jmpROM CMDDONE ; leave through the file system jmpROM ROMCMDDONE ; leave through the file system ex<SM1><Sys7.1> Put back "ROM"
@LocalVolume: @LocalVolume:
move.l FSVarsPtr, a3 ; a3 = ptr(file system global area) move.l FSVarsPtr, a3 ; a3 = ptr(file system global area)
@ -840,7 +636,7 @@ DTRfnExtFSCheck: proc
@LocalErr: @LocalErr:
tst.l (sp)+ ; discard the return address to DTMgr caller tst.l (sp)+ ; discard the return address to DTMgr caller
jmpROM CMDDONE ; leave through the file system jmpROM ROMCMDDONE ; leave through the file system ex<SM1><Sys7.1> Put back "ROM"
@LocalVolume: @LocalVolume:
rts ; this call is for us rts ; this call is for us
@ -1313,7 +1109,7 @@ FindDTRegs reg d4/a0/a2/a3
move.w d3,ioVRefNum(a0) ; vRef of volume to look at move.w d3,ioVRefNum(a0) ; vRef of volume to look at
clr.w ioVolIndex(a0) ; no indexing; use VRef only clr.w ioVolIndex(a0) ; no indexing; use VRef only
go_HGetVInfo go_HGetVInfo
bne Error ; punt on errors <SM2> CSS bne.s Error ; punt on errors <SM2> CSS <Sys7.1>
move.w bigPB+ioVAtrb(a6), d0 ; get the volume attributes move.w bigPB+ioVAtrb(a6), d0 ; get the volume attributes
btst.l #15, d0 ; software locked? btst.l #15, d0 ; software locked?
@ -1800,7 +1596,7 @@ SetFileAttribs: proc
; False = were just created ; False = were just created
;________________________________________________________________________________ ;________________________________________________________________________________
DTOpenInform: proc export DTOpenInform: proc export
jsrROM FSQUEUESYNC ; just to check for external file systems jsrROM ROMFSQUEUESYNC ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTVolExtFSCheck ; find the right volume and hope it's ours bsr DTVolExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue bsr DeskMgrQueue
bsr RealOpenDT ; d1 true/false for dtExisted bsr RealOpenDT ; d1 true/false for dtExisted
@ -1823,7 +1619,7 @@ DTOpenInform: proc export
; open for the specified volume, return its refNum. ; open for the specified volume, return its refNum.
;________________________________________________________________________________ ;________________________________________________________________________________
DTGetPath: proc export DTGetPath: proc export
jsrROM FSQUEUESYNC ; just to check for external file systems jsrROM ROMFSQUEUESYNC ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTVolExtFSCheck ; find the right volume and hope it's ours bsr DTVolExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue bsr DeskMgrQueue
bsr RealOpenDT bsr RealOpenDT
@ -1878,7 +1674,7 @@ LSize equ *-bigPB
endr endr
@DTCloseDownRegs reg a0-a4/d1-d2 @DTCloseDownRegs reg a0-a4/d1-d2
jsrROM FSQUEUESYNC ; just to check for external file systems jsrROM ROMFSQUEUESYNC ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue bsr DeskMgrQueue
@ -1924,7 +1720,7 @@ DTAddIcon: proc export
StandardLocals AddIconLocals, IconDRec ; normal locals w/icon sized data rec StandardLocals AddIconLocals, IconDRec ; normal locals w/icon sized data rec
@AddIconRegs reg a0-a4/d1-d2 ; set of regs to save around AddIcon @AddIconRegs reg a0-a4/d1-d2 ; set of regs to save around AddIcon
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; Wait our turn. bsr DeskMgrQueue ; Wait our turn.
@ -2051,7 +1847,7 @@ DTGetIcon: proc export
StandardLocals GetIconLocals, IconDRec StandardLocals GetIconLocals, IconDRec
@GetIconRegs reg a0-a4/d1-d2 ; set of regs to save around AddIcon @GetIconRegs reg a0-a4/d1-d2 ; set of regs to save around AddIcon
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; Wait our turn. bsr DeskMgrQueue ; Wait our turn.
@ -2122,7 +1918,7 @@ DTGetIconInfo: proc export
StandardLocals GetIconInfoLocals, IconDRec StandardLocals GetIconInfoLocals, IconDRec
@GetIconInfoRegs reg a0-a4/d1-d2 ; set of regs to save around this call @GetIconInfoRegs reg a0-a4/d1-d2 ; set of regs to save around this call
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; Wait our turn bsr DeskMgrQueue ; Wait our turn
@ -2472,7 +2268,7 @@ AddAPPLCallback: proc
DTAddAPPL: proc export DTAddAPPL: proc export
@AddAPPLRegs reg a0-a4/d1-d2 ; set of regs to save around this call @AddAPPLRegs reg a0-a4/d1-d2 ; set of regs to save around this call
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; Wait our turn bsr DeskMgrQueue ; Wait our turn
@ -2696,7 +2492,7 @@ RemoveAPPLCallback: proc
DTRemoveAPPL: proc export DTRemoveAPPL: proc export
@RemoveAPPLRegs reg a0-a4/d1-d2 @RemoveAPPLRegs reg a0-a4/d1-d2
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; wait our turn bsr DeskMgrQueue ; wait our turn
@ -2792,7 +2588,7 @@ DTGetAPPL: proc export
StandardLocals GetAPPLLocals, APPLRec StandardLocals GetAPPLLocals, APPLRec
@GetAPPLRegs reg a0-a4/d1-d2 ; set of regs to save around GetAPPL @GetAPPLRegs reg a0-a4/d1-d2 ; set of regs to save around GetAPPL
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; Wait our turn bsr DeskMgrQueue ; Wait our turn
@ -2881,7 +2677,7 @@ DTSetComment: proc export
StandardLocals SetCommentLocals, CommentRec StandardLocals SetCommentLocals, CommentRec
@SetCommentRegs reg a0-a4/d1-d2 ; set of regs to save around SetComment @SetCommentRegs reg a0-a4/d1-d2 ; set of regs to save around SetComment
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; Wait our turn bsr DeskMgrQueue ; Wait our turn
@ -2945,7 +2741,7 @@ DTGetComment: proc export
StandardLocals GetCommentLocals, CommentRec StandardLocals GetCommentLocals, CommentRec
@GetCommentRegs reg a0-a4/d1-d2 ; set of regs to save around GetComment @GetCommentRegs reg a0-a4/d1-d2 ; set of regs to save around GetComment
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; Wait our turn bsr DeskMgrQueue ; Wait our turn
@ -3008,7 +2804,7 @@ DTRemoveComment: proc export
StandardLocals RemoveCommentLocals, 0 ; we only need a pb and a key here. Zero Data StandardLocals RemoveCommentLocals, 0 ; we only need a pb and a key here. Zero Data
@RemoveCommentRegs reg a0-a4/d1-d2 ; set of regs to save around RmvCmt @RemoveCommentRegs reg a0-a4/d1-d2 ; set of regs to save around RmvCmt
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; Wait our turn bsr DeskMgrQueue ; Wait our turn
@ -3056,7 +2852,7 @@ LSize equ *-bigPB
endr endr
@DTFlushRegs reg a0/a3-a4 @DTFlushRegs reg a0/a3-a4
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; wait our turn bsr DeskMgrQueue ; wait our turn
@ -3108,7 +2904,7 @@ LSize equ *-bigPB
endr endr
@DTResetRegs reg a0-a4/d1-d2 @DTResetRegs reg a0-a4/d1-d2
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; wait our turn bsr DeskMgrQueue ; wait our turn
@ -3224,7 +3020,7 @@ LSize equ *-bigPB
@DTDeleteRegs reg a0-a4/d1-d2 @DTDeleteRegs reg a0-a4/d1-d2
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTVolExtFSCheck ; find the right volume and hope it's ours bsr DTVolExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; wait our turn bsr DeskMgrQueue ; wait our turn
@ -3299,7 +3095,7 @@ LSize equ *-bigPB
endr endr
@DTGetInfoRegs reg a0-a4/d1-d2 @DTGetInfoRegs reg a0-a4/d1-d2
jsrROM FSQUEUE ; just to check for external file systems jsrROM ROMFSQUEUE ; just to check for external file systems ex<SM1><Sys7.1> Put back "ROM"
bsr DTRfnExtFSCheck ; find the right volume and hope it's ours bsr DTRfnExtFSCheck ; find the right volume and hope it's ours
bsr DeskMgrQueue ; wait our turn bsr DeskMgrQueue ; wait our turn

View File

@ -1,3 +1,11 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM3> by changing pascalRegs back to interruptRegs (i.e. not
; saving a2/a3/d3).
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: ExternalMakeFSSpec.a ; File: ExternalMakeFSSpec.a
; ;
@ -115,8 +123,8 @@ myCompletionRoutine:
movea.l (sp)+, a6 ; restore a6 movea.l (sp)+, a6 ; restore a6
beq.s anRTSInstruction ; if we haven't returned from the trap, rts to driver beq.s anRTSInstruction ; if we haven't returned from the trap, rts to driver
movem.l pascalRegs, -(sp) ; save all regs that pascal callers need saved <LW2>pdw movem.l interruptRegs, -(sp) ; save all regs that pascal callers need saved <LW2>pdw <Sys7.1>
pea restorePascalRegs ; and get in the chain to restore them later <LW2>pdw pea restoreInterruptRegs ; and get in the chain to restore them later <LW2>pdw <Sys7.1>
myContCompatThread: myContCompatThread:
move.w #fsCompatQType, d2 ; our queue type/refnum move.w #fsCompatQType, d2 ; our queue type/refnum
@ -136,8 +144,8 @@ myContAppThread:
; continue without saving registers ; continue without saving registers
rts ; return async time to application rts ; return async time to application
restorePascalRegs: ; <LW2>pdw restoreInterruptRegs: ; <LW2>pdw <Sys7.1>
movem.l (sp)+, pascalRegs ; restore the regs that we saved last time through movem.l (sp)+, interruptRegs ; restore the regs that we saved last time through <Sys7.1>
rts ; back to the app thread rts ; back to the app thread
endproc endproc

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM1> by putting back the "ROM" prefixes.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: FileIDs.a ; File: FileIDs.a
; ;
@ -115,30 +122,30 @@ FileIDs PROC EXPORT
;_______________________________________________________________________ ;_______________________________________________________________________
CreateFileIDRef: CreateFileIDRef:
jsrROM FSQUEUE ; first wait our turn jsrROM ROMFSQUEUE ; first wait our turn ex<SM1><Sys7.1> Put back "ROM"
jsrROM FNDFILNAME ; parse pathname(IN: A0=prmblk OUT: D0=err D2.L=namLen D6=dirID jsrROM ROMFNDFILNAME ; parse pathname(IN: A0=prmblk OUT: D0=err D2.L=namLen D6=dirID ex<SM1><Sys7.1> Put back "ROM"
; D7=cathint A1=volBuffer A2=vcb A3=WDCB A4=cname A5=fileDirEntry) ; D7=cathint A1=volBuffer A2=vcb A3=WDCB A4=cname A5=fileDirEntry)
BNE.S @Exit BNE.S @Exit
jsrROM EXTOFFLINCK ; is the volume online and used by us (not ExtFS)? (IN: A2=vcb OUT: D0=err) jsrROM ROMEXTOFFLINCK ; is the volume online and used by us (not ExtFS)? (IN: A2=vcb OUT: D0=err) ex<SM1><Sys7.1> Put back "ROM"
BNE.S @Exit BNE.S @Exit
jsrROM TFSVCBTST ; it better be an HFS volume (IN: A2=vcb) jsrROM ROMTFSVCBTST ; it better be an HFS volume (IN: A2=vcb) ex<SM1><Sys7.1> Put back "ROM"
BNE.S @NotHFSErr BNE.S @NotHFSErr
MOVEA.L A0, A3 ; sure paramblock ptr for later MOVEA.L A0, A3 ; sure paramblock ptr for later
jsrROM PUSHCNAME ; Put name on A6 stack (IN: A4=name D2.W=len OUT: A0=name D2=len) jsrROM ROMPUSHCNAME ; Put name on A6 stack (IN: A4=name D2.W=len OUT: A0=name D2=len) ex<SM1><Sys7.1> Put back "ROM"
MOVE.W D2,-(A6) ; Save rounded source name length MOVE.W D2,-(A6) ; Save rounded source name length
jsrROM CVFLGS ; is the volume writable? (IN: A2=vcb OUT: D0=err) jsrROM ROMCVFLGS ; is the volume writable? (IN: A2=vcb OUT: D0=err) ex<SM1><Sys7.1> Put back "ROM"
BEQ.S @DoCreate BEQ.S @DoCreate
MOVE.W D0, D7 ; save the error MOVE.W D0, D7 ; save the error
MOVE.L D6, D0 ; dirID or parent dirID MOVE.L D6, D0 ; dirID or parent dirID
JSR FIDGetID ; get the ID (IN: A0=cname D0=dirID A2=vcb OUT: D0=err D1=fthd) JSR FIDGetID ; get the ID (IN: A0=cname D0=dirID A2=vcb OUT: D0=err D1=fthd)
MOVE.W (A6)+,D2 ; Recover rounded source length MOVE.W (A6)+,D2 ; Recover rounded source length
jsrROM POPCNAME ; Remove dest. name string (IN: A6=string D2=rndLen OUT: D2=len) jsrROM ROMPOPCNAME ; Remove dest. name string (IN: A6=string D2=rndLen OUT: D2=len) ex<SM1><Sys7.1> Put back "ROM"
MOVE.L D1, ioFileID(A3) ; set the fileID back in the paramblock ptr MOVE.L D1, ioFileID(A3) ; set the fileID back in the paramblock ptr
TST.W D0 TST.W D0
BEQ.S @existsErr ; the fileID exists on the locked volume BEQ.S @existsErr ; the fileID exists on the locked volume
@ -150,7 +157,7 @@ CreateFileIDRef:
@DoCreate MOVE.L D6, D0 ; dirID or parent dirID @DoCreate MOVE.L D6, D0 ; dirID or parent dirID
JSR FIDCreateID ; and do it (IN: A0=cname D0=dirID A2=vcb OUT: D0=err D1=fthd) JSR FIDCreateID ; and do it (IN: A0=cname D0=dirID A2=vcb OUT: D0=err D1=fthd)
MOVE.W (A6)+,D2 ; Recover rounded source length MOVE.W (A6)+,D2 ; Recover rounded source length
jsrROM POPCNAME ; Remove dest. name string (IN: A6=string D2=rndLen OUT: D2=len) jsrROM ROMPOPCNAME ; Remove dest. name string (IN: A6=string D2=rndLen OUT: D2=len) ex<SM1><Sys7.1> Put back "ROM"
MOVE.L D1, ioFileID(A3) ; set the fileID back in the paramblock ptr MOVE.L D1, ioFileID(A3) ; set the fileID back in the paramblock ptr
TST.W D0 TST.W D0
BEQ.S @Exit ; no errors, get out BEQ.S @Exit ; no errors, get out
@ -169,7 +176,7 @@ CreateFileIDRef:
BRA.S @Exit BRA.S @Exit
@NotHFSErr MOVEQ #wrgVolTypErr, D0 @NotHFSErr MOVEQ #wrgVolTypErr, D0
@Exit jmpROM CMDDONE ; will also put the D0 result in ioResult(A0) @Exit jmpROM ROMCMDDONE ; will also put the D0 result in ioResult(A0) ex<SM1><Sys7.1> Put back "ROM"
;_______________________________________________________________________ ;_______________________________________________________________________
@ -188,17 +195,17 @@ CreateFileIDRef:
DeleteFileIDRef: DeleteFileIDRef:
jsrROM FSQUEUE ; first wait our turn jsrROM ROMFSQUEUE ; first wait our turn ex<SM1><Sys7.1> Put back "ROM"
jsrROM DTRMV3 ; get the vcb by vrefnum or name(IN: A0=prmblk OUT:A2=vcb D0=err) jsrROM ROMDTRMV3 ; get the vcb by vrefnum or name(IN: A0=prmblk OUT:A2=vcb D0=err) ex<SM1><Sys7.1> Put back "ROM"
BNE.S @Exit ; D2=nameLen? D3=volName? A3=WDCB A4=pathName) BNE.S @Exit ; D2=nameLen? D3=volName? A3=WDCB A4=pathName)
jsrROM CVFLGS ; is the volume writable? (IN: A2=vcb OUT: D0=err) jsrROM ROMCVFLGS ; is the volume writable? (IN: A2=vcb OUT: D0=err) ex<SM1><Sys7.1> Put back "ROM"
BNE.S @Exit BNE.S @Exit
jsrROM EXTOFFLINCK ; is the volume online and used by us (notExtFS)? (IN: A2=vcb OUT: D0=err) jsrROM ROMEXTOFFLINCK ; is the volume online and used by us (notExtFS)? (IN: A2=vcb OUT: D0=err) ex<SM1><Sys7.1> Put back "ROM"
BNE.S @Exit BNE.S @Exit
jsrROM TFSVCBTST ; it better be an HFS volume (IN: A2=vcb) jsrROM ROMTFSVCBTST ; it better be an HFS volume (IN: A2=vcb) ex<SM1><Sys7.1> Put back "ROM"
BNE.S @NotHFSErr BNE.S @NotHFSErr
MOVE.L ioFileID(A0), D0 ; file id MOVE.L ioFileID(A0), D0 ; file id
@ -219,7 +226,7 @@ DeleteFileIDRef:
BRA.S @Exit BRA.S @Exit
@NotHFSErr MOVEQ #wrgVolTypErr, D0 @NotHFSErr MOVEQ #wrgVolTypErr, D0
@Exit jmpROM CMDDONE ; will also put the D0 result in ioResult(A0) @Exit jmpROM ROMCMDDONE ; will also put the D0 result in ioResult(A0) ex<SM1><Sys7.1> Put back "ROM"
;_______________________________________________________________________ ;_______________________________________________________________________
; ;
@ -237,14 +244,14 @@ DeleteFileIDRef:
ResolveFileIDRef: ResolveFileIDRef:
jsrROM FSQUEUE ; first wait our turn jsrROM ROMFSQUEUE ; first wait our turn ex<SM1><Sys7.1> Put back "ROM"
jsrROM DTRMV3 ; get the vcb by vrefnum or name (IN: A0=prmblk OUT:A2=vcb D0=err) jsrROM ROMDTRMV3 ; get the vcb by vrefnum or name (IN: A0=prmblk OUT:A2=vcb D0=err) ex<SM1><Sys7.1> Put back "ROM"
BNE.S @Exit1 ; <SM2> CSS D2=nameLen? D3=volName? A3=WDCB A4=pathName?) BNE.S @Exit1 ; <SM2> CSS D2=nameLen? D3=volName? A3=WDCB A4=pathName?)
jsrROM EXTOFFLINCK ; is the volume online and used by us (notExtFS)? (IN: A2=vcb OUT: D0=err) jsrROM ROMEXTOFFLINCK ; is the volume online and used by us (notExtFS)? (IN: A2=vcb OUT: D0=err) ex<SM1><Sys7.1> Put back "ROM"
BNE.S @Exit1 ; <SM2> CSS BNE.S @Exit1 ; <SM2> CSS
jsrROM TFSVCBTST ; it better be an HFS volume (IN: A2=vcb) jsrROM ROMTFSVCBTST ; it better be an HFS volume (IN: A2=vcb) ex<SM1><Sys7.1> Put back "ROM"
BNE.S @NotHFSErr BNE.S @NotHFSErr
MOVEA.L A0, A3 ; save paramblock ptr for later MOVEA.L A0, A3 ; save paramblock ptr for later
@ -265,7 +272,7 @@ ResolveFileIDRef:
BRA @Exit1 BRA @Exit1
@Exit MOVE.L D1, ioSrcDirID(A3) ; put it back in paramblock @Exit MOVE.L D1, ioSrcDirID(A3) ; put it back in paramblock
@Exit1 jmpROM CMDDONE ; will also put the D0 result in ioResult(A0) @Exit1 jmpROM ROMCMDDONE ; will also put the D0 result in ioResult(A0) ex<SM1><Sys7.1> Put back "ROM"
;_______________________________________________________________________ ;_______________________________________________________________________
; ;
@ -289,9 +296,9 @@ PBHExchangeFiles:
; A2 = vcb, A3 = destName, A4 = cmvars/scratch, A5 = srcName ; A2 = vcb, A3 = destName, A4 = cmvars/scratch, A5 = srcName
; D2 = srcCatHint, D3 = destCatHint, D4 = destFileNum, D5 = srcFileNum, D6 = destDirID, D7 = srcDirID ; D2 = srcCatHint, D3 = destCatHint, D4 = destFileNum, D5 = srcFileNum, D6 = destDirID, D7 = srcDirID
jsrROM FSQUEUE ; first wait our turn jsrROM ROMFSQUEUE ; first wait our turn ex<SM1><Sys7.1> Put back "ROM"
jsrROM FNDFILNAME ; parse pathname(IN: A0=prmblk OUT: D0=err D2.L=namLen D6=dirID jsrROM ROMFNDFILNAME ; parse pathname(IN: A0=prmblk OUT: D0=err D2.L=namLen D6=dirID ex<SM1><Sys7.1> Put back "ROM"
BNE @Exit ; D7=cathint A1=volBuffer A2=vcb A3=WDCB A4=cname A5=fileDirEntry) BNE @Exit ; D7=cathint A1=volBuffer A2=vcb A3=WDCB A4=cname A5=fileDirEntry)
MOVE.L D6, D1 ; save src dirID for later MOVE.L D6, D1 ; save src dirID for later
MOVE.L D2, D5 ; save the rounded source name length for later MOVE.L D2, D5 ; save the rounded source name length for later
@ -302,7 +309,7 @@ PBHExchangeFiles:
move.l ioSrcDirID(a0), -(a6) ; save caller's ioSrcDirID value <bb/dnf 8> move.l ioSrcDirID(a0), -(a6) ; save caller's ioSrcDirID value <bb/dnf 8>
MOVE.L ioDestNamePtr(A0), ioFileName(A0) MOVE.L ioDestNamePtr(A0), ioFileName(A0)
MOVE.L ioDestDirID(A0), ioSrcDirID(A0) MOVE.L ioDestDirID(A0), ioSrcDirID(A0)
jsrROM FNDFILNAME ; parse pathname(IN: A0=prmblk OUT: D0=err D2.L=namLen D6=dirID jsrROM ROMFNDFILNAME ; parse pathname(IN: A0=prmblk OUT: D0=err D2.L=namLen D6=dirID ex<SM1><Sys7.1> Put back "ROM"
; D7=cathint A1=volBuffer A2=vcb A3=WDCB A4=cname A5=fileDirEntry) ; D7=cathint A1=volBuffer A2=vcb A3=WDCB A4=cname A5=fileDirEntry)
move.l (a6)+, ioSrcDirID(a0) ; restore caller's ioSrcDirID value <bb/dnf 8> move.l (a6)+, ioSrcDirID(a0) ; restore caller's ioSrcDirID value <bb/dnf 8>
move.l (a6)+, ioFileName(a0) ; restore caller's ioFileName value <dd/dnf 8> move.l (a6)+, ioFileName(a0) ; restore caller's ioFileName value <dd/dnf 8>
@ -314,22 +321,22 @@ PBHExchangeFiles:
CMP.L A2, A3 ; better be the same volumes if specified by pathnames CMP.L A2, A3 ; better be the same volumes if specified by pathnames
BNE @difVolErr BNE @difVolErr
jsrROM CVFLGS ; is the volume writable? (IN: A2=vcb OUT: D0=err) jsrROM ROMCVFLGS ; is the volume writable? (IN: A2=vcb OUT: D0=err) ex<SM1><Sys7.1> Put back "ROM"
BNE @PopAndErr ; no -> BNE @PopAndErr ; no ->
jsrROM EXTOFFLINCK ; is the volume online and used by us (notExtFS)? (IN: A2=vcb OUT: D0=err) jsrROM ROMEXTOFFLINCK ; is the volume online and used by us (notExtFS)? (IN: A2=vcb OUT: D0=err) ex<SM1><Sys7.1> Put back "ROM"
BNE @PopAndErr BNE @PopAndErr
jsrROM TFSVCBTST ; and it better be an HFS volume (IN: A2=vcb) jsrROM ROMTFSVCBTST ; and it better be an HFS volume (IN: A2=vcb) ex<SM1><Sys7.1> Put back "ROM"
BNE @NotHFSErr BNE @NotHFSErr
; set up the names properly ; set up the names properly
MOVE.L (A6)+, A5 ; get the src name off the A6 stack before it changes MOVE.L (A6)+, A5 ; get the src name off the A6 stack before it changes
jsrROM PUSHCNAME ; Put dest name on A6 stack (IN: A4=name D2.W=len OUT: A0=name D2=len) jsrROM ROMPUSHCNAME ; Put dest name on A6 stack (IN: A4=name D2.W=len OUT: A0=name D2=len) ex<SM1><Sys7.1> Put back "ROM"
MOVE.L A0, A3 ; save the dest name MOVE.L A0, A3 ; save the dest name
MOVE.L A5, A4 ; get the src name MOVE.L A5, A4 ; get the src name
MOVE.L D2,-(A6) ; Save dest rounded name length MOVE.L D2,-(A6) ; Save dest rounded name length
MOVE.L D5, D2 ; get the src name length MOVE.L D5, D2 ; get the src name length
jsrROM PUSHCNAME ; Put src name on A6 stack (IN: A4=name D2.W=len OUT: A0=name D2=len) jsrROM ROMPUSHCNAME ; Put src name on A6 stack (IN: A4=name D2.W=len OUT: A0=name D2=len) ex<SM1><Sys7.1> Put back "ROM"
MOVE.L D2,-(A6) ; Save rounded name length MOVE.L D2,-(A6) ; Save rounded name length
; grab the File ID numbers to use later for fcb searching on open files ; grab the File ID numbers to use later for fcb searching on open files
@ -340,7 +347,7 @@ PBHExchangeFiles:
MOVEA.L A0, A5 ; keep the src name MOVEA.L A0, A5 ; keep the src name
MOVE.L D7, D0 ; set the src dir ID MOVE.L D7, D0 ; set the src dir ID
MOVEQ #0, D2 ; no cat hint MOVEQ #0, D2 ; no cat hint
jsrROM LOCCREC ; search the catalog (IN: A2=vcb A4=cmvars A0=name D0=dirID D2=catHInt jsrROM ROMLOCCREC ; search the catalog (IN: A2=vcb A4=cmvars A0=name D0=dirID D2=catHInt ex<SM1><Sys7.1> Put back "ROM"
BNE @ExchErr ; OUT: D0=err D1=size D2=catHint A0=ckr A1=cdr) BNE @ExchErr ; OUT: D0=err D1=size D2=catHint A0=ckr A1=cdr)
MOVE.L D2, D4 ; save the src cat hint MOVE.L D2, D4 ; save the src cat hint
MOVE.L filFlNum(A1), D5 ; save src file ID MOVE.L filFlNum(A1), D5 ; save src file ID
@ -348,7 +355,7 @@ PBHExchangeFiles:
MOVEA.L A3, A0 ; set the dest name MOVEA.L A3, A0 ; set the dest name
MOVE.L D6, D0 ; set the dest dir ID MOVE.L D6, D0 ; set the dest dir ID
MOVEQ #0, D2 ; no cat hint MOVEQ #0, D2 ; no cat hint
jsrROM LOCCREC ; search the catalog (IN: A2=vcb A4=cmvars A0=name D0=dirID D2=catHInt jsrROM ROMLOCCREC ; search the catalog (IN: A2=vcb A4=cmvars A0=name D0=dirID D2=catHInt ex<SM1><Sys7.1> Put back "ROM"
BNE @ExchErr ; OUT: D0=err D1=size D2=catHint A0=ckr A1=cdr) BNE @ExchErr ; OUT: D0=err D1=size D2=catHint A0=ckr A1=cdr)
MOVE.L D2, D3 ; save the dest cat hint MOVE.L D2, D3 ; save the dest cat hint
@ -370,7 +377,7 @@ PBHExchangeFiles:
; FINE TUNING: Flag if either file is open. THEN after FidExchangeFiles, if none, skip fcb walking. ; FINE TUNING: Flag if either file is open. THEN after FidExchangeFiles, if none, skip fcb walking.
jsrROM GT1STFCB ; get the first fcb (uses A1, D1) jsrROM ROMGT1STFCB ; get the first fcb (uses A1, D1) ex<SM1><Sys7.1> Put back "ROM"
@loop CMP.L fcbVPtr(A1, D1), A2 ; better be correct volume @loop CMP.L fcbVPtr(A1, D1), A2 ; better be correct volume
BNE.S @nxtFCB BNE.S @nxtFCB
CMP.L fcbFlNm(A1, D1), D5 CMP.L fcbFlNm(A1, D1), D5
@ -390,10 +397,10 @@ PBHExchangeFiles:
; update the file number in the buffer header after the exchange ; update the file number in the buffer header after the exchange
MOVE.L VCBBufAdr(A2), A1 MOVE.L VCBBufAdr(A2), A1
ST CacheFlag ; really flush ST CacheFlag ; really flush
jsrROM FLUSHCACHE ; release the buffers to free buffer pool jsrROM ROMFLUSHCACHE ; release the buffers to free buffer pool ex<SM1><Sys7.1> Put back "ROM"
movem.L (a6)+, a1/d1 ; restore refnum and FCBSPtr after flush <dnf 5> movem.L (a6)+, a1/d1 ; restore refnum and FCBSPtr after flush <dnf 5>
@nxtFCB jsrROM GTNXTFCB @nxtFCB jsrROM ROMGTNXTFCB ; ex<SM1><Sys7.1> Put back "ROM"
BCS.S @loop ; loop thru them all BCS.S @loop ; loop thru them all
; we are almost ready to roll...FINALLY!... ; we are almost ready to roll...FINALLY!...
@ -419,7 +426,7 @@ PBHExchangeFiles:
; exchange fcb info (file number, file name, and file parID only!) ; exchange fcb info (file number, file name, and file parID only!)
jsrROM GT1STFCB ; get the first fcb (uses A1, D1) jsrROM ROMGT1STFCB ; get the first fcb (uses A1, D1) ex<SM1><Sys7.1> Put back "ROM"
@loop1 CMP.L fcbVPtr(A1, D1), A2 ; better be correct volume @loop1 CMP.L fcbVPtr(A1, D1), A2 ; better be correct volume
BNE.S @nxtFCB1 BNE.S @nxtFCB1
CMP.L fcbFlNm(A1, D1), D5 CMP.L fcbFlNm(A1, D1), D5
@ -455,7 +462,7 @@ PBHExchangeFiles:
MOVEA.L A4, A1 ; Restore A1 MOVEA.L A4, A1 ; Restore A1
@nxtFCB1 jsrROM GTNXTFCB @nxtFCB1 jsrROM ROMGTNXTFCB ; ex<SM1><Sys7.1> Put back "ROM"
BCS.S @loop1 ; loop thru them all BCS.S @loop1 ; loop thru them all
BRA.S @PopAndExit BRA.S @PopAndExit
@ -480,11 +487,11 @@ PBHExchangeFiles:
@PopAndExit ADD #lenCMVars, A6 ; get the temp storage back needed by LocCRec @PopAndExit ADD #lenCMVars, A6 ; get the temp storage back needed by LocCRec
MOVE.L (A6)+,D2 ; Recover rounded length MOVE.L (A6)+,D2 ; Recover rounded length
jsrROM POPCNAME ; Remove src name string (IN: A6=string D2=rndLen OUT: D2=len) jsrROM ROMPOPCNAME ; Remove src name string (IN: A6=string D2=rndLen OUT: D2=len) ex<SM1><Sys7.1> Put back "ROM"
MOVE.L (A6)+,D2 ; Recover rounded length MOVE.L (A6)+,D2 ; Recover rounded length
jsrROM POPCNAME ; Remove dest name string (IN: A6=string D2=rndLen OUT: D2=len) jsrROM ROMPOPCNAME ; Remove dest name string (IN: A6=string D2=rndLen OUT: D2=len) ex<SM1><Sys7.1> Put back "ROM"
@Exit jmpROM CMDDONE ; will also put the D0 result in ioResult(A0) @Exit jmpROM ROMCMDDONE ; will also put the D0 result in ioResult(A0) ex<SM1><Sys7.1> Put back "ROM"

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM1> by putting back the "ROM" prefixes.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: FileIDsSvcs.a ; File: FileIDsSvcs.a
; ;
@ -141,14 +148,14 @@ FIDCreateID:
MOVEM.L FIDCrRegs, -(A6) ; save registers MOVEM.L FIDCrRegs, -(A6) ; save registers
MOVE.L D0,D6 ; save the par ID MOVE.L D0,D6 ; save the par ID
MOVEA.L A0,A3 ; save the cname ptr MOVEA.L A0,A3 ; save the cname ptr
jsrROM CMSETUP ; set up key storage pointed to by A4 jsrROM ROMCMSETUP ; set up key storage pointed to by A4 ex<SM1><Sys7.1> Put back "ROM"
MOVEQ #0,D5 ; clear fileID, in case we return early due to errors MOVEQ #0,D5 ; clear fileID, in case we return early due to errors
CLR.L VCBDirIDM(A2) ; invalidate current DirID marker CLR.L VCBDirIDM(A2) ; invalidate current DirID marker
; ;
; locate the file record ; locate the file record
; ;
MOVEQ #0,D2 ; no catalog hint MOVEQ #0,D2 ; no catalog hint
jsrROM LOCCREC jsrROM ROMLOCCREC ; ex<SM1><Sys7.1> Put back "ROM"
BNE @CrExit ; it's not there, just exit with what's in D0 BNE @CrExit ; it's not there, just exit with what's in D0
CMPI.B #cdrFilRec, cdrType(A1); better be a file (type=2) CMPI.B #cdrFilRec, cdrType(A1); better be a file (type=2)
BNE.S @CrNotAFileErr BNE.S @CrNotAFileErr
@ -161,7 +168,7 @@ FIDCreateID:
MOVE.L D0,D5 ; keep fileID for later MOVE.L D0,D5 ; keep fileID for later
SUBA.L A0,A0 ; use NULL for fthread key name SUBA.L A0,A0 ; use NULL for fthread key name
LEA ckrOff(A4), A1 ; use this storage for the fthread key LEA ckrOff(A4), A1 ; use this storage for the fthread key
jsrROM BUILDKEY ; fill in the key jsrROM ROMBUILDKEY ; fill in the key ex<SM1><Sys7.1> Put back "ROM"
; ;
; and do the data of the file thread ; and do the data of the file thread
; ;
@ -176,7 +183,7 @@ FIDCreateID:
MOVEA.L A3, A0 ; the cname ptr MOVEA.L A3, A0 ; the cname ptr
LEA thdCName(A1), A1 LEA thdCName(A1), A1
jsrROM UPDCNAME jsrROM ROMUPDCNAME ; ex<SM1><Sys7.1> Put back "ROM"
; ;
; Insert the file thread in the catalog btree ; Insert the file thread in the catalog btree
; ;
@ -184,7 +191,7 @@ FIDCreateID:
MOVE.W #lenthd, D1 MOVE.W #lenthd, D1
LEA cdrOff(A4), A1 LEA cdrOff(A4), A1
LEA ckrOff(A4), A0 LEA ckrOff(A4), A0
jsrROM BTINSERT jsrROM ROMBTINSERT ; ex<SM1><Sys7.1> Put back "ROM"
BNE.S @CrBTErr ; could be disk full, so stop BNE.S @CrBTErr ; could be disk full, so stop
; ;
; finally, turn on thread flag in file CNode. Too bad, gotta find it again ; finally, turn on thread flag in file CNode. Too bad, gotta find it again
@ -192,16 +199,16 @@ FIDCreateID:
MOVE.L D4, D2 ; use saved cat hint MOVE.L D4, D2 ; use saved cat hint
MOVE.L D6, D0 ; dirID or parent dirID MOVE.L D6, D0 ; dirID or parent dirID
MOVEA.L A3, A0 ; CName pointer MOVEA.L A3, A0 ; CName pointer
jsrROM LOCCREC ; we know it's there jsrROM ROMLOCCREC ; we know it's there ex<SM1><Sys7.1> Put back "ROM"
BSET #fThreadFlag,FilFlags(A1); set the flag BSET #fThreadFlag,FilFlags(A1); set the flag
MOVE.W VCBCtRef(A2),D0 ; refnum of catalog file MOVE.W VCBCtRef(A2),D0 ; refnum of catalog file
jsrROM BTUPDATE jsrROM ROMBTUPDATE ; ex<SM1><Sys7.1> Put back "ROM"
BNE.S @CRExit ; if there was an error, catalog could be shot! BNE.S @CRExit ; if there was an error, catalog could be shot!
; ;
; get it out to disk ; get it out to disk
; ;
jsrROm CMFLUSH ; flush the catalog jsrROm ROMCMFLUSH ; flush the catalog ex<SM1><Sys7.1> Put back "ROM"
BRA.S @CrExit BRA.S @CrExit
; ;
; handle errors ; handle errors
@ -217,7 +224,7 @@ FIDCreateID:
MOVE.L D5,D0 ; file number <11Jan91 #10> MOVE.L D5,D0 ; file number <11Jan91 #10>
SUBA.L A0,A0 ; no Cname <11Jan91 #10> SUBA.L A0,A0 ; no Cname <11Jan91 #10>
MOVEQ #0,D2 ; no hint <11Jan91 #10> MOVEQ #0,D2 ; no hint <11Jan91 #10>
jsrROM LOCCREC ; locate thread record <11Jan91 #10> jsrROM ROMLOCCREC ; locate thread record <11Jan91 #10> ex<SM1><Sys7.1> Put back "ROM"
BNE.S @7 ; bad time for error <11Jan91 #10> BNE.S @7 ; bad time for error <11Jan91 #10>
CMP.B #cdrfThdRec,cdrType(A1) ; file thread type? <11Jan91 #10> CMP.B #cdrfThdRec,cdrType(A1) ; file thread type? <11Jan91 #10>
@ -247,9 +254,9 @@ FIDCreateID:
@5 TST.W D3 ; have we changed the file? <11Jan91 #10> @5 TST.W D3 ; have we changed the file? <11Jan91 #10>
BNE.S @7 ; no <11Jan91 #10> BNE.S @7 ; no <11Jan91 #10>
@6 MOVE.W VCBCtRef(A2),D0 ; refnum of catalog file (input = D0/D2) <11Jan91 #10> @6 MOVE.W VCBCtRef(A2),D0 ; refnum of catalog file (input = D0/D2) <11Jan91 #10>
jsrROM BTUPDATE ; mark the node (D2) dirty <11Jan91 #10> jsrROM ROMBTUPDATE ; mark the node (D2) dirty <11Jan91 #10> ex<SM1><Sys7.1> Put back "ROM"
BNE.S @CrExit ; bad time for error <11Jan91 #10> BNE.S @CrExit ; bad time for error <11Jan91 #10>
jsrROm CMFLUSH ; flush the catalog (input = A2) <11Jan91 #10> jsrROm ROMCMFLUSH ; flush the catalog (input = A2) <11Jan91 #10> ex<SM1><Sys7.1> Put back "ROM"
BNE.S @CrExit ; bad time for error <11Jan91 #10> BNE.S @CrExit ; bad time for error <11Jan91 #10>
@7 MOVE.W #CMExists,D0 ; Translate error "CMExists = cnode already there" @7 MOVE.W #CMExists,D0 ; Translate error "CMExists = cnode already there"
@ -270,7 +277,7 @@ FIDCreateID:
; A3 = user's file name ; A3 = user's file name
; Output: BEQ if 2 names are the same ; Output: BEQ if 2 names are the same
LEA thdCName(A1), A1 LEA thdCName(A1), A1
jsrROM UPDCNAME jsrROM ROMUPDCNAME ; ex<SM1><Sys7.1> Put back "ROM"
;_________________________________________________________________________________ ;_________________________________________________________________________________
@ -299,7 +306,7 @@ FIDDeleteID:
; ;
MOVE.L (SP)+,-(A6) ; save return address on A6 stack MOVE.L (SP)+,-(A6) ; save return address on A6 stack
MOVEM.L FIDDelRegs,-(A6) ; save registers MOVEM.L FIDDelRegs,-(A6) ; save registers
jsrROM CMSETUP ; set up key storage pointed to by A4 jsrROM ROMCMSETUP ; set up key storage pointed to by A4 ex<SM1><Sys7.1> Put back "ROM"
MOVE.L D0, D5 ; save fileID MOVE.L D0, D5 ; save fileID
MOVEQ #0, D7 ; save error in here, if CNode for file is missing MOVEQ #0, D7 ; save error in here, if CNode for file is missing
CLR.L VCBDirIDM(A2) ; invalidate current DirID marker CLR.L VCBDirIDM(A2) ; invalidate current DirID marker
@ -308,7 +315,7 @@ FIDDeleteID:
; ;
MOVEQ #0, D2 ; no catalog hint MOVEQ #0, D2 ; no catalog hint
SUBA.L A0, A0 ; use NULL for fthread key. SUBA.L A0, A0 ; use NULL for fthread key.
jsrROM LOCCREC jsrROM ROMLOCCREC ; ex<SM1><Sys7.1> Put back "ROM"
BNE.S @DlNoThdErr ; it's not there BNE.S @DlNoThdErr ; it's not there
CMPI.B #cdrFThdRec, cdrType(A1); better be a file CMPI.B #cdrFThdRec, cdrType(A1); better be a file
BNE.S @DlNotAFileErr BNE.S @DlNotAFileErr
@ -318,7 +325,7 @@ FIDDeleteID:
MOVEQ #0, D2 ; no catalog hint MOVEQ #0, D2 ; no catalog hint
MOVE.L thdParID(A1), D0 ; get file's dir id from fthread data MOVE.L thdParID(A1), D0 ; get file's dir id from fthread data
LEA thdCName(A1), A0 ; and it's name LEA thdCName(A1), A0 ; and it's name
jsrROM LOCCREC jsrROM ROMLOCCREC ; ex<SM1><Sys7.1> Put back "ROM"
BEQ.S @DlUnsetFlg BEQ.S @DlUnsetFlg
MOVE.W D0, D7 ; need to return the error later MOVE.W D0, D7 ; need to return the error later
BNE.S @DlDelThd ; whoops, it's not there...well, delete the thread BNE.S @DlDelThd ; whoops, it's not there...well, delete the thread
@ -329,7 +336,7 @@ FIDDeleteID:
; ;
@DlUnsetFlg BCLR #fThreadFlag,FilFlags(A1) @DlUnsetFlg BCLR #fThreadFlag,FilFlags(A1)
MOVE.W VCBCtRef(A2), D0 ; refnum of catalog file MOVE.W VCBCtRef(A2), D0 ; refnum of catalog file
jsrROM BTUPDATE ; tell the btree jsrROM ROMBTUPDATE ; tell the btree ex<SM1><Sys7.1> Put back "ROM"
BNE.S @DlExit ; if there's an error, the catalog could be shot! BNE.S @DlExit ; if there's an error, the catalog could be shot!
; ;
; Delete the file thread in the catalog btree ; Delete the file thread in the catalog btree
@ -337,17 +344,17 @@ FIDDeleteID:
@DlDelThd MOVE.L D5, D0 ; file id @DlDelThd MOVE.L D5, D0 ; file id
SUBA.L A0,A0 ; use NULL for fthread key SUBA.L A0,A0 ; use NULL for fthread key
LEA ckrOff(A4), A1 ; use this storage for fthread key LEA ckrOff(A4), A1 ; use this storage for fthread key
jsrROM BUILDKEY ; fill in the key jsrROM ROMBUILDKEY ; fill in the key ex<SM1><Sys7.1> Put back "ROM"
LEA ckrOff(A4), A0 ; get the storage again LEA ckrOff(A4), A0 ; get the storage again
MOVE.W VCBCtRef(A2), D0 ; refnum of catalog file MOVE.W VCBCtRef(A2), D0 ; refnum of catalog file
jsrROM BTDELETE ; delete file thread jsrROM ROMBTDELETE ; delete file thread ex<SM1><Sys7.1> Put back "ROM"
BNE.S @DlExit ; we know it exists, so must be IOError... BNE.S @DlExit ; we know it exists, so must be IOError...
; ...Oh well, leave the cnode's fthread flag off. ; ...Oh well, leave the cnode's fthread flag off.
; ;
; get it out to disk. ; get it out to disk.
; ;
jsrROM CMFLUSH ; flush the catalog jsrROM ROMCMFLUSH ; flush the catalog ex<SM1><Sys7.1> Put back "ROM"
MOVE.W D7, D0 ; should be clear, unless file CNode was missing MOVE.W D7, D0 ; should be clear, unless file CNode was missing
BRA.S @DlExit BRA.S @DlExit
; ;
@ -397,14 +404,14 @@ FIDGetID:
; ;
MOVE.L (SP)+,-(A6) ; save return address on A6 stack MOVE.L (SP)+,-(A6) ; save return address on A6 stack
MOVEM.L FIDGtRegs, -(A6) ; save registers MOVEM.L FIDGtRegs, -(A6) ; save registers
jsrROM CMSETUP ; set up key storage pointed to by A4 jsrROM ROMCMSETUP ; set up key storage pointed to by A4 ex<SM1><Sys7.1> Put back "ROM"
MOVEQ #0, D5 ; clear fileID, in case we return early due to errors MOVEQ #0, D5 ; clear fileID, in case we return early due to errors
CLR.L VCBDirIDM(A2) ; invalidate current DirID marker CLR.L VCBDirIDM(A2) ; invalidate current DirID marker
; ;
; locate the file record ; locate the file record
; ;
MOVEQ #0, D2 ; no catalog hint MOVEQ #0, D2 ; no catalog hint
jsrROM LOCCREC jsrROM ROMLOCCREC ; ex<SM1><Sys7.1> Put back "ROM"
BNE @GtExit ; it's not there, just exit with what's in D0 BNE @GtExit ; it's not there, just exit with what's in D0
CMPI.B #cdrFilRec, cdrType(A1); better be a file CMPI.B #cdrFilRec, cdrType(A1); better be a file
BNE.S @GtNotAFileErr BNE.S @GtNotAFileErr
@ -462,7 +469,7 @@ FIDResolveID:
MOVE.L (SP)+,-(A6) ; save return address on A6 stack MOVE.L (SP)+,-(A6) ; save return address on A6 stack
MOVEM.L FIDResRegs,-(A6) ; save registers MOVEM.L FIDResRegs,-(A6) ; save registers
MOVE.L D0,D3 ; save fileID MOVE.L D0,D3 ; save fileID
jsrROM CMSETUP ; set up key record and data storage jsrROM ROMCMSETUP ; set up key record and data storage ex<SM1><Sys7.1> Put back "ROM"
MOVEA.L A0, A3 ; save cName ptr MOVEA.L A0, A3 ; save cName ptr
CLR.L VCBDirIDM(A2) ; invalidate current DirID marker CLR.L VCBDirIDM(A2) ; invalidate current DirID marker
; ;
@ -470,7 +477,7 @@ FIDResolveID:
; ;
;; MOVEQ #0, D2 ; no catalog hint <23Aug90> ;; MOVEQ #0, D2 ; no catalog hint <23Aug90>
SUBA.L A0, A0 ; use NULL for file name. SUBA.L A0, A0 ; use NULL for file name.
jsrROM LOCCREC jsrROM ROMLOCCREC ; ex<SM1><Sys7.1> Put back "ROM"
BNE.S @RsExit ; it's not there, pass error on up BNE.S @RsExit ; it's not there, pass error on up
CMPI.B #cdrFThdRec, cdrType(A1); better be a file CMPI.B #cdrFThdRec, cdrType(A1); better be a file
BNE.S @RsNotAFileErr BNE.S @RsNotAFileErr
@ -480,7 +487,7 @@ FIDResolveID:
LEA thdCName(A1), A0 ; and it's name LEA thdCName(A1), A0 ; and it's name
MOVEM.L D0/D2/A0,-(A6) ; save dirID/hint/name <23Aug90> MOVEM.L D0/D2/A0,-(A6) ; save dirID/hint/name <23Aug90>
MOVEQ #0, D2 ; no catalog hint <23Aug90> MOVEQ #0, D2 ; no catalog hint <23Aug90>
jsrROM LOCCREC ; does the file exist? <23Aug90> jsrROM ROMLOCCREC ; does the file exist? <23Aug90> ex<SM1><Sys7.1> Put back "ROM"
MOVEM.L (A6)+,D1/D2/A0 ; restore dirID/hint/name <23Aug90> MOVEM.L (A6)+,D1/D2/A0 ; restore dirID/hint/name <23Aug90>
BNE.S @dangling ; it's not there <23Aug90> BNE.S @dangling ; it's not there <23Aug90>
@ -489,7 +496,7 @@ FIDResolveID:
BNE.S @dangling ; it's not <21Sep90> BNE.S @dangling ; it's not <21Sep90>
MOVEA.L A3, A1 ; the cname ptr MOVEA.L A3, A1 ; the cname ptr
jsrROM UPDCNAME jsrROM ROMUPDCNAME ; ex<SM1><Sys7.1> Put back "ROM"
MOVEQ #0, D0 ; to be safe MOVEQ #0, D0 ; to be safe
; ;
; cleanup and exit ; cleanup and exit
@ -577,7 +584,7 @@ FIDExchangeFiles:
; locate the source file, test for extents in extent file, and copy the cat record for later ; locate the source file, test for extents in extent file, and copy the cat record for later
; ;
CLR.W extFlgsOff(A4) ; assume no extents in extents file CLR.W extFlgsOff(A4) ; assume no extents in extents file
jsrROM LOCCREC ; A0, D0, D2 already set up from input jsrROM ROMLOCCREC ; A0, D0, D2 already set up from input ex<SM1><Sys7.1> Put back "ROM"
BNE @ExExit ; either CNode not there or io error BNE @ExExit ; either CNode not there or io error
CMPI.B #cdrFilRec, cdrType(A1); better be a file CMPI.B #cdrFilRec, cdrType(A1); better be a file
BNE @ExNotAFileErr BNE @ExNotAFileErr
@ -608,7 +615,7 @@ FIDExchangeFiles:
MOVE.L D7, D2 ; catalog hint MOVE.L D7, D2 ; catalog hint
MOVE.L destDIDOff(A4), D0 ; it's dir id MOVE.L destDIDOff(A4), D0 ; it's dir id
MOVEA.L A3, A0 ; it's name MOVEA.L A3, A0 ; it's name
jsrROM LOCCREC ; keep the cat hint in D2 for the BTUpdate later jsrROM ROMLOCCREC ; keep the cat hint in D2 for the BTUpdate later ex<SM1><Sys7.1> Put back "ROM"
BNE @ExExit ; either CNode not there or io error (callee knows it's there!) BNE @ExExit ; either CNode not there or io error (callee knows it's there!)
CMPI.B #cdrFilRec, cdrType(A1); better be a file CMPI.B #cdrFilRec, cdrType(A1); better be a file
BNE @ExNotAFileErr BNE @ExNotAFileErr
@ -689,14 +696,14 @@ FIDExchangeFiles:
@ExGetOut MOVE.L D6, D2 ; catalog hint @ExGetOut MOVE.L D6, D2 ; catalog hint
MOVEA.L A5,A0 ; it's name MOVEA.L A5,A0 ; it's name
MOVE.L srcDIDOff(A4), D0 ; it's dir id MOVE.L srcDIDOff(A4), D0 ; it's dir id
jsrROM LOCCREC jsrROM ROMLOCCREC ; ex<SM1><Sys7.1> Put back "ROM"
BNE @ExBusted BNE @ExBusted
LEA destCNode(A4), A0 ; from saved dest (A0) to memory src (A1) LEA destCNode(A4), A0 ; from saved dest (A0) to memory src (A1)
BSR CopyCNodeInfo BSR CopyCNodeInfo
MOVE.W VCBCtRef(A2), D0 MOVE.W VCBCtRef(A2), D0
jsrROM BTUPDATE ; tell the btree jsrROM ROMBTUPDATE ; tell the btree ex<SM1><Sys7.1> Put back "ROM"
BNE @ExExit ; if there's an error, the catalog could be shot! BNE @ExExit ; if there's an error, the catalog could be shot!
; ;
@ -705,14 +712,14 @@ FIDExchangeFiles:
MOVE.L D7, D2 ; catalog hint MOVE.L D7, D2 ; catalog hint
MOVEA.L A3, A0 ; it's name MOVEA.L A3, A0 ; it's name
MOVE.L destDIDOff(A4), D0 ; it's dir id MOVE.L destDIDOff(A4), D0 ; it's dir id
jsrROM LOCCREC ; keep cat hint in D2 for the BTUpdate later jsrROM ROMLOCCREC ; keep cat hint in D2 for the BTUpdate later ex<SM1><Sys7.1> Put back "ROM"
BNE @ExBusted BNE @ExBusted
LEA srcCNode(A4), A0 ; from saved src (A0) to memory dest (A1) LEA srcCNode(A4), A0 ; from saved src (A0) to memory dest (A1)
BSR CopyCNodeInfo BSR CopyCNodeInfo
MOVE.W VCBCtRef(A2), D0 MOVE.W VCBCtRef(A2), D0
jsrROM BTUPDATE ; tell the btree jsrROM ROMBTUPDATE ; tell the btree ex<SM1><Sys7.1> Put back "ROM"
BNE @ExExit ; if there's an error, the catalog could be shot! BNE @ExExit ; if there's an error, the catalog could be shot!
BRA.S @ExFinishUp BRA.S @ExFinishUp
@ -757,8 +764,8 @@ FIDExchangeFiles:
; STEP 5: ALL DONE....ALMOST... ; STEP 5: ALL DONE....ALMOST...
; ;
@ExFinishErr @ExFinishErr
jsrROM CMFLUSH ; flush the catalog jsrROM ROMCMFLUSH ; flush the catalog ex<SM1><Sys7.1> Put back "ROM"
jsrROM XFFLUSH ; flush the extent file (unneeded for common case, but it's cheap) jsrROM ROMXFFLUSH ; flush the extent file (unneeded for common case, but it's cheap)
MOVE.W #dskFulErr, D0 ; well, report the original error even if the flushes croaked. MOVE.W #dskFulErr, D0 ; well, report the original error even if the flushes croaked.
BRA.S @ExExit BRA.S @ExExit
@ExNotAFileErr @ExNotAFileErr
@ -771,8 +778,8 @@ FIDExchangeFiles:
; ;
@ExFinishUp @ExFinishUp
MOVEQ #0, D0 ; no errors....yet... MOVEQ #0, D0 ; no errors....yet...
jsrROM CMFLUSH ; flush the catalog jsrROM ROMCMFLUSH ; flush the catalog ex<SM1><Sys7.1> Put back "ROM"
jsrROM XFFLUSH ; flush the extent file (unneeded for common case, but it's cheap) jsrROM ROMXFFLUSH ; flush the extent file (unneeded for common case, but it's cheap)
@ExExit ADD #lenFIDSwapVars,A6 ; de-allocate memory for CM vars @ExExit ADD #lenFIDSwapVars,A6 ; de-allocate memory for CM vars
MOVEM.L (A6)+, FIDExchRegs ; restore regs MOVEM.L (A6)+, FIDExchRegs ; restore regs
@ -932,18 +939,18 @@ DeleteExts:
@DXNxtDelete @DXNxtDelete
MOVEQ #0, D2 ; no hint (after BTDelete) <09Aug90> MOVEQ #0, D2 ; no hint (after BTDelete) <09Aug90>
MOVE.W VCBXTRef(A2), D0 ; extents file refnum MOVE.W VCBXTRef(A2), D0 ; extents file refnum
jsrROM BTSEARCH ; search BTree for extent record jsrROM ROMBTSEARCH ; search BTree for extent record ex<SM1><Sys7.1> Put back "ROM"
CMP.W #BTNotFound, D0 CMP.W #BTNotFound, D0
BNE.S @DXExit ; has to be an ioerror! BNE.S @DXExit ; has to be an ioerror!
MOVEQ #0, D1 ; get what it's pointing at MOVEQ #0, D1 ; get what it's pointing at
MOVE.W VCBXTRef(A2), D0 ; extents file refnum MOVE.W VCBXTRef(A2), D0 ; extents file refnum
jsrROM BTGETRECORD ; this is the first record we want for this file jsrROM ROMBTGETRECORD ; this is the first record we want for this file ex<SM1><Sys7.1> Put back "ROM"
BNE.S @DXBtErr BNE.S @DXBtErr
CMP.L xkrFNum(A0), D6 CMP.L xkrFNum(A0), D6
BNE.S @DXExit ; Yippie!!! We're done! BNE.S @DXExit ; Yippie!!! We're done!
MOVE.W VCBXTRef(A2), D0 ; extent file's refnum MOVE.W VCBXTRef(A2), D0 ; extent file's refnum
jsrROM BTDELETE ; and delete from btree (AO has key) jsrROM ROMBTDELETE ; and delete from btree (AO has key) ex<SM1><Sys7.1> Put back "ROM"
BNE.S @DXExit BNE.S @DXExit
LEA tempKeyOff(A4), A0 ; look again LEA tempKeyOff(A4), A0 ; look again
@ -1010,7 +1017,7 @@ extSize EQU lenxkr+lenxdr
@MvNextBatch MOVE.W VCBXTRef(A2), D0 ; extents file refnum @MvNextBatch MOVE.W VCBXTRef(A2), D0 ; extents file refnum
MOVEQ #0, D2 ; no hint MOVEQ #0, D2 ; no hint
jsrROM BTSEARCH ; search BTree for extent record. jsrROM ROMBTSEARCH ; search BTree for extent record. ex<SM1><Sys7.1> Put back "ROM"
CMP.W #BtNotFound, D0 ; it won't exist the first time thru the loop CMP.W #BtNotFound, D0 ; it won't exist the first time thru the loop
BEQ.S @MvGoOn BEQ.S @MvGoOn
TST.W D0 TST.W D0
@ -1022,7 +1029,7 @@ extSize EQU lenxkr+lenxdr
LEA extOff(A4), A3 ; extent ptr LEA extOff(A4), A3 ; extent ptr
@MvNextRec MOVE.W VCBXTRef(A2), D0 ; extents file refnum @MvNextRec MOVE.W VCBXTRef(A2), D0 ; extents file refnum
jsrROM BTGETRECORD ; this is the first record we want for this file jsrROM ROMBTGETRECORD ; this is the first record we want for this file ex<SM1><Sys7.1> Put back "ROM"
CMP.W #BtNotFound, D0 ; if xkrFNum(A0) is cleared on this error, then this test is bogus! CMP.W #BtNotFound, D0 ; if xkrFNum(A0) is cleared on this error, then this test is bogus!
BEQ.S @MvNoMoreExts BEQ.S @MvNoMoreExts
TST.W D0 TST.W D0
@ -1050,7 +1057,7 @@ extSize EQU lenxkr+lenxdr
MOVEQ #lenxdr, D1 ; data length MOVEQ #lenxdr, D1 ; data length
@2 MOVE.L D7, xkrFNum(A0) ; change only the id in the key to dest ID @2 MOVE.L D7, xkrFNum(A0) ; change only the id in the key to dest ID
MOVE.W VCBXTRef(A2), D0 ; extent file's refnum MOVE.W VCBXTRef(A2), D0 ; extent file's refnum
jsrROM BTINSERT ; insert in btree jsrROM ROMBTINSERT ; insert in btree ex<SM1><Sys7.1> Put back "ROM"
BNE.S @MvBTInsertErr BNE.S @MvBTInsertErr
ADDA.W #extSize, A0 ADDA.W #extSize, A0
ADDA.W #extSize, A1 ADDA.W #extSize, A1

View File

@ -1,3 +1,11 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM1> by putting back the "ROM" prefixes. Reverted <SM2> by
; saving ConsultCatalog registers on the normal stack.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: MakeFSSpec.a ; File: MakeFSSpec.a
; ;
@ -9,11 +17,6 @@
; ;
; Change History (most recent first): ; Change History (most recent first):
; ;
; <SM2> 11/7/93 pdw ConsultCatalog was assuming totally synchronous behavior (i.e.
; it was using the A7 stack instead of A6). Changed register
; saving and return address handling to use HFS stack.
; <SM1> 4/15/92 kc Removed the "ROM" prefix from the RomBind routines.
; • Pre-SuperMario comments follow •
; <12> 1/6/91 dnf (fjs) Add code to check for terminating ::'s on pathname ; <12> 1/6/91 dnf (fjs) Add code to check for terminating ::'s on pathname
; parsing. ; parsing.
; <11> 9/22/90 dnf Add ExtOffLinCheck ; <11> 9/22/90 dnf Add ExtOffLinCheck
@ -106,8 +109,7 @@ CopyCName: proc
ConsultCatalog: proc ConsultCatalog: proc
ConsultCatalogRegs reg d2/a0/a1/a4 ConsultCatalogRegs reg d2/a0/a1/a4
move.l (SP)+,-(A6) ; save return address on A6 stack <SM2> pdw movem.l ConsultCatalogRegs,-(sp) ; ex<SM2> pdw <Sys7.1>
movem.l ConsultCatalogRegs,-(A6) ; <SM2> pdw
lea.l FSSpec.name(a3), a0 ; a0 = ptr(CName) lea.l FSSpec.name(a3), a0 ; a0 = ptr(CName)
tst.b (a0) ; zero length name? tst.b (a0) ; zero length name?
bne.s @NotZeroLength bne.s @NotZeroLength
@ -116,7 +118,7 @@ ConsultCatalogRegs reg d2/a0/a1/a4
@NotZeroLength: @NotZeroLength:
move.l FSSpec.parID(a3), d0 ; move parID to input reg for GetCN move.l FSSpec.parID(a3), d0 ; move parID to input reg for GetCN
move.l d7, d2 ; move catalog hint to input reg for CMGetCN move.l d7, d2 ; move catalog hint to input reg for CMGetCN
jsrROM CMGETCN ; go consult with the expert jsrROM ROMCMGETCN ; go consult with the expert ex<SM1><Sys7.1> Put back "ROM"
bne.s @Exit ; errors are good cause to leave bne.s @Exit ; errors are good cause to leave
move.l ckrParID(a0), FSSpec.parID(a3) ; set parID for directory name case move.l ckrParID(a0), FSSpec.parID(a3) ; set parID for directory name case
@ -128,9 +130,8 @@ ConsultCatalogRegs reg d2/a0/a1/a4
@Exit: @Exit:
move.l d2, d7 ; restore catalog hint move.l d2, d7 ; restore catalog hint
movem.l (A6)+, ConsultCatalogRegs ; <SM2> pdw
move.l (A6)+,-(SP) ; Restore the return address <SM2> pdw
tst.w d0 ; set condition codes tst.w d0 ; set condition codes
movem.l (sp)+, ConsultCatalogRegs ; ex<SM2> pdw <Sys7.1>
rts rts
endproc endproc
@ -193,20 +194,20 @@ ConsultCatalogRegs reg d2/a0/a1/a4
;_______________________________________________________________________ ;_______________________________________________________________________
MakeFSSpec: proc export MakeFSSpec: proc export
jsrROM FSQUEUE jsrROM ROMFSQUEUE ; ex<SM1><Sys7.1> Put back "ROM"
jsrROM DTRMV3 ; get at least the volume jsrROM ROMDTRMV3 ; get at least the volume ex<SM1><Sys7.1> Put back "ROM"
bne @Exit bne @Exit
moveq.l #wrgVolTypErr, d0 ; assume the worst moveq.l #wrgVolTypErr, d0 ; assume the worst
jsrROM TFSVCBTST ; split HFS/MFS volumes jsrROM ROMTFSVCBTST ; split HFS/MFS volumes ex<SM1><Sys7.1> Put back "ROM"
bne @Exit ; go handle MFS in the compatibility layer bne @Exit ; go handle MFS in the compatibility layer
moveq.l #0, d6 ; no input dirID moveq.l #0, d6 ; no input dirID
move.l d6, d7 ; no catalog hint move.l d6, d7 ; no catalog hint
bset.b #SkipPMSP,HFSFlags ; Don't bother with PMSP for this operation bset.b #SkipPMSP,HFSFlags ; Don't bother with PMSP for this operation
jsrROM FNDFILNAME ; parse things up jsrROM ROMFNDFILNAME ; parse things up ex<SM1><Sys7.1> Put back "ROM"
; After FndFilName, registers are: ; After FndFilName, registers are:
; a2 - vcb ptr ; a2 - vcb ptr
@ -322,7 +323,7 @@ MakeFSSpec: proc export
clr.l (a1)+ ; clear the volume & high word of directory clr.l (a1)+ ; clear the volume & high word of directory
clr.l (a1)+ ; clear the directory & length byte of string clr.l (a1)+ ; clear the directory & length byte of string
@1: @1:
jmpROM CMDDONE jmpROM ROMCMDDONE ; ex<SM1><Sys7.1> Put back "ROM"
endproc endproc
end end

View File

@ -1,3 +1,12 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM1> by putting back the "ROM" prefixes. Rolled in the 6/22/92
; <R58> change that was made to the TFSRFN2.a version of ClosePatch:
; namely, disabled the patch with a short branch.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: FileMgrPatches.a ; File: FileMgrPatches.a
; ;
@ -274,48 +283,48 @@ BuildHFS70Init default 0
romAfterExtFSHook ROMBind (Plus,$029f2), (SE,$04434), (II,$07edc), (IIci,$0f0e0), (Portable, $096e0) romAfterExtFSHook ROMBind (Plus,$029f2), (SE,$04434), (II,$07edc), (IIci,$0f0e0), (Portable, $096e0)
romBTFlush ROMBind (Plus,$068c2), (SE,$08398), (II,$0be5c), (IIci,$13242), (Portable, $0d802) romBTFlush ROMBind (Plus,$068c2), (SE,$08398), (II,$0be5c), (IIci,$13242), (Portable, $0d802)
BUILDKEY ROMBind (Plus,$065d8), (SE,$080a0), (II,$0BB64), (IIci,$12f40), (Portable, $0d50a) ROMBUILDKEY ROMBind (Plus,$065d8), (SE,$080a0), (II,$0BB64), (IIci,$12f40), (Portable, $0d50a) ;ex<SM1><Sys7.1> Put back "ROM"
BTDELETE ROMBind (Plus,$0671c), (SE,$081e6), (II,$0bcaa), (IIci,$13090), (Portable, $0d650) ROMBTDELETE ROMBind (Plus,$0671c), (SE,$081e6), (II,$0bcaa), (IIci,$13090), (Portable, $0d650) ;ex<SM1><Sys7.1> Put back "ROM"
BTGETRECORD ROMBind (Plus,$06928), (SE,$083fc), (II,$0bec0), (IIci,$132A6), (Portable, $0d866) ROMBTGETRECORD ROMBind (Plus,$06928), (SE,$083fc), (II,$0bec0), (IIci,$132A6), (Portable, $0d866) ;ex<SM1><Sys7.1> Put back "ROM"
BTINSERT ROMBind (Plus,$069ea), (SE,$084b4), (II,$0bf78), (IIci,$1335E), (Portable, $0d91e) ROMBTINSERT ROMBind (Plus,$069ea), (SE,$084b4), (II,$0bf78), (IIci,$1335E), (Portable, $0d91e) ;ex<SM1><Sys7.1> Put back "ROM"
BTSEARCH ROMBind (Plus,$06d4a), (SE,$0880c), (II,$0c2d0), (IIci,$136B6), (Portable, $0dc76) ROMBTSEARCH ROMBind (Plus,$06d4a), (SE,$0880c), (II,$0c2d0), (IIci,$136B6), (Portable, $0dc76) ;ex<SM1><Sys7.1> Put back "ROM"
BTUPDATE ROMBind (Plus,$06dd6), (SE,$08896), (II,$0c35a), (IIci,$13740), (Portable, $0dd00) ROMBTUPDATE ROMBind (Plus,$06dd6), (SE,$08896), (II,$0c35a), (IIci,$13740), (Portable, $0dd00) ;ex<SM1><Sys7.1> Put back "ROM"
CACHERDIP ROMBind (Plus,$07b2a), (SE,$0967e), (II,$0d13e), (IIci,$1459C), (Portable, $0eb44) ROMCACHERDIP ROMBind (Plus,$07b2a), (SE,$0967e), (II,$0d13e), (IIci,$1459C), (Portable, $0eb44) ;ex<SM1><Sys7.1> Put back "ROM"
romChgMFlLock ROMBind (Plus,$046de), (SE,$06812), (II,$0a2e8), (IIci,$11694), (Portable, $0bc7c) romChgMFlLock ROMBind (Plus,$046de), (SE,$06812), (II,$0a2e8), (IIci,$11694), (Portable, $0bc7c)
CHKNODE ROMBind (Plus,$072c2), (SE,$08e22), (II,$0c8e6), (IIci,$13D42), (Portable, $0e2ec) ROMCHKNODE ROMBind (Plus,$072c2), (SE,$08e22), (II,$0c8e6), (IIci,$13D42), (Portable, $0e2ec) ;ex<SM1><Sys7.1> Put back "ROM"
romCkExtFS ROMBind (Plus,$03638), (SE,$050be), (II,$08b80), (IIci,$0fefa), (Portable, $0a4e2) romCkExtFS ROMBind (Plus,$03638), (SE,$050be), (II,$08b80), (IIci,$0fefa), (Portable, $0a4e2)
romCkFilMod ROMBind (Plus,$0497a), (SE,$06420), (II,$09eec), (IIci,$11298), (Portable, $0b880) romCkFilMod ROMBind (Plus,$0497a), (SE,$06420), (II,$09eec), (IIci,$11298), (Portable, $0b880)
CMDDONE ROMBind (Plus,$0295e), (SE,$043a0), (II,$07e48), (IIci,$0f04c), (Portable, $0964c) ROMCMDDONE ROMBind (Plus,$0295e), (SE,$043a0), (II,$07e48), (IIci,$0f04c), (Portable, $0964c) ;ex<SM1><Sys7.1> Put back "ROM"
CMFLUSH ROMBind (Plus,$06606), (SE,$080ce), (II,$0BB92), (IIci,$12f6e), (Portable, $0d538) ROMCMFLUSH ROMBind (Plus,$06606), (SE,$080ce), (II,$0BB92), (IIci,$12f6e), (Portable, $0d538) ;ex<SM1><Sys7.1> Put back "ROM"
CMGETCN ROMBind (Plus,$06238), (SE,$07d04), (II,$0b7c8), (IIci,$12ba2), (Portable, $0d16e) ROMCMGETCN ROMBind (Plus,$06238), (SE,$07d04), (II,$0b7c8), (IIci,$12ba2), (Portable, $0d16e) ;ex<SM1><Sys7.1> Put back "ROM"
CMSETUP ROMBind (Plus,$065a0), (SE,$08068), (II,$0bb2c), (IIci,$12f06), (Portable, $0d4d2) ROMCMSETUP ROMBind (Plus,$065a0), (SE,$08068), (II,$0bb2c), (IIci,$12f06), (Portable, $0d4d2) ;ex<SM1><Sys7.1> Put back "ROM"
romCMUpdateCN ROMBind (Plus,$0656c), (SE,$08036), (II,$0bafa), (IIci,$12ed4), (Portable, $0d4a0) romCMUpdateCN ROMBind (Plus,$0656c), (SE,$08036), (II,$0bafa), (IIci,$12ed4), (Portable, $0d4a0)
CVFLGS ROMBind (Plus,$03a76), (SE,$05502), (II,$08FCA), (IIci,$10344), (Portable, $0a92c) ROMCVFLGS ROMBind (Plus,$03a76), (SE,$05502), (II,$08FCA), (IIci,$10344), (Portable, $0a92c) ;ex<SM1><Sys7.1> Put back "ROM"
romDtrmV1 ROMBind (Plus,$03650), (SE,$050e2), (II,$08ba4), (IIci,$0ff1e), (Portable, $0a50c) romDtrmV1 ROMBind (Plus,$03650), (SE,$050e2), (II,$08ba4), (IIci,$0ff1e), (Portable, $0a50c)
DTRMV3 ROMBind (Plus,$03642), (SE,$050ce), (II,$08b90), (IIci,$0ff0a), (Portable, $0a4f8) ROMDTRMV3 ROMBind (Plus,$03642), (SE,$050ce), (II,$08b90), (IIci,$0ff0a), (Portable, $0a4f8) ;ex<SM1><Sys7.1> Put back "ROM"
EXTOFFLINCK ROMBind (Plus,$04aba), (SE,$06560), (II,$0A02C), (IIci,$113d8), (Portable, $0b9c0) ROMEXTOFFLINCK ROMBind (Plus,$04aba), (SE,$06560), (II,$0A02C), (IIci,$113d8), (Portable, $0b9c0) ;ex<SM1><Sys7.1> Put back "ROM"
romFindDrive ROMBind (Plus,$03414), (SE,$04e9A), (II,$08956), (IIci,$0FC6C), (Portable, $0A258) romFindDrive ROMBind (Plus,$03414), (SE,$04e9A), (II,$08956), (IIci,$0FC6C), (Portable, $0A258)
FNDFILNAME ROMBind (Plus,$04990), (SE,$06436), (II,$09f02), (IIci,$112ae), (Portable, $0b896) ROMFNDFILNAME ROMBind (Plus,$04990), (SE,$06436), (II,$09f02), (IIci,$112ae), (Portable, $0b896) ;ex<SM1><Sys7.1> Put back "ROM"
romFSAsync ROMBind (Plus,$02912), (SE,$04354), (II,$07dfc), (IIci,$0f000), (Portable, $09600) romFSAsync ROMBind (Plus,$02912), (SE,$04354), (II,$07dfc), (IIci,$0f000), (Portable, $09600)
FSQUEUESYNC ROMBind (Plus,$028a6), (SE,$042e8), (II,$07d90), (IIci,$0ef94), (Portable, $09594) ROMFSQUEUESYNC ROMBind (Plus,$028a6), (SE,$042e8), (II,$07d90), (IIci,$0ef94), (Portable, $09594) ;ex<SM1><Sys7.1> Put back "ROM"
FSQUEUE ROMBind (Plus,$028aa), (SE,$042ec), (II,$07d94), (IIci,$0ef98), (Portable, $09598) ROMFSQUEUE ROMBind (Plus,$028aa), (SE,$042ec), (II,$07d94), (IIci,$0ef98), (Portable, $09598) ;ex<SM1><Sys7.1> Put back "ROM"
romGt1stMatch ROMBind (Plus,$04002), (SE,$05a9c), (II,$0955c), (IIci,$108d6), (Portable, $0aebe) romGt1stMatch ROMBind (Plus,$04002), (SE,$05a9c), (II,$0955c), (IIci,$108d6), (Portable, $0aebe)
romLocCNode ROMBind (Plus,$06678), (SE,$0813e), (II,$0BC02), (IIci,$12FDE), (Portable, $0d5a8) romLocCNode ROMBind (Plus,$06678), (SE,$0813e), (II,$0BC02), (IIci,$12FDE), (Portable, $0d5a8)
LOCCREC ROMBind (Plus,$06698), (SE,$0815e), (II,$0bc22), (IIci,$12FFE), (Portable, $0d5c8) ROMLOCCREC ROMBind (Plus,$06698), (SE,$0815e), (II,$0bc22), (IIci,$12FFE), (Portable, $0d5c8) ;ex<SM1><Sys7.1> Put back "ROM"
LOCREC ROMBind (Plus,$07538), (SE,$0908c), (II,$0cb50), (IIci,$13FAC), (Portable, $0e556) ROMLOCREC ROMBind (Plus,$07538), (SE,$0908c), (II,$0cb50), (IIci,$13FAC), (Portable, $0e556) ;ex<SM1><Sys7.1> Put back "ROM"
romMarkVCB ROMBind (Plus,$02d1e), (SE,$04766), (II,$0820e), (IIci,$0F524), (Portable, $09b10) romMarkVCB ROMBind (Plus,$02d1e), (SE,$04766), (II,$0820e), (IIci,$0F524), (Portable, $09b10)
romMarkVCBTime ROMBind (Plus,$02d20), (SE,$04768), (II,$08210), (IIci,$0F526), (Portable, $09b12) romMarkVCBTime ROMBind (Plus,$02d20), (SE,$04768), (II,$08210), (IIci,$0F526), (Portable, $09b12)
POPCNAME ROMBind (Plus,$04288), (SE,$05d28), (II,$097EA), (IIci,$10b96), (Portable, $0b17e) ROMPOPCNAME ROMBind (Plus,$04288), (SE,$05d28), (II,$097EA), (IIci,$10b96), (Portable, $0b17e) ;ex<SM1><Sys7.1> Put back "ROM"
PUSHCNAME ROMBind (Plus,$04258), (SE,$05cf8), (II,$097BA), (IIci,$10b66), (Portable, $0b14e) ROMPUSHCNAME ROMBind (Plus,$04258), (SE,$05cf8), (II,$097BA), (IIci,$10b66), (Portable, $0b14e) ;ex<SM1><Sys7.1> Put back "ROM"
romRfnCall ROMBind (Plus,$05352), (SE,$06e04), (II,$0a8c8), (IIci,$11C86), (Portable, $0c26e) romRfnCall ROMBind (Plus,$05352), (SE,$06e04), (II,$0a8c8), (IIci,$11C86), (Portable, $0c26e)
TFSVCBTST ROMBind (Plus,$04ec6), (SE,$06968), (II,$0a43e), (IIci,$117ea), (Portable, $0bdd2) ROMTFSVCBTST ROMBind (Plus,$04ec6), (SE,$06968), (II,$0a43e), (IIci,$117ea), (Portable, $0bdd2) ;ex<SM1><Sys7.1> Put back "ROM"
UPDCNAME ROMBind (Plus,$066c2), (SE,$0818c), (II,$0BC50), (IIci,$1302C), (Portable, $0d5f6) ROMUPDCNAME ROMBind (Plus,$066c2), (SE,$0818c), (II,$0BC50), (IIci,$1302C), (Portable, $0d5f6) ;ex<SM1><Sys7.1> Put back "ROM"
romUpdRtCnts ROMBind (Plus,$065be), (SE,$08086), (II,$0BB4A), (IIci,$12f24), (Portable, $0d4f0) romUpdRtCnts ROMBind (Plus,$065be), (SE,$08086), (II,$0BB4A), (IIci,$12f24), (Portable, $0d4f0)
romUpdVCnts ROMBind (Plus,$065ae), (SE,$08076), (II,$0BB3A), (IIci,$12f14), (Portable, $0d4e0) romUpdVCnts ROMBind (Plus,$065ae), (SE,$08076), (II,$0BB3A), (IIci,$12f14), (Portable, $0d4e0)
XFFLUSH ROMBind (Plus,$05ed0), (SE,$0799a), (II,$0B45E), (IIci,$1282a), (Portable, $0ce04) ROMXFFLUSH ROMBind (Plus,$05ed0), (SE,$0799a), (II,$0B45E), (IIci,$1282a), (Portable, $0ce04) ;ex<SM1><Sys7.1> Put back "ROM"
GT1STFCB ROMBind (Plus,$03ff2), (SE,$05a8c), (II,$0954c), (IIci,$108c6), (Portable, $0aeae) ROMGT1STFCB ROMBind (Plus,$03ff2), (SE,$05a8c), (II,$0954c), (IIci,$108c6), (Portable, $0aeae) ;ex<SM1><Sys7.1> Put back "ROM"
GTNXTFCB ROMBind (Plus,$03ffa), (SE,$05a94), (II,$09554), (IIci,$108ce), (Portable, $0aeb6) ROMGTNXTFCB ROMBind (Plus,$03ffa), (SE,$05a94), (II,$09554), (IIci,$108ce), (Portable, $0aeb6) ;ex<SM1><Sys7.1> Put back "ROM"
FLUSHCACHE ROMBind (Plus,$076c6), (SE,$0921a), (II,$0ccdc), (IIci,$1413a), (Portable, $0e6e2) ROMFLUSHCACHE ROMBind (Plus,$076c6), (SE,$0921a), (II,$0ccdc), (IIci,$1413a), (Portable, $0e6e2) ;ex<SM1><Sys7.1> Put back "ROM"
; The following addresses are needed for ROM B*Tree writecount patch: <2.3 kst> ; The following addresses are needed for ROM B*Tree writecount patch: <2.3 kst>
romBuildIRec ROMBind (Plus,$072a0), (SE,$08E00), (II,$0C8C4), (IIci,$13D20), (Portable,$0E2CA) romBuildIRec ROMBind (Plus,$072a0), (SE,$08E00), (II,$0C8C4), (IIci,$13D20), (Portable,$0E2CA)
@ -581,8 +590,8 @@ A60DispTbl: proc
;________________________________________________________________________________ ;________________________________________________________________________________
; This routine was rolled into into the file TFS.a. <SM1> ; This routine was rolled into into the file TFS.a. <SM1>
VolumeCall: proc VolumeCall: proc
jsrROM FSQUEUE ; Patiently wait our turn jsrROM ROMFSQUEUE ; Patiently wait our turn ex<SM1><Sys7.1> Put back "ROM"
jsrROM DTRMV3 ; Determine the volume being referred to jsrROM ROMDTRMV3 ; Determine the volume being referred to ex<SM1><Sys7.1> Put back "ROM"
bne ToCmdDone ; Punt at the slightest hint of trouble bne ToCmdDone ; Punt at the slightest hint of trouble
move.l a2,ReqstVol ; Point to the volume being referred to move.l a2,ReqstVol ; Point to the volume being referred to
@ -602,7 +611,7 @@ VolumeCall: proc
entry RefNumCall entry RefNumCall
RefNumCall: RefNumCall:
import RefNumCheck import RefNumCheck
jsrROM FSQUEUE ; chill in line jsrROM ROMFSQUEUE ; chill in line ex<SM1><Sys7.1> Put back "ROM"
move.w ioRefNum(a0),d0 ; Pick up the refNum move.w ioRefNum(a0),d0 ; Pick up the refNum
jsr RefNumCheck ; Check the refNum supplied jsr RefNumCheck ; Check the refNum supplied
bne ToCmdDone ; Punt at first hint of trouble bne ToCmdDone ; Punt at first hint of trouble
@ -629,7 +638,7 @@ RefNumCall:
; This routine was rolled into into the file TFS.a. <SM1> ; This routine was rolled into into the file TFS.a. <SM1>
entry UnknownCall entry UnknownCall
UnknownCall: UnknownCall:
jsrROM FSQUEUE ; Wait our turn jsrROM ROMFSQUEUE ; Wait our turn ex<SM1><Sys7.1> Put back "ROM"
; <REALLY Fudge ReqsVol here later...> ; <REALLY Fudge ReqsVol here later...>
movea.l VCBQHdr+qHead, a2 ; Pick up pointer to first VCB movea.l VCBQHdr+qHead, a2 ; Pick up pointer to first VCB
move.l a2, ReqstVol ; Point someplace semi-innocuous move.l a2, ReqstVol ; Point someplace semi-innocuous
@ -649,8 +658,8 @@ UnknownCall:
entry OpenCall entry OpenCall
OpenCall: OpenCall:
import OpenAttemptHook import OpenAttemptHook
jsrROM FSQUEUE ; Wait our turn jsrROM ROMFSQUEUE ; Wait our turn ex<SM1><Sys7.1> Put back "ROM"
jsrROM DTRMV3 ; Determine the volume being referred to jsrROM ROMDTRMV3 ; Determine the volume being referred to ex<SM1><Sys7.1> Put back "ROM"
bne.s ToCmdDone ; Punt at the slightest hint of trouble bne.s ToCmdDone ; Punt at the slightest hint of trouble
move.l a2,ReqstVol ; Point to the volume being referred to move.l a2,ReqstVol ; Point to the volume being referred to
@ -658,10 +667,10 @@ OpenCall:
beq.s ParamErrExit ; It's an unknown trap for a local volume beq.s ParamErrExit ; It's an unknown trap for a local volume
bsr OpenAttemptHook ; let ourselves know we're trying <38> bsr OpenAttemptHook ; let ourselves know we're trying <38>
jsrROM GT1STFCB ; get (A1,D1) pointing to first FCB jsrROM ROMGT1STFCB ; get (A1,D1) pointing to first FCB ex<SM1><Sys7.1> Put back "ROM"
@1 tst.l FCBFlNm(a1,d1) ; FCB unused @1 tst.l FCBFlNm(a1,d1) ; FCB unused
beq.s @90 ; br if so beq.s @90 ; br if so
jsrROM GTNXTFCB ; get next one until we run out jsrROM ROMGTNXTFCB ; get next one until we run out ex<SM1><Sys7.1> Put back "ROM"
bcs.s @1 bcs.s @1
moveq.l #TMFOErr,d0 ; too many files open moveq.l #TMFOErr,d0 ; too many files open
@ -678,7 +687,7 @@ ParamErrExit:
moveq.l #paramErr, d0 ; It's an unknown trap for a local volume moveq.l #paramErr, d0 ; It's an unknown trap for a local volume
ToCmdDone: ToCmdDone:
jmpROM CMDDONE ; And call it a day. jmpROM ROMCMDDONE ; And call it a day. ex<SM1><Sys7.1> Put back "ROM"
endproc endproc
@ -771,17 +780,17 @@ OpenDF: proc
SetFilLock: proc export SetFilLock: proc export
export RstFilLock export RstFilLock
JSRRom FSQUEUE ; wait our turn JSRRom ROMFSQUEUE ; wait our turn ex<SM1><Sys7.1> Put back "ROM"
ST FLckUnlck ; want to lock it ST FLckUnlck ; want to lock it
BRA.S SRFLck BRA.S SRFLck
RstFilLock: RstFilLock:
jsrROM FSQUEUE jsrROM ROMFSQUEUE ; ex<SM1><Sys7.1> Put back "ROM"
CLR.B FLckUnlck CLR.B FLckUnlck
SRFLck jsrROM romCkFilMod ; look for file and see if we can mod it SRFLck jsrROM romCkFilMod ; look for file and see if we can mod it
; (doesn't return on errors) ; (doesn't return on errors)
JSRROM TFSVCBTST ; Are we dealing with a TFS volume? <01Oct85> JSRROM ROMTFSVCBTST ; Are we dealing with a TFS volume? <01Oct85> ex<SM1><Sys7.1> Put back "ROM"
BNEROM romChgMFlLock ; Nope - do it the old fashioned way BNEROM romChgMFlLock ; Nope - do it the old fashioned way
MOVEQ #FNFErr,D0 ; Expect the worst MOVEQ #FNFErr,D0 ; Expect the worst
CMP.B #cdrFilRec,cdrType(A5) ; Is this a file entry? CMP.B #cdrFilRec,cdrType(A5) ; Is this a file entry?
@ -804,7 +813,7 @@ SRFLXit1 MOVE.L D7,D2 ; Get a hold of the catalog hint
BRA.S SRFLXit3 ; If EQ, we're all set. BRA.S SRFLXit3 ; If EQ, we're all set.
SRFLXit2 MOVEQ #0,D0 SRFLXit2 MOVEQ #0,D0
SRFLXit3 jmpROM CMDDONE SRFLXit3 jmpROM ROMCMDDONE ; ex<SM1><Sys7.1> Put back "ROM"
endproc endproc
@ -823,7 +832,7 @@ GetParallelFCBFromRefnum proc export
import ParallelFCBFromRefnum import ParallelFCBFromRefnum
import RefNumCheck import RefNumCheck
jsrROM FSQUEUE ; wait our turn jsrROM ROMFSQUEUE ; wait our turn ex<SM1><Sys7.1> Put back "ROM"
move.w ioRefNum(a0),d0 ; Get the file reference number move.w ioRefNum(a0),d0 ; Get the file reference number
move.w d0,d1 ; Keep a copy in another register move.w d0,d1 ; Keep a copy in another register
@ -835,7 +844,7 @@ GetParallelFCBFromRefnum proc export
move.l a1,ioFDirIndex(a0) ; Return the pointer in ioMisc move.l a1,ioFDirIndex(a0) ; Return the pointer in ioMisc
moveq #noErr,d0 ; No error moveq #noErr,d0 ; No error
@exitGetParallelFCB @exitGetParallelFCB
jmpROM CMDDONE ; outa here jmpROM ROMCMDDONE ; outa here ex<SM1><Sys7.1> Put back "ROM"
endproc endproc
;________________________________________________________________________________ ;________________________________________________________________________________
@ -907,6 +916,15 @@ ClosePatch PatchProc _Close
movem.l @ClosePatchRegs,-(sp) ; save regs we use movem.l @ClosePatchRegs,-(sp) ; save regs we use
movea.l sp,a2 ; for safe, quick stack pointer restore movea.l sp,a2 ; for safe, quick stack pointer restore
; <Sys7.1>:
; *** NOTE: THIS PATCH IS DISABLED *** ; <R58>
; This patch was broken in System 7, and fixed with change <53>. The fix ; <R58>
; causes some third-party applications (QuicKeys, Retrospect Remote) to stop ; <R58>
; working because they are unable to close files. For Cube-E, well re-break this ; <R58>
; patch and revisit the entire issue later. ; <R58>
; <R58>
bra.s @DoClosePop ; <58> Disable this patch ; <R58>
; check the refnum for validity. and locate the parallel FCB array element ; check the refnum for validity. and locate the parallel FCB array element
move.w ioRefNum(a0),d0 ; get refnum being closed move.w ioRefNum(a0),d0 ; get refnum being closed
bsr RefNumCheck ; is it legit? bsr RefNumCheck ; is it legit?
@ -1063,7 +1081,7 @@ AccumulateDiskSwitchRectIntoUpdateRect comefrompatchproc _SetPort, DSExit
; Here we fix case 1 - rename of a volume. Fixed at the head of Rename: ; Here we fix case 1 - rename of a volume. Fixed at the head of Rename:
; This patch was rolled into TFSDIR2.a <SM1> ; This patch was rolled into TFSDIR2.a <SM1>
FixVolumeRenames PatchProc _Rename FixVolumeRenames PatchProc _Rename
jsrROM FSQUEUE ; what a queue command! jsrROM ROMFSQUEUE ; what a queue command! ex<SM1><Sys7.1> Put back "ROM"
move.l ioNewName(a0),d2 ; check out the new name move.l ioNewName(a0),d2 ; check out the new name
jsrROM DtrmV2 ; find what volume the new name is on jsrROM DtrmV2 ; find what volume the new name is on
@ -1079,7 +1097,7 @@ FixVolumeRenames PatchProc _Rename
RNmVol: RNmVol:
cmp.w #nsvErr,d0 ; make sure it's no-such-vol error cmp.w #nsvErr,d0 ; make sure it's no-such-vol error
bneROM CMDDONE bneROM ROMCMDDONE ; ex<SM1><Sys7.1> Put back "ROM"
tst.w d2 ; name length should be zero tst.w d2 ; name length should be zero
bne.s BadNewNam bne.s BadNewNam
RNmVol1: RNmVol1:
@ -1088,25 +1106,25 @@ RNmVol1:
jmpROM RNmVol1 ; go let'em do it like they used to jmpROM RNmVol1 ; go let'em do it like they used to
tst.w d3 ; Volume name must have been specified tst.w d3 ; Volume name must have been specified
beqROM CMDDONE beqROM ROMCMDDONE ; ex<SM1><Sys7.1> Put back "ROM"
jsrROM DTRMV3 ; Check source volume jsrROM ROMDTRMV3 ; Check source volume ex<SM1><Sys7.1> Put back "ROM"
bneROM CMDDONE ; Punt if no such thing bneROM ROMCMDDONE ; Punt if no such thing ex<SM1><Sys7.1> Put back "ROM"
jsrROM CVFLGS ; Can it be modified? jsrROM ROMCVFLGS ; Can it be modified? ex<SM1><Sys7.1> Put back "ROM"
bneROM CMDDONE ; Nope - punt now. bneROM ROMCMDDONE ; Nope - punt now. ex<SM1><Sys7.1> Put back "ROM"
jsrROM TFSVCBTST ; Is it a TFS volume? jsrROM ROMTFSVCBTST ; Is it a TFS volume? ex<SM1><Sys7.1> Put back "ROM"
beq.s @checkExtFS ; Yes - make sure it's not ext. FS beq.s @checkExtFS ; Yes - make sure it's not ext. FS
tst.w vcbDrvNum(a2) ; Volume on-line? tst.w vcbDrvNum(a2) ; Volume on-line?
beqROM CMDDONE ; No - just forget it beqROM ROMCMDDONE ; No - just forget it ex<SM1><Sys7.1> Put back "ROM"
jmpROM RNMVol@70 ; Yes - go and rename it jmpROM RNMVol@70 ; Yes - go and rename it
@checkExtFS: @checkExtFS:
jsrROM EXTOFFLINCK ; Our file system, on-line volume? jsrROM ROMEXTOFFLINCK ; Our file system, on-line volume? ex<SM1><Sys7.1> Put back "ROM"
bneROM CMDDONE ; If not, get out now bneROM ROMCMDDONE ; If not, get out now ex<SM1><Sys7.1> Put back "ROM"
jmpROM RNMVol@70 ; Otherwise, same as ever jmpROM RNMVol@70 ; Otherwise, same as ever
BadNewNam: BadNewNam:
moveq.l #bdNamErr,d0 ; get the error code moveq.l #bdNamErr,d0 ; get the error code
jmpROM CMDDONE ; outa here jmpROM ROMCMDDONE ; outa here ex<SM1><Sys7.1> Put back "ROM"
endproc endproc
@ -1115,12 +1133,12 @@ BadNewNam:
; bugs where we formerly didnt rename the root directory and allowed a '' name. ; bugs where we formerly didnt rename the root directory and allowed a '' name.
SetVolInfoPatch proc SetVolInfoPatch proc
jsrROM FSQUEUE ; Wait our turn jsrROM ROMFSQUEUE ; Wait our turn ex<SM1><Sys7.1> Put back "ROM"
jsrROM romDtrmV1 ; Determine volume by drvnum/refnum jsrROM romDtrmV1 ; Determine volume by drvnum/refnum
bne SVIDone ; Punt on errors bne SVIDone ; Punt on errors
jsrROM CVFLGS ; Check if volume can be modified jsrROM ROMCVFLGS ; Check if volume can be modified ex<SM1><Sys7.1> Put back "ROM"
bne SVIDone ; Give up easily bne SVIDone ; Give up easily
jsrROM EXTOFFLINCK ; Check if volume is on-line, non ext. FS jsrROM ROMEXTOFFLINCK ; Check if volume is on-line, non ext. FS ex<SM1><Sys7.1> Put back "ROM"
bne SVIDone ; Be a wimp - give up now. bne SVIDone ; Be a wimp - give up now.
move.l ioVNPtr(a0),d2 ; New name specified? move.l ioVNPtr(a0),d2 ; New name specified?
@ -1166,7 +1184,7 @@ SetUserFields:
move.l ioVNPtr(a0), d1 ; grab ptr to caller's name move.l ioVNPtr(a0), d1 ; grab ptr to caller's name
jsrROM TFSVCBTST ; Is it a TFS volume? jsrROM ROMTFSVCBTST ; Is it a TFS volume? ex<SM1><Sys7.1> Put back "ROM"
bne.s @skipHFS ; br if not - MFS VCBs don't have this info bne.s @skipHFS ; br if not - MFS VCBs don't have this info
move.l ioVClpSiz(a0),vcbClpSiz(a2) ; Volume clump size move.l ioVClpSiz(a0),vcbClpSiz(a2) ; Volume clump size
move.l ioVBkup(a0),vcbVolBkup(a2) ; Last backup date move.l ioVBkup(a0),vcbVolBkup(a2) ; Last backup date
@ -1187,7 +1205,7 @@ SetUserFields:
move.b d0, (a1)+ ; jam our length byte move.b d0, (a1)+ ; jam our length byte
_BlockMove ; change the name _BlockMove ; change the name
jsrROM TFSVCBTST ; Are we dealing with an MFS volume? jsrROM ROMTFSVCBTST ; Are we dealing with an MFS volume? ex<SM1><Sys7.1> Put back "ROM"
bne.s @skipRootRename ; if so, no root to rename bne.s @skipRootRename ; if so, no root to rename
; rename the root ; rename the root
@ -1204,7 +1222,7 @@ SetUserFields:
moveq.l #noErr,d0 ; All went well... moveq.l #noErr,d0 ; All went well...
SVIDone: SVIDone:
jmpROM CMDDONE jmpROM ROMCMDDONE ; ex<SM1><Sys7.1> Put back "ROM"
endproc endproc
;__________________________________________________________________________________ ;__________________________________________________________________________________
@ -1301,12 +1319,12 @@ myCMSetUp PatchProc jCMSetup,(Plus,SE,II,IIci,Portable)
@BugOut ; clean up A6 & A7 stacks and jump back to rom @BugOut ; clean up A6 & A7 stacks and jump back to rom
addq.w #4,A7 ; remove return addr to Rename addq.w #4,A7 ; remove return addr to Rename
move.l (A6)+,D2 ; recover rounded string length move.l (A6)+,D2 ; recover rounded string length
jsrRom POPCNAME ; remove name from A6 stack jsrRom ROMPOPCNAME ; remove name from A6 stack ex<SM1><Sys7.1> Put back "ROM"
@RNmExit cmp.w #BTExists,D0 ; B*-Tree error? @RNmExit cmp.w #BTExists,D0 ; B*-Tree error?
bne.s @FinalExit bne.s @FinalExit
moveq #dupFNErr,D0 ; If entry exists, give better error code moveq #dupFNErr,D0 ; If entry exists, give better error code
@FinalExit jmpRom CMDDONE ; and now back to our regularly scheduled broadcast... @FinalExit jmpRom ROMCMDDONE ; and now back to our regularly scheduled broadcast... ex<SM1><Sys7.1> Put back "ROM"
; CMSvcs calls "MarkVCBTime", which only set the mod time but doesn't mark VCB dirty. ; CMSvcs calls "MarkVCBTime", which only set the mod time but doesn't mark VCB dirty.
@ -1521,7 +1539,7 @@ dirCreateTrapWord equ selectDirCreate
suba.l a0, a0 ; go after the parent suba.l a0, a0 ; go after the parent
move.l (a6)+,d0 ; retrieve target parent directory move.l (a6)+,d0 ; retrieve target parent directory
jsrROM LOCCREC jsrROM ROMLOCCREC ; ex<SM1><Sys7.1> Put back "ROM"
bne.s @dirNotFound bne.s @dirNotFound
cmpi.b #cdrThdRec,cdrType(a1) ; is it a directory thread? cmpi.b #cdrThdRec,cdrType(a1) ; is it a directory thread?
beq.s @fileNotFound ; yes, so it was just the leaf that was missing beq.s @fileNotFound ; yes, so it was just the leaf that was missing
@ -1664,7 +1682,7 @@ OpenAttemptHook: proc
; This patch was rolled into TFSDIR1.a ; This patch was rolled into TFSDIR1.a
PreflightFileOpen proc PreflightFileOpen proc
jsrROM FSQUEUE ; serialize things jsrROM ROMFSQUEUE ; serialize things ex<SM1><Sys7.1> Put back "ROM"
bsr OpenAttemptHook ; tell'em we're trying bsr OpenAttemptHook ; tell'em we're trying
ST RegRsrc ; open regular part of file <39> ST RegRsrc ; open regular part of file <39>
jmpROM FOpen1 jmpROM FOpen1
@ -1685,7 +1703,7 @@ PreflightFileOpen proc
; This patch was rolled into TFSDIR1.a ; This patch was rolled into TFSDIR1.a
PreflightOpenRF PatchProc _OpenRF PreflightOpenRF PatchProc _OpenRF
jsrROM FSQUEUE ; serialize things jsrROM ROMFSQUEUE ; serialize things ex<SM1><Sys7.1> Put back "ROM"
bsr OpenAttemptHook ; tell'em we're trying bsr OpenAttemptHook ; tell'em we're trying
clr.b RegRsrc ; open resource part of file <39> clr.b RegRsrc ; open resource part of file <39>
jmpROM FOpen1 jmpROM FOpen1
@ -1733,7 +1751,7 @@ PreflightOpenRF PatchProc _OpenRF
AllocateFCBs proc AllocateFCBs proc
import MoreFCBs import MoreFCBs
jsrROM FSQUEUE ; wait our turn jsrROM ROMFSQUEUE ; wait our turn ex<SM1><Sys7.1> Put back "ROM"
moveq.l #-1,d0 ; more FCBs than we'll ever have moveq.l #-1,d0 ; more FCBs than we'll ever have
bsr CountFCBs ; count all of them bsr CountFCBs ; count all of them
@ -1757,7 +1775,7 @@ AllocateFCBs proc
move.w d3,d2 ; otherwise, just grow as much as we can move.w d3,d2 ; otherwise, just grow as much as we can
@grow: @grow:
bsr MoreFCBs ; try to get the FCBs jsr MoreFCBs ; try to get the FCBs ex<SM1><Sys7.1> Put back "ROM"
beq.s @gotSome ; leave with a smile beq.s @gotSome ; leave with a smile
asr.w #1,d2 ; try to get half that many asr.w #1,d2 ; try to get half that many
@ -1778,7 +1796,7 @@ AllocateFCBs proc
beq.s @noFCBsAvailable ; if none are left, report the problem beq.s @noFCBsAvailable ; if none are left, report the problem
moveq.l #noErr,d0 ; if some are left, we're happy moveq.l #noErr,d0 ; if some are left, we're happy
@exit: jmpROM CMDDONE @exit: jmpROM ROMCMDDONE ; ex<SM1><Sys7.1> Put back "ROM"
@noFCBsAvailable: @noFCBsAvailable:
moveq.l #tmfoErr,d0 moveq.l #tmfoErr,d0
@ -1945,7 +1963,7 @@ FixDtrmV3: PatchProc jDtrmV3,(II,IIci,Portable)
; This patch was rolled into TFSVOL.a ; This patch was rolled into TFSVOL.a
MountVolFor1991 PatchProc _MountVol MountVolFor1991 PatchProc _MountVol
jsrROM FSQUEUESYNC jsrROM ROMFSQUEUESYNC ; ex<SM1><Sys7.1> Put back "ROM"
movea.l a0, a5 ; save caller's pb movea.l a0, a5 ; save caller's pb
move.w ioDrvNum(a5), d2 ; where FindDrive likes it move.w ioDrvNum(a5), d2 ; where FindDrive likes it
@ -2030,7 +2048,7 @@ Remount:
move.w d2,vcbDrvNum(a2) ; drive number move.w d2,vcbDrvNum(a2) ; drive number
move.w d1,vcbDRefNum(a2) ; driver RefNum move.w d1,vcbDRefNum(a2) ; driver RefNum
jsrROM TFSVCBTST ; remounted a TFS volume? <32> jsrROM ROMTFSVCBTST ; remounted a TFS volume? <32> ex<SM1><Sys7.1> Put back "ROM"
bne.s NoErrExit ; Nope - don't mess with the MDB <33> bne.s NoErrExit ; Nope - don't mess with the MDB <33>
btst.b #vcbWrProt,vcbAtrb+1(a2); Is volume write protected? <32> btst.b #vcbWrProt,vcbAtrb+1(a2); Is volume write protected? <32>
bne.s NoErrExit ; If so, don't try to flush the MDB <33> bne.s NoErrExit ; If so, don't try to flush the MDB <33>
@ -2053,7 +2071,7 @@ EarlyExit:
btst.b #fsNoAllocate, FSVars.fsFlags(a1) btst.b #fsNoAllocate, FSVars.fsFlags(a1)
beqROM OldMtVolAfterFSQueue ; join the ROM (BTW, skipping the _Offline heroics) beqROM OldMtVolAfterFSQueue ; join the ROM (BTW, skipping the _Offline heroics)
@1: @1:
jmpROM CMDDONE jmpROM ROMCMDDONE ; ex<SM1><Sys7.1> Put back "ROM"
endproc endproc
;_______________________________________________________________________ ;_______________________________________________________________________
@ -2076,18 +2094,18 @@ EarlyExit:
; These patches were rolled into TFSVOL.a ; These patches were rolled into TFSVOL.a
NoCloseOnOffline PatchProc _Offline NoCloseOnOffline PatchProc _Offline
import OfflineEjectCommon import OfflineEjectCommon
jsrROM FSQUEUESYNC ; wait until all current calls are done jsrROM ROMFSQUEUESYNC ; wait until all current calls are done ex<SM1><Sys7.1> Put back "ROM"
st NoEject ; -1 = send offline but don't eject st NoEject ; -1 = send offline but don't eject
jmp OfflineEjectCommon ; share code with Eject jmp OfflineEjectCommon ; share code with Eject
endproc endproc
NoCloseOnEject PatchProc _Eject NoCloseOnEject PatchProc _Eject
export OfflineEjectCommon export OfflineEjectCommon
jsrROM FSQUEUESYNC ; wait until all current calls are done jsrROM ROMFSQUEUESYNC ; wait until all current calls are done ex<SM1><Sys7.1> Put back "ROM"
clr.b NoEject ; 0 = offline + eject clr.b NoEject ; 0 = offline + eject
OfflineEjectCommon OfflineEjectCommon
jsrROM DTRMV3 ; check name, drive number, etc. jsrROM ROMDTRMV3 ; check name, drive number, etc. ex<SM1><Sys7.1> Put back "ROM"
bne.s ejectNotMounted ; br if drive not mounted (why flush?) bne.s ejectNotMounted ; br if drive not mounted (why flush?)
jsrROM romCkExtFS ; see if it's for an external fs jsrROM romCkExtFS ; see if it's for an external fs
bne.s EjectDone ; exit if so bne.s EjectDone ; exit if so
@ -2103,7 +2121,7 @@ ejectDrvNum:
beqROM EjectIt ; OK, OK; it's going already... beqROM EjectIt ; OK, OK; it's going already...
ejectDone: ejectDone:
jmpROM CMDDONE ; we're done . . . jmpROM ROMCMDDONE ; we're done . . . ex<SM1><Sys7.1> Put back "ROM"
ejectMounted: ejectMounted:
lea.l vcbDrvNum(a2),a1 ; point into VCB at drive number lea.l vcbDrvNum(a2),a1 ; point into VCB at drive number
@ -2138,13 +2156,13 @@ ejectOnLine:
@5: st FlushOnly ; only flushing (don't close . . .) @5: st FlushOnly ; only flushing (don't close . . .)
jsrROM FlushVFiles ; flush all files on this volume jsrROM FlushVFiles ; flush all files on this volume
jsrROM TFSVCBTST ; Are we dealing with a TFS volume? jsrROM ROMTFSVCBTST ; Are we dealing with a TFS volume? ex<SM1><Sys7.1> Put back "ROM"
bneROM OfflineEjectCallsMFSFlush ; Nope, so join ROM to do MFS right bneROM OfflineEjectCallsMFSFlush ; Nope, so join ROM to do MFS right
; note that the following line is the opposite of the ROM code. We only want to flush ; note that the following line is the opposite of the ROM code. We only want to flush
; these files, since _Unmount will close them later. However, we do want to mark the ; these files, since _Unmount will close them later. However, we do want to mark the
; vcb consistent as it goes offline. ; vcb consistent as it goes offline.
jsrROM CVFLGS ; Is volume write protected? <31> jsrROM ROMCVFLGS ; Is volume write protected? <31> ex<SM1><Sys7.1> Put back "ROM"
bne.s @1 ; If so, don't try to mark it dirty <31> bne.s @1 ; If so, don't try to mark it dirty <31>
bset.b #vcbAtVOK,vcbAtrb(a2) ; Indicate vol was unmounted ok <31> bset.b #vcbAtVOK,vcbAtrb(a2) ; Indicate vol was unmounted ok <31>
jsrROM MarkVCBDirty ; mark VCB dirty so it will be written <31> jsrROM MarkVCBDirty ; mark VCB dirty so it will be written <31>
@ -2240,15 +2258,15 @@ DesktopCloseDownProc: proc
;_______________________________________________________________________ ;_______________________________________________________________________
UnmountForTheNineties: PatchProc _UnMountVol UnmountForTheNineties: PatchProc _UnMountVol
bsr DesktopCloseDownProc ; go take care of the desktop database <36> jsr DesktopCloseDownProc ; go take care of the desktop database <36> ex<SM1><Sys7.1>
; The desktop file hack should no longer be necessary for the 7.0 version of the AppleShare client. ; The desktop file hack should no longer be necessary for the 7.0 version of the AppleShare client.
IncludeAppleShareDesktopHack equ 0 IncludeAppleShareDesktopHack equ 0
jsrROM FSQUEUESYNC ; Get in sync... jsrROM ROMFSQUEUESYNC ; Get in sync... ex<SM1><Sys7.1> Put back "ROM"
clr.b FlushOnly ; Setup same as UnmountVol clr.b FlushOnly ; Setup same as UnmountVol
jsrROM DTRMV3 ; Call DtrmV3 to do setup stuff jsrROM ROMDTRMV3 ; Call DtrmV3 to do setup stuff ex<SM1><Sys7.1> Put back "ROM"
bneROM CMDDONE ; and split on errors bneROM ROMCMDDONE ; and split on errors ex<SM1><Sys7.1> Put back "ROM"
moveq #0,d0 ; Initialize result code moveq #0,d0 ; Initialize result code
btst #HFSBit,ioTrap(a0) ; Unconditional unmount? btst #HFSBit,ioTrap(a0) ; Unconditional unmount?
@ -2292,19 +2310,19 @@ IncludeAppleShareDesktopHack equ 0
@5 @5
movem.l (sp)+,a1/d1/d2 ; Restore regs movem.l (sp)+,a1/d1/d2 ; Restore regs
tst.w d0 ; Were files open? tst.w d0 ; Were files open?
bneROM CMDDONE ; and quit on errors bneROM ROMCMDDONE ; and quit on errors ex<SM1><Sys7.1> Put back "ROM"
FlUnMnt: FlUnMnt:
jsrROM romCkExtFS ; see if it's for an external fs jsrROM romCkExtFS ; see if it's for an external fs
bneROM CMDDONE ; and split on errors bneROM ROMCMDDONE ; and split on errors ex<SM1><Sys7.1> Put back "ROM"
jsrROM FlushVFiles ; flush all files on this volume jsrROM FlushVFiles ; flush all files on this volume
bneROM CMDDONE ; and split on errors bneROM ROMCMDDONE ; and split on errors ex<SM1><Sys7.1> Put back "ROM"
; All files on this volume are flushed now. Update the volume information as ; All files on this volume are flushed now. Update the volume information as
; appropriate, depending on the file structure: ; appropriate, depending on the file structure:
jsrROM TFSVCBTST ; is this a TFS volume? jsrROM ROMTFSVCBTST ; is this a TFS volume? ex<SM1><Sys7.1> Put back "ROM"
beq.s @1 ; br if so beq.s @1 ; br if so
jmpROM FlUnMntAfterMFSCheck ; the ROM has is right for MFS volumes jmpROM FlUnMntAfterMFSCheck ; the ROM has is right for MFS volumes
@ -2342,7 +2360,7 @@ BackInFlUnMnt:
moveq.l #noErr,d0 ; no error moveq.l #noErr,d0 ; no error
FlVolExit FlVolExit
jmpROM CMDDONE jmpROM ROMCMDDONE ; ex<SM1><Sys7.1> Put back "ROM"
endproc endproc
@ -3029,7 +3047,7 @@ ProcessMgrExists proc export
TagFileWithPSN TagFileWithPSN
; Open traps can be (and are!) called before Process Mgr is init'd ; Open traps can be (and are!) called before Process Mgr is init'd
bsr ProcessMgrExists ; is Process Mgr ready? jsr ProcessMgrExists ; is Process Mgr ready? ex<SM1><Sys7.1> Put back "ROM"
bne.s @CantRecord ; Process Mgr is not ready yet bne.s @CantRecord ; Process Mgr is not ready yet
; find the current PSN ; find the current PSN
@ -3089,7 +3107,7 @@ FSCleanupRegs REG A2-A3/D2-D6
MOVE cbPBufULen(A2),D4 ; D4=ext. FCB unit size MOVE cbPBufULen(A2),D4 ; D4=ext. FCB unit size
LEA fcbPBufData(A2),A2 ; A2=ext. fcb array LEA fcbPBufData(A2),A2 ; A2=ext. fcb array
MOVE FSFCBLen,D5 ; D5=FCB len MOVE FSFCBLen,D5 ; D5=FCB len
jsrROM GT1STFCB ; A1=FCB, D1=1st RefNum jsrROM ROMGT1STFCB ; A1=FCB, D1=1st RefNum ex<SM1><Sys7.1> Put back "ROM"
; First close all the open files belong to this process: ; First close all the open files belong to this process:
; A1=FCBptr, A2=Ext. FCBptr, D1.W=RefNum, D2=id2, D3.W=loop index, ; A1=FCBptr, A2=Ext. FCBptr, D1.W=RefNum, D2=id2, D3.W=loop index,
@ -3187,8 +3205,8 @@ clearPB MOVEA.L A0,A3 ; A3=A0=iopb
;_______________________________________________________________________________________ ;_______________________________________________________________________________________
; This patch was rolled into TFSVOL.a ; This patch was rolled into TFSVOL.a
OpenWDPatch Proc export OpenWDPatch Proc export
jsrROM FSQUEUE ; Wait for our turn to come jsrROM ROMFSQUEUE ; Wait for our turn to come ex<SM1><Sys7.1> Put back "ROM"
jsrROM FNDFILNAME ; Look for the indicated directory jsrROM ROMFNDFILNAME ; Look for the indicated directory ex<SM1><Sys7.1> Put back "ROM"
BEQ.S @1 ; Br if found BEQ.S @1 ; Br if found
CMP.W #BdNamErr,D0 ; Was it a bad filename? <21Sep85> CMP.W #BdNamErr,D0 ; Was it a bad filename? <21Sep85>
BNE.S opnWDExit ; If not, there's no more hope <21Sep85> BNE.S opnWDExit ; If not, there's no more hope <21Sep85>
@ -3211,7 +3229,7 @@ OpenWDPatch Proc export
@2 MOVE.W VCBVRefNum(A2),ioVRefNum(A0) ; Return the VRefNum as WDRfn <21Sep85> @2 MOVE.W VCBVRefNum(A2),ioVRefNum(A0) ; Return the VRefNum as WDRfn <21Sep85>
opnWDOK MOVEQ #0,D0 ; Call it a success <21Sep85> opnWDOK MOVEQ #0,D0 ; Call it a success <21Sep85>
opnWDExit jmpROM CMDDONE ; we're finished . . . opnWDExit jmpROM ROMCMDDONE ; we're finished . . . ex<SM1><Sys7.1> Put back "ROM"
; Look for a matching working directory, starting with the third (the first two are ; Look for a matching working directory, starting with the third (the first two are
; reserved to hold the system-wide volume and directory defaults). ; reserved to hold the system-wide volume and directory defaults).
@ -4018,7 +4036,7 @@ DontTruncateMultiForks ComeFromPatchProc $A0DB,,(Plus,SE,II,Portable,IIci) ; <11
MOVE.L FCBFlNm(A1,D3.W),D2 ; D2.L = our file number <11Dec90 #17> MOVE.L FCBFlNm(A1,D3.W),D2 ; D2.L = our file number <11Dec90 #17>
move.b fcbMdRByt(a1,d3.w),d4 ; d4.b = our fork's misc info <44> move.b fcbMdRByt(a1,d3.w),d4 ; d4.b = our fork's misc info <44>
jsrROM GT1STFCB ; get (A1,D1) pointing to first FCB <11Dec90 #17> jsrROM ROMGT1STFCB ; get (A1,D1) pointing to first FCB <11Dec90 #17> ex<SM1><Sys7.1> Put back "ROM"
@1 CMP.W D1,D3 ; same FCB? <11Dec90 #17> @1 CMP.W D1,D3 ; same FCB? <11Dec90 #17>
BEQ.S @3 ; skip ourself if it is <11Dec90 #17> BEQ.S @3 ; skip ourself if it is <11Dec90 #17>
CMP.L FCBFlNm(A1,D1),D2 ; file numbers match? <11Dec90 #17> CMP.L FCBFlNm(A1,D1),D2 ; file numbers match? <11Dec90 #17>
@ -4029,7 +4047,7 @@ DontTruncateMultiForks ComeFromPatchProc $A0DB,,(Plus,SE,II,Portable,IIci) ; <11
eor.b d4,d0 ; see how it compares against ours <44> eor.b d4,d0 ; see how it compares against ours <44>
btst.l #fcbRscBit,d0 ; are we the same? <44> btst.l #fcbRscBit,d0 ; are we the same? <44>
beq.s @7 ; if so, then there's another open path <44> beq.s @7 ; if so, then there's another open path <44>
@3 jsrROM GTNXTFCB ; get next one until we run out <11Dec90 #17> @3 jsrROM ROMGTNXTFCB ; get next one until we run out <11Dec90 #17> ex<SM1><Sys7.1> Put back "ROM"
BCS.S @1 ; continue if more <11Dec90 #17> BCS.S @1 ; continue if more <11Dec90 #17>
; No second open path found, so do the truncate ; No second open path found, so do the truncate
@ -4741,7 +4759,7 @@ BDUpdDepth
MOVEQ #0,D1 ; locate key and data for 1st record <10Oct85> MOVEQ #0,D1 ; locate key and data for 1st record <10Oct85>
MOVEA.L A3,A1 ; MOVEA.L A3,A1 ;
jsrRom LOCREC ; ... in node <10Oct85> jsrRom ROMLOCREC ; ... in node <10Oct85> ex<SM1><Sys7.1> Put back "ROM"
MOVE.L (A1),BTCRoot(A4) ; new root = child node <10Oct85> MOVE.L (A1),BTCRoot(A4) ; new root = child node <10Oct85>
; ;
; release the previous root node ; release the previous root node
@ -4905,13 +4923,13 @@ GetVolParms: proc export
@GetVolRegs reg d2/d3/a1-a4 @GetVolRegs reg d2/d3/a1-a4
bclr #asyncTrpBit, ioTrap(a0) ; force synchronous (wrong. See note, above) bclr #asyncTrpBit, ioTrap(a0) ; force synchronous (wrong. See note, above)
jsrRom FSQUEUE ; Patiently wait our turn in line jsrRom ROMFSQUEUE ; Patiently wait our turn in line ex<SM1><Sys7.1> Put back "ROM"
movem.l @GetVolRegs, -(a6) ; save regs on FS stack movem.l @GetVolRegs, -(a6) ; save regs on FS stack
suba.w @VolParmsBufferSize, a6 ; allocate a GetVolParms buffer on the stack suba.w @VolParmsBufferSize, a6 ; allocate a GetVolParms buffer on the stack
; ;
; Find the VCB in question: ; Find the VCB in question:
; ;
jsrRom DTRMV3 ; find vol using ioNamePtr & ioVRefNum (D023/A234 trashed) jsrRom ROMDTRMV3 ; find vol using ioNamePtr & ioVRefNum (D023/A234 trashed) ex<SM1><Sys7.1> Put back "ROM"
bne.s @GetVolParmsExit ; (DtrmV3 puts VCBPtr in A2) bne.s @GetVolParmsExit ; (DtrmV3 puts VCBPtr in A2)
tst.w vcbFSID(a2) ; Check: external file system? (•• TFSVCBTst?) tst.w vcbFSID(a2) ; Check: external file system? (•• TFSVCBTst?)
@ -4961,7 +4979,7 @@ GetVolParms: proc export
@GetVolParmsExit: @GetVolParmsExit:
movem.l (a6)+, @GetVolRegs ; restore regs movem.l (a6)+, @GetVolRegs ; restore regs
jmpROM CMDDONE ; Go home jmpROM ROMCMDDONE ; Go home ex<SM1><Sys7.1> Put back "ROM"
; This buffer contains the appropriate values for local HFS volumes. ; This buffer contains the appropriate values for local HFS volumes.
@HFSVolParmsBuffer: @HFSVolParmsBuffer:
@ -5057,7 +5075,7 @@ WriteCountInit
MOVE.L VCBQHdr+QHead,D0 ; search the VCB queue MOVE.L VCBQHdr+QHead,D0 ; search the VCB queue
BEQ.S wcEndq ; br if end of queue reached BEQ.S wcEndq ; br if end of queue reached
CkVol: MOVE.L D0,A2 ; next VCB pointer CkVol: MOVE.L D0,A2 ; next VCB pointer
jsrRom TFSVCBTST ; is this a HFS volume? jsrRom ROMTFSVCBTST ; is this a HFS volume? ex<SM1><Sys7.1> Put back "ROM"
BNE.S @6 ; No, don't bother BNE.S @6 ; No, don't bother
TST vcbFSID(A2) ; internal HFS? (do we need to test this?) TST vcbFSID(A2) ; internal HFS? (do we need to test this?)
BNE.S @6 ; No, don't bother BNE.S @6 ; No, don't bother
@ -5121,7 +5139,7 @@ GrowFileSystemStack:
moveq.l #0,d0 ; use selector 0 moveq.l #0,d0 ; use selector 0
move.w #$a060,d1 ; and pretend we're trap _HFSDispatch move.w #$a060,d1 ; and pretend we're trap _HFSDispatch
jsrROM FSQUEUE ; and sync up with the file system jsrROM ROMFSQUEUE ; and sync up with the file system ex<SM1><Sys7.1> Put back "ROM"
; first we use the old equate to get the pointer block's base address ; first we use the old equate to get the pointer block's base address
move.l HFSStkTop,a0 ; current stack top move.l HFSStkTop,a0 ; current stack top
@ -5136,7 +5154,7 @@ GrowFileSystemStack:
move.l a0,HFSStkTop ; Store pointer in lo-mem move.l a0,HFSStkTop ; Store pointer in lo-mem
moveq.l #noErr,d0 ; success! moveq.l #noErr,d0 ; success!
jmpROM CMDDONE jmpROM ROMCMDDONE ; ex<SM1><Sys7.1> Put back "ROM"
@bail: @bail:
moveq.l #dsMemFullErr, d0 ; sys heap is full, so punt moveq.l #dsMemFullErr, d0 ; sys heap is full, so punt
@ -5237,7 +5255,7 @@ InstallVectors PROC export
leaResident vAfterFSQHook, a0 ; get addr just past call to fsQueueHook (in fsQueueHook patch) leaResident vAfterFSQHook, a0 ; get addr just past call to fsQueueHook (in fsQueueHook patch)
move.l a0, ExpandMemRec.jAfterFSQHook(a1) move.l a0, ExpandMemRec.jAfterFSQHook(a1)
leaROM CMDDONE , a0 ; get addr of CmdDone (still in ROM) leaROM ROMCMDDONE, a0 ; get addr of CmdDone (still in ROM) ex<SM1><Sys7.1> Put back "ROM"
move.l a0, ExpandMemRec.jCmdDone(a1) move.l a0, ExpandMemRec.jCmdDone(a1)
leaResident fsGeneralWakeUp, a0 ; get addr of general purpose File System kickstart leaResident fsGeneralWakeUp, a0 ; get addr of general purpose File System kickstart
move.l a0, ExpandMemRec.jDispatchNext(a1) move.l a0, ExpandMemRec.jDispatchNext(a1)

View File

@ -1,3 +1,14 @@
#
# Hacks to match MacOS (most recent first):
#
# <Sys7.1> 8/3/92 Removed TFS.a (i.e. HFS) from the lpch build altogether -- all the
# supported ROMs have it. Moved DiskCache.a back from the lpch to ptch 41.
# Removed BTreeMgr.lib from here, to be included in the lpch build
# elsewhere. Added (Later)FileMgrPatches.a and CMSvcsExtras.a back to the
# lpch build.
# 9/2/94 SuperMario ROM source dump (header preserved below)
#
# #
# File: HFS.make # File: HFS.make
# #
@ -19,36 +30,42 @@ HFSBTreeDir = {HFSExtensionsDir}BTreeMgr:
#include {HFSBTreeDir}BTreeMgr.Make #include {HFSBTreeDir}BTreeMgr.Make
HFSObjs = "{LibDir}BTreeMgr.lib" HFSObjs =
"{ObjDir}BTAlloc.a.o" ∂ "{ObjDir}BTAlloc.a.o" ∂
"{ObjDir}BTMaint1.a.o" ∂ "{ObjDir}BTMaint1.a.o" ∂
"{ObjDir}BTMaint2.a.o" ∂ "{ObjDir}BTMaint2.a.o" ∂
"{ObjDir}BTSVCS.a.o" ∂
"{ObjDir}QMgr.a.o" ∂
"{ObjDir}cache.a.o" ∂
"{ObjDir}TFS.a.o" ∂
"{ObjDir}cacheio.a.o" ∂
"{ObjDir}cmmaint.a.o" ∂
"{ObjDir}cmsvcs.a.o" ∂
"{ObjDir}FXM.a.o" ∂
"{ObjDir}ExternalMakeFSSpec.a.o" ∂
"{ObjDir}BTPScan.a.o" ∂ "{ObjDir}BTPScan.a.o" ∂
"{ObjDir}BTSVCS.a.o" ∂
"{ObjDir}cache.a.o" ∂
"{ObjDir}cacheio.a.o" ∂
"{ObjDir}CacheControl.a.o" ∂ "{ObjDir}CacheControl.a.o" ∂
"{ObjDir}CatSearch.a.o" ∂ "{ObjDir}CatSearch.a.o" ∂
"{ObjDir}cmmaint.a.o" ∂
"{ObjDir}cmsvcs.a.o" ∂
"{ObjDir}CMSvcsExtras.a.o" # <Sys7.1> ∂
"{ObjDir}DTDBMgr.a.o" ∂
"{ObjDir}ExternalMakeFSSpec.a.o" ∂
"{ObjDir}FileMgrPatches.a.o" # <Sys7.1> ∂
"{ObjDir}LaterFileMgrPatches.a.o" # <Sys7.1> ∂
"{ObjDir}FileIDs.a.o" ∂ "{ObjDir}FileIDs.a.o" ∂
"{ObjDir}FileIDsSvcs.a.o" ∂ "{ObjDir}FileIDsSvcs.a.o" ∂
"{ObjDir}FSpDispatch.a.o" ∂ "{ObjDir}FSpDispatch.a.o" ∂
"{ObjDir}FSSpecCalls.c.o" ∂ "{ObjDir}FSSpecCalls.c.o" ∂
"{ObjDir}FXM.a.o" ∂
"{ObjDir}MakeFSSpec.a.o" ∂ "{ObjDir}MakeFSSpec.a.o" ∂
"{ObjDir}QMgr.a.o" ∂
"{ObjDir}vsm.a.o" ∂ "{ObjDir}vsm.a.o" ∂
"{ObjDir}DTDBMgr.a.o" ∂
"{ObjDir}DiskCache.a.o"
"{LibDir}HFS.lib" ƒ {HFSObjs} "{LibDir}HFS.lib" ƒ {HFSObjs}
Lib {StdLibOpts} -o "{Targ}" {HFSObjs} Lib {StdLibOpts} -o "{Targ}" {HFSObjs}
# <Sys7.1>
"{RsrcDir}DiskCache.a.rsrc" ƒ "{ObjDir}DiskCache.a.o"
Link {StdLOpts} {StdAlign} -o "{Targ}" -rt RSRC=0 "{ObjDir}DiskCache.a.o"
"{ObjDir}BTAlloc.a.o" ƒ "{ObjDir}StandardEqu.d" ∂ "{ObjDir}BTAlloc.a.o" ƒ "{ObjDir}StandardEqu.d" ∂
"{AIncludes}SonyEqu.a" ∂ "{AIncludes}SonyEqu.a" ∂
"{HFSDir}BTAlloc.a" "{HFSDir}BTAlloc.a"
@ -212,3 +229,16 @@ HFSObjs = "{LibDir}BTreeMgr.lib" ∂
"{IntAIncludes}DiskCachePriv.a" ∂ "{IntAIncludes}DiskCachePriv.a" ∂
"{IntAIncludes}FileMgrPrivate.a" "{IntAIncludes}FileMgrPrivate.a"
Asm {StdAOpts} -o "{Targ}" "{HFSCacheDir}DiskCache.a" Asm {StdAOpts} -o "{Targ}" "{HFSCacheDir}DiskCache.a"
# <Sys7.1>
"{ObjDir}CMSvcsExtras.a.o" ƒ "{HFSExtensionsDir}CMSvcsExtras.a"
Asm {StdAOpts} -o "{Targ}" "{HFSExtensionsDir}CMSvcsExtras.a"
# <Sys7.1>
"{ObjDir}FileMgrPatches.a.o" ƒ "{HFSDir}FileMgrPatches.a"
Asm {StdAOpts} -o "{Targ}" -d SonyNonPortable -i "{HFSDir}Extensions:" "{HFSDir}FileMgrPatches.a"
# <Sys7.1>
"{ObjDir}LaterFileMgrPatches.a.o" ƒ "{HFSDir}LaterFileMgrPatches.a"
Asm {StdAOpts} -o "{Targ}" "{HFSDir}LaterFileMgrPatches.a"

View File

@ -1,3 +1,10 @@
#
# Hacks to match MacOS (most recent first):
#
# <Sys7.1> 8/3/92 Added rule for MMUPatches.a, which is separately linked into the lpch.
# 9/2/94 SuperMario ROM source dump (header preserved below)
#
# #
# File: MMU.Make # File: MMU.Make
# #
@ -49,3 +56,8 @@ MMUObjs = "{ObjDir}MMU.a.o" ∂
Asm {StdAOpts} -o "{Targ}" "{MMUDir}GetReal.a" Asm {StdAOpts} -o "{Targ}" "{MMUDir}GetReal.a"
# <Sys7.1>
"{ObjDir}MMUPatches.a.o" ƒ "{MMUDir}MMUPatches.a"
Asm {StdAOpts} -o "{Targ}" "{MMUDir}MMUPatches.a"

491
OS/PPC/PPCDsp.c Normal file
View File

@ -0,0 +1,491 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Decompiled from scratch
*/
#ifndef __TYPES__
#include <Types.h>
#endif
#ifndef __FILES__
#include <Files.h>
#endif
#ifndef __MEMORY__
#include <Memory.h>
#endif
#ifndef __ERRORS__
#include <Errors.h>
#endif
#ifndef __RESOURCES__
#include <Resources.h>
#endif
#ifndef __TOOLUTILS__
#include <ToolUtils.h>
#endif
#ifndef __OSUTILS__
#include <OSUtils.h>
#endif
#ifndef __DEVICES__
#include <Devices.h>
#endif
#ifndef __POWER__
#include <Power.h>
#endif
#include <BTEqu.h>
#include "UserGroup.h"
#ifndef __APPLETALK__
#include <AppleTalk.h>
#endif
#ifndef __ADSP__
#include "ADSP.h"
#endif
#ifndef __PPCTOOLBOX__
#include <PPCToolBox.h>
#endif
#ifndef __STDDEF__
#include <StdDef.h>
#endif
#include "PPCCommon.h"
OSErr OpenADSPDriver(short *refNum) //26cc4
{
// ROM:00126CC4 link a6,#0
// ROM:00126CC8 subq.l #2,sp
// ROM:00126CCA pea unk_126CDC
// ROM:00126CCE move.l 8(a6),-(sp)
// ROM:00126CD2 ori.b #$D7,d0
// ROM:00126CD6 move.w (sp)+,d0
// ROM:00126CD8 unlk a6
// ROM:00126CDA rts
return OpenDriver("\p.DSP", refNum);
}
OSErr CreateConnectionListener(Ptr ccbPtr, //8
DSPParamBlock *dsp, //c
unsigned short dspDrvrRef, //10
unsigned char socket, //12
Boolean async, //14
ProcPtr compRoutine) //16 //26ce2
{
// ROM:00126CE2
// ROM:00126CE2 link a6,#0
// ROM:00126CE6 movem.l a3-a4,-(sp)
// ROM:00126CEA movea.l $C(a6),a3
// ROM:00126CEE lea $22(a3),a4
// ROM:00126CF2 move.w $12(a6),$18(a3)
// ROM:00126CF8 move.w #$FB,$1A(a3)
// ROM:00126CFE move.l $1C(a6),$C(a3)
// ROM:00126D04 move.l 8(a6),(a4)
// ROM:00126D08 moveq #0,d0
// ROM:00126D0A move.l d0,4(a4)
// ROM:00126D0E clr.w 8(a4)
// ROM:00126D12 clr.w $E(a4)
// ROM:00126D16 move.l d0,$A(a4)
// ROM:00126D1A move.l d0,$10(a4)
// ROM:00126D1E move.l d0,$14(a4)
// ROM:00126D22 move.b $17(a6),$18(a4)
// ROM:00126D28 move.l a3,-(sp)
// ROM:00126D2A subq.l #2,sp
// ROM:00126D2C move.l a3,-(sp)
// ROM:00126D2E move.b $1B(a6),-(sp)
// ROM:00126D32 ori.b #$DF,d5
// ROM:00126D36 move.w (sp)+,d0
// ROM:00126D38 ext.l d0
// ROM:00126D3A move.l d0,-(sp)
// ROM:00126D3C ori.b #$20,d0 ; jsr DMFix
// ROM:00126D40 movem.l -8(a6),a3-a4
// ROM:00126D46 unlk a6
// ROM:00126D48 rts
struct TRinitParams *params = &(dsp->u.initParams);
dsp->ioCRefNum = dspDrvrRef;
dsp->csCode = dspCLInit;
dsp->ioCompletion = compRoutine;
params->ccbPtr = ccbPtr;
params->userRoutine = NULL;
params->sendQSize = 0;
params->recvQSize = 0;
params->sendQueue = NULL;
params->recvQueue = NULL;
params->attnPtr = NULL;
params->localSocket = socket;
return DMFix(PBControl(dsp, async), dsp);
}
OSErr ListenConnectionRequest(DSPParamBlock *dsp,
Boolean async,
ProcPtr compRoutine) //26d4a
{
// ROM:00126D4A link a6,#0
// ROM:00126D4E movem.l a3-a4,-(sp)
// ROM:00126D52 movea.l 8(a6),a4
// ROM:00126D56 lea $22(a4),a3
// ROM:00126D5A move.w #$F9,$1A(a4)
// ROM:00126D60 move.l $10(a6),$C(a4)
// ROM:00126D66 clr.b $A(a3)
// ROM:00126D6A clr.w 8(a3)
// ROM:00126D6E clr.b $B(a3)
// ROM:00126D72 move.l a4,-(sp)
// ROM:00126D74 subq.l #2,sp
// ROM:00126D76 move.l a4,-(sp)
// ROM:00126D78 move.b $F(a6),-(sp)
// ROM:00126D7C ori.b #$DF,d5
// ROM:00126D80 move.w (sp)+,d0
// ROM:00126D82 ext.l d0
// ROM:00126D84 move.l d0,-(sp)
// ROM:00126D86 ori.b #$20,d0
// ROM:00126D8A movem.l -8(a6),a3-a4
// ROM:00126D90 unlk a6
// ROM:00126D92 rts
struct TRopenParams *params = &(dsp->u.openParams);
dsp->csCode = dspCLListen;
dsp->ioCompletion = compRoutine;
params->filterAddress.aNode = 0;
params->filterAddress.aNet = 0;
params->filterAddress.aSocket = 0;
return DMFix(PBControl(dsp, async), dsp);
}
void RejectConnectionRequest(DSPParamBlock *dsp, Boolean async, ProcPtr compRoutine) //26d94
{
// ROM:00126D94 link a6,#0
// ROM:00126D98 move.l a4,-(sp)
// ROM:00126D9A movea.l 8(a6),a4
// ROM:00126D9E move.l $10(a6),$C(a4)
// ROM:00126DA4 move.w #$F8,$1A(a4)
// ROM:00126DAA move.l a4,-(sp)
// ROM:00126DAC subq.l #2,sp
// ROM:00126DAE move.l a4,-(sp)
// ROM:00126DB0 move.b $F(a6),-(sp)
// ROM:00126DB4 ori.b #$DF,d5
// ROM:00126DB8 move.w (sp)+,d0
// ROM:00126DBA ext.l d0
// ROM:00126DBC move.l d0,-(sp)
// ROM:00126DBE ori.b #$20,d0
// ROM:00126DC2 movea.l -4(a6),a4
// ROM:00126DC6 unlk a6
// ROM:00126DC8 rts
dsp->ioCompletion = compRoutine;
dsp->csCode = dspCLDeny;
DMFix(PBControl(dsp, async), dsp);
}
OSErr RemoveConnectionListener(unsigned char abortFlag,
Boolean async,
ProcPtr compRoutine,
DSPParamBlock *dsp) //26dca
{
// ROM:00126DCA link a6,#0
// ROM:00126DCE movem.l a3-a4,-(sp)
// ROM:00126DD2 movea.l $14(a6),a4
// ROM:00126DD6 lea $22(a4),a3
// ROM:00126DDA move.w #$FA,$1A(a4)
// ROM:00126DE0 move.l $10(a6),$C(a4)
// ROM:00126DE6 move.b $B(a6),(a3)
// ROM:00126DEA move.l a4,-(sp)
// ROM:00126DEC subq.l #2,sp
// ROM:00126DEE move.l a4,-(sp)
// ROM:00126DF0 move.b $F(a6),-(sp)
// ROM:00126DF4 ori.b #$DF,d5
// ROM:00126DF8 move.w (sp)+,d0
// ROM:00126DFA ext.l d0
// ROM:00126DFC move.l d0,-(sp)
// ROM:00126DFE ori.b #$20,d0
// ROM:00126E02 movem.l -8(a6),a3-a4
// ROM:00126E08 unlk a6
// ROM:00126E0A rts
struct TRcloseParams *params = &(dsp->u.closeParams);
dsp->csCode = dspCLRemove;
dsp->ioCompletion = compRoutine;
params->abort = abortFlag;
return DMFix(PBControl(dsp, async), dsp);
}
OSErr CreateConnectionEnd(TRCCB *ccbPtr,
ProcPtr userRoutine,
unsigned short sendQSize,
unsigned char *sendQ,
unsigned short recvQSize,
unsigned char *recvQ,
unsigned char *attnPtr,
unsigned char socket,
short drvrRef,
Boolean async,
ProcPtr compRoutine,
DSPParamBlock *dsp) //26e0c
{
// ROM:00126E0C link a6,#0
// ROM:00126E10 movem.l a3-a4,-(sp)
// ROM:00126E14 movea.l $34(a6),a3
// ROM:00126E18 lea $22(a3),a4
// ROM:00126E1C move.w $2A(a6),$18(a3)
// ROM:00126E22 move.w #$FF,$1A(a3)
// ROM:00126E28 move.l $30(a6),$C(a3)
// ROM:00126E2E move.l 8(a6),(a4)
// ROM:00126E32 move.l $C(a6),4(a4)
// ROM:00126E38 move.w $12(a6),8(a4)
// ROM:00126E3E move.w $1A(a6),$E(a4)
// ROM:00126E44 move.l $14(a6),$A(a4)
// ROM:00126E4A move.l $1C(a6),$10(a4)
// ROM:00126E50 move.l $20(a6),$14(a4)
// ROM:00126E56 move.b $27(a6),$18(a4)
// ROM:00126E5C move.l a3,-(sp)
// ROM:00126E5E subq.l #2,sp
// ROM:00126E60 move.l a3,-(sp)
// ROM:00126E62 move.b $2F(a6),-(sp)
// ROM:00126E66 ori.b #$DF,d5
// ROM:00126E6A move.w (sp)+,d0
// ROM:00126E6C ext.l d0
// ROM:00126E6E move.l d0,-(sp)
// ROM:00126E70 ori.b #$20,d0
// ROM:00126E74 movem.l -8(a6),a3-a4
// ROM:00126E7A unlk a6
// ROM:00126E7C rts
struct TRinitParams *params = &(dsp->u.initParams);
dsp->ioCRefNum = drvrRef;
dsp->csCode = dspInit;
dsp->ioCompletion = compRoutine;
params->ccbPtr = ccbPtr;
params->userRoutine = userRoutine;
params->sendQSize = sendQSize;
params->recvQSize = recvQSize;
params->sendQueue = sendQ;
params->recvQueue = recvQ;
params->attnPtr = attnPtr;
params->localSocket = socket;
return DMFix(PBControl(dsp, async), dsp);
}
OSErr OpenConnectionEnd(unsigned short remoteCid,
AddrBlock *remoteAddr,
AddrBlock *filterAddr,
unsigned long sendSeq,
unsigned short sendWindow,
unsigned long attnSendSeq,
unsigned char ocMode,
Boolean async,
ProcPtr compRoutine,
DSPParamBlock *dsp) //26e7e
{
PPCGlobalParamsPtr ppcglobPtr = getGlobal();
struct PPCConfigInfo *myptr = &(ppcglobPtr->configData);
struct TRopenParams *params = &(dsp->u.openParams);
dsp->csCode = dspOpen;
dsp->ioCompletion = compRoutine;
params->remoteAddress.aNet = remoteAddr->aNet;
params->remoteAddress.aNode = remoteAddr->aNode;
params->remoteAddress.aSocket = remoteAddr->aSocket;
params->filterAddress.aNet = filterAddr->aNet;
params->filterAddress.aNode = filterAddr->aNode;
params->filterAddress.aSocket = filterAddr->aSocket;
params->ocMode = ocMode;
params->sendSeq = sendSeq;
params->sendWindow = sendWindow;
params->attnSendSeq = attnSendSeq;
params->remoteCID = remoteCid;
params->ocInterval = myptr->adspTimeout;
params->ocMaximum = myptr->adspRetries;
return DMFix(PBControl(dsp, async), dsp);
// ROM:00126E7E link a6,#-4
// ROM:00126E82 movem.l a3-a4,-(sp)
// ROM:00126E86 movea.l $2C(a6),a3
// ROM:00126E8A ori.w #$9406,a1 // getGlobal
// ROM:00126E8E movea.l d0,a4
// ROM:00126E90 lea $CC(a4),a0
// ROM:00126E94 move.l a0,-4(a6)
// ROM:00126E98 lea $22(a3),a4
// ROM:00126E9C move.w #$FD,$1A(a3)
// ROM:00126EA2 move.l $28(a6),$C(a3)
// ROM:00126EA8 movea.l $C(a6),a0
// ROM:00126EAC move.w (a0),4(a4)
// ROM:00126EB0 movea.l $C(a6),a0
// ROM:00126EB4 move.b 2(a0),6(a4)
// ROM:00126EBA movea.l $C(a6),a0
// ROM:00126EBE move.b 3(a0),7(a4)
// ROM:00126EC4 movea.l $10(a6),a0
// ROM:00126EC8 move.w (a0),8(a4)
// ROM:00126ECC movea.l $10(a6),a0
// ROM:00126ED0 move.b 2(a0),$A(a4)
// ROM:00126ED6 movea.l $10(a6),a0
// ROM:00126EDA move.b 3(a0),$B(a4)
// ROM:00126EE0 move.b $23(a6),$1E(a4)
// ROM:00126EE6 move.l $14(a6),$C(a4)
// ROM:00126EEC move.w $1A(a6),$10(a4)
// ROM:00126EF2 move.l $1C(a6),$16(a4)
// ROM:00126EF8 move.w $A(a6),2(a4)
// ROM:00126EFE movea.l -4(a6),a0
// ROM:00126F02 move.b 8(a0),$1F(a4) adspTimeout
// ROM:00126F08 movea.l -4(a6),a0
// ROM:00126F0C move.b 9(a0),$20(a4) adspRetries
// ROM:00126F12 move.l a3,-(sp)
// ROM:00126F14 subq.l #2,sp
// ROM:00126F16 move.l a3,-(sp)
// ROM:00126F18 move.b $27(a6),-(sp)
// ROM:00126F1C ori.b #$DF,d5
// ROM:00126F20 move.w (sp)+,d0
// ROM:00126F22 ext.l d0
// ROM:00126F24 move.l d0,-(sp)
// ROM:00126F26 ori.b #$20,d0
// ROM:00126F2A movem.l -$C(a6),a3-a4
// ROM:00126F30 unlk a6
// ROM:00126F32 rts
}
OSErr RemoveConnectionEnd(unsigned char abortFlag,
Boolean async,
ProcPtr compRoutine,
DSPParamBlock *dsp) //26f34
{
struct TRcloseParams *params = &(dsp->u.closeParams);
dsp->csCode = dspRemove;
dsp->ioCompletion = compRoutine;
params->abort = abortFlag;
return DMFix(PBControl(dsp, async), dsp);
// ROM:00126F34 link a6,#0
// ROM:00126F38 movem.l a3-a4,-(sp)
// ROM:00126F3C movea.l $14(a6),a4
// ROM:00126F40 lea $22(a4),a3
// ROM:00126F44 move.w #$FE,$1A(a4) dspRemove
// ROM:00126F4A move.l $10(a6),$C(a4)
// ROM:00126F50 move.b $B(a6),(a3)
// ROM:00126F54 move.l a4,-(sp)
// ROM:00126F56 subq.l #2,sp
// ROM:00126F58 move.l a4,-(sp)
// ROM:00126F5A move.b $F(a6),-(sp)
// ROM:00126F5E ori.b #$DF,d5
// ROM:00126F62 move.w (sp)+,d0
// ROM:00126F64 ext.l d0
// ROM:00126F66 move.l d0,-(sp)
// ROM:00126F68 ori.b #$20,d0
// ROM:00126F6C movem.l -8(a6),a3-a4
// ROM:00126F72 unlk a6
// ROM:00126F74 rts
}
OSErr WriteToConnection(unsigned short reqCount,
unsigned char *dataPtr,
unsigned char eom,
unsigned char flush,
Boolean async,
ProcPtr compRoutine,
DSPParamBlock *dsp) //26f76
{
struct TRioParams *params = &(dsp->u.ioParams);
dsp->csCode = dspWrite;
dsp->ioCompletion = compRoutine;
params->reqCount = reqCount;
params->dataPtr = dataPtr;
params->eom = eom;
params->flush = flush;
return DMFix(PBControl(dsp, async), dsp);
// ROM:00126F76 link a6,#0
// ROM:00126F7A movem.l a3-a4,-(sp)
// ROM:00126F7E movea.l $20(a6),a4
// ROM:00126F82 lea $22(a4),a3
// ROM:00126F86 move.w #$F5,$1A(a4)
// ROM:00126F8C move.l $1C(a6),$C(a4)
// ROM:00126F92 move.w $A(a6),(a3)
// ROM:00126F96 move.l $C(a6),4(a3)
// ROM:00126F9C move.b $13(a6),8(a3)
// ROM:00126FA2 move.b $17(a6),9(a3)
// ROM:00126FA8 move.l a4,-(sp)
// ROM:00126FAA subq.l #2,sp
// ROM:00126FAC move.l a4,-(sp)
// ROM:00126FAE move.b $1B(a6),-(sp)
// ROM:00126FB2 ori.b #$DF,d5
// ROM:00126FB6 move.w (sp)+,d0
// ROM:00126FB8 ext.l d0
// ROM:00126FBA move.l d0,-(sp)
// ROM:00126FBC ori.b #$20,d0
// ROM:00126FC0 movem.l -8(a6),a3-a4
// ROM:00126FC6 unlk a6
// ROM:00126FC8 rts
}
OSErr ReadFromConnection(unsigned short reqCount,
unsigned char *dataPtr,
Boolean async,
ProcPtr compRoutine,
DSPParamBlock *dsp) //26fca
{
struct TRioParams *params = &(dsp->u.ioParams);
dsp->csCode = dspRead;
dsp->ioCompletion = compRoutine;
params->reqCount = reqCount;
params->dataPtr = dataPtr;
return DMFix(PBControl(dsp, async), dsp);
// ROM:00126FCA link a6,#0
// ROM:00126FCE movem.l a3-a4,-(sp)
// ROM:00126FD2 movea.l $18(a6),a4
// ROM:00126FD6 lea $22(a4),a3
// ROM:00126FDA move.w #$F6,$1A(a4)
// ROM:00126FE0 move.l $14(a6),$C(a4)
// ROM:00126FE6 move.w $A(a6),(a3)
// ROM:00126FEA move.l $C(a6),4(a3)
// ROM:00126FF0 move.l a4,-(sp)
// ROM:00126FF2 subq.l #2,sp
// ROM:00126FF4 move.l a4,-(sp)
// ROM:00126FF6 move.b $13(a6),-(sp)
// ROM:00126FFA ori.b #$DF,d5
// ROM:00126FFE move.w (sp)+,d0
// ROM:00127000 ext.l d0
// ROM:00127002 move.l d0,-(sp)
// ROM:00127004 ori.b #$20,d0
// ROM:00127008 movem.l -8(a6),a3-a4
// ROM:0012700E unlk a6
// ROM:00127010 rts
}

View File

@ -1,3 +1,11 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 EXPORT the resident SCSIBusyVector so that install code can set it.
; This was broken before, but by which change?
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
;_______________________________________________________________________________________ ;_______________________________________________________________________________________
; ;
; File: SCSILinkPatch.a ; File: SCSILinkPatch.a
@ -493,6 +501,7 @@ SCSIBusyCommon
; ;
; In SuperMario, this is part of SCSIGlobals. ; In SuperMario, this is part of SCSIGlobals.
EXPORT SCSIBusyVector ; <Sys7.1>
FreeHookPending dc.l 0 ; location of pending free-hook flag FreeHookPending dc.l 0 ; location of pending free-hook flag
SCSIBusyVector dc.l 0 SCSIBusyVector dc.l 0

View File

@ -1,3 +1,11 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Partly reverted <SM10>, removing check for 040+VM from MOVE16 workaround
; Ripped out the (conditional) nops from <SM8>
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: SCSIMgr96.a ; File: SCSIMgr96.a
; ;
@ -622,12 +630,7 @@ dataCommon_96
@data_end @data_end
cmpi.b #cpu68040,CPUFlag ; Do we have an 040? <SM10> ; ex<SM10> <Sys7.1> Don't restrict this workaround to 040s running VM
bne.s @TheRealExit ; -> No. No MOVE16. No Problem.
cmpi.l #-1,VMGlobals ; VM running?
beq.s @TheRealExit ; -> No, no VM, no problem
;--- Flush the cache line that contains location 8 (because of MOVE16 bug) <3> thru next <3> ;--- Flush the cache line that contains location 8 (because of MOVE16 bug) <3> thru next <3>
movem.l D0-D2, -(sp) movem.l D0-D2, -(sp)
@ -673,9 +676,6 @@ DoSCSIComplete_96
bne.w @phaseErr ; bne.w @phaseErr ;
@inPhase ; we should be in status phase. @inPhase ; we should be in status phase.
move.b #cCmdComp, rCMD(a3) ; load cmd complete code move.b #cCmdComp, rCMD(a3) ; load cmd complete code
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
jsr WaitForSCSIIntrp ; Wait for intrp w/ timeout jsr WaitForSCSIIntrp ; Wait for intrp w/ timeout
; on exit d5 = rF0S|rINT|0|rSTA ; on exit d5 = rF0S|rINT|0|rSTA
beq.w @noStatus ; Branch if timedout beq.w @noStatus ; Branch if timedout
@ -695,9 +695,6 @@ DoSCSIComplete_96
; ;bne.s @cmdErr <T8> from last <T8> ; ;bne.s @cmdErr <T8> from last <T8>
move.b #cMsgAcep, rCMD(a3) ; load msg accepted code which de-asserts *ACK move.b #cMsgAcep, rCMD(a3) ; load msg accepted code which de-asserts *ACK
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
jsr WaitForSCSIIntrp ; Wait for intrp w/ timeout jsr WaitForSCSIIntrp ; Wait for intrp w/ timeout
; on exit d5 = rFOS|rINT|0|rSTA ; on exit d5 = rFOS|rINT|0|rSTA
beq.w @badAcpt ; Branch if timedout beq.w @badAcpt ; Branch if timedout
@ -835,9 +832,6 @@ Select_96
; Set up chip for select process (flush FIFO, init dest ID) ; Set up chip for select process (flush FIFO, init dest ID)
move.b d0, rDID(a3) ; load select bus ID w/ target ID move.b d0, rDID(a3) ; load select bus ID w/ target ID
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO, make sure it's empty move.b #cFlshFFO, rCMD(a3) ; Flush FIFO, make sure it's empty
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
btst.l #16, d0 ; is this a Sel w/Atn? btst.l #16, d0 ; is this a Sel w/Atn?
bne.s @withAtn bne.s @withAtn
@ -847,9 +841,6 @@ Select_96
move.b zeroReg, rXCM(a3) ; tell chip that we will be sending 1 move.b zeroReg, rXCM(a3) ; tell chip that we will be sending 1
move.b #1, rXCL(a3) ; DMA byte (in command phase) move.b #1, rXCL(a3) ; DMA byte (in command phase)
move.b #cDMASelWOAtn, rCMD(a3) ; issue Select w/o Atn cmd move.b #cDMASelWOAtn, rCMD(a3) ; issue Select w/o Atn cmd
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
bset.b #NeedCmdSent, G_State96(a4) ; flag=expect to see a COMMAND phase next <T9> bset.b #NeedCmdSent, G_State96(a4) ; flag=expect to see a COMMAND phase next <T9>
bra.s @2 bra.s @2
@ -858,9 +849,6 @@ Select_96
move.b zeroReg, rXCM(a3) ; tell chip that we will be sending 2 move.b zeroReg, rXCM(a3) ; tell chip that we will be sending 2
move.b #1, rXCL(a3) ; DMA bytes (1 in msg_out, 1 in command) move.b #1, rXCL(a3) ; DMA bytes (1 in msg_out, 1 in command)
move.b #cDMASelWAtn, rCMD(a3) ; issue Select w/ Atn cmd move.b #cDMASelWAtn, rCMD(a3) ; issue Select w/ Atn cmd
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
bset.b #NeedMsgOut, G_State96(a4) ; flag=expect to see a MESSAGE_OUT phase next <T9> bset.b #NeedMsgOut, G_State96(a4) ; flag=expect to see a MESSAGE_OUT phase next <T9>
@2 @2
bset.b #SelInProg, G_State96(a4) ; set flag->select is in prog, expect intrpt <T8><T9> bset.b #SelInProg, G_State96(a4) ; set flag->select is in prog, expect intrpt <T8><T9>
@ -899,11 +887,7 @@ Select_96
;——————————————————— ;———————————————————
@waitLoop @waitLoop
; Check for a REQ from the target (within valid phase) ; Check for a REQ from the target (within valid phase)
IF forPDMDebug THEN ; <SM8>
move.b (a0), d5 ; read DAFB regr (a0=DAFB register addr)
ELSE
move.l (a0), d5 ; read DAFB regr (a0=DAFB register addr) move.l (a0), d5 ; read DAFB regr (a0=DAFB register addr)
ENDIF
move.b G_bitDREQ(a4),d0 ; load DREQ bit position <4> jab move.b G_bitDREQ(a4),d0 ; load DREQ bit position <4> jab
btst.l d0, d5 ; DREQ ? <4> jab btst.l d0, d5 ; DREQ ? <4> jab
bne.s @gotDREQ ; yes: then we have a REQ for Msg_Out or Cmd byte bne.s @gotDREQ ; yes: then we have a REQ for Msg_Out or Cmd byte
@ -1016,9 +1000,6 @@ SendCMD_96
@btmLoadFIFO ; <T9> @btmLoadFIFO ; <T9>
dbra d2, @loadFIFO ; last byte in order to satisfy the c96's DMA <T2> dbra d2, @loadFIFO ; last byte in order to satisfy the c96's DMA <T2>
; circuitry & get us that intrp. <T2> ; circuitry & get us that intrp. <T2>
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
btst.b #NeedCmdSent, G_State96(a4) ; were we expecting a command phase here? <2> thru next <2> btst.b #NeedCmdSent, G_State96(a4) ; were we expecting a command phase here? <2> thru next <2>
beq.s @skipDMA beq.s @skipDMA
@ -1039,9 +1020,6 @@ SendCMD_96
and.b rSTA(a3), d1 ; get phase bits before sending last byte <2> from prev <2> and.b rSTA(a3), d1 ; get phase bits before sending last byte <2> from prev <2>
move.b (a2)+, rDMA(a3) ; Use psuedo DMA to load last byte <T2> move.b (a2)+, rDMA(a3) ; Use psuedo DMA to load last byte <T2>
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
bclr.b #NeedCmdSent,G_State96(a4) ; no longer need command sent and, <T9> bclr.b #NeedCmdSent,G_State96(a4) ; no longer need command sent and, <T9>
bset.b #FCIntPend,G_State96(a4) ; now we can expect a FunctionCmplt interrupt <T9> bset.b #FCIntPend,G_State96(a4) ; now we can expect a FunctionCmplt interrupt <T9>
@ -1059,9 +1037,6 @@ SendCMD_96
moveq.l #noErr, d0 ; no error <T9> moveq.l #noErr, d0 ; no error <T9>
@cmdExit ; At this point, we're out of cmd phase @cmdExit ; At this point, we're out of cmd phase
and.b #$FF-SlowCableMode,rCF1(a3) ; turn-off Slow cable mode <T9> and.b #$FF-SlowCableMode,rCF1(a3) ; turn-off Slow cable mode <T9>
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
tst.w d0 ; tst.w d0 ;
rts rts
@ -1095,9 +1070,6 @@ SendCMD_96
bclr.b #NeedMsgOut, G_State96(a4) ; and Message_Out <Taa> bclr.b #NeedMsgOut, G_State96(a4) ; and Message_Out <Taa>
bclr.b #NeedCmdSent, G_State96(a4) ; and Command expected flags <Taa> bclr.b #NeedCmdSent, G_State96(a4) ; and Command expected flags <Taa>
move.b #cFlshFFO, rCMD(a3) ; flush the FIFO of unused Command bytes move.b #cFlshFFO, rCMD(a3) ; flush the FIFO of unused Command bytes
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
@phaseErr @phaseErr
moveq.l #scPhaseErr, d0 ; phase error <T5> moveq.l #scPhaseErr, d0 ; phase error <T5>
move.l #scsiCmd, d6 ; load proc ID <T5> move.l #scsiCmd, d6 ; load proc ID <T5>
@ -1132,9 +1104,6 @@ GetMsg_96
bne.s @phaseErr ; bne.s @phaseErr ;
move.b #cIOXfer, rCMD(a3) ; load Transfer cmd byte in CMD regr move.b #cIOXfer, rCMD(a3) ; load Transfer cmd byte in CMD regr
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
jsr WaitForSCSIIntrp ; Wait for intrp w/ timeout <T3> jsr WaitForSCSIIntrp ; Wait for intrp w/ timeout <T3>
; on exit d5 = xxxx|rSQS|rSTA|rINT ; on exit d5 = xxxx|rSQS|rSTA|rINT
beq.s @timedOut ; Branch if timedout beq.s @timedOut ; Branch if timedout
@ -1142,9 +1111,6 @@ GetMsg_96
move.b rFFO(a3), d2 ; xfer fifo msg byte into d2 w/ *ACK still asserted move.b rFFO(a3), d2 ; xfer fifo msg byte into d2 w/ *ACK still asserted
; now, unconditionally accept the message byte ; now, unconditionally accept the message byte
move.b #cMsgAcep, rCMD(a3) ; load msg accepted code which de-asserts *ACK move.b #cMsgAcep, rCMD(a3) ; load msg accepted code which de-asserts *ACK
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
jsr WaitForSCSIIntrp ; Wait for intrp w/ timeout <T3> jsr WaitForSCSIIntrp ; Wait for intrp w/ timeout <T3>
; on exit d5 = rFOS|rINT|0|rSTA ; on exit d5 = rFOS|rINT|0|rSTA
beq.s @timedOut ; Branch if timedout beq.s @timedOut ; Branch if timedout
@ -1204,9 +1170,6 @@ SendMsg_96
@inPhase ; We probably got here from Select w/ATN which means @inPhase ; We probably got here from Select w/ATN which means
; ATN is deasserted prior to transfer of msg byte ; ATN is deasserted prior to transfer of msg byte
move.b d2, rFFO(a3) ; xfer msg byte move.b d2, rFFO(a3) ; xfer msg byte
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
bclr.b #NeedMsgOut,G_State96(a4) ; did we send a Select w/ATN? bclr.b #NeedMsgOut,G_State96(a4) ; did we send a Select w/ATN?
beq.s @needXfer ; no - just split beq.s @needXfer ; no - just split
bset.b #NeedCmdSent,G_State96(a4) ; yes - we took care of MsgOut, now we need to send command bset.b #NeedCmdSent,G_State96(a4) ; yes - we took care of MsgOut, now we need to send command
@ -1303,14 +1266,14 @@ CyclePhase_96 ; (accessed thru jvCyclePhase)
moveq.l #iPhaseMsk, d0 ; load mask bits for phase value moveq.l #iPhaseMsk, d0 ; load mask bits for phase value
and.b rSTA(a3), d0 ; get phase bits and.b rSTA(a3), d0 ; get phase bits
; cmp #iDataOut, d0 ;
beq.s @inDataPhase ;
cmp #iDataIn, d0 ; cmp #iDataIn, d0 ;
beq.s @inDataPhase ; beq.s @inDataPhase ;
cmp #iDataOut, d0 ;
beq.s @inDataPhase ;
cmp #iCommand, d0 ; cmp #iCommand, d0 ;
beq @shoveCommand ; beq.s @shoveCommand ;
cmp #iMsgOut, d0 ; cmp #iMsgOut, d0 ;
beq.w @shoveMsgOut ; beq.w @shoveMsgOut ;
@ -1360,9 +1323,6 @@ CyclePhase_96 ; (accessed thru jvCyclePhase)
; Dump out data_out bytes until we've gone into another phase ; Dump out data_out bytes until we've gone into another phase
@shoveDataOut @shoveDataOut
move.b #$EE, rFFO(a3) ; load filler byte into FIFO move.b #$EE, rFFO(a3) ; load filler byte into FIFO
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
jsr Xfer1Byte ; xfer 1 byte and wait for intrp w/o timeout jsr Xfer1Byte ; xfer 1 byte and wait for intrp w/o timeout
; on exit d5 = rFOS|rINT|0|rSTA ; on exit d5 = rFOS|rINT|0|rSTA
bne.s @xferErr ; bra. on xfer error bne.s @xferErr ; bra. on xfer error
@ -1374,9 +1334,6 @@ CyclePhase_96 ; (accessed thru jvCyclePhase)
bclr.b #NeedCmdSent, G_State96(a4) ; did we expect this? bclr.b #NeedCmdSent, G_State96(a4) ; did we expect this?
beq.s @nonDMA ; no - bra, do xfer using FIFO beq.s @nonDMA ; no - bra, do xfer using FIFO
move.b #$EE, rDMA(a3) ; yes - use DMA (since chip is waiting for it) move.b #$EE, rDMA(a3) ; yes - use DMA (since chip is waiting for it)
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
bset.b #FCIntPend,G_State96(a4) ; we took care of cmd, now expect FC interrupt bset.b #FCIntPend,G_State96(a4) ; we took care of cmd, now expect FC interrupt
jsr WaitForSCSIIntrp jsr WaitForSCSIIntrp
beq.s @timedOut ; bra if timedout beq.s @timedOut ; bra if timedout
@ -1386,9 +1343,6 @@ CyclePhase_96 ; (accessed thru jvCyclePhase)
bra.s @2 ; trying again is as good as anything else bra.s @2 ; trying again is as good as anything else
@nonDMA @nonDMA
move.b #$EE, rFFO(a3) ; load filler byte into FIFO move.b #$EE, rFFO(a3) ; load filler byte into FIFO
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
jsr Xfer1Byte ; xfer 1 byte and wait for intrp w/o timeout jsr Xfer1Byte ; xfer 1 byte and wait for intrp w/o timeout
bne.s @xferErr ; bra. on xfer error bne.s @xferErr ; bra. on xfer error
@2 @2
@ -1398,9 +1352,6 @@ CyclePhase_96 ; (accessed thru jvCyclePhase)
; Dump out message_out bytes until we've gone into another phase ; Dump out message_out bytes until we've gone into another phase
@shoveMsgOut @shoveMsgOut
move.b #$08, rFFO(a3) ; load filler byte into FIFO (NOP message) move.b #$08, rFFO(a3) ; load filler byte into FIFO (NOP message)
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
bclr.b #NeedMsgOut, G_State96(a4) ; did we expect this? bclr.b #NeedMsgOut, G_State96(a4) ; did we expect this?
beq.s @needXferCmd ; no - branch beq.s @needXferCmd ; no - branch
bset.b #NeedCmdSent,G_State96(a4) ; yes - taking care of MsgOut, now we need cmd bset.b #NeedCmdSent,G_State96(a4) ; yes - taking care of MsgOut, now we need cmd
@ -1418,9 +1369,6 @@ CyclePhase_96 ; (accessed thru jvCyclePhase)
bne.s @xferErr ; bra. on xfer error bne.s @xferErr ; bra. on xfer error
move.b rFFO(a3), d0 ; just empty the FIFO move.b rFFO(a3), d0 ; just empty the FIFO
move.b #cMsgAcep, rCMD(a3) ; load msg accepted code which de-asserts ACK move.b #cMsgAcep, rCMD(a3) ; load msg accepted code which de-asserts ACK
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
jsr WaitForSCSIIntrp ; Wait for intrp w/ timeout jsr WaitForSCSIIntrp ; Wait for intrp w/ timeout
; on exit d5 = rFOS|rINT|0|rSTA ; on exit d5 = rFOS|rINT|0|rSTA
bra.s @checkNextPhase bra.s @checkNextPhase
@ -1449,11 +1397,7 @@ CyclePhase_96 ; (accessed thru jvCyclePhase)
@pDMAread @pDMAread
btst.b #bINT, rSTA(a3) ; poll for intrp hopefully from TC zero btst.b #bINT, rSTA(a3) ; poll for intrp hopefully from TC zero
bne.s @readAll ; bra. if we got one bne.s @readAll ; bra. if we got one
IF forPDMDebug THEN ; <SM8>
move.b (a0), d5 ; read DAFB regr (a0=DAFB register addr)
ELSE
move.l (a0), d5 ; read DAFB regr (a0=DAFB register addr) move.l (a0), d5 ; read DAFB regr (a0=DAFB register addr)
ENDIF
move.b G_bitDREQ(a4),d0 ; load DREQ bit position <4> jab move.b G_bitDREQ(a4),d0 ; load DREQ bit position <4> jab
btst.l d0, d5 ; DREQ ? <4> jab btst.l d0, d5 ; DREQ ? <4> jab
beq.s @pDMAread ; bra. if inactive beq.s @pDMAread ; bra. if inactive
@ -1470,18 +1414,11 @@ CyclePhase_96 ; (accessed thru jvCyclePhase)
@pDMAwrite @pDMAwrite
btst.b #bINT, rSTA(a3) ; poll for intrp hopefully from TC zero btst.b #bINT, rSTA(a3) ; poll for intrp hopefully from TC zero
bne.s @writeAll ; bra. if we filled all data bne.s @writeAll ; bra. if we filled all data
IF forPDMDebug THEN ; <SM8>
move.b (a0), d5 ; read DAFB regr (a0=DAFB register addr)
ELSE
move.l (a0), d5 ; read DAFB regr (a0=DAFB register addr) move.l (a0), d5 ; read DAFB regr (a0=DAFB register addr)
ENDIF
move.b G_bitDREQ(a4),d0 ; load DREQ bit position <4> jab move.b G_bitDREQ(a4),d0 ; load DREQ bit position <4> jab
btst.l d0, d5 ; DREQ ? <4> jab btst.l d0, d5 ; DREQ ? <4> jab
beq.s @pDMAwrite ; bra. if inactive beq.s @pDMAwrite ; bra. if inactive
move.w #$EEEE, rDMA(a3) ; load filler data into FIFO move.w #$EEEE, rDMA(a3) ; load filler data into FIFO
if nonSerializedIO Then
nop ; Force write to complete. <SM8>
endif
bra.s @pDMAwrite bra.s @pDMAwrite
@writeAll ; Intrp will occur when REQ is asserted for the next phase @writeAll ; Intrp will occur when REQ is asserted for the next phase
jsr WaitForIntNoTime ; Expecting an intrp, clear it when occurs jsr WaitForIntNoTime ; Expecting an intrp, clear it when occurs
@ -1534,11 +1471,7 @@ TestForDREQ
jsr SwapMMU ; (sets up d0 with previous mode) jsr SwapMMU ; (sets up d0 with previous mode)
move.l G_SCSIDREQ(a4), a0 ; G_SCSIDREQ contains DREQ regr address move.l G_SCSIDREQ(a4), a0 ; G_SCSIDREQ contains DREQ regr address
IF forPDMDebug THEN ; <SM8>
move.b (a0), d5 ; read DAFB regr (a0=DAFB register addr)
ELSE
move.l (a0), d5 ; read DAFB regr (a0=DAFB register addr) move.l (a0), d5 ; read DAFB regr (a0=DAFB register addr)
ENDIF
jsr SwapMMU ; return to previous mode (in d0) jsr SwapMMU ; return to previous mode (in d0)

View File

@ -1,3 +1,13 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <SM9> boxFlag checks and tacked-on flags from <SM14>/<SM16>
; Commented out the nonSerializedIO nops from <SM7> and <SM12>, and
; restored a short branch that the nops blew out
; Restored useless MaxBusErr code to Transfer_96 (from SCSIMgrHW96BIOS.a)
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: SCSIMgrHW96.a ; File: SCSIMgrHW96.a
; ;
@ -166,13 +176,13 @@ InitHW_SCSI96
move.b #cRstSChp, rCMD(a3) ; Reset the Chip (not the bus) move.b #cRstSChp, rCMD(a3) ; Reset the Chip (not the bus)
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM12> ; nop ; Force write to complete. <SM12><Sys7.1>
endif endif
move.b #cNOP, rCMD(a3) ; C96 NOP required after HW or SW reset move.b #cNOP, rCMD(a3) ; C96 NOP required after HW or SW reset
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO move.b #cFlshFFO, rCMD(a3) ; Flush FIFO
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM12> ; nop ; Force write to complete. <SM12><Sys7.1>
endif endif
move.b #initCF1, rCF1(a3) ; load init config. value which affects: move.b #initCF1, rCF1(a3) ; load init config. value which affects:
; busID, SCSI reset reporting & parity checking ; busID, SCSI reset reporting & parity checking
@ -181,47 +191,20 @@ InitHW_SCSI96
move.b #initCF3, rCF3(a3) ; load init config. value move.b #initCF3, rCF3(a3) ; load init config. value
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
; Check whether or not we're 25 or 33MHz and set SCSI bus speed values appropriately <T6> thru next <T6> ; Check whether or not we're 25 or 33MHz and set SCSI bus speed values appropriately <T6> thru next <T6>
TestFor VIA2Exists ; see if we should check 25/33MHz VIA2 bit TestFor VIA2Exists ; see if we should check 25/33MHz VIA2 bit
beq @dontChk ; if there's not a VIA2, don't do it. beq.s @dontChk ; if there's not a VIA2, don't do it. ex<SM9> <Sys7.1>
TestFor DAFBExists ; vs BoxFlags for Spike/Eclipse/Zydeco ex<SM9> <Sys7.1>
beq.s @dontChk ; if there's not a DAFB ex<SM9> <Sys7.1>
; Change to check for BoxFlags for Spike/Eclipse/Zydeco, instead of DAFBExists, since this move.l a0,-(sp) ; needlessly save a0... ex<SM9> <Sys7.1>
; special stuff only applies to those 3 machines. <SM9>
move.l UnivInfoPtr,A0 ; get pointer to universal table
cmp.b #BoxQuadra700,ProductInfo.ProductKind(A0) ; check for a Spike
beq.s @DoSpikeEclipseZydeco ; Special setup for Spike/Eclipse/Zydeco
cmp.b #BoxQuadra900,ProductInfo.ProductKind(A0) ; check for a Eclipse
beq.s @DoSpikeEclipseZydeco ; Special setup for Spike/Eclipse/Zydeco
cmp.b #BoxQuadra950,ProductInfo.ProductKind(A0) ; check for a Zydeco
beq.s @DoSpikeEclipseZydeco ; Special setup for Spike/Eclipse/Zydeco
IF forSmurf THEN
cmp.b #boxRiscQuadra700,ProductInfo.ProductKind(A0) ; check for a RISC Spike <SM15>
beq.s @DoSpikeEclipseZydeco ; Special setup for Spike/Eclipse/Zydeco <SM15>
cmp.b #boxRiscQuadra900,ProductInfo.ProductKind(A0) ; check for a RISC Quadra900<SM15>
beq.s @DoSpikeEclipseZydeco ; Special setup for Spike/Eclipse/Zydeco <SM15>
cmp.b #boxRiscQuadra950,ProductInfo.ProductKind(A0) ; check for a RISC Quadra950<SM15>
beq.s @DoSpikeEclipseZydeco ; Special setup for Spike/Eclipse/Zydeco <SM15>
cmp.b #boxRiscCentris610,ProductInfo.ProductKind(A0) ; check for a RISC Centris610<SM15>
beq.s @DoSpikeEclipseZydeco ; Special setup for Spike/Eclipse/Zydeco <SM15>
cmp.b #boxRiscCentris650,ProductInfo.ProductKind(A0) ; check for a RISC Centris650<SM15>
beq.s @DoSpikeEclipseZydeco ; Special setup for Spike/Eclipse/Zydeco <SM15>
cmp.b #boxRiscQuadra800,ProductInfo.ProductKind(A0) ; check for a RISC Quadra800<SM15>
beq.s @DoSpikeEclipseZydeco ; Special setup for Spike/Eclipse/Zydeco <SM15>
cmp.b #boxRiscQuadra610,ProductInfo.ProductKind(A0) ; check for a RISC Quadra610<SM16>
beq.s @DoSpikeEclipseZydeco ; Special setup for Spike/Eclipse/Zydeco <SM16>
cmp.b #boxRiscQuadra650,ProductInfo.ProductKind(A0) ; check for a RISC Quadra650<SM16>
beq.s @DoSpikeEclipseZydeco ; Special setup for Spike/Eclipse/Zydeco <SM16>
ENDIF ; for Smurf
bra.s @dontChk ; only Spike/Eclipse have a VIA2 and DAFB
@DoSpikeEclipseZydeco ; <SM9>
move.l VIA2,a0 ; and get VIA2 so that we can check the speed bit move.l VIA2,a0 ; and get VIA2 so that we can check the speed bit
move.b vBufB(a0),d0 ; read PBx values for 25/33MHz checks move.b vBufB(a0),d0 ; read PBx values for 25/33MHz checks
move.l (sp)+,a0 ; ...and restore a0 ex<SM9> <Sys7.1>
btst #v2Speed,d0 ; are we 25 MHz or 33 Mhz? btst #v2Speed,d0 ; are we 25 MHz or 33 Mhz?
beq.s @25MHz ; IF Speed == 33MHz THEN beq.s @25MHz ; IF Speed == 33MHz THEN
move.l #tsc_cf_stg_33,(a4) ; setup DAFB SCSI config register. move.l #tsc_cf_stg_33,(a4) ; setup DAFB SCSI config register.
@ -245,20 +228,6 @@ InitHW_SCSI96
move.l UnivInfoPtr,A0 ; get pointer to universal table <T9> move.l UnivInfoPtr,A0 ; get pointer to universal table <T9>
cmp.b #boxQuadra700,ProductInfo.ProductKind(A0) ; check for a Spike <T9><2> cmp.b #boxQuadra700,ProductInfo.ProductKind(A0) ; check for a Spike <T9><2>
beq.s @ForSpike ; (note - BoxFlag is not defined yet!) <T9> beq.s @ForSpike ; (note - BoxFlag is not defined yet!) <T9>
IF forSmurf THEN
cmp.b #boxRiscQuadra700,ProductInfo.ProductKind(A0) ; check for a RISC Quadra700 <SM15>
beq.s @ForSpike ; (note - BoxFlag is not defined yet!) <SM15>
cmp.b #boxRiscCentris610,ProductInfo.ProductKind(A0) ; check for a RISC Centris610 <SM15>
beq.s @ForSpike ; (note - BoxFlag is not defined yet!) <SM15>
cmp.b #boxRiscCentris650,ProductInfo.ProductKind(A0) ; check for a RISC Centris650 <SM15>
beq.s @ForSpike ; (note - BoxFlag is not defined yet!) <SM15>
cmp.b #boxRiscQuadra800,ProductInfo.ProductKind(A0) ; check for a RISC Quadra800 <SM15>
beq.s @ForSpike ; (note - BoxFlag is not defined yet!) <SM15>
cmp.b #boxRiscQuadra610,ProductInfo.ProductKind(A0) ; check for a RISC Quadra610 <SM16>
beq.s @ForSpike ; <SM16>
cmp.b #boxRiscQuadra650,ProductInfo.ProductKind(A0) ; check for a RISC Quadra650 <SM16>
beq.s @ForSpike ; <SM16>
ENDIF ; for Smurf
; Check for difference between 25 and 33MHz Eclipse machines: <T6> ; Check for difference between 25 and 33MHz Eclipse machines: <T6>
@ -301,7 +270,7 @@ InitHW_SCSI96
; synch data xfer ; synch data xfer
@4 @4
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
move.b rINT(a3), d0 ; read & clear rFOS, rSTA & rINT into throwaway <T6> move.b rINT(a3), d0 ; read & clear rFOS, rSTA & rINT into throwaway <T6>
rts rts
@ -400,6 +369,12 @@ linkSize EQU *
Transfer_96: Transfer_96:
link a6, #linkSize ; allocate local storage link a6, #linkSize ; allocate local storage
moveq #Max020030BusErrs,d0 ; upper limit for 020s and 030s <Sys7.1>
cmp.b #cpu68040,CpuFlag ; check if we're on an 040 <Sys7.1>
bne.s @storeValue ; NO ... leave BusErrCount alone <Sys7.1>
moveq #Max040BusErrs,d0 ; YES ... use 040 MaxBusErr value <Sys7.1>
@storeValue ; <Sys7.1>
move.l #0, BusErrAddr(a6) ; init so first bus err is seen as a new one move.l #0, BusErrAddr(a6) ; init so first bus err is seen as a new one
moveq.l #noErr, d0 ; assume no error moveq.l #noErr, d0 ; assume no error
@ -418,7 +393,7 @@ Transfer_96:
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <T8> move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <T8>
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
; move.l BusErrVct, D0 ; compare old vector (at 8) <2> <3>removed ; move.l BusErrVct, D0 ; compare old vector (at 8) <2> <3>removed
@ -478,7 +453,7 @@ Transfer_96:
OneByteRead ; <T2> thru next <T2> OneByteRead ; <T2> thru next <T2>
move.b #cIOXfer, rCMD(a3) ; load IO transfer cmd & begin xfers move.b #cIOXfer, rCMD(a3) ; load IO transfer cmd & begin xfers
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
jsr.w WaitForIntNoTime ; Wait for intrp w/o timeout jsr.w WaitForIntNoTime ; Wait for intrp w/o timeout
; on exit d5 = rFOS|rINT|0|rSTA ; on exit d5 = rFOS|rINT|0|rSTA
@ -494,11 +469,11 @@ OneByteRead ; <T2> thru next <T2>
OneByteWrite OneByteWrite
move.b (a2)+, rFFO(a3) ; preload the FIFO move.b (a2)+, rFFO(a3) ; preload the FIFO
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
move.b #cIOXfer, rCMD(a3) ; load IO transfer cmd & begin xfers move.b #cIOXfer, rCMD(a3) ; load IO transfer cmd & begin xfers
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM12> ; nop ; Force write to complete. <SM12><Sys7.1>
endif endif
jsr.w WaitForIntNoTime ; Wait for intrp w/o timeout jsr.w WaitForIntNoTime ; Wait for intrp w/o timeout
; on exit d5 = rFOS|rINT|0|rSTA ; on exit d5 = rFOS|rINT|0|rSTA
@ -522,7 +497,7 @@ errExit
clr.l d1 ; no bytes transferred clr.l d1 ; no bytes transferred
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO move.b #cFlshFFO, rCMD(a3) ; Flush FIFO
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
rts ; <T4> rts ; <T4>
@ -553,7 +528,7 @@ errExit
Xfer1Byte Xfer1Byte
move.b #cIOXfer, rCMD(a3) ; load IO transfer cmd & begin xfers move.b #cIOXfer, rCMD(a3) ; load IO transfer cmd & begin xfers
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
jsr.w WaitForIntNoTime ; Wait for intrp w/o timeout jsr.w WaitForIntNoTime ; Wait for intrp w/o timeout
; on exit d5 = rFOS|rINT|0|rSTA ; on exit d5 = rFOS|rINT|0|rSTA
@ -630,7 +605,7 @@ SlowRead_96
move.b #0, rXCM(a3) ; rXCM = 0, clear most-sig. byte count move.b #0, rXCM(a3) ; rXCM = 0, clear most-sig. byte count
move.b #$10, rXCL(a3) ; rXCL = 16 bytes, least-sig. byte value move.b #$10, rXCL(a3) ; rXCL = 16 bytes, least-sig. byte value
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
and.l #$F, d2 ; d2 = remainder word count after 16-byte moves and.l #$F, d2 ; d2 = remainder word count after 16-byte moves
@read16 @read16
@ -709,7 +684,7 @@ SlowRead_96
bne.s @phaseErr ; bra. on phase err bne.s @phaseErr ; bra. on phase err
move.b #cIOXfer, rCMD(a3) ; load IO transfer cmd & begin xfers move.b #cIOXfer, rCMD(a3) ; load IO transfer cmd & begin xfers
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
@3 @3
btst.b #bINT, rSTA(a3) ; check for c96 INTRP btst.b #bINT, rSTA(a3) ; check for c96 INTRP
@ -780,7 +755,7 @@ SlowRead_96
jsr Error ; call Error proc - for debug jsr Error ; call Error proc - for debug
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO move.b #cFlshFFO, rCMD(a3) ; Flush FIFO
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
rts ; <T5> rts ; <T5>
@ -834,7 +809,7 @@ SlowWrite_96
move.l d2, d6 ; d6 = number 64KB block to perform move.l d2, d6 ; d6 = number 64KB block to perform
swap d6 ; upper word of d6 = lower word of d2 swap d6 ; upper word of d6 = lower word of d2
andi.l #$0000FFFF, d2 ; mask out upper word andi.l #$0000FFFF, d2 ; mask out upper word
beq @2 ; if 0 then we have $10000 (64K) bytes to xfer beq.s @2 ; if 0 then we have $10000 (64K) bytes to xfer ex<SM7> ex<SM12> <Sys7.1>
@next64KB @next64KB
moveq.l #iPhaseMsk, d3 ; load mask bits for phase value moveq.l #iPhaseMsk, d3 ; load mask bits for phase value
and.b rSTA(a3), d3 ; are we still in data-out phase? and.b rSTA(a3), d3 ; are we still in data-out phase?
@ -847,7 +822,7 @@ SlowWrite_96
lsr.l #8, d4 ; get upper byte of low word lsr.l #8, d4 ; get upper byte of low word
move.b d4, rXCM(a3) ; TC regr (most-sig. byte) <- d4.b move.b d4, rXCM(a3) ; TC regr (most-sig. byte) <- d4.b
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM12> ; nop ; Force write to complete. <SM12><Sys7.1>
endif endif
move.b #cDMAXfer, rCMD(a3) ; load DMA transfer cmd & begin xfers move.b #cDMAXfer, rCMD(a3) ; load DMA transfer cmd & begin xfers
nop ; squoosh pipeline <T8> nop ; squoosh pipeline <T8>
@ -891,7 +866,7 @@ SlowWrite_96
@residual @residual
move.b (a2)+, rDMA(a3) ; xfer residual byte <T8> move.b (a2)+, rDMA(a3) ; xfer residual byte <T8>
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
@noResidual @noResidual
bsr.w WaitForIntNoTime ; Wait for intrp w/o timeout bsr.w WaitForIntNoTime ; Wait for intrp w/o timeout
@ -938,7 +913,7 @@ SlowWrite_96
jsr Error ; call Error proc - for debug jsr Error ; call Error proc - for debug
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <T4> move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <T4>
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
rts ; rts ;
@ -991,7 +966,7 @@ FastWrite_96
@doWrite @doWrite
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <T8> move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <T8>
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
moveq.l #iPhaseMsk, d0 ; moveq.l #iPhaseMsk, d0 ;
and.b rSTA(a3), d0 ; are we in data-out phase? and.b rSTA(a3), d0 ; are we in data-out phase?
@ -1014,12 +989,12 @@ FastWrite_96
lsr.l #8, d4 ; get upper byte of low word lsr.l #8, d4 ; get upper byte of low word
move.b d4, rXCM(a3) ; TC regr (most-sig. byte) <- d4.b move.b d4, rXCM(a3) ; TC regr (most-sig. byte) <- d4.b
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM12> ; nop ; Force write to complete. <SM12><Sys7.1>
endif endif
move.b #cDMAXfer, rCMD(a3) ; load DMA transfer cmd & begin xfers move.b #cDMAXfer, rCMD(a3) ; load DMA transfer cmd & begin xfers
; DREQ* should be active at this time ; DREQ* should be active at this time
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
move.w d2, d4 ; d4 = copy of transfer count move.w d2, d4 ; d4 = copy of transfer count
lsr.w #5, d4 ; divide xfer count by 32 lsr.w #5, d4 ; divide xfer count by 32
@ -1057,7 +1032,7 @@ FastWrite_96
@residual @residual
move.b (a2)+, rDMA(a3) ; xfer residual byte <T8> move.b (a2)+, rDMA(a3) ; xfer residual byte <T8>
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
@noResidual @noResidual
bsr.w WaitForIntNoTime ; Wait for intrp w/o timeout bsr.w WaitForIntNoTime ; Wait for intrp w/o timeout
@ -1075,7 +1050,7 @@ FastWrite_96
subq.l #1, d2 ; adjust for transfer count calc subq.l #1, d2 ; adjust for transfer count calc
move.b (a2)+, rFFO(a3) ; ...preload fifo with odd byte <T4> thru next <T4> move.b (a2)+, rFFO(a3) ; ...preload fifo with odd byte <T4> thru next <T4>
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
bra.w @next64KB ; now we're word aligned bra.w @next64KB ; now we're word aligned
@phaseErr @phaseErr
@ -1101,7 +1076,7 @@ FastWrite_96
jsr Error ; call Error proc - for debug jsr Error ; call Error proc - for debug
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <T4> move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <T4>
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
rts ; rts ;
@ -1153,7 +1128,7 @@ FastRead_96
@doRead @doRead
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <T8> move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <T8>
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
moveq.l #iPhaseMsk, d0 ; load mask for phase bits <T4> thru next <T4> moveq.l #iPhaseMsk, d0 ; load mask for phase bits <T4> thru next <T4>
and.b rSTA(a3), d0 ; are we in data-in phase? and.b rSTA(a3), d0 ; are we in data-in phase?
@ -1175,7 +1150,7 @@ FastRead_96
move.b #cDMAXfer, rCMD(a3) ; load DMA transfer cmd & begin xfers move.b #cDMAXfer, rCMD(a3) ; load DMA transfer cmd & begin xfers
; DREQ* should be active at this time ; DREQ* should be active at this time
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
; move.l a2, d5 ; ; move.l a2, d5 ;
; btst.l #0, d5 ; check if input buffer is on word boundary ; btst.l #0, d5 ; check if input buffer is on word boundary
@ -1258,7 +1233,7 @@ FastRead_96
jsr Error ; call Error proc - for debug jsr Error ; call Error proc - for debug
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <T4> move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <T4>
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
rts ; rts ;
@ -1304,7 +1279,7 @@ ResetBus_96
move.b #cRstSBus, rCMD(a3) ; load reset scsi bus cmd <T3> move.b #cRstSBus, rCMD(a3) ; load reset scsi bus cmd <T3>
; re-enable all intrps ; re-enable all intrps
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
rts rts
@ -1379,7 +1354,7 @@ HandleSelInProg
bsr.w WaitForIntNoTime bsr.w WaitForIntNoTime
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <3> move.b #cFlshFFO, rCMD(a3) ; Flush FIFO <3>
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
moveq.l #0, d0 moveq.l #0, d0
bra.s @gotInt bra.s @gotInt
@ -1565,7 +1540,7 @@ FastComp_96
move.b #cDMAXfer, rCMD(a3) ; load DMA transfer cmd & begin xfers move.b #cDMAXfer, rCMD(a3) ; load DMA transfer cmd & begin xfers
; DREQ* should be active at this time ; DREQ* should be active at this time
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
ror.l #1, d2 ; xfer byte count to word & remember odd byte ror.l #1, d2 ; xfer byte count to word & remember odd byte
@ -1615,7 +1590,7 @@ FastComp_96
jsr Error ; call Error proc - for debug jsr Error ; call Error proc - for debug
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO move.b #cFlshFFO, rCMD(a3) ; Flush FIFO
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
rts ; rts ;
@ -1691,7 +1666,7 @@ SlowComp_96
@read16 @read16
move.b #cDMAXfer, rCMD(a3) ; load DMA transfer cmd & start loading FIFO move.b #cDMAXfer, rCMD(a3) ; load DMA transfer cmd & start loading FIFO
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
@1 ; currently loaded transfer count is used/reused @1 ; currently loaded transfer count is used/reused
btst.b #bINT, rSTA(a3) ; poll for unexpected intrp while waiting btst.b #bINT, rSTA(a3) ; poll for unexpected intrp while waiting
@ -1741,7 +1716,7 @@ SlowComp_96
bne.s @phaseErr ; bra. on phase err bne.s @phaseErr ; bra. on phase err
move.b #cIOXfer, rCMD(a3) ; load IO transfer cmd & begin xfers move.b #cIOXfer, rCMD(a3) ; load IO transfer cmd & begin xfers
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
@3 @3
btst.b #bINT, rSTA(a3) ; check for c96 INTRP btst.b #bINT, rSTA(a3) ; check for c96 INTRP
@ -1789,7 +1764,7 @@ SlowComp_96
jsr Error ; call Error proc - for debug jsr Error ; call Error proc - for debug
move.b #cFlshFFO, rCMD(a3) ; Flush FIFO move.b #cFlshFFO, rCMD(a3) ; Flush FIFO
if nonSerializedIO Then if nonSerializedIO Then
nop ; Force write to complete. <SM7> ; nop ; Force write to complete. <SM7><Sys7.1>
endif endif
rts ; <T5> rts ; <T5>

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted PDM-specific <SM8>
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: SCSIMgrInit96.a ; File: SCSIMgrInit96.a
; ;
@ -57,7 +64,7 @@
; don't print includes ; don't print includes
LOAD 'StandardEqu.d' ; from StandardEqu.a and for building ROMs LOAD 'StandardEqu.d' ; from StandardEqu.a and for building ROMs
INCLUDE 'HardwareEqu.a' ; <T2> INCLUDE 'HardwarePrivateEqu.a' ; <T2>
INCLUDE 'SCSI.a' INCLUDE 'SCSI.a'
INCLUDE 'SCSIPriv.a' INCLUDE 'SCSIPriv.a'
INCLUDE 'UniversalEqu.a' ; for TestFor <T2> INCLUDE 'UniversalEqu.a' ; for TestFor <T2>
@ -193,11 +200,7 @@ InitMgr_SCSI96
clr.b G_bitDREQ(a4) ; initialize bit position of DREQ regr <H4> thru to next <H4> jab clr.b G_bitDREQ(a4) ; initialize bit position of DREQ regr <H4> thru to next <H4> jab
TestFor HMCDecoder ; are we PDM ? <SM8> ; Removed code to set DREQ register location (G_bitDREQ, pdma5380) on PDM ex<SM8><Sys7.1>
beq.s @notPDM
move.b #bDREQ_PDM,G_bitDREQ(a4) ; setup bit location of DREQ check
move.l #SCSI0_DREQ_PDM,pdma5380(a4) ; setup DREQ location
bra.s @chk2Bus ; <SM8>
@notPDM cmpi.b #boxQuadra700,BoxFlag ; are we a Quadra 700? @notPDM cmpi.b #boxQuadra700,BoxFlag ; are we a Quadra 700?
beq.s @wereQuadra ; yes ... set our DREQ location beq.s @wereQuadra ; yes ... set our DREQ location

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Changed <26> to treat "useFree" the same as "useATalk".
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: BeforePatches.a (formerly RomAllFix.a) ; File: BeforePatches.a (formerly RomAllFix.a)
; ;
@ -585,6 +592,7 @@ RAMSysInit PROC EXPORT
move.b SPConfig,d0 ; <26> Get serial port configuration move.b SPConfig,d0 ; <26> Get serial port configuration
and.b #$0f,d0 ; <26> Mask off Port B bits and.b #$0f,d0 ; <26> Mask off Port B bits
beq.s @appleTalkIsActive ; <Sys7.1> Treat "useFree" as AppleTalk=active.
cmp.b #useATalk,d0 ; <26> Configured for AppleTalk? cmp.b #useATalk,d0 ; <26> Configured for AppleTalk?
beq.s @appleTalkIsActive ; <26> Yes. Dont set emAppleTalkInactiveOnBoot beq.s @appleTalkIsActive ; <26> Yes. Dont set emAppleTalkInactiveOnBoot

View File

@ -0,0 +1,55 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Disassembled from scratch
;
LOAD 'StandardEqu.d'
INCLUDE 'SysEqu.a'
INCLUDE 'EDiskEqu.a'
INCLUDE 'LinkedPatchMacros.a'
ROMInternalRAMDiskString RomBind (IIci,$E7DAA)
EDiskShutdownPtch InstallProc (IIci,hasTERROR)
lea DrvQHdr+QHead-QLink,a2
@dqloop move.l (a2),d0
beq.s @return
move.l d0,a2 ; follow link
move.w dQRefNum(a2),d0 ; calculate unit table offset from refNum
add.w #1,d0
neg.w d0
asl.w #2,d0
move.l UTableBase,a1
move.l (a1,d0),a1
move.l (a1),a1
btst #dRAMBased,DCtlFlags+1(a1)
bz.s @romBased
move.l (a1),a1 ; ptr to rom or handle to ram
@romBased move.l (a1),a1
lea drvrName(a1),a1
lea #'.EDisk',a0 ; searching for the EDisk drvr
clr.l d0
move.b (a0),d0
@cmploop cmp.b (a0)+,(a1)+
bne.s @dqloop ; not the EDisk
dbra d0,@cmploop
move.l EDiskDriveInfo.WhereStringPtr(a2),a1
cmpRom ROMInternalRAMDiskString,a1
beq.s @isEphemeral
cmp.l #$408E7DA0,a1 ; nearby location?
bne.s @return
@isEphemeral
subq #4,sp
move.w #-16535,-(sp) ; 'Internal RAM Disk'
_GetString
move.l (sp)+,d0
beq.s @return
move.l d0,a1
move.l (a1),EDiskDriveInfo.WhereStringPtr(a2)
@return rts

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,86 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Disassembled from scratch
;
LOAD 'StandardEqu.d'
INCLUDE 'SysPrivateEqu.a'
INCLUDE 'Slots.a'
INCLUDE 'LinkedPatchMacros.a'
InitADBDrvr ROMBind (SE,$03C9E),(II,$07724),(Portable,$05BEE),(IIci,$0A7B0)
OpenSlots ROMBind (II,$01370),(IIci,$02240)
; Pieced together from StartBoot.a:InitSys7Toolbox
MakeInstall AddFontsToChain,(Plus,SE,II,Portable,IIci)
VMFinalInitialization InstallProc (Plus,SE,II,Portable,IIci,notAUX)
; If VM loaded, we need to call MemoryDispatch with selector (-1) so VM can hold the system heap,
; unhold the boot stack, patch the cursor task, and enable user mode.
MOVE.L #$5C,D0 ; _MemoryDispatch
_GetOSTrapAddress
MOVE.L A0,D1
MOVE #$9F,D0 ; _Unimplemented
_GetToolTrapAddress
CMP.L A0,D1 ; Has VM installed itself?
BEQ.S @noVM ; -> No. No Memory Dispatch
@hasVM MOVEQ #-1,D0 ; Finish VM initialization selector
_MemoryDispatch ; Call VM.
@noVM RTS ; Return to boot3 (or Gibbly)
ADBSecondaryInitialization InstallProc (SE,II,Portable,IIci,notAUX)
JMPROM InitADBDrvr ; Another reinit
SlotMgrSecondaryInitializationII InstallProc (II,notAUX)
IMPORT Secondary_Init
SUB.W #spBlock.spBlockSize,SP ; Make room for a slot parameter block on the stack
MOVEA.L SP,A0 ; Point A0 to the record
BSET #fWarmStart,spBlock.spFlags(A0) ; Set warm start flag
JSR Secondary_Init ; Wake everybody up again
ADD.W #spBlock.spBlockSize,SP ; Remove the param block from the stack
JMPROM OpenSlots ; Open all slot drivers...
SlotMgrSecondaryInitializationIIci InstallProc (IIci,notAUX)
SUB.W #spBlock.spBlockSize,SP ; Make room for a slot parameter block on the stack
MOVEA.L SP,A0 ; Point A0 to the record
BSET #fWarmStart,spBlock.spFlags(A0) ; Set warm start flag
_SecondaryInit ; Wake everybody up again
ADD.W #spBlock.spBlockSize,SP ; Remove the param block from the stack
JMPROM OpenSlots ; Open all slot drivers...
ColorQDSecondaryInitialization InstallProc (II,IIci)
IMPORT DavesRandomVideoStuff
JSR DavesRandomVideoStuff ; re-do CheckDevices and video driver patching.
MOVE.L (a5),-(sp) ; point to the same globals we are using now
_InitGraf ; catch all the new devices
_InitPalettes ,autoPop ; me too...
SetUpIconCluts InstallProc (Plus,SE,II,Portable,IIci)
IMPORT MakeIconData
MOVE.L ExpandMem,a0
PEA ExpandMemRec.emIconCluts(a0)
JSR MakeIconData
RTS
FontMgrSecondaryInitialization InstallProc (Plus,SE,II,Portable,IIci)
_InitFonts ,autoPop ; Reinit the font manager (in case a new one's just been loaded)
END

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted the credits.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: LoadPatches.a ; File: LoadPatches.a
; ;
@ -130,20 +137,25 @@ Failed
Copyright Copyright
string asis string asis
dc.b '© 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991 Apple Computer Inc.',13 dc.b '© 1983-1992 Apple Computer Inc.',13
dc.b 'All Rights Reserved.',13 dc.b 'All Rights Reserved.',13
dc.b 13 dc.b 13
dc.b 'Help! Help! Were being held prisoner in a system software factory!',13 dc.b 'Help! Help! Were still being held prisoner in a system software factory!',13
dc.b 13 dc.b 13
dc.b 'The Blue Meanies',13 dc.b 'The Blue Meanies',13
dc.b 13 dc.b 13
dc.b 'Darin Adler',13 dc.b 'Lew Cirne',13
dc.b 'Scott Boyd',13 dc.b 'David Collins',13
dc.b 'Wayne Correia',13
dc.b 'Chris Derossi',13 dc.b 'Chris Derossi',13
dc.b 'Cynthia Jasper',13 dc.b 'Pete Helme',13
dc.b 'Fred Huxham',13
dc.b 'Don Louv',13
dc.b 'Kevin MacDonell',13
dc.b 'Brian McGhie',13 dc.b 'Brian McGhie',13
dc.b 'Greg Marriott',13 dc.b 'Greg Marriott',13
dc.b 'Beatrice Sochor',13 dc.b 'Jeff Miller',13
dc.b 'Fred Monroe',13
dc.b 'Dean Yu',13 dc.b 'Dean Yu',13
align align

View File

@ -0,0 +1,483 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Disassembled from scratch
;
LOAD 'StandardEqu.d'
INCLUDE 'LinkedPatchMacros.a'
INCLUDE 'PrintTrapsEqu.a'
INCLUDE 'Folders.a'
INCLUDE 'FSEqu.a'
INCLUDE 'LayerEqu.a'
INCLUDE 'Processes.a'
Globals RECORD 0,INCREMENT
gPrmnModDate DS.L 1
gPrmnPrefMem DS.L 1
gPrmnVolRefNum DS.W 1
gPrmnDirID DS.L 1
gPrmnNameHand DS.L 1
gDialogHit DS.W 1
gFlag DS.W 1
GlobalSize EQU *
ENDR
kCancel EQU 1
kPrintLater EQU 2
kPrintNow EQU 3
InstallLowMemoryPrinting InstallProc (Plus,SE,II,Portable,IIci)
WITH Globals
MOVEQ #22,D0 ; create printing global handle
_NewHandle ,sys,clear
MOVE.L ExpandMem,A1
MOVE.L A0,ExpandMemRec.emLowMemoryPrintingGlobals(A1)
MOVE.L A0,A2 ; save printing globals
SUBQ #4,SP
MOVE.L #'STR ',-(SP)
MOVE.W #-16601,-(SP) ; "PrintMonitor"
_GetResource ; get it in the system heap
MOVE.L (A2),A0
MOVE.L (SP)+,gPrmnNameHand(A0)
RTS
LowMemoryPrintingDialogPatch PatchProc _GetResource,(Plus,SE,II,Portable,IIci)
IMPORT lowMemPrintDialog
WITH Globals
MOVE.L ExpandMem,A0
MOVE.L ExpandMemRec.emLowMemoryPrintingGlobals(A0),A0
MOVE.L (A0),A0
TST.B gFlag(A0)
BNE.S @keepTesting
@jmpOld jmpOld
@keepTesting CMP.L #'PREC',6(SP)
BNE.S @jmpOld
CMP.W #127,4(SP)
BNE.S @jmpOld
; PREC 127, call original routine...
LEA 10(SP),A0
SUBQ #4,SP
MOVE.L -(A0),-(SP)
MOVE.W -(A0),-(SP)
BSR.S @jmpOld
MOVE.L (SP)+,D0
MOVE.L D0,10(SP)
BEQ.S @tailReturn ; pass through nil
; and tail patch it...
MOVE.L D0,A0
MOVE.L (A0),A0
BTST #7,(A0)
BNE.S @tailReturn ; skip if first bit is set?
MOVE.L ExpandMem,A0
MOVE.L ExpandMemRec.emLowMemoryPrintingGlobals(A0),A0
_HLock
MOVE.L (A0),A0
LEA gDialogHit(A0),A0
TST.W (A0)
BNE.S @nodo
MOVE.W ResErr,-(SP)
MOVE.W MemErr,-(SP)
MOVEM.L D1/D2/A0/A1,-(SP)
MOVE.L A0,-(SP)
JSR lowMemPrintDialog
MOVE.L ExpandMem,A0
MOVE.L ExpandMemRec.emLowMemoryPrintingGlobals(A0),A0
_HUnlock
MOVEM.L (SP)+,D1/D2/A0/A1
MOVE.W (SP)+,MemErr
MOVE.W (SP)+,ResErr
@nodo
CMP.W #3,(A0)
BNE.S @tailReturn
MOVE.L 10(SP),A0
MOVE.L (A0),A0
BSET #7,(A0)
@tailReturn MOVE.L (SP)+,A0
ADDQ #6,SP
JMP (A0)
NastierPatch PatchProc $A8FD,(Plus,SE,II,Portable,IIci)
IMPORT prmtRunning,prmtPrefMem
WITH Globals
MOVE.L 4(SP),D0
CMP.L #$04000C00,D0
BEQ.S @PrOpenDoc
CMP.L #$08000484,D0
BEQ.S @PrClosDoc
@jmpOld jmpOld
@PrClosDoc LEA 12(SP),A0
MOVE.L -(A0),-(SP)
MOVE.L -(A0),-(SP)
BSR.S @jmpOld
MOVE.L ExpandMem,A0
MOVE.L ExpandMemRec.emLowMemoryPrintingGlobals(A0),A0
MOVE.L (A0),A0
CLR.B gFlag(A0)
MOVE.L (SP)+,A0
ADDQ #8,SP
JMP (A0)
@PrOpenDoc MOVE.L ExpandMem,A0
MOVE.L ExpandMemRec.emLowMemoryPrintingGlobals(A0),A0
MOVE.L (A0),A0
CLR.W gDialogHit(A0)
SUBQ #2,SP
JSR prmtRunning
TST.B (SP)+
BNE.S @jmpOld
MOVE.L D3,-(SP)
SUBQ #4,SP
JSR prmtPrefMem
MOVE.L (SP)+,D3
BEQ.S @cannotBackground
BMI.S @cleanupgo
SUBQ #4,SP
_TempFreeMem
MOVE.L (SP)+,D1
SUB.L #20*1024,D1
CMP.L D3,D1
BGE.S @cleanupgo
@cannotBackground
MOVE.L (SP)+,D3
MOVE.L ExpandMem,A0
MOVE.L ExpandMemRec.emLowMemoryPrintingGlobals(A0),A0
MOVE.L (A0),A0
MOVE.B #1,gFlag(A0)
LEA 20(SP),A0
SUBQ #4,SP
MOVE.L -(A0),-(SP)
MOVE.L -(A0),-(SP)
MOVE.L -(A0),-(SP)
MOVE.L -(A0),-(SP)
BSR.S @jmpOld
MOVE.L (SP)+,20(SP)
MOVE.L ExpandMem,A0
MOVE.L ExpandMemRec.emLowMemoryPrintingGlobals(A0),A0
MOVE.L (A0),A0
CMP.W #kCancel,gDialogHit(A0)
BNE.S @noErr
MOVE.W #128,-(SP)
_PrSetError
@noErr
MOVE.L (SP)+,A0
LEA 16(SP),SP
JMP (A0)
@cleanupgo MOVE.L (SP)+,D3
BRA.W @jmpOld
; Return a long, equal to the PrintMonitor's preferred memory partition
; Error if negative
prmtPrefMem PROC EXPORT
WITH Globals,HParamBlockRec,HFileParam
prmtPrefMemFrm RECORD {A6Link},DECREMENT
result DS.L 1
return DS.L 1
A6Link DS.L 1
HFQEl DS.B ioHFQElSiz
prmonRefNum DS.W 1
LocalSize EQU *
ENDR
WITH prmtPrefMemFrm
LINK A6,#LocalSize
MOVE.L A2,-(SP)
CLR.L result(A6)
MOVE.L ExpandMem,A0
MOVE.L ExpandMemRec.emLowMemoryPrintingGlobals(A0),A0
_HLock
MOVE.L (A0),A2
TST.L gPrmnDirID(A2)
BNE.S @gotExtn
SUB.L #2,SP
MOVE.W #kOnSystemDisk,-(SP)
MOVE.L #kExtensionFolderType,-(SP)
CLR.W -(SP) ; do not create
PEA gPrmnVolRefNum(A2)
PEA gPrmnDirID(A2)
MOVEQ #0,D0
_AliasDispatch ; FindFolder
MOVE.W (SP)+,D0
BNE @return
@gotExtn
LEA HFQEl(A6),A0
MOVEQ #ioHFQElSiz/2-1,D0
@clearLoop CLR.W (A0)+
DBRA D0,@clearLoop
LEA HFQEl(A6),A0
MOVE.L gPrmnNameHand(A2),A1
MOVE.L (A1),ioNamePtr(A0)
MOVE.W gPrmnVolRefNum(A2),ioVRefNum(A0)
CLR.W ioFDirIndex(A0)
MOVE.L gPrmnDirID(A2),ioDirID(A0)
_GetCatInfo
BEQ.S @gotPrintMon
MOVE.L D0,result(A6)
BRA.S @return
@gotPrintMon
TST.L gPrmnModDate(A2)
BEQ.S @globWasZero
MOVE.L gPrmnModDate(A2),D0
CMP.L ioFlMdDat(A0),D0
BNE.S @globWasZero
MOVE.L gPrmnPrefMem(A2),result(A6)
BRA.S @return
@globWasZero
MOVE.L ioFlMdDat(A0),gPrmnModDate(A2)
SUB.L #2,SP
MOVE.W gPrmnVolRefNum(A2),-(SP)
MOVE.L gPrmnDirID(A2),-(SP)
MOVE.L gPrmnNameHand(A2),A1
MOVE.L (A1),-(SP)
MOVE.B #1,-(SP)
_HOpenResFile
MOVE.W (SP)+,prmonRefNum(A6)
BMI.S @return
SUB.L #4,SP
MOVE.L #'SIZE',-(SP)
MOVE.W #0,-(SP)
_Get1Resource
MOVE.L (SP)+,D0
BNE.S @gotSizeRes
SUB.L #4,SP
MOVE.L #'SIZE',-(SP)
MOVE.W #-1,-(SP)
_Get1Resource
MOVE.L (SP)+,D0
BEQ.S @closeAndReturn
@gotSizeRes
MOVE.L D0,A0
MOVE.L (A0),A0
MOVE.L 2(A0),D0
MOVE.L D0,result(A6)
MOVE.L D0,gPrmnPrefMem(A2)
@closeAndReturn
MOVE.W prmonRefNum(A6),-(SP)
_CloseResFile
@return
MOVE.L ExpandMem,A0
MOVE.L ExpandMemRec.emLowMemoryPrintingGlobals(A0),A0
_HUnlock
MOVE.L (SP)+,A2
UNLK A6
RTS
; Return a bool, true if the PrintMonitor is running
prmtRunning PROC EXPORT
WITH Globals
prmtRunningFrm RECORD {A6Link},DECREMENT
result DS.W 1
return DS.L 1
A6Link DS.L 1
psn DS ProcessSerialNumber
procInfo DS ProcessInfoRec
LocalSize EQU *
ENDR
WITH prmtRunningFrm
LINK A6,#LocalSize
MOVEQ #0,D0
MOVE.L D0,psn.highLongOfPSN(A6)
MOVE.L D0,psn.lowLongOfPSN(A6)
MOVEQ #ProcessInfoRec.size,D1
MOVE.L D1,procInfo.processInfoLength(A6)
MOVE.L D0,procInfo.processName(A6)
MOVE.L D0,procInfo.processAppSpec(A6)
BRA.S @nextProcess
@getProcessInfo SUB.L #2,SP
PEA psn(A6)
PEA procInfo(A6)
_GetProcessInformation
TST.W (SP)+
BNE.S @nextProcess
CMP.L #'prmt',procInfo.processSignature(A6)
BNE.S @nextProcess
MOVE.B #1,result(A6)
BRA.S @return ; Print Monitor 'prmt' running
@nextProcess SUB.L #2,SP
PEA psn(A6)
_GetNextProcess
TST.W (SP)+
BEQ.S @getProcessInfo
CLR.B result(A6) ; not running
@return UNLK A6
RTS
; Dialog: "Your document will be printed in the background when more memory is available"
; Takes one argument: a pointer to a word
; The pointed-to word is set to the hit item: 1 = Cancel, 2 = Print Later, 3 = Print Now
lowMemPrintDialog PROC EXPORT
IMPORT HandToHand
WITH Globals
lowMemPrintDialogFrm RECORD {A6Link},DECREMENT
result DS.L 1
return DS.L 1
A6Link DS.L 1
oldZone DS.L 1
newDitlHand DS.L 1
itemHit DS.W 1
LocalSize EQU *
savedRegs DS.L 3
ENDR
WITH lowMemPrintDialogFrm
@regs REG D7/A3/A4
LINK A6,#LocalSize
MOVEM.L @regs,-(SP)
_GetZone
MOVE.L A0,oldZone(A6)
MOVE.L SysZone,A0
_SetZone
SUB.L #4,SP
MOVE.L #'DITL',-(SP)
MOVE.W #-16601,-(SP)
_GetResource
MOVE.L (SP)+,A4
SUB.L #2,SP
_ResError
TST.W (SP)+
BNE @return
SUB.L #4,SP
MOVE.L #'RECT',-(SP)
MOVE.W #-16601,-(SP)
_GetResource
MOVE.L (SP)+,A3
SUB.L #2,SP
_ResError
TST.W (SP)+
BNE @return
MOVE.L A4,newDitlHand(A6)
SUB.L #2,SP
PEA newDitlHand(A6)
JSR HandToHand
TST.W (SP)+
BEQ.S @ditlCopied
MOVE.L oldZone(A6),A0
_SetZone
BRA @return
@ditlCopied
MOVE.L A3,A0 ; the dialog rect
_HLock
SUB.L #4,SP
MOVEQ #0,D0
MOVE.L D0,-(SP) ; wStorage = nil
MOVE.L (A3),-(SP) ; boundsRect
MOVE.L D0,-(SP) ; title = nil
MOVEQ #0,D1
MOVE.B D1,-(SP) ; visible = false
MOVEQ #1,D0
MOVE.W D0,-(SP) ; procID = 1
MOVEQ #-1,D0
MOVE.L D0,-(SP) ; behind = -1
MOVE.B D1,-(SP) ; goAwayFlag = false
MOVEQ #0,D0
MOVE.L D0,-(SP) ; refCon = 0
MOVE.L newDitlHand(A6),-(SP) ; itmLstHndl = newDitlHand
_NewDialog
MOVE.L (SP)+,A4
SUB.L #2,SP
MOVE.L A4,-(SP)
MOVEQ #3,D0
MOVE.W D0,-(SP)
_SetDialogDefaultItem
MOVE.W (SP)+,D7
SUB.L #2,SP
MOVE.L A4,-(SP)
MOVEQ #1,D0
MOVE.W D0,-(SP)
_SetDialogCancelItem
MOVE.W (SP)+,D7
MOVE.L A4,-(SP) ; whichWindow = our dialog
MOVEQ #lcMainScreen,D0
MOVE.B D0,-(SP) ; where = lcMainScreen
MOVEQ #hcCenter,D1
MOVE.B D1,-(SP) ; horizontalControl = hcCenter
MOVEQ #vcAlertCenter,D0
MOVE.B D0,-(SP) ; verticalControl = vcAlertCenter
_AutoPositionWindow
_InitCursor
MOVE.L A4,-(SP)
_ShowWindow
MOVEQ #0,D0
MOVE.L D0,-(SP) ; filterProc = nil
PEA itemHit(A6)
_ModalDialog
MOVE.L A4,-(SP)
_DisposeDialog
MOVE.L A3,A0 ; the dialog rect
_HUnlock
MOVE.L oldZone(A6),A0
_SetZone
MOVE.L result(A6),A0
MOVE.W itemHit(A6),(A0)
@return MOVEM.L savedRegs(A6),@regs
UNLK A6
MOVE.L (SP)+,(SP)
RTS

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -1,3 +1,14 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Restored the IIci check that <SM7> removed around Power Manager code.
; Added TSM clean-up code to CleanupApp. Added ExpandMem-based dispatchers
; for several Packs. Added includes to support this new code, plus
; HardwarePrivateEqu.a to support UniversalEqu.a (odd that this was
; missing).
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: MiscPatches.a ; File: MiscPatches.a
; ;
@ -135,6 +146,12 @@
PRINT PUSH,OFF PRINT PUSH,OFF
LOAD 'StandardEqu.d' LOAD 'StandardEqu.d'
include 'Dictionary.a' ; <Sys7.1>
include 'HardwarePrivateEqu.a' ; <Sys7.1>
include 'Processes.a' ; <Sys7.1>
include 'SysEqu.a' ; <Sys7.1>
include 'SysPrivateEqu.a' ; <Sys7.1>
include 'TSMPrivate.a' ; <Sys7.1>
INCLUDE 'LinkedPatchMacros.a' INCLUDE 'LinkedPatchMacros.a'
INCLUDE 'BTreeEqu.a' INCLUDE 'BTreeEqu.a'
include 'MMUEqu.a' include 'MMUEqu.a'
@ -243,7 +260,9 @@ SynchIdleTimeProc PatchProc _SynchIdleTime
_PPC ; PPC trap <PN> _PPC ; PPC trap <PN>
WITH PMgrRec,PowerDispRec ; WITH PMgrRec,PowerDispRec ;
BRA.S @Done ; <PN> branch always because we are SM ROM MOVE.L ROMBase,A0 ; ex<SM7> <Sys7.1> check for IIci
CMP.W #$67C,8(A0)
BNE.S @Done
Testfor hwCbPwrMgr ; do we have a power manager? Testfor hwCbPwrMgr ; do we have a power manager?
BEQ.S @Done ; no power cycling BEQ.S @Done ; no power cycling
MOVE.L PMgrBase,A0 ; Get the Power Manager Globals MOVE.L PMgrBase,A0 ; Get the Power Manager Globals
@ -338,6 +357,31 @@ CleanupApp PatchProc _CleanupApplication
@noEditionMgr @noEditionMgr
ENDIF ENDIF
;
; Clean up Text Services Manager <Sys7.1>
;
SUBQ #8,SP ; make space for PSN
CLR.W -(SP) ; clear space to return OSErr
PEA 2(SP) ; push PSN buf ptr
_GetCurrentProcess
TST.W (SP)+
BNE.S @noKillTSM
CLR.W -(SP) ; room for result
PEA 2(SP) ; PSN
MOVE.W #0,-(SP) ; flag = false
_InlineAware
TST.B (SP)+
BEQ.S @noKillTSM
CLR.W -(SP)
MOVE.W #kMsgKillTSMApp,-(SP)
PEA 4(SP)
_InformTSM
TST.W (SP)+
@noKillTSM
ADDQ #8,SP ; clean up PSN on stack
; ;
; Clean up Compoents and Component insetances belong to this app. ; Clean up Compoents and Component insetances belong to this app.
; ;
@ -444,6 +488,64 @@ get70MgrAttr PROC
; ;
;___________________________________________________________________________________ ;___________________________________________________________________________________
; <Sys7.1> Dispatch Apple Event Manager through ExpandMem.
Pack8Patch PatchProc _Pack8
MOVE.L App2Packs,A0
MOVE.L ExpandMem,A1
LEA ExpandMemRec.emPack8Globals(A1),A1
_ProcHelper
; <Sys7.1> Dispatch PPC Manager through ExpandMem.
Pack9Patch PatchProc _Pack9
MOVE.L App2Packs+4,A0
MOVE.L ExpandMem,A1
LEA ExpandMemRec.emPack9Globals(A1),A1
_ProcHelper
; <Sys7.1> Dispatch Edition Manager through ExpandMem.
Pack11Patch PatchProc _Pack11
MOVE.L App2Packs+12,A0
MOVE.L ExpandMem,A1
LEA ExpandMemRec.emPack11Globals(A1),A1
_ProcHelper
; <Sys7.1> Dispatch Data Access Manager through ExpandMem.
Pack13Patch PatchProc _Pack13
TST.B D0
BEQ.S @initialize
; If not initializing right now, check that SnarfMan is initialized.
MOVE.L ExpandMem,A0
TST.L ExpandMemRec.emSnarfGlobals(A0)
BEQ.S @uninitialized
@initialize MOVE.L App2Packs+20,A0
MOVE.L ExpandMem,A1
LEA ExpandMemRec.emPack13Globals(A1),A1
_ProcHelper
; And if not already initialized, then fail.
@uninitialized MOVE.L (SP)+,A0
LSR.W #8,D0
LSL.W #1,D0
ADD.W D0,SP
MOVE.W #rcDBPackNotInited,(SP)
JMP (A0)
; <Sys7.1> Dispatch Picture Utilities through ExpandMem.
Pack15Patch PatchProc _Pack15
MOVE.L App2Packs+28,A0
MOVE.L ExpandMem,A1
LEA ExpandMemRec.emPack15Globals(A1),A1
_ProcHelper
;___________________________________________________________________________________ ;___________________________________________________________________________________
; ;
; dimg entry - Dictionary Manager ; dimg entry - Dictionary Manager

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Clobbered SlotVBLQ after disposing the block to prevent use-after-free.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: PatchIIROM.a ; File: PatchIIROM.a
; ;
@ -6978,6 +6985,7 @@ InitSlotStuff
;and dispose the old vbl queue header ptr structure ;and dispose the old vbl queue header ptr structure
movea.l SlotVBLQ,a0 ; release storage for old SlotVBLQ movea.l SlotVBLQ,a0 ; release storage for old SlotVBLQ
_DisposPtr _DisposPtr
move.l #-1,SlotVBLQ ; prevent use-after-free <Sys7.1>

View File

@ -1,3 +1,14 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Added boxFlag setting code for LCII and PB145. Added code to treat LCII
; like LC (GPI pin not connected). Brought the "new and improved bus error
; handler" back from SCSIMgrHW.a. Removed the "FixBackSANE" patch, which
; overrode the entirety of SANE in non-TERROR ROMs (fixing an unknown
; bug). Protected some Egret- only patch code with checks for a Cuda.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: PatchIIciROM.a ; File: PatchIIciROM.a
; ;
@ -1492,6 +1503,8 @@ gestaltSerial PROC EXPORT
moveq.l #0,d0 ; assume no GPI connections moveq.l #0,d0 ; assume no GPI connections
cmpi.w #gestaltMacLC,machType(a0) ; <107> use real machine name now... cmpi.w #gestaltMacLC,machType(a0) ; <107> use real machine name now...
beq.s @noGPI beq.s @noGPI
cmpi.w #gestaltMacLCII,machType(a0) ; <Sys7.1> Like LC, LCII has no GPI pin connected
beq.s @noGPI ; <Sys7.1>
; IIci and IIsi have GPI connected ; IIci and IIsi have GPI connected
moveq.l #(1<<gestaltHasGPIaToDCDa)|\ ; GPIa connected to DCDa moveq.l #(1<<gestaltHasGPIaToDCDa)|\ ; GPIa connected to DCDa
(1<<gestaltHasGPIaToRTxCa)|\ ; GPIa connected to RTxCa clock input) (1<<gestaltHasGPIaToRTxCa)|\ ; GPIa connected to RTxCa clock input)
@ -6359,10 +6372,25 @@ ROMBusErrRecovery EQU $00008a6c ; recovery delay routine in ROM <29>
cmp.l SCSIHsk,d0 ; was it a SCSI chip access ? cmp.l SCSIHsk,d0 ; was it a SCSI chip access ?
beq.s @start ; if so, start processing the bus error beq.s @start ; if so, start processing the bus error
movem.l d1/a4,-(sp) ; save what we will trash <PN><Sys7.1>
move.l SCSIGlobals,a4 ; load our globals reference <PN><Sys7.1>
move.l SCSI2Base,d1 ; is the external SCSI chip base address valid? <PN><Sys7.1>
beq.s @NoSCSIBus2 ; -> no, cleanup and bail <PN><Sys7.1>
cmp.l scsiGlobalRecord.hhsk5380_2(a4),d0 ; was it an external SCSI chip access ? <PN><Sys7.1>
beq.s @Is2ndSCSI ; if so, start processing the bus error <PN><Sys7.1>
@NoSCSIBus2 ; <PN><Sys7.1>
movem.l (sp)+,d1/a4 ; restore d1/a4 <PN><Sys7.1>
move.l (sp)+,d0 ; restore d0 move.l (sp)+,d0 ; restore d0
move.l OldBusErrVct(a6),-(sp) ; put old bus error handler addr on stack <end> move.l OldBusErrVct(a6),-(sp) ; put old bus error handler addr on stack <end>
rts ; jump to old handler, assuming it'll RTE <29> rts ; jump to old handler, assuming it'll RTE <29>
@Is2ndSCSI ; <PN><Sys7.1>
movem.l (sp)+,d1/a4 ; restore d1/a4 <PN><Sys7.1>
@start @start
subq.w #1,BusErrCount(a6) ; retry until we get tired subq.w #1,BusErrCount(a6) ; retry until we get tired
@ -8047,6 +8075,18 @@ FixUpLooP move.l (A0)+, D1
;========================================================================================= ;=========================================================================================
;———————————————————————————————————————————————————————————————————————————— <Sys7.1>
; Distinguish LCII from the LC using ROM version
;
cmp.b #boxMacLC,BoxFlag
bne.s @notLCII
move.l RomBase,a0
cmp.b #$19,ROMHeader.ROMRelease(a0)
bne.s @notLCII
move.b #boxMacLCII,BoxFlag
@notLCII
;———————————————————————————————————————————————————————————————————————————— GGD <8.4> ;———————————————————————————————————————————————————————————————————————————— GGD <8.4>
; Fix _StripAddress to not check the MMStartMode bit of MMFlags at runtime, ; Fix _StripAddress to not check the MMStartMode bit of MMFlags at runtime,
; because the memory manager changes that bit when accessing ROM resources, ; because the memory manager changes that bit when accessing ROM resources,
@ -8090,7 +8130,11 @@ FixStripAddress
BTST.L #hwCbPwrMgr,D0 ; Do we have a PowerMgr? BTST.L #hwCbPwrMgr,D0 ; Do we have a PowerMgr?
BEQ.S @DoneTimLC ; -> No. This is not a Portable of any kind BEQ.S @DoneTimLC ; -> No. This is not a Portable of any kind
; We're on a TERROR $67C ROM with a PwrMgr and no FPU. ; We're on a TERROR $67C ROM with a PwrMgr and no FPU.
BTST.B #0,$50FB4000 ; Interrogate the JAWS "25MHz" flag. <Sys7.1>
BNE.S @jaws25 ; -> Set. We're on a "25 MHz PowerBook 140"... <Sys7.1>
MOVE.B #boxPowerBook140,boxFlag ; We're on a Tim LC. Stuff the right boxFlag <146> MOVE.B #boxPowerBook140,boxFlag ; We're on a Tim LC. Stuff the right boxFlag <146>
BRA.S @DoneTimLC ; -> Unset. <Sys7.1>
@jaws25 MOVE.B #boxPowerBook145,boxFlag ; ...Which is a PowerBook 145! Stuff the boxFlag. <Sys7.1>
@DoneTimLC @DoneTimLC
;———————————————————————————————————————————————————————————————————————————— <130><131><8><9> ;———————————————————————————————————————————————————————————————————————————— <130><131><8><9>
@ -8148,98 +8192,7 @@ FixStripAddress
@FixPMLoopEnd MOVE.L D2,(A0)+ ; stash correct address, bump A0 @FixPMLoopEnd MOVE.L D2,(A0)+ ; stash correct address, bump A0
DBRA D0,@FixPMLoop ; and count down, including zero. dvb <8.3> end DBRA D0,@FixPMLoop ; and count down, including zero. dvb <8.3> end
;__________________________________________________________________________ ; <Sys7.1> Removed "FixBackSANE" patch to override the SANE in non-TERROR ROMs.
;__________________________________________________________________________
FixBackSANE MOVE.L #'fpu ',D0 ; Gestalt FPU selector
_Gestalt ; Do it
MOVE.L A0,D0 ; Do we have an FPU?
BEQ @ReallyDone ; -> No, do nothing
MOVE.L ROMBase,A0 ; Get ROM base
CMPI.B #TERRORminorVers,18(A0) ; Is this TERROR 067C ROM?
BEQ @ReallyDone ; -> Yes, leave the ROM SANE enabled!
CMPI.B #ZYDECOminorVers,18(A0) ; Is this Zydeco 067C ROM?
BEQ @ReallyDone ; -> Yes, leave the ROM SANE enabled!
@DisableSANEinROM
MOVE.B ResLoad,-(SP) ; Save current resLoad state
MOVE.W CurMap,-(SP) ; Save Current Rsrc Map refNum
CLR.W CurMap ; Make the System the current Map (CurMap = 0)
SF ResLoad ; Don't actually read the rsrc
CLR.L -(SP) ; Result
MOVE.L #'PACK',-(SP) ; Type
MOVE.W #4,-(SP) ; Id 4
_Get1Resource
MOVE.L (SP)+,D0 ; Did we get it?
BEQ @Done ; -> No, PACK 4 is not on the disk. Exit Now! (Use the ROM SANE)
MOVE.L D0,-(SP)
_ReleaseResource ; Make the System SANE handle go away. (or we'll get it at the _RmveRsrc)
SF ResLoad ; Don't actually read the rsrc
CLR.L -(SP) ; Result
MOVE.L #'PACK',-(SP) ; Type
MOVE.W #5,-(SP) ; Id 5
_Get1Resource
MOVE.L (SP)+,D0 ; Did we get it?
BEQ @Done ; -> No, PACK 5 is not on the disk. Exit Now! (Use the ROM SANE)
MOVE.L D0,-(SP)
_ReleaseResource ; Make the System SANE handle go away. (or we'll get it at the _RmveRsrc)
ST RomMapInsert ; Put the ROM map in first
MOVE.W #1,CurMap ; Make the ROM map current
CLR.L -(SP) ; Result
MOVE.L #'PACK',-(SP) ; Type
MOVE.W #4,-(SP) ; Id 4
_Get1Resource
MOVE.L (SP)+,D0 ; Did we get it?
BEQ.S @Try45 ; -> No, try 4 five.
MOVE.L D0,-(SP) ; The Handle (save a copy of it)
MOVE.L ROMMapHndl,-(SP) ; Save this
MOVE.L #-1,ROMMapHndl ; To fool SetResAttr into letting use change ROM rsrc attrs
MOVE.L D0,-(SP) ; The Handle (push it. Push it good)
MOVE.W #$50,-(SP) ; A good value (Unprotected)
_SetResAttrs
MOVE.L (SP)+,ROMMapHndl
MOVE.W #1,CurMap ; Set CurMap to the ROM rsrc map
ST RomMapInsert ; Dont load the rsrc into memory
_RmveResource
@Try45 ST RomMapInsert ; Put the ROM map in first
CLR.L -(SP) ; Result
MOVE.L #'PACK',-(SP) ; Type
MOVE.W #5,-(SP) ; Id 5
_Get1Resource
MOVE.L (SP)+,D0 ; Did we get it?
BEQ.S @Done ; -> No, exit
MOVE.L D0,-(SP) ; The Handle (save a copy of it)
MOVE.L ROMMapHndl,-(SP) ; Save this
MOVE.L #-1,ROMMapHndl ; To fool SetResAttr into letting use change ROM rsrc attrs
MOVE.L D0,-(SP) ; The Handle (push it. Push it good)
MOVE.W #$50,-(SP) ; A good value (Unprotected)
_SetResAttrs
MOVE.L (SP)+,ROMMapHndl
MOVE.W #1,CurMap ; Set CurMap to the ROM rsrc map
ST RomMapInsert ; Dont load the rsrc into memory
_RmveResource
@Done MOVE.W (SP)+,CurMap ; Restore the current res map
MOVE.B (SP)+,resLoad ; Restore ResLoad
@ReallyDone
;__________________________________________________________________________
;__________________________________________________________________________
;____________________________________________________________________________ <2> RMP ;____________________________________________________________________________ <2> RMP
; This patch is used to fix a problem in the MPW Shell on Eclipse. See above. ; This patch is used to fix a problem in the MPW Shell on Eclipse. See above.
@ -8693,6 +8646,10 @@ FixQDColors ; <4.7>
AND.B #ClockMask,D0 ; (bits 4-6) <107> SAM (Use ClockMask!) AND.B #ClockMask,D0 ; (bits 4-6) <107> SAM (Use ClockMask!)
CMP.B #ClockEgret,D0 ; Is bit 5 on? CMP.B #ClockEgret,D0 ; Is bit 5 on?
BNE.S @EndOfEgretOnly ; -> Nope, skip this install code BNE.S @EndOfEgretOnly ; -> Nope, skip this install code
AND.L #EgretFWMask,D0 ; Get Egret "version". <Sys7.1>
BEQ.S @EndOfEgretOnly ; No Egret -> Skip patch. <Sys7.1>
CMP.L #Cuda,D0 ; Cuda? <Sys7.1>
BGE.S @EndOfEgretOnly ; -> Skip patch. <Sys7.1>
;---------------------------------------------------------------------------------------------------- ;----------------------------------------------------------------------------------------------------
; This patch bypasses the physical read of egret when reading the time. The time is automatically ; This patch bypasses the physical read of egret when reading the time. The time is automatically

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Removed code to preflight the system heap with ResrvMem
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: ProcessManagerSegmentTweaks.a ; File: ProcessManagerSegmentTweaks.a
; ;
@ -34,21 +41,12 @@ LoadProcessManagerSegmentsLowerInSysHeap InstallProc (Plus,SE,II,IIci,Portable)
_CurResFile ; Remember the current resource file _CurResFile ; Remember the current resource file
clr.w -(sp) clr.w -(sp)
_UseResFile ; Work on the System file _UseResFile ; Work on the System file
move.b ResLoad,-(sp) ; Save current resource load state
lea ProcessManagerSegmentTable,a4 ; Table of Process Manager segments to load low lea ProcessManagerSegmentTable,a4 ; Table of Process Manager segments to load low
@loadLoop @loadLoop
move.w (a4)+,d7 ; Get the segment number move.w (a4)+,d7 ; Get the segment number
bz.s @doneWithSegments ; Did em all bz.s @doneWithSegments ; Did em all
sf ResLoad ; Dont load in resources ; <Sys7.1> Don't preflight with Get1Resource/SizeRsrc/ResrvMem
subq #8,sp ; Space for _SizeResource result too
move.l #kProcessManagerSegmentType,-(sp)
move.w d7,-(sp)
_Get1Resource
_SizeRsrc ; Find out how big it is
move.l (sp)+,d0 ; Get the size
_ResrvMem ,Sys ; Make some space low in the heap
st ResLoad ; Load it in for real now
subq #4,sp subq #4,sp
move.l #kProcessManagerSegmentType,-(sp) move.l #kProcessManagerSegmentType,-(sp)
move.w d7,-(sp) move.w d7,-(sp)
@ -57,7 +55,6 @@ LoadProcessManagerSegmentsLowerInSysHeap InstallProc (Plus,SE,II,IIci,Portable)
bra.s @loadLoop bra.s @loadLoop
@doneWithSegments @doneWithSegments
move.b (sp)+,ResLoad ; Restore resource load state
_UseResFile ; The current resource file is on the stack _UseResFile ; The current resource file is on the stack
rts rts

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Added extra CLRs to ensure spId/spTBMask is initialized for the SlotMgr.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: VideoPatch.a ; File: VideoPatch.a
; ;
@ -481,7 +488,9 @@ ROMMinVer Equ $12 ; Offset from ROMBase to RAM Major version word.
StartDAFB StartDAFB
Move.l A3,A0 ; Get spBlock ptr into A0. Move.l A3,A0 ; Get spBlock ptr into A0.
Clr.b spSlot(A0) ; We only care about Slot $0. Clr.b spSlot(A0) ; We only care about Slot $0.
Clr.b spId(A0) ; <Sys7.1>
Clr.b spExtDev(A0) ; (No external device.) Clr.b spExtDev(A0) ; (No external device.)
Clr.b spTBMask(A0) ; <Sys7.1>
Move.w #catDisplay,spCategory(A0) ; Look for: Display, Move.w #catDisplay,spCategory(A0) ; Look for: Display,
Move.w #typVideo,spCType(A0) ; Video, Move.w #typVideo,spCType(A0) ; Video,
Move.w #drSwApple,spDrvrSW(A0) ; Apple, Move.w #drSwApple,spDrvrSW(A0) ; Apple,
@ -970,6 +979,7 @@ StartJMFB
Move.b D3,spSlot(A0) ; Set the slot number to search in. Move.b D3,spSlot(A0) ; Set the slot number to search in.
Clr.b spId(A0) ; Begin at id 0. Clr.b spId(A0) ; Begin at id 0.
Clr.b spExtDev(A0) ; No external device. Clr.b spExtDev(A0) ; No external device.
Clr.b spTBMask(A0) ; <Sys7.1>
Move.w #catDisplay,spCategory(A0) ; Look for: Display, Move.w #catDisplay,spCategory(A0) ; Look for: Display,
Move.w #typVideo,spCType(A0) ; Video, Move.w #typVideo,spCType(A0) ; Video,
Move.w #drSwApple,spDrvrSW(A0) ; Apple, Move.w #drSwApple,spDrvrSW(A0) ; Apple,

View File

@ -1,3 +1,10 @@
;
; Hacks to match MacOS (most recent first):
;
; <Sys7.1> 8/3/92 Reverted <4> by recreating the non-standard "MyGestalt" glue asm.
; 9/2/94 SuperMario ROM source dump (header preserved below)
;
; ;
; File: DAHandler.a ; File: DAHandler.a
; ;
@ -172,4 +179,20 @@ GSHSDone
ENDPROC ENDPROC
;---------------------------------------------------------------------------------------
; Non-standard glue, only used at DAHandler init ex<4> <Sys7.1>
; (Marks the Init segment for UnloadSeg calls)
SEG 'Init'
MYGESTALT PROC EXPORT
MOVE.L 8(SP),D0
_Gestalt
MOVE.L 4(SP),A1
MOVE.L A0,(A1)
MOVE.L (SP)+,A0
LEA.L 8(SP),SP
MOVE.W D0,(SP)
JMP (A0)
END END

View File

@ -1,3 +1,11 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Reverted <16> by using the non-standard "MyGestalt" glue for an init-
time Gestalt call, and for freeing the Init code segment.
9/2/94 SuperMario ROM source dump (header preserved below)
*/
/* /*
File: DAHandler.c File: DAHandler.c
@ -392,7 +400,7 @@ main(void)
// <12> Now that DAHandler is up and running, its Init and %A5Init segments can be // <12> Now that DAHandler is up and running, its Init and %A5Init segments can be
// unloaded. // unloaded.
UnloadSeg((Ptr) StartupCode); // <12> Unload Init UnloadSeg((Ptr) MyGestalt); // <12> ex<16> <Sys7.1> Unload Init
UnloadSeg((Ptr) _DataInit); // <12> Unload %A5Init UnloadSeg((Ptr) _DataInit); // <12> Unload %A5Init
/* The event loop */ /* The event loop */
@ -509,7 +517,7 @@ InitConfig(void)
Colorized = false; Colorized = false;
Has32BitQD = false; Has32BitQD = false;
if (Gestalt(gestaltQuickdrawVersion,&qdInfo) == noErr) if (MyGestalt(gestaltQuickdrawVersion,&qdInfo) == noErr) // ex<16> <Sys7.1>
{ {
qdInfo &= 0xFFFF; qdInfo &= 0xFFFF;
Colorized = (qdInfo >= gestalt8BitQD); Colorized = (qdInfo >= gestalt8BitQD);

View File

@ -1,3 +1,11 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Reverted the MemoryMgrPriv.h include from <25>, as incompatible with
Zone.h, instead getting MoveHLow from EppcPrivate.h.
9/2/94 SuperMario ROM source dump (header preserved below)
*/
/* /*
File: Eppc.c File: Eppc.c
@ -206,7 +214,6 @@
#include <Errors.h> #include <Errors.h>
#include <MFPrivate.h> #include <MFPrivate.h>
#include <Memory.h> #include <Memory.h>
#include <MemoryMgrPriv.h>
#include <PPCToolBox.h> #include <PPCToolBox.h>
#include <AppleEventsInternal.h> #include <AppleEventsInternal.h>
#include <Errors.h> #include <Errors.h>

View File

@ -1,3 +1,11 @@
/*
Hacks to match MacOS (most recent first):
<Sys7.1> 8/3/92 Reverted <8> by bringing MoveHLow back from MemoryMgrPriv.h (to be
included indirectly by Eppc.c).
9/2/94 SuperMario ROM source dump (header preserved below)
*/
/* /*
File: EppcPrivate.h File: EppcPrivate.h
@ -107,4 +115,8 @@ void postReturnReceipt(const MFmsgBlkPtr mfMsgBlk, signed short rtnModifiers);
void postTranslationResult(MFmsgBlkPtr, OSErr); void postTranslationResult(MFmsgBlkPtr, OSErr);
void flushMsg(MFmsgBlkPtr aMsg, unsigned short rtnModifiers); void flushMsg(MFmsgBlkPtr aMsg, unsigned short rtnModifiers);
#pragma parameter MoveHLow(__A0) // ex<8> <Sys7.1>
pascal void MoveHLow(Handle h) // ex<8> <Sys7.1>
= 0xA09D; // ex<8> <Sys7.1>
#endif __EPPCPRIVATE__ #endif __EPPCPRIVATE__

Some files were not shown because too many files have changed in this diff Show More