keirf / amiga-stuff

The Unlicense
259 stars 26 forks source link

Kickconv and Windows #13

Closed Squirrel61 closed 4 years ago

Squirrel61 commented 4 years ago

When looking for a tool to byteswap/split/join Kickstart files for EPROM burning, I found a few. But Kickconv seems the most useful tool I've found so far. The other tools require 32-bit DOS and a lot of scripting, or don't do the job at all.

So, what do I need to compile Kickconv for Windows, on a Windows machine? I think the tools mentioned in the readme only apply to Linux.

Or does a precompiled Windows version exist somewhere?

keirf commented 4 years ago

You could build within cygwin or mingw, or how about using Windows Subsystem for Linux (WSL) on Windows 10?

Arguably I should redo kickconv in python.

Squirrel61 commented 4 years ago

Thanks for the reply. I've looked at your suggestions, but I think for me it's better to use a Linux VM or maybe install Linux on one of the many old laptops I've got hanging around.

Are the binutils needed when I just want to compile Kickconv and nothing else? Or are they part of a linux distro anyway?

keirf commented 4 years ago

They are part of the compiler toolchain and you would generally always install them along with gcc

On Thu, 5 Dec 2019, 07:26 Squirrel61, notifications@github.com wrote:

Thanks for the reply. I've looked at your suggestions, but I think for me it's better to use a Linux VM or maybe install Linux on one of the many old laptops I've got hanging around.

Are the binutils needed when I just want to compile Kickconv and nothing else? Or are they part of a linux distro anyway?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/keirf/Amiga-Stuff/issues/13?email_source=notifications&email_token=AAGWZFXO4AOOYTQ22L5DHEDQXCUJVA5CNFSM4JVIGONKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF7YVVY#issuecomment-562006743, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGWZFSMZKX5M4RKRPD3T5LQXCUJVANCNFSM4JVIGONA .

Squirrel61 commented 4 years ago

Ok, thanks again! I created a Linux VM and managed to compile the tool, which for now is good enough since I'm able to copy/paste files between Linux and Windows (my EPROM programmer needs Windows).

Since one of my computers is running Windows 10, I guess I'll be able to use it under WSL. And maybe I'll look into cross-compiling it.

For now, I'll close the issue.

Squirrel61 commented 4 years ago

I'm currently trying to cross-compile the executable for Windows 32-bits, because my Eprom programmer is running on an old XP box, that is not really capable of comfortably running a Linux virtual machine. But for some reason I'm not able to get the compile working.

I have installed the MinGW-w64 package for 32-bit Windows, but when I call the compiler, it returns two warnings converted to errors. One is about be32toh, the other about htobe32. Both are stating "implicit declaration of function".

Is it possible that the MinGW package is too old? Somewhere in the package I found a version number 4.9.0 which is less than the version advised by you for the whole Amiga Stuff.

Squirrel61 commented 4 years ago

Don't ask me how, but somehow I managed to compile a W32 executable with MinGW on Windows. It still needs the cygwin library but that's not a problem, although the whole executable plus library is about 10 times as big as the Linux executable :(

I will test it tonight on my XP box, which is at home and if it's working, I can share it for other people.

blark commented 4 years ago

@Squirrel61 it really might be easier for you to use Python, for example I wrote this quick script to byteswap a ROM, and it's less than 20 lines. If you need it to do something else let me know I can add the feature.

Squirrel61 commented 4 years ago

Thanks @blark! Indeed a python script is a good alternative. Functions that I mainly use are the split and merge so I've created scripts for that too. Byteswap can be handled by my eprom programmer software so it doesn't really need a script. Nice to have are the checksum and decrypt functions, so I'm looking into creating scripts for that too. And maybe combine everything into one script, one day so it will be a nice replacement for the executable.

keirf commented 4 years ago

This is a much more sensible way to go.

blark commented 4 years ago

@Squirrel61 let me know if you need a hand. Currently I'm focusing on my A500 but I have a 1200 too that will eventually need some attention, and I'll probably need the same tools. @keirf thanks for your repos! I just made a couple of your TL866 Adapter v4 boards, currently waiting for the programmer so I can try them out ;)

Squirrel61 commented 4 years ago

I've written a few other scripts for the tasks that are important to me. They're all quick and dirty because I based them on your byteswap script and because of having zero experience with python but they do the job, whiich is good enough for me. And because it's python, they're supposed to work on whatever platform I'm using.

KickTools.zip