NEW USB Host Controller via ACSI

Troubles with your machine? Just want to speak about the latest improvements? This is the place!

Moderators: Mug UK, Zorro 2, Greenious, spiny, Moderator Team

alanh
Hardware Guru
Hardware Guru
Posts: 1375
Joined: Mon Jul 24, 2006 9:01 pm
Location: North Wales, UK

Re: NEW USB Host Controller via ACSI

Postby alanh » Tue Jan 03, 2017 10:42 pm

I'm not sure I've fixed anything. Try it with the motor on/floppy issue you are seeing as I don't see it. And let me know if it makes any change at all.
Falcon CT60, Falcon CT63 x2, TT x3, MegaST x2, MegaSTE x2, STFM x2, STE x2, STacy, STBook, (Dead) Hades 060, Milan 060, T40.

User avatar
Cogweasel
Captain Atari
Captain Atari
Posts: 193
Joined: Sun Jan 17, 2016 11:10 am
Contact:

Re: NEW USB Host Controller via ACSI

Postby Cogweasel » Wed Jan 04, 2017 11:24 am

alanh wrote:I'm not sure I've fixed anything. Try it with the motor on/floppy issue you are seeing as I don't see it. And let me know if it makes any change at all.


I have done a quick test now and it seems like the motor is spinning down as it should now. But still have the crashing; inserted a disk with a messed up FAT (I think at least) and when I tried to update the file window my ST resets. A retry/cancel window pops up for a brief moment and then reset... just as before.

alanh
Hardware Guru
Hardware Guru
Posts: 1375
Joined: Mon Jul 24, 2006 9:01 pm
Location: North Wales, UK

Re: NEW USB Host Controller via ACSI

Postby alanh » Wed Jan 04, 2017 11:40 am

O.k. the motor thing was what I was hoping to be fixed, so that's good.

I've not done anything to address the bad sector reset/crash as I'm not even sure it's the USB drivers at this stage.

I've committed the motor fix so it's in the latest drivers.
Falcon CT60, Falcon CT63 x2, TT x3, MegaST x2, MegaSTE x2, STFM x2, STE x2, STacy, STBook, (Dead) Hades 060, Milan 060, T40.

alanh
Hardware Guru
Hardware Guru
Posts: 1375
Joined: Mon Jul 24, 2006 9:01 pm
Location: North Wales, UK

Re: NEW USB Host Controller via ACSI

Postby alanh » Wed Jan 04, 2017 11:42 am

Cogweasel wrote:
alanh wrote:I'm not sure I've fixed anything. Try it with the motor on/floppy issue you are seeing as I don't see it. And let me know if it makes any change at all.


I have done a quick test now and it seems like the motor is spinning down as it should now. But still have the crashing; inserted a disk with a messed up FAT (I think at least) and when I tried to update the file window my ST resets. A retry/cancel window pops up for a brief moment and then reset... just as before.


If you're inserting a floppy, then try without BigDOS to remove that from the equation.
Falcon CT60, Falcon CT63 x2, TT x3, MegaST x2, MegaSTE x2, STFM x2, STE x2, STacy, STBook, (Dead) Hades 060, Milan 060, T40.

User avatar
Cogweasel
Captain Atari
Captain Atari
Posts: 193
Joined: Sun Jan 17, 2016 11:10 am
Contact:

Re: NEW USB Host Controller via ACSI

Postby Cogweasel » Wed Jan 04, 2017 12:03 pm

alanh wrote:If you're inserting a floppy, then try without BigDOS to remove that from the equation.


If I remove BigDOS; the error window pops up and the computer doesn't reset when I try and open the damaged disk. If I then click Cancel the ST bombs (2 bombs I think) and resets. If I click Retry it retries and the windows pops up again...

alanh
Hardware Guru
Hardware Guru
Posts: 1375
Joined: Mon Jul 24, 2006 9:01 pm
Location: North Wales, UK

Re: NEW USB Host Controller via ACSI

