XROAR and DOS

A place to discuss everything Dragon related that doesn't fall into the other categories.
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

XROAR and DOS

Post by pser1 »

Hi Ciaran,
At this moment I am working with a program that has been made compatible with
DDOS11C, DDOS12A, DDOS13A, Eurohard4.1, DPlus5.0
But now I see that on the emulator (XRoar), it is not detected the non presence
of a disk into a drive.
I have loaded ONLY one disk into drive1 and asked for the free space in drives 1,2,3
This is the XROAR result:
WRONG FREE DATA.jpg
WRONG FREE DATA.jpg (17.91 KiB) Viewed 3211 times
The result on the real Dragon is this one:

Code: Select all

?FREE 1
 114176
OK
?FREE 2

?SK ERROR
OK
?FREE 3

?SK ERROR
OK
Is there any way to guarantee the right result on XRoar?

Thanks in advance
pere
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XROAR and DOS

Post by sixxie »

Seems to vary. Sometimes you get an error (I'm tending to get ?IV ERROR), but keep trying and eventually all the non-present disks get reported with the cached value. Given it can take a few goes, have you tested this exhaustively on real hardware and never got a bad result?

Edit: Hmm maybe it's the lack of seek error actually - I see it falls through to reading sector, where it'll get no data, and the previously read sector will therefore still be in that buffer...

Further edit: I see the problem. DragonDOS schematic ties "READY" high, so read sector should always begin, but then the constant "index hole" of no-disk should cause a seek error. Out of interest, how quickly is the error reported? Timeout is supposed to be 5 index pulses, but of course there's no rising edge if there's no disk, so I wonder how long it takes without them.
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XROAR and DOS

Post by pser1 »

Hi Ciaran,
first of all, while debugging SAVE to a drive without disk, it shows NO error
in any moment, so it ends saying OK, fooling the user!
Well, sometimes it catches an error and gives a reasonable message, but
most of the times it fails.

I have burned some DOS in my CoCo-SDC flash ram:
DDOS11C, DDOS13A, DosPlus50. To test DOS4.1 I work right with Lafumat controller
The Dragon Data and the Eurohard ones do detect and report NOT DISK present (in my Hobbit program)
on the real hardware (all the tests I have done so far).
But DosPlus50 catches an error but returns it to the Basic: RF Error (it has not found, what?)
Well I hope I could catch this error substituting the call to a subroutine by its code untill the point
it arises.
But I cannot debug it on XRoar because it always finds everything alright despite no mounted disc!
Hope to be able to trace on the source ...

cheers
pere
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XROAR and DOS

Post by pser1 »

Hi Ciaran,
life is funny!
I have found a way to control DosPlus5.0 in XRoar.
In fact I have found that routine $c808 (get_opt_drive) returns in register B
the drive number, but despite I want to save to drive three, it ALWAYS returns
drive number one. As I save in a variable the drive number requested by the
user, then I force that value into register B and that way errors are reported
to the program (not sent to basic), great!
I can intercept disk full and no disk, both!
Tomorrow I will make more tests on the real hardware, where it failed too.

I will try to trace the Dragon Data DOSes that don't fail in real hardware
but give surprises on XRoar.

cheers
pere
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XROAR and DOS

Post by pser1 »

hello Ciaran,
not so easy.
What I had said about DosPlus5.0 is true unless you first save a file
onto an existing disc and immediately you try it again on a non existing disc.
In this 'bad' case, it returns to Basic with some errors in series.
The same affects all the other DOS versions.

Fortunately on real floppies DDOS4.1 works flawlessly
And the four DOS work nicely too on my CoCo-SDC module.

So the problem stays at emulation level only :-(

cheers
pere
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XROAR and DOS

Post by sixxie »

I've been trying to reason through what's happening - my best guess is that when no disk is present, there's a "latching" of the index pulse signal (which will be permanently showing "open") that is cleared after some time, thus allowing it to count up to 5 "pulses" and time out with a seek error.

I think a test of this would be to issue a seek command with verify then constantly emit bit 1 of the status register. If the bit keeps changing even with no disk in the drive, something like that is happening.

Unfortunately all my kit's in the loft and I've no space to get it out yet :/
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XROAR and DOS

Post by sixxie »

Ok, fancy giving 2016-32341 a try?

Single substitution in each bit of DOS cart code - tied READY high on the FDC... Seems to do the right thing!
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XROAR and DOS

Post by pser1 »

sixxie wrote:Ok, fancy giving 2016-32341 a try?
Single substitution in each bit of DOS cart code - tied READY high on the FDC... Seems to do the right thing!
Thanks a lot for your work, Ciaran.
I have been out and have seen that mesage too late ...
Tomorrow (today) in the morning I will give this new version a try!

cheers
pere
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XROAR and DOS

Post by pser1 »

Hi Ciaran,
GREAT NEWS!
sorry, I have been making a few tests and forgot to tell you

Tested:
DDOS11C, DDOS13A, DDOS4.1, DosPlus5.0 and they all mimic, now, the real thing behaviour.
I mean when no disc in the drive it makes some retries and finally it returns the error to the caller,
so the program can show rightly the error message.
The only difference is that the real hardware waits for 30 seconds before showing the error.
XRoar shows it in just 10 seconds ;-)

Thanks a lot, one more time!
cheers
pere
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XROAR and DOS

Post by sixxie »

Good to hear it's better, though it raises more questions: I thought that timeout was a software thing, so being quicker under emulation sounds wrong ;)
Post Reply