Image Map Image Map
Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 39

Thread: Model 4 Cassette Operation

  1. #21
    Join Date
    Feb 2015
    Location
    Cleveland, OH, USA
    Posts
    1,286

    Default

    Quote Originally Posted by Eudimorphodon View Post
    That "dump a cassette file into memory raw" program would be interesting to run against an ASCII Model 100 tape to see if it actually reads correctly with the Model III's BASIC ROM algorithm; is it really just different headers, or does it come out garbled because of bit encoding/timing/whatever differences?

    (Although, actually, I'm curious if it runs unmodified on a Model III to read "fast" tapes based on the power-on selection, or if you need to call a different ROM routine for 1500 baud tapes verses 500 baud.)
    Good point. I intend to find out, although it may take me a while...

    -CH-

  2. #22

    Default

    Earlier it was said a Pockt computer could read it. The service manal for the first one has the timings in it. Maybe the 100, Model 1 and Model III has that information as well. Would be a quick comparison.

    Remember though, on a 4 you can get rid of the ROM routines or swap them to RAM and modify them (at least on a disk system). The ROM routines are what are used even back on the Model I - including the infamous ROM bug that was finally fixed in version 1.3.

    Looking at the ROM disassembled for the model III (its out there somewhere) has the code in it for doing the cassette stuff.

  3. #23

    Default

    Quote Originally Posted by Tibs View Post
    including the infamous ROM bug that was finally fixed in version 1.3.
    What ROM bug is that?

  4. #24
    Join Date
    Mar 2013
    Location
    Chaffee, MO
    Posts
    1,609

    Default

    Robbert,
    If I'm remembering correctly there was a problem with the Model 1 Version 1.1 ROM's that made loading
    from Cassette extremely hard. I don't know if I still have the information, but I updated my Model 1
    to ROM version 1.3, and that fixed my problem. I then upgraded to Expansion Interface, and three
    Aerocomp Floppy Drives that were flippy.

    Larry

  5. #25
    Join Date
    May 2011
    Location
    Outer Mongolia
    Posts
    3,068

    Default

    Quote Originally Posted by clh333 View Post
    I read enough of the text yesterday to glean that the author is talking about the Model I, as he refers to a processor speed of 1.7 MHz, a tape "baud" of 500 and the need to keep processing overhead to a minimum to keep pace with the tape. Later machines with faster processors apparently could keep up with 1500 bps. I don't know if the Model III is equal to the Model 4 in that ability. I also don't know if the Model 100 wrote at 500 baud or faster.
    So... the reason the Model I's cassette port ran at 500 baud wasn't really related to how fast the machine's CPU ran. The bit rate was essentially based on a rough estimate as to what could be made reasonably reliable considering the *many* limitations inherent in storing data as audio bits recorded on an inexpensive consumer tape recorder using cheap binary level encoding. There was software available for the Model I to read/write cassettes at speeds up to around 3000 baud, and the Model III does 1500 baud with almost the identical CPU speed using slightly cleaned up hardware. The reason the tape reading program can't "do much" while it's reading is because the CPU has to waste tons of time counting delay loops so it can poll the I/O port at the proper times; there's no hardware timer it can use to offload this task to *and* the cassette hardware isn't interrupt driven, it's completely polling I/O, so if the CPU wanders off and does something else instead of keeping strict time between bits it'll fall out of sync.

    Regrettably, I have never seen a Model I and my knowledge on the subject has more holes than Swiss cheese. But the author makes a couple of interesting points. For example, he observes that there is more than one version of the ROM code - functionally equivalent yet not verbatim. He also alludes to different ROM configurations, containing either Level I (4k) or Level II (12k) BASIC. Having 12k BASIC plus other ROM routines must have been impossible on a 16k machine; there would have been no TPA, as CP/M calls it. So the differentiation of Model I machines between Level I and Level II BASIC was in effect a memory capacity distinction, was it not?
    I think you might be a little confused in comparing these machines to a CP/M box. Radio Shack never referred to the size of the BASIC ROMs in the TRS-80's marketing, it was simply "Level I" or "Level II"; the only "K" number was RAM, and RAM is completely independent of ROM. (You could have a Level I machine with either 4k or 16k of RAM, and technically a 4K Level II machine was possible as well, although I don't think Radio Shack actually sold that.) The "4k" and "12k" ROMs (Level I and Level II respectively, and this is indeed how much ROM each BASIC takes up out of the total of 16k the machine dedicates to ROM and I/O at the bottom of its memory map) have both BASIC and the small collection of "kernel" functions (like a keyboard scanner, some tape routines, etc.) that Radio Shack documented for machine language programs to use. Level II used about... half a k? of RAM for its own housekeeping, which was more than Level I but I don't think it was a *lot* more.

    Radio Shack's machines of course differ fundamentally from CP/M machines in that their memory map is completely incompatible with CP/M; CP/M requires that RAM start at 0000h so it "owns" some of the hardcoded interrupt jump points of the 8080/Z80 CPUs. The TRS-80 Model I and III have ROM there, so even when fitted with disk drives and not running "BASIC" programs they still jump through at least small pieces of the BASIC ROM when doing certain tasks.

    Knowing this prompts me to ask: Do the Model III and Model 4 share the same Level II BASIC as the Model I? I know their ROM code is somewhat different, as the Model 4 has a "Model III mode" and a "Model 4 mode" built in. There may also be differences in the ROMs of the 4P or GA or NGA.
    So, here's the thing to remember about the Model 4: it's basically two completely different computers living under one roof. (Or, maybe just a single one with a bad case of multiple personalities.) The standard Model III was very compatible with the Level II Model I: the BASIC is at least 98% compatible, down to the memory locations of most routines that might be called by machine language programs, and the hardware is also very close: the overall memory map is the same, they have the same video memory layout, keyboard is mapped at the same locations, etc. The compatibility gotchays mostly boil down to:

    • The Model III switched the disk controller and printer port to use IN/OUT I/O port mapping instead of being memory mapped like they were in the Model I.
    • The Model III switched to double density for the disk controller instead of single density; this combined with the above broke being able to boot the same DOS on both machines, although most programs that run under DOS are still compatible with minimal changes. (There are a couple third-party DOSes and booter games that could boot on either machine using some sinister tricks to write dual-density boot tracks and then load the apropos disk driver.)
    • The Model III added that faster 1500 baud mode for cassette I/O. In slow mode it can interchange tapes with the older machine.
    • There are a few other little compatibility glitches, like the "real time clock" interrupt on the respective disk systems runs at a different rate, and the Model III's keyboard matrix makes it possible to tell the two shift keys apart while on the Model I you can't.
    • The Model III has lowercase. Radio Shack sold a lowercase kit for the Model I, but some old software isn't compatible with it. This is why it was common for third-party lowercase mods for the Model I to include a hardware switch to shut it off.
    • Because of the built-in lowercase driver and a few other minor additions/improvements the Model III has a total of 14k of ROM instead of 12k when fitted with "Level II". There was also a "Level I" Model III (very rare), I believe it took 6k instead of 4k because it included commands to use the built-in printer port; printing wasn't supported on Model I Level I.


    At the time there were a lot of people that were put off by Radio Shack electing to make the Model III incompatible with the Model I at all, considering that other than the double-density disks it actually wasn't much of an improvement over the older machine. Rendering it unable to boot the older machine's disks and requiring an awkward one way procedure to transfer data between the two really does look like a questionable decision in retrospect, and it's why third-party DOSes like LDOS and NEWDOS80 that made interoperability much easier were so popular...

    Anyway, so, the Model 4: The Model 4 in Model 4 mode is almost completely unrelated to the Model III. Some hardware like the disk and printer ports stay at the same addresses, but video and keyboard is bank-switched out and it goes to an all-RAM mode basically similar to most later-model Z-80 CP/M machines. The BASIC that runs on Model 4 LS-DOS/TRS-DOS has more in common with the BASIC that came on the Model II, it doesn't use the ROM at all and is loaded into memory similarly to BASIC, again, on a CP/M machine. Meanwhile, Model III mode completely reconfigures the machine to be almost completely compatible with the Model III, switching in the ROM in place of RAM at the bottom of the memory map, changing the video layout to match, etc.

    So, in short, "Cassette ROM routines" exist on the Model 4, but *only* in Model III mode. Anything in the Model III manuals should apply. The exception here is the 4P, because it took "being a different computer" to the next level and actually got rid of the Model III BASIC ROM entirely; when you run a 4P in "III mode" you actually have to boot it from a DOS disk that has a special file on it that loads a copy of the Model III ROM into RAM and write-protects it. Rumor is that file has the cassette routines removed and just replaced with stubs, but I'm not entirely sure. (In any case it doesn't have the physical port to use them.) So in that case there are no cassette routines *anywhere* in its ROM, period.
    Last edited by Eudimorphodon; October 24th, 2020 at 12:21 PM.
    My Retro-computing YouTube Channel (updates... eventually?): Paleozoic PCs

  6. #26
    Join Date
    Feb 2015
    Location
    Cleveland, OH, USA
    Posts
    1,286

    Default

    Quote Originally Posted by Tibs View Post
    Earlier it was said a Pockt computer could read it.
    I made that statement in error, it appears. I just went back and tried to replicate and found the following:

    A 3-line BASIC file written and saved from a Model 102 (my Model 100 isn't feeling well...) to the CCR-81 in both compressed and ASCII format made a round trip successfully each time. The same files could not be loaded onto a PC-8 "pocket PC" or onto a Sharp PC-1500. (Each has a "program" and a "run" mode. I tried both, neither worked.) In fact the Sharp PC-1500 couldn't read a similar file written from the PC-8, even though both are Sharp products.

    The pocket PCs could control the tape, they just couldn't make sense of what was coming in through the wires. Two conclusions: there may not be a "Japanese standard" for tape recording formats, and my memory isn't as good as I thought it was.

    Mea culpa.

    -CH-

  7. #27
    Join Date
    May 2009
    Location
    Connecticut
    Posts
    4,839
    Blog Entries
    1

    Default

    Hubert Howe wrote a Model III update to his cassette article in issue 48 of Computronics. Unfortunately, the main addition is a short description of the cassette format used by Scripsit and Electric Pencil. He did write a Q&A column regarding the Model III in a few other late issues of that magazine but I haven't found any cassette interface information in the ones I have checked.

    Issue 60 of Computronics magazine has an article by John Wilson entitled "CASSIO-An End to the Cassette Blues." It would set the data file routines for cassette to work at 1500 bps correcting for the rather strange Model III design that kept all data files at the Model I 500 bps speed. It might be an interesting guide to designing replacement cassette routines on the Model III. Oddly, this issue of the magazine slipped through most of the archives but was saved by the Color Computer folks.

    At 500 bps and with a new leader for each data block, the cassette would only store about 1 K per minute of tape. Not exactly useful for the larger memory programs that the Model III expects.
    Last edited by krebizfan; October 24th, 2020 at 01:11 PM.

  8. #28

    Default

    The Model I originally came with Level 1 Basic, which is quite rudimentary, and the cassette speed is 250 baud. The Level II Basic is a much more substantial affair, being fully-featured, and having basic floppy-disk support. It also saw a speed increase to 500 baud.

    The Model III lets you choose 500 or 1500 baud at boot time, at the Cassette? question. Enter L for 500 baud, or just hit enter. The 1500 baud used interrupts to detect wave polarity changes, for better speed. In theory this means it could work on something else while loading the tape (such as updating the internal clock).

  9. #29
    Join Date
    May 2011
    Location
    Outer Mongolia
    Posts
    3,068

    Default

    Quote Originally Posted by clh333 View Post
    Two conclusions: there may not be a "Japanese standard" for tape recording formats, and my memory isn't as good as I thought it was.
    Radio Shack made a "baby" version of the TRS-80 Color Computer called the MC-10. It used a different CPU (Motorola 6803 vs. 6809, not binary compatible) than the regular model but its BASIC was based on the same source and its tape interface was protocol compatible. However even in this *easy* case Tandy screwed it up; the two BASICs used different encodings for BASIC keywords, so loading a program tape saved on one machine would result in all the BASIC commands being shuffled. Compatibility between BASICs tends to be the exception, not the rule.

    To cut to the chase, I really think you're wasting your time trying to load Model 100 tapes in Model III mode. A translation program would certainly be technically possible (and maybe it already exists, but I don't know about it), but you have TAPE100/CMD in Model 4 mode, so... why are you not messing with that? If you save the BASIC program in ASCII format you should *probably*, within limits, be able to load the converted file into Model 4 BASIC, and it has about as much chance of running there as it does under Model III BASIC. (Probably better.) And as I mentioned earlier, I think, if you really want to mess with it in Model III mode you can save it to an LS-DOS data disk and reboot to Model III LDOS to load it into Model III BASIC. And the reverse is also true; you can save a program from Model 4 BASIC using the ",A" operator so it's in ASCII format and then you should be able to use TAPE100 to write it back for the Model 100.

    As always, keep in mind that BASIC dialects differ between all these computers (Model III mode, Model 4 mode, and the Model 100) so any program that attempts anything "fancy", where "fancy" can be as simple as trying to print text at a particular point on the screen, will need modification when the program is moved between models.
    My Retro-computing YouTube Channel (updates... eventually?): Paleozoic PCs

  10. #30
    Join Date
    Feb 2015
    Location
    Cleveland, OH, USA
    Posts
    1,286

    Default

    Quote Originally Posted by Eudimorphodon View Post

    To cut to the chase, I really think you're wasting your time trying to load Model 100 tapes in Model III mode. A translation program would certainly be technically possible (and maybe it already exists, but I don't know about it), but you have TAPE100/CMD in Model 4 mode, so... why are you not messing with that?
    The short answer is: I have.

    T100_2.jpg

    A slightly longer answer is that I've always been curious about everything.

    The unfortunate aspect of not knowing anything is that you often don't know what you don't know - what it is you should know - and you often find out what you should know only by making mistakes. Sometimes people are generous enough to share their knowledge with you but it rarely happens without asking. This discussion, for example, has not only taught me what I didn't know but has opened up avenues of investigation I didn't know existed, and I thank you and the other respondents for their generosity.

    I know something about computers but very little about TRS computers; until very recently I had never owned or even used one. The learning curve has been steep and sometimes I have to ask embarrassingly stupid questions. I try not to ask the same stupid question twice; I find it tends to turn off the flow of information.

    But, as I've heard it said, we stand on the shoulders of giants and I have always had the greatest respect for people who know more than I do. Clearly you do.

    Thanks,

    -CH-

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •