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

Started by ikonsgr, 09:17, 01 December 20

Previous topic - Next topic

Johnny Olsen and 4 Guests are viewing this topic.

shacpc

Can someone add the FM file from the file manager without the initial question from the old device and directly start the file listing for a current one? thanks

eto

Quote from: ikonsgr on 21:07, 10 January 22
If you have a PIC programmer, try to reflash firmware. 

Hi @ikonsgr - so reflashing worked, but the 464 often hangs on boot and can sometimes not even be reset. I have to turn it off to make it work again. Any ideas if this can be resolved?

Quote from: eto on 23:51, 11 January 22First time I power up the 464, it hangs after the copyright message (see image below). I click the reset button and then it fully boots. I can then click reset and every time it boots perfectly UNTIL I enter |USB. Once I do that and a reset will always fail. It always hangs after the copyright message like after the first boot. I have to turn off the computer and then start again.

ikonsgr

Quote from: Mark_wllms on 11:06, 12 January 22
I notice that the USIFAC needs a file extension to load a basic file, whereas unpatched AMSDOS will assume .BAS if not specified. For example if I have a file called "DISC.BAS", AMSDOS will normally accept RUN"DISC" whereas USIFAC will require RUN"DISC.BAS" to load it.
Well, that's because the code emulation i develop, when you request to load/run a file without extension, it first tries to load the file as it is, if it's not found, then assumes it has a BIN extnesion and tries again with it  :)  So, for files with BIN extension you DONT need to add it on LOAD" or RUN" commands. But for files with BAS extension (usually basic files) you have to add it. I also mention this in the last "HINTS and TIPS"  section of user's guide  ;)

ikonsgr

Quote from: shacpc on 00:59, 13 January 22
Can someone add the FM file from the file manager without the initial question from the old device and directly start the file listing for a current one? thanks
Downalod filemanger again from here: https://www.dropbox.com/s/aaeqqvvuuln3pcc/File%20manager.zip?dl=0
I've added a second basic program named "FM2" which doesn't include the question and directly loads file manager! ;)
Of course if you have older board (i think rev3 or older) you should use "FM" as before.

ikonsgr

Quote from: eto on 13:07, 13 January 22
Hi @ikonsgr - so reflashing worked, but the 464 often hangs on boot and can sometimes not even be reset. I have to turn it off to make it work again. Any ideas if this can be resolved?
One thing you can check is the psu you are using. Many times a power cable splitter or small psu can cause under voltage problems. Also, a bad edge connector contact can cause erratic behavior too.
Anyway, with my CPC 464 everything works ok with rev6 firmware,never had such boot problems, so i suppose the problem doesn't have to do with firmware bug.
Btw, i've upload again the last rev6 just to be sure it's the right one  :) . Also, did you try  to flash older firmware revisions to see if you get the same problem?

ikonsgr

Quote from: eto on 21:42, 10 January 22
A couple of other things that I recognized today with the 464 (I have another Usifac which still works):
The filemanager has some issues with programs that have no extension and stops with an error in line 1. If not I often get a Syntax error or "File already open". A simple patch which creates a valid BASIC line will change that. Just add an ending ", a 0-byte and make sure the length of the line in &170  is set correctly.
Even with this patch, the "File already open" error can still happen. E.g. Who dares wins fails after it loads another Basic file. Can this somehow be fixed?
Would it be possible that the file manager continues to use the MODE that has been selected in the Basic part? The reason for this is, that on the original colour monitor (and even worse on the MP1/2 modulator) Mode 2 text is hard to read - and since it only uses 11 characters anyway, MODE1 or even 0 would not have any disadvantage and everybody could change the BASIC file based on individual preferences.
I've checked WHO DARES WINS II, indeed the basic loader program has a: run"loader command, when the real file is "loader.bas". As i explained, with BAS files, you have to mention the extension in order to load it. So you can simply add .bas extension on the last command of basic listing, and then save the file, from now on it should work ok :)
And here is some explanation of why i select to automatically check for .BIN extensions instead of .BAS: During testing i've encountered quite a few muti file games with basic loaders, where the .BIN extension of binary files requested in basic program. For example there was a line: LOAD"FILE",&8000 but the actual file was named "FILE.BIN". That's why i add a second attempt for loading files, if initial load fails, try again using "BIN" extension. This works for most games, but in some rare cases,(like WDW II, and i suppose this should happens mainly with "early days" games) , a basic loader listing has basic line to run another basic program! In this case, if the  basic program name has "bas" extension, but this is omitted in the basic command, loading will fail. But fortunately as i already wrote, it's rather easy to correct this problem!  ;)

