--- BasiliskII/src/include/macos_util.h 2000/07/14 21:42:06 1.6 +++ BasiliskII/src/include/macos_util.h 2000/07/25 15:19:43 1.8 @@ -251,10 +251,17 @@ extern int FindFreeDriveNumber(int num); extern void MountVolume(void *fh); // Mount volume with given file handle (see sys.h) extern void FileDiskLayout(loff_t size, uint8 *data, loff_t &start_byte, loff_t &real_size); // Calculate disk image file layout given file size and first 256 data bytes +// Construct four-character-code from string +#define FOURCC(a,b,c,d) (((uint32)(a) << 24) | ((uint32)(b) << 16) | ((uint32)(c) << 8) | (uint32)(d)) + +// Emulator identification codes (4 and 2 characters) +const uint32 EMULATOR_ID_4 = 0x62617369; // 'basi' +const uint16 EMULATOR_ID_2 = 0x6261; // 'ba' + // Test if basic MacOS initializations (of the ROM) are done static inline bool HasMacStarted(void) { - return ReadMacInt32(0xcfc) == 'WLSC'; // Mac warm start flag + return ReadMacInt32(0xcfc) == FOURCC('W','L','S','C'); // Mac warm start flag } #endif