Tandy 200 RAM: Difference between revisions
Line 23: | Line 23: | ||
The T200 ROM provides a routine to perform a bank-to-bank memory 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 | To accomplish this, the T200 uses spare memory in the [[Tandy 200 Timer]] to | ||
store the source and destination ram banks. | store the source and destination ram banks. | ||
Revision as of 06:51, 19 March 2009
This page captures some useful information for programming with T200 RAM.
Bank 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!
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 Tandy 200 Timer 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).