Date : Wed, 25 Oct 2006 09:09:29
From : "Richard Gellman" <splodge@...>
Subject: Re: poorly master
Uh.. the quoting has come out all on one line... my apologies for that....
>> There are shadow versions of all modes, to > > find the shadow version
>> of a mode you add 128 to the standard > > mode number. For example the
>> shadow version of MODE 1 is MODE 129.> > Shadow as in only available
>> when shadow ram is installed?> (Excuse my ignorance!)> > tim.
> It's fitted as standard in a Master. As well as quite a few other bits of
> extra RAM to.
The mode selected is actually a logical AND between the mode given and 7,
thus mode 8 and mode 136 give normal and shadow versions of mode 0
respectively. On a machine with no shadow RAM, the top bit is simply
ignored, thus mode 128 selects mode 0.
To clarify what Shadow RAM does: It quite literally "shadows" the main
memory. It is a block of RAM that is address by the same addresses as the
screen memory (&3000 to &7FFF), and is paged in by a control register,
usually part of the ACCess CONtrol (ACCCON) register at &FE34. The idea is
that the shadow memory gets used for displaying the screen thus leaving a
massive 20K of main RAM free for your programs to use.
The selection logic is clever enough to differentitate between CPU access
and Video hardware access, thus the bank being accessed by the CPU is not
necessarily the same one being displayed on screen. Further, there is some
unusual logic that picks up on the address of the current instruction, and
can select which bank to access based on that - this allows the VDU driver
code to access the correct bank without having to continually change the
paging register.
All clever stuff.
The "other RAM" in a Master 128 by the way is divided up thus:
4K of MOS Private RAM, paged in at &8000 - &8FFF, switched in by the top
bit of ROMSEL (&FE30)
8K of FS RAM, paged in at &D000 - &EFFF (I think), controlled by ACCCON
(&FE34). This is where DFS/ADFS stores the information that used to have
to go at &E00 and raise PAGE.
64K of "Sideways" RAM, paged in as 4 x 16k banks at &8000 - &BFFF,
switched in by ROMSEL.
Including the base 32K (&0000 - &7FFF) and the Shadow RAM that makes 128K
total RAM :)
-- Richard