OpenAmigaExplorer is an attempt to reimplement the client side of Cloanto's AmigaExplorer. This first version is only aimed at supporting TCP/IP as the transport (serial cable transport probably uses the same protocol and should be fairly easy to add once the platform specific code has been done).
The main purpose of this client is to allow people using other operating systems than windows to access their amiga through AmigaExplorer. More specifically, letting me access my old A1200 from darwin (MacOS). The hopes with releasing this is that somebody will use the open amiga explorer library to add a better user interface. The current client is very simple and is mostly used to demonstrate the functionality and to test it.
This implementation is based entirely on reverse-engineering of the network protocol observed between the standard server and client.
There's now a short demonstration video online. Showing writing a disk image from a Mac onto a disk in the Amiga over ethernet and AmigaExplorer protocol.
You can download OpenAmigaExplorer from the anonymous CVS repository. Explanation of how to do can be found here on the source forge project page.
The supplied Jamfile is to be used with boost-build version 2. Boost-build is boundled with boost, which is also required. You first need to install boost-build v2 (which includes setting the environment variable BOOST_BUILD_PATH and modifying the user-config.jam). You must set BOOST_ROOT to the path where you have put boost, and asio-0.3.5 is assumed to be installed in a directory next to the openae one.
The library has been tested and built on the following platforms:
The example client has 4 operations:
The usage follows:
./aexplore ip-address command arguments
The IP-address is the address to the amiga computer running the AmigaExplorer server.
Command and arguments are one of the following:
ls remote-path
The remote-path is an amiga path, or can be an empty string ("") if you want to list the root filesystem.
rm remote-path ...
The arguments to rm is a variable number of paths to remote files that you want to remove. All of these will be removed.
get remote-path
The remote-path refers to the file, on the Amiga, that you want to download. The content of the file will be printed to standard out, so you generally want to redirect it to a file on the local machine. Any status messages will be printed to standard err.
put remote-path local-path
This command will upload the file specified by local-path and put it at the remote-path. The remote-path is supposed to include the filename you want the file to be called on the Amiga.
./aexplore 192.168.0.2 ls ""
This will list the root file system of your amiga, listing your volumes and the kickstart rom image.
./aexplore 192.168.0.2 get ":R:Kick.rom" > amiga.rom
This will download your Amiga's ROM to the local file amiga.rom.
./aexplore 192.168.0.2 put "RAM:/test.txt" test.txt
Assuming you have a file called test.txt in the current working directory, it will be uploaded to the ramdisk of your Amiga.
./aexplore 192.168.0.2 rm "RAM:/test.txt"
This will remove the file test.txt from the ramdisk of your Amiga.
There's another examples program called adf2disk, what it does is that it writes an adf file to a floppy on the Amiga. The commandline arguments follows:
adf2disk ip-address adf-file [device]
The ip-address is the address of the Amiga running the Amiga Explorer server.
adf-file is the local adf image file you want written to a disk.
device is an optional argument identifying the device you want to write to, default is DF0, but you can set it to DF1, DF2 etc.
Currently, the library is very simple, and mainly consists of two classes. Everything is declared in the openae namespace. It uses boost libraries as well as asio (which may become part of a future boost version).
#include<openae/connection.hpp>
Synopsis:
class connection { public: connection(asio::ipv4::tcp::endpoint const& target); std::vector<file_entry> directory_listing(std::string const& p); void get_file(std::string const& path , boost::function<void(std::vector<char> const&, int)> const& fun); void put_file(file_entry const& f , boost::function<void(std::vector<char>&, int)> const& fun); void remove_file(std::string const& p); void set_packet_size(int bytes); };
The connection class maintains a connection to the Amiga. When you create it it will try to connect to the network endpoint given to it. If connection fails an asio error exception is thrown.
Once a connection has been established you can access the four basic functions currently in the library.
std::vector<file_entry> directory_listing(std::string const& p);
This function will list the files in the remote path p. If p does not exist, or if it's not a directory, and exception is thrown. Upon successful retrieval of the directory listing, it is returned as a vector of file_entry. The members of that type are:
struct file_entry { file_entry(); enum filetype_t { volume, floppy, directory, file, rom, fdd_image, hdd_image }; enum protection_bits_t { deletable = 0x1, executable = 0x2, writable = 0x4, readable = 0x8, archived = 0x10, pure = 0x20, script = 0x40, hold = 0x80 }; int size; int protection_bits; boost::posix_time::ptime creation_timestamp; filetype_t type; std::string name; std::string comment; };
TODO: document the different filetypes
voif get_file(std::string const& path , boost::function<void(std::vector<char> const&, int)> const& fun);
This function will download the remote file specified by path. The file's content will be passed to the supplied callback function in parts. The arguments to the callback function are the data from the file and the total amount of bytes in the file.
The callback will be called several times for larger files, allowing the user to stream the file to disk.
TODO: document the remaining member functions on connection
Written by Arvid Norberg arvid@rasterbar.com, Copyright (c) 2005
This software uses portions of zlib, licensed under the zlib license.
Released under the terms of the GNU General Public License v2
Project is hosted by sourceforge.