CPCWiki forum

General Category => Applications (CPC and CPC-related) => Topic started by: pelrun on 08:02, 07 March 15

Title: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: pelrun on 08:02, 07 March 15
The Arkos tools are great but I've not had any luck actually transferring anything over bluetooth or usb serial from my windows machine, so I finally got fed up and fixed it.  8)


The serial code was a bit of a mess, and wasn't checking the return values from the IO calls - which means you'd get half a block and then try to process whatever rubbish was in the other half of the buffer. I've cleaned it all up, and made sure everything is checked properly. The result is a binary that has transferred multiple disk images and files without a hiccup.

Oh, and the command line options have changed. You need to use the full comport name, e.g.


aft -p COM40


I've put up my source tree at pelrun/aft ยท GitHub (http://github.com/pelrun/aft), and attached the binary here.


Edit: updated to fix the timeouts on windows properly, so it shouldn't use up 100% of a core anymore.

Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: CraigsBar on 09:25, 07 March 15
Any chance of an osx binary?
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: pelrun on 09:46, 07 March 15
Sorry, I don't have a mac or a cross compiler targetting it. You probably can compile it yourself though - there's a basic makefile there that's platform independent.


No guarantees, though, I haven't tested any of the unix-specific code.
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: TotO on 11:44, 07 March 15
As I know, SyX had already made all the changes required and support all 32/64bit OS as OSX, Linux and Windows.
Have you tested the versions from the MiniBooster ZIP?
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: CraigsBar on 12:06, 07 March 15
Quote from: TotO on 11:44, 07 March 15
As I know, SyX had already made all the changes required and support all 32/64bit OS as OSX, Linux and Windows.
Have you tested the versions from the MiniBooster ZIP?
the one in the mini booster zip does not play nice with osx at all. The latest from the arkos website works fine except it needs restarting on the Mac after every 4 or 5 transfers.
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: pelrun on 13:24, 07 March 15
Quote from: TotO on 11:44, 07 March 15
Have you tested the versions from the MiniBooster ZIP?


That's the version I was using, and it's what I based my fixed version off of. The serial IO was fundamentally broken; it is just luck that made it work in any particular situation (ReadWord was a straight up random crash generator!). It's the differences in timeout behaviour on various OS's that affected it most strongly; my Windows machine seems to really love to timeout it's serial IO calls even when configured not to.
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: TFM on 19:55, 07 March 15
Great work! I'll give it a try after work!  :) :) :)
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: Ast on 09:21, 08 March 15
Does it run with Cpc booster+ too?
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: TotO on 10:08, 08 March 15
OK. Thank you for your fix so. I will have to test it next week! :)
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: pelrun on 12:41, 08 March 15
Quote from: Ast on 09:21, 08 March 15
Does it run with Cpc booster+ too?


That's up to the Arkos ROM on the CPC side. I don't think there are any protocol differences between the original and the minibooster version, so give it a go!
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: pelrun on 15:12, 08 March 15
Just noticed it was using up 100% cpu on one core, so I fixed the timeouts properly. Now it uses pretty close to 0% cpu. Updated binary in the first post.
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: coox on 09:44, 07 September 15
Many, many thanks, pelrun!
I can confirm that the revamped AFT tool compiles on Linux, and works perfectly.
You allowed me to start the process of transferring my 25+ years disks to a modern computer!
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: CraigsBar on 11:48, 07 September 15
Quote from: coox on 09:44, 07 September 15
Many, many thanks, pelrun!
I can confirm that the revamped AFT tool compiles on Linux, and works perfectly.
You allowed me to start the process of transferring my 25+ years disks to a modern computer!
I guess that means I need to see if it compiles on a Mac then lol.
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: arnoldemu on 17:27, 04 October 15
Works on linux 64-bit. I used it today.

I had to make one small fix.
RS232_OpenComport is described as (in the header):

int RS232_OpenComport(const char *comport, int, const char *, HANDLE *handle);

But in the c file:
RS232_OpenComport is described as (in the header):

int RS232_OpenComport(char *comport, int, const char *, HANDLE *handle);

This needed fixing for me to compile it successfully.



Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: arnoldemu on 17:34, 04 October 15
@Targhan (http://www.cpcwiki.eu/forum/index.php?action=profile;u=110):

I used readdsk today. I did a crazy thing.

I put rsxs.bas and rsxs.bin into a cdt file, converted to a au file, and used audacity to play it into my cpc6128 via a cassette cable.

I did this because I wanted to read some disks on the cpc, I didn't have a 3.5" drive connected to my cpc at the time, I don't have arkos tools on rom.

This was the quickest route at the time. I have some suggestions (I am happy to make the modifications if you will share the source).

1. The rsxs.bas doesn't use ! in the filename, so the cassette stopped and I had to press a key.
2. it would be nice if readdsk was auto-launched.
3. When readdsk is done, it resets the cpc.  I had to reload the program from cassette again :(. It would be good if it would let the user use it again, and press ESC to quit it.



Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: pelrun on 06:32, 06 October 15
Quote from: arnoldemu on 17:27, 04 October 15
This needed fixing for me to compile it successfully.


Weeeird, I couldn't get gcc to complain about it to me. Fixed.
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: PulkoMandy on 21:42, 27 February 16
I just noticed your changes and merged them into the CPCSDK version (which also supports the Haiku operating system, and support both full names and numbers for COM ports).
Thanks for the fixes!
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: pelrun on 10:49, 28 February 16
Thanks for that. There's been an issue on github to merge my changes in for months, but I've been too lazy/otherwise distracted to do it myself.
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: Poliander on 15:50, 19 June 16
Any idea why AFT.EXE doesn't work here? MiniBooster is connected, USB drivers are installed...

Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: Poliander on 16:30, 19 June 16
...hmmm... original aft.exe from centpourcent.net has issues, too..  :'(

Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: arnoldemu on 18:12, 19 June 16
Quote from: Poliander on 16:30, 19 June 16
...hmmm... original aft.exe from centpourcent.net has issues, too..  :'(
It's the "unknown command" that it is failing on.

EDIT: Which version of windows are you using?
Have you tried running cmd as administrator and then aft?
Do you know the serial configuration you are using?
What is your serial device (a usb device or?) ?
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: Poliander on 18:28, 19 June 16
Quote from: arnoldemu on 18:12, 19 June 16
It's the "unknown command" that it is failing on.

EDIT: Which version of windows are you using?
Have you tried running cmd as administrator and then aft?
Do you know the serial configuration you are using?
What is your serial device (a usb device or?) ?

It's Windows 7 64 bit, MiniBooster connected via USB and I tried as Administrator without success. But I just found a third version of AFT.EXE version that actually works!
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: pelrun on 20:13, 19 June 16
What version of the arkos tools are you using on the CPC side?
Title: Re: Updated/Fixed AFT.EXE for windows+minibooster users
Post by: Poliander on 20:18, 19 June 16
VERSION.BAS says "1.0", WriteDSK is V1.2
Powered by SMFPacks Menu Editor Mod