USIfAC II, technical problems & support [MERGED with Plus-related posts from original thread]

Started by ikonsgr, 17:23, 29 December 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ikonsgr

Quote from: d_kef on 19:44, 13 December 23The exact same configuration works flawlessly with my 6128.
Just |USB and CAT or RUN"xxx and the CPC freezes.

That's a new one,i never heard or encounter myself freezing of CPC after giving CAT or RUN  commands... ::) 
Well, the above statements, indicate that most probable USIfAC II board is functioning ok, but something REALLY weird is happening with your CPC464...
I also think that, your CPC464 (along with eto's CPC464's) must be the most "difficult" and weird cases ever reported ...
Say, did you try spraying with some holy water too?  :laugh:
When i will get the new batch of boards, i could send you one to test it.  Too bad that you don't have a ULIfAC board too, it could be very interesting to see if you would have the same problems with it too...  ::)

Brocky

thats really interesting... theres NO difference on my 464 with M4 connected or not... usifac works the same, either way.

the only lockups im having now (since replacing the USB Module) are with the auto usb and lock up on the 2nd boot.
CAT never works unless im using direct connection, i MUST use |CAT, or i get lockups...

Ikonsgr: is the 2nd boot actually needed, coz i can load up the usifac with auto disabled, it boots ONCE, then i give the |USB command and it works, no 2nd boot needed...
WHY does the auto function need a 2nd boot if USB can be enabled manually without a 2nd boot?..automating it shouldnt be requiring a 2nd boot.. (im still yet to try rev7a)


ikonsgr

Quote from: Brocky on 01:03, 14 December 23Ikonsgr: is the 2nd boot actually needed, coz i can load up the usifac with auto disabled, it boots ONCE, then i give the |USB command and it works, no 2nd boot needed...
WHY does the auto function need a 2nd boot if USB can be enabled manually without a 2nd boot?..automating it shouldnt be requiring a 2nd boot.. (im still yet to try rev7a)
Second boot on CPC464 is needed because there is no amsdos rom present, instead there must be an active amsdos emulation (in order to have access to files using CAT,LOAD,RUN,SAVEetc).
 The problem lies to the way Amstrad initializes roms. You see, when CPC 464 boots, rom initialization is done in reverse order, e.g. amsdos rom 7 should always init first. But, as USIfAC's rom is always assigned to a smaller number (deafult is rom 5), by the time it's initialized, there is no active Amsdos emulation. So, on initial boot of a CPC464, USIfAC's rom init code, activates the amsdos emulation (which is also performed by USIfAC), and reboots CPC to initialize it properly (this is not needed on CPC 664/6128 because Amsdos rom 7 is already initilaized BEFORE USifAC's init).  Then, on 2nd boot, if "auto usb" is active, it automatically perform the |USB command, so practically the only difference between "manually" and "auto usb" functions, is to avoid giving the |USB command  :) 

Brocky

Quote from: ikonsgr on 11:03, 14 December 23
Quote from: Brocky on 01:03, 14 December 23Ikonsgr: is the 2nd boot actually needed, coz i can load up the usifac with auto disabled, it boots ONCE, then i give the |USB command and it works, no 2nd boot needed...
WHY does the auto function need a 2nd boot if USB can be enabled manually without a 2nd boot?..automating it shouldnt be requiring a 2nd boot.. (im still yet to try rev7a)
Second boot on CPC464 is needed because there is no amsdos rom present, instead there must be an active amsdos emulation (in order to have access to files using CAT,LOAD,RUN,SAVEetc).
 The problem lies to the way Amstrad initializes roms. You see, when CPC 464 boots, rom initialization is done in reverse order, e.g. amsdos rom 7 should always init first. But, as USIfAC's rom is always assigned to a smaller number (deafult is rom 5), by the time it's initialized, there is no active Amsdos emulation. So, on initial boot of a CPC464, USIfAC's rom init code, activates the amsdos emulation (which is also performed by USIfAC), and reboots CPC to initialize it properly (this is not needed on CPC 664/6128 because Amsdos rom 7 is already initilaized BEFORE USifAC's init).  Then, on 2nd boot, if "auto usb" is active, it automatically perform the |USB command, so practically the only difference between "manually" and "auto usb" functions, is to avoid giving the |USB command  :) 

this is what im not understanding, enabling USB manually, DOES NOT require a 2nd boot, it just works without all that youve posted above...
eg, auto usb enabled: 2 boots, lockup on 2nd boot, aparently initializing the roms
auto usb disabled: 1 boot, enter |USB, and it works fine with |CAT,run, load, save etc (just cannot use CAT must use usifac |CAT like ive ALWAYS had to do with usb, direct connection works fine with normal CAT)

