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 3 Guests are viewing this topic.

issalig

As a linux user I have tried to use AmstradUtilityII.exe with little luck. Sometimes it works under WINE but other does not.

Option A python way
So, I decided to get Wireshark and do a python script that now has receiveFromCPC and Terminal options. The other options I guess are more difficult to implement that just sniffing network traffic.
https://github.com/issalig/cpc/blob/main/sw/usifac_transfer.py

To get a file from the CPC just call first "python usifac_transfer.py -r -p YOURPORT"
There is also a tools to convert a binary to defb in order to call BASIC from RSX 8) https://github.com/issalig/cpc/blob/main/sw/bin2txt.py


Enjoy.


Option B just from bash (simple but effective):https://github.com/issalig/cpc/blob/main/sw/usifac_receive.sh
#Set a server listening on a given port and redirect output to a file
#|2PC on the CPC
#Then press 1 and enter on the PC to start transferring from CPC
#Finish reception with Ctrl+C when motor stops or use -w10

MYPORT="10000"

echo "Server started. Press 1 + Enter to start downloading"
echo "Set -w10 to a proper value if not enough"
nc -w10 -l $MYPORT > MYFILERAW

#Get name and remove spaces
MYFILE=`head -12c MYFILERAW | tr -d " " `

echo "Saving $MYFILE"

#Then, strip first 12 bytes and we are done
tail +13c MYFILERAW > $MYFILE

rm MYFILERAW


ikonsgr

Another "3rd party support" for USIfAC II, Great!  :)

issalig

Hi, I have started looking at the code of USIFAC but I have realised I need to learn a lot of things before, thus I am documenting my learning process and you can check it on https://www.cpcwiki.eu/forum/programming/my-journey-into-z80-and-cpc/
I have included the code to write BASIC on RAM  that @ikonsgr uses and will I include more things for sure. My final idea is to describe how to do a simple foreground ROM, so that more people understand it and can contriubute to USIFAC development and new ideas.
Enjoy it!

kolleykibber

Hi All,


I noticed a mention in the forum about getting the USIFAC working with Ewenterm, but I couldn't find any code so I had a go today and managed to get it working. Apologies if this is already up somewhere.


I'm using esp-link on the esp8266 wifi module, which has a serial/wifi socket link. And I'm using ncat on a bash box to connect to servers. I've attached a couple of pics of the amstrad BBS and a local retropie. It's very usable.


Here's an example of the netcat command I'm using where the IP address is the esp8266


stty -icanon && ncat  -C 192.168.1.124 23 -e "telnet amstrad.simulant.uk 464"


I've attached a dsk with updated readme and code.


Thanks to @ikonsgr and Ewen of Ewenterm for giving me some fun with this!

ikonsgr

@kolleykibber, very nice work, and well documented!  :)
I could also add this to Usifac's public folder for anyone who want to use it, under a "Connect to bbs" folder maybe?  ::)
Btw, i've extracted readme and manual text files from dsk image, for easier acccess (and maybe it would be a good idea to make a small program for reading txt files on Amstrd cpc directly  :D )

kolleykibber

Thanks @ikonsgr. The USIFAC has started me off on a journey into microcontrollers, so thanks for that too!


Good idea on adding to the folder, Have you thought about putting your work up on github?


Now you've been generous enough to release your code I was going to have a go at z80dart support from the usifac side. That way we could use all the old software. Need to buy more gear though :)


ikonsgr

I've upload a new firmware (4a), only minor optimization of  board's ROM code this time (replace "cp 0" with "or A" ,fix a small bug in |format routine- now shows correctly  formatted track numbers, reduce the size of hex file by dumping initial zeros of arrays & variables used in routines transferred to RAM).
Btw, we reach 100 USIfAC II boards produced!
It's been ~6months since initial presentation, but production was stalled for more than 2months in total (due to various part shortages), so in reality this number is acheived in less than 4months!

Fran123


How do you weld USB board and USIFAC??


