Jump to content
IGNORED

TI99/4A accessing a Commodore 1541


donlafferty

Recommended Posts

Greetings. I just joined the forum because I decided to start messing around with my recently purchased C64 and my 2018 purchased TI99/4A. I actually learned BASIC in the early 80's on my mom's TI99/4A. A year or so after that I got a C64 and used that for a few years until I went to the dark side(IBM). Now that I'm back in the realm of 80s computers I wondered if anyone has ever figured out how to connect a 1541 to the TI. 

 

I have a feeling they would need a hardware adapter but I know nothing about the way the TI talks to drives and only know a little about the C64.

 

I have also thought about connecting an early PC drive since it appears the TI drives are similar.

 

My end goal is to be able to use my PC to move files to a floppy so I can read them into the TI. I think I have the 1541 to PC figured out.

 

Thanks if anyone has info on this.

Don Lafferty

Link to comment
Share on other sites

Heya Don.  I'm far from a hardware expert but I do know enough to know that the 1541 is essentially a separate computer in it's own right (from what i heard CBM had trouble hammering out some code so they wound up with the brute force approach that we are familiar with). 
 

Taking a wild guess, if this were to work it would probably have to be over serial. 

Link to comment
Share on other sites

Just now, WhataKowinkydink said:

Heya Don.  I'm far from a hardware expert but I do know enough to know that the 1541 is essentially a separate computer in it's own right (from what i heard CBM had trouble hammering out some code so they wound up with the brute force approach that we are familiar with). 
 

Taking a wild guess, if this were to work it would probably have to be over serial. 

Thanks and yes, the 1541 has a 6502 in it I believe and for the reason you state. I'm not sure if the TI has an serial capability but maybe in the expansion adapter.

Link to comment
Share on other sites

15 minutes ago, donlafferty said:

Now that I'm back in the realm of 80s computers I wondered if anyone has ever figured out how to connect a 1541 to the TI.

Little sense in doing so unless you want to copy Commodore files from the 1541 to the TI.  The 1541 is only capable of reading Commodore DOS GCR encoding, although it can read it in a lot of different ways.  It cannot read MFM or FM disks, unlike the 1571 (which is locked to MFM.)

 

17 minutes ago, donlafferty said:

My end goal is to be able to use my PC to move files to a floppy so I can read them into the TI. I think I have the 1541 to PC figured out.

There is not much hope using a modern computer without a floppy controller to write anything to a disk the TI can read.  A KryoFlux is capable of writing disk images, and you could use TIImageTool can help make the images if you want to make something custom.

  • Like 2
Link to comment
Share on other sites

12 minutes ago, OLD CS1 said:

Little sense in doing so unless you want to copy Commodore files from the 1541 to the TI.  The 1541 is only capable of reading Commodore DOS GCR encoding, although it can read it in a lot of different ways.  It cannot read MFM or FM disks, unlike the 1571 (which is locked to MFM.)

 

There is not much hope using a modern computer without a floppy controller to write anything to a disk the TI can read.  A KryoFlux is capable of writing disk images, and you could use TIImageTool can help make the images if you want to make something custom.

So what you're saying is there would need to be some kind of hardware or software interface that would convert the files on the 1541 to a format the TI would use?

Link to comment
Share on other sites

14 minutes ago, donlafferty said:

So what you're saying is there would need to be some kind of hardware or software interface that would convert the files on the 1541 to a format the TI would use?

Not exactly what I said, but if you want to infer such, then, yes.  There would need to be a piece of hardware, like the X1541 cable, which interfaces with the TI accompanied by software, like StarCommander or CBMXfer on the PC.  Outside of the X1541 cable, nothing like that exists.

 

I am not certain the 177x used in the TI controllers can be tricked into reading GCR, but you could try.  I read in the manuals for the MSD SD-1 and SD-2 that the drives have been modified to read GCR, but I found no notes indicating how.

 

Your idea involves a completely incompatible format on an incompatible drive system.  A mountain to climb, for sure, when there are other tools available.  While I have never worked with any such programs, I believe there is at least one which will read PC-formatted FM and MFM disks on the TI.  Someone else will have to comment on that.

 

If you have a serial port on your PC, and you have the requisite equipment on the TI, you could use TI HDX to transfer files from the PC to the TI, and vice-versa.

  • Like 2
Link to comment
Share on other sites

45 minutes ago, OLD CS1 said:

Little sense in doing so unless you want to copy Commodore files from the 1541 to the TI.  The 1541 is only capable of reading Commodore DOS GCR encoding, although it can read it in a lot of different ways.  It cannot read MFM or FM disks, unlike the 1571 (which is locked to MFM.)

 

1571 reads both GCR and MFM disks.

 

Jim

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Given your goal, I'd skip the 1541.  It's a poor choice.  As @OLD CS1 notes, KryoFlux is the better option.

 

But, if you can get a 360 kB 5.25" drive (Teac drives are the best, IMHO) or temporarily liberate your PEB drive from the PEB and connect to a PC that has a floppy disk controller, there are apps to allow you to read/write disk images on DOS/Windows:

 

 

 

