mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
add configure, revive pnd build, unify/refactor things
This commit is contained in:
parent
7e7b446f29
commit
d4d626658a
22 changed files with 733 additions and 498 deletions
52
pico/arm_features.h
Normal file
52
pico/arm_features.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
#ifndef __ARM_FEATURES_H__
|
||||
#define __ARM_FEATURES_H__
|
||||
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
|
||||
|| defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \
|
||||
|| defined(__ARM_ARCH_7EM__)
|
||||
|
||||
#define HAVE_ARMV7
|
||||
#define HAVE_ARMV6
|
||||
#define HAVE_ARMV5
|
||||
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
|
||||
|| defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \
|
||||
|| defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__)
|
||||
|
||||
#define HAVE_ARMV6
|
||||
#define HAVE_ARMV5
|
||||
|
||||
#elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5E__) \
|
||||
|| defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__)
|
||||
|
||||
#define HAVE_ARMV5
|
||||
|
||||
#endif
|
||||
|
||||
/* no need for HAVE_NEON - GCC defines __ARM_NEON__ consistently */
|
||||
|
||||
/* global function/external symbol */
|
||||
#ifndef __MACH__
|
||||
#define ESYM(name) name
|
||||
|
||||
#define FUNCTION(name) \
|
||||
.globl name; \
|
||||
.type name, %function; \
|
||||
name
|
||||
|
||||
#define EXTRA_UNSAVED_REGS
|
||||
|
||||
#else
|
||||
#define ESYM(name) _##name
|
||||
|
||||
#define FUNCTION(name) \
|
||||
.globl ESYM(name); \
|
||||
name: \
|
||||
ESYM(name)
|
||||
|
||||
// r7 is preserved, but add it for EABI alignment..
|
||||
#define EXTRA_UNSAVED_REGS r7, r9,
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __ARM_FEATURES_H__ */
|
|
@ -31,7 +31,7 @@ extern ssp1601_t *ssp;
|
|||
#define SSP_FLAG_Z (1<<0xd)
|
||||
#define SSP_FLAG_N (1<<0xf)
|
||||
|
||||
#ifndef ARM
|
||||
#ifndef __arm__
|
||||
//#define DUMP_BLOCK 0x0c9a
|
||||
void ssp_drc_next(void){}
|
||||
void ssp_drc_next_patch(void){}
|
||||
|
@ -1794,7 +1794,7 @@ void *ssp_translate_block(int pc)
|
|||
exit(0);
|
||||
#endif
|
||||
|
||||
#ifdef ARM
|
||||
#ifdef __arm__
|
||||
cache_flush_d_inval_i(tcache, tcache_ptr);
|
||||
#endif
|
||||
|
||||
|
@ -1839,7 +1839,7 @@ int ssp1601_dyn_startup(void)
|
|||
PicoLoadStateHook = ssp1601_state_load;
|
||||
|
||||
n_in_ops = 0;
|
||||
#ifdef ARM
|
||||
#ifdef __arm__
|
||||
// hle'd blocks
|
||||
ssp_block_table[0x800/2] = (void *) ssp_hle_800;
|
||||
ssp_block_table[0x902/2] = (void *) ssp_hle_902;
|
||||
|
@ -1879,7 +1879,7 @@ void ssp1601_dyn_run(int cycles)
|
|||
#ifdef DUMP_BLOCK
|
||||
ssp_translate_block(DUMP_BLOCK >> 1);
|
||||
#endif
|
||||
#ifdef ARM
|
||||
#ifdef __arm__
|
||||
ssp_drc_entry(cycles);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ static void PicoSVPReset(void)
|
|||
|
||||
memcpy(svp->iram_rom + 0x800, Pico.rom + 0x800, 0x20000 - 0x800);
|
||||
ssp1601_reset(&svp->ssp1601);
|
||||
#ifndef PSP
|
||||
#ifdef __arm__
|
||||
if ((PicoOpt&POPT_EN_SVP_DRC) && svp_dyn_ready)
|
||||
ssp1601_dyn_reset(&svp->ssp1601);
|
||||
#endif
|
||||
|
@ -66,7 +66,7 @@ static void PicoSVPReset(void)
|
|||
static void PicoSVPLine(void)
|
||||
{
|
||||
int count = 1;
|
||||
#if defined(ARM) || defined(PSP)
|
||||
#if defined(__arm__) || defined(PSP)
|
||||
// performance hack
|
||||
static int delay_lines = 0;
|
||||
delay_lines++;
|
||||
|
@ -76,7 +76,7 @@ static void PicoSVPLine(void)
|
|||
delay_lines = 0;
|
||||
#endif
|
||||
|
||||
#ifndef PSP
|
||||
#ifdef __arm__
|
||||
if ((PicoOpt&POPT_EN_SVP_DRC) && svp_dyn_ready)
|
||||
ssp1601_dyn_run(PicoSVPCycles * count);
|
||||
else
|
||||
|
@ -118,7 +118,7 @@ static int PicoSVPDma(unsigned int source, int len, unsigned short **srcp, unsig
|
|||
|
||||
void PicoSVPInit(void)
|
||||
{
|
||||
#ifndef PSP
|
||||
#ifdef __arm__
|
||||
// this is to unmap tcache and make
|
||||
// mem available for large ROMs, MCD, etc.
|
||||
drc_cmn_cleanup();
|
||||
|
@ -127,7 +127,7 @@ void PicoSVPInit(void)
|
|||
|
||||
static void PicoSVPExit(void)
|
||||
{
|
||||
#ifndef PSP
|
||||
#ifdef __arm__
|
||||
ssp1601_dyn_exit();
|
||||
#endif
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ void PicoSVPStartup(void)
|
|||
|
||||
// init SVP compiler
|
||||
svp_dyn_ready = 0;
|
||||
#ifndef PSP
|
||||
#ifdef __arm__
|
||||
if (PicoOpt & POPT_EN_SVP_DRC) {
|
||||
if (ssp1601_dyn_startup())
|
||||
return;
|
||||
|
|
|
@ -35,7 +35,7 @@ extern "C" {
|
|||
|
||||
// ----------------------- 68000 CPU -----------------------
|
||||
#ifdef EMU_C68K
|
||||
#include "../cpu/Cyclone/Cyclone.h"
|
||||
#include "../cpu/cyclone/Cyclone.h"
|
||||
extern struct Cyclone PicoCpuCM68k, PicoCpuCS68k;
|
||||
#define SekCyclesLeftNoMCD PicoCpuCM68k.cycles // cycles left for this run
|
||||
#define SekCyclesLeft \
|
||||
|
@ -46,7 +46,7 @@ extern struct Cyclone PicoCpuCM68k, PicoCpuCS68k;
|
|||
#define SekEndTimesliceS68k(after) PicoCpuCS68k.cycles=after
|
||||
#define SekPc (PicoCpuCM68k.pc-PicoCpuCM68k.membase)
|
||||
#define SekPcS68k (PicoCpuCS68k.pc-PicoCpuCS68k.membase)
|
||||
#define SekDar(x) PicoCpuCM68k.d[x]
|
||||
#define SekDar(x) (x < 8 ? PicoCpuCM68k.d[x] : PicoCpuCM68k.a[x - 8])
|
||||
#define SekSr CycloneGetSr(&PicoCpuCM68k)
|
||||
#define SekSetStop(x) { PicoCpuCM68k.state_flags&=~1; if (x) { PicoCpuCM68k.state_flags|=1; PicoCpuCM68k.cycles=0; } }
|
||||
#define SekSetStopS68k(x) { PicoCpuCS68k.state_flags&=~1; if (x) { PicoCpuCS68k.state_flags|=1; PicoCpuCS68k.cycles=0; } }
|
||||
|
@ -73,7 +73,7 @@ extern M68K_CONTEXT PicoCpuFM68k, PicoCpuFS68k;
|
|||
#define SekEndTimesliceS68k(after) PicoCpuFS68k.io_cycle_counter=after
|
||||
#define SekPc fm68k_get_pc(&PicoCpuFM68k)
|
||||
#define SekPcS68k fm68k_get_pc(&PicoCpuFS68k)
|
||||
#define SekDar(x) PicoCpuFM68k.dreg[x].D
|
||||
#define SekDar(x) (x < 8 ? PicoCpuFM68k.dreg[x].D : PicoCpuFM68k.areg[x - 8].D)
|
||||
#define SekSr PicoCpuFM68k.sr
|
||||
#define SekSetStop(x) { \
|
||||
PicoCpuFM68k.execinfo &= ~FM68K_HALTED; \
|
||||
|
|
|
@ -261,7 +261,7 @@ PICO_INTERNAL void SekUnpackCpu(const unsigned char *cpu, int is_sub)
|
|||
|
||||
/* idle loop detection, not to be used in CD mode */
|
||||
#ifdef EMU_C68K
|
||||
#include "cpu/Cyclone/tools/idle.h"
|
||||
#include "cpu/cyclone/tools/idle.h"
|
||||
#endif
|
||||
|
||||
static unsigned short **idledet_ptrs = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue