30 |
|
#include "disk.h" |
31 |
|
#include "cdrom.h" |
32 |
|
#include "video.h" |
33 |
+ |
#include "extfs.h" |
34 |
|
#include "prefs.h" |
35 |
|
#include "rom_patches.h" |
36 |
|
|
46 |
|
uint32 UniversalInfo; // ROM offset of UniversalInfo |
47 |
|
uint32 PutScrapPatch; // Mac address of PutScrap() patch |
48 |
|
|
49 |
< |
static uint32 sony_offset; // ROM offset of .Sony driver |
50 |
< |
static uint32 serd_offset; // ROM offset of SERD resource (serial drivers) |
51 |
< |
static uint32 microseconds_offset; // ROM offset of Microseconds() replacement routine |
49 |
> |
static uint32 sony_offset; // ROM offset of .Sony driver |
50 |
> |
static uint32 serd_offset; // ROM offset of SERD resource (serial drivers) |
51 |
> |
static uint32 microseconds_offset; // ROM offset of Microseconds() replacement routine |
52 |
|
static uint32 memory_dispatch_offset; // ROM offset of MemoryDispatch() replacement routine |
53 |
|
|
54 |
|
// Prototypes |
647 |
|
r.a[0] = ROMBaseMac + memory_dispatch_offset; |
648 |
|
r.d[0] = 0xa05c; |
649 |
|
Execute68kTrap(0xa247, &r); // SetOSTrapAddress() |
650 |
+ |
|
651 |
+ |
#if SUPPORTS_EXTFS |
652 |
+ |
// Install external file system |
653 |
+ |
InstallExtFS(); |
654 |
+ |
#endif |
655 |
|
} |
656 |
|
|
657 |
|
|
668 |
|
// Real addressing mode requires a 32-bit clean ROM |
669 |
|
return ROMVersion == ROM_VERSION_32; |
670 |
|
#else |
671 |
< |
// Virtual addressing mode works with 32-bit clean Mac II ROMs and Classic ROMs (experimental) |
671 |
> |
// Virtual addressing mode works with 32-bit clean Mac II ROMs and Classic ROMs |
672 |
|
return (ROMVersion == ROM_VERSION_CLASSIC) || (ROMVersion == ROM_VERSION_32); |
673 |
|
#endif |
674 |
|
} |
1403 |
|
*wp++ = htons(M68K_EMUL_OP_MEMORY_DISPATCH); |
1404 |
|
*wp = htons(M68K_RTS); |
1405 |
|
|
1406 |
+ |
#if EMULATED_68K |
1407 |
+ |
// Replace BlockMove() |
1408 |
+ |
wp = (uint16 *)(ROMBaseHost + find_rom_trap(0xa02e)); // BlockMove() |
1409 |
+ |
*wp++ = htons(M68K_EMUL_OP_BLOCK_MOVE); |
1410 |
+ |
*wp++ = htons(0x7000); |
1411 |
+ |
*wp = htons(M68K_RTS); |
1412 |
+ |
#endif |
1413 |
+ |
|
1414 |
|
// Patch VIA interrupt handler |
1415 |
|
wp = (uint16 *)(ROMBaseHost + 0x9bc4); // Level 1 handler |
1416 |
|
*wp++ = htons(0x7002); // moveq #2,d0 (always 60Hz interrupt) |