I can't see how pins of each board are connected. The VCC and GND pins on USB module aren't beside TX and RX pins.


Thank you

Quote from: Philippe Lardenois on 14:14, 27 March 21
Hi Friends,
I design a little box with my 3D printer. for those interested....Attached the STL (2 parts and 2 buttons).
inside this archive, 2 Top cover (one for those like me who need a hole for adding a 7cm button  for disk swap / one without)


pictures :

https://ibb.co/ZBcdRs3

https://ibb.co/ftLkZxq



++
Phil





ikonsgr

Quote from: Fran123 on 08:27, 28 May 21
How do you weld USB board and USIFAC??
I can't see how pins of each board are connected. The VCC and GND pins on USB module aren't beside TX and RX pins.
Thank you

This is how underneath of board+usb host module is:

[attach=1,msg202620]

As you can see,i custom design the board to accept the pins of module and solder it in place. And yes, for some reason, they didn't use the usual "4pin approach" of having Tx,Rx, 5v and gnd in a single row, but instead, CH376 module has a 3pin connector, (with one of gnd pins in the middle...  :o ) and 5v is given through a pin in the large dual row header!
This is why the first version used dupont wires to connect the usb module.... ::)

entelle42

@ikonsgr Hi John,


First of all, congrats on your fantastic job!!  ;)


Regarding the wifi connection, can we change the host ip in your Windows Amstrad utility tool? I tried to change the ip in the setup.txt, may be i'm doing wrong, but the tool still seems to reset the ip to 192.168.56.1?


Thank you

ikonsgr

The ip is taken automatically from the ip of the computer running the Windows utility (port number can be changed though).
If you want this to be changed you will have to assign a different ip to your pc first :)

entelle42


@ikonsgr , Great it works ! ;D
Thank you John.

I solved my issue by deactivating my VirtualBox network adaptater (which was assigned to the ip 192.168.56.1) and then, the Windows Amstrad tool was able to get my PC ip and the cpc succeeded in  connecting to the host ip.

Devlin

Sent an email - These look super cool!


(here we go!!!)
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

darkhalf


When using the Multiface 2 it will freeze up during the Save. Test game was Kane from Mastertronic (using a CPC6128)


|USB
|MG,"KANE.DSK"
|FDC
run"kane"




Some of the MF2 BIN files will save in the DSK image, but not everything required to reload it again. Above procedure works fine when running the game via Gotek


I've updated the PIC to 18F47Q10_4 in this thread today


Got the MF2 board and parts from rewinding. Works great!
https://www.va-de-retro.com/foros/viewtopic.php?f=63&t=8102

CPC464/GT64, CPC464 Plus/CTM640, 2 x CPC6128/CTM644

ikonsgr

I'm really not familiar with MF2 interface...
Does it uses the same dsk game image to save the files it needs? But i wonder, since memory dump files are pretty large (64k or 128k), there might be no room for them, if game files take up more than ~100kb on disk... ::)
If that's the case, you might try to mount a 2nd dsk image of an empty disk, and before enabling MF2, change the active dsk image, by pressing the dsk_swap button. That way, USIfAC II will use the empty disk image to store files.

darkhalf

For this game there is enough space on the DSK image. If there is not the MF2 will report an error. I will try the game outside DSK image and see if the problem is the same. I've got USB-TTL, WIFI and Bluetooth modules on order, so keen to try these out too

CPC464/GT64, CPC464 Plus/CTM640, 2 x CPC6128/CTM644

ikonsgr

Quote from: darkhalf on 14:11, 03 June 21
For this game there is enough space on the DSK image. If there is not the MF2 will report an error. I will try the game outside DSK image and see if the problem is the same. I've got USB-TTL, WIFI and Bluetooth modules on order, so keen to try these out too
One other thing that might worth a try is to  create in your usb flash drive a small partition of 256Mb and format it, using FAT file sytem. From my experience, sometimes usb host modules might be a bit "picky" with specific flash drives, especially regarding writing activities (e.g. you might have no problems reading/loading files/dsk images etc, but ONLY in writing files/images). The above method of using a small FAT partition, in most cases seems to resolve the issues.

