Skip to content

Commit

Permalink
Merge pull request #343 from ToddLa/new-icon
Browse files Browse the repository at this point in the history
New ICONs from @daedalia, and *fake* KEY delay
  • Loading branch information
yoshisuga authored Aug 4, 2021
2 parents d212a73 + 342fdb1 commit cc563d8
Show file tree
Hide file tree
Showing 60 changed files with 243 additions and 177 deletions.
2 changes: 1 addition & 1 deletion WHATSNEW.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Version 2021.7
* `OSD` changes.
* Ability to build with latest `MAME` version (0.232)
* Ability to build with latest `MAME` version
* New `Category.ini` from `MAME` 230
* Attack of the Clones! - support import of merged romsets.
* `MAME` Software List (aka softlist) support.
Expand Down
20 changes: 11 additions & 9 deletions iOS/EmulatorController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2422,18 +2422,21 @@ static void push_mame_flush()
myosd_exitGame = 0;
}

#define MYOSD_KEY_ESC_2 (MYOSD_KEY_ESC + (MYOSD_KEY_ESC<<8))

// send buttons and keys - we do this inside of myosd_poll_input() because it is called from droid_ios_poll_input
// ...and we are sure MAME is in a state to accept input, and not waking up from being paused or loading a ROM
// ...we hold a button DOWN for 2 frames (buttonPressReleaseCycles) and wait (buttonNextPressCycles) frames.
// ...these are *magic* numbers that seam to work good. if we hold a key down too long, games may ignore it. if we send too fast bad too.
static int handle_buttons(myosd_input_state* myosd)
{
// ignore input (ie delay) used to hold down or pause between keys AND buttons
if (g_mame_buttons_tick > 0) {
g_mame_buttons_tick--;
return 1;
}

// check for exitGame
if (myosd_exitGame) {
NSCParameterAssert(g_mame_key == 0 || g_mame_key == MYOSD_KEY_EXIT ||
g_mame_key == MYOSD_KEY_ESC || g_mame_key == MYOSD_KEY_ESC_2);
NSCParameterAssert(g_mame_key == 0 || g_mame_key == MYOSD_KEY_EXIT || g_mame_key == MYOSD_KEY_ESC);
// only force a hard exit on keyboard machines, else just use ESC
// TODO: fix keyboard for realz
if (myosd_has_keyboard && myosd_inGame && !myosd_in_menu)
Expand All @@ -2451,6 +2454,7 @@ static int handle_buttons(myosd_input_state* myosd)

if (myosd->keyboard[key] == 0) {
myosd->keyboard[key] = 0x80;
g_mame_buttons_tick = buttonPressReleaseCycles; // keep key DOWN for this long.
}
else {
if (key != MYOSD_KEY_LSHIFT && key != MYOSD_KEY_LCONTROL) {
Expand All @@ -2459,6 +2463,9 @@ static int handle_buttons(myosd_input_state* myosd)
myosd->keyboard[MYOSD_KEY_LCONTROL] = 0;
}
g_mame_key = g_mame_key >> 8;

if (g_mame_key != 0 )
g_mame_buttons_tick = buttonNextPressCycles; // wait this long before next key
}
return 1;
}
Expand All @@ -2467,11 +2474,6 @@ static int handle_buttons(myosd_input_state* myosd)
if (g_mame_buttons.count == 0)
return 0;

if (g_mame_buttons_tick > 0) {
g_mame_buttons_tick--;
return 1;
}

[g_mame_buttons_lock lock];
unsigned long button = g_mame_buttons.firstObject.intValue;
unsigned long player = (button & MYOSD_PLAYER_MASK) >> MYOSD_PLAYER_SHIFT;
Expand Down
2 changes: 1 addition & 1 deletion make-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ make macCatalyst=1 ARCH=x86_64 clean
make macCatalyst=1 ARCH=x86_64 -j`sysctl -n hw.logicalcpu` CDBG=-w || exit -1

lipo -create libmame-139u1-mac-*.a -output libmame-139u1-mac.a
rm libmame-mac-*.a
rm libmame-139u1-mac-*.a

open xcode/MAME4iOS/MAME4iOS.xcodeproj/
18 changes: 11 additions & 7 deletions xcode/MAME4iOS/MAME4iOS.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,21 @@ ENTITLEMENTS_TYPE = -Base
// ENTITLEMENTS_TYPE = -Full
// UN-COMMENT PREV LINE if you want a build with full entitlements

// 3. The MAME binary to link to.
// The default is libmame-[platform].a (Latest MAME version)
// You can point this to an earlier version of MAME,
// such as libmame-classic-[platform].a (Classic, MAME version 0.139u1).
MAMELIB_IOS = libmame-ios.a
MAMELIB_TVOS = libmame-tvos.a
MAMELIB_MACOS = libmame-mac.a
// 3. Select the MAME binary to link to.
// 139u1 or latest MAME version

// USE THIS LINE for a local build of 139u1 MAME. (via make-ios.sh, make-tvos.sh, or make-mac.sh)
// MAMELIB = libmame-139u1
// USE THIS LINE for a build of current latest MAME (via get-libmame.sh)
MAMELIB = libmame

// these should not be changed.
PRODUCT_BUNDLE_IDENTIFIER = $(ORG_IDENTIFIER).$(PROJECT_NAME:lower)
APP_GROUP_IDENTIFIER = group.$(ORG_IDENTIFIER).$(PROJECT_NAME:lower)
ICLOUD_CONTAINER_IDENTIFIER = iCloud.$(ORG_IDENTIFIER).$(PROJECT_NAME:lower)
CODE_SIGN_ENTITLEMENTS = $(TARGET_NAME)/$(TARGET_NAME)$(ENTITLEMENTS_TYPE).entitlements

MAMELIB_IOS = $(MAMELIB)-ios.a
MAMELIB_TVOS = $(MAMELIB)-tvos.a
MAMELIB_MACOS = $(MAMELIB)-mac.a

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xcode/MAME4iOS/MAME4iOS/Assets.xcassets/AppIcon.appiconset/20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xcode/MAME4iOS/MAME4iOS/Assets.xcassets/AppIcon.appiconset/29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified xcode/MAME4iOS/MAME4iOS/Assets.xcassets/AppIcon.appiconset/40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,158 +1 @@
{
"images" : [
{
"filename" : "40.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "60.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"filename" : "29.png",
"idiom" : "iphone",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "58.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "87.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"filename" : "80.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "120.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"filename" : "57.png",
"idiom" : "iphone",
"scale" : "1x",
"size" : "57x57"
},
{
"filename" : "114.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "57x57"
},
{
"filename" : "120.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "180.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"filename" : "20.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"filename" : "40.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "29.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "58.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "40.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"filename" : "80.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "50.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "50x50"
},
{
"filename" : "100.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "50x50"
},
{
"filename" : "72.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "72x72"
},
{
"filename" : "144.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "72x72"
},
{
"filename" : "76.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"filename" : "152.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"filename" : "167.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"filename" : "1024.png",
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"}]}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Binary file modified xcode/MAME4iOS/MAME4mac/Assets.xcassets/MacIcon.appiconset/20.png
Diff not rendered.
Binary file modified xcode/MAME4iOS/MAME4mac/Assets.xcassets/MacIcon.appiconset/29.png
Diff not rendered.
Binary file modified xcode/MAME4iOS/MAME4mac/Assets.xcassets/MacIcon.appiconset/40.png
Diff not rendered.
Diff not rendered.
Loading

0 comments on commit cc563d8

Please sign in to comment.