From e1d698155977bba22e878f4d22afb9b57c017b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelo=20Munhoz=20P=C3=A9los?= Date: Mon, 8 Jul 2013 22:28:17 -0300 Subject: [PATCH 01/37] Changes iOS directory to apple in gitignore. --- .gitignore | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f483ccc30b..0c2ecdafe2 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,6 @@ profile DerivedData .idea/ *.hmap -ios/tmp -ios/modules/*.dylib -ios/*.mobileprovision +apple/tmp +apple/modules/*.dylib +apple/*.mobileprovision From af3bef602fc988cc42c4d1fb4ef7769825c3770e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelo=20Munhoz=20P=C3=A9los?= Date: Mon, 8 Jul 2013 23:13:20 -0300 Subject: [PATCH 02/37] Removes file icon from ROM list. --- apple/iOS/browser.m | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apple/iOS/browser.m b/apple/iOS/browser.m index 38ee180681..9c6648a812 100644 --- a/apple/iOS/browser.m +++ b/apple/iOS/browser.m @@ -139,12 +139,17 @@ - (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { RADirectoryItem* path = (RADirectoryItem*)[self itemForIndexPath:indexPath]; + static NSString *CellIdentifier = @"path"; - UITableViewCell* cell = [self.tableView dequeueReusableCellWithIdentifier:@"path"]; - cell = (cell != nil) ? cell : [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"path"]; + UITableViewCell* cell = [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + cell = (cell != nil) ? cell : [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; cell.textLabel.text = [path.path lastPathComponent]; cell.accessoryType = (path.isDirectory) ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone; - cell.imageView.image = [UIImage imageNamed:(path.isDirectory) ? @"ic_dir" : @"ic_file"]; + + if (path.isDirectory) { + cell.imageView.image = [UIImage imageNamed:@"ic_dir"]; + } + return cell; } From 1d99eac1ec6f5ea964f061f441bb1ed791e2f843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelo=20Munhoz=20P=C3=A9los?= Date: Mon, 8 Jul 2013 23:55:55 -0300 Subject: [PATCH 03/37] Implements delete in ROM list. --- apple/iOS/browser.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apple/iOS/browser.m b/apple/iOS/browser.m index 9c6648a812..318e5b751e 100644 --- a/apple/iOS/browser.m +++ b/apple/iOS/browser.m @@ -158,6 +158,21 @@ return _sectionNames; } +- (void)tableView:(UITableView*)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath*)indexPath { + if (editingStyle == UITableViewCellEditingStyleDelete) { + NSFileManager *fileManager = [NSFileManager defaultManager]; + RADirectoryItem *path = (RADirectoryItem*)[self itemForIndexPath:indexPath]; + + BOOL didRemoveItem = [fileManager removeItemAtPath:path.path error:nil]; + + if (didRemoveItem) { + [self refresh]; + } else { + apple_display_alert(@"Not possible to delete file.", 0); + } + } +} + @end @implementation RAModuleList From 622702eb923e2aaaaac640f1b6e2f0b6bab91c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelo=20Munhoz=20Pe=CC=81los?= Date: Tue, 9 Jul 2013 16:51:02 -0300 Subject: [PATCH 04/37] Adds new Folder option in ROM list. --- apple/iOS/browser.m | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/apple/iOS/browser.m b/apple/iOS/browser.m index 318e5b751e..deee63ebfb 100644 --- a/apple/iOS/browser.m +++ b/apple/iOS/browser.m @@ -42,10 +42,9 @@ NSString* ragPath = [rootPath stringByAppendingPathComponent:@"RetroArchGames"]; RADirectoryList* list = [RADirectoryList directoryListForPath:path_is_directory(ragPath.UTF8String) ? ragPath : rootPath]; - list.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Refresh" - style:UIBarButtonItemStyleBordered - target:list - action:@selector(refresh)]; + + list.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"New Folder" style:UIBarButtonItemStyleBordered target:list action:@selector(createNewFolder)]; + return list; } @@ -173,6 +172,27 @@ } } +- (void)createNewFolder { + UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Enter new folder name" message:@"" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil]; + alertView.alertViewStyle = UIAlertViewStylePlainTextInput; + [alertView show]; +} + +- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { + NSString *text = [[alertView textFieldAtIndex:0] text]; + + if (buttonIndex == 1 && ![text isEqualToString:@""]) { + NSString *directoryPath = [_path stringByAppendingPathComponent:text]; + BOOL didCreateFolder = [[NSFileManager defaultManager] createDirectoryAtPath:directoryPath withIntermediateDirectories:YES attributes:nil error:nil]; + + if (didCreateFolder) { + [self refresh]; + } else { + apple_display_alert(@"Not possible to create folder.", 0); + } + } +} + @end @implementation RAModuleList From acfa16089e4305d343e3d5ffa1617e78b2e65ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelo=20Munhoz=20P=C3=A9los?= Date: Thu, 11 Jul 2013 23:40:40 -0300 Subject: [PATCH 05/37] Implements file move option in ROM list. --- apple/iOS/browser.m | 124 +++++++++++++++++++++++++++++++++++++++++--- apple/iOS/views.h | 15 +++++- 2 files changed, 131 insertions(+), 8 deletions(-) diff --git a/apple/iOS/browser.m b/apple/iOS/browser.m index deee63ebfb..fc038996e1 100644 --- a/apple/iOS/browser.m +++ b/apple/iOS/browser.m @@ -22,11 +22,6 @@ #include "conf/config_file.h" #include "file.h" -@interface RADirectoryItem : NSObject -@property (strong) NSString* path; -@property bool isDirectory; -@end - @implementation RADirectoryItem @end @@ -147,11 +142,32 @@ if (path.isDirectory) { cell.imageView.image = [UIImage imageNamed:@"ic_dir"]; + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + } else { + cell.imageView.image = nil; + cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton; } return cell; } +- (void)tableView:(UITableView*)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath*)indexPath { + self.selectedItem = [self itemForIndexPath:indexPath]; + UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; + UIActionSheet *menu = [[UIActionSheet alloc] initWithTitle:cell.textLabel.text delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Move", nil]; + + [menu showInView:[self view]]; +} + +- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { + if (buttonIndex == 0) { + RAFoldersList *foldersListViewController = [[RAFoldersList alloc] initWithFilePath:self.selectedItem.path]; + UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:foldersListViewController]; + + [self presentViewController:navigationController animated:YES completion:nil]; + } +} + - (NSArray*)sectionIndexTitlesForTableView:(UITableView*)tableView { return _sectionNames; @@ -167,7 +183,7 @@ if (didRemoveItem) { [self refresh]; } else { - apple_display_alert(@"Not possible to delete file.", 0); + apple_display_alert(@"It was not possible to delete file.", 0); } } } @@ -188,7 +204,7 @@ if (didCreateFolder) { [self refresh]; } else { - apple_display_alert(@"Not possible to create folder.", 0); + apple_display_alert(@"It was not possible to create folder.", 0); } } } @@ -262,4 +278,98 @@ return cell; } +@end + +@implementation RAFoldersList { + NSMutableArray *directories; + NSString *currentDirectoryPath, *selectedFilePath, *fileName; +} + +- (id)initWithFilePath:(NSString *)path +{ + self = [super initWithStyle:UITableViewStyleGrouped]; + + selectedFilePath = path; + NSFileManager *fileManager = [NSFileManager defaultManager]; + fileName = [fileManager displayNameAtPath:path]; + currentDirectoryPath = [path stringByDeletingLastPathComponent]; + NSArray *files = [fileManager contentsOfDirectoryAtPath:currentDirectoryPath error:nil]; + directories = [[NSMutableArray alloc] init]; + + for (int i = 0; i < files.count; i++) { + NSString *filePath = [currentDirectoryPath stringByAppendingPathComponent:files[i]]; + + BOOL isDir; + if ([fileManager fileExistsAtPath:filePath isDirectory:&isDir] && isDir) { + [directories addObject:files[i]]; + } + } + + [self setTitle:[@"Move " stringByAppendingString:fileName]]; + + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" style:UIBarButtonItemStyleBordered target:self action:@selector(dismissViewController)]; +} + +- (void) dismissViewController +{ + [self dismissViewControllerAnimated:YES completion:nil]; +} + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return directories.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *CellIdentifier = @"Directory"; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + + if (cell == nil) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; + } + + cell.textLabel.text = directories[indexPath.row]; + + return cell; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; + NSString *directoryPath = [currentDirectoryPath stringByAppendingPathComponent:cell.textLabel.text]; + NSString *newPath = [directoryPath stringByAppendingPathComponent:fileName]; + + BOOL didMove = [[NSFileManager defaultManager] moveItemAtPath:selectedFilePath toPath:newPath error:nil]; + + if (didMove) { + NSArray *viewsControllers = [[self presentingViewController] childViewControllers]; + + // Searches for RADirectoryList instance and call the refresh method + for (int i = 0; i < viewsControllers.count; i++) { + if ([viewsControllers[i] isKindOfClass:[RADirectoryList class]]) { + [viewsControllers[i] refresh]; + break; + } + } + } else { + apple_display_alert(@"It was not possible to move the file", 0); + } + + [self dismissViewController]; +} + + @end diff --git a/apple/iOS/views.h b/apple/iOS/views.h index 47da854e63..5b058b2ede 100644 --- a/apple/iOS/views.h +++ b/apple/iOS/views.h @@ -32,7 +32,15 @@ @end // browser.m -@interface RADirectoryList : RATableViewController +@interface RADirectoryItem : NSObject +@property (strong) NSString* path; +@property bool isDirectory; +@end + +// browser.m +@interface RADirectoryList : RATableViewController +@property (nonatomic, weak) RADirectoryItem *selectedItem; + + (id)directoryListAtBrowseRoot; + (id)directoryListForPath:(NSString*)path; - (id)initWithPath:(NSString*)path; @@ -43,6 +51,11 @@ - (id)initWithGame:(NSString*)path; @end +// browser.m +@interface RAFoldersList : UITableViewController +- (id) initWithFilePath:(NSString *)path; +@end + // RAModuleInfo.m @interface RAModuleInfoList : RATableViewController - (id)initWithModuleInfo:(RAModuleInfo*)info; From edc710d124ac7ada93546e36cdb9b425d1e34641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelo=20Munhoz=20P=C3=A9los?= Date: Sat, 13 Jul 2013 00:05:21 -0300 Subject: [PATCH 06/37] Add toolbar in Rom's list to accommodate refresh and new folder buttons. --- apple/RetroArch/main.m | 4 +++- apple/iOS/browser.m | 20 ++++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/apple/RetroArch/main.m b/apple/RetroArch/main.m index 228051767c..a0fd5ead18 100644 --- a/apple/RetroArch/main.m +++ b/apple/RetroArch/main.m @@ -212,7 +212,7 @@ int main(int argc, char *argv[]) { UIWindow* _window; - bool _isGameTop; + bool _isGameTop, _isRomList; uint32_t _settingMenusInBackStack; uint32_t _enabledOrientations; @@ -272,11 +272,13 @@ int main(int argc, char *argv[]) - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { _isGameTop = [viewController isKindOfClass:[RAGameView class]]; + _isRomList = [viewController isKindOfClass:[RADirectoryList class]]; [[UIApplication sharedApplication] setStatusBarHidden:_isGameTop withAnimation:UIStatusBarAnimationNone]; [[UIApplication sharedApplication] setIdleTimerDisabled:_isGameTop]; self.navigationBarHidden = _isGameTop; + [self setToolbarHidden:!_isRomList animated:YES]; self.topViewController.navigationItem.rightBarButtonItem = [self createSettingsButton]; } diff --git a/apple/iOS/browser.m b/apple/iOS/browser.m index fc038996e1..13a9ea10b4 100644 --- a/apple/iOS/browser.m +++ b/apple/iOS/browser.m @@ -35,11 +35,7 @@ { NSString* rootPath = RetroArch_iOS.get.documentsDirectory; NSString* ragPath = [rootPath stringByAppendingPathComponent:@"RetroArchGames"]; - RADirectoryList* list = [RADirectoryList directoryListForPath:path_is_directory(ragPath.UTF8String) ? ragPath : rootPath]; - - list.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"New Folder" style:UIBarButtonItemStyleBordered target:list action:@selector(createNewFolder)]; - return list; } @@ -57,6 +53,22 @@ self = [super initWithStyle:UITableViewStylePlain]; self.title = path.lastPathComponent; self.hidesHeaders = YES; + + NSMutableArray *toolbarButtons = [[NSMutableArray alloc] initWithCapacity:3]; + + UIBarButtonItem *refreshButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refresh)]; + refreshButton.style = UIBarButtonItemStyleBordered; + [toolbarButtons addObject:refreshButton]; + + UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil]; + [toolbarButtons addObject:flexibleSpace]; + + UIBarButtonItem *newFolderButton = [[UIBarButtonItem alloc] initWithTitle:@"New Folder" style:UIBarButtonItemStyleBordered target:self action:@selector(createNewFolder)]; + [toolbarButtons addObject:newFolderButton]; + + [[[RetroArch_iOS get] toolbar] setItems:toolbarButtons]; + [self setToolbarItems:toolbarButtons]; + [self refresh]; return self; From 397926bcf8eced52f6bb6af23d96da39953d9356 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 13 Jul 2013 15:03:35 +0200 Subject: [PATCH 07/37] (ARM NEON) Define -marm for --enable-neon --- qb/config.libs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 35176718ed..7b6009da97 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -34,8 +34,8 @@ if [ "$HAVE_VIDEOCORE" = 'yes' ]; then fi if [ "$HAVE_NEON" = "yes" ]; then - CFLAGS="$CFLAGS -mfpu=neon" - CXXFLAGS="$CXXFLAGS -mfpu=neon" + CFLAGS="$CFLAGS -mfpu=neon -marm" + CXXFLAGS="$CXXFLAGS -mfpu=neon -marm" ASFLAGS="$ASFLAGS -mfpu=neon" fi From c26f9e5a3c6ae53760bfd3875a3b1ba37e873ca5 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 13 Jul 2013 15:05:27 +0200 Subject: [PATCH 08/37] Change description for --enable_neon --- qb/config.params.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qb/config.params.sh b/qb/config.params.sh index cd7b02bb4b..254feed4c0 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -31,7 +31,7 @@ HAVE_XVIDEO=auto # Enable XVideo support HAVE_SDL_IMAGE=auto # Enable SDL_image support HAVE_PYTHON=auto # Enable Python 3 support for shaders HAVE_BSV_MOVIE=yes # Disable BSV movie support -HAVE_NEON=no # Forcefully enable ARM NEON optimizations (hardfloat) +HAVE_NEON=no # Forcefully enable ARM NEON optimizations HAVE_SSE=no # Forcefully enable x86 SSE optimizations (SSE, SSE2) HAVE_FLOATHARD=no # Setup hard float ABI (for ARM) HAVE_FLOATSOFTFP=no # Setup softfloat ABI (for ARM) From 91af9c5f4f7de8801decefc9e8d9563c3a467573 Mon Sep 17 00:00:00 2001 From: dwihn0r Date: Sun, 14 Jul 2013 10:06:10 +0200 Subject: [PATCH 09/37] Added auto detection for the iControlPad when using the HID joystick profile and adjusted the iControlPad Bluez IME detection to look for the IME. --- android/native/jni/input_android.c | 21 ++++++++++++++++++- android/native/jni/input_autodetect.c | 9 ++++++-- .../phoenix/res/layout/faq_supported_pads.xml | 2 +- driver.h | 1 + 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index 66291fd81c..df11f8dd5f 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -428,10 +428,29 @@ static void android_input_set_keybinds(void *data, unsigned device, /* right analog stick - TODO */ /* menu button? */ break; + case DEVICE_ICONTROLPAD_HID_JOYSTICK: + g_settings.input.device[port] = device; + g_settings.input.dpad_emulation[port] = ANALOG_DPAD_NONE; + strlcpy(g_settings.input.device_names[port], "iControlPad HID Joystick profile", + sizeof(g_settings.input.device_names[port])); + + keycode_lut[AKEYCODE_BUTTON_1] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); + keycode_lut[AKEYCODE_BUTTON_4] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift); + keycode_lut[AKEYCODE_BUTTON_3] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_2] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_14] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift); + keycode_lut[AKEYCODE_BUTTON_13] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift); + keycode_lut[AKEYCODE_BUTTON_11] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift); + keycode_lut[AKEYCODE_BUTTON_12] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift); + keycode_lut[AKEYCODE_BUTTON_10] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift); + keycode_lut[AKEYCODE_BUTTON_9] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift); + keycode_lut[AKEYCODE_BUTTON_5] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift); + keycode_lut[AKEYCODE_BUTTON_15] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift); + break; case DEVICE_ICONTROLPAD_BLUEZ_IME: g_settings.input.device[port] = device; g_settings.input.dpad_emulation[port] = ANALOG_DPAD_NONE; - strlcpy(g_settings.input.device_names[port], "iControlpad Bluez IME", + strlcpy(g_settings.input.device_names[port], "iControlPad SPP profile (using Bluez IME)", sizeof(g_settings.input.device_names[port])); keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift); diff --git a/android/native/jni/input_autodetect.c b/android/native/jni/input_autodetect.c index e886985a1f..079128a453 100644 --- a/android/native/jni/input_autodetect.c +++ b/android/native/jni/input_autodetect.c @@ -111,8 +111,8 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned device = DEVICE_LOGITECH_DUAL_ACTION; else if (strstr(name_buf, "Logitech") && strstr(name_buf, "Precision")) device = DEVICE_LOGITECH_PRECISION_GAMEPAD; - else if (strstr(name_buf, "shooter-keypad")) - device = DEVICE_ICONTROLPAD_BLUEZ_IME; + else if (strstr(name_buf, "iControlPad-")) // followed by a 4 (hex) char HW id + device = DEVICE_ICONTROLPAD_HID_JOYSTICK; else if (strstr(name_buf, "SEGA VIRTUA STICK High Grade")) device = DEVICE_SEGA_VIRTUA_STICK_HIGH_GRADE; else if (strstr(name_buf, "TTT THT Arcade console 2P USB Play")) @@ -232,6 +232,11 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned device = DEVICE_CCPCREATIONS_WIIUSE_IME; snprintf(name_buf, sizeof(name_buf), "ccpcreations WiiUse"); } + else if (strstr(current_ime, "com.hexad.bluezime")) + { + device = DEVICE_ICONTROLPAD_BLUEZ_IME; + snprintf(name_buf, sizeof(name_buf), "iControlpad SPP mode (using Bluez IME)"); + } if (source == AINPUT_SOURCE_KEYBOARD && device != DEVICE_XPERIA_PLAY) device = DEVICE_KEYBOARD_RETROPAD; diff --git a/android/phoenix/res/layout/faq_supported_pads.xml b/android/phoenix/res/layout/faq_supported_pads.xml index 758a340260..b2c813ab32 100644 --- a/android/phoenix/res/layout/faq_supported_pads.xml +++ b/android/phoenix/res/layout/faq_supported_pads.xml @@ -9,5 +9,5 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="40px" - android:text="The following pads have been added to the autodetection list:\n\n* Logitech/Logicool Rumblepad 2\n* Microsoft Sidewinder USB (ISSUE - diagonals not working).\n* Microsoft Xbox 360 Wired/Wireless (ISSUE - diagonals not working).\n* PS3 Sixaxis/DualShock 3 (using either USB or Dancingpixelstudios' IME app)\n* MOGA (using either 'root' gamepad mode or official IME app)\n* JXD S5110\n* Snakebyte idroid\n* Logitech Dual Action\n* Mayflash Super Joy Box 3 Pro\n*RetroUSB SNES RetroPort\n*RetroUSB NES RetroPad\n*Buffalo SNES Pad\n* Elecom PS1/PS2 to USB\n* Archos gamepad\n* Xbox 1 (Titanium X-Joy Converter) (ISSUE - diagonals not working).\n* Red Samurai (IME app Bluetooth or gamepad mode)\n* Xperia Play\n* Trust Raptor\n* Logitech F710\n* DragonRise USB\n* Madcatz PS3 fighting stick\n* iControlPad (needs to be tested)\n* iPega (gamepad mode, select it in iCade profile)\n* PC2JAMMA-USB (TODO - TEST)\n* Genius MaxFire G-08XU\n* Zeemote Steelseries\n* Saitek Rumblepad\n* Super Smart Joy\n* Groupwise PS2 to USB converter\n* Toodles 2008 Chimp\n* Sega Saturn USB pad\n*Mayflash Wii Classic\n* Mayflash PS2 to USB\n* Nintendo Wii (using ccpcreations.WiiUse IME app)\n* Nyko Playpad Pro" /> + android:text="The following pads have been added to the autodetection list:\n\n* Logitech/Logicool Rumblepad 2\n* Microsoft Sidewinder USB (ISSUE - diagonals not working).\n* Microsoft Xbox 360 Wired/Wireless (ISSUE - diagonals not working).\n* PS3 Sixaxis/DualShock 3 (using either USB or Dancingpixelstudios' IME app)\n* MOGA (using either 'root' gamepad mode or official IME app)\n* JXD S5110\n* Snakebyte idroid\n* Logitech Dual Action\n* Mayflash Super Joy Box 3 Pro\n* RetroUSB SNES RetroPort\n* RetroUSB NES RetroPad\n* Buffalo SNES Pad\n* Elecom PS1/PS2 to USB\n* Archos gamepad\n* Xbox 1 (Titanium X-Joy Converter) (ISSUE - diagonals not working).\n* Red Samurai (IME app Bluetooth or gamepad mode)\n* Xperia Play\n* Trust Raptor\n* Logitech F710\n* DragonRise USB\n* Madcatz PS3 fighting stick\n* iControlPad (HID joystick profile or SPP profile in tandem with Bluez IME)\n* iPega (gamepad mode, select it in iCade profile)\n* PC2JAMMA-USB (TODO - TEST)\n* Genius MaxFire G-08XU\n* Zeemote Steelseries\n* Saitek Rumblepad\n* Super Smart Joy\n* Groupwise PS2 to USB converter\n* Toodles 2008 Chimp\n* Sega Saturn USB pad\n* Mayflash Wii Classic\n* Mayflash PS2 to USB\n* Nintendo Wii (using ccpcreations.WiiUse IME app)\n* Nyko Playpad Pro" /> diff --git a/driver.h b/driver.h index f29ec720e2..975ea7f29f 100644 --- a/driver.h +++ b/driver.h @@ -220,6 +220,7 @@ enum input_devices DEVICE_LOGITECH_RUMBLEPAD2, DEVICE_LOGITECH_DUAL_ACTION, DEVICE_LOGITECH_PRECISION_GAMEPAD, + DEVICE_ICONTROLPAD_HID_JOYSTICK, DEVICE_ICONTROLPAD_BLUEZ_IME, DEVICE_TTT_THT_ARCADE, DEVICE_TOMMO_NEOGEOX_ARCADE, From a1af649899803ab8b6123c0e3aba297139f29b92 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 14 Jul 2013 13:37:37 +0200 Subject: [PATCH 10/37] (libretro-test-gl) Add ARM target --- libretro-test-gl/Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/libretro-test-gl/Makefile b/libretro-test-gl/Makefile index 6743ccffc9..2506afd81d 100644 --- a/libretro-test-gl/Makefile +++ b/libretro-test-gl/Makefile @@ -49,6 +49,33 @@ else ifeq ($(platform), qnx) AR = qcc -Vgcc_ntoarmv7le CFLAGS += -D__BLACKBERRY_QNX__ -DGLES GL_LIB := -lGLESv2 +else ifneq (,$(findstring armv,$(platform))) + CC = gcc + TARGET := $(TARGET_NAME)_libretro.so + fpic := -fPIC + SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined + CFLAGS += -I. +ifneq (,$(findstring gles,$(platform))) + GLES := 1 +else + GL_LIB := -lGL +endif +ifneq (,$(findstring cortexa8,$(platform))) + CFLAGS += -marm -mcpu=cortex-a8 +else ifneq (,$(findstring cortexa9,$(platform))) + CFLAGS += -marm -mcpu=cortex-a9 +endif + CFLAGS += -marm +ifneq (,$(findstring neon,$(platform))) + CFLAGS += -mfpu=neon + HAVE_NEON = 1 +endif +ifneq (,$(findstring softfloat,$(platform))) + CFLAGS += -mfloat-abi=softfp +else ifneq (,$(findstring hardfloat,$(platform))) + CFLAGS += -mfloat-abi=hard +endif + CFLAGS += -DARM else CC = gcc TARGET := $(TARGET_NAME)_retro.dll From ac8448c844ec0e0fda7cf2f6237dc6d3ac472799 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 14 Jul 2013 21:06:41 +0200 Subject: [PATCH 11/37] (Android)Add meancoot's andretro frontend - will need some heavy maintenance to make up-to-date again --- android/andretro/AndroidManifest.xml | 31 + android/andretro/README | 6 + android/andretro/ant.properties | 17 + .../andretro/assets/libretro_fceu-next.so.xml | 19 + .../assets/libretro_final_burn_alpha.so.xml | 28 + .../andretro/assets/libretro_gambatte.so.xml | 20 + .../assets/libretro_genesis-plus-gx.so.xml | 23 + .../andretro/assets/libretro_prboom.so.xml | 29 + .../assets/libretro_snes9x-next.so.xml | 24 + .../andretro/assets/libretro_stella.so.xml | 28 + .../andretro/assets/libretro_vba-next.so.xml | 22 + android/andretro/build.xml | 92 +++ android/andretro/ic_launcher-web.png | Bin 0 -> 37099 bytes android/andretro/jni/Android.mk | 23 + android/andretro/jni/Application.mk | 1 + android/andretro/jni/Common.h | 177 ++++++ android/andretro/jni/Driver.cpp | 558 ++++++++++++++++ android/andretro/jni/Library.h | 109 ++++ android/andretro/jni/Rewinder.h | 118 ++++ android/andretro/jni/libretro.h | 599 ++++++++++++++++++ android/andretro/jni/modules/Android.mk | 6 + android/andretro/libs/android-support-v4.jar | Bin 0 -> 349252 bytes android/andretro/lint.xml | 6 + android/andretro/proguard-project.txt | 20 + android/andretro/project.properties | 14 + .../res/drawable-hdpi/ic_launcher.png | Bin 0 -> 3014 bytes .../res/drawable-ldpi/ic_launcher.png | Bin 0 -> 1504 bytes .../res/drawable-mdpi/ic_launcher.png | Bin 0 -> 1969 bytes .../andretro/res/drawable-nodpi/button.png | Bin 0 -> 214 bytes .../andretro/res/drawable-nodpi/buttonduo.png | Bin 0 -> 310 bytes android/andretro/res/drawable-nodpi/dpad.png | Bin 0 -> 423 bytes android/andretro/res/drawable-nodpi/file.png | Bin 0 -> 1948 bytes .../andretro/res/drawable-nodpi/folder.png | Bin 0 -> 2323 bytes .../res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 4006 bytes .../andretro/res/layout/dialog_focus_hack.xml | 10 + .../andretro/res/layout/icon_grid_item.xml | 23 + .../andretro/res/layout/icon_grid_list.xml | 8 + android/andretro/res/layout/line_list.xml | 7 + .../andretro/res/layout/line_list_item.xml | 23 + android/andretro/res/layout/retro_display.xml | 13 + android/andretro/res/menu/directory_list.xml | 8 + android/andretro/res/menu/retro_display.xml | 14 + .../andretro/res/raw/default_retro_pad.xml | 7 + android/andretro/res/raw/fragment_shader.glsl | 9 + android/andretro/res/raw/vertex_shader.glsl | 14 + android/andretro/res/values/strings.xml | 26 + android/andretro/res/xml/preferences.xml | 20 + .../src/org/andretro/QuestionDialog.java | 81 +++ .../src/org/andretro/RetroDisplay.java | 225 +++++++ .../src/org/andretro/WindowManager.java | 224 +++++++ .../andretro/browser/DirectoryActivity.java | 177 ++++++ .../src/org/andretro/browser/IconAdapter.java | 79 +++ .../org/andretro/browser/ModuleActivity.java | 116 ++++ .../src/org/andretro/browser/StateList.java | 94 +++ .../src/org/andretro/emulator/Commands.java | 188 ++++++ .../src/org/andretro/emulator/Doodads.java | 199 ++++++ .../src/org/andretro/emulator/Game.java | 167 +++++ .../src/org/andretro/emulator/ModuleInfo.java | 107 ++++ .../src/org/andretro/input/view/Button.java | 29 + .../andretro/input/view/ButtonDiamond.java | 42 ++ .../org/andretro/input/view/ButtonDuo.java | 35 + .../org/andretro/input/view/InputGroup.java | 186 ++++++ .../org/andretro/settings/ButtonSetting.java | 86 +++ .../andretro/settings/SettingActivity.java | 76 +++ .../src/org/andretro/system/Audio.java | 72 +++ .../src/org/andretro/system/CommandQueue.java | 74 +++ .../src/org/andretro/system/Input.java | 191 ++++++ .../src/org/andretro/system/Logger.java | 11 + .../src/org/andretro/system/PngWriter.java | 9 + .../src/org/andretro/system/Present.java | 124 ++++ .../org/andretro/system/video/VertexData.java | 148 +++++ .../andretro/src/org/libretro/LibRetro.java | 319 ++++++++++ 72 files changed, 5211 insertions(+) create mode 100644 android/andretro/AndroidManifest.xml create mode 100644 android/andretro/README create mode 100644 android/andretro/ant.properties create mode 100644 android/andretro/assets/libretro_fceu-next.so.xml create mode 100644 android/andretro/assets/libretro_final_burn_alpha.so.xml create mode 100644 android/andretro/assets/libretro_gambatte.so.xml create mode 100644 android/andretro/assets/libretro_genesis-plus-gx.so.xml create mode 100644 android/andretro/assets/libretro_prboom.so.xml create mode 100644 android/andretro/assets/libretro_snes9x-next.so.xml create mode 100644 android/andretro/assets/libretro_stella.so.xml create mode 100644 android/andretro/assets/libretro_vba-next.so.xml create mode 100644 android/andretro/build.xml create mode 100644 android/andretro/ic_launcher-web.png create mode 100644 android/andretro/jni/Android.mk create mode 100644 android/andretro/jni/Application.mk create mode 100644 android/andretro/jni/Common.h create mode 100644 android/andretro/jni/Driver.cpp create mode 100644 android/andretro/jni/Library.h create mode 100644 android/andretro/jni/Rewinder.h create mode 100644 android/andretro/jni/libretro.h create mode 100644 android/andretro/jni/modules/Android.mk create mode 100644 android/andretro/libs/android-support-v4.jar create mode 100644 android/andretro/lint.xml create mode 100644 android/andretro/proguard-project.txt create mode 100644 android/andretro/project.properties create mode 100644 android/andretro/res/drawable-hdpi/ic_launcher.png create mode 100644 android/andretro/res/drawable-ldpi/ic_launcher.png create mode 100644 android/andretro/res/drawable-mdpi/ic_launcher.png create mode 100644 android/andretro/res/drawable-nodpi/button.png create mode 100644 android/andretro/res/drawable-nodpi/buttonduo.png create mode 100644 android/andretro/res/drawable-nodpi/dpad.png create mode 100755 android/andretro/res/drawable-nodpi/file.png create mode 100755 android/andretro/res/drawable-nodpi/folder.png create mode 100644 android/andretro/res/drawable-xhdpi/ic_launcher.png create mode 100644 android/andretro/res/layout/dialog_focus_hack.xml create mode 100644 android/andretro/res/layout/icon_grid_item.xml create mode 100644 android/andretro/res/layout/icon_grid_list.xml create mode 100644 android/andretro/res/layout/line_list.xml create mode 100644 android/andretro/res/layout/line_list_item.xml create mode 100644 android/andretro/res/layout/retro_display.xml create mode 100644 android/andretro/res/menu/directory_list.xml create mode 100644 android/andretro/res/menu/retro_display.xml create mode 100644 android/andretro/res/raw/default_retro_pad.xml create mode 100644 android/andretro/res/raw/fragment_shader.glsl create mode 100644 android/andretro/res/raw/vertex_shader.glsl create mode 100644 android/andretro/res/values/strings.xml create mode 100644 android/andretro/res/xml/preferences.xml create mode 100644 android/andretro/src/org/andretro/QuestionDialog.java create mode 100644 android/andretro/src/org/andretro/RetroDisplay.java create mode 100644 android/andretro/src/org/andretro/WindowManager.java create mode 100644 android/andretro/src/org/andretro/browser/DirectoryActivity.java create mode 100644 android/andretro/src/org/andretro/browser/IconAdapter.java create mode 100644 android/andretro/src/org/andretro/browser/ModuleActivity.java create mode 100644 android/andretro/src/org/andretro/browser/StateList.java create mode 100644 android/andretro/src/org/andretro/emulator/Commands.java create mode 100644 android/andretro/src/org/andretro/emulator/Doodads.java create mode 100644 android/andretro/src/org/andretro/emulator/Game.java create mode 100644 android/andretro/src/org/andretro/emulator/ModuleInfo.java create mode 100644 android/andretro/src/org/andretro/input/view/Button.java create mode 100644 android/andretro/src/org/andretro/input/view/ButtonDiamond.java create mode 100644 android/andretro/src/org/andretro/input/view/ButtonDuo.java create mode 100644 android/andretro/src/org/andretro/input/view/InputGroup.java create mode 100644 android/andretro/src/org/andretro/settings/ButtonSetting.java create mode 100644 android/andretro/src/org/andretro/settings/SettingActivity.java create mode 100644 android/andretro/src/org/andretro/system/Audio.java create mode 100644 android/andretro/src/org/andretro/system/CommandQueue.java create mode 100644 android/andretro/src/org/andretro/system/Input.java create mode 100644 android/andretro/src/org/andretro/system/Logger.java create mode 100644 android/andretro/src/org/andretro/system/PngWriter.java create mode 100644 android/andretro/src/org/andretro/system/Present.java create mode 100644 android/andretro/src/org/andretro/system/video/VertexData.java create mode 100644 android/andretro/src/org/libretro/LibRetro.java diff --git a/android/andretro/AndroidManifest.xml b/android/andretro/AndroidManifest.xml new file mode 100644 index 0000000000..511aa4034c --- /dev/null +++ b/android/andretro/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/andretro/README b/android/andretro/README new file mode 100644 index 0000000000..b060895c53 --- /dev/null +++ b/android/andretro/README @@ -0,0 +1,6 @@ +Building: + +* Put any compiled module libraries in Andretro/jni/modules, the file must be named like libretro_{MODNAME}.so. +* Ensure a matching libretro_{MODNAME}.so.xml exists in the Andretro/assets directory. The xml file contains basic information used by the file browser before the .so itself is loaded. +* In the Andretro directory, run the ndk-build script supplied with the Android NDK. +* In the Andretro directory, run 'ant debug install' to install to the device. The java code can alternatively be built with the included eclipse project. diff --git a/android/andretro/ant.properties b/android/andretro/ant.properties new file mode 100644 index 0000000000..b0971e891e --- /dev/null +++ b/android/andretro/ant.properties @@ -0,0 +1,17 @@ +# This file is used to override default values used by the Ant build system. +# +# This file must be checked into Version Control Systems, as it is +# integral to the build system of your project. + +# This file is only used by the Ant script. + +# You can use this to override default values such as +# 'source.dir' for the location of your java source folder and +# 'out.dir' for the location of your output folder. + +# You can also use it define how the release builds are signed by declaring +# the following properties: +# 'key.store' for the location of your keystore and +# 'key.alias' for the name of the key to use. +# The password will be asked during the build when you use the 'release' target. + diff --git a/android/andretro/assets/libretro_fceu-next.so.xml b/android/andretro/assets/libretro_fceu-next.so.xml new file mode 100644 index 0000000000..7c220b7e50 --- /dev/null +++ b/android/andretro/assets/libretro_fceu-next.so.xml @@ -0,0 +1,19 @@ + + + + + + + +