mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-23 04:30:10 +00:00
- added BlockMove() replacement
- extfs.cpp: get_path_for_fsitem(root parent) no longer crashes
This commit is contained in:
parent
13301146d9
commit
20ba496c92
@ -503,6 +503,10 @@ void EmulOp(uint16 opcode, M68kRegisters *r)
|
||||
break;
|
||||
#endif
|
||||
|
||||
case M68K_EMUL_OP_BLOCK_MOVE: // BlockMove() replacement
|
||||
memmove(Mac2HostAddr(r->a[1]), Mac2HostAddr(r->a[0]), r->d[0]);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("FATAL: EMUL_OP called with bogus opcode %08x\n", opcode);
|
||||
printf("d0 %08lx d1 %08lx d2 %08lx d3 %08lx\n"
|
||||
|
@ -211,7 +211,9 @@ static void add_path_comp(const char *s)
|
||||
|
||||
static void get_path_for_fsitem(FSItem *p)
|
||||
{
|
||||
if (p->id == ROOT_ID) {
|
||||
if (p->id == ROOT_PARENT_ID) {
|
||||
full_path[0] = 0;
|
||||
} else if (p->id == ROOT_ID) {
|
||||
strncpy(full_path, RootPath, MAX_PATH_LENGTH-1);
|
||||
full_path[MAX_PATH_LENGTH-1] = 0;
|
||||
} else {
|
||||
|
@ -81,6 +81,7 @@ enum {
|
||||
M68K_EMUL_OP_AUDIO,
|
||||
M68K_EMUL_OP_EXTFS_COMM,
|
||||
M68K_EMUL_OP_EXTFS_HFS,
|
||||
M68K_EMUL_OP_BLOCK_MOVE, // 0x7130
|
||||
M68K_EMUL_OP_MAX // highest number
|
||||
};
|
||||
|
||||
|
@ -1403,6 +1403,14 @@ static bool patch_rom_32(void)
|
||||
*wp++ = htons(M68K_EMUL_OP_MEMORY_DISPATCH);
|
||||
*wp = htons(M68K_RTS);
|
||||
|
||||
#if EMULATED_68K
|
||||
// Replace BlockMove()
|
||||
wp = (uint16 *)(ROMBaseHost + find_rom_trap(0xa02e)); // BlockMove()
|
||||
*wp++ = htons(M68K_EMUL_OP_BLOCK_MOVE);
|
||||
*wp++ = htons(0x7000);
|
||||
*wp = htons(M68K_RTS);
|
||||
#endif
|
||||
|
||||
// Patch VIA interrupt handler
|
||||
wp = (uint16 *)(ROMBaseHost + 0x9bc4); // Level 1 handler
|
||||
*wp++ = htons(0x7002); // moveq #2,d0 (always 60Hz interrupt)
|
||||
|
Loading…
Reference in New Issue
Block a user