ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/rom_patches.cpp
(Generate patch)

Comparing BasiliskII/src/rom_patches.cpp (file contents):
Revision 1.6 by cebix, 1999-10-21T22:39:54Z vs.
Revision 1.9 by cebix, 1999-10-25T19:01:29Z

# Line 1157 | Line 1157 | static bool patch_rom_32(void)
1157          *wp++ = htons(M68K_NOP);
1158          *wp = htons(M68K_NOP);
1159  
1160 <        // Fix logical/physical RAM size (CompBootStack) (must be done after InitMemMgr!)
1161 <        static const uint8 fix_memsize_dat[] = {0x4e, 0x75};
1162 <        if ((base = find_rom_data(0x490, 0x4b0, fix_memsize_dat, sizeof(fix_memsize_dat))) == 0) return false;
1163 <        D(bug("fix_memsize %08lx\n", base));
1164 <        wp = (uint16 *)(ROMBaseHost + base);
1160 >        // Compute boot stack pointer and fix logical/physical RAM size (CompBootStack) (must be done after InitMemMgr!)
1161 >        wp = (uint16 *)(ROMBaseHost + 0x490);
1162 >        *wp++ = htons(0x2038);  // move.l       $10c,d0
1163 >        *wp++ = htons(0x010c);
1164 >        *wp++ = htons(0xd0b8);  // add.l        $2a6,d0
1165 >        *wp++ = htons(0x02a6);
1166 >        *wp++ = htons(0xe288);  // lsr.l        #1,d0
1167 >        *wp++ = htons(0x0880);  // bclr         #0,d0
1168 >        *wp++ = htons(0x0000);
1169 >        *wp++ = htons(0x0440);  // subi.w       #$400,d0
1170 >        *wp++ = htons(0x0400);
1171 >        *wp++ = htons(0x2040);  // move.l       d0,a0
1172          *wp++ = htons(M68K_EMUL_OP_FIX_MEMSIZE);
1173 <        *wp = htons(M68K_RTS);
1173 >        *wp++ = htons(M68K_RTS);
1174  
1175          static const uint8 fix_memsize2_dat[] = {0x22, 0x30, 0x81, 0xe2, 0x0d, 0xdc, 0xff, 0xba, 0xd2, 0xb0, 0x81, 0xe2, 0x0d, 0xdc, 0xff, 0xec, 0x21, 0xc1, 0x1e, 0xf8};
1176          base = find_rom_data(0x4c000, 0x4c080, fix_memsize2_dat, sizeof(fix_memsize2_dat));
# Line 1403 | Line 1410 | static bool patch_rom_32(void)
1410          *wp++ = htons(M68K_EMUL_OP_MEMORY_DISPATCH);
1411          *wp = htons(M68K_RTS);
1412  
1413 + #if EMULATED_68K
1414 +        // Replace BlockMove()
1415 +        wp = (uint16 *)(ROMBaseHost + find_rom_trap(0xa02e));   // BlockMove()
1416 +        *wp++ = htons(M68K_EMUL_OP_BLOCK_MOVE);
1417 +        *wp++ = htons(0x7000);
1418 +        *wp = htons(M68K_RTS);
1419 + #endif
1420 +
1421          // Patch VIA interrupt handler
1422          wp = (uint16 *)(ROMBaseHost + 0x9bc4);  // Level 1 handler
1423          *wp++ = htons(0x7002);          // moveq        #2,d0 (always 60Hz interrupt)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines