ROMBUSDriver/old/rombus.h
2021-08-07 01:01:54 -04:00

179 lines
7.5 KiB
C

#ifndef ROMBUS_H
#define ROMBUS_H
#define RDiskBuf ((char*)0x408C0000)
#define SDiskSize (0x80000000L)
#define BufPtr ((Ptr*)0x10C)
#define MemTop ((Ptr*)0x108)
#define MMU32bit ((char*)0xCB2)
#pragma parameter __D0 RBReadXPRAM(__D0, __D1, __A0)
OSErr RBReadXPRAM(short numBytes, short whichByte, Ptr dest) = {0x4840, 0x3001, 0xA051};
#pragma parameter __D0 RBAddDrive(__D1, __D0, __A0)
OSErr RBAddDrive(short drvrRefNum, short drvNum, DrvQElPtr dq) = {0x4840, 0x3001, 0xA04E};
static inline char RBIsRPressed() { return *((char*)0x175) & 0x80; }
typedef struct RBStorage_s {
DrvSts2 sStatus;
DrvSts2 rStatus;
char initialized;
} RBStorage_t;
typedef void (*RDiskCopy_t)(Ptr, Ptr, unsigned long);
#define copy24(s, d, b) { RDiskCopy_t f = C24; f(s, d, b); }
typedef char (*RDiskPeek_t)(Ptr);
#define peek24(a, d) { RDiskPeek_t f = G24; d = f(a); }
typedef void (*RDiskPoke_t)(Ptr, char);
#define poke24(a, d) { RDiskPoke_t f = S24; f(a, d); }
#define RDISK_ICON_SIZE (285)
const char RDiskIcon[RDISK_ICON_SIZE] = {
// Icon
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b10000000, 0b00000000, 0b00000000, 0b00000001,
0b10001111, 0b00011110, 0b00111100, 0b01111001,
0b10001001, 0b00010010, 0b00100100, 0b01001001,
0b10001001, 0b00010010, 0b00100100, 0b01001001,
0b10001001, 0b00010010, 0b00100100, 0b01001001,
0b10001111, 0b00011110, 0b00111100, 0b01111001,
0b11000000, 0b00000000, 0b00000000, 0b00000001,
0b01010101, 0b01010101, 0b11010101, 0b01010101,
0b01111111, 0b11111111, 0b01111111, 0b11111111,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
// Mask
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b11111111, 0b11111111, 0b11111111, 0b11111111,
0b01111111, 0b11111111, 0b11111111, 0b11111111,
0b01111111, 0b11111111, 0b11111111, 0b11111111,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
27, 'G', 'a', 'r', 'r', 'e', 't', 't', '\'', 's', ' ',
'W', 'o', 'r', 'k', 's', 'h', 'o', 'p', ' ',
'R', 'O', 'M', ' ', 'D', 'i', 's', 'k', 0
};
#define SDISK_ICON_SIZE (283)
const char const SDiskIcon[SDISK_ICON_SIZE] = {
// Icon
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000001, 0b11111111, 0b11111111, 0b11110000,
0b00000001, 0b00000000, 0b00000000, 0b00010000,
0b00000001, 0b00000001, 0b10000000, 0b11010000,
0b00000001, 0b01101101, 0b10110110, 0b11010000,
0b00000001, 0b01101101, 0b10110110, 0b11010000,
0b00000001, 0b01101101, 0b10110110, 0b11010000,
0b00000001, 0b01101101, 0b10110110, 0b11010000,
0b00000001, 0b01101101, 0b10110110, 0b11010000,
0b00000001, 0b00000000, 0b00000000, 0b00010000,
0b00000001, 0b00000000, 0b00000000, 0b00010000,
0b00000010, 0b00000000, 0b00000000, 0b00010000,
0b00000100, 0b00000000, 0b00000000, 0b00010000,
0b00001000, 0b00000000, 0b00000000, 0b00010000,
0b00001000, 0b00000000, 0b00000000, 0b00010000,
0b00001000, 0b00000000, 0b00000000, 0b00010000,
0b00001000, 0b00000000, 0b00000000, 0b00010000,
0b00001110, 0b00000000, 0b00000000, 0b00010000,
0b00000010, 0b00000000, 0b00000000, 0b00010000,
0b00000010, 0b00000000, 0b00000000, 0b00010000,
0b00000010, 0b00000000, 0b00000000, 0b00010000,
0b00000100, 0b00000000, 0b00000000, 0b00010000,
0b00001000, 0b00000000, 0b00000000, 0b00010000,
0b00001000, 0b00000000, 0b00000000, 0b00010000,
0b00001000, 0b00000000, 0b00000000, 0b00010000,
0b00001000, 0b00000000, 0b00000000, 0b00010000,
0b00001000, 0b00000000, 0b00000000, 0b00010000,
0b00001000, 0b00000000, 0b00000000, 0b00010000,
0b00001000, 0b00000000, 0b00000000, 0b00010000,
0b00001000, 0b00000000, 0b00000000, 0b00010000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
// Mask
0b00000000, 0b00000000, 0b00000000, 0b00000000,
0b00000001, 0b11111111, 0b11111111, 0b11110000,
0b00000001, 0b11111111, 0b11111111, 0b11110000,
0b00000001, 0b11111111, 0b11111111, 0b11110000,
0b00000001, 0b11111111, 0b11111111, 0b11110000,
0b00000001, 0b11111111, 0b11111111, 0b11110000,
0b00000001, 0b11111111, 0b11111111, 0b11110000,
0b00000001, 0b11111111, 0b11111111, 0b11110000,
0b00000001, 0b11111111, 0b11111111, 0b11110000,
0b00000001, 0b11111111, 0b11111111, 0b11110000,
0b00000001, 0b11111111, 0b11111111, 0b11110000,
0b00000011, 0b11111111, 0b11111111, 0b11110000,
0b00000111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00000011, 0b11111111, 0b11111111, 0b11110000,
0b00000011, 0b11111111, 0b11111111, 0b11110000,
0b00000011, 0b11111111, 0b11111111, 0b11110000,
0b00000111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00001111, 0b11111111, 0b11111111, 0b11110000,
0b00000000, 0b00000000, 0b00000000, 0b00000000,
25, 'G', 'a', 'r', 'r', 'e', 't', 't', '\'', 's', ' ',
'W', 'o', 'r', 'k', 's', 'h', 'o', 'p', ' ',
'R', 'O', 'M', 'B', 'U', 'S', 0
};
#endif