21 |
|
#ifndef MACOS_UTIL_H |
22 |
|
#define MACOS_UTIL_H |
23 |
|
|
24 |
+ |
#include "cpu_emulation.h" |
25 |
+ |
|
26 |
|
|
27 |
|
/* |
28 |
|
* Queues |
249 |
|
extern void EnqueueMac(uint32 elem, uint32 list); // Enqueue QElem in list |
250 |
|
extern int FindFreeDriveNumber(int num); // Find first free drive number, starting at "num" |
251 |
|
extern void MountVolume(void *fh); // Mount volume with given file handle (see sys.h) |
250 |
– |
extern bool HasMacStarted(void); // Test if basic MacOS initializations are done |
252 |
|
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 |
253 |
|
|
254 |
+ |
// Construct four-character-code from string |
255 |
+ |
#define FOURCC(a,b,c,d) (((uint32)(a) << 24) | ((uint32)(b) << 16) | ((uint32)(c) << 8) | (uint32)(d)) |
256 |
+ |
|
257 |
+ |
// Test if basic MacOS initializations (of the ROM) are done |
258 |
+ |
static inline bool HasMacStarted(void) |
259 |
+ |
{ |
260 |
+ |
return ReadMacInt32(0xcfc) == FOURCC('W','L','S','C'); // Mac warm start flag |
261 |
+ |
} |
262 |
+ |
|
263 |
|
#endif |