Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tandy and PC-Jr graphics modes

415 views
Skip to first unread message

William A Moyes

unread,
Aug 4, 1994, 2:26:45 PM8/4/94
to
Does anyone out there have information about the old Tandy
and PC-Jr graphics modes? I need to know the graphics modes
(BIOS mode numbers) as well as the _memory organization_. If I
need to access any control registers (like on the EGA) please
provide them as well. Also if you have any information about how
old programs detected the presence of these modes, tell me.

I am trying to convert a few old games so they will be able
to use an EGA (or VGA) for their 16 color graphics. I have
already hacked a game (StarFlight) so it is compatible with a VGA
in its CGA mode (before I needed to use one of those VGA
utilities that make it simulate all the VGA's registers). Now I
am trying to get this game, and a few others to run in 16 color
mode (they all supported 320x200 16 color Tandy graphics, now I
want 320x200 EGA instead). I hope to build a generic emulator
(virtualize the hardware using the 386's protection mechanisms),
but hacking the original code might be easier.

-William Moyes
wmo...@eis.calstate.edu

Dave Grebe

unread,
Aug 7, 1994, 3:25:16 AM8/7/94
to

In a previous article, wmo...@eis.calstate.edu (William A Moyes) says:

> Does anyone out there have information about the old Tandy
>and PC-Jr graphics modes? I need to know the graphics modes
>(BIOS mode numbers) as well as the _memory organization_. If I
>need to access any control registers (like on the EGA) please
>provide them as well. Also if you have any information about how
>old programs detected the presence of these modes, tell me.

I'm not an expert on this subject, but I explored this very
thing a few years ago. I've forgotten much of it, but I'll
try to tell you what I know as well as give a few references.

The Tandy (and PC Jr.) special graphics modes are:

Mode 8 160x200x16 16k memory (Tandy Basic "Screen 3")
Mode 9 320x200x16 32k memory (Tandy Basic "Screen 5")
Mode 10 640x200x4 32k memory (Tandy Basic "Screen 6")
("Clear,,,32768" for Screen 5 & 6)

Video memory appears to start at B800:0000 the same as CGA,
even though it's actually mapped elsewhere by the video hardware.
No bank swicthing or register mapping is involed as in EGA.
CGA mode 4 graphics will map into Tandy mode 8 and produce a
useable but bizarre display. Unfortunately the other Tandy modes
memory map differently than any standard mode, so to the best of
my knowledge it's impossible to display 16 color Tandy 1000
graphics in any EGA or VGA mode without re-mapping every pixel.
Someone please correct me if I'm wrong here -- I'd very much
like to find out it's really as easy as changing a video mode.

From a copy of the Peter Norton Programmer's Guide to the IBM PC
(the pink shirt book) old enough to contain PC-Jr graphics info:

"The storage for the rows [of graphics pixels] is divided into
"banks" of lines that occupy contiguous memory locations. For
modes 4, 5, 6, and 8, there are two banks, the first bank holding
the memory for the even-numbered lines 0, 2, 4... through 198,
and the second holding the memory for the odd numbered lines
1, 3, 5... through 199. [This is the standard CGA layout so
far, here comes the good part...] Modes 9 and 10 have four banks,
with similarly staggered lines:

1st bank 0, 4, 8, 12...196
2nd bank 1, 5, 9, 13...197
3rd bank 2, 6, 10, 14...198
4th bank 3, 7, 11, 15...199

These banks of lines are similar to text-mode display pages in two
respects: The lines within each bank run one right after another
without any gap in memory, and each bank begins on an even K
boundary, leaving some unused bytes at the end of each bank....
Each bank is 8K in size, so the offsets to the beginning of the
banks are 0, 8K, 16K, and 24K."

I gave the Tandy Basic screen modes because this is a good way
to do some crude experimenting with screen mapping without
writing any assembly. (BLOAD, BSAVE, PEEK, and POKE.)
The basic interpreter is too slow for any real work, of course.

For the EGA/VGA part of the picture I'd recommend "Programmer's
Guide to PC and PS/2 Video System" by Richard Wilton, if you
don't already know of a more modern reference. He understands
and explains EGA and VGA video programming better than I ever
will, but says little about the PC-Jr/Tandy 1000, since they
were already considered obsolete when the book was written.

> I am trying to convert a few old games so they will be able
>to use an EGA (or VGA) for their 16 color graphics. I have
>already hacked a game (StarFlight) so it is compatible with a VGA
>in its CGA mode (before I needed to use one of those VGA
>utilities that make it simulate all the VGA's registers). Now I
>am trying to get this game, and a few others to run in 16 color
>mode (they all supported 320x200 16 color Tandy graphics, now I
>want 320x200 EGA instead). I hope to build a generic emulator
>(virtualize the hardware using the 386's protection mechanisms),
>but hacking the original code might be easier.

The generic emulator is beyond my skill since I don't know
enough about protected mode, but it sounds like a good idea
if it can be made to run fast enough. Hacking the original
code might involve disassembling and re-writing much of the
graphics code.

I'm going to take the coward's way out and keep the old Tandy
1000 around until either:

- Someone comes out with a video card that supports the old
PC-Jr/Tandy modes.
(If this is already available please let me know!)
- Everyone starts using RISC boxes and runs their old PC
software through an emulator anyway. Then it should be
relatively easy to add Tandy emulation, especially if
the emulator source is available. With enough horsepower
the 3-voice TI sound chip could be emulated as well.

I've also seen questions about this subject in comp.emulators.misc.

Dave Grebe
am...@cleveland.freenet.edu

0 new messages