From: Gwenole B. <Gwe...@en...> - 2001-01-30 15:42:43
|
Hi, I committed a patch to emul_op.cpp so that VIA, SCCRd and SCCWr base addresses may get faked to ScratchMem. Actually, the patch occurs in EMUL_OP_INSTALL_DRIVERS because it seemed more appropriate than EMUL_OP_PATCH_BOOTGLOBS. Unfortunately, this is not the safest way to take and I would like to attack the problem right from its roots. Therefore, I traced down changes to those LowMem globals (0x1d4, 0x1d8, and 0x1dc) and the most "frequent" ones are those initialized by some code located at ROMBase + 0x92a. The code there is a little bit obfuscated and I don't think that replacing it with NOPs would do any good. I think it would be best to replace the MOVE.L (A3,D3.W*1,$00), (A3) instruction (4 bytes) with an EmulOP and a NOP. The suggested EmulOp is EMUL_OP_OVERWRITE_VIA_SCC. Its purpose would be to set the referenced value to ScratchMem if A3 references one of the above-mentioned LowMem globals. Otherwise, it would just what the instruction was supposed to do. Do you have any other suggestions ? PS: I had to commit that patch because B2 would crash in some cases in real or direct addressing mode. More strangely, without that patch, B2 would run fine in "user" mode whereas it would crash as "root" just before the extensions are loaded. Both prefs files (in user or root) are identicial. How such a thing could happen ? i.e. switching to root made the bug more visible. Bye, Gwenole. |