a&=0xffffff;\r
if(PicoMCD&1) return m68k_read_pcrelative_CD8(a);\r
if(a<Pico.romsize) return *(u8 *)(Pico.rom+(a^1)); // Rom\r
+#ifdef EMU_C68K\r
if(do_fake&&((ppop&0x3f)==0x3a||(ppop&0x3f)==0x3b)) return lastread_d[lrp_mus++&15];\r
+#endif\r
if((a&0xe00000)==0xe00000) return *(u8 *)(Pico.ram+((a^1)&0xffff)); // Ram\r
return 0;\r
}\r
a&=0xffffff;\r
if(PicoMCD&1) return m68k_read_pcrelative_CD16(a);\r
if(a<Pico.romsize) return *(u16 *)(Pico.rom+(a&~1)); // Rom\r
+#ifdef EMU_C68K\r
if(do_fake&&((ppop&0x3f)==0x3a||(ppop&0x3f)==0x3b)) return lastread_d[lrp_mus++&15];\r
+#endif\r
if((a&0xe00000)==0xe00000) return *(u16 *)(Pico.ram+(a&0xfffe)); // Ram\r
return 0;\r
}\r
a&=0xffffff;\r
if(PicoMCD&1) return m68k_read_pcrelative_CD32(a);\r
if(a<Pico.romsize) { u16 *pm=(u16 *)(Pico.rom+(a&~1)); return (pm[0]<<16)|pm[1]; }\r
+#ifdef EMU_C68K\r
if(do_fake&&((ppop&0x3f)==0x3a||(ppop&0x3f)==0x3b)) return lastread_d[lrp_mus++&15];\r
+#endif\r
if((a&0xe00000)==0xe00000) { u16 *pm=(u16 *)(Pico.ram+(a&0xfffe)); return (pm[0]<<16)|pm[1]; } // Ram\r
return 0;\r
}\r
#undef SekEndRun\r
#define SekSetCyclesLeftNoMCD(c)\r
#define SekSetCyclesLeft(c)\r
-#define SekCyclesBurn(c)\r
+#define SekCyclesBurn(c) c\r
#define SekEndRun(c)\r
#endif\r
\r
//m68ki_cpu.s_flag = SFLAG_SET;\r
//PicoCpu.srh|=0x20;\r
}\r
- if (PicoCpu.a[7] < 0x00ff0000 || PicoCpu.a[7] >= 0x01000000)\r
- {\r
- PicoCpu.a[7] = m68ki_cpu.dar[15] = 0xff8000;\r
- }\r
\r
pppc = SekPc;\r
ppop = m68k_read_disassembler_16(pppc);\r
memcpy(old_regs, PicoCpu.d, 4*16);\r
old_sr = CycloneGetSr(&PicoCpu);\r
\r
- //if (Pico.m.frame_count > 1400)\r
- // dprintf("---");\r
+ /*\r
+ dprintf("---");\r
{\r
char buff[128];\r
dprintf("---");\r
m68k_disassemble(buff, pppc, M68K_CPU_TYPE_68000);\r
dprintf("PC: %06x: %04x: %s", pppc, ppop, buff);\r
}\r
+ */\r
\r
PicoCpu.cycles=1;\r
CycloneRun(&PicoCpu);\r
\r
// OSP/USP\r
if(PicoCpu.osp != m68ki_cpu.sp[((mu_sr>>11)&4)^4]) {\r
- dprintf("OSP: %06x vs %06x", PicoCpu.osp, m68ki_cpu.sp[0]);\r
+ dprintf("OSP: %06x vs %06x", PicoCpu.osp, m68ki_cpu.sp[((mu_sr>>11)&4)^4]);\r
err=1;\r
}\r
\r
\r
if(err) dumpPCandExit();\r
\r
+/*\r
+ if (PicoCpu.a[7] < 0x00ff0000 || PicoCpu.a[7] >= 0x01000000)\r
+ {\r
+ PicoCpu.a[7] = m68ki_cpu.dar[15] = 0xff8000;\r
+ }\r
+*/\r
#if 0\r
m68k_set_reg(M68K_REG_SR, ((mu_sr-1)&~0x2000)|(mu_sr&0x2000)); // broken\r
CycloneSetSr(&PicoCpu, ((mu_sr-1)&~0x2000)|(mu_sr&0x2000));\r
ifeq "$(debug_cyclone)" "1"\r
use_cyclone = 1\r
use_musashi = 1\r
+endif\r
+ifeq "$(use_musashi)" "1"\r
+asm_cdpico = 0\r
asm_memory = 0\r
asm_cdmemory = 0\r
-endif\r
-ifneq "$(use_musashi)" "1"\r
+else\r
use_cyclone = 1\r
endif\r
\r
# CPU cores\r
ifeq "$(use_musashi)" "1"\r
DEFINC += -DEMU_M68K\r
-OBJS += ../../cpu/musashi/m68kcpu.o ../../cpu/musashi/m68kopac.o ../../cpu/musashi/m68kopdm.o\r
-OBJS += ../../cpu/musashi/m68kopnz.o ../../cpu/musashi/m68kops.o\r
+OBJS += ../../cpu/musashi/m68kops.o ../../cpu/musashi/m68kcpu.o\r
endif\r
ifeq "$(use_cyclone)" "1"\r
DEFINC += -DEMU_C68K\r
# build Cyclone\r
../../cpu/Cyclone/proj/Cyclone.s :\r
@echo building Cyclone...\r
- @make -C ../../cpu/Cyclone/proj -f Makefile.linux\r
+ @make -C ../../cpu/Cyclone/proj\r
+\r
+../../cpu/musashi/m68kops.c :\r
+ @make -C ../../cpu/musashi\r
+\r
\r
# build helix libs\r
helix/helix_mp3.a:\r