Author Topic: Updated/Fixed AFT.EXE for windows+minibooster users  (Read 4220 times)

0 Members and 1 Guest are viewing this topic.

Online pelrun

  • VK4CPC
  • Supporter
  • 6128 Plus
  • *
  • Posts: 551
  • Country: au
    • index.php?action=treasury
  • Liked: 279
  • Likes Given: 145
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.

Code: [Select]
aft -p COM40

I've put up my source tree at pelrun/aft · GitHub, 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.

« Last Edit: 16:11, 08 March 15 by pelrun »

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.257
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1167
  • Likes Given: 73
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #1 on: 10:25, 07 March 15 »
Any chance of an osx binary?

Online pelrun

  • VK4CPC
  • Supporter
  • 6128 Plus
  • *
  • Posts: 551
  • Country: au
    • index.php?action=treasury
  • Liked: 279
  • Likes Given: 145
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #2 on: 10: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.

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.312
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2531
  • Likes Given: 1481
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #3 on: 12: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?
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.257
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1167
  • Likes Given: 73
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #4 on: 13:06, 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.

Online pelrun

  • VK4CPC
  • Supporter
  • 6128 Plus
  • *
  • Posts: 551
  • Country: au
    • index.php?action=treasury
  • Liked: 279
  • Likes Given: 145
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #5 on: 14:24, 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.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1977
  • Likes Given: 4650
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #6 on: 20:55, 07 March 15 »
Great work! I'll give it a try after work!  :) :) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 954
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 693
  • Likes Given: 660
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #7 on: 10:21, 08 March 15 »
Does it run with Cpc booster+ too?
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.312
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2531
  • Likes Given: 1481
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #8 on: 11:08, 08 March 15 »
OK. Thank you for your fix so. I will have to test it next week! :)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Online pelrun

  • VK4CPC
  • Supporter
  • 6128 Plus
  • *
  • Posts: 551
  • Country: au
    • index.php?action=treasury
  • Liked: 279
  • Likes Given: 145
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #9 on: 13:41, 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!

Online pelrun

  • VK4CPC
  • Supporter
  • 6128 Plus
  • *
  • Posts: 551
  • Country: au
    • index.php?action=treasury
  • Liked: 279
  • Likes Given: 145
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #10 on: 16: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.

Offline coox

  • Speccy
  • *
  • Posts: 1
  • Country: fr
  • Liked: 1
  • Likes Given: 0
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #11 on: 11: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!

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.257
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1167
  • Likes Given: 73
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #12 on: 13:48, 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.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #13 on: 19: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.



My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #14 on: 19:34, 04 October 15 »
@Targhan:

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.



My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Online pelrun

  • VK4CPC
  • Supporter
  • 6128 Plus
  • *
  • Posts: 551
  • Country: au
    • index.php?action=treasury
  • Liked: 279
  • Likes Given: 145
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #15 on: 08:32, 06 October 15 »
This needed fixing for me to compile it successfully.


Weeeird, I couldn't get gcc to complain about it to me. Fixed.

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 337
  • Country: fr
  • Liked: 268
  • Likes Given: 1
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #16 on: 22: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!

Online pelrun

  • VK4CPC
  • Supporter
  • 6128 Plus
  • *
  • Posts: 551
  • Country: au
    • index.php?action=treasury
  • Liked: 279
  • Likes Given: 145
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #17 on: 11: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.
« Last Edit: 11:50, 28 February 16 by pelrun »

Offline Poliander

  • Supporter
  • CPC6128
  • *
  • Posts: 160
  • Country: de
  • Liked: 78
  • Likes Given: 61
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #18 on: 17:50, 19 June 16 »
Any idea why AFT.EXE doesn't work here? MiniBooster is connected, USB drivers are installed...

Schneider CPC 664 • X-MEM • X-MASS • CTM 644 • DMP 2160 — Schneider CPC 6128 • M4 Board • Z-MEM • OSSC

Offline Poliander

  • Supporter
  • CPC6128
  • *
  • Posts: 160
  • Country: de
  • Liked: 78
  • Likes Given: 61
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #19 on: 18:30, 19 June 16 »
...hmmm... original aft.exe from centpourcent.net has issues, too..  :'(

Schneider CPC 664 • X-MEM • X-MASS • CTM 644 • DMP 2160 — Schneider CPC 6128 • M4 Board • Z-MEM • OSSC

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2251
  • Likes Given: 3477
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #20 on: 20:12, 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?) ?
« Last Edit: 20:15, 19 June 16 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Poliander

  • Supporter
  • CPC6128
  • *
  • Posts: 160
  • Country: de
  • Liked: 78
  • Likes Given: 61
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #21 on: 20:28, 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!
« Last Edit: 20:39, 19 June 16 by Poliander »
Schneider CPC 664 • X-MEM • X-MASS • CTM 644 • DMP 2160 — Schneider CPC 6128 • M4 Board • Z-MEM • OSSC

Online pelrun

  • VK4CPC
  • Supporter
  • 6128 Plus
  • *
  • Posts: 551
  • Country: au
    • index.php?action=treasury
  • Liked: 279
  • Likes Given: 145
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #22 on: 22:13, 19 June 16 »
What version of the arkos tools are you using on the CPC side?

Offline Poliander

  • Supporter
  • CPC6128
  • *
  • Posts: 160
  • Country: de
  • Liked: 78
  • Likes Given: 61
Re: Updated/Fixed AFT.EXE for windows+minibooster users
« Reply #23 on: 22:18, 19 June 16 »
VERSION.BAS says "1.0", WriteDSK is V1.2
« Last Edit: 21:46, 20 June 16 by Poliander »
Schneider CPC 664 • X-MEM • X-MASS • CTM 644 • DMP 2160 — Schneider CPC 6128 • M4 Board • Z-MEM • OSSC