Postby alanh » Wed Jan 04, 2017 12:07 pm

And what happens with this disk and no USB drivers at all ? Does it still come up with 2 bombs on Cancel ?
Falcon CT60, Falcon CT63 x2, TT x3, MegaST x2, MegaSTE x2, STFM x2, STE x2, STacy, STBook, (Dead) Hades 060, Milan 060, T40.

User avatar
Cogweasel
Captain Atari
Captain Atari
Posts: 193
Joined: Sun Jan 17, 2016 11:10 am
Contact:

Re: NEW USB Host Controller via ACSI

Postby Cogweasel » Wed Jan 04, 2017 12:14 pm

alanh wrote:And what happens with this disk and no USB drivers at all ? Does it still come up with 2 bombs on Cancel ?


That works fine, in the sense that it doesn't reset the ST, but the disk is still not readable. Sorry if I previously might have forgotten to mention this...

alanh
Hardware Guru
Hardware Guru
Posts: 1375
Joined: Mon Jul 24, 2006 9:01 pm
Location: North Wales, UK

Re: NEW USB Host Controller via ACSI

Postby alanh » Wed Jan 04, 2017 12:17 pm

I suppose the last thing to try is disable STORAGE.PRG, and leave USB.PRG & UNICORN.PRG enabled. See if that has any bearing on the issue.
Falcon CT60, Falcon CT63 x2, TT x3, MegaST x2, MegaSTE x2, STFM x2, STE x2, STacy, STBook, (Dead) Hades 060, Milan 060, T40.

User avatar
Cogweasel
Captain Atari
Captain Atari
Posts: 193
Joined: Sun Jan 17, 2016 11:10 am
Contact:

Re: NEW USB Host Controller via ACSI

Postby Cogweasel » Wed Jan 04, 2017 12:23 pm

alanh wrote:I suppose the last thing to try is disable STORAGE.PRG, and leave USB.PRG & UNICORN.PRG enabled. See if that has any bearing on the issue.


No difference, the bad floppy-disk still resets the machine ..

alanh
Hardware Guru
Hardware Guru
Posts: 1375
Joined: Mon Jul 24, 2006 9:01 pm
Location: North Wales, UK

Re: NEW USB Host Controller via ACSI

Postby alanh » Wed Jan 04, 2017 12:45 pm

I think you mean 2 bombs on cancel, then reset ?
Falcon CT60, Falcon CT63 x2, TT x3, MegaST x2, MegaSTE x2, STFM x2, STE x2, STacy, STBook, (Dead) Hades 060, Milan 060, T40.

alanh
Hardware Guru
Hardware Guru
Posts: 1375
Joined: Mon Jul 24, 2006 9:01 pm
Location: North Wales, UK

Re: NEW USB Host Controller via ACSI

Postby alanh » Wed Jan 04, 2017 12:49 pm

Oh, you could try BigDOS on it's own too without any USB drivers just to see what it actually does do on it's own.
Falcon CT60, Falcon CT63 x2, TT x3, MegaST x2, MegaSTE x2, STFM x2, STE x2, STacy, STBook, (Dead) Hades 060, Milan 060, T40.

alanh
Hardware Guru
Hardware Guru
Posts: 1375
Joined: Mon Jul 24, 2006 9:01 pm
Location: North Wales, UK

Re: NEW USB Host Controller via ACSI

Postby alanh » Wed Jan 04, 2017 12:50 pm

And finally, with everything installed again, if you have no floppy in the drive and try to open it, does it do the same thing ?
Falcon CT60, Falcon CT63 x2, TT x3, MegaST x2, MegaSTE x2, STFM x2, STE x2, STacy, STBook, (Dead) Hades 060, Milan 060, T40.

User avatar
Cogweasel
Captain Atari
Captain Atari
Posts: 193
Joined: Sun Jan 17, 2016 11:10 am
Contact:

Re: NEW USB Host Controller via ACSI

Postby Cogweasel » Wed Jan 04, 2017 1:13 pm

