<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 26 Aug 1994 16:19:36 +0100
From   : jfid@... (James Fidell)
Subject: Re: How do I do that VIA thing?

"Chris L. Rae" wrote:

> > I'd help if I could, but I don't follow what you want to know...
> 
> Someone (I'm pretty sure it was you) told me that to get the emulator to 
> come up with 32K instead of 16 I should do something and I didn't 
> understand it!

As I understand the way that the OS works, it decides if the machine has
just been powered up by reading the value of the system VIA IER.  Reading
this always returns a value with bit 7 set, but on power up it would
appear that all the other bits are off.

So what I do is set all the VIA registers to zero at initialisation.  The
code to read the VIA IER sets bit 7 automatically on a read, thus the OS
reads &80 from this register on power up.

If the machine isn't in a power up reset, then the IER will have a
different value in it because the OS will have enabled some other VIA
interrupts.

If the OS decides that the VIA is in it's power on state, then it
continues by clearing all the memory, in the process calculating the
amount available.  If then sets bit 7 of &028E if there is 32K, or unsets
it if there is only 16K.  Later on, it checks this location to see if
it should print 16K or 32K in the start-up message.

James.

-- 
 "Yield to temptation --             |
  it may not pass your way again"    |     jfid@...        
                                     |
        - Lazarus Long               |              James Fidell
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>