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:
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:
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:
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:
Bit | Description |
0 | CRT Page 0 |
1 | CRT Page 1 |
2 | CRT Page 2 |
3 | Processor Page 0 |
4 | Processor Page 1 |
5 | Processor Page 2 |
6 | Video Address Mode 0 |
7 | Video 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.
- 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.
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:
Last edited: