============================================================================
7000xx_Port.txt - More details on unknown TI68K $7000xx HW2 I/O Ports
 - February 2002 -  Olivier Armand (ExtendeD) - <ola.e-ml@wanadoo.fr>
============================================================================


You should read Johan Eilert's TI89 hardware programming documentation
before reading this one.


$0x700008 to $700000F : (rw)
=======================

These ports are the ghosts of the ports for the protection of execution in
RAM ($700000 to $700007). Any writing to either the real ports or the ghosts
will change both ports (eg $700002 and $70000A).


$700014.w : (Rw)
===========

Real Time Clock. Incremented every 2^13 = 8192 seconds exactly.
The whole word must be read : reading the port byte by byte can return wrong
values.
The timer is not incremented when the batteries have been removed, but the
value it had when they were removed is kept. Removing the lithium battery
and putting it back gives a random value to the timer.


$70001F.b : (Rw)
===========

bit 2 : activates the incrementation of $700014.w when bit 1 is set. Set by
        AMS on reset.
bit 1 : its effect depends on the state of bit 2.
 bit2/bit1
   1   1   : State set by AMS on reset. $700014.w is incremented.
   1   0   : Auto-ints 1, 2, 3 and 5 are inhibited. The RTC is stopped.
   0   1   : The RTC is stopped. The auto-ints works normally.
   0   0   : The RTC is stopped. The frequencies of all the auto-ints are
             lower (OSC2 must be slower).
             AI1 : ~ 176 Hz instead of 256 Hz. 
             AI3 : ~ 40 ticks per minute instead of 60.
             AI5 : ~ 13.2 Hz instead 19.3 Hz.
   Only AMS initializes theses bits on reset. The boot code does not.

bit 0 : Something to do with the contrast (see J89hw.txt), AND :
Clearing this bit activate the execution in areas from which the Protection
can be disabled :
ROM_BASE+$12000 to ROM_BASE+$17FFF and ROM_BASE+$1A000 to ROM_BASE+$1FFFF.
The execution in the boot sector is not protected by the protection
controlled by this bit.


-----------
End Of File
