Android port of KEGS Apple IIgs Emulator
Go to file
James Sanford 5f3f8e3b33 Better user experience, force filesystem sync before starting.
We write a large file to disk and then go to read it back.
This was causing a multi second delay in the UI until the
data had been flushed to disk.  Now, we call sync() before
claiming that the assets are ready to be used.
2012-11-03 13:19:19 -07:00
ActionBarSherlock@90939dc392 Pull in ActionBarSherlock to work with API 10+ 2012-10-24 14:47:56 -07:00
assets Accept intents for local disk images. 2012-11-02 16:43:58 -07:00
jni Better user experience, force filesystem sync before starting. 2012-11-03 13:19:19 -07:00
res Add ability to hot swap disks. 2012-11-03 01:33:48 -07:00
src/com/froop/app/kegs Better user experience, force filesystem sync before starting. 2012-11-03 13:19:19 -07:00
.gitmodules Pull in ActionBarSherlock to work with API 10+ 2012-10-24 14:47:56 -07:00
AndroidManifest.xml Accept intents for local disk images. 2012-11-02 16:43:58 -07:00
create_dial.py More subdued emulation speed icon. 2012-10-26 20:21:15 -07:00
project.properties Use ActionBarSherlock and the Support Library to support API 10 and later. 2012-10-23 23:35:20 -07:00
README.md Fix markdown and mention ActiveGS patches. 2012-10-27 17:39:49 -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: https://play.google.com/store/apps/details?id=com.froop.app.kegs

Work in progress! Screen may be cropped in portrait mode on phones. Flip it over to landscape orientation.

Look on your sdcard in /Android/data/com.froop.app.kegs/files/ There's a 'default' config there that gets copied to 'config.kegs' on startup.

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.

Source code: https://github.com/jamessanford/kegs/

To build from source:

  (git submodule init && git submodule update)
  android update project -p ActionBarSherlock/library -s
  android update project -p . -s
  ndk-build
  ant debug install

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 deadlocks the thread while it should be paused. See comments in KegsThread.java for more details.

Android NDK samples were used as a base for this:

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