USIfAC II:Convert a PC or USB stick to Amstrad HDD,access dsk's,and many more!

Started by ikonsgr, 08:17, 01 December 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ikonsgr


eto

Quote from: ikonsgr on 21:26, 14 January 24@eto, can you try this firmware too?
newer board: no change

older board: definitely a change but a bit weird:

  • sometimes it behaves like the newer board
  • sometimes it is stuck in the boot loop
  • sometimes a few resets will make it boot but |USB twice is required

also I recognized that if I don't put a USB stick into the USB module, this procedure works:
  • remove USB stick
  • turn on computer, boot process stopsreset, boot process runs through and message USB is not available
  • put in USB stick, reset, normal boot process including USB being available

ikonsgr

@eto, ok, can you try this one too? I've increased the time to wait after initial resetting usb host module, which might give better results.

update,i made a mistake, this is the correct file  ;D

And i suppose, these 2 CPC464 where having problems with USIfAC and with all previous firmware revisions,right?

eto

tried again, and again sligfhtly different behavior:

1) turn on computer with USB drive connect
- first boot often works, message "USB device connected", CPC automatically resets
- CPC halts after boot message
- RESET will always end up with halting after boot message

2) turn on computer WITHOUT USB drive connected
- first boot often works, but sometimes 1 reset is required
- message "no USB device connected"
- insert USB drive
- after |USB the usb drive is available and can be accessed
- after a reset, it will always halts after the boot message, no difference if USB stick is inserted or not

ikonsgr

@eto, can you give me a screenshot of Amstrad upon boot freezing? Also is the freeze screen always the same, e.g. you get the same text (what ever this would be) on freezing boot screen?
 I think that the problem has to do with faulty (or maybe too slow) communication between specific usb sticks and the usb host module, that's why i need the screenshot to understand in which exact point this freeze happens, and possibly why.
In current code, i initially check response from usb host module using timers,and if i get a proper answer then i "remove" the timer (as it slows down communications quite a bit) and continue communication directly, meaning that after giving a command to usb host module, Amstrad will wait for a respond indefinitely, so if for some reason there is no respond from usb host module, it will freeze...

issalig

I have experienced problems in the past with MSXUSB that uses the same USB module. Problems only appeared with certain usb pens and I guess it was due to timings.

@eto, have you tried with different usb pens?

ikonsgr

Ok, i've made rather extensive modifications in usb host module initialization code, so now, Amstrad should not freeze at all.
So, @eto and all others having freezing boot problems, please try this firmware and give us feedback!

eto

Quote from: ikonsgr on 11:35, 15 January 24can you give me a screenshot of Amstrad upon boot freezing? Also is the freeze screen always the same, e.g. you get the same text (what ever this would be) on freezing boot screen?
I made two short videos to show the full process.

Here's thetypical boot process, when a USB stick is inserted:

https://www.dropbox.com/scl/fi/8udk88717ge49j548kd7b/boot_with_USBstick.MOV?rlkey=vemsf7ycom18axw9bkpatxwcw&dl=0



This is the boot process, when there is no stick inserted. If insert it, after the successful boot process I can access the stick.

https://www.dropbox.com/scl/fi/8udk88717ge49j548kd7b/boot_with_USBstick.MOV?rlkey=vemsf7ycom18axw9bkpatxwcw&dl=0


Quote from: ikonsgr on 11:35, 15 January 24I think that the problem has to do with faulty (or maybe too slow) communication between specific usb sticks and the usb host module,

I tried 3 different USB sticks from 3 different vendors (Kingston, Sandisk, Intenso), absolutely no difference. I also tested their performance and with USB2.0 which is somewhere between 15 and 20MB/s (Intenso 15, Sandisk 20).

EDIT: test was still with the previous 7c firmware. The one from 10 minutes ago was not tested yet. Will do in a few minutes....

eto

Quote from: ikonsgr on 14:08, 15 January 24So, eto and all others having freezing boot problems, please try this firmware and give us feedback!
We're getting closer...