eto

Quote from: ikonsgr on 20:09, 13 January 22One thing you can check is the psu you are using. Many times a power cable splitter or small psu can cause under voltage problems. Also, a bad edge connector contact can cause erratic behavior too.
Anyway, with my CPC 464 everything works ok with rev6 firmware,never had such boot problems, so i suppose the problem doesn't have to do with firmware bug.
Btw, i've upload again the last rev6 just to be sure it's the right one   . Also, did you try  to flash older firmware revisions to see if you get the same problem?

I tried it with several PSUs and there is no change. It happened wit the very old firmware (v2 or so) and the current one. As it's 100% reliable and repeatable I doubt that it's the edge connector, but I will clean it just to be sure.

I can also try with a different firmware if that makes sense.

eto

Quote from: eto on 20:39, 13 January 22I've checked WHO DARES WINS II, indeed the basic loader program has a run"loader command when the real file is "loader.bas". As i explained, with BAS files you have to mentions the extension in order to load it, so you can simply add .bas extension on the last command of basic listing, and then save the file, from now on it should work ok

Ah - nice!

KaosOverride

If I recall ok, the extension check order is first blank, then .BAS and then .BIN.


That should make all work fine.

KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

crizle

Link to original post(with photos): https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/usifac-ii-adding-wifi-esp8266mod/msg211467/#msg211467
I may have posted in the wrong place but here are a few queries if possible I can get assistance on please?
Hi there all,

I know there is a separate topic for the USIfAC II, but I am just rediscovering (well the past year and a bit) my passion for electronics but still rusty.

I am after advice on how to connect an ESP8266MOD to the USIfAC II. I know it should be easy but I don't want to damage anything! What is stopping me is the fact it has a mini USB UART to program the ESP8266MOD via Arduino etc.. all works fine.

EDIT: Mon 24th Jan 2022I have looked through files available and found a ESP8266 flash folder. After using Arduino IDE to upload a serial console sketch(i think) I was able to use AT commands etc and update the flash so now it is actually set as an access point connected to my home network. But I haven't connected to the USIfAC II. I just need advice on which pins to connect from the ESP8266MOD to the USIfAC II - I don't know the standard ways. Obviously I will look into powering a better way once connected. If anyone needs a better picture of pinouts I can provide.. thanks.

I am maybe thinking too much into it, but will I need to bypass the USB UART of the ESP8266MOD to connect to the USIfAC? If so, has anyone any pointers/advice on what I should or not be doing.

One last question: I have a XGecu TL866 II programmer, and was hoping to flash the USIfAC to the latest firmware but not sure if it is working as it has all chips listed for PIC programming and the only one that is not listed is the PIC18F47Q10. I tried one that was the closest but say's out of range for programming. I have an STM32, Bus-Pirate and the XGecu device, is it possible to program the chip with any of these as I do not have the programmer mentioned in the docs.Any help/thoughts etc.. much appreciated.

ikonsgr

If Vin pin on the esp board is for 5v input (which most probable is) then is suppose this is how you need to connect it to USIfAC II:
 [ You are not allowed to view this attachment ]  

Fran123


Fran123


ikonsgr

This is the code for |CDR:

rootdir:
call check_usb_en
ret z
ld bc,&fbd0
call usb_cmd3
ld a,&2f
out (c),a
ld a,"/"
out (c),a

call usb_cmd2
ld a,&32
call usb_cmd4
cp &41
jp nz,error_ucd

inc c
ld a,53 ;set pic's  path buffer to 0
out (c),a
ret


You can see the code for all subroutines used, at the end of the USIfAC II Rom code:
https://www.dropbox.com/s/43dkg5ibcbhn0zu/18f47q10_6_code.asm?dl=0

issalig

Great. I see there are some binaries. Are you considering to distribute asm and java source code? Opening code will allow other people to collaborate, learn, and improve the project.

Quote from: Fran123 on 12:39, 26 January 22Hello


I did a launcher for UsifacII.


You can test the project in  https://github.com/gallegux/menusi

ikonsgr

A minor update (6a)

- Minor overall code optimization (it should offer ~0.5%-1% speed... ::) )
- Changed file loading code in order to follow Amstrad's file name search order: first tries name as it is, then tries with .BAS extension, final with .BIN extension (previous version tried only with .BIN extension)
So now you can load any bas file without needing to add '.bas' extension. Also some of the loading problems with some games discussed earlier, should be now fixed, without needing to "patch" bas loader programs anymore  ;)

