[HOWTO] - Build HxC Software in Debian 9.x - 64 bit

Share your own howto's etc. Not for support questions!

[HOWTO] - Build HxC Software in Debian 9.x - 64 bit

Postby lkraemer » 2019-12-21 02:29

[HOWTO] - Build HxC Software in Debian Ver 9.x - 64 bit]

Post by lkraemer » Fri Dec 20, 2019 19:30 pm
[HOWTO] - Build HxC Software in Debian Ver 9.x - 64 bit]

This HOWTO: will explain how to build (compile) hxcfe & hxcfloppyemulator, along with the dependencies for your Debian 9.x - 64 bit Linux.

Typically you need to install build-essential, and the headers for the kernel you are running.

Debian Stretch (Ver 9.x) Packages needed for Software Compile:
1. Build-Essential
2. Linux debian 4.9.0-11-amd64 Headers (or the Headers for your Version)

Code: Select all
$uname -r

will tell you the Linux kernel you are currently running: 4.9.0-11-amd64

Code: Select all
$sudo apt-get install build-essential linux-headers-$(uname -r)

will install the software needed to successfully compile your source code.

Install Additional Required Software to compile (build) hxcfe & hxcfloppyemulator:
Install libx11-dev and subversion. I also installed libncurses5-dev, since I built libdsk & cpmtools:

Code: Select all
$sudo apt-get install libncurses5-dev libx11-dev subversion libxft-dev

Create a new subdirectory of your choice to contain the downloaded subversion source code.
My choice was /home/user/Downloads/HxC/hxcfloppyemu-code-r1904/HxCFloppyEmulator
Code: Select all
$mkdir -p ~/Downloads/HxC/

NOTE: From this point on, it is assumed you execute the CLI Commands in ORDER.

Download the subversion source from this URL:

Download the Fast Light Tool Kit (FLTK) version 1.3.5 source (fltk-1.3.5-source.tar.gz) from this URL:

You may want to VERIFY the MD5SUM of the downloaded files, as required.

Checkout Revision 1904
Code: Select all
$svn checkout svn://svn.code.sf.net/p/hxcfloppyemu/code/ hxcfloppyemu-code
$cp -r ~/Downloads/fltk-1.3.5-source.tar.gz /home/user/Downloads/HxC/
$cd ~/Downloads/HxC
$tar -zxvf fltk-1.3.5-source.tar.gz

Code: Select all
$cd ~/Downloads/HxC/hxcfloppyemu-code-r1904/HxCFloppyEmulator/build
$ls -alt

In this directory should be a file named "Makefile"
Build the source with:

Code: Select all

It should build without errors. If there are errors, you will need to correct the problem causing the error and issue a:

Code: Select all
make clean

The files hxcfe & hxcfloppyemulator will be located in this directory:

Code: Select all
 $./hxcfe -help

HxC Floppy Emulator : Floppy image file converter v2.0.3.1
Copyright (C) 2006-2019 Jean-Francois DEL NERO
This program comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions;

libhxcfe version :

-help : This help
-license : Print the license
-verbose : Verbose mode
-script:[filename] : Script file to execute
-modulelist : List modules in the libhxcfe [FORMAT]
-rawlist : Disk layout list [DISKLAYOUT]
-interfacelist : Floppy interfaces mode list [INTERFACE_MODE]
-finput:[filename] : Input file image
-foutput:[filename] : Output file image
-conv:[FORMAT] : Convert the input file
-uselayout:[DISKLAYOUT] : Use the Layout [DISKLAYOUT]
-usb:[DRIVE] : start the usb floppy emulator
-infos : Print informations about the input file
-ifmode:[INTERFACE_MODE] : Select the floppy interface mode
-singlestep : Force the single step mode
-doublestep : Force the double step mode
-list : List the content of the floppy image
-getfile:[FILE] : Get a file from the floppy image
-putfile:[FILE] : Put a file to the floppy image

Stopping HxCFloppyEmulator...


Code: Select all

If the commands do not execute, check the file permissions:
-rwxr-xr-x 1 larry larry 789032 Dec 18 17:24 hxcfloppyemulator
-rwxr-xr-x 1 larry larry 27368 Dec 18 17:23 hxcfe

Additional command usage:

Code: Select all
$./hxcfe -modulelist
$./hxcfe -rawlist
$./hxcfe -interfacelist
$./hxcfe -finput:ampro.img -list
$./hxcfe -finput:ampro.img -infos
$./hxcfe -finput:kpii-mex.td0 -foutput:kpii-mex.hfe -conv:HXC_HFE
$./hxcfe -finput:kpii-mex.imd -foutput:kpii-mex_imd.hfe -conv:HXC_HFE
$./hxcfe -finput:kayii01.imd -foutput:kayii01_imd.hfe -conv:HXC_HFE

To get to the ./hxcfe & ./hxcfloppyemulator files easily I created a small script named hxc.sh located at /home/user

Code: Select all
#cd to the HxC build code, and exit there
# http://stackoverflow.com/questions/255414/why-doesnt-cd-work-in-a-bash-shell-script
# Usage:
#. ./hxc.sh
cd /home/user/Downloads/HxC//hxcfloppyemu-code-r1904/HxCFloppyEmulator/build
ls -alt
exec bash

Execute the script with:

Code: Select all

If you want to go to the calling directory, type exit at the end of the script.

Script permissions are:
Code: Select all
-rwxr-xr-x 1 user user 243 Mar 13 14:59 ./hxc.sh

This is a prerequisite for creating .SCP files from *.TD0 or *.IMD files, that will be written to Floppy's using
a GreaseWeazle. The GreaseWeazle can write a First Track as Single Density (SD) and the remaining
Tracks as Double Density (DD). This will allow you to write older CP/M Images to floppy(s) without a
SPECIAL Floppy Disk Controller (FDC) that HAS to pass the SD testing. Those FDC's that write a SD
first track are getting harder to locate.

There is also a GROUP located on Facebook with lots of additional information.


Posts: 184
Joined: 2011-02-09 05:02

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 5 guests