diff --git a/linux.md b/linux.md new file mode 100644 index 00000000..87a59321 --- /dev/null +++ b/linux.md @@ -0,0 +1,75 @@ +# Linux + +## Structure + +There are 3 projects + +* libapple: the core emulator files +* applen: a frontend based on ncurses +* qapple: Qt frontend + +The libapple interface is a *link time* interface: some functions are not defined and must be provided in order to properly link +the application. These functions are listed in [interface.h](source/linux/interface.h). + +The main goal is to reuse the AppleWin source files without changes: only where really necessary the AppleWin source files have +been modified, mostly for + +* header files issues +* const char * +* STL constructor issues (see Disk_t and HDD) +* exclude some Windows heavy blocks (source/MouseInterface.cpp) + +## What works + +Some key files have been completely reimplemented or discarded: + +* AppleWin.cpp +* Video.cpp +* Frame.cpp +* NTSC.cpp + +Some features totally ignored: + +* NSTC colors +* ethernet +* serial port +* sound +* debugger +* speech + +The rest is in a usable state. + +### applen + +Frontend based on ncurses, with a ASCII art graphic mode. + +Keyboard shortcuts + +* F2: terminate emulator +* F12: Load Snapshot +* ALT-LEFT: 2x narrower hi res graphics +* ALT-RIGHT: 2x wider hi res graphis +* ALT-UP: 2x vertical +* ALT-DOWN: 2x vertical + +The joystick uses evdev. + +### qapple + +This is based on Qt, currently tested with 5.10 + +* keyboard shortcuts are listed in the menu entries +* graphics: code borrowed from linapple, no NTSC color + * lo res in color + * hi res in BW +* joystick: it uses QtGamepad (correct names will only be displayed with 5.11) +* emulator runs in the main UI thread +* Qt timers are very coarse: the emulator needs to dynamically adapt the cycles to execute +* full speed when disk spins execute up to 5 ms real wall clock of emulator code (then returns to Qt) + +## Build + +The project can be built using cmake. + +qapple can be managed from Qt Creator as well and the 2 have coexisted so far, but YMMV. +The file version.hpp is generated by cmake.