39 |
|
#include "video.h" |
40 |
|
#include "audio.h" |
41 |
|
#include "ether.h" |
42 |
+ |
#include "extfs.h" |
43 |
|
#include "emul_op.h" |
44 |
|
|
45 |
|
#define DEBUG 0 |
296 |
|
break; |
297 |
|
|
298 |
|
case M68K_EMUL_OP_VIDEO_OPEN: // Video driver functions |
299 |
< |
r->d[0] = VideoOpen(r->a[0], r->a[1]); |
299 |
> |
r->d[0] = VideoDriverOpen(r->a[0], r->a[1]); |
300 |
|
break; |
301 |
|
|
302 |
|
case M68K_EMUL_OP_VIDEO_CONTROL: |
303 |
< |
r->d[0] = VideoControl(r->a[0], r->a[1]); |
303 |
> |
r->d[0] = VideoDriverControl(r->a[0], r->a[1]); |
304 |
|
break; |
305 |
|
|
306 |
|
case M68K_EMUL_OP_VIDEO_STATUS: |
307 |
< |
r->d[0] = VideoStatus(r->a[0], r->a[1]); |
307 |
> |
r->d[0] = VideoDriverStatus(r->a[0], r->a[1]); |
308 |
|
break; |
309 |
|
|
310 |
|
case M68K_EMUL_OP_SERIAL_OPEN: // Serial driver functions |
435 |
|
ClearInterruptFlag(INTFLAG_60HZ); |
436 |
|
if (HasMacStarted()) { |
437 |
|
|
438 |
< |
// Mac has started, execute video, ADB and Time Manager interrupt functions |
438 |
> |
// Mac has started, execute all 60Hz interrupt functions |
439 |
|
ADBInterrupt(); |
440 |
|
TimerInterrupt(); |
441 |
|
VideoInterrupt(); |
442 |
+ |
SonyInterrupt(); |
443 |
+ |
DiskInterrupt(); |
444 |
+ |
CDROMInterrupt(); |
445 |
|
|
446 |
|
// Call DoVBLTask(0) |
447 |
|
if (ROMVersion == ROM_VERSION_32) { |
493 |
|
r->d[0] = AudioDispatch(r->a[3], r->a[4]); |
494 |
|
break; |
495 |
|
|
496 |
+ |
#if SUPPORTS_EXTFS |
497 |
+ |
case M68K_EMUL_OP_EXTFS_COMM: // External file system routines |
498 |
+ |
WriteMacInt16(r->a[7] + 14, ExtFSComm(ReadMacInt16(r->a[7] + 12), ReadMacInt32(r->a[7] + 8), ReadMacInt32(r->a[7] + 4))); |
499 |
+ |
break; |
500 |
+ |
|
501 |
+ |
case M68K_EMUL_OP_EXTFS_HFS: |
502 |
+ |
WriteMacInt16(r->a[7] + 20, ExtFSHFS(ReadMacInt32(r->a[7] + 16), ReadMacInt16(r->a[7] + 14), ReadMacInt32(r->a[7] + 10), ReadMacInt32(r->a[7] + 6), ReadMacInt16(r->a[7] + 4))); |
503 |
+ |
break; |
504 |
+ |
#endif |
505 |
+ |
|
506 |
+ |
case M68K_EMUL_OP_BLOCK_MOVE: // BlockMove() replacement |
507 |
+ |
memmove(Mac2HostAddr(r->a[1]), Mac2HostAddr(r->a[0]), r->d[0]); |
508 |
+ |
break; |
509 |
+ |
|
510 |
|
default: |
511 |
|
printf("FATAL: EMUL_OP called with bogus opcode %08x\n", opcode); |
512 |
|
printf("d0 %08lx d1 %08lx d2 %08lx d3 %08lx\n" |