34 |
|
#include "prefs.h" |
35 |
|
#include "rom_patches.h" |
36 |
|
|
37 |
< |
#define DEBUG 0 |
37 |
> |
#define DEBUG 1 |
38 |
|
#include "debug.h" |
39 |
|
|
40 |
|
|
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)); |