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.

issalig

I have been thinking if USIFAC could autoboot when pressing swap button at startup and automatically load a game/program similarly to Dandanator.
Any hints?

llopis

I'm finally around to trying out the USIfAC II and the first thing I wanted to do was flash the new firmware. I was surprised to see that I need a custom programmer for what looks like a normal serial communication, and even more surprised that the programmer is more expensive than the USIfAC itself :-(


If there an alternate way to flash it with an Arduino or with a normal USB-to-serial adapter, or does it have to be that exact programmer?


Also pretty bummed to see that it's pretty Windows dependent the whole process (at least as described in the flashing guide).

Cwiiis

Quote from: llopis on 13:19, 01 November 21
I'm finally around to trying out the USIfAC II and the first thing I wanted to do was flash the new firmware. I was surprised to see that I need a custom programmer for what looks like a normal serial communication, and even more surprised that the programmer is more expensive than the USIfAC itself :-(


If there an alternate way to flash it with an Arduino or with a normal USB-to-serial adapter, or does it have to be that exact programmer?


Also pretty bummed to see that it's pretty Windows dependent the whole process (at least as described in the flashing guide).
You can flash it with a PicKit (2, 3 or one of the clone 3.5s, which is what I used) on Linux fine with MPLAB IPE. I got the PicKit clone for about a fiver on eBay.

llopis

Quote from: Cwiiis on 13:30, 01 November 21
You can flash it with a PicKit (2, 3 or one of the clone 3.5s, which is what I used) on Linux fine with MPLAB IPE. I got the PicKit clone for about a fiver on eBay.
Good to know. Unfortunately my first search for the PicKit came up around 20€-30€! Must be the chip shortage. Bummer!


llopis

Yeah, I sucked it up and ordered it from Amazon for €16, which at least includes delivery and arrives in two days. Annoying chip shortage!

llopis

Quote from: Cunctator on 18:23, 20 July 21
Hello John,
Today I received my package with USIfAC2 for my AMSTRAD 6128 PLUS.

It doesn't load dsk image. I've tried to try four pendrives 256MB FAT but none works.
What is is happening?
Thanks.
I have that exact same problem. Was there a solution for that?

I'm waiting on the programmer to update the firmware, so my firmware is probably 6 months out of date.


Edit: I'm using a CPC 6128, not a plus.


Second question: Most of my DSK files have filenames over 8.3 characters so they get truncated to XXXXXX~1.DSK. How the heck do you type ~ with a CPC keyboard? I don't see it anywhere! Am I missing something?

ikonsgr

Quote from: issalig on 11:09, 01 November 21
I have been thinking if USIFAC could autoboot when pressing swap button at startup and automatically load a game/program similarly to Dandanator.
Any hints?
What you describe can only be done when you boot using Rom. Dsk images act like real floppy disks, usually containing files. One of these files is the loader of game which you need to run, in order to execute game. Unfortunately each game uses a different name to load, so it's not possible to make a "generic" autoboot process for dsk images.

ikonsgr

Quote from: llopis on 19:45, 01 November 21
I have that exact same problem. Was there a solution for that?I'm waiting on the programmer to update the firmware, so my firmware is probably 6 months out of date.
Edit: I'm using a CPC 6128, not a plus.
Second question: Most of my DSK files have filenames over 8.3 characters so they get truncated to XXXXXX~1.DSK. How the heck do you type ~ with a CPC keyboard? I don't see it anywhere! Am I missing something?

For '~' press control+2  ,instead of ' " ' it will give you '~' ;)
Now about your problem, do you get the "USIfAC II Enhanced" message on boot screen? Other functions work ok (like direct file loading, |FORMAT, |STAT, |TER etc)?
Also, when you give |USB, do you get a red led on usb host module?

llopis

Quote from: ikonsgr on 20:16, 01 November 21
Now about your problem, do you get the "USIfAC II Enhanced" message on boot screen? Other functions work ok (like direct file loading, |FORMAT, |STAT, |TER etc)?
Also, when you give |USB, do you get a red led on usb host module?
Excellent tip on the ~. Thanks!


Yes to all of the above: Message at startup, messages in response to most commands (|CAT, |FDC, etc).


Oh! I just figured it out: if I type the name incorrectly in |MG,"name.dsk", it quietly fails and then |FDC and CAT hangs. In my case I was leaving out the .dsk part I think. It seems to be working now.


Does newer hardware complain if you pass an incorrect name to |MG?

ikonsgr

