• Please review our updated Terms and Rules here

Tandy 1000 page flipping (x86box)

Tape_Worm

New Member
Joined
Oct 14, 2023
Messages
3
So, first off, thanks to the folks on this forum I was able to realize a childhood ambition to utilize Tandy 320x200 16 colour graphics in C. So, thank you all for that. I've done all this under the x86box emulator on a Tandy 1000 SL/2 ROM. I've written this stuff using a mix of C (Turbo C++ 1.01) and inline assembly.

Secondly, I would like some clarification.

Thanks to information I found here, and the Tandy 1000 Technical Reference Manual I know I have to use the 0x3DF register to change the active and visible page. In the reference manual on page 57:

CRT/Processor Page Register
This 8-bit (write-only) register is addressed at 3DF. The descriptions below are
of the register functions:
BitDescription
0CRT Page 0
1CRT Page 1
2CRT Page 2
3Processor Page 0
4Processor Page 1
5Processor Page 2
6Video Address Mode 0
7Video Address Mode 1

CRT Page 0-2
Bits 0-2 select the 16K page used by the video. In 32K modes, bit 0 is ignored.

Processor Page 0-2
These processor page bits are combined with the CPU address to select the
32K segment of memory accessed at B8000. If an odd page number is selected
(1,3,5, etc.) the window is reduced to 16K.

In my attempts to get this working, I had assumed that by setting bit 2 to 1, and bit 3 to 1, it'd show me page 2, but map 0xB8000 to page 0. But that didn't really work. In fact, in order to flip between the default page (which I assumed was page 0) and another page, I had to pass in:
  • 1111 0110 (0xF6) to set my default page as active and visible.
  • 1110 0100 (0xE4) to set the other page as active and visible.
  • 1111 0100 (0xF6) to set the other page as visible and the default page as active.
  • 1110 0110 (0xE6) to set the default page as visible and the other page as active.
What I had expected was that my default page was 0 and I'd send in (and clearly i was way off here):
  • 1100 1000 (0xC8) to set the default page as active and visible
  • 1110 0100 (0xE4) to set the other page as active and visible.
  • 1100 0100 (0xC4) to set the default page as active and the other page as visible.
  • 1110 1000 (0xE8) to set the other page as active and the default page as visible.
I have to admit, I'm a little confused here. Why are both bits for page 1 and 2 set for the default value? Why is bit 0 not set in either the CRT or Processor bits for the default? How is this actually supposed to work?

Feel free to explain like I'm an idiot, because I am, and I haven't touched stuff like this since I was a teenager.

Thanks!

PS: This is the monstrosity that I built, I am quite pleased with myself:
t1000.png
 
Last edited:
Back
Top