With the more recent board revision it behaves like this:


However with the older board revision, the CPC always hangs.
Video: https://www.dropbox.com/scl/fi/znh4zaenzpk28yuzjumqu/IMG_4548.MOV?rlkey=tk8aryb743tuy7ocgnc5uk2rm&dl=0



jesusdelmas


ikonsgr

@eto, ok did you also try to disable "auto usb" (give:OUT &FBD1,93 you can then give:OUT &FBD1,92 to reactivate it) and see what happens?
If Amstrad still hangs up, then most certainly the freezing is not caused by the usb host module initialization code...  ::)
Also, could you execute the small program below, and tell me what number you get for each of your USIfAC II board (older and newer):

10 OUT &FBD0,&57:OUT &FBD0,&AB:OUT &FBD0,1
20 IF INP(&FBD1)=255 THEN PRINT INP(&FBD0) ELSE 20
30 GOTO 10

This should give you the firmware revision of the usb host module CH376 chip. Numbers of less than 67 (mostly 66) tend to have more compatibility issues with usb sticks, and it's better  to use small usb sticks or format with FAT16 for maximum stability. For the last ~2 years,i test each module before mounting it, and if it has such older fw (e.g. 66 or less), i don't use it with the board.
But for early USIfAC boards that sold the 1st year (~until mid-late 2021) you might got a board with such an older module.
(Btw, for the first months of selling USIfAC boards, i didn't know there was an issue with CH376 module fw version, i thought that all modules had the same fw, but after i got some reports, i looked it up a bit,found there was a command that gives you the fw version, and from then, i started to check them)

eto

Quote from: ikonsgr on 18:28, 15 January 24ok did you also try to disable "auto usb" (give:OUT &FBD1,93 you can then give:OUT &FBD1,92 to reactivate it) and see what happens?
no, I haven't tried that before. I just did and there is no change.

However, in very rare cases, the CPC boots. From about 20 RESETs one finally succeeded.

Quote from: ikonsgr on 18:28, 15 January 24Also, could you execute the small program below,
there is no output at all


ikonsgr

@eto, ok add this line to the program:
15 FOR I=0 TO 100:NEXT I

This should make it work.

Now,i've made more modifications to the usb initialize code, can you try this and give me the results? 

eto

Quote from: ikonsgr on 20:06, 15 January 24@eto, ok add this line to the program:
15 FOR I=0 TO 100:NEXT I

This should make it work.

Now,i've made more modifications to the usb initialize code, can you try this and give me the results? 

With the previous version, the for/next had no effect, but with this version, it now shows 66.

Behavior changed again (and I have the gut feeling we get closer...):

1) if auto usb is active, the CPC boots, then resets and freezes after the boot message. Further resets do not change this
2) if auto usb is not active, the CPC boots. Then I can enter |USB and can access the USB drive. If I do a reset, I am stuck again and the CPC freezes during boot. Reset has no effect, I have to turn it off.

UPDATE: also no change if the Stick is FAT16 formatted

Update 2: The behavior with the newer board is different. It boots, resets, then halts. But then, if I press reset, it boots properly and I can access the USB drive. Also further RESETS properly work.


ikonsgr

Quote from: eto on 21:47, 15 January 24With the previous version, the for/next had no effect, but with this version, it now shows 66.

Behavior changed again (and I have the gut feeling we get closer...):

1) if auto usb is active, the CPC boots, then resets and freezes after the boot message. Further resets do not change this
2) if auto usb is not active, the CPC boots. Then I can enter |USB and can access the USB drive. If I do a reset, I am stuck again and the CPC freezes during boot. Reset has no effect, I have to turn it off.

UPDATE: also no change if the Stick is FAT16 formatted

Update 2: The behavior with the newer board is different. It boots, resets, then halts. But then, if I press reset, it boots properly and I can access the USB drive. Also further RESETS properly work.


