mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
adjustments for CPU core changes
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@190 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
547045e3c6
commit
2270612aa7
4 changed files with 27 additions and 13 deletions
|
@ -504,7 +504,9 @@ static unsigned int m68k_read_8 (unsigned int a, int do_fake) {
|
|||
a&=0xffffff;
|
||||
if(PicoMCD&1) return m68k_read_pcrelative_CD8(a);
|
||||
if(a<Pico.romsize) return *(u8 *)(Pico.rom+(a^1)); // Rom
|
||||
#ifdef EMU_C68K
|
||||
if(do_fake&&((ppop&0x3f)==0x3a||(ppop&0x3f)==0x3b)) return lastread_d[lrp_mus++&15];
|
||||
#endif
|
||||
if((a&0xe00000)==0xe00000) return *(u8 *)(Pico.ram+((a^1)&0xffff)); // Ram
|
||||
return 0;
|
||||
}
|
||||
|
@ -512,7 +514,9 @@ static unsigned int m68k_read_16(unsigned int a, int do_fake) {
|
|||
a&=0xffffff;
|
||||
if(PicoMCD&1) return m68k_read_pcrelative_CD16(a);
|
||||
if(a<Pico.romsize) return *(u16 *)(Pico.rom+(a&~1)); // Rom
|
||||
#ifdef EMU_C68K
|
||||
if(do_fake&&((ppop&0x3f)==0x3a||(ppop&0x3f)==0x3b)) return lastread_d[lrp_mus++&15];
|
||||
#endif
|
||||
if((a&0xe00000)==0xe00000) return *(u16 *)(Pico.ram+(a&0xfffe)); // Ram
|
||||
return 0;
|
||||
}
|
||||
|
@ -520,7 +524,9 @@ static unsigned int m68k_read_32(unsigned int a, int do_fake) {
|
|||
a&=0xffffff;
|
||||
if(PicoMCD&1) return m68k_read_pcrelative_CD32(a);
|
||||
if(a<Pico.romsize) { u16 *pm=(u16 *)(Pico.rom+(a&~1)); return (pm[0]<<16)|pm[1]; }
|
||||
#ifdef EMU_C68K
|
||||
if(do_fake&&((ppop&0x3f)==0x3a||(ppop&0x3f)==0x3b)) return lastread_d[lrp_mus++&15];
|
||||
#endif
|
||||
if((a&0xe00000)==0xe00000) { u16 *pm=(u16 *)(Pico.ram+(a&0xfffe)); return (pm[0]<<16)|pm[1]; } // Ram
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ extern int SekCycleAimS68k;
|
|||
#undef SekEndRun
|
||||
#define SekSetCyclesLeftNoMCD(c)
|
||||
#define SekSetCyclesLeft(c)
|
||||
#define SekCyclesBurn(c)
|
||||
#define SekCyclesBurn(c) c
|
||||
#define SekEndRun(c)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -53,24 +53,21 @@ int CM_compareRun(int cyc)
|
|||
//m68ki_cpu.s_flag = SFLAG_SET;
|
||||
//PicoCpu.srh|=0x20;
|
||||
}
|
||||
if (PicoCpu.a[7] < 0x00ff0000 || PicoCpu.a[7] >= 0x01000000)
|
||||
{
|
||||
PicoCpu.a[7] = m68ki_cpu.dar[15] = 0xff8000;
|
||||
}
|
||||
|
||||
pppc = SekPc;
|
||||
ppop = m68k_read_disassembler_16(pppc);
|
||||
memcpy(old_regs, PicoCpu.d, 4*16);
|
||||
old_sr = CycloneGetSr(&PicoCpu);
|
||||
|
||||
//if (Pico.m.frame_count > 1400)
|
||||
// dprintf("---");
|
||||
/*
|
||||
dprintf("---");
|
||||
{
|
||||
char buff[128];
|
||||
dprintf("---");
|
||||
m68k_disassemble(buff, pppc, M68K_CPU_TYPE_68000);
|
||||
dprintf("PC: %06x: %04x: %s", pppc, ppop, buff);
|
||||
}
|
||||
*/
|
||||
|
||||
PicoCpu.cycles=1;
|
||||
CycloneRun(&PicoCpu);
|
||||
|
@ -137,7 +134,7 @@ int CM_compareRun(int cyc)
|
|||
|
||||
// OSP/USP
|
||||
if(PicoCpu.osp != m68ki_cpu.sp[((mu_sr>>11)&4)^4]) {
|
||||
dprintf("OSP: %06x vs %06x", PicoCpu.osp, m68ki_cpu.sp[0]);
|
||||
dprintf("OSP: %06x vs %06x", PicoCpu.osp, m68ki_cpu.sp[((mu_sr>>11)&4)^4]);
|
||||
err=1;
|
||||
}
|
||||
|
||||
|
@ -149,6 +146,12 @@ int CM_compareRun(int cyc)
|
|||
|
||||
if(err) dumpPCandExit();
|
||||
|
||||
/*
|
||||
if (PicoCpu.a[7] < 0x00ff0000 || PicoCpu.a[7] >= 0x01000000)
|
||||
{
|
||||
PicoCpu.a[7] = m68ki_cpu.dar[15] = 0xff8000;
|
||||
}
|
||||
*/
|
||||
#if 0
|
||||
m68k_set_reg(M68K_REG_SR, ((mu_sr-1)&~0x2000)|(mu_sr&0x2000)); // broken
|
||||
CycloneSetSr(&PicoCpu, ((mu_sr-1)&~0x2000)|(mu_sr&0x2000));
|
||||
|
|
|
@ -21,10 +21,12 @@ asm_cdmemory = 1
|
|||
ifeq "$(debug_cyclone)" "1"
|
||||
use_cyclone = 1
|
||||
use_musashi = 1
|
||||
endif
|
||||
ifeq "$(use_musashi)" "1"
|
||||
asm_cdpico = 0
|
||||
asm_memory = 0
|
||||
asm_cdmemory = 0
|
||||
endif
|
||||
ifneq "$(use_musashi)" "1"
|
||||
else
|
||||
use_cyclone = 1
|
||||
endif
|
||||
|
||||
|
@ -99,8 +101,7 @@ endif
|
|||
# CPU cores
|
||||
ifeq "$(use_musashi)" "1"
|
||||
DEFINC += -DEMU_M68K
|
||||
OBJS += ../../cpu/musashi/m68kcpu.o ../../cpu/musashi/m68kopac.o ../../cpu/musashi/m68kopdm.o
|
||||
OBJS += ../../cpu/musashi/m68kopnz.o ../../cpu/musashi/m68kops.o
|
||||
OBJS += ../../cpu/musashi/m68kops.o ../../cpu/musashi/m68kcpu.o
|
||||
endif
|
||||
ifeq "$(use_cyclone)" "1"
|
||||
DEFINC += -DEMU_C68K
|
||||
|
@ -179,7 +180,11 @@ testrefr.gpe : test.o gp2x.o asmutils.o
|
|||
# build Cyclone
|
||||
../../cpu/Cyclone/proj/Cyclone.s :
|
||||
@echo building Cyclone...
|
||||
@make -C ../../cpu/Cyclone/proj -f Makefile.linux
|
||||
@make -C ../../cpu/Cyclone/proj
|
||||
|
||||
../../cpu/musashi/m68kops.c :
|
||||
@make -C ../../cpu/musashi
|
||||
|
||||
|
||||
# build helix libs
|
||||
helix/helix_mp3.a:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue