Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
104 user(s) are online (81 user(s) are browsing Forums)

Members: 1
Guests: 103

Maijestro, more...

Headlines

 
  Register To Post  

Weird CW CrossDOS behaviour.. TD_MOTOR gives error -3?
Quite a regular
Quite a regular


See User information
Hi everybody,

Progress is being made on my Catweasel Mk4 driver for OS4... but one problem just won't go away.

When I write to a PC-formatted disk, it will often - but not always - send a TD_MOTOR command to my device. The device duly returns io_Error as 0 when it returns the iorequest. However, a dialogue box comes up saying there's a Disk Error (error = -3, device error). Sometimes this fails the write operation, sometimes it doesn't.

When I retry the error box, it resends the TD_MOTOR command (and only that comand) and repeats the error box until I Cancel it.

Anybody have any advice before I pull the last of my hair out? Thanks!

--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top
Re: Weird CW CrossDOS behaviour.. TD_MOTOR gives error -3?
Home away from home
Home away from home


See User information
@Spirantho

Keep on, you'll squash that aswell, just don't give up yet.

Maybe one of the trackdisk gurus will show up eventually?

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: Weird CW CrossDOS behaviour.. TD_MOTOR gives error -3?
Amigans Defender
Amigans Defender


See User information
@Spirantho

Are you setting io_Actual to the previous state of the motor?

Go to top
Re: Weird CW CrossDOS behaviour.. TD_MOTOR gives error -3?
Quite a regular
Quite a regular


See User information
@Chris

Yup.

The weird thing is that the motor command seems to work just fine.

Error -3, by the way, is "Command not supported by device", so I'm suspecting that CrossDOS is actually sending a Motor On command which is working, and then another command which my device doesn't support. What I don't understand though is why it's not coming out in my debug output.

My BeginIO is:

LONG libBeginIO(struct DeviceManagerInterface *selfstruct IORequest *ioreq
{
    
struct cw_driver    *driver    = (struct cw_driver *) self -> Data.LibBase;
    
struct IOExtTD    *diskreq    = (struct IOExtTD *) ioreq ;
    
struct cwDevUnit    *unit;
    
int                error;

    
write_txtdriver->debug_port"Received IORequest" );

    if (
unit  = (struct cwDevUnit *) ioreq -> io_Unit)
    {
/* Stuff gets done here */
    
}

    
write_txtdriver->debug_port"Done request.\n" );
    
    return 
0;
}


so any unsupported commands should still come up as a request. I have a debug output also saying "unsupported command" when that happens. But I'm getting nothing at all to suggest that another TD command is coming through.... except this -3 error which sometimes happens.

Gargh!

--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top
Re: Weird CW CrossDOS behaviour.. TD_MOTOR gives error -3?
Home away from home
Home away from home


See User information
@Spirantho

If you can write a version with enhanced debug output (console or serial) i could try to recreate that -3 error. It comes up pretty often here, i just need to remember how i in fact triggered it.

...i *think* it might have been after i formatted an Amiga DD to become a PC DD disk (not 100% sure though)

...if that helps, of course

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: Weird CW CrossDOS behaviour.. TD_MOTOR gives error -3?
Quite a regular
Quite a regular


See User information
Got it!

As I suspected, the problem was somewhere completely different to where it appeared to be.
The writing code had an defined variable for the length that was written, so it returned the wrong amount. CrossDOS - unlike AmigaDOS - checks that number and caches it so any amount of retrying made no difference as all the retry did was turn the motor on.

New version going up now - same place but called cw_aos4_20091101.lha.

--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top
Re: Weird CW CrossDOS behaviour.. TD_MOTOR gives error -3?
Home away from home
Home away from home


See User information
@Spirantho

Woot

Now for the polling...

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project