#ifndef ROMBUS_H #define ROMBUS_H #include #define RDiskBuf ((char*)0x40880000) #define BufPtr ((Ptr*)0x10C) #define MemTop ((Ptr*)0x108) #define MMU32bit ((char*)0xCB2) #define RDiskSize (*(const unsigned long*)0x40851DAC) #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 RBIsSPressed() { return *((volatile char*)0x174) & 0x02; } static inline char RBIsXPressed() { return *((volatile char*)0x174) & 0x80; } static inline char RBIsRPressed() { return *((volatile char*)0x175) & 0x80; } #define RDISK_ICON_SIZE (285) #define SDISK_ICON_SIZE (285) typedef struct RBStorage_s { DrvSts2 rdStatus; DrvSts2 sdStatus; char initialized; char rdIcon[RDISK_ICON_SIZE+8]; char sdIcon[SDISK_ICON_SIZE+8]; } RBStorage_t; typedef void (*RBCopy_t)(Ptr, Ptr, unsigned long); #define copy24(s, d, b) { RBCopy_t f = C24; f(s, d, b); } #define PackBits_Repeat(count) (-1 * (count - 1)) #define PackBits_Literal(count) (count - 1) #define RDISK_COMPRESSED_ICON_SIZE (87) const char RDiskIconCompressed[RDISK_COMPRESSED_ICON_SIZE] = { PackBits_Repeat(76), 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, 0b00000000, */ PackBits_Repeat(4), 0b11111111, /* 0b11111111, 0b11111111, 0b11111111, 0b11111111, */ PackBits_Literal(36), 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, PackBits_Repeat(12), 0b00000000, /* 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, */ PackBits_Repeat(76), 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, 0b00000000, */ PackBits_Repeat(32), 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, 0b11111111, */ PackBits_Literal(1), 0b01111111, PackBits_Repeat(3), 0b11111111, /* 0b01111111, 0b11111111, 0b11111111, 0b11111111, */ PackBits_Literal(1), 0b01111111, PackBits_Repeat(3), 0b11111111, /* 0b01111111, 0b11111111, 0b11111111, 0b11111111, */ PackBits_Repeat(12), 0b00000000, /* 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, */ PackBits_Literal(29), 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_COMPRESSED_ICON_SIZE (86) const char SDiskIconCompressed[SDISK_COMPRESSED_ICON_SIZE] = { PackBits_Repeat(76), 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, 0b00000000, */ PackBits_Repeat(4), 0b11111111, /* 0b11111111, 0b11111111, 0b11111111, 0b11111111, */ PackBits_Literal(36), 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, PackBits_Repeat(12), 0b00000000, /* 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, */ PackBits_Repeat(76), 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, 0b00000000, */ PackBits_Repeat(32), 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, 0b11111111, */ PackBits_Literal(1), 0b01111111, PackBits_Repeat(3), 0b11111111, /* 0b01111111, 0b11111111, 0b11111111, 0b11111111, */ PackBits_Literal(1), 0b01111111, PackBits_Repeat(3), 0b11111111, /* 0b01111111, 0b11111111, 0b11111111, 0b11111111, */ PackBits_Repeat(12), 0b00000000, /* 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, */ PackBits_Literal(29), 26, 'G', 'a', 'r', 'r', 'e', 't', 't', '\'', 's', ' ', 'W', 'o', 'r', 'k', 's', 'h', 'o', 'p', ' ', 'S', 'D', ' ', 'D', 'i', 's', 'k', 0 }; #endif