diff options
Diffstat (limited to 'libpcsxcore')
-rw-r--r-- | libpcsxcore/cdriso.c | 6 | ||||
-rw-r--r-- | libpcsxcore/new_dynarec/assem_arm.c | 4 | ||||
-rw-r--r-- | libpcsxcore/new_dynarec/assem_arm.h | 4 | ||||
-rw-r--r-- | libpcsxcore/new_dynarec/emu_if.c | 2 | ||||
-rw-r--r-- | libpcsxcore/new_dynarec/emu_if.h | 2 | ||||
-rw-r--r-- | libpcsxcore/new_dynarec/new_dynarec.c | 5 | ||||
-rw-r--r-- | libpcsxcore/psxbios.c | 11 | ||||
-rw-r--r-- | libpcsxcore/sio.c | 14 | ||||
-rw-r--r-- | libpcsxcore/socket.c | 17 |
9 files changed, 59 insertions, 6 deletions
diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 515370f..d2c904c 100644 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -30,7 +30,7 @@ #include <process.h> #include <windows.h> #define strcasecmp _stricmp -#define usleep(x) Sleep((x) / 1000) +#define usleep(x) (Sleep((x) / 1000)) #else #include <pthread.h> #include <sys/time.h> @@ -225,7 +225,9 @@ static void *playthread(void *param) do { ret = SPU_playCDDAchannel((short *)sndbuffer, s); if (ret == 0x7761) + { usleep(6 * 1000); + } } while (ret == 0x7761 && playing); // rearmed_wait } @@ -236,7 +238,9 @@ static void *playthread(void *param) // HACK: stop feeding data while emu is paused extern int stop; while (stop && playing) + { usleep(10000); + } now = GetTickCount(); osleep = t - now; diff --git a/libpcsxcore/new_dynarec/assem_arm.c b/libpcsxcore/new_dynarec/assem_arm.c index 708c8ae..3cc3737 100644 --- a/libpcsxcore/new_dynarec/assem_arm.c +++ b/libpcsxcore/new_dynarec/assem_arm.c @@ -30,7 +30,9 @@ #endif #include "arm_features.h" -#if !BASE_ADDR_FIXED +#ifdef VITA +char* translation_cache = 0; +#elif !BASE_ADDR_FIXED char translation_cache[1 << TARGET_SIZE_2] __attribute__((aligned(4096))); #endif diff --git a/libpcsxcore/new_dynarec/assem_arm.h b/libpcsxcore/new_dynarec/assem_arm.h index 2254638..da4144d 100644 --- a/libpcsxcore/new_dynarec/assem_arm.h +++ b/libpcsxcore/new_dynarec/assem_arm.h @@ -64,6 +64,10 @@ extern char *invc_ptr; // "round" address helpful for debug #define BASE_ADDR 0x1000000 #else +#if defined(VITA) +extern char* translation_cache; +#else extern char translation_cache[1 << TARGET_SIZE_2]; +#endif #define BASE_ADDR (u_int)translation_cache #endif diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/emu_if.c index 22db5d1..8aebd64 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/emu_if.c @@ -431,7 +431,7 @@ void do_insn_cmp() {} #ifdef DRC_DISABLE unsigned int address; int pending_exception, stop; -unsigned int next_interupt; +u32 next_interupt; int new_dynarec_did_compile; int cycle_multiplier; int new_dynarec_hacks; diff --git a/libpcsxcore/new_dynarec/emu_if.h b/libpcsxcore/new_dynarec/emu_if.h index 3980490..73f842b 100644 --- a/libpcsxcore/new_dynarec/emu_if.h +++ b/libpcsxcore/new_dynarec/emu_if.h @@ -89,7 +89,7 @@ extern void *scratch_buf_ptr; extern u32 inv_code_start, inv_code_end; /* cycles/irqs */ -extern unsigned int next_interupt; +extern u32 next_interupt; extern int pending_exception; /* called by drc */ diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 5120df0..65c8f03 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -53,6 +53,9 @@ static void __clear_cache(void *start, void *end) { sys_dcache_flush(start, len); sys_icache_invalidate(start, len); } +#elif defined(_3DS) +#include "3ds_utils.h" +#define __clear_cache(start,end) svcFlushProcessDataCache(0xFFFF8001, start, (u32)(end)-(u32)(start)) #endif #define MAXBLOCK 4096 @@ -131,7 +134,7 @@ struct ll_entry int ccadj[MAXBLOCK]; int slen; u_int instr_addr[MAXBLOCK]; - u_int link_addr[MAXBLOCK][3]; + static u_int link_addr[MAXBLOCK][3]; int linkcount; u_int stubs[MAXBLOCK*3][8]; int stubcount; diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index 292d80d..d5ed725 100644 --- a/libpcsxcore/psxbios.c +++ b/libpcsxcore/psxbios.c @@ -2216,6 +2216,15 @@ void psxBios_ChangeClearPad() { // 5b pc0 = ra; } +void psxBios__card_status() { // 5c +#ifdef PSXBIOS_LOG + PSXBIOS_LOG("psxBios_%s: %x\n", biosB0n[0x5c], a0); +#endif + + v0 = 1; + pc0 = ra; +} + /* System calls C0 */ /* @@ -2569,7 +2578,7 @@ void psxBiosInit() { //biosB0[0x59] = psxBios_sys_b0_59; //biosB0[0x5a] = psxBios_sys_b0_5a; biosB0[0x5b] = psxBios_ChangeClearPad; - //biosB0[0x5c] = psxBios__card_status; + biosB0[0x5c] = psxBios__card_status; //biosB0[0x5d] = psxBios__card_wait; //*******************C0 CALLS**************************** //biosC0[0x00] = psxBios_InitRCnt; diff --git a/libpcsxcore/sio.c b/libpcsxcore/sio.c index b3732d2..d251fa7 100644 --- a/libpcsxcore/sio.c +++ b/libpcsxcore/sio.c @@ -117,6 +117,20 @@ void sioWrite8(unsigned char value) { break; } } + // NegCon - Wipeout 3 + if( buf[parp] == 0x23 ) { + switch (value) { + // enter config mode + case 0x43: + buf[1] = 0x79; + break; + + // get status + case 0x45: + buf[1] = 0xf3; + break; + } + } } else padst = 0; return; diff --git a/libpcsxcore/socket.c b/libpcsxcore/socket.c index 31f82e2..c408bc3 100644 --- a/libpcsxcore/socket.c +++ b/libpcsxcore/socket.c @@ -15,6 +15,22 @@ * along with this program; if not, see <http://www.gnu.org/licenses>. */ +#ifdef NO_SOCKET + +int StartServer() { return 0;} +void StopServer() {} +void GetClient() {} +void CloseClient() {} +int HasClient() { return 0;} +int ReadSocket(char * buffer, int len) { return 0;} +int RawReadSocket(char * buffer, int len) { return 0;} +void WriteSocket(char * buffer, int len) {} + +void SetsBlock() {} +void SetsNonblock() {} + +#else // NO_SOCKET + #ifdef _WIN32 #include <winsock2.h> #endif @@ -252,3 +268,4 @@ void SetsNonblock() { fcntl(server_socket, F_SETFL, flags | O_NONBLOCK); #endif } +#endif // NO_SOCKET |