Quote from: llopis on 20:39, 01 November 21
Oh! I just figured it out: if I type the name incorrectly in |MG,"name.dsk", it quietly fails and then |FDC and CAT hangs. In my case I was leaving out the .dsk part I think. It seems to be working now.
Does newer hardware complain if you pass an incorrect name to |MG?
Hmmm,no,i'm afraid |MG command is rather "passive",it only issues the name of image. So if you give a wrong image name and then try to access it by giving |FDC and then "CAT" amstrad will hang indefinetly. A good practice to avoid this, is to use |SMG command, just to ensure that image name issued correctly. Or, you can use filemanager and never bother about giving wrong image names at all!  ;)
Anyway, maybe i could add a small check for name validity in the future, perhaps on giving "|FDC" command...  ::)

Mark_wllms

You also get the same problem if you set a disk image with |MG, then change to a different directory with |CD, so the error message would have to check all the disks when the |FDC was issued.

XeNoMoRPH

Just out of curiosity, has someone managed to get it to work on a CPC 6128 plus ?, I tried but it was impossible.
your amstrad news source in spanish language : https://auamstrad.es

Cwiiis

Quote from: XeNoMoRPH on 08:31, 02 November 21
Just out of curiosity, has someone managed to get it to work on a CPC 6128 plus ?, I tried but it was impossible.


It works for me on a 6128 Plus, but it's *very* fussy - it seems the power on a Plus is a lot more marginal (I've cleaned everything power-related and tried several different supplies)... I can get it to work, but only on its own - if I put it in an MX4, it can sometimes work on its own but more often than not causes weird random behaviour and hangs, regardless of internal or external power on the MX4. Also, |fdc doesn't work on the Plus for disk emulation, only |464. If anyone gets it to work on a Plus machine with other boards also connected, I'd be very interested in their setup...

llopis

