Moderators: Mug UK, Zorro 2, Greenious, spiny, Moderator Team
Fujiyama wrote:There was some talk about USB up-/downstream a while back, and incompatibilities with certain USB hubs. Not sure about the details, but this was straightened out with later versions of the Unicorn which had some additional circuitry to resolve this, wasn't it?
czietz wrote:
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 ...
[...]
move.w #$48,-(sp) ; Malloc
[...]
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.
alanh wrote:If the Unicorn doesn't see the USB drive, then there's either something wrong with the USB flash drive or the Unicorn itself.
Have you tried another USB flash drive ? or even a USB mouse ? Just something USB ?
Just load USB.PRG and UNICORN.PRG and see if it scans anything on the bus to confirm that the Unicorn is working. If it does, then try a different USB flash drive.
czietz wrote:czietz wrote:
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 ...
[...]
move.w #$48,-(sp) ; Malloc
[...]
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 give a short update on this since I encountered the problem myself while working on some USB stuff for TOS. BigDOS (like Atari GEMDOS) is not reentrant, i.e. you are not allowed to call a GEMDOS function while already being in the middle of another GEMDOS call. BigDOS however takes a very drastic approach here: if it detects it is called from within another GEMDOS call, it will always return EINVFN (-32), regardless of the type of call.
The USB4TOS stack uses Malloc in some places, if one of these functions is called from within a GEMDOS call, it will fail as seen above when BigDOS is loaded. Imho BigDOS should at least return 0 (the only permissible error code) for Malloc, here; but it doesn't.
Fujiyama wrote:alanh wrote:If the Unicorn doesn't see the USB drive, then there's either something wrong with the USB flash drive or the Unicorn itself.
Have you tried another USB flash drive ? or even a USB mouse ? Just something USB ?
Just load USB.PRG and UNICORN.PRG and see if it scans anything on the bus to confirm that the Unicorn is working. If it does, then try a different USB flash drive.
Yes! Attaching a Logitech USB mouse works and shows up when booting.
If I also put MOUSE.PRG in the auto folder I can use the mouse as well. Seems like USB.PRG and UNICORN.PRG have to be run from the auto folder in that order, then have MOUSE.PRG (and I assume STORAGE.PRG as well, for the USB-flash drive) after those first two, correct? Like in this order:
USB.PRG
UNICORN.PRG
MOUSE.PRG
STORAGE.PRG
I noticed that if I disconnect the mouse, then reattach it then it won't work until I reboot the computer. Fair enough, but useful to know.
Another thing I noticed is that if I ran HDDRUTIL.PRG (HDdriver's configuration utility) with the USB mouse attached it locked up the computer. Maybe because it's not a read/write device as expected.
So... the USB flash drive I've plugged in should show up when booting, and without causing any significat delay before the TOS desktop appears?
It doesn't try to read the flash drive then (relying on a correctly formatted/partitioned device), but just "detects" what kind of USB device it is?
I'll see if I can find another USB flash drive to try out.
Users browsing this forum: No registered users and 3 guests