2018-02-10 17:33:54 +00:00
|
|
|
# Linux
|
|
|
|
|
2019-11-02 19:23:30 +00:00
|
|
|
* [Structure](#structure)
|
|
|
|
* [What works](#what-works)
|
|
|
|
* [Executables](#executables)
|
|
|
|
* [applen](#applen)
|
|
|
|
* [qapple](#qapple)
|
2020-12-04 21:03:57 +00:00
|
|
|
* [sa2](#sa2)
|
2020-12-12 13:48:33 +00:00
|
|
|
* [libretro](#ra2)
|
2019-11-02 19:23:30 +00:00
|
|
|
* [Build](#build)
|
2019-12-14 20:03:30 +00:00
|
|
|
* [Checkout](#checkout)
|
2019-11-02 19:23:30 +00:00
|
|
|
* [Fedora](#fedora)
|
2021-03-22 08:08:31 +00:00
|
|
|
* [Raspberry Pi OS and Ubuntu](#raspbian)
|
2019-12-14 20:03:30 +00:00
|
|
|
* [Speed](#build)
|
|
|
|
* [Fedora](#fedora-1)
|
|
|
|
* [Raspbian](#raspbian-1)
|
2019-11-02 19:23:30 +00:00
|
|
|
|
2018-02-10 17:33:54 +00:00
|
|
|
## Structure
|
|
|
|
|
2020-12-04 21:03:57 +00:00
|
|
|
There are 4 projects
|
2018-02-10 17:33:54 +00:00
|
|
|
|
|
|
|
* libapple: the core emulator files
|
|
|
|
* applen: a frontend based on ncurses
|
|
|
|
* qapple: Qt frontend
|
2020-12-04 21:03:57 +00:00
|
|
|
* sa2: SDL2 frontend
|
2020-12-25 21:59:48 +00:00
|
|
|
* libra2: a libretro core
|
2018-02-10 17:33:54 +00:00
|
|
|
|
2018-02-10 17:52:35 +00:00
|
|
|
The libapple interface is a *link time* interface: some functions are not defined and must be provided in order to properly link
|
2018-02-10 17:33:54 +00:00
|
|
|
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 *
|
|
|
|
* exclude some Windows heavy blocks (source/MouseInterface.cpp)
|
|
|
|
|
|
|
|
## What works
|
|
|
|
|
|
|
|
Some key files have been completely reimplemented or discarded:
|
|
|
|
|
|
|
|
* AppleWin.cpp
|
2020-11-30 09:26:27 +00:00
|
|
|
* WinFrame.cpp
|
|
|
|
* WinVideo.cpp
|
2018-02-10 17:33:54 +00:00
|
|
|
|
|
|
|
Some features totally ignored:
|
|
|
|
|
|
|
|
* ethernet
|
|
|
|
* serial port
|
|
|
|
* debugger
|
|
|
|
|
2019-11-22 20:50:02 +00:00
|
|
|
The rest is in a very usable state.
|
2018-02-10 17:33:54 +00:00
|
|
|
|
2019-11-02 19:23:30 +00:00
|
|
|
## Executables
|
|
|
|
|
2018-02-10 17:33:54 +00:00
|
|
|
### applen
|
|
|
|
|
|
|
|
Frontend based on ncurses, with a ASCII art graphic mode.
|
|
|
|
|
|
|
|
Keyboard shortcuts
|
|
|
|
|
2020-12-15 17:37:21 +00:00
|
|
|
* ``F2``: reset the machine
|
|
|
|
* ``F3``: terminate the emulator
|
|
|
|
* ``F11``, ``F12``: Save, Load Snapshot
|
|
|
|
* ``ALT-RIGHT``: wider hi res graphis
|
|
|
|
* ``ALT-LEFT``: narrower hi res graphics
|
|
|
|
* ``ALT-UP``: vertical hi res (smaller)
|
2021-03-22 08:08:31 +00:00
|
|
|
* ``ALT-DOWN``: vertical hi res (bigger)
|
2018-02-10 17:33:54 +00:00
|
|
|
|
2018-02-10 17:52:35 +00:00
|
|
|
In order to properly appreciate the wider hi res graphics, open a big terminal window and choose a small font size.
|
2020-12-23 17:43:54 +00:00
|
|
|
Try ``CTRL-`` as well if ``ALT-`` does not work: terminals do not report a consistent keycode for these combinations.
|
2018-02-10 17:52:35 +00:00
|
|
|
|
2020-12-31 14:34:00 +00:00
|
|
|
The joystick uses evdev (``--device-name /dev/input/by-id/id_of_device``).
|
2018-02-10 17:33:54 +00:00
|
|
|
|
|
|
|
### qapple
|
|
|
|
|
2020-12-31 14:34:00 +00:00
|
|
|
This is based on Qt.
|
2018-02-10 17:33:54 +00:00
|
|
|
|
|
|
|
* keyboard shortcuts are listed in the menu entries
|
2019-11-22 20:50:02 +00:00
|
|
|
* graphics: runs the native NTSC code
|
2020-11-30 09:26:27 +00:00
|
|
|
* joystick: it uses QtGamepad
|
2018-02-10 17:33:54 +00:00
|
|
|
* emulator runs in the main UI thread
|
|
|
|
* Qt timers are very coarse: the emulator needs to dynamically adapt the cycles to execute
|
2019-11-10 19:38:42 +00:00
|
|
|
* the app runs at 60FPS with correction for uneven timer deltas.
|
2018-02-10 17:33:54 +00:00
|
|
|
* full speed when disk spins execute up to 5 ms real wall clock of emulator code (then returns to Qt)
|
2019-11-10 19:39:09 +00:00
|
|
|
* (standard) audio is supported and there are a few configuration options to tune the latency (default very conservative 200ms)
|
2020-10-11 10:29:37 +01:00
|
|
|
* Open Apple and Solid Apple can be emulated using AltGr and Menu (unfortunately, Alt does not work well)
|
2018-02-10 17:33:54 +00:00
|
|
|
|
2020-12-04 21:03:57 +00:00
|
|
|
### sa2
|
|
|
|
|
2021-03-19 07:41:14 +00:00
|
|
|
See [sa2](source/frontends/sdl/README.md).
|
2020-12-04 21:03:57 +00:00
|
|
|
|
2020-12-12 13:48:33 +00:00
|
|
|
### ra2
|
|
|
|
|
2020-12-12 19:27:28 +00:00
|
|
|
There is an initial [libretro](https://docs.libretro.com/development/cores/developing-cores/) core.
|
|
|
|
|
2020-12-23 17:43:54 +00:00
|
|
|
A retropad can be plugged in port 1 (with or without analog stick).
|
|
|
|
|
2020-12-23 18:55:26 +00:00
|
|
|
Keyboard emulation
|
|
|
|
|
|
|
|
* ``JOYPAD_R``: equivalent to ``F9`` to cycle video types
|
|
|
|
* ``JOYPAD_L``: equivalent to ``CTRL-SHIFT-F6`` to cycle 50% scan lines
|
|
|
|
* ``START``: equivalent to ``F2`` to reset the machine
|
|
|
|
|
2020-12-23 17:43:54 +00:00
|
|
|
In order to have a better experience with the keyboard, one should probably enable *Game Focus Mode* (normally Scroll-Lock) to disable hotkeys.
|
2020-12-12 19:27:28 +00:00
|
|
|
|
|
|
|
Video works, but the vertical flip is done in software.
|
2020-12-12 13:48:33 +00:00
|
|
|
|
2020-12-26 19:28:51 +00:00
|
|
|
Audio (speaker) works.
|
2020-12-25 21:59:48 +00:00
|
|
|
|
2020-12-12 13:48:33 +00:00
|
|
|
Must be manually configured:
|
|
|
|
``cmake -DLIBRETRO_PATH=/path/to/libretro-common``
|
|
|
|
|
|
|
|
Easiest way to run from the ``build`` folder:
|
2020-12-23 19:36:11 +00:00
|
|
|
``retroarch -L source/frontends/libretro/libra2.so ../Disks/NoSlotClockTest.dsk``
|
2020-12-12 13:48:33 +00:00
|
|
|
|
2018-02-10 17:33:54 +00:00
|
|
|
## Build
|
|
|
|
|
2019-11-02 19:23:30 +00:00
|
|
|
The project can be built using cmake from the top level directory.
|
2018-02-10 17:33:54 +00:00
|
|
|
|
|
|
|
qapple can be managed from Qt Creator as well and the 2 have coexisted so far, but YMMV.
|
2019-11-02 19:23:30 +00:00
|
|
|
|
2019-12-14 20:03:30 +00:00
|
|
|
### Checkout
|
|
|
|
|
|
|
|
```
|
|
|
|
git clone https://github.com/audetto/AppleWin.git --recursive
|
|
|
|
cd AppleWin
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2021-03-22 08:08:31 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
|
2019-12-14 20:03:30 +00:00
|
|
|
make
|
|
|
|
```
|
|
|
|
|
2019-11-02 19:23:30 +00:00
|
|
|
### Fedora
|
|
|
|
|
|
|
|
On Fedora 31, from a fresh installation, install all packages from [fedora.list.txt](source/linux/fedora.list.txt).
|
|
|
|
|
2021-03-22 08:08:31 +00:00
|
|
|
### Raspberry Pi OS, Ubuntu and other Debian distributions
|
|
|
|
|
|
|
|
Install all packages from [raspbian.list.txt](source/linux/raspbian.list.txt).
|
2019-12-14 20:03:30 +00:00
|
|
|
|
2021-03-22 08:08:31 +00:00
|
|
|
You can use `sudo apt-get -y install $(cat raspbian.list.txt)` for an automated installation.
|
2019-12-14 20:03:30 +00:00
|
|
|
|
2020-12-04 21:03:57 +00:00
|
|
|
See [Travis](.travis.yml) CI too.
|
2019-12-14 20:03:30 +00:00
|
|
|
|
|
|
|
## Speed
|
|
|
|
|
|
|
|
### Fedora
|
|
|
|
|
|
|
|
Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz
|
|
|
|
|
|
|
|
Full update = 582 MHz
|
|
|
|
|
|
|
|
| Video Stype | Video update |
|
|
|
|
| :--- | ---: |
|
|
|
|
| RGB Monitor | 39 |
|
|
|
|
| NTSC Monitor | 27 |
|
|
|
|
| Color TV | 25 |
|
|
|
|
| B&W TV | 27 |
|
|
|
|
| Amber Monitor | 31 |
|
|
|
|
|
|
|
|
### Raspbian
|
|
|
|
|
|
|
|
Pi 3B+
|
|
|
|
|
|
|
|
Full update = 54 MHz
|
2019-11-02 19:23:30 +00:00
|
|
|
|
2019-12-14 20:03:30 +00:00
|
|
|
| Video Stype | Video update |
|
|
|
|
| :--- | ---: |
|
|
|
|
| RGB Monitor | 5.3 |
|
|
|
|
| NTSC Monitor | 3.6 |
|
|
|
|
| Color TV | 2.6 |
|
|
|
|
| B&W TV | 2.9 |
|
|
|
|
| Amber Monitor | 4.5 |
|