Some people had reported problems running the Amstrad Diagnostics program (https://github.com/llopis/amstrad-diagnostics) from USIfAC II, so I looked into it a bit this morning. Apparently when you run it, you get the lower RAM test, then the two beeps indicating it passes, and then it locks up.


The main problem I found is that the lockup happens while the diagnostics program is trying to detect all available RAM. Specifically, I'm iterating over all the banks and all the blocks within the banks:
https://github.com/llopis/amstrad-diagnostics/blob/main/src/CheckUpperRAM.asm
;; Port sequence for full 4MB:
;; 7F 7E 7D 7C 7B 7A 70 78


;; Bank block table
;; C4 C5 C6 C7
;; CC CD CE CF
;; D4 D5 D6 D7
;; DC DD DE DF
;; E4 E5 E6 E7
;; EC ED EE EF
;; F4 F5 F6 F7
;; FC FD FE FF



Any idea why turning on those memory configurations could cause the device to lock up? It's not doing partial address decoding, right?


The other minor thing I found is that when I do an upper ROM check, the ROM in slot 5 doesn't seem to have a proper string for its name, and it's just a bunch of garbage characters. I don't think that's breaking anything, but I thought it was a bit weird. Any reason for that? I thought it was standard for all ROMs to have a string ID in the header.


llopis

Quote from: XeNoMoRPH on 08:31, 02 November 21
Just out of curiosity, has someone managed to get it to work on a CPC 6128 plus ?, I tried but it was impossible.
I can also confirm I didn't get it to work on a 6128 Plus just with the defaults.
It would only boot up correctly about 50% of the time, and when it did, it would lock up after doing |FDC and trying to do CAT.
When running the file manager, it would say "File Already Open" after pressing Y (for old board).
This is the exact same device and USB file that worked on a CPC 6128.

ikonsgr

Quote from: llopis on 10:53, 02 November 21
Any idea why turning on those memory configurations could cause the device to lock up? It's not doing partial address decoding, right?
Actually it does!  :) Board is activated when A10=0 and A5=0  (expansion peripheral for serial port according to this: http://cpctech.cpc-live.com/docs/iopord.html ), so if you use port &7B00 it will definetely activate USIfAC II serial port!

Quote from: llopis on 10:53, 02 November 21
I thought it was standard for all ROMs to have a string ID in the header.
The header for Usifac II rom is this:
ORG #C000 ;Start of ROM
DEFB 1 ;Background ROM
DEFB 0 ;Mark 0
DEFB 5 ;Version 5
DEFB 0 ;Modification 0
DEFW NAME_TABLE ;Address of name table

And of course this is not my doing, it's how the official manual dictates about rom structure:
http://cpctech.cpc-live.com/docs/manual/s158se09.pdf

No need for any id header is required, and same goes for all official roms like Amsdos, Basic, OS firmware.

ikonsgr

Quote from: llopis on 17:24, 02 November 21
I can also confirm I didn't get it to work on a 6128 Plus just with the defaults.
It would only boot up correctly about 50% of the time, and when it did, it would lock up after doing |FDC and trying to do CAT.
When running the file manager, it would say "File Already Open" after pressing Y (for old board).
This is the exact same device and USB file that worked on a CPC 6128.
As i noted a few times in the past, i don't own an Amstrad  plus, and none of my friends/collectors i know have one too, so it was impossible for me to test USIFAC II with plus machines. But some say hat dsk image emulation works using |464 command, so it might work faster (as i verified it with a CPC 464) ,using a real CPC 6128 AMSDOS/PARADOS rom with the upcoming 512k RAM/ROM board card   :)

Devlin

Quote from: llopis on 17:24, 02 November 21
I can also confirm I didn't get it to work on a 6128 Plus just with the defaults.
It would only boot up correctly about 50% of the time, and when it did, it would lock up after doing |FDC and trying to do CAT.
When running the file manager, it would say "File Already Open" after pressing Y (for old board).
This is the exact same device and USB file that worked on a CPC 6128.


I get that "File already open [in 1]" when try use the file manager to load certain files without an extension. I kinda just chalked it up to being a quirk of the 464 though and it not really having a native disk system rom to fall on.


I've noticed that the CPC also defaults to tape mode on my 464 when loading certain games - like I hear the tape motor starting when a game tries to load sometimes, this has wildly varying results, from "halting" the system to having no discernible effect and it just loading as if nothing happened
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

MrLurch

I'm still having grief with mine, trying to isolate where the problem is on my 464.
The main issue I'm trying to get past at the moment is a weird double-boot.
Basically. Cold boot, boots to the ready prompt (with the usifac enhanced msg) then instantly reboots, getting hung at the copyright message.


I've tested it on a mates 6128 and it works fine.
Its not the edge connector, I've cleaned that to within an inch of its life. You can nearly see yourself in them.
It's not Power as I've removed the load from the cassette and run the thing from a proper bench PSU.
(incidentally.... when in normal use, the CPC draws about 860ma. When the machine it's hung on the second boot, it draws over 1A...?)


Noel sent me a beta of his diag and it all checks out fine.


My 464 is bone stock and it uses a 40007 ULA.

issalig

Quote from: ikonsgr on 20:12, 01 November 21
  What you describe can only be done when you boot using Rom. Dsk images act like real floppy disks, usually containing files. One of these files is the loader of game which you need to run, in order to execute game. Unfortunately each game uses a different name to load, so it's not possible to make a "generic" autoboot process for dsk images.
I was thinking more about behaving as ROM 0 and take control without BASIC or Firmware and load a SNA.
Not sure if it will possible at all with USIFAC but in the meanwhile I am in the process of learning about ROM expansions and found this useful doc https://bmpc.github.io/2021/04/15/bulding-an-amstrad-cpc-expansion-rom.html


Devlin

Quote from: MrLurch on 22:53, 03 November 21
I'm still having grief with mine, trying to isolate where the problem is on my 464.
The main issue I'm trying to get past at the moment is a weird double-boot.
Basically. Cold boot, boots to the ready prompt (with the usifac enhanced msg) then instantly reboots, getting hung at the copyright message.


I've tested it on a mates 6128 and it works fine.
Its not the edge connector, I've cleaned that to within an inch of its life. You can nearly see yourself in them.
It's not Power as I've removed the load from the cassette and run the thing from a proper bench PSU.
(incidentally.... when in normal use, the CPC draws about 860ma. When the machine it's hung on the second boot, it draws over 1A...?)


Noel sent me a beta of his diag and it all checks out fine.


My 464 is bone stock and it uses a 40007 ULA.

The "double boot" as far as I can tell is normal - it initalises the usifac2, then resets.
My 464 does it too.
What version of the firmware is on it? Does it show  (Rev.5) on your friend's 6128 when giving the |STAT command?
^that's the latest to my knowledge, I don't know if there's a separate version command
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

Devlin

Got my usifac2 (first version, vokgear's) case last night, a few cheap rubber feet later and it's perfect for use
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

MrLurch

Quote from: Devlin on 14:19, 04 November 21
The "double boot" as far as I can tell is normal - it initalises the usifac2, then resets.
My 464 does it too.
What version of the firmware is on it? Does it show  (Rev.5) on your friend's 6128 when giving the |STAT command?
^that's the latest to my knowledge, I don't know if there's a separate version command
The lastest FW that John sent me Rev5a

ikonsgr

Quote from: MrLurch on 00:59, 05 November 21
The lastest FW that John sent me Rev5a
Try to reload latest firmware (5a) again. For a couple of days, the hex file was wrong (i accidentally used a previous version of source code for creating hex file  ;D)

Powered by SMFPacks Menu Editor Mod