Building HxCFloppyEmulator on Linux

Everything related to using the HxC Floppy Emulator hardware on your Atari.

Moderators: mr.vince, DrCoolZic, Moderator Team

Gunstick
Captain Atari
Captain Atari
Posts: 252
Joined: Thu Jun 20, 2002 6:49 pm
Location: Luxembourg
Contact:

Building HxCFloppyEmulator on Linux

Postby Gunstick » Thu Mar 17, 2016 9:40 am

Hi

this is initially tested on a debian based, linux 64bit system. Based on this http://torlus.com/floppy/forum/viewtopic.php?f=2&t=1390 with quite some additions by me.

Code: Select all

# prepare your linux
sudo apt-get install build-essential linux-headers-$(uname -r) libncurses5-dev libx11-dev subversion

# get HxC
svn checkout svn://svn.code.sf.net/p/hxcfloppyemu/code/ hxcfloppyemu-code
# patch the source code
sed -i 's/-lX11/-lX11 -lXext -lXfixes/' hxcfloppyemu-code/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/build/Makefile

# get FLT
svn --no-auth-cache --username="" --password="" \
   checkout http://seriss.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3   # http://www.fltk.org/software.php#SVN
cp -pr fltk-1.3/* hxcfloppyemu-code/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/sources/thirdpartylibs/fltk/fltk-1.3.x/

# build
cd hxcfloppyemu-code/HxCFloppyEmulator/build/
make 

# create usable callers
cat > hxcfe.sh <<"EOF"
#!/bin/bash
cd "$(dirname "$0")"
exec ./hxcfe "$@"
EOF
chmod 755 hxcfe.sh

cat > hxcfloppyemulator.sh <<"EOF"
#!/bin/bash
cd "$(dirname "$0")"
exec ./hxcfloppyemulator "$@"
EOF
chmod 755 hxcfloppyemulator.sh



You can now call hxcfe.sh and hxcfloppyemulator.sh from anywhere without changing to the build directory first.

Gunstick
Captain Atari
Captain Atari
Posts: 252
Joined: Thu Jun 20, 2002 6:49 pm
Location: Luxembourg
Contact:

Re: Building HxCFloppyEmulator on Linux

Postby Gunstick » Thu Mar 17, 2016 9:51 am

Usage Gui:

Usual problem besides converting an MSA or ST to HXC is to quickly get a program to the ST

call hxcfloppyemulator.sh

click on "Disk Browser"

in new window, click on Create Disk

surprise, "get files" does not let you chose files. But drag/drop works.
so open a file browser. I used nautilus (gnome default) and dragged my *.TOS files over.

when floppy image is as you like, click on "save/export" (you can directly write to the SD card if you insert it before)

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1474
Joined: Sun Jul 31, 2011 1:11 pm

Re: Building HxCFloppyEmulator on Linux

Postby Eero Tamminen » Thu Mar 17, 2016 11:27 pm

You don't need Bash, if you use standard Posix shell string operations. This (untested) script can be used both as hxcfe.sh & hxcfloppyemulator.sh:

Code: Select all

#!/bin/sh
cd "${0%/*}"
exec "${0%.sh}" "$@"

Jeff_HxC2001
Captain Atari
Captain Atari
Posts: 290
Joined: Fri Sep 21, 2007 7:35 pm
Location: Paris - France
Contact:

Re: Building HxCFloppyEmulator on Linux

Postby Jeff_HxC2001 » Fri Mar 18, 2016 6:33 am

Gunstick wrote:surprise, "get files" does not let you chose files. But drag/drop works.
so open a file browser. I used nautilus (gnome default) and dragged my *.TOS files over.

when floppy image is as you like, click on "save/export" (you can directly write to the SD card if you insert it before)


Not a surprise : Get files is used to extract files from the image, not to add files to the image :wink:.

BTW On Linux Mint i don't have to modify the Makefile. Why do you need to do this ?

Gunstick
Captain Atari
Captain Atari
Posts: 252
Joined: Thu Jun 20, 2002 6:49 pm
Location: Luxembourg
Contact:

Re: Building HxCFloppyEmulator on Linux

Postby Gunstick » Sat Mar 19, 2016 2:54 pm

Jeff_HxC2001 wrote:
BTW On Linux Mint i don't have to modify the Makefile. Why do you need to do this ?


Because else it's not compiling the GUI.
When linking, I get errors like
undefined reference to `XFixesQueryExtension' -
undefined reference to `XdbeQueryExtension'

And google says that those are defined in separate libraries :-)
I also use linux mint, but it's LMDE1 and bloody updates don't work anymore. I will go to xubuntu.

Code: Select all

$ lsb_release -a
No LSB modules are available.
Distributor ID:   LinuxMint
Description:   LMDE Cinnamon Edition
Release:   1
Codename:   debian

Gunstick
Captain Atari
Captain Atari
Posts: 252
Joined: Thu Jun 20, 2002 6:49 pm
Location: Luxembourg
Contact:

Re: Building HxCFloppyEmulator on Linux

Postby Gunstick » Sat Mar 19, 2016 2:56 pm

Eero Tamminen wrote:You don't need Bash, if you use standard Posix shell string operations. This (untested) script can be used both as hxcfe.sh & hxcfloppyemulator.sh:

Code: Select all

#!/bin/sh
cd "${0%/*}"
exec "${0%.sh}" "$@"


Yeah I know, I was just too lazy to make it generic. Falling back to 1980 mode. In that sense it's compatible with old school Atari spirit, haha.

Gunstick
Captain Atari
Captain Atari
Posts: 252
Joined: Thu Jun 20, 2002 6:49 pm
Location: Luxembourg
Contact:

Re: Building HxCFloppyEmulator on Linux

Postby Gunstick » Fri Feb 24, 2017 6:52 pm

This thread should feature a command line example how to convert an ST or MSA file to HFE.

I searched for this info here and only found my own thead how to build the software, but not how to use the command line.
The moment I know again, I will put that here.

User avatar
leech
Captain Atari
Captain Atari
Posts: 451
Joined: Tue Dec 01, 2015 3:26 pm

Re: Building HxCFloppyEmulator on Linux

Postby leech » Fri Apr 28, 2017 5:07 pm

Hmm, this no longer builds under Debian Stretch.

Code: Select all

g++ -o hxcfloppyemulator    main.o utils.o main_gui.o msg_txt.o about_gui.o batch_converter_window.o floppy_dump_window.o floppy_infos_window.o license_gui.o log.o rawfile_loader_window.o sdhxcfecfg_window.o usbhxcfecfg_window.o cb_batch_converter_window.o cb_floppy_dump_window.o cb_floppy_infos_window.o cb_rawfile_loader_window.o cb_sdhxcfecfg_window.o cb_usbhxcfecfg_window.o cb_filesystem_generator_window.o filesystem_generator_window.o cb_edittool_window.o edittool_window.o microintro.o lzw.o pack.o rle.o hxcmod.o loader.o soft_cfg_file.o fileselector.o ../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a ../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk_images.a libhxcfe.so libusbhxcfe.so ../../../build/libhxcadaptor.a -lc -lm -ldl -lpthread -s -Wl,-rpath=.  -Wl,-Map,foo.map -lX11 -lXext -lXfixes -lXext -lXfixes
../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a(fl_font.o): In function `utf8extents(Fl_Font_Descriptor*, char const*, int, _XGlyphInfo*) [clone .isra.0]':
fl_font.cxx:(.text._ZL11utf8extentsP18Fl_Font_DescriptorPKciP11_XGlyphInfo.isra.0+0x45): undefined reference to `XftTextExtents32'
../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a(fl_font.o): In function `Fl_Font_Descriptor::Fl_Font_Descriptor(char const*, int, int)':
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x87): undefined reference to `FcPatternCreate'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x129): undefined reference to `FcPatternAddString'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x189): undefined reference to `FcPatternAddString'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x1a0): undefined reference to `FcPatternAddInteger'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x1b2): undefined reference to `FcPatternAddInteger'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x1d0): undefined reference to `FcPatternAddDouble'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x1e6): undefined reference to `FcPatternAddString'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x244): undefined reference to `FcMatrixRotate'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x256): undefined reference to `FcPatternAddMatrix'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x270): undefined reference to `XftFontMatch'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x287): undefined reference to `XftFontOpenPattern'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x2cc): undefined reference to `XftFontOpen'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x2d7): undefined reference to `FcPatternDestroy'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x2ff): undefined reference to `FcPatternDestroy'
fl_font.cxx:(.text._ZN18Fl_Font_DescriptorC2EPKcii+0x336): undefined reference to `XftFontOpenXlfd'
../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a(fl_font.o): In function `Fl_Xlib_Graphics_Driver::width(unsigned int)':
fl_font.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver5widthEj+0x37): undefined reference to `XftTextExtents32'
../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a(fl_font.o): In function `fl_destroy_xft_draw(unsigned long)':
fl_font.cxx:(.text._Z19fl_destroy_xft_drawm+0x1f): undefined reference to `XftDrawChange'
../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a(fl_font.o): In function `Fl_Xlib_Graphics_Driver::draw(char const*, int, int, int)':
fl_font.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver4drawEPKciii+0x69): undefined reference to `XftDrawCreate'
fl_font.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver4drawEPKciii+0x7e): undefined reference to `XftDrawChange'
fl_font.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver4drawEPKciii+0xb1): undefined reference to `XftDrawSetClip'
fl_font.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver4drawEPKciii+0x143): undefined reference to `XftDrawString32'
../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a(fl_font.o): In function `Fl_Xlib_Graphics_Driver::rtl_draw(char const*, int, int, int)':
fl_font.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver8rtl_drawEPKciii+0x48): undefined reference to `FcUtf8Len'
fl_font.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver8rtl_drawEPKciii+0xb2): undefined reference to `FcUtf8ToUcs4'
fl_font.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver8rtl_drawEPKciii+0xfa): undefined reference to `XftTextExtents32'
fl_font.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver8rtl_drawEPKciii+0x13f): undefined reference to `XftDrawCreate'
fl_font.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver8rtl_drawEPKciii+0x154): undefined reference to `XftDrawChange'
fl_font.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver8rtl_drawEPKciii+0x190): undefined reference to `XftDrawSetClip'
fl_font.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver8rtl_drawEPKciii+0x21f): undefined reference to `XftDrawString32'
../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a(Fl_Double_Window.o): In function `Fl_Xlib_Graphics_Driver::copy_offscreen_with_alpha(int, int, int, int, unsigned long, int, int)':
Fl_Double_Window.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver25copy_offscreen_with_alphaEiiiimii+0x52): undefined reference to `XRenderFindStandardFormat'
Fl_Double_Window.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver25copy_offscreen_with_alphaEiiiimii+0x90): undefined reference to `XRenderFindStandardFormat'
Fl_Double_Window.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver25copy_offscreen_with_alphaEiiiimii+0xbe): undefined reference to `XRenderCreatePicture'
Fl_Double_Window.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver25copy_offscreen_with_alphaEiiiimii+0xe0): undefined reference to `XRenderCreatePicture'
Fl_Double_Window.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver25copy_offscreen_with_alphaEiiiimii+0x12d): undefined reference to `XRenderSetPictureClipRegion'
Fl_Double_Window.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver25copy_offscreen_with_alphaEiiiimii+0x166): undefined reference to `XRenderComposite'
Fl_Double_Window.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver25copy_offscreen_with_alphaEiiiimii+0x179): undefined reference to `XRenderFreePicture'
Fl_Double_Window.cxx:(.text._ZN23Fl_Xlib_Graphics_Driver25copy_offscreen_with_alphaEiiiimii+0x188): undefined reference to `XRenderFreePicture'
../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a(Fl_x.o): In function `Fl_X::xrender_supported()':
Fl_x.cxx:(.text._ZN4Fl_X17xrender_supportedEv+0x24): undefined reference to `XRenderQueryExtension'
../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a(Fl_x.o): In function `Fl_X::set_cursor(Fl_RGB_Image const*, int, int)':
Fl_x.cxx:(.text._ZN4Fl_X10set_cursorEPK12Fl_RGB_Imageii+0x3b): undefined reference to `XcursorImageCreate'
Fl_x.cxx:(.text._ZN4Fl_X10set_cursorEPK12Fl_RGB_Imageii+0x137): undefined reference to `XcursorImageLoadCursor'
Fl_x.cxx:(.text._ZN4Fl_X10set_cursorEPK12Fl_RGB_Imageii+0x164): undefined reference to `XcursorImageDestroy'
../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a(screen_xywh.o): In function `screen_init()':
screen_xywh.cxx:(.text._ZL11screen_initv+0xf2): undefined reference to `XineramaIsActive'
screen_xywh.cxx:(.text._ZL11screen_initv+0x119): undefined reference to `XineramaQueryScreens'
collect2: error: ld returned 1 exit status
Makefile:59: recipe for target 'hxcfloppyemulator' failed
make[1]: *** [hxcfloppyemulator] Error 1
make[1]: Leaving directory '/home/jfergus/Documents/Development/hxcfloppyemu-code/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/build'
Makefile:11: recipe for target '../HxCFloppyEmulator_software/trunk/build/' failed
make: *** [../HxCFloppyEmulator_software/trunk/build/] Error 2


Social Media

     

Return to “HxC Floppy Emulator”

Who is online

Users browsing this forum: No registered users and 2 guests