Android port of KEGS Apple IIgs Emulator
Go to file
2024-06-10 22:31:52 -07:00
app Update Android Studio project to gradle 8.4.2 2024-06-10 22:31:52 -07:00
gradle/wrapper Update Android Studio project to gradle 8.4.2 2024-06-10 22:31:52 -07:00
build.gradle Update Android Studio project to gradle 8.4.2 2024-06-10 22:31:52 -07:00 More subdued emulation speed icon. 2012-10-26 20:21:15 -07:00 Update Android Studio project to gradle 8.4.2 2024-06-10 22:31:52 -07:00
gradlew Add gradle 2022-07-05 13:04:10 -07:00
gradlew.bat Add gradle 2022-07-05 13:04:10 -07:00 Use Android Studio 2022-07-05 13:17:08 -07:00
settings.gradle Add gradle 2022-07-05 13:04:10 -07:00

Port of Kent Dickey's KEGS Apple IIgs Emulator to Android. Also includes OG ActiveGS patches as of kegs_3_0_242.

You can find a release version in Google Play:

Usability notes: The touch screen acts as a big trackpad for the mouse.

To click and drag, either Long Press then drag or use one finger for movement and one finger for the mouse button.

It looks for disk images on the main sdcard or 'legacy' storage directory, and a few subdirectories under that: Downloads, KEGS, and Android/data/

If you want to edit the KEGS 'config.kegs' directly, edit 'default' in the last directory mentioned above.

Input: Physical keyboards should work, though on some devices you may need to reset the input method to something like Hacker's Keyboard.

Sound: If you hear no sound, do something where sound should be playing (perhaps the X-MAS demo main menu) and then adjust the sound volume. If KEGS is not generating sound, the volume buttons adjust a different sound level (for example your ringer)

Source code:

To build from source, open this project in Android Studio.

Changes made to KEGS:

  • Various ifdefs for __ANDROID__ in the kegs 'core'
  • Addition of android_driver.c and android_sound_driver.c

Application structure:

  • The UI is coordinated via KegsMain
  • There is a KegsThread class that gets its own thread. This thread ends up calling mainLoop() in jni/android_driver.c and running KEGS in that thread.
  • The native thread gets two things from Java: a Bitmap, and a ConcurrentLinkedQueue.

All UI events are sent to the native thread by pushing events into the ConcurrentLinkedQueue (KegsEvent, MouseKegsEvent, KeyKegsEvent).

The native thread pulls events off the queue, writes updates into the bitmap object, then calls the Java "updateScreen" in the KegsThread object.

The native thread also calls support functions in Java, such as checkForPause(), which blocks the native thread while it should be paused. See comments in for more details.

Android NDK samples were helpful when creating this port:

  • bitmap-plasma
  • JetBoy
  • native-audio
  • FireflyRenderer