ok if what youre saying truely correct.. if its coz usifac rom slot too low, what if i load up rombooster (to give 32 rom slots) on M4 (remove the 6128 ROMs, keep onboard 6128 ROM).. then, force usifac to use a rom slot higher than 7, auto usb should work fine in theory...right?!

ikonsgr

Quote from: Brocky on 23:36, 14 December 23this is what im not understanding, enabling USB manually, DOES NOT require a 2nd boot, it just works without all that youve posted above...
eg, auto usb enabled: 2 boots, lockup on 2nd boot, aparently initializing the roms
auto usb disabled: 1 boot, enter |USB, and it works fine with |CAT,run, load, save etc (just cannot use CAT must use usifac |CAT like ive ALWAYS had to do with usb, direct connection works fine with normal CAT)
Well, actually you have 2 boots on all cases, it's just that the 1st reboot is usually done so quickly, that you don't get to see it :-)

Quote from: Brocky on 23:36, 14 December 23ok if what youre saying truely correct.. if its coz usifac rom slot too low, what if i load up rombooster (to give 32 rom slots) on M4 (remove the 6128 ROMs, keep onboard 6128 ROM).. then, force usifac to use a rom slot higher than 7, auto usb should work fine in theory...right?!
I don't think this will work, because on CPC464 bootable roms are from 0 to 7 only (on CPC6128 can be up to rom 15), so ROM 7 which is reserved for Amsdos, will always be the 1st to boot ,and probably they did it that way, because amsdos MUST bt the 1st to boot, as it does a lot of things upon rom initialization, primarily it alters jumpblocks and places extra codes and bytes in various ram positions too.


eto

would it be possible to have a 464 selector jumper on the board so Usifac knows that it needs to activate amsdos emulation? 

ikonsgr

Quote from: eto on 12:31, 15 December 23would it be possible to have a 464 selector jumper on the board so Usifac knows that it needs to activate amsdos emulation?
This is done automatically by checking a specific ram address (&0006), which is different on cpc 6128 and cpc 464 (128=cpc 464, 145=cpc6128)

ikonsgr

@d_kef i made some changes and update the 7a firmware, that might have better results with "sticky 464".
So if you want give it a try and tell us if it resolves the problem: https://www.dropbox.com/scl/fi/xob716tul3sbpjk40orkg/18f47q10_7a_.zip?rlkey=1o9acs1alj4f2i9vw1sfk0xf0&dl=0

d_kef

Quote from: ikonsgr on 10:39, 17 December 23@d_kef i made some changes and update the 7a firmware, that might have better results with "sticky 464".
So if you want give it a try and tell us if it resolves the problem: https://www.dropbox.com/scl/fi/xob716tul3sbpjk40orkg/18f47q10_7a_.zip?rlkey=1o9acs1alj4f2i9vw1sfk0xf0&dl=0
Just tried it but no joy!
Nothing changed. Sorry.

d_kef

ikonsgr

@d_kef, did you try to update firmware with a usb2serial cable instead of using PICKIT3 programmer? This freezing without any obvious reason, after giving simple commands (like CAT), might have to do with a flashing problem, either the programmer doesn't flash PIC correctly, or maybe the PIC chip itself might have a problem (although this would be a very rare possibility)...
 I mention this, because i had a few cases in the past, where such erratic freezing was resolved after re-flashing PIC using my PICKIT4 programmer or a serial cable.

p.s. I ordered a new batch of USIfAC II boards, with some design improvements (like using wider tracks, especially for Gnd, and 5V, and also some track "tuning"), when i will get them, i could send you one board to test it with your "super sticky 464" :)

d_kef

I only have a PICKIT3 clone at the moment. I'd never had much faith in it but it never failed to flash a PIC in the past.
My 6128 works fine with the USIFAC so I believe that neither the programmer nor the PIC is the problem.
I think it is probably a timing issue which would be very difficult to find unless you had a "sticky" 464 yourself to test.

d_kef

d_kef

Today I cleaned my 464's expansion contacts with IPA and also changed the power socket as I was observing interference in my screen when I was twisting the plug in the socket. I'm sure now that I have a steady voltage, measuring 4,96V on the ICs.
Unfortunately that didn't make any difference with the stickiness problem.
So I thought let's test my USIfAC with my Plus machine which had similar problems.
Guess what! It booted first time, all RSXs worked and I was able to run games from the USB. Pressing the reset button freezes the system after the Amstrad copyright message, so I have to power cycle the CPC but that's not a big problem.
So rev 7a definitely improved the compatibility.
Good job!!!

