mirror of
https://github.com/garrettsworkshop/MacIIROMDiskDriver.git
synced 2024-11-24 02:33:04 +00:00
Added GWROMDisk padding to start
This commit is contained in:
parent
7447f582d3
commit
87253c5c0b
16
rdisk.c
16
rdisk.c
@ -7,6 +7,18 @@
|
|||||||
#include <OSUtils.h>
|
#include <OSUtils.h>
|
||||||
|
|
||||||
#include "rdtraps.h"
|
#include "rdtraps.h"
|
||||||
|
|
||||||
|
// This function is here just to put padding at the
|
||||||
|
// beginning of the output file
|
||||||
|
void GWROMDisk() {
|
||||||
|
StripAddress(&GWROMDisk);
|
||||||
|
StripAddress(&GWROMDisk);
|
||||||
|
StripAddress(&GWROMDisk);
|
||||||
|
StripAddress(&GWROMDisk);
|
||||||
|
StripAddress(&GWROMDisk);
|
||||||
|
StripAddress(&GWROMDisk);
|
||||||
|
}
|
||||||
|
|
||||||
#define RDiskSize (0x00180000L)
|
#define RDiskSize (0x00180000L)
|
||||||
#define RDiskBuf ((char*)0x40880000)
|
#define RDiskBuf ((char*)0x40880000)
|
||||||
#define BufPtr ((Ptr*)0x10C)
|
#define BufPtr ((Ptr*)0x10C)
|
||||||
@ -40,6 +52,10 @@ OSErr RDiskOpen(IOParamPtr p, DCtlPtr d) {
|
|||||||
// Do nothing if already opened
|
// Do nothing if already opened
|
||||||
if (d->dCtlStorage) { return noErr; }
|
if (d->dCtlStorage) { return noErr; }
|
||||||
|
|
||||||
|
// Reference GWROMDisk() just so it ends up
|
||||||
|
// at the beginning of the output file
|
||||||
|
StripAddress(&GWROMDisk);
|
||||||
|
|
||||||
// Figure out first available drive number
|
// Figure out first available drive number
|
||||||
for (dq = (DrvQElPtr)(GetDrvQHdr())->qHead; dq; dq = (DrvQElPtr)dq->qLink) {
|
for (dq = (DrvQElPtr)(GetDrvQHdr())->qHead; dq; dq = (DrvQElPtr)dq->qLink) {
|
||||||
if (dq->dQDrive >= drvnum) { drvnum = dq->dQDrive + 1; }
|
if (dq->dQDrive >= drvnum) { drvnum = dq->dQDrive + 1; }
|
||||||
|
Loading…
Reference in New Issue
Block a user