Tandy 200 RAM

From Bitchin100 DocGarden
Revision as of 06:31, 19 March 2009 by 99.6.119.22 (talk)
Jump to navigationJump to search

This page captures some useful information for programming with T200 RAM.

T200 RAM selection

T200 RAM is always 24k blocks, from A000 to FFFF. There can be any number of banks from 1 to 3.

In the T200 memory map, there are 6 defined blocks - 3 ROM and 3 RAM. Bank selection is accomplished by writing to IO port D8 (216). The current setting of the bank selection may be read back from D8 also.

Bit 1,0 --> selection of ROM bank (0000-9FFF or 0000-7FFF) 00 = main ROM (40k) 01 = multiplan (32k) 10 = option ROM (if installed)

Bit 3,2 --> selection of RAM bank (A000-FFFF) 00 = bank 1 01 = bank 2 (if installed) 10 = bank 3 (if installed)

Register D8 can be written at any time, with catastrophic results if not done correctly!

I believe there are rom routines for bank to bank copy or reads, but I can't find them currently.

Bank To Bank Copy

The T200 ROM provides a routine to perform a bank-to-bank memory copy.

To accomplish this, the T200 uses spare memory in the timer chip to store the source and destination ram banks.

Then there are a set of rom routines that do the bank to bank copies.

So, you can imagine then how this works - you store the critical data somewhere accessible always, then bank switch getting all the info you need about the directories, then do the byte copies.

There is a routine at 2FC5 that copies B bytes from (HL) in source to (DE) in target-- you could use that to copy things to ALTLCD in the ram banks-- then you have your environment prepped for doing the bank to bank copy from RAM.

ALTLCD

ALTLCD exists in all 3 RAM banks, and is 640 bytes long, running from F7B0 (63408) to FA2F (64047).