From 8c15563be60d1143cfc7ec8ec94105a05d2aa9fc Mon Sep 17 00:00:00 2001 From: AlexanderR Date: Thu, 26 Dec 2013 16:46:48 +1100 Subject: [PATCH] Added Reicast --- metadata/com.reicast.emulator.txt | 29 ++++++++ metadata/com.reicast.emulator/omguya.patch | 84 ++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 metadata/com.reicast.emulator.txt create mode 100644 metadata/com.reicast.emulator/omguya.patch diff --git a/metadata/com.reicast.emulator.txt b/metadata/com.reicast.emulator.txt new file mode 100644 index 0000000000..5ef11bece6 --- /dev/null +++ b/metadata/com.reicast.emulator.txt @@ -0,0 +1,29 @@ +Categories:Games +License:GPL +Web Site:http://reicast.com/ +Source Code:https://github.com/reicast/reicast-emulator +Issue Tracker:https://github.com/reicast/reicast-emulator/issues + +Summary:Sega Dreamcast Emulator +Description: +This is a fork/rewrite/remix of various versions of nulldc and nulldce. +Bios/flash have to be on /sdcard/dc/data/dc_boot.bin and /sdcard/dc/data/dc_flash.bin. +Supported game formats: gdi, chd. +. + +Repo Type:git +Repo:https://github.com/reicast/reicast-emulator.git + +Build:0.r5+,6 + commit=c6e1d41b20cd0 + subdir=reicast/android/ + buildjni=yes + rm=reicast/android/libs/ouya-sdk.jar + init=echo "APP_CFLAGS+=-Wno-error=format-security" >> jni/Application.mk && \ + find .. -regex ".+\.\(a\|dll\|so\|exe\|lib\)" -type f -delete + patch=omguya.patch + target=android-17 + +Auto Update Mode:None +Update Check Mode:RepoManifest + diff --git a/metadata/com.reicast.emulator/omguya.patch b/metadata/com.reicast.emulator/omguya.patch new file mode 100644 index 0000000000..f416ee94d4 --- /dev/null +++ b/metadata/com.reicast.emulator/omguya.patch @@ -0,0 +1,84 @@ +diff --git a/reicast/android/src/com/reicast/emulator/GL2JNIActivity.java b/reicast/android/src/com/reicast/emulator/GL2JNIActivity.java +index 9809109..e32c965 100644 +--- a/reicast/android/src/com/reicast/emulator/GL2JNIActivity.java ++++ b/reicast/android/src/com/reicast/emulator/GL2JNIActivity.java +@@ -3,8 +3,6 @@ package com.reicast.emulator; + import java.io.IOException; + import java.io.InputStream; + +-import tv.ouya.console.api.OuyaController; +- + import com.reicast.emulator.GL2JNIView.EmuThread; + import com.example.newdc.JNIdc; + +@@ -161,22 +159,6 @@ public class GL2JNIActivity extends Activity + //Get all the axis for the KeyEvent + + //Joystick +- if((event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) { +- +- //do other things with joystick +- float LS_X = event.getAxisValue(OuyaController.AXIS_LS_X); +- float LS_Y = event.getAxisValue(OuyaController.AXIS_LS_Y); +- float RS_X = event.getAxisValue(OuyaController.AXIS_RS_X); +- float RS_Y = event.getAxisValue(OuyaController.AXIS_RS_Y); +- float L2 = event.getAxisValue(OuyaController.AXIS_L2); +- float R2 = event.getAxisValue(OuyaController.AXIS_R2); +- +- GL2JNIView.lt = (int)(L2 * 255); +- GL2JNIView.rt = (int)(R2 * 255); +- +- GL2JNIView.jx = (int)(LS_X * 126); +- GL2JNIView.jy = (int)(LS_Y * 126); +- } + + + return true; +@@ -194,35 +176,9 @@ public class GL2JNIActivity extends Activity + private static final int key_CONT_Y = 0x0200; + private static final int key_CONT_X = 0x0400; + +- int map[] = new int[] { +- OuyaController.BUTTON_O, key_CONT_A, +- OuyaController.BUTTON_A, key_CONT_B, +- OuyaController.BUTTON_Y, key_CONT_Y, +- OuyaController.BUTTON_U, key_CONT_X, +- +- OuyaController.BUTTON_DPAD_UP, key_CONT_DPAD_UP, +- OuyaController.BUTTON_DPAD_DOWN, key_CONT_DPAD_DOWN, +- OuyaController.BUTTON_DPAD_LEFT, key_CONT_DPAD_LEFT, +- OuyaController.BUTTON_DPAD_RIGHT, key_CONT_DPAD_RIGHT, +- +- OuyaController.BUTTON_MENU, key_CONT_START, +- OuyaController.BUTTON_L1, key_CONT_START +- +- }; + + boolean handle_key(int kc, boolean down) { + boolean rav = false; +- for (int i=0;i