FDC "not ready"

If you want to ask questions about how the machine works, peculiar details, the differences between models, here it is !
How to program the oric hardware (VIA, FDC, ...) is also welcome.
Post Reply
User avatar
Symoon
Archivist
Posts: 1169
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

FDC "not ready"

Post by Symoon » Sat Jul 27, 2013 8:28 am

Hi there.
If I understand correctly, there's a status bit sent by the FDC (once it executed a command I guess), one of them being "not ready".
Does anyone know when this bit is set? Especially, would it be set if the drive is not plugged, or does require it being there (ie being asked its status, and not replying, or replying busy).
Tried to read the FDC reference but I'm really not used to this, and the definition of this status bit seems unclear to me:
"b7 - Not ready - This bit when set indicates the drive is not ready. When reset it indicates the drive is ready. This bit is an inverted copy of the Ready input and logically ORed with MR."

I'm just trying to find a way to know if a drive (A, B, C or D) is plugged or not without crashing the system - hoping this could be a way to do so!

User avatar
Symoon
Archivist
Posts: 1169
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: FDC "not ready"

Post by Symoon » Sat Jul 27, 2013 1:38 pm

Like a barbarian, I patched the Sedoric kernel of a disk to check.
This code is supposed to display the status line in green when the FDC performed a command without saying he's busy, and in red when the busy status is read.

Code: Select all

D0BA A8        TAY
D0BB 20 E5 E6  JSR E6E5
D0BE EA EA EA EA

E6E5 A2 11     LDX #11 default value: no drive
E6E7 29 80     AND #80 test if "not ready" status is set
E6E9 30 01     BMI +1 goes in E6EC if bit 7 = 1 (negative sign), so no drive?
E6EB E8        INX X=X+1 (color goes from red to green)
E6EC 8E 80 BB  STX #BB80 displays color
E6EF 98        TYA
E6F0 60        RTS
When I perform a read track command, I got a green line when a disk is present. When it's not, or when I ask reading a drive which doesn't exist, the Oric goes in an endless loop, and no color is displayed. The status byte seems set to 0.

So I guess the system really doesn't work with this status. That doesn't explain for sure if/how/when the "not ready" status bit is set, so we could (maybe) use it... Maybe the Microdisc ROM manages it? It detects when a system disk is inserted...

Godzil
Squad Leader
Posts: 756
Joined: Sat May 21, 2011 7:21 pm
Location: Between UK and France
Contact:

Re: FDC "not ready"

Post by Godzil » Sat Jul 27, 2013 4:15 pm

Maybe the problem come from INTs, did you desactivate them?

User avatar
Symoon
Archivist
Posts: 1169
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: FDC "not ready"

Post by Symoon » Sat Jul 27, 2013 4:54 pm

Hi Godzil, INT is for Interrupts? I didn't deactivate them, the code I changed is in a routine called "IRQ handler" so I supppose they are useful - although each time I hear of interrupts, I have to spend 2 hours understanding again how it works ;)
Actually the Oric loops endlessly waiting for a byte to be read. I'm not sure this IRQ Handler is called in such a loop, and I even have no idea if anybody (Microdisc ROM, FDC...) sets this "not ready" status byte...
I suppose that if the FDC said "not ready", it would produce a interrupt, then the IRQ handler I changed would analyse it and display red. Would that mean for sure the FDC never says "not ready" when reading an empty drive, or reading without even a drive?

User avatar
Symoon
Archivist
Posts: 1169
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: FDC "not ready"

Post by Symoon » Sun Jul 28, 2013 9:37 am

Ok, I must be blind: Euphoric displays the FDC status right in the middle of the monitor screen!
So, when trying to read a track on an unplugged drive, the status is "busy", and that's it. It doesn't say "not ready".
So it can't be used (unless Euphoric didn't emulate perfectly this apparently useless part).

Godzil
Squad Leader
Posts: 756
Joined: Sat May 21, 2011 7:21 pm
Location: Between UK and France
Contact:

Re: FDC "not ready"

Post by Godzil » Sun Jul 28, 2013 7:42 pm

In fact, the Microdisk board is not connected to the "READY" signal from the floppy drive. That's why I was searching for how the MD ROM can tell "no drive in" with a HxC with a loaded floppy at boot time.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests