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.

Velociraptor

CF2 mass disc testing results (cpcwiki.eu)


I have a number of discs with partial damage, the damage has been assigned to a file on the discs so that the rest of the disc capacity can be used.


Typically it's less than 5kb for each disc side so ideally I want to copy files to these discs that do not need the full capacity.


>[size=0px]you can also copy back these files from usb drive to the specific floppy disk you want (using |COPY command)[/size]
[/size]
Yes that's what I want to do. I want to copy files to a floppy disc.

ikonsgr

Ok, so you already have files on floppy disks and not dsk images right? In that case, you can just use |2PC and copy any files from floppy disks to usb drive!  ;)

Btw, well done for your patience to test 100's of CF2 disks!  :)

Velociraptor

No....  ;D


Exactly the opposite!


I have the files in DSK images downloaded from cpc-power. Example attached.


I want to copy the files from this disc image to a floppy disc in the drive of the CPC, and I have been trying to use the |COPY command to do it.


I have flashed to the latest firmware and I have read the manual. I cannot get it to work at all but my suspicion is that I am doing it the wrong way.


ikonsgr

You don't need to use |COPY (this is ONLY for copying files from floppy disks to usb drive, not from dsk images to floppy disks).
You can just copy the dsk image directly to a floppy disk using a simple: |DSK,"Silico~1.dsk"

I just try to copy the silicon image to a disk. It works ok, but track numbers in image's disk header, is wrongly declared to 42 instead of the real 40 tracks, so function seems to pause in the end (but disk is written ok). I've corrected the track number declaration, so now it works without stoping in the end:
[attach=1,msg210248]

Velociraptor

Ah. That won't work for me.


I have a number of discs with marked bad blocks - see attachment.


I can copy files to them without losing the bad block assignment, but copying an image won't do that.




ikonsgr

Well, i suppose you have to use a good disk without bad sectors.
[attach=1,msg210250]

Velociraptor

Yes it works great for that. But when I read the manual I thought that the |COPY would do the job.


An alternative would be to mount the virtual DSK image as a drive and then use a CPC utility to copy between the two. Failing that I would copy the image to a disc and then remove the USIFAC2 and just use normal CPC utilities.

Edit : The manual does need to be changed.

"- |COPY,'xxx': Copies from USB Device to a Floppy disk,all files starting from 'xxx'. You can also use an exact file name as argument, to copy a single file only."

I've had lots of problems with disc images this evening too, I'll make a separate post to try to keep things as clear as possible.

Velociraptor

I am having problem with images. [size=78%]I have tried various USB drives.[/size]


2 fail to be recognised entirely, even with 16MB partitions.


1 works but fails during the copy.


5 others all produce the same result - on any image file other than a very short one they get seemingly quite far but do not complete and just hang.


I have tried this on both my 664 and 6128, both with no other expansions connected and I get the same result.


You can see the process I follow on screen - I enable USB with |USB, I list the disc images with |CAT and then I copy the disc image to disc using the |DSK,"FILENAME.DSK"


Am I perhaps following an incorrect process?


Velociraptor

Turns out I couldn't sleep so I thought I'd give it another try. This time through wifi.

For some reason port 1000 would not work, but when I changed to 1111 it connected with no difficulty.


I had an error using the disc image that I'd been using. And I thought "But I'm certain John got it to work for him. Are you imagining things?" and it's only then that I noticed the part in your edit about the dodgy tracks!


The disc writes that I had done had resulted in something that looked correct but wouldn't function. When I used your corrected image through WiFi it worked and the game runs!


So that's a bit of a relief. I do have more questions.


First of all once it had completed the disc imaging it repeated on the CPC screen to insert a disc. Does this mean I should simply reset the CPC with the button on the USIFAC2 when done? Does this also mean that I could go back to the PC and change the image file if I wanted to write a series of discs and I could just change the disc on the CPC and press space after I had set the next one up?


Secondly how did you fix that disc image because it looks like I'm going to have to fix some myself!




ikonsgr

