Commit 22e95de2 authored by Stefanos Kornilios Mitsis Poiitidis's avatar Stefanos Kornilios Mitsis Poiitidis
Browse files

Merge pull request #572 from reicast/skmp/pandora-merge

pandora merge
parents 63485e7a d5ddad53
...@@ -58,6 +58,8 @@ RZDCY_CFLAGS := \ ...@@ -58,6 +58,8 @@ RZDCY_CFLAGS := \
-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp \ -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp \
-frename-registers -fsingle-precision-constant -ffast-math \ -frename-registers -fsingle-precision-constant -ffast-math \
-ftree-vectorize -fomit-frame-pointer -ftree-vectorize -fomit-frame-pointer
RZDCY_CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon
RZDCY_CFLAGS += -DTARGET_LINUX_ARMELv7
else else
RZDCY_CFLAGS := \ RZDCY_CFLAGS := \
$(CFLAGS) -c -g -O3 -I$(RZDCY_SRC_DIR) -I$(RZDCY_SRC_DIR)/deps \ $(CFLAGS) -c -g -O3 -I$(RZDCY_SRC_DIR) -I$(RZDCY_SRC_DIR)/deps \
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#define clip_verify(x) #define clip_verify(x)
#endif #endif
//Sound generation, mixin, and channel regs emulation
//x.15 //x.15
s32 volume_lut[16]; s32 volume_lut[16];
//255 -> mute //255 -> mute
......
...@@ -547,7 +547,9 @@ struct maple_sega_vmu: maple_base ...@@ -547,7 +547,9 @@ struct maple_sega_vmu: maple_base
} }
} }
config->SetImage(lcd_data_decoded); config->SetImage(lcd_data_decoded);
#ifndef TARGET_PANDORA
push_vmu_screen(lcd_data_decoded); push_vmu_screen(lcd_data_decoded);
#endif
#if 0 #if 0
// Update LCD window // Update LCD window
if (!dev->lcd.visible) if (!dev->lcd.visible)
...@@ -799,11 +801,13 @@ struct maple_microphone: maple_base ...@@ -799,11 +801,13 @@ struct maple_microphone: maple_base
w8(0x04);//status (just the bit for recording) w8(0x04);//status (just the bit for recording)
w8(0x0f);//gain (default) w8(0x0f);//gain (default)
w8(0);//exp ? w8(0);//exp ?
#ifndef TARGET_PANDORA
if(get_mic_data(micdata)){ if(get_mic_data(micdata)){
w8(240);//ct (240 samples) w8(240);//ct (240 samples)
wptr(micdata, SIZE_OF_MIC_DATA); wptr(micdata, SIZE_OF_MIC_DATA);
}else{ }else
#endif
{
w8(0); w8(0);
} }
......
...@@ -30,5 +30,7 @@ struct maple_device ...@@ -30,5 +30,7 @@ struct maple_device
maple_device* maple_Create(MapleDeviceType type); maple_device* maple_Create(MapleDeviceType type);
#define SIZE_OF_MIC_DATA 480 //ALSO DEFINED IN SipEmulator.java #define SIZE_OF_MIC_DATA 480 //ALSO DEFINED IN SipEmulator.java
#ifndef TARGET_PANDORA
int get_mic_data(u8* buffer); //implemented in Android.cpp int get_mic_data(u8* buffer); //implemented in Android.cpp
int push_vmu_screen(u8* buffer); //implemented in Android.cpp int push_vmu_screen(u8* buffer); //implemented in Android.cpp
#endif
...@@ -85,7 +85,7 @@ bool rend_single_frame() ...@@ -85,7 +85,7 @@ bool rend_single_frame()
bool proc = rend->Process(_pvrrc); bool proc = rend->Process(_pvrrc);
re.Set(); re.Set();
bool do_swp = proc && rend->Render(); bool do_swp = proc && rend->Render();
if (do_swp) if (do_swp)
...@@ -196,7 +196,7 @@ void rend_start_render() ...@@ -196,7 +196,7 @@ void rend_start_render()
void rend_end_render() void rend_end_render()
{ {
#if 1 //also disabled the printf, it takes quite some time ... #if 1 //also disabled the printf, it takes quite some time ...
#if HOST_OS!=OS_WINDOWS && !defined(_ANDROID) #if HOST_OS!=OS_WINDOWS && !(defined(_ANDROID) || defined(TARGET_PANDORA))
if (!re.state) printf("Render > Extended time slice ...\n"); if (!re.state) printf("Render > Extended time slice ...\n");
#endif #endif
#endif #endif
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
extern u32 fskip; extern u32 fskip;
extern u32 FrameCount; extern u32 FrameCount;
int frameskip=0;
bool FrameSkipping=false; // global switch to enable/disable frameskip
TA_context* ta_ctx; TA_context* ta_ctx;
tad_context ta_tad; tad_context ta_tad;
...@@ -75,6 +78,13 @@ bool QueueRender(TA_context* ctx) ...@@ -75,6 +78,13 @@ bool QueueRender(TA_context* ctx)
{ {
verify(ctx != 0); verify(ctx != 0);
if (FrameSkipping && frameskip) {
frameskip=1-frameskip;
tactx_Recycle(ctx);
fskip++;
return false;
}
if (rqueue) { if (rqueue) {
tactx_Recycle(ctx); tactx_Recycle(ctx);
fskip++; fskip++;
......
...@@ -131,7 +131,7 @@ void plugins_Reset(bool Manual) ...@@ -131,7 +131,7 @@ void plugins_Reset(bool Manual)
void* webui_th(void* p) void* webui_th(void* p)
{ {
#if HOST_OS == OS_WINDOWS || HOST_OS == OS_LINUX #if (HOST_OS == OS_WINDOWS || HOST_OS == OS_LINUX) && !defined(TARGET_PANDORA)
webui_start(); webui_start();
#endif #endif
......
...@@ -101,6 +101,8 @@ void emit_WriteCodeCache(); ...@@ -101,6 +101,8 @@ void emit_WriteCodeCache();
static SDL_Joystick *JoySDL = 0; static SDL_Joystick *JoySDL = 0;
extern bool FrameSkipping;
#ifdef USE_OSS #ifdef USE_OSS
static int audio_fd = -1; static int audio_fd = -1;
#endif #endif
...@@ -222,6 +224,7 @@ bool HandleEvents(u32 port) { ...@@ -222,6 +224,7 @@ bool HandleEvents(u32 port) {
case SDLK_k: KillTex=true; break; case SDLK_k: KillTex=true; break;
case SDLK_n: if (value) {mouse_use=(mouse_use+1)%4; snprintf(OSD_Info, 128, "Right Nub mode: %s\n", num_mode[mouse_use]); OSD_Delay=300;}; break; case SDLK_n: if (value) {mouse_use=(mouse_use+1)%4; snprintf(OSD_Info, 128, "Right Nub mode: %s\n", num_mode[mouse_use]); OSD_Delay=300;}; break;
case SDLK_s: if (value) {settings.aica.NoSound=!settings.aica.NoSound; snprintf(OSD_Info, 128, "Sound %s\n", (settings.aica.NoSound)?"Off":"On"); OSD_Delay=300;};break; case SDLK_s: if (value) {settings.aica.NoSound=!settings.aica.NoSound; snprintf(OSD_Info, 128, "Sound %s\n", (settings.aica.NoSound)?"Off":"On"); OSD_Delay=300;};break;
case SDLK_f: if (value) {FrameSkipping=!FrameSkipping; snprintf(OSD_Info, 128, "FrameSkipping %s\n", (FrameSkipping)?"On":"Off"); OSD_Delay=300;};break;
case SDLK_c: if (value) {OSD_Counter=1-OSD_Counter;};break; case SDLK_c: if (value) {OSD_Counter=1-OSD_Counter;};break;
#else #else
...@@ -502,6 +505,8 @@ int main(int argc, wchar* argv[]) ...@@ -502,6 +505,8 @@ int main(int argc, wchar* argv[])
#ifdef USE_OSS #ifdef USE_OSS
init_sound(); init_sound();
#endif #endif
FrameSkipping=false;
dc_run(); dc_run();
......
...@@ -5,12 +5,23 @@ FOR_ARM :=1 ...@@ -5,12 +5,23 @@ FOR_ARM :=1
FOR_PANDORA :=1 FOR_PANDORA :=1
USE_SDL :=1 USE_SDL :=1
USE_OSS :=1 USE_OSS :=1
#PGO_MAKE :=1
#PGO_USE :=1
#USE_CCACHE :=1
#USE_CCACHE :=1
#PGO_MAKE :=1
#PGO_USE :=1
#USE_CCACHE :=1
#USE_CCACHE :=1
#PGO_MAKE :=1 #PGO_MAKE :=1
PGO_USE :=1 PGO_USE :=1
RZDCY_SRC_DIR = ../../newdc RZDCY_SRC_DIR = ../../core
include $(RZDCY_SRC_DIR)/newdc.mk include $(RZDCY_SRC_DIR)/core.mk
CC_PREFIX ?= CC_PREFIX ?=
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment