Commit Graph

24 Commits

Author SHA1 Message Date
Oliver Schmidt 56bc098f41 Don't link against cfgmgr32.
It's done in https://github.com/scottmudge/libserialport-cmake/blob/master/CMakeLists.txt#L39 therefore I did it too but it isn't necessary and it isn't done in https://sigrok.org/gitweb/?p=libserialport.git;a=blob;f=configure.ac;hb=HEAD#l95.
2018-02-14 21:51:42 +01:00
Oliver Schmidt d810db6f49 Don't assert on communication error.
The serial communication is for sure to be considered an "external interface". Errors on external interfaces are not to be handled with an assert.
2018-02-14 21:30:09 +01:00
Oliver Schmidt a97458f07c Declared missing shutdown logic as unproblematic.
The only thing a shutdown logic would do is to clean up the very resources the OS cleans up anyway when interrupting the process. So I just don't see the point in the complexity of a signal handler (and SetConsoleCtrlHandler on Windows).
2018-02-14 21:22:16 +01:00
Oliver Schmidt beb202aeac Added baud rate option.
Interestingly libserialport doesn't complain about any weird value. So there's nothing to validate.

Surprisingly Windows doesn't complain about any weird value! So even the sp_set_config() succeeds!
2018-02-14 21:18:24 +01:00
Oliver Schmidt 610c00cd48 Fixed Linux build. 2018-02-12 23:37:58 +01:00
Oliver Schmidt ae320c2ca4 Several minor cleanups. 2018-02-05 13:28:31 +01:00
Oliver Schmidt 65cf9087bf Refined serial port selection.
So far up to two ports with the substring "usbserial" in their name were used. This was pretty platform specific and didn't allow to use non-USB ports at all.

Now if the -p option is given its value is used as substring as "usbserial" was used before. However if no -p option is given than up to two USB-backed ports are used.
2018-02-04 23:16:11 +01:00
Oliver Schmidt e575578fd0 Verbose output uses zero-based indices. 2018-02-04 22:35:04 +01:00
Oliver Schmidt e281c0061b Just some source code style cleanup. 2018-02-04 20:57:30 +01:00
Oliver Schmidt b958c660a9 Removed unnecessary source file.
https://github.com/digitalinteraction/openmovement/blob/master/Software/AX3/omconvert/mmap-win32.h already contains the full implementation.
2018-02-04 20:24:07 +01:00
Oliver Schmidt 413bfd6b96 Added check for success of file operations.
Note: As the drive 2 disk image filename is optional all access to drive 2 should trigger an I/O error on the client side.
2018-02-04 20:17:23 +01:00
Oliver Schmidt 9fd4088746 Added command line parsing (incl. printing usage). 2018-02-04 18:39:55 +01:00
Oliver Schmidt 21dbb3da3d Added check for at least one valid port. 2018-02-04 17:29:51 +01:00
Oliver Schmidt 8d7fe0bd12 Added Makefile to build the xHD client.
The binary is built with Merlin 32 - see https://www.brutaldeluxe.fr/products/crossdevtools/merlin/

The disk image updated with AppleCommander - see https://applecommander.github.io/
2018-01-31 23:30:43 +01:00
Oliver Schmidt 4cfc3e44d9 Ignore object files (and Windows binaries). 2018-01-31 13:56:42 +01:00
Oliver Schmidt 5afd68109d Added Makefile to build the xHD server.
On everything but Windows building xHDServer is so trivial that everything more than a minimal Makefile is inappropriate.

On Windows requiring an additional tool (like e.g. CMake) is just another obstacle. However, GNUmake comes with Mingw-w64.

In order to optimize the user experience it is desirable to build with a static variant of libserialport. However, doing so requires on Windows in general import libraries for all DLLs referred to by libserialport. For cfgmgr32.lib and setupapi.lib this would require the installation of the Platform SDK. But fortunately the Mingw variant of ld is able to link directly against DLLs instead of import libraries (see https://sourceware.org/binutils/docs-2.17/ld/WIN32.html). The line

LDLIBS += -lcfgmgr32 -lsetupapi

in the Makefile makes use of that feature. ld even finds the two DLLs in Windows\System32 without further hint.
2018-01-31 13:55:03 +01:00
Oliver Schmidt 7703e20cce Added mmap() for Windows.
In contrast to the Cygwin project the MinGW project isn't about bringing *IX features to Windows. Therefore it's not surprising that Mingw-w64 doesn't include support for mmap(). Fortunately this issue as already been solved - in fact several times. I chose the implementation in https://github.com/digitalinteraction/openmovement/tree/master/Software/AX3/omconvert as it seemed straightforward. If actually using the code should show issues I'd maybe try another variant.

Note: The mman.h "adapter" was added by me.
2018-01-31 11:58:16 +01:00
Oliver Schmidt 66220a9509 Added prebuilt libserialport for Windows.
The libserialport is part of PulseView. Therefore there's no standalone binary distribution of libserialport for Windows. The official alternative is to build libserialport from the sources. However, the official way to do so (see https://sigrok.org/wiki/Windows#Native_build_using_MSYS2) requires a full MSYS2 installation. This makes sense as the official build implies 'autogen.sh' and 'configure' (see https://sigrok.org/wiki/Libserialport).

The search for a more lightweight approach requiring only a pure Mingw-w64 installation revealed https://github.com/scottmudge/libserialport-cmake. However, its build description says 'Make sure you have installed one of the Windows SDKs (I have tested 8 and 10) so that you have the dependencies required for windows (cfgmgr32.lib and SetupAPI.Lib).' 'And obviously you need CMake installed as well.' So that still wasn't exactly lightweight.

But fortunately it also says 'I have also included precompiled libraries for x64 versions of Windows if you'd like to use those. Just make sure to copy libserialport.h into your "include" directory.'
2018-01-31 11:15:43 +01:00
Oliver Schmidt 992d77de93 Current xHD client for IIgs.
The code uses the SCC Z8530 found in the IIgs. It runs from bank $E0.

Supposed to be assembled with https://www.brutaldeluxe.fr/products/crossdevtools/merlin/
2018-01-26 22:04:39 +01:00
Oliver Schmidt 7f8f314ec6 Current xHDServer source code.
Incompatible protocol change.
2018-01-26 21:58:36 +01:00
Oliver Schmidt ae02f720cf Initial commit of xHDServer source code.
Depends on https://sigrok.org/wiki/Libserialport
2018-01-26 21:53:37 +01:00
Oliver Schmidt 00d1483462 Set license based on agreement from author.
From: John Brooks <jbrooks@blueshiftinc.com>
Date: Thu, 25 Jan 2018 14:50:09 -0800
To: Oliver Schmidt <ol.sc@web.de>

Sure the MIT license is fine by me. I hereby agree that the xHD client &
server source code and executables should be open-sourced to the public on
github under the MIT license.

-JB
2018-01-26 21:48:56 +01:00
Oliver Schmidt 62cab433d0 Force text file conversion for this repo. 2018-01-26 21:44:20 +01:00
Oliver Schmidt 49dd68b092
Initial commit 2018-01-25 22:52:21 +01:00