Date : Sun, 22 Sep 2002 04:26:43 +0200
From : John Kortink <kortink@...>
Subject: Re: BBC B with edge-connectors instead of IDC connectors?
On Sat, 21 Sep 2002 18:51:39 +0100, Sprow wrote:
>In article <KNEEJIOPPHNNBHBMMGACOEDFCDAA.r.gellman@...>,
> Richard Gellman <r.gellman@...> wrote:
>> To summarise everything:
>
>[snip]
>
>> The ADFS is Paged ROM 13 in this
>> chip, and can be read from the Master as a ROM image using a standard
>> method
>> of disabling interrupts, switching banks, copy the data, switch banks back,
>> enable interrupts, and save the data.
>
>No particular reason to disable interrupts,since interrupt handlers must
>preserve the ROM state anyway.The important thing is to update the softcopy
>at &F4 *before* you poke the ROM latch,
No, it's still unsafe. You *have* to disable interrupts to
make the combined update of ?&F4 and ROMSEL (?&FE30) atomic.
Fatal scenarios are somewhat contrived, but if an interrupt
occurs in between updating ?&F4 and ROMSEL, ?&F4 no longer
corresponds to ROMSEL during an interrupt handler, and when
that handler itself accesses a ROM and then *restores* ROMSEL
from ?&F4, it will exit with a different ROM selected than
when it was entered. Some code sequences will then lead to
<KABOOM>.
John Kortink