alanh wrote:I think you mean 2 bombs on cancel, then reset ?


Well once I click Cancel two bombs pop up very briefly, its hard to see if there's two or three of them, then the ST resets.

alanh wrote:Oh, you could try BigDOS on it's own too without any USB drivers just to see what it actually does do on it's own.


Hmm... interesting. If I just run BigDOS and nothing else; open the bad disk, the error window pops up and then immediately the computer resets. Think I can see two bombs as well here. Also I noticed that the same thing happens if I try and write to a write protected disk.

alanh wrote:And finally, with everything installed again, if you have no floppy in the drive and try to open it, does it do the same thing ?


Same thing happens when there's no disk in the drive, it just takes a bit longer. Error window opens, immediate reset. Seems like any TOS error message relating to the drive will reset my ST. I am not sure what conclusion to draw from this :) ... feels like there could be something rotten with my ST. But as I said before, have no problems at all when BigDOS and Unicorn drivers aren't installed...

alanh
Hardware Guru
Hardware Guru
Posts: 1375
Joined: Mon Jul 24, 2006 9:01 pm
Location: North Wales, UK

Re: NEW USB Host Controller via ACSI

Postby alanh » Wed Jan 04, 2017 1:47 pm

O.k, I can't repro any of this on my STE with TOS 1.62 or TOS 2.06. So this is dropping off my list. Given the same happens without the USB drivers and just BigDOS there's obviously something else going on that isn't related to the USB code at all.
Falcon CT60, Falcon CT63 x2, TT x3, MegaST x2, MegaSTE x2, STFM x2, STE x2, STacy, STBook, (Dead) Hades 060, Milan 060, T40.

User avatar
Cogweasel
Captain Atari
Captain Atari
Posts: 193
Joined: Sun Jan 17, 2016 11:10 am
Contact:

Re: NEW USB Host Controller via ACSI

Postby Cogweasel » Wed Jan 04, 2017 1:57 pm

alanh wrote:O.k, I can't repro any of this on my STE with TOS 1.62 or TOS 2.06. So this is dropping off my list. Given the same happens without the USB drivers and just BigDOS there's obviously something else going on that isn't related to the USB code at all.


Yupp, sounds reasonable. If anyone else have any theories of what is going on here, let me know. Its not a huge issue, but if there's a hardware problem with my ST it would be nice to know...

czietz
Hardware Guru
Hardware Guru
Posts: 443
Joined: Tue May 24, 2016 6:47 pm

Re: NEW USB Host Controller via ACSI

Postby czietz » Wed Jan 04, 2017 8:43 pm

You could use a "post mortem" analyzer such as http://www.umich.edu/~archive/atari/Uti ... stmort.arc to learn more about the details of the crash/reset. If for example the crash always occurs at the same address this might point to the cause of it all.

User avatar
Cogweasel
Captain Atari
Captain Atari
Posts: 193
Joined: Sun Jan 17, 2016 11:10 am
Contact:

Re: NEW USB Host Controller via ACSI

Postby Cogweasel » Thu Jan 05, 2017 1:58 pm

czietz wrote:You could use a "post mortem" analyzer such as http://www.umich.edu/~archive/atari/Uti ... stmort.arc to learn more about the details of the crash/reset. If for example the crash always occurs at the same address this might point to the cause of it all.


Didn't know this existed, thanks for the link! Will give it a shot and see what info I get...

User avatar
Cogweasel
Captain Atari
Captain Atari
Posts: 193
Joined: Sun Jan 17, 2016 11:10 am
Contact:

Re: NEW USB Host Controller via ACSI

Postby Cogweasel » Thu Jan 05, 2017 3:08 pm

Yupp, there was some info in the post mortem. Doesn't tell me much, but maybe someone else here knows what to make of it?

error 2.jpg
You do not have the required permissions to view the files attached to this post.

czietz
Hardware Guru
Hardware Guru
Posts: 443
Joined: Tue May 24, 2016 6:47 pm

