[hatari-devel] Fwd: MMU emulation |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
Below is little information from Frank Wille on SSW handling,
hopefully it's useful. It would help to know what exact bits
of SSW would need clarification.
On tiistai 22 tammikuu 2013, Frank Wille wrote:
> Eero Tamminen wrote:
> > -------
> > I do not yet understand all of the bits inside this SSW. I'd be happy
> > if anyone could explain them to me. I'll try to implement it, as soon
> > as i can understand it. The bits are explained in the MC68030UM.pdf
> > (68030 users manual), page 295 (pt. 8.2.1).
> > -------
> >
> > Would you be able to help with that?
>
> Probably not. I have never programmed the 68030, as I went directly from
> 68000 to 68040. :) As far as I can see the chapter 8.2.1 describes these
> bits very well, so there is not much to add.
>
> I guess he wonders perhaps about the Fault/Rerun flags for the pipeline
> stages? This implies that the instruction pipeline is more or less
> emulated to set the correct flag.
>
> Important to know may be (from section 8.2 bus fault recovery):
>
> Short frame format (%1010):
> - stage B word: at PC+4
> - stage C word: at PC+2
>
> Long frame format (%1011):
> - stage B word: at contents of (frame+$24).L
> - stage C word: at contents of (frame+$24).L - 2
>
> The fault flag for each stage (FC/FB) are only set for bus errors,
> together with the rerun flags (RC/RB). As far as I understand an address
> error will never set FC/FB, but only RC/RB.
>
> I guess that FB/RB is set when a bus error occurs at PC+4 (short frame)
> or (frame+$24).L (long frame). And FC/RC for a bus error at PC+2 (short
> frame) or (frame+$24).L-2 (long frame).
>
> Did he already implement all the 030's exception stack frames?
> Then it should be clear what to put into (frame+$24). Otherwise I
> cannot help much. It is probably pointing to a word calculated from
> any of the operands.
- Eero