eto


Quote from: ikonsgr on 20:35, 03 June 21One other thing that might worth a try is to  create in your usb flash drive a small partition of 256Mb and format it,


Have you tried to format it with a third party tool and NOT with the Windows format tool? Almost none of my sticks worked with the Windows formatter (even with just 256MB partitions) but except for a single USB drive every stick worked with its full capacity, if formatted with h2format.exe .



Fran123

Hello,


How much current does USIFAC II need to work?


Thank you

Devlin


It arrived!

After one very thorough scrub of my expansion port (fnar) it's working beautifully. I'm afraid to unplug it now because of just how firmly it's stuck in place.


(edit: i twooted a pic, and a video)


https://twitter.com/magic_bane/status/1401852804147318784

https://twitter.com/magic_bane/status/1401864000598589441
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

ikonsgr

Quote from: Fran123 on 08:39, 05 June 21
Hello,
How much current does USIFAC II need to work?
Thank you

The board itself draws very little current, ~20-30mA, but the usb host module+usb flash drive probably need ~100mA (or even more, depending on the flash drive you use). So i would say that a rough estimation of total current consumption would be ~150-200mA

Devlin

Is there any way to tell which games in the direct loading folder *require* 128k?

Running into a lot of assumingly buggy games because they're expecting 128k but don't find it (and some that explicitly don't start without it)


EDIT:


I made a "direct load" version of Infernal Runner (a personal favourite of mine) it works on a 464, and some simple instructions are in the zip.
it should be attached to the post, now.
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

ikonsgr

Well, unfortunately all "direct load" games are actually extracted from dsk images, meaning that orignally were intended only for CPC 664/6128. Although mostly compatible, there are some minor differences between 464 and 6128 regarding the "inner workings" of the machine that can cause problems for a game designed on a cpc6128,to load on a cpc464 (even if it uses only 64k ram). Also, many games that have Basic loaders, might use commands or syntax that is not recognized from CPC 464 Basic 1.0 version.
So,in most cases, games that are not running on a cpc464 is not because they need 128k but because they were not supposed to run on cpc464 machines  :)
One solution for non working games might be to use snapshot files instead (which can be easily created from an emulator like winape), as this is the most "brutal-direct" method that forces the entire game into the RAM directly, without needing to load any files!  ;)

p.s. i add infernal runner in the official list  and with a basic loader for easy access:)

Devlin

Quote from: ikonsgr on 20:44, 07 June 21Well, unfortunately all "direct load" games are actually extracted from dsk images, meaning that orignally were intended only for CPC 664/6128. Although mostly compatible, there are some minor differences between 464 and 6128 regarding the "inner workings" of the machine that can cause problems for a game designed on a cpc6128,to load on a cpc464 (even if it uses only 64k ram). Also, many games that have Basic loaders, might use commands or syntax that is not recognized from CPC 464 Basic 1.0 version. So,in most cases, games that are not running on a cpc464 is not because they need 128k but because they were not supposed to run on cpc464 machines  :) One solution for non working games might be to use snapshot files instead (which can be easily created from an emulator like winape), as this is the most "brutal-direct" method that forces the entire game into the RAM directly, without needing to load any files!  ;) p.s. i'll see to add infernal runner in the official list  :)


Yeah, that's mostly what I thought. Probably just system specific//BASIC stuff and not particularly a RAM requirement.


Most 664 stuff should work at the very least - all four games or however many came out before it was axed - knowing which stuff is for 128k/6128-only and not for a 464 would be helpful to know.


Snapshots i'm avoiding for now (i don't really like them, and they're limited for multi-load games)


wrt: Infernal Runner / that's why i uploaded it :)
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

Devlin

Has a 3d-printable case been made for the USIfAC 2 yet? My current solution is less than ideal, and I'd prefer it in a case to prevent damaging my table/usifac2.
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

Powered by SMFPacks Menu Editor Mod