@issalig, all code is available at the "inner workings" folder here: https://www.dropbox.com/sh/ua4vgf6qjjmqlnq/AACT6kqTr-sst-iqDeBnE9gRa?dl=0


issalig

@ikonsgr, thanks a lot for sharing your knowledge and let others learn from you,
I will check the new version asap. I think USIFAC2 has almost everything I need in a CPC (maybe more memory, but afaik work is/was in progress, isn't it?).
Anyway, this is my wish list for the usifac (which I consider to implement in the near future but I never find the time to do it)
- boot a rom/sna when pressing a button, for example boot the one in the usb unit called autoboot.rom (maybe it could be used swap button or other free pin)
- add a rotary enconder and a screen like in a gotek (not so urgent and not sure about if enough free pins for screen and encoder)
- tutorial about usifac architecture and building instructions (I started a document but it is not still finished)

However, my last post asking for sources was addressed to @Fran123

Fran123


Hello,

The code will be open when I consider that the project is finished, for now I would like to add a few things.

On the other hand, I think that the code must be of quality to be published, I would not like you to laugh at what I write.

ikonsgr

Quote from: issalig on 00:01, 02 February 22
- boot a rom/sna when pressing a button, for example boot the one in the usb unit called autoboot.rom (maybe it could be used swap button or other free pin)
This will hopefully done with the 512k RAM/ROM board i'm developing .You will be able to load a boot low rom and maybe cpr files too.
Quote from: issalig on 00:01, 02 February 22
- add a rotary enconder and a screen like in a gotek (not so urgent and not sure about if enough free pins for screen and encoder)
I don't find a reason for doing that. Gotek drive needs a screen,rotary encoder etc, because there is no way to control it through amstrad directly! With boards like USIfAC II or M4 ,you have dozens of rsx Basic commands to do whatever you want and get the results directly on Amstrad's screen!  ;)
Quote from: issalig on 00:01, 02 February 22
- tutorial about usifac architecture and building instructions (I started a document but it is not still finished)
Inside "inner workings" folder there is also a schematic of the USIfAC II board. Circuit is rather plain and "straight forward" i would say, apart from a few buttons/switches there is only connections between PIC microcontroller and Amstrad's expansion port.

issalig

Ok, nice, no need to hurry up.But do not be ashamed of showing your code, we all code dirty and we like it.  :)

Quote from: Fran123 on 10:46, 02 February 22
Hello,

The code will be open when I consider that the project is finished, for now I would like to add a few things.

On the other hand, I think that the code must be of quality to be published, I would not like you to laugh at what I write.


Fran123

Hello


I have a problem with my UsifacII. I disconnected it from cpc to plug it on other cpc, and now, none shows the Usifac II Enganged message at boot up, however, pause and reset buttons work.


What is happening?


Thank you.

eto

Quote from: Fran123 on 22:27, 03 February 22none shows the Usifac II Enganged message at boot up

This happened to me too several times. Seems Usifac easily "forgets" its ROM number and you have to assign a new one. Try "out &FBD2,5" on basic prompt, and then reset.

If that doesn't help, you might need to reprogram it (happened once to me).

eto

Quote from: ikonsgr on 20:09, 13 January 22Anyway, with my CPC 464 everything works ok with rev6 firmware,never had such boot problems, so i suppose the problem doesn't have to do with firmware bug.

I tried back and forth.
PSU: no change
different firmware: no change
no finally cleaned the edge connector with a fibre pencil: no change

The behaviour stays perfectly the same: first boot, Usifac is not recognized. Then I reset and it is recognized. Everything works perfectly until I reset again, then the computer hangs during startup.

Am I the only one who experiences this?

The problem is only on an early 464 model. On a 6128 it works perfectly fine.

XeNoMoRPH

Quote from: eto on 23:43, 03 February 22
This happened to me too several times. Seems Usifac easily "forgets" its ROM number and you have to assign a new one. Try "out &FBD2,5" on basic prompt, and then reset.

If that doesn't help, you might need to reprogram it (happened once to me).
I have the first version that came out of Usifac II connected to a CPC 464 and indeed, after a few hours of testing commands, when I bought it a long time ago, suddenly it no longer showed the message of usifac II ROM loaded, I had to buy the programmer to re-record the firmware, it happened to another colleague as well, and I see that it continues to happen.
your amstrad news source in spanish language : https://auamstrad.es


Powered by SMFPacks Menu Editor Mod