d_kef

Brocky

7a still locks up for me on 2nd boot, 'when USB stick is attached', otherwise i can plug in usb stick (or disable auto-usb) use |usb fine. but if i reboot after giving |usb, and usb stick is in, it will lockup. it locks up at the end of the amstrad text, before roms are loaded..

something other i noticed, with M4 card alongside in expander board, 'with 6128 roms loaded'  the 2nd boot goes into a boot loop instead of just locking up, as does reboot after giving |usb. eg i see usifac rom line, and roms loaded on m4 show on boot, but as it hits basic it reboots...  which is slighltly different than without 6128 roms loaded, where it just locks up..

im happy without auto usb tho..

ikonsgr

@d_kef,rev.7a improved compatibility with Amstrad plus too? That's great news! :)
With previous fw, you also had the hang up problem with PLUS?

Regulus

Hi,

I've also a problem with my 464 (plus) but with ULIFAC.
Latest firmware 3a installed

When i want CAT a DSK image, computer freeze with a the same glitch on screen

https://ibb.co/KDTsgTd


I type these commmands before :
|6128
|mg,"name.dsk"
|fdc
|cat
and....freeze -_-


Edit : hum perhaps |6128 is not compatible with 464 plus (only 464 classic) ?

GUNHED

I have some questions about the great USIfAC II please:

- How to read the directory of the USB stick
- How to read / write files from / to USB stick

- And if here is time: How to rename, delete files, create directories?

I would love to support the USB stick of USIfAC II with my software, but can't find specific docs about the USB stick access. Hope you can help me with this.  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

darkhalf

@Brocky where did you get the 7a firmware from? I'm using 6g at the moment (one with the USB auto mount). Would like to update and do some tests

Quote7a still locks up for me on 2nd boot, 'when USB stick is attached', otherwise i can plug in usb stick
I've had similar issues with mainly my 464's locking up (I had the tallkey version but now use the later version 464). Usually after trying |CAT or CAT or something it would lock up. I just gave up for now since that was a test version

So far I've noted better behaviour when AMSDOS is running (I have a plugin DDI3 interface here on the 464) but USIFAC did crash on |DIR

One of the main problems noted so far is power related. I've just tried this now, with the USIFAC II directly plugged into the 464, and it will not power up properly with the USB stick inserted. It needs to be on an externally powered MX4 board to function properly for starters

@ikonsgr one of the other problems which caused dramas with setting up bluetooth using 6g tonight is that the |SET command for serial is not keeping the baud rate. It keeps resetting to 9600 bps upon reset of the computer. Also if you run |TER and then close it (set the baud rate) and run |TER again, it locks up. So terminal doesn't like to be run twice in a row on this firmware version
CPC464/GT64, CPC464 Plus/CTM640, 2 x CPC6128/CTM644

ikonsgr

Quote from: darkhalf on 13:42, 03 January 24One of the main problems noted so far is power related. I've just tried this now, with the USIFAC II directly plugged into the 464, and it will not power up properly with the USB stick inserted. It needs to be on an externally powered MX4 board to function properly for starters
Hmmm, so perhaps the other problems you also have are power related too. Did you try to use an external modern 5V PSU instead of the ancient "build in monitor" power supply?

Quote from: darkhalf on 13:42, 03 January 24@ikonsgr one of the other problems which caused dramas with setting up bluetooth using 6g tonight is that the |SET command for serial is not keeping the baud rate. It keeps resetting to 9600 bps upon reset of the computer. Also if you run |TER and then close it (set the baud rate) and run |TER again, it locks up. So terminal doesn't like to be run twice in a row on this firmware version
Try to disable "auto usb" function (out &fbd1,93), that's why it "resets" to 9600bps, if you do that, then board will retain the selected UART speed with |SET command.

ikonsgr

Quote from: GUNHED on 14:32, 02 January 24I have some questions about the great USIfAC II please:

- How to read the directory of the USB stick
- How to read / write files from / to USB stick

- And if here is time: How to rename, delete files, create directories?

I would love to support the USB stick of USIfAC II with my software, but can't find specific docs about the USB stick access. Hope you can help me with this.  :) :) :)

Didn't you get my email about these? It's been ~2weeks i post it to you  ;)

ikonsgr