Re: NEW USB Host Controller via ACSI

Postby czietz » Thu Jan 05, 2017 6:04 pm

So a bus error occurred because a program tried to write to address 0xFFFFFFE0. This program was executing code from RAM from address 0xC1FE. It's impossible to tell with certainty what was in your STE's RAM solely from the screenshot.

But we can try to make some assumptions and lucky guesses, because debugging is an exercise in optimism.
0xC1FE is a rather low RAM address, so I assume the code is on one of the programs started from the AUTO folder. I also assume that this crash happened while you were running the Unicorn drivers. Is this correct?

Fortunately, the offending instruction is 0x1686 or MOVE.B D6,(A3), a rare instruction that occurs only once in the Unicorn drivers, more precisely in USB.PRG. So I guess this is the location of the crash.

At this location we have ...
moveq #8,d0
move.l d0,-(sp)
move.w #$48,-(sp) ; Malloc
trap #1
addq.l #6,sp
movea.l d0,a3
tst.l d0
beq.w loc_1306
move.b d6,(a3)

Note that this is consistent with D0 == A3 and with the negative "N" flag being set in the status register (as evident from your screenshot), which supports my assumptions.

However, it is not normal for the GEMDOS Malloc function (called in the code snippet) to return 0xFFFFFFE0 (-32 EINVFN, invalid function number) in D0. I can only think of a few reasons why this would happen:

1. The data structures of GEMDOS were trashed, either overwritten by a buggy program or due to faulty hardware. Did you check the RAM in your STE?
2. A buggy program hooked into the GEMDOS trap and returned a wrong result. Did you remove all programs (except the Unicorn drivers, of course) from the AUTO folder?
3. TOS itself is damaged somehow. Can you dump your TOS ROMs and verify them against an image from the Internet?

User avatar
Cogweasel
Captain Atari
Captain Atari
Posts: 193
Joined: Sun Jan 17, 2016 11:10 am
Contact:

Re: NEW USB Host Controller via ACSI

Postby Cogweasel » Thu Jan 05, 2017 6:43 pm

Thanks for your reply czietz! I can't say I fully understand everything you are saying. I am not that techsavy, I did some feeble attempts at 68K assembler coding a million years ago, but I was absolutely rubbish at it! :D So I focused on graphics instead, which was a million times more fun to me and I was way better at it. :lol:

czietz wrote:I also assume that this crash happened while you were running the Unicorn drivers. Is this correct?

Actually it happens with just BigDOS running without the Unicorn drivers as well; when there's a write error, no disc in the drive or if I try and write to a write protected floppy. Of course I haven't checked the post mortem for each of these situations so there might be differences in what exactly happens...

czietz wrote:However, it is not normal for the GEMDOS Malloc function (called in the code snippet) to return 0xFFFFFFE0 (-32 EINVFN, invalid function number) in D0. I can only think of a few reasons why this would happen:

What does Malloc do?

czietz wrote:1. The data structures of GEMDOS were trashed, either overwritten by a buggy program or due to faulty hardware. Did you check the RAM in your STE?

The thought has actually occurred to me, that there is something rotten with my RAM. But I have been running plenty of both games and demos that require 1MB and have had no problems so far. Are there any RAM testing programs out there maybe?

czietz wrote: 2. A buggy program hooked into the GEMDOS trap and returned a wrong result. Did you remove all programs (except the Unicorn drivers, of course) from the AUTO folder?

I have only JAR running apart from BigDOS.. and I think I need JAR to get the Unicorn drivers working.

czietz wrote:3. TOS itself is damaged somehow. Can you dump your TOS ROMs and verify them against an image from the Internet?

Nope, have no way of dumping my TOS ROMs.

czietz
Hardware Guru
Hardware Guru
Posts: 443
Joined: Tue May 24, 2016 6:47 pm

Re: NEW USB Host Controller via ACSI

Postby czietz » Thu Jan 05, 2017 7:05 pm