Ok, judging from the screen shots, i would say that the 1st image is not written correctly on usb drive (that's what the "error accesing image file" message  indicates)  but also the floppy disk you used, couldn't written either (that's what "error writing to disk" suggests).
On all other cases,i suppose it's a matter of wrong track number declaration in image's Disk header, that's why disk writing seem to stop in the end (maybe i could modify the code to avoid this...  ::) ), although disks should be written ok (i've tried it with your silicon image and floppy disk worked fine, despite the write hanging in the end)

Quote from: Velociraptor on 05:17, 19 December 21
Does this mean I should simply reset the CPC with the button on the USIFAC2 when done? Does this also mean that I could go back to the PC and change the image file if I wanted to write a series of discs and I could just change the disc on the CPC and press space after I had set the next one up?
Exaclty!

Quote from: Velociraptor on 05:17, 19 December 21
Secondly how did you fix that disc image because it looks like I'm going to have to fix some myself!
It's quite easy, you need to open the dsk image using a hex editor (i'm using this free one: https://mh-nexus.de/en/ ) and change the byte at &30 position (it's the first from left at 4th row) to the correct track number. Mind that numbers are in hex format, so if you see a value of &2A means 42 tracks in decimal, and you should probably change it to &28 (=40 tracks). Then you just save back the image file and you are done!  ;)
Btw, how do you create these images? I'm curious about this wrong declaration of tracks, as i never faced such problem in the past... ::)

pelrun

Quote from: Velociraptor on 05:17, 19 December 21For some reason port 1000 would not work, but when I changed to 1111 it connected with no difficulty.

That one is simple - ports below 1024 are considered privileged and require administrator/superuser to access on all major OS's.

Velociraptor

I don't know how the images were created, they're like that on cpc-power. Is it perhaps a copy protection thing?


SectorView v1.20 (cpc-power.com)


SectorView v1.20 (cpc-power.com)


Or is it perhaps just something that guy is doing when he makes images? I'm not sure and as long as they work by just manually editing the file then it will do for me.


I don't like using flash storage, and I like using real discs so for me USIFAC2 and the big pile of discs I have been testing are so that I can have a library of the games I want to have on disc.


Sadly my issues are not over though. I'm now trying to send files to the CPC from the windows program.

This is the order I've done things -
|WIFI (it seemed to remember the SSID and password) on CPC
|2CPC on CPC
On PC I select File copy to CPC and then I selected a single file
The PC side looks as if it's starting but the CPC side doesn't change and is still sitting at the "Waiting for file..... " prompt


Disc image transfers do work though, I've just transferred "The Pawn" after editing the tracks in the .dsk to 40. I actually had that hex editor installed already.

ikonsgr

Indeed,it seems that there is a problem when using the file functions with WiFi module (Dsk image transfer and direct load/save should work ok though).
I'll see to it, but for now, you can use a bluetooth module or direct serial cable, as file functions work ok with these.

Velociraptor

Quote from: ikonsgr on 20:50, 20 December 21
Indeed,it seems that there is a problem when using the file functions with WiFi module (Dsk image transfer and direct load/save should work ok though).
I'll see to it, but for now, you can use a bluetooth module or direct serial cable, as file functions work ok with all functions.


That's fantastic news!

There's no rush at the moment so I'll just wait. I was really surprised that wifi worked at all because I always prefer wired but since it is working I'll just wait until files work. I had been worried I was doing something wrong.


I wrote 10 disc images last night and all 10 worked!

ikonsgr

Ok,i think now all functions work ok with WiFi module too.  :)
I've updated the windows utility program, you can downalod it from here:
https://www.dropbox.com/sh/gg2faiikx4pit37/AADRvM_QsTzI1mGOsFx5Vugra?dl=0

eto

So ... again my Usifac isn't recognized any longer.

I started a game from USB, did a RESET - and then just the normal 464 screen appeared. No longer any Usifac message.
I also tried to set the rom number again, but no luck. Also the check
out &fbd1,30: if inp(&fbd0)=83 then print "ok"
doesn't get me an OK.
Can I revive it somehow?

ikonsgr

If you have a PIC programmer, try to reflash firmware.  Otherwise, i can send you a programmed PIC mcu.

eto

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

I just ordered one... will give it a try tomorrow

eto

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.


eto

Quote from: ikonsgr on 20:07, 10 January 22
If you have a PIC programmer, try to reflash firmware.  Otherwise, i can send you a programmed PIC mcu.
Reflashing did the trick, it works again.
One thing I thought would be fixed by the new firmware is, that the boot sequence regularly hangs:

First 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.

Is this a known behaviour? Can I do anything about it?


shacpc

Hi to all, I received the USIfAC II a week ago. I have tried it to load DSK from USB and it has worked great for me.

It's a shame that you have to assign $ variables to each folder or DSK that you intend to open and there is no more agile method, but I am very happy with how it works.


I don't think I will mess with it much for other possibilities and even scare me to update its firmware in the future ... but to run DSK on my CPC464 it has been a real joy and at a very good price. Many thanks to the developerr ikonsgr

eto

Quote from: shacpc on 23:03, 11 January 22It's a shame that you have to assign $ variables to each folder or DSK that you intend to open and there is no more agile method, but I am very happy with how it works.

that's a stupid problem of Basic 1.0. But you can copy the filemanager to the root of the USB stick (see first post of this thread) and navigate the USB stick more easily and execute files or mount disk images.

Mark_wllms

Quote from: eto on 20:42, 10 January 22The 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?

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.

shacpc

Quote from: eto on 23:08, 11 January 22
that's a stupid problem of Basic 1.0. But you can copy the filemanager to the root of the USB stick (see first post of this thread) and navigate the USB stick more easily and execute files or mount disk images.


thank you! . It is very intuitive and easy. I hope that the future continues to evolve and also allows the application to open the .DSK and select the .BAS or .BIN file inside with the cursors. My thanks again to all the participants in this project.


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

Powered by SMFPacks Menu Editor Mod