Changes of Revision 2

libretro-mame2000.changes Changed
x
 
1
@@ -1,4 +1,25 @@
2
 -------------------------------------------------------------------
3
+Sat Jun 12 02:32:15 UTC 2021 - i@guoyunhe.me
4
+
5
+- Update to version 0~git20210529:
6
+  * Changed /samples dir to be in the system directory (parity with other MAME cores)
7
+  * Add ios-arm64/tvos-arm64
8
+  * Update .gitlab-ci.yml
9
+  * (MSVC) embed MSVCR runtime
10
+  * (macOS) Add macOS ARM 64 support
11
+  * Update .gitlab-ci.yml
12
+  * Update .gitlab-ci.yml
13
+  * Update Makefile
14
+  * Update Makefile
15
+  * Update .gitlab-ci.yml
16
+  * Update .gitlab-ci.yml
17
+  * Update .gitlab-ci.yml
18
+  * Update .gitlab-ci.yml
19
+  * Add .gitlab-ci.yml
20
+  * fcommon required for vita / libnx now gcc-10
21
+  * libretro: use input bitmask
22
+
23
+-------------------------------------------------------------------
24
 Sun Feb 09 13:43:33 UTC 2020 - i@guoyunhe.me
25
 
26
 - Update to version 0~git20200112:
27
libretro-mame2000.spec Changed
10
 
1
@@ -17,7 +17,7 @@
2
 
3
 
4
 Name:           libretro-mame2000
5
-Version:        0~git20200112
6
+Version:        0~git20210529
7
 Release:        0
8
 Summary:        MAME 2000 (0.37b5) libretro core for arcade emulation
9
 License:        NonFree
10
_servicedata Changed
9
 
1
@@ -1,4 +1,4 @@
2
 <servicedata>
3
 <service name="tar_scm">
4
                 <param name="url">https://github.com/libretro/mame2000-libretro.git</param>
5
-              <param name="changesrevision">e5d4a934c60adc6d42a3f87319312aad89595a15</param></service></servicedata>
6
\ No newline at end of file
7
+              <param name="changesrevision">2537f83cb2d8125fced3328f072e8279f27e38f6</param></service></servicedata>
8
\ No newline at end of file
9
libretro-mame2000-0~git20210529.tar.xz/.gitlab-ci.yml Added
201
 