Cogweasel wrote:Actually it happens with just BigDOS running without the Unicorn drivers as well; when there's a write error, no disc in the drive or if I try and write to a write protected floppy. Of course I haven't checked the post mortem for each of these situations so there might be differences in what exactly happens...


Yes, I assume it would crash at a different address and instruction. Maybe also following a Malloc, though.

Cogweasel wrote:What does Malloc do?


Malloc is the GEMDOS call to allocate memory. I.e. if a program needs memory for example to buffer some data, it can ask GEMDOS for that memory using Malloc. Malloc is only allowed to fail when there is not enough free memory, but in that case it would return 0 in the D0 register and not 0xFFFFFFE0 or -32, which is the error code for invalid function number.

Cogweasel wrote:The thought has actually occurred to me, that there is something rotten with my RAM. But I have been running plenty of both games and demos that require 1MB and have had no problems so far. Are there any RAM testing programs out there maybe?


I have written one, YAART: See viewtopic.php?f=15&t=30110. Scroll down to find the latest version 0.2.0. Also in an STE you can try and swap the RAM modules and see if this makes a difference.

Cogweasel wrote:I have only JAR running apart from BigDOS.. and I think I need JAR to get the Unicorn drivers working.


I don't think JARxxx would hook into GEMDOS, anyway.

Cogweasel wrote:Nope, have no way of dumping my TOS ROMs.


There is software that you can run on your STE that will dump the ROM into a file: For example http://cd.textfiles.com/230/EMULATOR/AT ... S/DUMPROM/

User avatar
Cogweasel
Captain Atari
Captain Atari
Posts: 193
Joined: Sun Jan 17, 2016 11:10 am
Contact:

Re: NEW USB Host Controller via ACSI

Postby Cogweasel » Thu Jan 05, 2017 8:37 pm

czietz wrote:I have written one, YAART: See http://atari-forum.com/viewtopic.php?f=15&t=30110. Scroll down to find the latest version 0.2.0. Also in an STE you can try and swap the RAM modules and see if this makes a difference.

I have run 10 passes with no errors.

czietz wrote:There is software that you can run on your STE that will dump the ROM into a file: For example http://cd.textfiles.com/230/EMULATOR/AT ... S/DUMPROM/

I dumped my ROM and compared it (using Total Commanders compare tool) to a ROM file I downloaded, exactly the same content.

czietz
Hardware Guru
Hardware Guru
Posts: 443
Joined: Tue May 24, 2016 6:47 pm

Re: NEW USB Host Controller via ACSI

Postby czietz » Thu Jan 05, 2017 9:35 pm

Then I'm afraid I have no further idea how to debug this from afar. :-(

alanh
Hardware Guru
Hardware Guru
Posts: 1375
Joined: Mon Jul 24, 2006 9:01 pm
Location: North Wales, UK

Re: NEW USB Host Controller via ACSI

Postby alanh » Thu Jan 05, 2017 10:20 pm

I think running the post mortem with more than one run. i.e. just BigDOS and no USB/CJAR etc.
Falcon CT60, Falcon CT63 x2, TT x3, MegaST x2, MegaSTE x2, STFM x2, STE x2, STacy, STBook, (Dead) Hades 060, Milan 060, T40.

User avatar
Cogweasel
Captain Atari
Captain Atari
Posts: 193
Joined: Sun Jan 17, 2016 11:10 am
Contact:

Re: NEW USB Host Controller via ACSI

Postby Cogweasel » Fri Jan 06, 2017 11:26 am

czietz wrote:Then I'm afraid I have no further idea how to debug this from afar. :-(

No worries, its working well enough for me to transfer my old disks. Thanks for all the help!

alanh wrote:I think running the post mortem with more than one run. i.e. just BigDOS and no USB/CJAR etc.

Will probably have a look at that eventually. Would be interesting to figure out the problem, even though at the moment its working well enough. Will get back to you with some more info, when I get around to testing it a bit further. Thanks for all the help Alan!


Social Media

     

Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 2 guests