Here's the main bug fix in the Tandy 1000 BIOS v1.01, seen on the right, needed for proper hard drive controller operation.

v1.00 configured the DMA controller for "extended write mode", which is not the DMA timings that the controller expects, which can lead to data corruption.

v1.10 as you can see does not set that bit. This fix is made in two places where extended write mode was set.

#retrocomputing #tandy1000

You might be wondering why the Tandy BIOS has code to configure a DMA controller.

Like the PCjr it modelled itself after (the Tandy 1000 is sort of like the PCjr with all the bad stuff fixed), the Tandy 1000 does not ship with a DMA controller.

However Tandy was smart enough to anticipate that this might be a desirable add-on, and so they sold memory expansion cards that included the intel 8237 chip.

Besides letting you use a hard drive, the Tandy BIOS will also switch the floppy controller to DMA operation when you have the 8237 installed, so that's a nice performance boost as well.

@gloriouscow if there is no DMA controller, how did it do DRAM refresh?

@trcwm

I'M GLAD YOU ASKED!!!

#retrocomputing

@trcwm Like the PCjr, the Tandy 1000 does not have dedicated video memory. The Tandy Video Unit (usually referred to as the 'TGA' just from how games typically listed your adapter options in setup) can map pages to display anywhere in a 128KB window.

Which was the default it came with.

@trcwm Since the video unit is always running, and the Motorola 6845 CRTC actually never stops counting (not even in blanking areas), we can use the CRTC to generate addresses that activate row/column strobes that refresh the DRAM.

@trcwm This gets you refresh for free, but the downside is that now your CPU and your Video unit are contending for access to your DRAM.

On the PCjr, this meant that the system required an obnoxious number of wait states, giving it its reputation as being a sluggish machine.

@trcwm Tandy engineers took a look at this though, and figured out a way to avoid most of them by adjusting some timings and adding a few latches. The video unit can read 16-bits at a time, whereas the 8088 of course putzes along at 8-bits as usual.

@trcwm There was a still a penalty to running DOS out of the video unit's 128K refresh window, but Tandy had a big brain moment and realized that people would eventually upgrade their memory.

So unlike the PCjr, where that 128K shared memory aperture was stuck at the very start of memory - the Tandy could move it. The more RAM you installed, the higher up the video aperture went, and the more wonderfully wait-state free* RAM you had to run DOS and all your games in.

*this still had to be refreshed by a DMA controller on your memory expansion card, but it was only as bad as everyone on the PC was already used to.

@trcwm Later Tandy's could even just flip the IBM PC the bird and install 768KB of RAM. That meant DOS got all that luxurious 640KB just like a Real PC, while your sweet ass 16-color Tandy games had their own little block of 128KB all to themselves.
@trcwm To maintain some semblance of CGA compatibility, the Tandy can take the the B8000 region of memory that programs and games expect to see on a CGA card, and map it as 16K or 32K windows anywhere in the 128K video aperture. This is pretty powerful - that's a ton of graphics pages at 16 colors.
@gloriouscow how do games know where the video memory is? If it depends on the RAM expansion?
@trcwm If they're expecting a CGA card, they'll find B8000 mapped somewhere - from the CPU's perspective. A game specifically made for the Tandy knows where the video memory is because it's probably rewriting all the video control registers to set that up the specific way it wants it.

@trcwm

*to be fair, eventually workarounds were invented by the PCjr community, by folks like the PCjr legend @mbbrutman. One of those techniques was to just flip things around - and load DOS above the first 128K, essentially achieving the same result as Tandy but all in software.

It is a little weird loading that driver, since the system briefly appears to boot twice...