1
@@ -0,0 +1,222 @@
2
+# DESCRIPTION: GitLab CI/CD for libRetro (NOT FOR GitLab-proper)
3
+
4
+##############################################################################
5
+################################# BOILERPLATE ################################
6
+##############################################################################
7
+
8
+# Core definitions
9
+.core-defs:
10
+  variables:
11
+    JNI_PATH: .
12
+    CORENAME: mame2000
13
+
14
+include:
15
+  ################################## DESKTOPS ################################
16
+  # Windows 64-bit
17
+  - project: 'libretro-infrastructure/ci-templates'
18
+    file: '/windows-x64-mingw.yml'
19
+    
20
+  # Windows 32-bit
21
+  - project: 'libretro-infrastructure/ci-templates'
22
+    file: '/windows-i686-mingw.yml'
23
+    
24
+  # Linux 64-bit
25
+  - project: 'libretro-infrastructure/ci-templates'
26
+    file: '/linux-x64.yml'
27
+
28
+  # Linux 32-bit
29
+  - project: 'libretro-infrastructure/ci-templates'
30
+    file: '/linux-i686.yml'
31
+
32
+  # MacOS 64-bit
33
+  - project: 'libretro-infrastructure/ci-templates'
34
+    file: '/osx-x64.yml'
35
+
36
+  # MacOS ARM 64-bit
37
+  - project: 'libretro-infrastructure/ci-templates'
38
+    file: '/osx-arm64.yml'
39
+    
40
+  ################################## CELLULAR ################################
41
+  # Android
42
+  - project: 'libretro-infrastructure/ci-templates'
43
+    file: '/android-jni.yml'
44
+
45
+  # iOS
46
+  - project: 'libretro-infrastructure/ci-templates'
47
+    file: '/ios-arm64.yml'
48
+
49
+  # iOS (armv7)
50
+  - project: 'libretro-infrastructure/ci-templates'
51
+    file: '/ios9.yml'
52
+
53
+  ################################## CONSOLES ################################
54
+  # Nintendo 3DS
55
+  - project: 'libretro-infrastructure/ci-templates'
56
+    file: '/ctr-static.yml'
57
+    
58
+  # Nintendo GameCube
59
+  - project: 'libretro-infrastructure/ci-templates'
60
+    file: '/ngc-static.yml'
61
+
62
+  # Nintendo Wii
63
+  - project: 'libretro-infrastructure/ci-templates'
64
+    file: '/wii-static.yml'
65
+
66
+  # Nintendo WiiU
67
+  - project: 'libretro-infrastructure/ci-templates'
68
+    file: '/wiiu-static.yml'
69
+
70
+  # Nintendo Switch
71
+  - project: 'libretro-infrastructure/ci-templates'
72
+    file: '/libnx-static.yml'
73
+    
74
+  # PlayStation Vita
75
+  - project: 'libretro-infrastructure/ci-templates'
76
+    file: '/vita-static.yml'
77
+
78
+  # tvOS (AppleTV)
79
+  - project: 'libretro-infrastructure/ci-templates'
80
+    file: '/tvos-arm64.yml'
81
+
82
+  #################################### MISC ##################################
83
+  # Emscripten
84
+  - project: 'libretro-infrastructure/ci-templates'
85
+    file: '/emscripten-static.yml'
86
+
87
+# Stages for building
88
+stages:
89
+  - build-prepare
90
+  - build-shared
91
+  - build-static
92
+
93
+##############################################################################
94
+#################################### STAGES ##################################
95
+##############################################################################
96
+#
97
+################################### DESKTOPS #################################
98
+# Windows 64-bit
99
+libretro-build-windows-x64:
100
+  extends:
101
+    - .libretro-windows-x64-mingw-make-default
102
+    - .core-defs
103
+    
104
+# Windows 32-bit
105
+libretro-build-windows-i686:
106
+  extends:
107
+    - .libretro-windows-i686-mingw-make-default
108
+    - .core-defs
109
+    
110
+# Linux 64-bit
111
+libretro-build-linux-x64:
112
+  extends:
113
+    - .libretro-linux-x64-make-default
114
+    - .core-defs
115
+
116
+# Linux 32-bit
117
+libretro-build-linux-i686:
118
+  extends:
119
+    - .libretro-linux-i686-make-default
120
+    - .core-defs
121
+
122
+# MacOS 64-bit
123
+libretro-build-osx-x64:
124
+  tags:
125
+    - macosx-packaging
126
+  extends:
127
+    - .libretro-osx-x64-make-default
128
+    - .core-defs
129
+
130
+# MacOS ARM 64-bit
131
+libretro-build-osx-arm64:
132
+  tags:
133
+    - macosx-packaging
134
+  extends:
135
+    - .libretro-osx-arm64-make-default
136
+    - .core-defs
137
+
138
+################################### CELLULAR #################################
139
+# Android ARMv7a
140
+android-armeabi-v7a:
141
+  extends:
142
+    - .libretro-android-jni-armeabi-v7a
143
+    - .core-defs
144
+    
145
+# Android ARMv8a
146
+android-arm64-v8a:
147
+  extends:
148
+    - .libretro-android-jni-arm64-v8a
149
+    - .core-defs
150
+
151
+# Android 64-bit x86
152
+android-x86_64:
153
+  extends:
154
+    - .libretro-android-jni-x86_64
155
+    - .core-defs
156
+
157
+# Android 32-bit x86
158
+android-x86:
159
+  extends:
160
+    - .libretro-android-jni-x86
161
+    - .core-defs
162
+
163
+# iOS
164
+libretro-build-ios-arm64:
165
+  extends:
166
+    - .libretro-ios-arm64-make-default
167
+    - .core-defs
168
+
169
+# iOS (armv7) [iOS 9 and up]
170
+libretro-build-ios9:
171
+  extends:
172
+    - .libretro-ios9-make-default
173
+    - .core-defs
174
+    
175
+# tvOS
176
+libretro-build-tvos-arm64:
177
+  extends:
178
+    - .libretro-tvos-arm64-make-default
179
+    - .core-defs
180
+
181
+################################### CONSOLES #################################
182
+# Nintendo 3DS
183
+libretro-build-ctr:
184
+  extends:
185
+    - .libretro-ctr-static-retroarch-master
186
+    - .core-defs
187
+    
188
+# Nintendo GameCube
189
+libretro-build-ngc:
190
+  extends:
191
+    - .libretro-ngc-static-retroarch-master
192
+    - .core-defs
193
+
194
+# Nintendo Wii
195
+libretro-build-wii:
196
+  extends:
197
+    - .libretro-wii-static-retroarch-master
198
+    - .core-defs
199
+
200
+# Nintendo WiiU
201
libretro-mame2000-0~git20200112.tar.xz/Makefile -> libretro-mame2000-0~git20210529.tar.xz/Makefile Changed
94
 
