Jump to content


direct floppy access without using the DSR

5 replies to this topic

#1 insomnia OFFLINE  


    Star Raider

  • 90 posts
  • Location:Pittsburgh, PA

Posted Mon Apr 2, 2018 9:33 PM

So I'm trying to write a tiny operating system for the TI, and I'd like to avoid as much of TI's original design decisions as possible. This is mostly for the challenge of it and to see if whatever I can come up with is better then what the original engineers made. This would also let me make maximum use of the limited hardware resources.
My most basic problem is that I need to do my development on an emulator since my actual hardware is packed away at the moment. So my first question is if there are any Ti99/4a emulators which permit direct access to the FD1771 floppy controller. I'm pretty sure Classic99 does not do this, but I think MESS does.
I tried writing a really basic driver for the FD1771 and ran it in MESS. The problem I had there was that any attempt to read from the disk failed. I was able to get a lot of functions working properly, but when I tried to read a sector, I only got the first byte. After that I got "disk not ready" errors.


I've been using Thierry Nouspikel's code as a starting point, along with dumps of the floppy controller firmware and the FD1771 datasheet.


That's a bunch of text. Here's the short version:
1) Does anyone know of an emulator that emulates the floppy controller hardware?
2) Has anyone come across code which directly interfaces with the floppy controller, bypassing the DSR?



I've included the code I'm using under the spoiler tag.




#2 mizapf OFFLINE  


    River Patroller

  • 3,422 posts
  • Location:Germany

Posted Tue Apr 3, 2018 1:42 AM

If you're getting a Disk not ready, something in your code is not correct. The FD1771 emulation in MAME should be pretty reliable. You are using a sufficiently recent version, I assume?


Edit: This code (http://www.unige.ch/...el/ti99/dc2.txt) is executed in MAME, accessing the FD1771. You should get it working in the same way. If not, mail me a copy of your program and I can do some debug logging to see where it fails.

Edited by mizapf, Tue Apr 3, 2018 4:06 AM.

#3 apersson850 OFFLINE  



  • 522 posts

Posted Tue Apr 3, 2018 4:24 AM

I've done direct control of the floppy disk controller, when I made a program which could copy disk like Advanced diagnostics and Explorer from Miller's Graphics.

I've also done code which formats the disk with a different sector interlace, to make the p-system read the disks faster.


My code was written for the CorComp controller, in assembly language intended to be used as external procedures for Pascal.

#4 Tursi OFFLINE  



  • 5,353 posts
  • HarmlessLion
  • Location:BUR

Posted Tue Apr 3, 2018 2:10 PM

I was able to use MESS to directly read sectors as well, when I was testing ideas for the megademo loader. I actually copied the code from the TI DSR to do that test, so it probably works. ;)

I don't have any plans to add chip-level emulation of the disk controller to Classic99.

#5 acadiel OFFLINE  



  • 1,445 posts
  • www.hexbus.com
  • Location:USA

Posted Tue Apr 3, 2018 5:26 PM

Some of the MG Explorer source code I just uploaded has direct track access (he makes 1K sectors and has a read routine for those as well).


There were different routines depending on which disk controller you were talking to (different chips).


For example, a regular 9 sector track and a two 1K sector track (pics attached).  Kinda neat, talking directly to the controller, completely bypassing the DSR.





Attached Files

#6 insomnia OFFLINE  


    Star Raider

  • Topic Starter
  • 90 posts
  • Location:Pittsburgh, PA

Posted Tue Apr 3, 2018 7:28 PM

Thanks for the replies everyone.


From what I'm hearing, what I'm trying to do is possible, I just need to look harder for my bugs.


Well, I was looking for a challenge...

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users