I just upload a new firmware (rev.7b), i made some modifications to the usb device initialization code (affects |USB and "auto usb). If your board works ok, you don't need to update, but if you have booting problems you can try and see if there is any change in behavior.

Btw,i tried an old 2GB usb stick,which after pressing reset seemed to hang up Amstrad, but it turned out that it needed several seconds for the specific usb to respond, so for anyone with this symptom (hang up after reset) it might be a good idea to try a different usb stick.

ikonsgr

@GUNHED and anyone else might be interested, here is the documentation that helped me to develop the communication code for CH376 USB Host module.
File "commands.txt"  contains the notes i took out of the other manuals (and from experience working with the module), which i think would be the most useful as it contains straight forward code for various functions (like reset usb module, open file, get directory etc)

ikonsgr

Quote from: Regulus on 18:55, 01 January 24Hi,
I've also a problem with my 464 (plus) but with ULIFAC.
Latest firmware 3a installed
When i want CAT a DSK image, computer freeze with a the same glitch on screen
https://ibb.co/KDTsgTd

I type these commmands before :
|6128
|mg,"name.dsk"
|fdc
|cat
and....freeze -_-
Edit : hum perhaps |6128 is not compatible with 464 plus (only 464 classic) ?
If it's not a compatibility issue with PLUS, it might be a problem with the specific dsk image. Did you try other dsk images? Btw, if you want to mount parados images, you should give (after booting in standard 512K Ram mode): |DOS,2 and then: |6128 . You will see that Amstrad will reboot in dual mode having mounted parados rom instead of amsdos ;)

darkhalf


QuoteHmmm, so perhaps the other problems you also have are power related too. Did you try to use an external modern 5V PSU instead of the ancient "build in monitor" power supply?
No. Normally I run an MX4 daugtherboard with external 5V 1 amp minimum supply. The USB module will not run reliably with only the CPC464 power supply. So external power supply is mandatory IMHO for using USIFAC without issues (whether USB module, WIFI or Bluetooth module)

QuoteTry to disable "auto usb" function (out &fbd1,93), that's why it "resets" to 9600bps, if you do that, then board will retain the selected UART speed with |SET command.
Okay will try that today and report back. I'm trying to connect Arkos Tracker 2 to the client at 115200bps via bluetooth at the moment
https://www.julien-nevo.com/arkostracker/index.php/music-on-hardware-in-real-time/
CPC464/GT64, CPC464 Plus/CTM640, 2 x CPC6128/CTM644

GUNHED

Quote from: ikonsgr on 19:03, 03 January 24@GUNHED and anyone else might be interested, here is the documentation that helped me to develop the communication code for CH376 USB Host module.
File "commands.txt"  contains the notes i took out of the other manuals (and from experience working with the module), which i think would be the most useful as it contains straight forward code for various functions (like reset usb module, open file, get directory etc)

Thank you very much ikonsgr!!! That's exactly what I was looking for  :) :) :) :) :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

darkhalf


Quotedisable "auto usb" function (out &fbd1,93), that's why it "resets" to 9600bps
1. Confirmed that this command stops the USB from auto mounting, which then prevents the  |SET function resetting to 9600 bps. 

However for Version 6G it will also reset bps rate if one uses |USB command, which is also a bit unexpected (bug). See USIFAC_bps_reset.jpg

2. Also V4 USIFAC II manual still has the old terminal screen. Would suggest updating with latest version to avoid confusion. None of the menu options (like the ones from |SET) are in there

3. Another issue I have is using the Arkos Tracker. It will connect and run, but not for very long. It ends up with a striped white border after some time. This was testing both bluetooth, and direct serial 115200 bps. Direct serial almost lasted the whole tune). May contact the author about this, unless you have any ideas. Serial port monitor still shows the Windows application sending out data to the CPC when the application freezes up

4. Moving to the CPC464 with the 6G and as you can see only 5V power and 64MB USB stick. This has multiple issues, including no USIFAC prompt after |USB mount and then reset. CPC needs complete power off (reset button on USIFAC does not get past this problem)

5. There seems to be strange issues after some |RSX commands. For example like I mentioned in my other post, using |TER and quit and then |TER again on the 6128 will freeze

In this case, I did a |USB, then |CAT and then run"FM" for file manager. It gets a BASIC error. So I run it again and it freezes. I then reset with USIFAC button, and the screen corrupts and does not do a reset. I have to power everything off

Take #2 and after clean power up, |USB and then run"FM and it is okay. So all good, until I CTRL-ALT-DEL and then stuck on no basic prompt again. Reset button not working. Full power off needed

You will note that my 464 is running 6128 ROM / BASIC 1.1. Let me know if you need any more info
CPC464/GT64, CPC464 Plus/CTM640, 2 x CPC6128/CTM644

Powered by SMFPacks Menu Editor Mod