Commit ae13cf5b authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Buildfixes

parent 849d44d6
Pipeline #5562 passed with stages
in 2 minutes and 7 seconds
......@@ -73,7 +73,7 @@ include Makefile.common
OBJECTS := $(SOURCES_C:.c=.o)
CFLAGS += -DMAC2=1 -DCORE_NAME=\"MnvM\"\
CFLAGS += -DMAC2=1 \
-std=gnu99 \
-O3 \
-finline-functions \
......
......@@ -2,9 +2,12 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
APP_DIR := ../../src
CORE_DIR := $(LOCAL_PATH)/..
EMU := $(CORE_DIR)/minivmac/src
CFG := $(CORE_DIR)/minivmac/cfg
LOCAL_MODULE := retro
LOCAL_CFLAGS :=
ifeq ($(TARGET_ARCH),arm)
LOCAL_CFLAGS += -DANDROID_ARM
......@@ -18,42 +21,28 @@ ifeq ($(TARGET_ARCH),mips)
LOCAL_CFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__
endif
EMU = ../minivmac/src
CFG = ../minivmac/cfg
CORE_SRCS = \
$(EMU)/MINEM68K.c \
$(EMU)/GLOBGLUE.c \
$(EMU)/M68KITAB.c \
$(EMU)/VIAEMDEV.c \
$(EMU)/VIA2EMDV.c \
$(EMU)/IWMEMDEV.c \
$(EMU)/SCCEMDEV.c \
$(EMU)/RTCEMDEV.c \
$(EMU)/ROMEMDEV.c \
$(EMU)/SCSIEMDV.c \
$(EMU)/SONYEMDV.c \
$(EMU)/SCRNEMDV.c \
$(EMU)/VIDEMDEV.c \
$(EMU)/ADBEMDEV.c \
$(EMU)/ASCEMDEV.c \
$(EMU)/MOUSEMDV.c \
$(EMU)/PROGMAIN.c \
$(EMU)/OSGLUERETRO.c
include $(CORE_DIR)/Makefile.common
BUILD_APP = $(CORE_SRCS)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(EMU) $(LOCAL_PATH)/$(CFG) $(LOCAL_PATH)../libretro
LOCAL_SRC_FILES := $(SOURCES_CXX) $(SOURCES_C)
LOCAL_CFLAGS += $(INCFLAGS) \
-DMAC2=1 \
-DAND \
-std=gnu99 \
-O3 \
-finline-functions \
-funroll-loops \
-fsigned-char \
-Wno-strict-prototypes \
-ffast-math \
-fomit-frame-pointer \
-fno-strength-reduce \
-fno-builtin \
-D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 \
-finline-functions -s \
OBJECTS := ../libretro/libretro-vmac.c ../libretro/vmac-mapper.c ../libretro/vkbd.c \
../libretro/graph.c ../libretro/diskutils.c ../libretro/fontmsx.c \
$(BUILD_APP)
LOCAL_SRC_FILES += $(OBJECTS)
LOCAL_CFLAGS += -DMAC2=1 -DAND \
-std=gnu99 -O3 -finline-functions -funroll-loops -fsigned-char \
-Wno-strict-prototypes -ffast-math -fomit-frame-pointer -fno-strength-reduce -fno-builtin -finline-functions -s
LOCAL_LDLIBS := -shared -Wl,--version-script=../libretro/link.T
......
APP_ABI := armeabi-v7a
APP_PLATFORM := android-14
APP_ABI := all
......@@ -19,6 +19,7 @@
#include "MACkeymap.h"
#include "vkbd.i"
#define CORE_NAME "Mini vMac"
extern int MOUSE_EMULATED;
extern int SHOWKEY;
......@@ -184,10 +185,7 @@ int pre_main(const char *argv)
}
if(i==1)
{
parse_cmdline(CMDFILE);
LOGI("Starting game from command line :%s\n",CMDFILE);
}
else
parse_cmdline(argv);
......@@ -198,7 +196,8 @@ int pre_main(const char *argv)
if(Only1Arg)
{ Add_Option(CORE_NAME);
{
Add_Option(CORE_NAME);
/*
if (strlen(RPATH) >= strlen("crt"))
if(!strcasecmp(&RPATH[strlen(RPATH)-strlen("crt")], "crt"))
......@@ -207,18 +206,16 @@ int pre_main(const char *argv)
Add_Option(RPATH/*ARGUV[0]*/);
}
else
{ // Pass all cmdline args
{
// Pass all cmdline args
for(i = 0; i < ARGUC; i++)
Add_Option(ARGUV[i]);
}
for (i = 0; i < PARAMCOUNT; i++)
{
xargv_cmd[i] = (char*)(XARGV[i]);
LOGI("%2d %s\n",i,XARGV[i]);
}
// skel_main(PARAMCOUNT,( char **)xargv_cmd);
// skel_main(PARAMCOUNT,( char **)xargv_cmd);
InitOSGLU(PARAMCOUNT,( char **)xargv_cmd);
xargv_cmd[PARAMCOUNT - 2] = NULL;
......
......@@ -20,15 +20,6 @@ extern unsigned minivmac_devices[ 2 ];
#define TEX_WIDTH 640
#define TEX_HEIGHT 480
//LOG
#if defined(__ANDROID__) || defined(ANDROID)
#include <android/log.h>
#define LOG_TAG "RetroArch.vice"
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
#else
#define LOGI printf
#endif
//TYPES
#define UINT16 uint16_t
......
......@@ -18,13 +18,11 @@ typedef unsigned char Uint8;
typedef signed char Sint8;
typedef unsigned short Uint16;
typedef signed short Sint16;
typedef unsigned int Uint32;
typedef signed int Sint32;
typedef signed char int8;
typedef signed short int16;
typedef signed int int32;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
......
......@@ -547,76 +547,79 @@ static void Process_key()
revent.Key_Sate[i]=input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0,i) ? 0x80: 0;
if(memcmp( revent.Key_Sate,revent.old_Key_Sate , sizeof(revent.Key_Sate) ) )
{
for(i=0;i<320;i++)
{
if(revent.Key_Sate[i] && revent.Key_Sate[i]!=revent.old_Key_Sate[i] )
{
if(i==RETROK_RSHIFT){
revent.LSHIFTON=-revent.LSHIFTON;
printf("Modifier shift pressed %d \n",revent.LSHIFTON);
continue;
}
/*
if(i==RETROK_F12){
//play_tape();
continue;
}
if(i==RETROK_RCTRL){
//CTRLON=-CTRLON;
printf("Modifier crtl pressed %d \n",CTRLON);
continue;
}
if(i==RETROK_RSHIFT){
//SHITFON=-SHITFON;
printf("Modifier shift pressed %d \n",SHIFTON);
continue;
}
if(i==RETROK_LALT){
//KBMOD=-KBMOD;
printf("Modifier alt pressed %d \n",KBMOD);
continue;
}
//printf("press: %d \n",i);
*/
retro_key(i,1);
}
else if ( !revent.Key_Sate[i] && revent.Key_Sate[i]!=revent.old_Key_Sate[i] )
{
if(i==RETROK_LSHIFT){
revent.LSHIFTON=-revent.LSHIFTON;
printf("Modifier shift released %d \n",revent.LSHIFTON);
continue;
}
/*
if(i==RETROK_F12){
//kbd_buf_feed("|tape\nrun\"\n^");
continue;
}
if(i==RETROK_RCTRL){
CTRLON=-CTRLON;
printf("Modifier crtl released %d \n",CTRLON);
continue;
}
if(i==RETROK_RSHIFT){
SHIFTON=-SHIFTON;
printf("Modifier shift released %d \n",SHIFTON);
continue;
}
if(i==RETROK_LALT){
KBMOD=-KBMOD;
printf("Modifier alt released %d \n",KBMOD);
continue;
}
//printf("release: %d \n",i);
*/
retro_key(i,0);
}
{
if(i==RETROK_RSHIFT){
revent.LSHIFTON=-revent.LSHIFTON;
printf("Modifier shift pressed %d \n",revent.LSHIFTON);
continue;
}
/*
if(i==RETROK_F12){
//play_tape();
continue;
}
if(i==RETROK_RCTRL){
//CTRLON=-CTRLON;
printf("Modifier crtl pressed %d \n",CTRLON);
continue;
}
if(i==RETROK_RSHIFT){
//SHITFON=-SHITFON;
printf("Modifier shift pressed %d \n",SHIFTON);
continue;
}
if(i==RETROK_LALT){
//KBMOD=-KBMOD;
printf("Modifier alt pressed %d \n",KBMOD);
continue;
}
//printf("press: %d \n",i);
*/
retro_key(i,1);
}
else if ( !revent.Key_Sate[i] && revent.Key_Sate[i]!=revent.old_Key_Sate[i] )
{
if(i==RETROK_LSHIFT){
revent.LSHIFTON=-revent.LSHIFTON;
printf("Modifier shift released %d \n",revent.LSHIFTON);
continue;
}
/*
if(i==RETROK_F12){
//kbd_buf_feed("|tape\nrun\"\n^");
continue;
}
if(i==RETROK_RCTRL){
CTRLON=-CTRLON;
printf("Modifier crtl released %d \n",CTRLON);
continue;
}
if(i==RETROK_RSHIFT){
SHIFTON=-SHIFTON;
printf("Modifier shift released %d \n",SHIFTON);
continue;
}
if(i==RETROK_LALT){
KBMOD=-KBMOD;
printf("Modifier alt released %d \n",KBMOD);
continue;
}
//printf("release: %d \n",i);
*/
retro_key(i,0);
}
}
}
memcpy(revent.old_Key_Sate,revent.Key_Sate , sizeof(revent.Key_Sate) );
......
......@@ -14,7 +14,6 @@
if (nk_button_text(ctx,SHIFTON==-1?MVk[(y*NPLGN)+x+page].norml:MVk[(y*NPLGN)+x+page].shift , \
SHIFTON==-1?strlen(MVk[(y*NPLGN)+x+page].norml):strlen(MVk[(y*NPLGN)+x+page].shift))) {
LOGI("(%s) pressed! (%d,%d) %x\n",SHIFTON==-1?MVk[(y*NPLGN)+x+page].norml:MVk[(y*NPLGN)+x+page].shift,x,y,MVk[(y*NPLGN)+x+page].val);
vkey_pressed=MVk[(y*NPLGN)+x+page].val;
}
......
......@@ -35,9 +35,9 @@ bool num_locked = false;
extern int minivmac_kbdtype;
extern bool retro_load_ok;
void emu_reset()
void emu_reset(void)
{
//machine_trigger_reset(MACHINE_RESET_MODE_SOFT);
//machine_trigger_reset(MACHINE_RESET_MODE_SOFT);
}
void Keymap_KeyUp(int symkey)
......@@ -58,7 +58,6 @@ void Keymap_KeyDown(int symkey)
case RETROK_F10: // F10:
pauseg=1;
save_bkg();
printf("enter gui!\n");
break;
case RETROK_F11: // F11:
break;
......@@ -82,45 +81,32 @@ void app_vkb_handle(void)
oldi=-1;
}
if(vkey_pressed==-1)return;
if(vkey_pressed==-1)
return;
i=vkey_pressed;
vkey_pressed=-1;
if(i==-1){
if(i==-1)
oldi=-1;
}
if(i==-2)
{
NPAGE=-NPAGE;oldi=-1;
NPAGE=-NPAGE;
oldi=-1;
}
else if(i==-3)
{
oldi=-1;
}
else if(i==-4)
{
//VKbd show/hide
/* VKbd show/hide */
oldi=-1;
SHOWKEY=-SHOWKEY;
}
else if(i==-5)
{
oldi=-1;
}
/*
else if(i==-6)
{
//Exit
retro_deinit();
oldi=-1;
exit(0);
}
*/
else
{
if(i==-10) //SHIFT
{
//if(SHIFTON == 1)kbd_handle_keyup(RETROK_RSHIFT);
......@@ -156,7 +142,9 @@ void app_vkb_handle(void)
else if(i==-14) //JOY PORT TOGGLE
{
//cur joy toggle
cur_port++;if(cur_port>2)cur_port=1;
cur_port++;
if(cur_port>2)
cur_port=1;
SHOWKEY=-SHOWKEY;
oldi=-1;
}
......@@ -165,10 +153,7 @@ void app_vkb_handle(void)
oldi=i;
retro_key_down(i);
}
}
}
/* Core input Key (not GUI) */
......@@ -179,46 +164,37 @@ void Core_Processkey(void)
if (minivmac_kbdtype==0)
return;
for(i=0;i<320;i++)
for (i = 0; i < 320; i++)
Core_Key_Sate[i]=input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0,i) ? 0x80: 0;
if(memcmp( Core_Key_Sate,Core_old_Key_Sate , sizeof(Core_Key_Sate) ) )
for(i=0;i<320;i++)
{
for (i = 0; i < 320; i++)
{
if(Core_Key_Sate[i] && Core_Key_Sate[i]!=Core_old_Key_Sate[i] )
{
if(i==RETROK_LALT)
{
//KBMOD=-KBMOD;
//printf("Modifier alt pressed %d \n",KBMOD);
continue;
}
//printf("press: %d \n",i);
Keymap_KeyDown(i);
}
else if ( !Core_Key_Sate[i] && Core_Key_Sate[i]!=Core_old_Key_Sate[i] )
else if (!Core_Key_Sate[i] && Core_Key_Sate[i]!=Core_old_Key_Sate[i] )
{
if(i==RETROK_LALT)
{
//KBMOD=-KBMOD;
//printf("Modifier alt released %d \n",KBMOD);
continue;
}
//printf("release: %d \n",i);
Keymap_KeyUp(i);
}
}
}
memcpy(Core_old_Key_Sate,Core_Key_Sate , sizeof(Core_Key_Sate) );
}
// Core input (not GUI)
int Core_PollEvent(void)
{
// RETRO B Y SLT STA UP DWN LEFT RGT A X L R L2 R2 L3 R3
// INDEX 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// C64 BOOT VKB M/J R/S UP DWN LEFT RGT B1 GUI F7 F1 F5 F3 SPC 1
// RETRO B Y SLT STA UP DWN LEFT RGT A X L R L2 R2 L3 R3
// INDEX 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// C64 BOOT VKB M/J R/S UP DWN LEFT RGT B1 GUI F7 F1 F5 F3 SPC 1
int i;
static int jbt[16]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
......@@ -226,7 +202,8 @@ int Core_PollEvent(void)
static int kbt[4]={0,0,0,0};
// MXjoy[0]=0;
if(!retro_load_ok)return 1;
if(!retro_load_ok)
return 1;
input_poll_cb();
int mouse_l;
......@@ -234,97 +211,97 @@ int Core_PollEvent(void)
int16_t mouse_x,mouse_y;
mouse_x=mouse_y=0;
if(SHOWKEY==-1 && pauseg==0)Core_Processkey();
if(SHOWKEY==-1 && pauseg==0)
Core_Processkey();
// F9 vkbd
i=0;
if (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_F9) && kbt[i]==0){
if (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_F9) && kbt[i]==0)
kbt[i]=1;
}
else if ( kbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_F9) ){
else if ( kbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_F9) )
{
kbt[i]=0;
SHOWKEY=-SHOWKEY;
}
// F10 GUI
i=1;
if (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_F10) && kbt[i]==0){
if (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_F10) && kbt[i]==0)
kbt[i]=1;
}
else if ( kbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_F10) ){
else if ( kbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_F10) )
{
kbt[i]=0;
pauseg=1;
save_bkg();
printf("enter gui!\n");
}
if(pauseg==0){ // if emulation running
if(minivmac_devices[0]==RETRO_DEVICE_MINIVMAC_JOYSTICK){
//shortcut for joy mode only
i=1;// Y -> vkbd toggle
if ( input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) && jbt[i]==0 )
jbt[i]=1;
else if ( jbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) )
{
jbt[i]=0;
SHOWKEY=-SHOWKEY;
//Screen_SetFullUpdate(0);
}
i=3;// START -> Gui toggle
if ( input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) && jbt[i]==0 )
jbt[i]=1;
else if ( jbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) )
{
jbt[i]=0;
pauseg=1;
save_bkg();
}
i=10;// L -> Flip next
if ( input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) && jbt[i]==0 )
jbt[i]=1;
else if ( jbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) )
{
jbt[i]=0;
//fliplist_attach_head(8, 1);
}
i=11;// R -> Flip prev
if ( input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) && jbt[i]==0 )
jbt[i]=1;
else if ( jbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) )
{
jbt[i]=0;
//fliplist_attach_head(8, 0);
}
i=12;// L2 -> toggle joy port
if ( input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) && jbt[i]==0 )
jbt[i]=1;
else if ( jbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) )
{
jbt[i]=0;
cur_port++;
if(cur_port>2)cur_port=1;
}
/*
i=13;// R2 -> Flip prev
if ( input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) && jbt[i]==0 )
jbt[i]=1;
else if ( jbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) )
{
jbt[i]=0;
fliplist_attach_head(8, 0);
}
*/
}//if vice_devices=joy
if(minivmac_devices[0]==RETRO_DEVICE_MINIVMAC_JOYSTICK)
{
//shortcut for joy mode only
}//if pauseg=0
i=1;// Y -> vkbd toggle
if ( input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) && jbt[i]==0 )
jbt[i]=1;
else if ( jbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) )
{
jbt[i]=0;
SHOWKEY=-SHOWKEY;
//Screen_SetFullUpdate(0);
}
i=3;// START -> Gui toggle
if ( input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) && jbt[i]==0 )
jbt[i]=1;
else if ( jbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) )
{
jbt[i]=0;
pauseg=1;
save_bkg();
}
i=10;// L -> Flip next
if ( input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) && jbt[i]==0 )
jbt[i]=1;
else if ( jbt[i]==1 && ! input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i) )
{
jbt[i]=0;
//fliplist_attach_head(8, 1);
}