- new FOURCC() macro in macos_util.h

This commit is contained in:
cebix
2000-07-22 16:07:23 +00:00
parent 6fa6776184
commit 675c5f1d7b
22 changed files with 227 additions and 236 deletions

View File

@@ -6,6 +6,9 @@ V0.8 (snapshot) -
[J<>rgen Lachmann]
- AmigaOS/Unix/extfs_*.cpp: .finf helper file now stores complete
FInfo/FXInfo, replaced get/set_finder_*() functions by get/set_finfo()
- include/macos_util.h: defines FOURCC() macro to make MacOS-like
four-character-codes, replaced most instances of multi-character
constants in the sources by this macro to avoid compiler warnings
- Imported some changes from the Windows port, most notably FPU fixes
and the 1Hz interrupt [Lauri Pesonen]

View File

@@ -153,62 +153,60 @@ struct ext2type {
};
static const ext2type e2t_translation[] = {
{".Z", 'ZIVM', 'LZIV'},
{".gz", 'Gzip', 'Gzip'},
{".hqx", 'TEXT', 'SITx'},
{".pdf", 'PDF ', 'CARO'},
{".ps", 'TEXT', 'ttxt'},
{".sit", 'SIT!', 'SITx'},
{".tar", 'TARF', 'TAR '},
{".uu", 'TEXT', 'SITx'},
{".uue", 'TEXT', 'SITx'},
{".zip", 'ZIP ', 'ZIP '},
{".8svx", '8SVX', 'SNDM'},
{".aifc", 'AIFC', 'TVOD'},
{".aiff", 'AIFF', 'TVOD'},
{".au", 'ULAW', 'TVOD'},
{".mid", 'MIDI', 'TVOD'},
{".midi", 'MIDI', 'TVOD'},
{".mp2", 'MPG ', 'TVOD'},
{".mp3", 'MPG ', 'TVOD'},
{".wav", 'WAVE', 'TVOD'},
{".bmp", 'BMPf', 'ogle'},
{".gif", 'GIFf', 'ogle'},
{".lbm", 'ILBM', 'GKON'},
{".ilbm", 'ILBM', 'GKON'},
{".jpg", 'JPEG', 'ogle'},
{".jpeg", 'JPEG', 'ogle'},
{".pict", 'PICT', 'ogle'},
{".png", 'PNGf', 'ogle'},
{".sgi", '.SGI', 'ogle'},
{".tga", 'TPIC', 'ogle'},
{".tif", 'TIFF', 'ogle'},
{".tiff", 'TIFF', 'ogle'},
{".htm", 'TEXT', 'MOSS'},
{".html", 'TEXT', 'MOSS'},
{".txt", 'TEXT', 'ttxt'},
{".rtf", 'TEXT', 'MSWD'},
{".c", 'TEXT', 'R*ch'},
{".C", 'TEXT', 'R*ch'},
{".cc", 'TEXT', 'R*ch'},
{".cpp", 'TEXT', 'R*ch'},
{".cxx", 'TEXT', 'R*ch'},
{".h", 'TEXT', 'R*ch'},
{".hh", 'TEXT', 'R*ch'},
{".hpp", 'TEXT', 'R*ch'},
{".hxx", 'TEXT', 'R*ch'},
{".s", 'TEXT', 'R*ch'},
{".S", 'TEXT', 'R*ch'},
{".i", 'TEXT', 'R*ch'},
{".mpg", 'MPEG', 'TVOD'},
{".mpeg", 'MPEG', 'TVOD'},
{".mov", 'MooV', 'TVOD'},
{".fli", 'FLI ', 'TVOD'},
{".avi", 'VfW ', 'TVOD'},
{".qxd", 'XDOC', 'XPR3'},
{".hfv", 'DDim', 'ddsk'},
{".dsk", 'DDim', 'ddsk'},
{".img", 'rohd', 'ddsk'},
{".z", FOURCC('Z','I','V','M'), FOURCC('L','Z','I','V')},
{".gz", FOURCC('G','z','i','p'), FOURCC('G','z','i','p')},
{".hqx", FOURCC('T','E','X','T'), FOURCC('S','I','T','x')},
{".pdf", FOURCC('P','D','F',' '), FOURCC('C','A','R','O')},
{".ps", FOURCC('T','E','X','T'), FOURCC('t','t','x','t')},
{".sit", FOURCC('S','I','T','!'), FOURCC('S','I','T','x')},
{".tar", FOURCC('T','A','R','F'), FOURCC('T','A','R',' ')},
{".uu", FOURCC('T','E','X','T'), FOURCC('S','I','T','x')},
{".uue", FOURCC('T','E','X','T'), FOURCC('S','I','T','x')},
{".zip", FOURCC('Z','I','P',' '), FOURCC('Z','I','P',' ')},
{".8svx", FOURCC('8','S','V','X'), FOURCC('S','N','D','M')},
{".aifc", FOURCC('A','I','F','C'), FOURCC('T','V','O','D')},
{".aiff", FOURCC('A','I','F','F'), FOURCC('T','V','O','D')},
{".au", FOURCC('U','L','A','W'), FOURCC('T','V','O','D')},
{".mid", FOURCC('M','I','D','I'), FOURCC('T','V','O','D')},
{".midi", FOURCC('M','I','D','I'), FOURCC('T','V','O','D')},
{".mp2", FOURCC('M','P','G',' '), FOURCC('T','V','O','D')},
{".mp3", FOURCC('M','P','G',' '), FOURCC('T','V','O','D')},
{".wav", FOURCC('W','A','V','E'), FOURCC('T','V','O','D')},
{".bmp", FOURCC('B','M','P','f'), FOURCC('o','g','l','e')},
{".gif", FOURCC('G','I','F','f'), FOURCC('o','g','l','e')},
{".lbm", FOURCC('I','L','B','M'), FOURCC('G','K','O','N')},
{".ilbm", FOURCC('I','L','B','M'), FOURCC('G','K','O','N')},
{".jpg", FOURCC('J','P','E','G'), FOURCC('o','g','l','e')},
{".jpeg", FOURCC('J','P','E','G'), FOURCC('o','g','l','e')},
{".pict", FOURCC('P','I','C','T'), FOURCC('o','g','l','e')},
{".png", FOURCC('P','N','G','f'), FOURCC('o','g','l','e')},
{".sgi", FOURCC('.','S','G','I'), FOURCC('o','g','l','e')},
{".tga", FOURCC('T','P','I','C'), FOURCC('o','g','l','e')},
{".tif", FOURCC('T','I','F','F'), FOURCC('o','g','l','e')},
{".tiff", FOURCC('T','I','F','F'), FOURCC('o','g','l','e')},
{".htm", FOURCC('T','E','X','T'), FOURCC('M','O','S','S')},
{".html", FOURCC('T','E','X','T'), FOURCC('M','O','S','S')},
{".txt", FOURCC('T','E','X','T'), FOURCC('t','t','x','t')},
{".rtf", FOURCC('T','E','X','T'), FOURCC('M','S','W','D')},
{".c", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".cc", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".cpp", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".cxx", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".h", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".hh", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".hpp", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".hxx", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".s", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".i", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".mpg", FOURCC('M','P','E','G'), FOURCC('T','V','O','D')},
{".mpeg", FOURCC('M','P','E','G'), FOURCC('T','V','O','D')},
{".mov", FOURCC('M','o','o','V'), FOURCC('T','V','O','D')},
{".fli", FOURCC('F','L','I',' '), FOURCC('T','V','O','D')},
{".avi", FOURCC('V','f','W',' '), FOURCC('T','V','O','D')},
{".qxd", FOURCC('X','D','O','C'), FOURCC('X','P','R','3')},
{".hfv", FOURCC('D','D','i','m'), FOURCC('d','d','s','k')},
{".dsk", FOURCC('D','D','i','m'), FOURCC('d','d','s','k')},
{".img", FOURCC('r','o','h','d'), FOURCC('d','d','s','k')},
{NULL, 0, 0} // End marker
};

