mirror of
https://github.com/garrettsworkshop/MacIIROMDiskDriver.git
synced 2024-12-27 03:32:24 +00:00
Add icon
This commit is contained in:
parent
a44f8668e9
commit
2181974aaf
80
rdisk.c
80
rdisk.c
@ -8,6 +8,76 @@
|
||||
|
||||
#include "rdisk.h"
|
||||
|
||||
const long RDiskIcon[65] = {
|
||||
// Icon
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b11111111111111111111111111111111,
|
||||
0b10000000000000000000000000000001,
|
||||
0b10001111001111000001111001111001,
|
||||
0b10001001001001000001001001001001,
|
||||
0b10001001001001000001001001001001,
|
||||
0b10001111001111000001111001111001,
|
||||
0b11000000000000000000000000000001,
|
||||
0b01010101010101011101010101010101,
|
||||
0b01111111111111111111111111111111,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
// Mask
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0b11111111111111111111111111111111,
|
||||
0b11111111111111111111111111111111,
|
||||
0b11111111111111111111111111111111,
|
||||
0b11111111111111111111111111111111,
|
||||
0b11111111111111111111111111111111,
|
||||
0b11111111111111111111111111111111,
|
||||
0b11111111111111111111111111111111,
|
||||
0b01111111111111111111111111111111,
|
||||
0b01111111111111111111111111111111,
|
||||
0b00000000000000000000000000000000,
|
||||
0b00000000000000000000000000000000,
|
||||
0
|
||||
};
|
||||
|
||||
// Switch to 24-bit mode and copy. Call this with
|
||||
// PC==0x408XXXXX, not PC==0x008XXXXX
|
||||
void RDiskCopy24(char *sourcePtr, char *destPtr, unsigned long byteCount) {
|
||||
@ -262,17 +332,21 @@ OSErr RDiskControl(CntrlParamPtr p, DCtlPtr d) {
|
||||
c = *(RDiskStorage_t**)d->dCtlStorage;
|
||||
// Handle control request based on csCode
|
||||
switch (p->csCode) {
|
||||
case accRun:
|
||||
if (!d->dCtlStorage) { return noErr; }
|
||||
return RDiskAccRun(p, d, c);
|
||||
case accRun: return noErr;
|
||||
case 21: case 22:
|
||||
*(Ptr*)&p->csParam = (Ptr)&RDiskIcon;
|
||||
return noErr;
|
||||
default: return controlErr;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma parameter __D0 RDiskStatus(__A0, __A1)
|
||||
OSErr RDiskStatus(CntrlParamPtr p, DCtlPtr d) {
|
||||
RDiskStorage_t *c;
|
||||
// Fail if dCtlStorage null
|
||||
if (!d->dCtlStorage) { return statusErr; }
|
||||
// Dereference dCtlStorage to get pointer to our context
|
||||
c = *(RDiskStorage_t**)d->dCtlStorage;
|
||||
// Handle status request based on csCode
|
||||
switch (p->csCode) {
|
||||
case drvStsCode:
|
||||
|
Loading…
Reference in New Issue
Block a user