IMGDISK might also work, but the thread above seems a better choice (and Kryoflux better yet, though it still requires a 360kB drive).

 

Connecting a 1541 drive to the TI is probably best done via an arduino that connects to the TI via RS232, an DIN6 attached to the Arduino (for the 1541), custom Arduino firmware to talk the special IEC protocol that the 1541 uses, and a special app on the TI that worked with the firmware to read/write sectors and such from the drive.  In other words, lots of work and by far the least useful option. 

 

A true compatible solution would be a side cart or PEB slot that has a DSR, a CPLD, a microcontroller, the DIN6 port.  Then, you would have to decide on two options:

 

1) treat the 1541 like a raw sector device.  The cart/slot would map raw sector access requests and writes to direct sector access requests on the 1541 using the U1/U2 commands.  Pros (as it were): very little mapping.  Cons (besides the HW work): nothing else really can read/write the disk, as it'd be a TI format on CBM disk. 

2) a lot of code to map the direct sector access the TI needs into the abstracted file-based format the 1541 uses.  My brain hurts just thinking about how to do that mapping.  Pros: CBM machines could read/write the files (not sure how useful that it, but...)  Cons: even more code to debug, mapping will have issues, since the two technologies were much different.

 

Jim

 

 

 

 

  • Like 3
Link to comment
Share on other sites

I'm not sure if I mentioned this but I'm an electronics engineer. That doesn't mean that I can automatically build new hardware for this but I do understand the ins and outs of electronic devices. I've had quite a bit of experience with Raspberry Pi's.

 

I worked on military satellites for the 22 years I was at Hughes and various high level antennas after that.

 

So a challenge doesn't scare me but I also understand you guys saying it's hard, does make me rethink my original thoughts.

 

Don

  • Like 2
Link to comment
Share on other sites

2 hours ago, brain said:

1571 reads both GCR and MFM disks.

Right.  What I am not sure of is if the 177x can tricked into read GCR.  I am pretty certain the 1571 has a separate circuit apart from the 177x for reading GCR (have not looked seriously at 1571 internals in a long time.)

 

I also grumble that Commodore locked the 1770/1772 in the 1571 to MFM rather than allowing for FM, as well, for a wider swath of compatibility.  I was also going to throw a tantrum over the 1581 only being DD, but then I looked up and saw that the 1581 and HD floppies were introduced in the same year.

 

2 hours ago, brain said:

A true compatible solution would be a side cart or PEB slot that has a DSR, a CPLD, a microcontroller, the DIN6 port.  Then, you would have to decide on two options:

A lot of work to do sector access.  Why not just talk to it in CBM DOS over the IEC?

 

2 hours ago, brain said:

My brain hurts just thinking about how to do that mapping.

Way, way too much work for a minimal return.

Link to comment
Share on other sites

1 hour ago, OLD CS1 said:

Right.  What I am not sure of is if the 177x can tricked into read GCR.  I am pretty certain the 1571 has a separate circuit apart from the 177x for reading GCR (have not looked seriously at 1571 internals in a long time.)

Ah, OK.  Yeah the MFM controller cannot read GCR.

1 hour ago, OLD CS1 said:

I also grumble that Commodore locked the 1770/1772 in the 1571 to MFM rather than allowing for FM, as well, for a wider swath of compatibility.  I was also going to throw a tantrum over the 1581 only being DD, but then I looked up and saw that the 1581 and HD floppies were introduced in the same year.

🙂

 

1 hour ago, OLD CS1 said:

 

A lot of work to do sector access.  Why not just talk to it in CBM DOS over the IEC?

Sector access on the 1541 is pretty easy using DOS.  Just open a buffer, and then perform a U1 command to dump the required sector to the buffer, and then read it in.  Write is done similar.  write to a buffer, and then ask the DOS to write that buffer to a sector on the disk via U2.

 

But, yes, the arduino solution could just do a high level DIR, open, load, save, etc.  Since the TI app would be custom anyway, nothing is gained by doing sector access

 

However, if you want to use the 1541 as a normal TI drive in regular apps, without the custom TI app (i.e. copying a file from 1 TI drive to the 1541 using a TI copying app), sector access would be far easier, since those apps (and the TI KERNEL) expects a dumb drive on the other end.

 

Jim

 

Link to comment
Share on other sites

1541 = serial interface

ti-99/4a = shugart interface on the disk controller card or sidecar device (either required) 

 

you could theoretically connect to a serial card.. if you had one.. either expansion box card or the sidecar.. but then how would you talk to the 1541?  you'd have to write all your own software to speak the 'language' of the 1541 and communicate over the serial interface.  And as others point out, you couldn't read any existing TI disk with it.. you'd have to write your own disks and some how translate from ti's file system standards to the 1541's

 

 

Link to comment
Share on other sites

2 hours ago, donlafferty said:

I'm not sure if I mentioned this but I'm an electronics engineer. That doesn't mean that I can automatically build new hardware for this but I do understand the ins and outs of electronic devices. I've had quite a bit of experience with Raspberry Pi's.