View File

@@ -120,7 +120,7 @@ void SCSIExit(void)
* Check if requested data size fits into buffer, allocate new buffer if needed
*/
static bool try_buffer(int size)
static bool try_buffer(uint32 size)
{
size += sizeof(struct sg_header) + 12;
if (size <= buffer_size)

View File

@@ -23,6 +23,7 @@
#include <X11/Xlib.h>
#include "clip.h"
#include "macos_util.h"
#include "prefs.h"
#define DEBUG 0
@@ -87,7 +88,7 @@ void PutScrap(uint32 type, void *scrap, int32 length)
return;
switch (type) {
case 'TEXT':
case FOURCC('T','E','X','T'):
D(bug(" clipping TEXT\n"));
// Convert text from Mac charset to ISO-Latin1

View File

@@ -158,62 +158,62 @@ struct ext2type {
};
static const ext2type e2t_translation[] = {
{".Z", 'ZIVM', 'LZIV'},
{".gz", 'Gzip', 'Gzip'},
{".hqx", 'TEXT', 'SITx'},
{".pdf", 'PDF ', 'CARO'},
{".ps", 'TEXT', 'ttxt'},
{".sit", 'SIT!', 'SITx'},
{".tar", 'TARF', 'TAR '},
{".uu", 'TEXT', 'SITx'},
{".uue", 'TEXT', 'SITx'},
{".zip", 'ZIP ', 'ZIP '},
{".8svx", '8SVX', 'SNDM'},
{".aifc", 'AIFC', 'TVOD'},
{".aiff", 'AIFF', 'TVOD'},
{".au", 'ULAW', 'TVOD'},
{".mid", 'MIDI', 'TVOD'},
{".midi", 'MIDI', 'TVOD'},
{".mp2", 'MPG ', 'TVOD'},
{".mp3", 'MPG ', 'TVOD'},
{".wav", 'WAVE', 'TVOD'},
{".bmp", 'BMPf', 'ogle'},
{".gif", 'GIFf', 'ogle'},
{".lbm", 'ILBM', 'GKON'},
{".ilbm", 'ILBM', 'GKON'},
{".jpg", 'JPEG', 'ogle'},
{".jpeg", 'JPEG', 'ogle'},
{".pict", 'PICT', 'ogle'},
{".png", 'PNGf', 'ogle'},
{".sgi", '.SGI', 'ogle'},
{".tga", 'TPIC', 'ogle'},
{".tif", 'TIFF', 'ogle'},
{".tiff", 'TIFF', 'ogle'},
{".htm", 'TEXT', 'MOSS'},
{".html", 'TEXT', 'MOSS'},
{".txt", 'TEXT', 'ttxt'},
{".rtf", 'TEXT', 'MSWD'},
{".c", 'TEXT', 'R*ch'},
{".C", 'TEXT', 'R*ch'},
{".cc", 'TEXT', 'R*ch'},
{".cpp", 'TEXT', 'R*ch'},
{".cxx", 'TEXT', 'R*ch'},
{".h", 'TEXT', 'R*ch'},
{".hh", 'TEXT', 'R*ch'},
{".hpp", 'TEXT', 'R*ch'},
{".hxx", 'TEXT', 'R*ch'},
{".s", 'TEXT', 'R*ch'},
{".S", 'TEXT', 'R*ch'},
{".i", 'TEXT', 'R*ch'},
{".mpg", 'MPEG', 'TVOD'},
{".mpeg", 'MPEG', 'TVOD'},
{".mov", 'MooV', 'TVOD'},
{".fli", 'FLI ', 'TVOD'},
{".avi", 'VfW ', 'TVOD'},
{".qxd", 'XDOC', 'XPR3'},
{".hfv", 'DDim', 'ddsk'},
{".dsk", 'DDim', 'ddsk'},
{".img", 'rohd', 'ddsk'},
{".Z", FOURCC('Z','I','V','M'), FOURCC('L','Z','I','V')},
{".gz", FOURCC('G','z','i','p'), FOURCC('G','z','i','p')},
{".hqx", FOURCC('T','E','X','T'), FOURCC('S','I','T','x')},
{".pdf", FOURCC('P','D','F',' '), FOURCC('C','A','R','O')},
{".ps", FOURCC('T','E','X','T'), FOURCC('t','t','x','t')},
{".sit", FOURCC('S','I','T','!'), FOURCC('S','I','T','x')},
{".tar", FOURCC('T','A','R','F'), FOURCC('T','A','R',' ')},
{".uu", FOURCC('T','E','X','T'), FOURCC('S','I','T','x')},
{".uue", FOURCC('T','E','X','T'), FOURCC('S','I','T','x')},
{".zip", FOURCC('Z','I','P',' '), FOURCC('Z','I','P',' ')},
{".8svx", FOURCC('8','S','V','X'), FOURCC('S','N','D','M')},
{".aifc", FOURCC('A','I','F','C'), FOURCC('T','V','O','D')},
{".aiff", FOURCC('A','I','F','F'), FOURCC('T','V','O','D')},
{".au", FOURCC('U','L','A','W'), FOURCC('T','V','O','D')},
{".mid", FOURCC('M','I','D','I'), FOURCC('T','V','O','D')},
{".midi", FOURCC('M','I','D','I'), FOURCC('T','V','O','D')},
{".mp2", FOURCC('M','P','G',' '), FOURCC('T','V','O','D')},
{".mp3", FOURCC('M','P','G',' '), FOURCC('T','V','O','D')},
{".wav", FOURCC('W','A','V','E'), FOURCC('T','V','O','D')},
{".bmp", FOURCC('B','M','P','f'), FOURCC('o','g','l','e')},
{".gif", FOURCC('G','I','F','f'), FOURCC('o','g','l','e')},
{".lbm", FOURCC('I','L','B','M'), FOURCC('G','K','O','N')},
{".ilbm", FOURCC('I','L','B','M'), FOURCC('G','K','O','N')},
{".jpg", FOURCC('J','P','E','G'), FOURCC('o','g','l','e')},
{".jpeg", FOURCC('J','P','E','G'), FOURCC('o','g','l','e')},
{".pict", FOURCC('P','I','C','T'), FOURCC('o','g','l','e')},
{".png", FOURCC('P','N','G','f'), FOURCC('o','g','l','e')},
{".sgi", FOURCC('.','S','G','I'), FOURCC('o','g','l','e')},
{".tga", FOURCC('T','P','I','C'), FOURCC('o','g','l','e')},
{".tif", FOURCC('T','I','F','F'), FOURCC('o','g','l','e')},
{".tiff", FOURCC('T','I','F','F'), FOURCC('o','g','l','e')},
{".htm", FOURCC('T','E','X','T'), FOURCC('M','O','S','S')},
{".html", FOURCC('T','E','X','T'), FOURCC('M','O','S','S')},
{".txt", FOURCC('T','E','X','T'), FOURCC('t','t','x','t')},
{".rtf", FOURCC('T','E','X','T'), FOURCC('M','S','W','D')},
{".c", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".C", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".cc", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".cpp", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".cxx", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".h", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".hh", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".hpp", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".hxx", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".s", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".S", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".i", FOURCC('T','E','X','T'), FOURCC('R','*','c','h')},
{".mpg", FOURCC('M','P','E','G'), FOURCC('T','V','O','D')},
{".mpeg", FOURCC('M','P','E','G'), FOURCC('T','V','O','D')},
{".mov", FOURCC('M','o','o','V'), FOURCC('T','V','O','D')},
{".fli", FOURCC('F','L','I',' '), FOURCC('T','V','O','D')},
{".avi", FOURCC('V','f','W',' '), FOURCC('T','V','O','D')},
{".qxd", FOURCC('X','D','O','C'), FOURCC('X','P','R','3')},
{".hfv", FOURCC('D','D','i','m'), FOURCC('d','d','s','k')},
{".dsk", FOURCC('D','D','i','m'), FOURCC('d','d','s','k')},
{".img", FOURCC('r','o','h','d'), FOURCC('d','d','s','k')},
{NULL, 0, 0} // End marker
};

View File

@@ -108,7 +108,6 @@ char *x_display_name = NULL; // X11 display name
Display *x_display = NULL; // X11 display handle
static int zero_fd = -1; // FD of /dev/zero
static bool lm_area_mapped = false; // Flag: Low Memory area mmap()ped
static uint8 last_xpram[256]; // Buffer for monitoring XPRAM changes
#ifdef HAVE_PTHREADS
@@ -149,6 +148,10 @@ static struct sigaction sigint_sa; // sigaction for SIGINT handler
static void sigint_handler(...);
#endif
#if REAL_ADDRESSING
static bool lm_area_mapped = false; // Flag: Low Memory area mmap()ped
#endif
#ifdef USE_MAPPED_MEMORY
extern char *address_space, *good_address_map;
#endif

View File

@@ -128,12 +128,8 @@ static pthread_mutex_t palette_lock = PTHREAD_MUTEX_INITIALIZER; // Mutex to pro
static GC the_gc;
static XImage *img = NULL;
static XShmSegmentInfo shminfo;
static XImage *cursor_image, *cursor_mask_image;
static Pixmap cursor_map, cursor_mask_map;
static Cursor mac_cursor;
static GC cursor_gc, cursor_mask_gc;
static uint8 *the_buffer_copy = NULL; // Copy of Mac frame buffer
static uint8 the_cursor[64]; // Cursor image data
static bool have_shm = false; // Flag: SHM extensions available
static bool updt_box[17][17]; // Flag for Update
static int nr_boxes;
@@ -1337,7 +1333,7 @@ static void handle_events(void)
// Dynamic display update (variable frame rate for each box)
static void update_display_dynamic(int ticker)
{
int y1, y2, y2s, y2a, i, x1, xm, xmo, ymo, yo, yi, yil, xic, xicl, xi;
int y1, y2, y2s, y2a, i, x1, xm, xmo, ymo, yo, yi, yil, xi;
int xil = 0;
int rxm = 0, rxmo = 0;
int bytes_per_row = VideoMonitor.bytes_per_row;

View File

@@ -404,7 +404,7 @@ adat_error: printf("FATAL: audio component data block initialization error\n");
// Init sound component data
WriteMacInt32(audio_data + adatData + scd_flags, 0);
WriteMacInt32(audio_data + adatData + scd_format, AudioStatus.sample_size == 16 ? 'twos' : 'raw ');
WriteMacInt32(audio_data + adatData + scd_format, AudioStatus.sample_size == 16 ? FOURCC('t','w','o','s') : FOURCC('r','a','w',' '));
WriteMacInt16(audio_data + adatData + scd_numChannels, AudioStatus.channels);
WriteMacInt16(audio_data + adatData + scd_sampleSize, AudioStatus.sample_size);
WriteMacInt32(audio_data + adatData + scd_sampleRate, AudioStatus.sample_rate);

View File

@@ -187,17 +187,17 @@ static void find_hfs_partition(DriveInfo *info)
// Skip driver descriptor
uint16 sig = ntohs(((uint16 *)map)[0]);
if (sig == 'ER')
if (sig == 0x4552)
continue;
// No partition map? Then look at next block
if (sig != 'PM')
if (sig != 0x504d)
continue;
// Partition map found, Apple HFS partition?
if (strcmp((char *)(map + 48), "Apple_HFS") == 0) {
info->start_byte = ntohl(((uint32 *)map)[2]) << 9;
D(bug(" HFS partition found at %ld, %ld blocks\n", info->start_byte, ntohl(((uint32 *)map)[3])));
D(bug(" HFS partition found at %d, %d blocks\n", info->start_byte, ntohl(((uint32 *)map)[3])));
break;
}
}
@@ -674,7 +674,7 @@ int16 CDROMControl(uint32 pb, uint32 dce)
return controlErr;
case 103: { // AudioTrackSearch
D(bug(" AudioTrackSearch postype %d, pos %08lx, hold %d\n", ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), ReadMacInt16(pb + csParam + 6)));
D(bug(" AudioTrackSearch postype %d, pos %08x, hold %d\n", ReadMacInt16(pb + csParam), ReadMacInt32(pb + csParam + 2), ReadMacInt16(pb + csParam + 6)));
if (ReadMacInt8(info->status + dsDiskInPlace) == 0)
return offLinErr;
@@ -871,38 +871,38 @@ int16 CDROMStatus(uint32 pb, uint32 dce)
uint32 sel = ReadMacInt32(pb + csParam);
D(bug(" driver gestalt %c%c%c%c\n", sel >> 24, sel >> 16, sel >> 8, sel));
switch (sel) {
case 'vers': // Version
case FOURCC('v','e','r','s'): // Version
WriteMacInt32(pb + csParam + 4, 0x05208000);
break;
case 'devt': // Device type
WriteMacInt32(pb + csParam + 4, 'cdrm');
case FOURCC('d','e','v','t'): // Device type
WriteMacInt32(pb + csParam + 4, FOURCC('c','d','r','m'));
break;
case 'intf': // Interface type
WriteMacInt32(pb + csParam + 4, 'basi');
case FOURCC('i','n','t','f'): // Interface type
WriteMacInt32(pb + csParam + 4, FOURCC('b','a','s','i'));
break;
case 'sync': // Only synchronous operation?
case FOURCC('s','y','n','c'): // Only synchronous operation?
WriteMacInt32(pb + csParam + 4, 0x01000000);
break;
case 'boot': // Boot ID
case FOURCC('b','o','o','t'): // Boot ID
if (info != NULL)
WriteMacInt16(pb + csParam + 4, info->num);
else
WriteMacInt16(pb + csParam + 4, 0);
WriteMacInt16(pb + csParam + 6, (uint16)CDROMRefNum);
break;
case 'wide': // 64-bit access supported?
case FOURCC('w','i','d','e'): // 64-bit access supported?
WriteMacInt16(pb + csParam + 4, 0);
break;
case 'purg': // Purge flags
case FOURCC('p','u','r','g'): // Purge flags
WriteMacInt32(pb + csParam + 4, 0);
break;
case 'ejec': // Eject flags
case FOURCC('e','j','e','c'): // Eject flags
WriteMacInt32(pb + csParam + 4, 0x00030003); // Don't eject on shutdown/restart
break;
case 'flus': // Flush flags
case FOURCC('f','l','u','s'): // Flush flags
WriteMacInt16(pb + csParam + 4, 0);
break;
case 'vmop': // Virtual memory attributes
case FOURCC('v','m','o','p'): // Virtual memory attributes
WriteMacInt32(pb + csParam + 4, 0); // Drive not available for VM
break;
default:

View File

@@ -427,44 +427,44 @@ int16 DiskStatus(uint32 pb, uint32 dce)
uint32 sel = ReadMacInt32(pb + csParam);
D(bug(" driver gestalt %c%c%c%c\n", sel >> 24, sel >> 16, sel >> 8, sel));
switch (sel) {
case 'vers': // Version
case FOURCC('v','e','r','s'): // Version
WriteMacInt32(pb + csParam + 4, 0x01008000);
break;
case 'devt': // Device type
case FOURCC('d','e','v','t'): // Device type
if (info != NULL) {
if (ReadMacInt8(info->status + dsDiskInPlace) == 8)
WriteMacInt32(pb + csParam + 4, 'disk');
WriteMacInt32(pb + csParam + 4, FOURCC('d','i','s','k'));
else
WriteMacInt32(pb + csParam + 4, 'rdsk');
WriteMacInt32(pb + csParam + 4, FOURCC('r','d','s','k'));
} else
WriteMacInt32(pb + csParam + 4, 'disk');
WriteMacInt32(pb + csParam + 4, FOURCC('d','i','s','k'));
break;
case 'intf': // Interface type
WriteMacInt32(pb + csParam + 4, 'basi');
case FOURCC('i','n','t','f'): // Interface type
WriteMacInt32(pb + csParam + 4, FOURCC('b','a','s','i'));
break;
case 'sync': // Only synchronous operation?
case FOURCC('s','y','n','c'): // Only synchronous operation?
WriteMacInt32(pb + csParam + 4, 0x01000000);
break;
case 'boot': // Boot ID
case FOURCC('b','o','o','t'): // Boot ID
if (info != NULL)
WriteMacInt16(pb + csParam + 4, info->num);
else
WriteMacInt16(pb + csParam + 4, 0);
WriteMacInt16(pb + csParam + 6, (uint16)DiskRefNum);
break;
case 'wide': // 64-bit access supported?
case FOURCC('w','i','d','e'): // 64-bit access supported?
WriteMacInt16(pb + csParam + 4, 0x0100);
break;
case 'purg': // Purge flags
case FOURCC('p','u','r','g'): // Purge flags
WriteMacInt32(pb + csParam + 4, 0);
break;
case 'ejec': // Eject flags
case FOURCC('e','j','e','c'): // Eject flags
WriteMacInt32(pb + csParam + 4, 0x00030003); // Don't eject on shutdown/restart
break;
case 'flus': // Flush flags
case FOURCC('f','l','u','s'): // Flush flags
WriteMacInt16(pb + csParam + 4, 0);
break;
case 'vmop': // Virtual memory attributes
case FOURCC('v','m','o','p'): // Virtual memory attributes
WriteMacInt32(pb + csParam + 4, 0); // Drive not available for VM
break;
default:

View File

@@ -60,10 +60,10 @@ void EmulOp(uint16 opcode, M68kRegisters *r)
switch (opcode) {
case M68K_EMUL_BREAK: { // Breakpoint
printf("*** Breakpoint\n");
printf("d0 %08lx d1 %08lx d2 %08lx d3 %08lx\n"
"d4 %08lx d5 %08lx d6 %08lx d7 %08lx\n"
"a0 %08lx a1 %08lx a2 %08lx a3 %08lx\n"
"a4 %08lx a5 %08lx a6 %08lx a7 %08lx\n"
printf("d0 %08x d1 %08x d2 %08x d3 %08x\n"
"d4 %08x d5 %08x d6 %08x d7 %08x\n"
"a0 %08x a1 %08x a2 %08x a3 %08x\n"
"a4 %08x a5 %08x a6 %08x a7 %08x\n"
"sr %04x\n",
r->d[0], r->d[1], r->d[2], r->d[3], r->d[4], r->d[5], r->d[6], r->d[7],
r->a[0], r->a[1], r->a[2], r->a[3], r->a[4], r->a[5], r->a[6], r->a[7],
@@ -501,11 +501,11 @@ void EmulOp(uint16 opcode, M68kRegisters *r)
break;
default:
printf("FATAL: EMUL_OP called with bogus opcode %08x\n", opcode);
printf("d0 %08lx d1 %08lx d2 %08lx d3 %08lx\n"
"d4 %08lx d5 %08lx d6 %08lx d7 %08lx\n"
"a0 %08lx a1 %08lx a2 %08lx a3 %08lx\n"
"a4 %08lx a5 %08lx a6 %08lx a7 %08lx\n"
printf("FATAL: EMUL_OP called with bogus opcode %04x\n", opcode);
printf("d0 %08x d1 %08x d2 %08x d3 %08x\n"
"d4 %08x d5 %08x d6 %08x d7 %08x\n"
"a0 %08x a1 %08x a2 %08x a3 %08x\n"
"a4 %08x a5 %08x a6 %08x a7 %08x\n"
"sr %04x\n",
r->d[0], r->d[1], r->d[2], r->d[3], r->d[4], r->d[5], r->d[6], r->d[7],
r->a[0], r->a[1], r->a[2], r->a[3], r->a[4], r->a[5], r->a[6], r->a[7],

View File

@@ -108,8 +108,8 @@ static bool ready = false;
static struct stat root_stat;
// File system ID/media type
const int16 MY_FSID = 'ba';
const uint32 MY_MEDIA_TYPE = 'basi';
const int16 MY_FSID = 0x6261; // 'ba'
const uint32 MY_MEDIA_TYPE = FOURCC('b','a','s','i');
// CNID of root and root's parent
const uint32 ROOT_ID = 2;
@@ -277,21 +277,6 @@ static void cstr2pstr(char *dst, const char *src)
}
}
// Convert pascal string to C string
static void pstr2cstr(char *dst, const char *src)
{
int size = *src++;
while (size--) {
char c = *src++;
// Note: we are converting Mac '/' characters to host ':' characters here
// '/' is not a path separator as this function is only used on object names
if (c == '/')
c = ':';
*dst++ = c;
}
*dst = 0;
}
// Convert string (no length byte) to C string, length given separately
static void strn2cstr(char *dst, const char *src, int size)
{
@@ -423,7 +408,7 @@ void InstallExtFS(void)
// FSM present?
r.d[0] = gestaltFSAttr;
Execute68kTrap(0xa1ad, &r); // Gestalt()
D(bug("FSAttr %ld, %08lx\n", r.d[0], r.a[0]));
D(bug("FSAttr %d, %08x\n", r.d[0], r.a[0]));
if ((r.d[0] & 0xffff) || !(r.a[0] & (1 << gestaltHasFileSystemManager))) {
printf("WARNING: No FSM present, disabling ExtFS\n");
return;
@@ -432,7 +417,7 @@ void InstallExtFS(void)
// Yes, version >=1.2?
r.d[0] = gestaltFSMVersion;
Execute68kTrap(0xa1ad, &r); // Gestalt()
D(bug("FSMVersion %ld, %08lx\n", r.d[0], r.a[0]));
D(bug("FSMVersion %d, %08x\n", r.d[0], r.a[0]));
if ((r.d[0] & 0xffff) || (r.a[0] < 0x0120)) {
printf("WARNING: FSM <1.2 found, disabling ExtFS\n");
return;
@@ -702,7 +687,7 @@ int16 ExtFSComm(uint16 message, uint32 paramBlock, uint32 globalsPtr)
}
case ffsIDDiskMessage: { // Check if volume is handled by our FS
if (ReadMacInt16(paramBlock + ioVRefNum) == drive_number)
if ((int16)ReadMacInt16(paramBlock + ioVRefNum) == drive_number)
return noErr;
else
return extFSErr;
@@ -966,7 +951,7 @@ static uint32 find_fcb(int16 refNum)
static int16 fs_mount_vol(uint32 pb)
{
D(bug(" fs_mount_vol(%08lx), vRefNum %d\n", pb, ReadMacInt16(pb + ioVRefNum)));
if (ReadMacInt16(pb + ioVRefNum) == drive_number)
if ((int16)ReadMacInt16(pb + ioVRefNum) == drive_number)
return noErr;
else
return extFSErr;
@@ -1584,7 +1569,7 @@ static int16 fs_get_fcb_info(uint32 pb, uint32 vcb)
// Find FCB by index
WriteMacInt16(pb + ioRefNum, 0);
for (int i=0; i<ReadMacInt16(pb + ioFCBIndx); i++) {
for (int i=0; i<(int)ReadMacInt16(pb + ioFCBIndx); i++) {
D(bug(" indexing FCBs\n"));
r.a[0] = vcb;
r.a[1] = pb + ioRefNum;
@@ -1803,7 +1788,7 @@ static int16 fs_read(uint32 pb)
uint32 pos = lseek(fd, 0, SEEK_CUR);
WriteMacInt32(fcb + fcbCrPs, pos);
WriteMacInt32(pb + ioPosOffset, pos);
if (actual != ReadMacInt32(pb + ioReqCount))
if (actual != (ssize_t)ReadMacInt32(pb + ioReqCount))
return actual < 0 ? read_err : eofErr;
else
return noErr;
@@ -1856,7 +1841,7 @@ static int16 fs_write(uint32 pb)
uint32 pos = lseek(fd, 0, SEEK_CUR);
WriteMacInt32(fcb + fcbCrPs, pos);
WriteMacInt32(pb + ioPosOffset, pos);
if (actual != ReadMacInt32(pb + ioReqCount))
if (actual != (ssize_t)ReadMacInt32(pb + ioReqCount))
return write_err;
else
return noErr;

View File

@@ -21,6 +21,9 @@
#ifndef AUDIO_DEFS_H
#define AUDIO_DEFS_H
#include "macos_util.h"
// Error codes
enum {
badComponentSelector = (int32)0x80008002,
@@ -59,23 +62,21 @@ enum {
};
// Sound information selectors
enum {
siNumberChannels = 'chan', // current number of channels
siChannelAvailable = 'chav', // number of channels available
siSampleRate = 'srat', // current sample rate
siSampleRateAvailable = 'srav', // sample rates available
siSampleSize = 'ssiz', // current sample size
siSampleSizeAvailable = 'ssav', // sample sizes available
siHardwareMute = 'hmut', // mute state of all hardware
siHardwareVolume = 'hvol', // volume level of all hardware
siHardwareVolumeSteps = 'hstp', // number of volume steps for hardware
siHardwareBusy = 'hwbs', // sound hardware is in use
siHeadphoneMute = 'pmut', // mute state of headphone
siHeadphoneVolume = 'pvol', // volume level of headphone
siHeadphoneVolumeSteps = 'hdst', // number of volume steps for headphone
siSpeakerMute = 'smut', // mute state of all built-in speakers
siSpeakerVolume = 'svol' // volume level of built-in speaker
};
const uint32 siNumberChannels = FOURCC('c','h','a','n'); // current number of channels
const uint32 siChannelAvailable = FOURCC('c','h','a','v'); // number of channels available
const uint32 siSampleRate = FOURCC('s','r','a','t'); // current sample rate
const uint32 siSampleRateAvailable = FOURCC('s','r','a','v'); // sample rates available
const uint32 siSampleSize = FOURCC('s','s','i','z'); // current sample size
const uint32 siSampleSizeAvailable = FOURCC('s','s','a','v'); // sample sizes available
const uint32 siHardwareMute = FOURCC('h','m','u','t'); // mute state of all hardware
const uint32 siHardwareVolume = FOURCC('h','v','o','l'); // volume level of all hardware
const uint32 siHardwareVolumeSteps = FOURCC('h','s','t','p'); // number of volume steps for hardware
const uint32 siHardwareBusy = FOURCC('h','w','b','s'); // sound hardware is in use
const uint32 siHeadphoneMute = FOURCC('p','m','u','t'); // mute state of headphone
const uint32 siHeadphoneVolume = FOURCC('p','v','o','l'); // volume level of headphone
const uint32 siHeadphoneVolumeSteps = FOURCC('h','d','s','t'); // number of volume steps for headphone
const uint32 siSpeakerMute = FOURCC('s','m','u','t'); // mute state of all built-in speakers
const uint32 siSpeakerVolume = FOURCC('s','v','o','l'); // volume level of built-in speaker
enum { // ComponentResource struct
componentType = 0,

View File

@@ -25,7 +25,7 @@
// Gestalt selectors
enum {
gestaltFSAttr = 'fs ',
gestaltFSAttr = FOURCC('f','s',' ',' '),
gestaltFullExtFSDispatching = 0,
gestaltHasFSSpecCalls = 1,
gestaltHasFileSystemManager = 2,
@@ -37,7 +37,7 @@ enum {
};
enum {
gestaltFSMVersion = 'fsm '
gestaltFSMVersion = FOURCC('f','s','m',' ')
};
// File attributes

View File

@@ -251,10 +251,13 @@ extern int FindFreeDriveNumber(int num); // Find first free drive number, star
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))
// 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

View File

@@ -132,8 +132,8 @@ enum {
kSERDNegateRTS = 31,
kSERD115KBaud = 115,
kSERD230KBaud = 230,
kSERDSetHighSpeed = 'JF',
kSERDSetPollWrite = 'jf'
kSERDSetHighSpeed = 0x4a46, // 'JF'
kSERDSetPollWrite = 0x6a66 // 'jf'
};
// Status codes

View File

@@ -394,7 +394,7 @@ static void write_prefs(FILE *f, const prefs_desc *list)
fprintf(f, "%s %d\n", list->name, PrefsFindInt16(list->name));
break;
case TYPE_INT32:
fprintf(f, "%s %ld\n", list->name, PrefsFindInt32(list->name));
fprintf(f, "%s %d\n", list->name, PrefsFindInt32(list->name));
break;
default:
break;

View File

@@ -270,7 +270,7 @@ static void list_universal_infos(void)
printf("Universal Table at %08x:\n", q);
printf("Offset\t ID\tHWCfg\tROM85\tModel\n");
printf("------------------------------------------------\n");
while (ofs = ReadMacInt32(ROMBaseMac + q)) {
while ((ofs = ReadMacInt32(ROMBaseMac + q))) {
print_universal_info(ROMBaseMac + ofs + q);
q += 4;
}
@@ -1461,7 +1461,7 @@ static bool patch_rom_32(void)
}
// Patch .EDisk driver (don't scan for EDisks in the area ROMBase..0xe00000)
uint32 edisk_offset = find_rom_resource('DRVR', 51);
uint32 edisk_offset = find_rom_resource(FOURCC('D','R','V','R'), 51);
if (edisk_offset) {
static const uint8 edisk_dat[] = {0xd5, 0xfc, 0x00, 0x01, 0x00, 0x00, 0xb5, 0xfc, 0x00, 0xe0, 0x00, 0x00};
base = find_rom_data(edisk_offset, edisk_offset + 0x10000, edisk_dat, sizeof(edisk_dat));
@@ -1474,7 +1474,7 @@ static bool patch_rom_32(void)
}
// Replace .Sony driver
sony_offset = find_rom_resource('DRVR', 4);
sony_offset = find_rom_resource(FOURCC('D','R','V','R'), 4);
D(bug("sony %08lx\n", sony_offset));
memcpy(ROMBaseHost + sony_offset, sony_driver, sizeof(sony_driver));
@@ -1493,7 +1493,7 @@ static bool patch_rom_32(void)
memcpy(ROMBaseHost + sony_offset + 0xa00, CDROMIcon, sizeof(CDROMIcon));
// Install SERD patch and serial drivers
serd_offset = find_rom_resource('SERD', 0);
serd_offset = find_rom_resource(FOURCC('S','E','R','D'), 0);
D(bug("serd %08lx\n", serd_offset));
wp = (uint16 *)(ROMBaseHost + serd_offset + 12);
*wp++ = htons(M68K_EMUL_OP_SERD);
@@ -1570,8 +1570,8 @@ static bool patch_rom_32(void)
#endif
// Look for double PACK 4 resources
if ((base = find_rom_resource('PACK', 4)) == 0) return false;
if ((base = find_rom_resource('PACK', 4, true)) == 0 && FPUType == 0)
if ((base = find_rom_resource(FOURCC('P','A','C','K'), 4)) == 0) return false;
if ((base = find_rom_resource(FOURCC('P','A','C','K'), 4, true)) == 0 && FPUType == 0)
printf("WARNING: This ROM seems to require an FPU\n");
// Patch VIA interrupt handler

View File

@@ -22,6 +22,7 @@
#include "sysdeps.h"
#include "cpu_emulation.h"
#include "macos_util.h"
#include "main.h"
#include "emul_op.h"
#include "audio.h"
@@ -67,9 +68,9 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
{
uint16 *p16;
uint32 base;
D(bug("vCheckLoad %c%c%c%c (%08lx) ID %d, data %08lx, size %ld\n", (char)(type >> 24), (char)((type >> 16) & 0xff), (char )((type >> 8) & 0xff), (char )(type & 0xff), type, id, p, size));
D(bug("vCheckLoad %c%c%c%c (%08x) ID %d, data %08x, size %d\n", (char)(type >> 24), (char)((type >> 16) & 0xff), (char )((type >> 8) & 0xff), (char )(type & 0xff), type, id, p, size));
if (type == 'boot' && id == 3) {
if (type == FOURCC('b','o','o','t') && id == 3) {
D(bug(" boot 3 found\n"));
// Set boot stack pointer (7.5, 7.6, 7.6.1, 8.0)
@@ -104,7 +105,7 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
D(bug(" patch 2 applied\n"));
}
} else if (type == 'boot' && id == 2) {
} else if (type == FOURCC('b','o','o','t') && id == 2) {
D(bug(" boot 2 found\n"));
// Set fake handle at 0x0000 to some safe place (so broken Mac programs won't write into Mac ROM) (7.5, 8.0)
@@ -129,7 +130,7 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
}
#endif
} else if (type == 'PTCH' && id == 630) {
} else if (type == FOURCC('P','T','C','H') && id == 630) {
D(bug("PTCH 630 found\n"));
// Don't replace Time Manager (Classic ROM, 6.0.3)
@@ -156,7 +157,7 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
D(bug(" patch 1 applied\n"));
}
} else if (type == 'ptch' && id == 26) {
} else if (type == FOURCC('p','t','c','h') && id == 26) {
D(bug(" ptch 26 found\n"));
// Trap ABC4 is initialized with absolute ROM address (7.5, 7.6, 7.6.1, 8.0)
@@ -170,7 +171,7 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
D(bug(" patch 1 applied\n"));
}
} else if (type == 'ptch' && id == 34) {
} else if (type == FOURCC('p','t','c','h') && id == 34) {
D(bug(" ptch 34 found\n"));
// Don't wait for VIA (Classic ROM, 6.0.8)
@@ -195,7 +196,7 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
}
#if !EMULATED_68K
} else if (CPUIs68060 && (type == 'gpch' && id == 669 || type == 'lpch' && id == 63)) {
} else if (CPUIs68060 && (type == FOURCC('g','p','c','h') && id == 669 || type == FOURCC('l','p','c','h') && id == 63)) {
D(bug(" gpch 669/lpch 63 found\n"));
static uint16 ThPatchSpace[1024]; // Replacement routines are constructed here
@@ -454,7 +455,7 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
}
#endif
} else if (type == 'gpch' && id == 750) {
} else if (type == FOURCC('g','p','c','h') && id == 750) {
D(bug(" gpch 750 found\n"));
// Don't use PTEST instruction in BlockMove() (7.5, 7.6, 7.6.1, 8.0)
@@ -467,7 +468,7 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
D(bug(" patch 1 applied\n"));
}
} else if (type == 'lpch' && id == 24) {
} else if (type == FOURCC('l','p','c','h') && id == 24) {
D(bug(" lpch 24 found\n"));
// Don't replace Time Manager (7.0.1, 7.1, 7.5, 7.6, 7.6.1, 8.0)
@@ -484,7 +485,7 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
D(bug(" patch 1 applied\n"));
}
} else if (type == 'lpch' && id == 31) {
} else if (type == FOURCC('l','p','c','h') && id == 31) {
D(bug(" lpch 31 found\n"));
// Don't write to VIA in vSoundDead() (7.0.1, 7.1, 7.5, 7.6, 7.6.1, 8.0)
@@ -510,7 +511,7 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
}
#if !EMULATED_68K
} else if (CPUIs68060 && type == 'scod' && (id == -16463 || id == -16464)) {
} else if (CPUIs68060 && type == FOURCC('s','c','o','d') && (id == -16463 || id == -16464)) {
D(bug(" scod -16463/-16464 found\n"));
// Correct 68060 FP frame handling in Process Manager task switches (7.1, 7.5, 8.0)
@@ -538,14 +539,14 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
}
#endif
} else if (type == 'thng' && id == -16563) {
} else if (type == FOURCC('t','h','n','g') && id == -16563) {
D(bug(" thng -16563 found\n"));
// Set audio component flags (7.5, 7.6, 7.6.1, 8.0)
*(uint32 *)(p + componentFlags) = htonl(audio_component_flags);
D(bug(" patch 1 applied\n"));
} else if (type == 'sift' && id == -16563) {
} else if (type == FOURCC('s','i','f','t') && id == -16563) {
D(bug(" sift -16563 found\n"));
// Replace audio component (7.5, 7.6, 7.6.1, 8.0)
@@ -562,7 +563,7 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
FlushCodeCache(p, 32);
D(bug(" patch 1 applied\n"));
} else if (type == 'inst' && id == -19069) {
} else if (type == FOURCC('i','n','s','t') && id == -19069) {
D(bug(" inst -19069 found\n"));
// Don't replace Microseconds (QuickTime 2.0)
@@ -575,7 +576,7 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
D(bug(" patch 1 applied\n"));
}
} else if (type == 'DRVR' && id == -20066) {
} else if (type == FOURCC('D','R','V','R') && id == -20066) {
D(bug("DRVR -20066 found\n"));
// Don't access SCC in .Infra driver
@@ -588,7 +589,7 @@ void CheckLoad(uint32 type, int16 id, uint8 *p, uint32 size)
D(bug(" patch 1 applied\n"));
}
} else if (type == 'ltlk' && id == 0) {
} else if (type == FOURCC('l','t','l','k') && id == 0) {
D(bug(" ltlk 0 found\n"));
// Disable LocalTalk (7.0.1, 7.5, 7.6, 7.6.1, 8.0)

View File

@@ -449,7 +449,7 @@ int16 SonyControl(uint32 pb, uint32 dce)
WriteMacInt32(pb + csParam, 0x0104); // External drive
return noErr;
case 'SC': { // Format and write to disk
case 0x5343: { // Format and write to disk ('SC'), used by DiskCopy
if (!ReadMacInt8(info->status + dsDiskInPlace))
return offLinErr;
if (info->read_only)
@@ -503,11 +503,11 @@ int16 SonyStatus(uint32 pb, uint32 dce)
WriteMacInt32(pb + csParam, ReadMacInt32(info->status + dsMFMDrive) & 0xffffff00 | 0xfe);
return noErr;
case 'DV': // Duplicator version supported
case 0x4456: // Duplicator version supported ('DV')
WriteMacInt16(pb + csParam, 0x0410);
return noErr;
case 'SC': // Get address header format byte
case 0x5343: // Get address header format byte ('SC')
WriteMacInt8(pb + csParam, 0x22); // 512 bytes/sector
return noErr;

View File

@@ -196,7 +196,7 @@ int16 RmvTime(uint32 tm)
// Find descriptor
int i = find_desc(tm);
if (i < 0) {
printf("WARNING: RmvTime(%08lx): Descriptor not found\n", tm);
printf("WARNING: RmvTime(%08x): Descriptor not found\n", tm);
return 0;
}
@@ -214,7 +214,7 @@ int16 RmvTime(uint32 tm)
WriteMacInt32(tm + tmCount, timer_host2mac_time(remaining));
} else
WriteMacInt32(tm + tmCount, 0);
D(bug(" tmCount %ld\n", ReadMacInt32(tm + tmCount)));
D(bug(" tmCount %d\n", ReadMacInt32(tm + tmCount)));
// Free descriptor
free_desc(i);
@@ -228,7 +228,7 @@ int16 RmvTime(uint32 tm)
int16 PrimeTime(uint32 tm, int32 time)
{
D(bug("PrimeTime %08lx, time %ld\n", tm, time));
D(bug("PrimeTime %08x, time %d\n", tm, time));
// Find descriptor
int i = find_desc(tm);

View File

@@ -244,7 +244,7 @@ int16 VideoDriverStatus(uint32 pb, uint32 dce)
case cscGetModeTiming: // Get video timing for mode
D(bug(" GetModeTiming mode %08lx\n", ReadMacInt32(param + csTimingMode)));
WriteMacInt32(param + csTimingFormat, 'decl');
WriteMacInt32(param + csTimingFormat, FOURCC('d','e','c','l'));
WriteMacInt32(param + csTimingData, 220); // 21" Multiscan
WriteMacInt32(param + csTimingFlags, 0x0f); // Mode valid, safe, default and shown in Monitors panel
return noErr;