1 |
|
/* |
2 |
|
* macos_util.cpp - MacOS definitions/utility functions |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-1999 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2000 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
20 |
|
|
21 |
|
#include "sysdeps.h" |
22 |
|
#include "cpu_emulation.h" |
23 |
+ |
#include "adb.h" |
24 |
|
#include "main.h" |
25 |
|
#include "sony.h" |
26 |
|
#include "disk.h" |
87 |
|
|
88 |
|
|
89 |
|
/* |
89 |
– |
* Test if basic MacOS initializations (of the ROM) are done |
90 |
– |
*/ |
91 |
– |
|
92 |
– |
bool HasMacStarted(void) |
93 |
– |
{ |
94 |
– |
return ReadMacInt32(0xcfc) == 'WLSC'; // Mac warm start flag |
95 |
– |
} |
96 |
– |
|
97 |
– |
|
98 |
– |
/* |
90 |
|
* Calculate disk image file layout given file size and first 256 data bytes |
91 |
|
*/ |
92 |
|
|
102 |
|
real_size = size - start_byte; |
103 |
|
} |
104 |
|
} |
105 |
+ |
|
106 |
+ |
|
107 |
+ |
uint32 DebugUtil(uint32 Selector) |
108 |
+ |
{ |
109 |
+ |
switch (Selector) |
110 |
+ |
{ |
111 |
+ |
case duDebuggerGetMax: |
112 |
+ |
return 3; |
113 |
+ |
case duDebuggerEnter: |
114 |
+ |
return 0; |
115 |
+ |
case duDebuggerExit: |
116 |
+ |
return 0; |
117 |
+ |
case duDebuggerPoll: |
118 |
+ |
ADBInterrupt(); |
119 |
+ |
return 0; |
120 |
+ |
default: |
121 |
+ |
return (uint32) paramErr; |
122 |
+ |
} |
123 |
+ |
} |
124 |
+ |
|