hmmm,so i suppose you confirm that the best behavior you got so far, is with the latest fw right? The newer board only needs one reset to work and the older works if you disable "auto usb", if i got it right.
Also, '66' means that your USIfAC has the older fw for the usb host module which might play a part to the hanging problem. Btw, does both of USIfAC boards has same '66' version of usb module?
And Perhaps @d_kef can give a try this fw with his "sticky" CPC 464 too?

eto

Quote from: ikonsgr on 23:23, 15 January 24hmmm,so i suppose you confirm that the best behavior you got so far, is with the latest fw right?
yes

Quote from: ikonsgr on 23:23, 15 January 24The newer board only needs one reset to work and the older works if you disable "auto usb", if i got it right.
yes

Quote from: ikonsgr on 23:23, 15 January 24Btw, does both of USIfAC boards has same '66' version of usb module?
it has also 66


do you have a proper source where I can get the 67 version? This USB module seems to be available from China only and I would like to avoid to order a module with old firmware. I need to replace one module (of a third usifac) anyway as the USB module seems to be dead on this one. And then I can just order 3.

ikonsgr

@eto, first MANY, MANY thanks for your help and support to improve USIfAC, especially with such difficult tech problems like this.
Now i can send you as many modules as you want, guarantee with newer firmwares too ;)
Just give me a note to ikonsgr745@hotmail.com to arrange it.

ikonsgr

Ok,i think this time we might got it. @eto , @d_kef  and anyone else having boot problems with CPC464, try this firmware


eto

Quote from: ikonsgr on 11:20, 16 January 24Ok,i think this time we might got it. @eto , @d_kef  and anyone else having boot problems with CPC464, try this firmware
Unfortunately there is no change compared to the previous version.

ikonsgr

Quote from: eto on 22:06, 16 January 24Unfortunately there is no change compared to the previous version.
is it possible to make a small video of the booting process again? i want to see the exact point of freezing and what exactly is written in screen. with previous fw the freeze should be done after `BASIC 1.0` is typed on screen, now it should freeze before that, is that correct?

ikonsgr

Quote from: d_kef on 20:17, 16 January 24Just tested it.
Sorry... no changes in the  behavior.
d_kef
can you remind me what exactly was that behavior? is at least the board usable, even if it needs a reset or two? also did you try to disable `auto usb` function (OUT &FBD1,93) and see if that helps?

eto


eto

Quote from: ikonsgr on 22:42, 16 January 24can you remind me what exactly was that behavior? is at least the board usable, even if it needs a reset or two? also did you try to disable `auto usb` function (OUT &FBD1,93) and see if that helps?

Auto USB on:

in short: CPC boots, USIFAC message is shown, CPC automatically resets, boots until "Locomotive Software ltd" is drawn - then freezes (before Basic 1.0 message)

video (auto USB on):
https://www.dropbox.com/scl/fi/3iqy2dp62z98dnh64f8ap/IMG_4555.MOV?rlkey=puqr37nhzyll6cf0w5xtp7w3h&dl=0
 
Auto USB off:
CPC boots, Usifac message is shown, I can access BASIC. Once I type |USB the USB stick content can be access. But as soon as I reset, I am stuck in the same loop as above.

video (auto USB off):
https://www.dropbox.com/scl/fi/iwo5ag2gjzmk042cfp66t/IMG_4557.MOV?rlkey=fms63gv1ey8ca27n4nodmomnx&dl=0

Quote from: ikonsgr on 22:38, 16 January 24with previous fw the freeze should be done after `BASIC 1.0` is typed on screen, now it should freeze before that, is that correct?

 no. it always was freezing before the BASIC 1.0 is drawn on screen.

Brocky

im seeing exactly the same as eto...

apart from one difference with my setup.. (with auto usb off)...
i type |usb and the stick is activated...
but if i type CAT ..like in eto's 2nd vid, then i lock up....
if i use |CAT it works as intended

Powered by SMFPacks Menu Editor Mod