1
@@ -71,10 +71,21 @@
2
    TARGET := $(TARGET_NAME)_libretro.dylib
3
    fpic := -fPIC
4
 ifeq ($(arch),ppc)
5
-       CFLAGS += -D__ppc__ -DMSB_FIRST
6
+   CFLAGS += -D__ppc__ -DMSB_FIRST
7
 endif
8
    SHARED := -dynamiclib
9
+ifeq ($(shell uname -p),i386)
10
    IS_X86 = 1
11
+endif
12
+   CFLAGS += -DHAVE_POSIX_MEMALIGN
13
+
14
+   ifeq ($(CROSS_COMPILE),1)
15
+       TARGET_RULE   = -target $(LIBRETRO_APPLE_PLATFORM) -isysroot $(LIBRETRO_APPLE_ISYSROOT)
16
+       CFLAGS   += $(TARGET_RULE)
17
+       CPPFLAGS += $(TARGET_RULE)
18
+       CXXFLAGS += $(TARGET_RULE)
19
+       LDFLAGS  += $(TARGET_RULE)
20
+   endif
21
 
22
 # iOS
23
 else ifneq (,$(findstring ios,$(platform)))
24
@@ -91,10 +102,10 @@
25
 
26
 ifeq ($(platform),ios-arm64)
27
    CC = cc -arch arm64 -isysroot $(IOSSDK)
28
-   LD = armv7-apple-darwin11-ld
29
+   LD = armv7-apple-darwin11-ld
30
 else
31
    CC = cc -arch armv7 -isysroot $(IOSSDK)
32
-   LD = armv7-apple-darwin11-ld
33
+   LD = armv7-apple-darwin11-ld
34
 endif
35
 
36
 ifeq ($(platform),$(filter $(platform),ios9 ios-arm64))
37
@@ -110,11 +121,13 @@
38
    SHARED := -dynamiclib
39
    CFLAGS += -DHAVE_POSIX_MEMALIGN
40
 
41
+
42
 ifeq ($(IOSSDK),)
43
    IOSSDK := $(shell xcodebuild -version -sdk appletvos Path)
44
 endif
45
 
46
-CFLAGS += -DIOS -D__arm__ -DHAVE_POSIX_MEMALIGN=1
47
+   CFLAGS += -DIOS -D__arm__ -DHAVE_POSIX_MEMALIGN=1
48
+   CC = cc -arch arm64 -isysroot $(IOSSDK)
49
 
50
 # PS3
51
 else ifeq ($(platform), ps3)
52
@@ -204,7 +217,7 @@
53
     EXT=a
54
     TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT)
55
     DEFINES := -DSWITCH=1 -U__linux__ -U__linux
56
-    CFLAGS := $(DEFINES) -g -O3 -fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec -Wl,--allow-multiple-definition -specs=$(LIBNX)/switch.specs
57
+    CFLAGS := $(DEFINES) -g -O3 -fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -fcommon -ftls-model=local-exec -Wl,--allow-multiple-definition -specs=$(LIBNX)/switch.specs
58
     CFLAGS += $(INCDIRS)
59
     CFLAGS +=  $(INCLUDE)  -D__SWITCH__
60
     CXXFLAGS := $(ASFLAGS) $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
61
@@ -294,7 +307,7 @@
62
    CFLAGS += -mfloat-abi=hard -fsingle-precision-constant
63
    CFLAGS += -Wall -mword-relocations
64
    CFLAGS += -fomit-frame-pointer -ffast-math
65
-   CFLAGS += -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables 
66
+   CFLAGS += -fno-exceptions -fcommon -fno-unwind-tables -fno-asynchronous-unwind-tables 
67
    CFLAGS += -ftree-vectorize -funroll-loops -fno-optimize-sibling-calls
68
    HAVE_RZLIB := 1
69
    DISABLE_ERROR_LOGGING := 1
70
@@ -528,6 +541,15 @@
71
 include Makefile.common
72
 
73
 DEFS += $(fpic) $(PLATFORM_DEFINES) $(ZLIB_INCLUDE) $(GCC_DEFINES) $(INCFLAGS) $(INCFLAGS_PLATFORM)
74
+
75
+ifneq (,$(findstring msvc,$(platform)))
76
+ifeq ($(DEBUG),1)
77
+DEFS += -MTd
78
+else
79
+DEFS += -MT
80
+endif
81
+endif
82
+
83
 # combine the various definitions to one
