diff --git a/LaunchAPPL/LaunchAPPL.cfg.example b/LaunchAPPL/LaunchAPPL.cfg.example index a34401bc3b..81de764f00 100644 --- a/LaunchAPPL/LaunchAPPL.cfg.example +++ b/LaunchAPPL/LaunchAPPL.cfg.example @@ -20,7 +20,7 @@ # ########### A real Mac connected via a serial cable - # Prerequisited: + # Prerequisites: # - A Mac with a modem port, and any classic Mac system software # - The LaunchAPPLServer application # (`Retro68-build/build-target/LaunchAPPL/Server/`) running on that Mac @@ -36,6 +36,25 @@ # serial-baud = 19200 +# ########### A real Mac running Mac OS X + + # Prerequisites + # - A Mac running Mac OS X that is reachable via ssh + # - LaunchAPPL compiled for that Mac + +# ########### A real Mac connected via TCP/IP + + # Prerequisites: + # - An old Mac connected to your local TCP/IP network + # - System Software that supports MacTCP or OpenTransport + # - LanchAPPLServer compiled by Retro68 for your old Mac + # - A firewall that protects your Mac from the open internet + # (LaunchAPPLServer opens an unsecured TCP port and executes any application it receives there!) + +# emulator = tcp +# tcp-address = 192.168.0.42 # IP address of your mac + + # ########### Mini vMac (old 68K Macs) # To use Mini vMac with LaunchAPPL, you need to supply the ROM file, @@ -87,4 +106,3 @@ # executor-option = -appearance # uncommenting these two lines # executor-option = windows # is seriously not recommended. - diff --git a/README.md b/README.md index 4374caea4f..b25ca06ff6 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Installing/Building - Linux, Mac OS X or Windows (via Cygwin) - boost -- CMake 2.8 +- CMake 3.8 or later - GCC dependencies: GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+ - bison version 3.0.2 or later - Apple Universal Interfaces (version 3.x; version 3.4 is tested) @@ -106,7 +106,7 @@ to add that to your `PATH`. If you're building this on a PowerMac running Mac OS X 10.4, tell the build script to use the gcc you've installed via tigerbrew: - ../Retro68/build-toolchain.bash --host-cxx-compiler=g++-5 --host-c-compiler=gcc-5 + ../Retro68/build-toolchain.bash --host-cxx-compiler=g++-7 --host-c-compiler=gcc-7 ### Build options and recompiling @@ -234,13 +234,6 @@ GNU assembler (`powerpc-apple-macos-as`). Well, as long as the .o file does not use global variables or non-local function calls. Used to import glue code from MPW's `Interface.o` library. -### MakeAPPL - -Reads a FLAT executable as output by elf2flt and converts it to -a MacBinary file containing a classic Macintosh application. -The CMake setup for the sample programs no longer uses this, but rather uses -Rez to generate the appropriate resources. - ### PEFTools Tools supporting the Apple's PEF format, the Preferred Executable Format @@ -334,6 +327,7 @@ Currently, LaunchAPPL supports the following methods for launching Mac applicati * executor - launch using Executor * ssh - Invoke the `LaunchAPPL` tool remotely via ssh * serial - Connect to a real Mac running the `LaunchAPPLServer` application via a null modem cable +* tcp - Connect to a real Mac running the `LaunchAPPLServer` application via a completely insecure TCP connection If you're running on a Mac that's old enough to use the `classic` or `carbon` backends, they will work out of the box, just launch an application as follows @@ -347,7 +341,7 @@ copy the file `Retro68/LaunchAPPL/LaunchAPPL.cfg.example` to `~/.LaunchAPPL.cfg` and edit to taste (documentation is provided in comments). **CONTRIBUTION OPPORTUNITY** - This tool can easily be extended with further backends, -so make it work with your favourtite emulator. Just add new subclasses for the +so make it work with your favourite emulator. Just add new subclasses for the `LaunchMethod` and `Launcher` classes, they're documented. ### The Test Suite diff --git a/docs/BFLT.pdf b/docs/BFLT.pdf deleted file mode 100644 index a64f14e406..0000000000 Binary files a/docs/BFLT.pdf and /dev/null differ diff --git a/docs/uClinux - BFLT Binary Flat Format.html b/docs/uClinux - BFLT Binary Flat Format.html deleted file mode 100644 index dfc095419d..0000000000 --- a/docs/uClinux - BFLT Binary Flat Format.html +++ /dev/null @@ -1,225 +0,0 @@ - -
-- - |
- -
-uClinux uses a Binary Flat format commonly known as BFLT. It is a relatively simple -and lightweight executable format based on the original a.out format. It has seen -two major revisions, version 2 and more recently version 4. Version 2 is used by the -m68k-coff compilers and is still in use with the ARM elf2flt converter while version -4 is used with the m68k elf2flt converter. Like many open source projects worked on -by many individuals, little features have creped into versions without the revision -field changing. As a consequence what we detail in each version may not strictly be -the case in all circumstances. Both the 2.0.x and 2.4.x kernels’ bFLT loaders in the -CVS support both formats. Earlier kernels may need to have binfmt_flat.c and flat.c -patched to support version 4, should version 4 binaries report the following message -when loading - --bFLT:not found. -bad magic/rev(4,need 2) --
-struct flat_hdr { - char magic[4]; - unsigned long rev; /* version */ - unsigned long entry; /* Offset of first executable instruction - with text segment from beginning of file */ - unsigned long data_start; /* Offset of data segment from beginning of - file */ - unsigned long data_end; /* Offset of end of data segment - from beginning of file */ - unsigned long bss_end; /* Offset of end of bss segment from beginning - of file */ - - /* (It is assumed that data_end through bss_end forms the bss segment.) */ - - unsigned long stack_size; /* Size of stack, in bytes */ - unsigned long reloc_start; /* Offset of relocation records from - beginning of file */ - unsigned long reloc_count; /* Number of relocation records */ - unsigned long flags; - unsigned long filler[6]; /* Reserved, set to zero */ -}; -- - -Following the segments’ start and end pointers comes the stack size field specified -in bytes. This is normally set to 4096 by the m68k bFLT converters and can be -changed by passing an argument (-s) to the elf2flt / coff2flt utility. - --The next two fields specify the details of the relocations. Each relocation is a -long (32 bits) with the relocation table following the data segment in the flat -binary file. The relocation entries are different per bFLT version. - --Version 2 specified a 2 bit type and 30 bit offset per relocation. This causes a -headache with endianess problems. The 30 bit relocation is a pointer relative to -zero where an absolute address is used. The type indicates whether the absolute -address points to .text, .data or .bss. - --#define FLAT_RELOC_TYPE_TEXT 0 -#define FLAT_RELOC_TYPE_DATA 1 -#define FLAT_RELOC_TYPE_BSS 2 - -struct flat_reloc { -#if defined(__BIG_ENDIAN_BITFIELD) /* bit fields, ugh ! */ - unsigned long type : 2; - signed long offset : 30; -#elif defined(__LITTLE_ENDIAN_BITFIELD) - signed long offset : 30; - unsigned long type : 2; -#endif -- - -This enables the flat loader to fix-up absolute addressing at runtime by jumping -to the absolute address specified by the relocation entry and adding the loaded -base address to the existing address. - --Version 4 removed the need of specifying a relocation type. Each relocation entry -simply contains a pointer to an absolute address in need of fix-up. As the bFLT -loader can determine the length of the .text segment at runtime (data_start - -entry) we can use this to determine what segment the relocation is for. If the -absolute address before fix-up is less that the text length, we can safety -assume the relocation is pointing to the text segment and this add the base address -of this segment to the absolute address. - --On the other hand if the absolute address before fix-up is greater than the text -length, then the absolute address must be pointing to .data or .bss. As .bss -always immediately follows the data segment there is no need to have a distinction, -we just add the base address of the data segment and subtract the length of the -text segment. We subtract the text segment as the absolute address in version 4 -is relative to zero and not to the start of the data segment. - --Now you could say we may take it one step further. As every absolute address is -referenced to zero, we can simply add the base address of the text segment to -each address needing fix-up. This would be true if the data segment immediately -follows the text segment, but we now have complications of -msep-data where the -text segment can be in ROM and the data segment in another location in RAM. -Therefore we can no longer assume that the .data+.bss segment and text segment -will immediately follow each other. - --The last defined field in the header is the flags. This appeared briefly in some -version 2 headers (Typically ARM) but was cemented in place with version 4. The -flags are defined as follows - --#define FLAT_FLAG_RAM 0x0001 /* load program entirely into RAM */ -#define FLAT_FLAG_GOTPIC 0x0002 /* program is PIC with GOT */ -#define FLAT_FLAG_GZIP 0x0004 /* all but the header is compressed */ -- - -Early version 2 binaries saw both the .text and .data segments loaded into RAM -regardless. XIP (eXecute in Place) was later introduced allowing programs to -execute from ROM with only the data segment being copied into RAM. In version -4, it is now assumed that each binary is loaded from ROM if GOTPIC is true and -FLAT_FLAG_GZIP and FLAT_FLAG_RAM is false. A binary can be forced to load into -RAM by forcing the FLAT_FLAG_RAM flag. - --The FLAT_FLAG_GOTPIC informs the loader that a GOT (Global Offset Table) is -present at the start of the data segment. This table includes offsets that -need to be relocated at runtime and thus allows XIP to work. (Data is accessed -through the GOT, thus relocations need not be made to the .text residing in ROM.) The -GOT is terminated with a -1, followed immediately by the data segment. - --The FLAT_FLAG_GZIP indicates the binary is compressed with the GZIP algorithm. -The header is left untouched, but the .text, .data and relocations are -compressed. Some bFLT loaders do not support GZIP and will report an error -at loading. - - -
- |