Subject: PC99 Disk Format

From: Dan Eicher <[email-masked]>
Date: Wed, 2 Dec 2009 08:08:33 -0500

1. One of the primary design considerations with the PC99 disk format
was to make it easy to turn around and create a copy of the disk on
the remote system
    with pc99transfer - no matter what the combination (pc99<>TI,
TI<>TI or pc99<>pc99).
2. Bit's and piece of extra information was added so programs like
Rapidcopy (Barry Boone) would run.
3. On of my disappointments was the lack of a properly computed CRC.
The only program I knew of at the time that would display the CRC was
    Will McGovern's TrackHack. The inital challenge was that Mike
Wright could not figure out how to computer the CRC in 9900 assembler.
    Jeff White found the correct code in a TI disk controller manual.
Mike and I still couldn't figure out how it worked! =)
    Jeff then patiently explained to us, step by step what the code was doing.
    So we now had code to compute the same CRC as TI did, we knew how
it worked, but Mike didn't want to create a format V2 with the CRC
code
    written to disk as it might cause compatibility problems. I felt
this was a minor problem that could easily be over come but was out
voted.

    As far as Mike's article on breaking the protection of Spad.
    Mike only "cracked" protection with the goal of getting the
software to run under PC99 - that was always the goal, never piracy.
    A couple of programs that had to be tweaked to run on pc99 are:
      Bishops edu cart by Asgard - has a timing problem in start -
always appeared on PC99 - appeared once in 100 on a real TI.
      Miner2409er - Did sometime with the max number of sprites that
never worked out - a tweak in a certain loop and it was fine.
      Doom of Modular - this was an assembler/xb hybrid - this is
where we learned the trick of writing a sector from Extended
Basic. Mike wrote an entire article on cracking the protection on this
disk based software so that it would run on the pc99 emulator. I think
this article was about 6 pages long.

   At one time, when it looked like there was going to be a pc99w
(windows version) - I created a battery of test programs that I knew
exercised dark corners of the TI-99/4a. I knew that if an emulator
could pass that battery of test, most "off the shelf" software would
run.

Dan

---

From: "Paolo Bagnaresi" <[email-masked]>
Date: Wed, 2 Dec 2009 23:53:46 +0100

Thanks Dan, for your explanation.
There are things I still don't understand, though.

1. Why would adding a track layout would make it easier to copy a disk 
with pc99transfer?
Does pc99transfer actually read tracks? Doesn't it just read sectors, like 
almost any copy program?

2. So Barry Boone's Rapidcopy reads tracks. I never used it, and did not 
know that. Now, reading a track may help understanding what goes on with 
copy-protection, but when it comes to actually copying an entire disk you 
just have to stick with copying sectors as well, as they are. Reading a 
track is usually riddled with read errors, at least that was my personal 
experience. Maybe there are FDC chips that don't make any mistake while 
reading a track, but I have never been so lucky.

3. Why did you choose a format that could not possibly be fed as it was to 
a WD177x controller chip anyway? When you format a track you have to leave 
out the data that go to the sectors, lest some high value bytes (>F5 
through >FE) interfere with the formatting process. So, why mixing all 
toghether (data and intersector values), if you have to separate sector 
data from the rest when a real formatting is needed?

4. Again, if an easier formatting was the goal, why adding two consecutive 
 >F7? When a real formatting is performed, you just feed one >F7 and then 
two consecutive bytes will be written to disk. Those two bytes will 
contain the CRC of all the bytes written to the Data Register since the 
last "CRC Preset".
So, just an >F7 would have been enough.

5. I am beginning to realize now that the chosen format for PC99 (full 
track layout) was geared more to representing the track content than 
making it easier for programmers to use its disk image files. In a way, 
something nice to offer to the users, "a cherry on top of the sundae", 
considering the marvellous effectiveness of PC99 :-)

Thank you.

Paolo

---

From: "epergrem" <[email-masked]>
Date: Thu, 03 Dec 2009 01:55:38 -0000

Hi Paolo,
I do know that the pc99tranfer programs (RSECTOR/WSECTOR) are sector copiers and use the subrotines in the FDC DSR.  That may be why the PC99 disk requires the additional information.  

The feature makes it the only emulator which can recreate a TI compatible disk from it's electronic format.  I know that TI99-PC can now do that, but the feature in PC99 pre-dates TI99-PC by several years.

Ernie

---

From: "Paolo Bagnaresi" <[email-masked]>
Date: Thu, 3 Dec 2009 10:14:02 +0100

Hi Ernie,

There isn't any FDC DSR on a TI that is capable of reading a track . 
Advanced Diagnostic would do that, but it wasn't from a built-in DSR, they 
had to add extra code for that. Also, there is no need of reading a track 
if the only thing you want to do is copying a disk.

I'll stick to my opinion: the extra information added to PC99 format was 
just to give the user a format that was as close as possible to the real 
thing, but, beside that, there wasn't any practical reason for it. I think 
our opinions will keep on differing on this matter.

Of course PC99 was the first to use its format. And by far too! I just 
copied it, to make TI99-PC compatible with an outstanding program :-)

One question: do you know if the interleave adopted in PC99 disk format is 
a fixed one? Or, may it change according to some internal parameter that 
nobody has ever cared to modify?  Michael Zapf would like to know and I am 
interested too.

Thanks.

Paolo

From: "epergrem"
To: <[email-masked]>
Sent: Thursday, December 03, 2009 2:55 AM
Subject: [TI994A] Re: PC99 Disk Format
>
> Hi Paolo,
> I do know that the pc99tranfer programs (RSECTOR/WSECTOR) are sector 
> copiers and use the subrotines in the FDC DSR.  That may be why the PC99 
> disk requires the additional information.
>
> The feature makes it the only emulator which can recreate a TI 
> compatible disk from it's electronic format.  I know that TI99-PC can 
> now do that, but the feature in PC99 pre-dates TI99-PC by several years.
>
> Ernie
>
>