84
 CDEFS +=  $(ENDIANNESS_DEFINES) $(DEFS) $(COREDEFS) $(CPUDEFS) $(SOUNDDEFS)
85
 
86
@@ -552,7 +574,6 @@
87
 else ifeq ($(STATIC_LINKING), 1)
88
    $(AR) rcs $@ $(OBJECTS)
89
 else
90
-   @echo Linking $@...
91
    $(LD) $(SHARED) $(LDFLAGS) $(OBJECTS) $(LIBS) $(LINKOUT)$@
92
 endif
93
     
94
libretro-mame2000-0~git20200112.tar.xz/src/libretro/libretro-common/libco/aarch64.c -> libretro-mame2000-0~git20210529.tar.xz/src/libretro/libretro-common/libco/aarch64.c Changed
10
 
1
@@ -11,7 +11,7 @@
2
 #include <string.h>
3
 #include <stdint.h>
4
 
5
-#ifndef IOS
6
+#ifndef __APPLE__
7
 #include <malloc.h>
8
 #endif
9
 
10
libretro-mame2000-0~git20200112.tar.xz/src/libretro/libretro.c -> libretro-mame2000-0~git20210529.tar.xz/src/libretro/libretro.c Changed
76
 
1
@@ -147,6 +147,8 @@
2
 static retro_input_poll_t input_poll_cb;
3
 static retro_input_state_t input_state_cb;
4
 
5
+static bool libretro_supports_bitmasks = false;
6
+
7
 unsigned skip_disclaimer = 0;
8
 
9
 static void update_variables(void)
10
@@ -225,8 +227,8 @@
11
 static void update_input(void)
12
 {
13
 #define RK(port,key)     input_state_cb(port, RETRO_DEVICE_KEYBOARD, 0,RETROK_##key)
14
-#define JS(port, button) input_state_cb(port, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_##button)
15
-   int i, c = 0;
16
+#define JS(port, button) joypad_bits & (1 << RETRO_DEVICE_ID_JOYPAD_##button)
17
+   int i, j, c = 0;
18
    input_poll_cb();
19
    
20
    key[KEY_TAB] = 0;
21
@@ -238,6 +240,17 @@
22
    
23
    for (i = 0; i < 4; i++)
24
    {
25
+       int16_t joypad_bits;
26
+       
27
+       if (libretro_supports_bitmasks)
28
+           joypad_bits = input_state_cb(i, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_MASK);
29
+       else
30
+       {
31
+           joypad_bits = 0;
32
+           for (j = 0; j < (RETRO_DEVICE_ID_JOYPAD_R3+1); j++)
33
+               joypad_bits |= input_state_cb(i, RETRO_DEVICE_JOYPAD, 0, j) ? (1 << j) : 0;
34
+       }
35
+
36
        key[KEY_1 + i]   |= JS(i, START);
37
        key[KEY_5 + i]   |= JS(i, SELECT);
38
        joy_pressed[c++] = JS(i, LEFT);
39
@@ -463,6 +476,9 @@
40
 #endif
41
    init_joy_list();
42
    update_variables();
43
+
44
+   if (environ_cb(RETRO_ENVIRONMENT_GET_INPUT_BITMASKS, NULL))
45
+      libretro_supports_bitmasks = true;
46
 }
47
 
48
 void retro_deinit(void)
49
@@ -478,6 +494,8 @@
50
    scond_free(libretro_cond);
51
    slock_free(libretro_mutex);
52
 #endif
53
+
54
+   libretro_supports_bitmasks = false;
55
 }
56
 
57
 unsigned retro_api_version(void)
58
@@ -675,7 +693,7 @@
59
 
60
 
61
    int i;
62
-   memcpy(IMAMEBASEPATH, info->path, strlen(info->path) + 1);
63
+   memcpy(IMAMEBASEPATH, info->path, strlen(core_sys_directory) + 1);
64
    if (strrchr(IMAMEBASEPATH, slash)) *(strrchr(IMAMEBASEPATH, slash)) = 0;
65
    else { IMAMEBASEPATH[0] = '.'; IMAMEBASEPATH[1] = 0; }
66
    char baseName[1024];
67
@@ -684,7 +702,7 @@
68
    memcpy(baseName, romName, strlen(romName) + 1);
69
    if (strrchr(baseName, '.')) *(strrchr(baseName, '.')) = 0;
70
 
71
-   strcpy(IMAMESAMPLEPATH, IMAMEBASEPATH);
72
+   strcpy(IMAMESAMPLEPATH, core_sys_directory);
73
    strcat(IMAMESAMPLEPATH, "/samples");
74
 
75
    /* do we have a driver for this? */
76