From: Toni Wilen Date: Sat, 9 Nov 2019 17:31:05 +0000 (+0200) Subject: PPC board without ROM/zero size rom and 68060: make sure 68060 FPU gets disabled. X-Git-Tag: 4300~49 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=b16399c63467b91aaf2fa008cf4a760b3b44a77d;p=francis%2Fwinuae.git PPC board without ROM/zero size rom and 68060: make sure 68060 FPU gets disabled. --- diff --git a/cpuboard.cpp b/cpuboard.cpp index 60e8354b..7a9cc816 100644 --- a/cpuboard.cpp +++ b/cpuboard.cpp @@ -2161,6 +2161,16 @@ void cpuboard_clear(void) // Adds resource resident that CSPPC/BPPC flash updater checks. #define FAKEPPCROM_OFFSET 32 +static const uae_u8 fakeppcromstart[] = { + 0x11, 0x11, + // moveq #2,d0 + 0x70, 0x02, + // movec d0,pcr + 0x4e, 0x7b, 0x08, 0x08, + // jmp (a5) + 0x4e, 0xd5 +}; + static const uae_u8 fakeppcrom[] = { // struct Resident 0x4a, 0xfc, @@ -2170,14 +2180,21 @@ static const uae_u8 fakeppcrom[] = { 0x00, 0xf0, 0x00, FAKEPPCROM_OFFSET + 30, 0x00, 0xf0, 0x00, FAKEPPCROM_OFFSET + 30, 0x00, 0xf0, 0x00, FAKEPPCROM_OFFSET + 26, - // moveq #0,d0; rts - 0x70, 0x00, 0x4e, 0x75 + // moveq #0,d0 + 0x70, 0x00, + // rts + 0x4e, 0x75, }; static const char fakeppcromtxt_cs[] = { "CyberstormPPC.IDTag" }; static const char fakeppcromtxt_bz[] = { "BlizzardPPC.IDTag" }; static void makefakeppcrom(uae_u8 *rom, int type) { + memset(rom, 0, FAKEPPCROM_OFFSET); + // 68060: disable FPU because we don't have ROM that handles it. + if (currprefs.fpu_model == 68060) { + memcpy(rom, fakeppcromstart, sizeof fakeppcromstart); + } memcpy(rom + FAKEPPCROM_OFFSET, fakeppcrom, sizeof fakeppcrom); const char *txt = type ? fakeppcromtxt_bz : fakeppcromtxt_cs; memcpy(rom + FAKEPPCROM_OFFSET + sizeof fakeppcrom, txt, strlen(txt) + 1);