I don't mean to call your expertise into question.  Electrically, it's not too difficult to interface the 1541 (IEC bus is 3 lines, 5V open collector).  I don't know much about DSRs, but if the DSR functionality is flexible enough, you could write the 9900 code to convert raw sector requests into sector request commands for the 1541.  So, that would remove the need for an intermediate microcontroller.  Still, the resulting disks would be 180kB GCR encoded TI format disks. And, the DSR would potentially be different enough from the normal drive DSR that some apps would not work right.  There'd be bragging rights, but it would be FAR slower than the normal PEB drive. 

 

Due to lack of communication between the VIC-20 design team and the MOS Technology 6522 VIA production team, a bug inside the hardware shift register in the 6522 was not communicated into too far into the VIC-20 design cycle.  A decision was made to fix the issue in software, so the 250kbs hardware transfer speed (25kB/second) was handled in software, where each bit took 40uS to transmit, limiting the VIC-20 to a top speed of 2.5kB/second.  The companion drive was called the 1540.  When the C64 was introduced, the cycle stealing aspect of the VIC-II display IC required slowing the drive down further, meaning reads from the drive were reduced to 120nS per bit (~900B/second).  Though the C64 had a new VIA replacement called the CIA that removed the shift register bug, Commodore decided not to redo the VIC-20 drive and continue on with the software transfer routines.  Since the 1540 transfer routines were too fast for the C64, the DOS ROM was modified to increase the delay per bit to 120nS and the drive was remarketed as the 1541. 

 

I don't know the speed of the PEB TI disk drive, but I imagine it's far faster than 900B/s.

 

Yes, you can increase the speed of the 1541 drive to ~15kB/s using replacement DOS routines like JiffyDOS, but those require very precise computer timing to utilize (6-8uS for 2 bits).

 

Jim

  • Like 1
Link to comment
Share on other sites

In college I built my own computer on a Z80 chip. Everyone else used software routines to de-bounce the keyboard. I found the Intel 8279 chip which handled the keyboard and 7 segment displays. Made it so much easier I was able to concentrate on the OS.

 

So I have the basics of the knowledge but reading all these entries I have been convinced my idea would be Herculean and my main goal is to be able to move files between a PC and the TI. I'm sure there are ways to do it that are relatively easy. I found the XUM1541 device which turns the 1541 into a USB device and then you can use a PC.

 

I'm sure you folks have lots of knowledge on how to get files between a PC and TI but without a TI disk drive I suspect it's harder.

Link to comment
Share on other sites

54 minutes ago, donlafferty said:

I'm sure you folks have lots of knowledge on how to get files between a PC and TI but without a TI disk drive I suspect it's harder.

TI HDX, TI RS-232 card or compatible port (like on a nanoPEB or CF7+, not easy to find new these days.)  Or a TIPI.  The least amount of fuss will likely be the TIPI.

  • Like 2
Link to comment
Share on other sites

I can speak on the Kryoflux gear. It's a very capable device for retrieving old floppies. I've read a few hundred floppies with a TEAC 55B drive. 
 

With the Kryoflux you can save the raw flux to a file, and restore that to another floppy: it's a bit copier.
 

Or you can ask for the raw tracks to be decoded from FM, MFM, (or other) and you'll get a file of the sectors in linear order, which I call a disk image.  That file is ready to use with emulators.
 

(Assuming you told it the right track order!)
 

Kryoflux doesn't provide software to go the other way: putting a disk  image back into the raw format. Or editing a few  sectors of the raw file. So it's not a file transfer tool. It's  a preservation  tool. 
 

Nothing preventing anyone  from writing that software--it's just bits. 
 

Gotek floppy emulator is the tool you want if you have disk images. 
 

Link to comment
Share on other sites

PC Transfer: Mike Dodd (or Peter Hoddie?) wrote this tool to read TI floppies on a PC with floppy drive. I never tried it for writing to floppies. 
 

It required a 40-track floppy drive and media, no HD drives. 

 

Got the original package here.. but no PC with floppy drive. 
 

TI99PC is another one. 
 

  • Like 1
Link to comment
Share on other sites

I use (and have for years) PC-TRANSFER to move files from a PC to a TI. I use a USB 720/1.44 3.5" drive that I format on the PC to 720 sectors with a small program. Copy the files to it and stuff it into my TI with a DSDD BWG controller (it will also work with a CorComp), select the appropriate conversion file, and go from there. BTW, the 720K maximum is not documented in the PC-TRANSFER docs.

 

My TI drives are 3.5" drives as well. 

Edited by atrax27407
  • Like 2
Link to comment
Share on other sites

1 hour ago, donlafferty said:

Would a USB floppy work or does it need one of the old ones attached with a ribbon cable?

I'd expect this requires access to the floppy controller chip. The USB floppies may be too high level. I'll attach the source code.

 

However, see https://www.phoronix.com/news/Linux-Disable-FDRAWCMD

 

floppyti.zip

  • Like 1
Link to comment
Share on other sites

26 minutes ago, atrax27407 said:

>The ones that I use on my PC are Dell-badged TEAC FD 05PUB 720/1.44 drives. There are multiple such drives on eBay for $10-$20 plus or without shipping. That is where I got mine.

Coincidentally enough, I gutted one of those to mount into my desktop.  I never thought to play with it in this way.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...