On the real TT, SoftPC would always crash with a bus error accessing address 0x10 (in user mode, where this address is in fact inaccessible). But why? Thanks to the detailed crash message provided by EmuTOS, I could place a breakpoint on the offending instruction in Hatari. Hatari dutifully disassembled for me what was going on:
Code: Select all
000E043A 3584 6900 move.w d4,(a2,d6.l)
> r
D0 00000070 D1 000005A9 D2 00000619 D3 00000000
D4 00000800 D5 000036C5 D6 000006FC D7 00000619
A0 001A0412 A1 00000000 A2 0019FD14 A3 0019FD14
A4 0002DAFE A5 001A3AD9 A6 001A0414 A7 002D049C
USP 002D049C ISP 00007FCC SFC 00000000 DFC 00000000
CACR 00003111 VBR 00000000 CAAR 00000000 MSP 00000000
SR=0300 T=00 S=0 M=0 X=0 N=0 Z=0 V=0 C=0 IM=3 STP=0Help came in form of the 68030 user manual: As you can see, the second word of the offending instruction, 0x6900 is a "full format extension word", as its bit 8 is set. However, its "BD SIZE" field is "00", which is reserved according to the user manual. Heureka! This is an invalid instruction.
Disassembling the code in the vicinity shows a lot of instances of:
Code: Select all
000E0448 3584 6800 move.w d4,(a2,d6.l,$00)Therefore, I conclude:
- The version of SoftPC that I downloaded from the Internet has a bit-error, where one 0x6800 was modified to 0x6900.
- Hatari lead me astray by disassembling the instruction and executing it as originally intended without crashing.
- I suspect that the real 68030 has a minor bug regarding this invalid extension word. It probably wants to fetch the illegal instruction exception vector (which happens to be at address 0x10), but "forgets" to switch to supervisor mode; as it would usually do when handling an exception. This is why I see a bus error at address 0x10, instead of an illegal instruction exception.

