<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 12 Nov 2004 16:41:26 +0000 (GMT)
From   : Andrew W <a.weston2@...>
Subject: Re: SRAM

In <URL:news:local.misc> on Fri 12 Nov, Richard_Talbot-Watkins@... wrote:

> > So I assume Exile would prior to this somehow test 'sockets' 0-D(?) to
> > see where the SRAM was located?
> 
> Yeah, it probably does something a bit like:
> 
> SEI         \ disable interrupts to stop the OS from changing the ROM bank
> LDX #15     \ start at bank 15
> ..loop
> STX &FE30   \ enable bank X
> LDY &8000   \ load Y with ?&8000
> INC &8000   \ increment ?&8000
> INY         \ increment Y
> CPY &8000   \ and compare it with the memory we tried to increment
> BEQ foundram      \ if equal, we have found SRAM
> DEX
> BPL loop    \ try next bank
> 
> ..notfoundram
> \ if we got here, there is no SRAM
> 
> ..foundram
> \ if we got here, we have the SRAM bank in X, and it is still paged in
>
That's a good way. I think if I was to use SRAM then I'd possibly have a
diagram of four slots and ask the user to select which slot the SRAM
was in then just select 15,14,13 or 12 . Even then though I'd still have
to check in case they selected the BASIC slot or another full slot. If
they had a Watford board or similar then this way breaks down even more
:-(

> Maybe it does something a little more clever to notice 8k/12k RAM as well
> (which is of course no good), and if it was written well it might even try
> to skip over SRAM with a valid ROM image in it...
>
The manual just says 'will try to find suitable sideways RAM to use' ;-)
I'm assuming that the authors assumed the player was starting with a
reset machine given that they're making use of naughty below-page space
;-)


A.Weston
-- 
Staffordshire, UK of GB&NI. 
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>