mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
mcd: text shows up
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@14 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
8c1952f0d7
commit
672ad67113
13 changed files with 165 additions and 100 deletions
|
@ -23,7 +23,7 @@ struct PicoSRAM SRam;
|
||||||
int z80startCycle = 0, z80stopCycle = 0; // in 68k cycles
|
int z80startCycle = 0, z80stopCycle = 0; // in 68k cycles
|
||||||
//int z80ExtraCycles = 0;
|
//int z80ExtraCycles = 0;
|
||||||
int PicoPad[2]; // Joypads, format is SACB RLDU
|
int PicoPad[2]; // Joypads, format is SACB RLDU
|
||||||
int PicoMCD = 0; // mega CD status
|
int PicoMCD = 1; // mega CD status: scd_started
|
||||||
|
|
||||||
// to be called once on emu init
|
// to be called once on emu init
|
||||||
int PicoInit(void)
|
int PicoInit(void)
|
||||||
|
|
|
@ -58,26 +58,6 @@ static unsigned int VideoRead()
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
// calculate the number of cycles 68k->VDP dma operation would take
|
|
||||||
static int DmaSlowBurn(int len)
|
|
||||||
{
|
|
||||||
// test: Legend of Galahad, Time Killers
|
|
||||||
int burn,maxlen,line=Pico.m.scanline;
|
|
||||||
|
|
||||||
if(line == -1) line=vcounts[SekCyclesDone()>>8];
|
|
||||||
maxlen=(224-line)*18;
|
|
||||||
if(len <= maxlen)
|
|
||||||
burn = len*(((488<<8)/18))>>8;
|
|
||||||
else {
|
|
||||||
burn = maxlen*(((488<<8)/18))>>8;
|
|
||||||
burn += (len-maxlen)*(((488<<8)/180))>>8;
|
|
||||||
}
|
|
||||||
|
|
||||||
return burn;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int GetDmaLength()
|
static int GetDmaLength()
|
||||||
{
|
{
|
||||||
struct PicoVideo *pvid=&Pico.video;
|
struct PicoVideo *pvid=&Pico.video;
|
||||||
|
@ -95,7 +75,7 @@ static void DmaSlow(int len)
|
||||||
u16 *pd=0, *pdend, *r;
|
u16 *pd=0, *pdend, *r;
|
||||||
unsigned int a=Pico.video.addr, a2, d;
|
unsigned int a=Pico.video.addr, a2, d;
|
||||||
unsigned char inc=Pico.video.reg[0xf];
|
unsigned char inc=Pico.video.reg[0xf];
|
||||||
unsigned int source; // , burn;
|
unsigned int source;
|
||||||
|
|
||||||
source =Pico.video.reg[0x15]<<1;
|
source =Pico.video.reg[0x15]<<1;
|
||||||
source|=Pico.video.reg[0x16]<<9;
|
source|=Pico.video.reg[0x16]<<9;
|
||||||
|
@ -105,27 +85,22 @@ static void DmaSlow(int len)
|
||||||
Pico.video.type, source, a, len, inc, (Pico.video.status&8)||!(Pico.video.reg[1]&0x40),
|
Pico.video.type, source, a, len, inc, (Pico.video.status&8)||!(Pico.video.reg[1]&0x40),
|
||||||
Pico.m.scanline, SekCyclesDone(), SekPc);
|
Pico.m.scanline, SekCyclesDone(), SekPc);
|
||||||
|
|
||||||
if ((source&0xe00000)==0xe00000) { pd=(u16 *)(Pico.ram+(source&0xfffe)); pdend=(u16 *)(Pico.ram+0x10000); } // Ram
|
if(Pico.m.scanline != -1) {
|
||||||
else if(source<Pico.romsize) { pd=(u16 *)(Pico.rom+(source&~1)); pdend=(u16 *)(Pico.rom+Pico.romsize); } // Rom
|
Pico.m.dma_bytes += len;
|
||||||
else return; // Invalid source address
|
SekSetCyclesLeft(SekCyclesLeft - CheckDMA());
|
||||||
|
} else {
|
||||||
|
// be approximate in non-accurate mode
|
||||||
|
SekSetCyclesLeft(SekCyclesLeft - (len*(((488<<8)/167))>>8));
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
if ((source&0xe00000)==0xe00000) { pd=(u16 *)(Pico.ram+(source&0xfffe)); pdend=(u16 *)(Pico.ram+0x10000); } // Ram
|
||||||
// CPU is stopped during DMA, so we burn some cycles to compensate that
|
else if(PicoMCD & 1) {
|
||||||
if((Pico.video.status&8)||!(Pico.video.reg[1]&0x40)) { // vblank?
|
if(source<0x20000) { pd=(u16 *)(Pico_mcd->bios+(source&~1)); pdend=(u16 *)(Pico_mcd->bios+0x20000); } // Bios area
|
||||||
burn = (len*(((488<<8)/167))>>8); // very approximate
|
else { dprintf("unsupported src"); return; } // Invalid source address
|
||||||
if(!(Pico.video.status&8)) burn+=burn>>1; // a hack for Legend of Galahad
|
} else {
|
||||||
} else burn = DmaSlowBurn(len);
|
if(source<Pico.romsize) { pd=(u16 *)(Pico.rom+(source&~1)); pdend=(u16 *)(Pico.rom+Pico.romsize); } // Rom
|
||||||
SekCyclesBurn(burn);
|
else { dprintf("invalid dma src"); return; } // Invalid source address
|
||||||
#else
|
}
|
||||||
Pico.m.dma_bytes += len;
|
|
||||||
#endif
|
|
||||||
//if(!(Pico.video.status&8))
|
|
||||||
// SekEndRun(0);
|
|
||||||
//Pico.m.dma_endcycles = 0;//SekCyclesLeft;
|
|
||||||
//Pico.m.dma_endcycles -= Pico.m.dma_endcycles>>3; // hack
|
|
||||||
SekSetCyclesLeft(SekCyclesLeft - CheckDMA());
|
|
||||||
// CheckDMA();
|
|
||||||
// dprintf("DmaSlow burn: %i @ %06x", burn, SekPc);
|
|
||||||
|
|
||||||
switch (Pico.video.type)
|
switch (Pico.video.type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -536,7 +536,7 @@ void CDD_Export_Status(void)
|
||||||
csum += Pico_mcd->cdd.Ext;
|
csum += Pico_mcd->cdd.Ext;
|
||||||
Pico_mcd->s68k_regs[0x38+9] = ~csum & 0xf;
|
Pico_mcd->s68k_regs[0x38+9] = ~csum & 0xf;
|
||||||
|
|
||||||
Pico_mcd->s68k_regs[0x36] &= 3; // CDD.Control
|
Pico_mcd->s68k_regs[0x37] &= 3; // CDD.Control
|
||||||
|
|
||||||
if (Pico_mcd->s68k_regs[0x33] & (1<<4))
|
if (Pico_mcd->s68k_regs[0x33] & (1<<4))
|
||||||
{
|
{
|
||||||
|
|
135
Pico/cd/Memory.c
135
Pico/cd/Memory.c
|
@ -34,11 +34,14 @@ static u32 m68k_reg_read16(u32 a, int realsize)
|
||||||
{
|
{
|
||||||
u32 d=0;
|
u32 d=0;
|
||||||
a &= 0x3e;
|
a &= 0x3e;
|
||||||
dprintf("m68k_regs r%2i: [%02x] @%06x", realsize&~1, a+(realsize&1), SekPc);
|
// dprintf("m68k_regs r%2i: [%02x] @%06x", realsize&~1, a+(realsize&1), SekPc);
|
||||||
|
|
||||||
switch (a) {
|
switch (a) {
|
||||||
|
case 0:
|
||||||
|
d = ((Pico_mcd->s68k_regs[0x33]<<13)&0x8000) | Pico_mcd->m68k_regs[1]; // here IFL2 is always 0, just like in Gens
|
||||||
|
goto end;
|
||||||
case 2:
|
case 2:
|
||||||
d = (Pico_mcd->m68k_regs[a]<<8) | Pico_mcd->m68k_regs[a+1] | 1; // for now 2M to m68k
|
d = (Pico_mcd->s68k_regs[a]<<8) | (Pico_mcd->s68k_regs[a+1]&0xc7);
|
||||||
goto end;
|
goto end;
|
||||||
case 8:
|
case 8:
|
||||||
dprintf("m68k host data read");
|
dprintf("m68k host data read");
|
||||||
|
@ -64,54 +67,66 @@ static u32 m68k_reg_read16(u32 a, int realsize)
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
dprintf("ret = %04x", d);
|
// dprintf("ret = %04x", d);
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void m68k_reg_write8(u32 a, u32 d, int realsize)
|
static void m68k_reg_write8(u32 a, u32 d, int realsize)
|
||||||
{
|
{
|
||||||
a &= 0x3f;
|
a &= 0x3f;
|
||||||
dprintf("m68k_regs w%2i: [%02x] %02x @%06x", realsize, a, d, SekPc);
|
// dprintf("m68k_regs w%2i: [%02x] %02x @%06x", realsize, a, d, SekPc);
|
||||||
|
|
||||||
switch (a) {
|
switch (a) {
|
||||||
case 0:
|
case 0:
|
||||||
|
d &= 1;
|
||||||
if ((d&1) && (Pico_mcd->s68k_regs[0x33]&(1<<2))) { dprintf("m68k: s68k irq 2"); SekInterruptS68k(2); }
|
if ((d&1) && (Pico_mcd->s68k_regs[0x33]&(1<<2))) { dprintf("m68k: s68k irq 2"); SekInterruptS68k(2); }
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
d &= 3;
|
||||||
if (!(d&1)) PicoMCD |= 2; // reset pending, needed to be sure we fetch the right vectors on reset
|
if (!(d&1)) PicoMCD |= 2; // reset pending, needed to be sure we fetch the right vectors on reset
|
||||||
if ( (Pico_mcd->m68k_regs[1]&1) != (d&1)) dprintf("m68k: s68k reset %i", !(d&1));
|
if ( (Pico_mcd->m68k_regs[1]&1) != (d&1)) dprintf("m68k: s68k reset %i", !(d&1));
|
||||||
if ( (Pico_mcd->m68k_regs[1]&2) != (d&2)) dprintf("m68k: s68k brq %i", (d&2)>>1);
|
if ( (Pico_mcd->m68k_regs[1]&2) != (d&2)) dprintf("m68k: s68k brq %i", (d&2)>>1);
|
||||||
if (/*!(Pico_mcd->m68k_regs[1]&1) &&*/ (PicoMCD&2) && (d&3)==1) {
|
if (/*!(Pico_mcd->m68k_regs[1]&1) &&*/ (PicoMCD&2) && (d&3)==1) {
|
||||||
SekResetS68k(); // S68k comes out of RESET or BRQ state
|
SekResetS68k(); // S68k comes out of RESET or BRQ state
|
||||||
PicoMCD&=~2;
|
PicoMCD&=~2;
|
||||||
dprintf("m68k: resetting s68k");
|
dprintf("m68k: resetting s68k, cycles=%i", SekCyclesLeft);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
Pico_mcd->s68k_regs[2] = d; // really use s68k side register
|
||||||
|
return;
|
||||||
case 3:
|
case 3:
|
||||||
if ((Pico_mcd->m68k_regs[3]>>6) != ((d>>6)&3))
|
d &= 0xc2;
|
||||||
dprintf("m68k: prg bank: %i -> %i", (Pico_mcd->m68k_regs[a]>>6), ((d>>6)&3));
|
if ((Pico_mcd->s68k_regs[3]>>6) != ((d>>6)&3))
|
||||||
if ((Pico_mcd->m68k_regs[3]&4) != (d&4)) dprintf("m68k: ram mode %i mbit", (d&4) ? 1 : 2);
|
dprintf("m68k: prg bank: %i -> %i", (Pico_mcd->s68k_regs[a]>>6), ((d>>6)&3));
|
||||||
if ((Pico_mcd->m68k_regs[3]&2) != (d&2)) dprintf("m68k: %s", (d&4) ? ((d&2) ? "word swap req" : "noop?") :
|
//if ((Pico_mcd->s68k_regs[3]&4) != (d&4)) dprintf("m68k: ram mode %i mbit", (d&4) ? 1 : 2);
|
||||||
((d&2) ? "word ram to s68k" : "word ram to m68k"));
|
//if ((Pico_mcd->s68k_regs[3]&2) != (d&2)) dprintf("m68k: %s", (d&4) ? ((d&2) ? "word swap req" : "noop?") :
|
||||||
break;
|
// ((d&2) ? "word ram to s68k" : "word ram to m68k"));
|
||||||
|
d |= Pico_mcd->s68k_regs[3]&0x1d;
|
||||||
|
if (d & 2) d &= ~1; // returning word RAM to s68k
|
||||||
|
Pico_mcd->s68k_regs[3] = d; // really use s68k side register
|
||||||
|
return;
|
||||||
case 0xe:
|
case 0xe:
|
||||||
dprintf("m68k: comm flag: %02x", d);
|
//dprintf("m68k: comm flag: %02x", d);
|
||||||
|
|
||||||
dprintf("s68k @ %06x", SekPcS68k);
|
//dprintf("s68k @ %06x", SekPcS68k);
|
||||||
|
|
||||||
Pico_mcd->s68k_regs[0xe] = d;
|
Pico_mcd->s68k_regs[0xe] = d;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((a&0xff) == 0x10) {
|
if (a < 0x10) {
|
||||||
|
Pico_mcd->m68k_regs[a] = (u8) d;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((a&0xf0) == 0x10) {
|
||||||
Pico_mcd->s68k_regs[a] = d;
|
Pico_mcd->s68k_regs[a] = d;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a >= 0x20 || (a >= 0xa && a <= 0xd) || a == 0x0f)
|
if (a >= 0x20 || (a >= 0xa && a <= 0xd) || a == 0x0f)
|
||||||
dprintf("m68k: invalid write?");
|
dprintf("m68k: invalid write?");
|
||||||
|
|
||||||
if (a < 0x10)
|
|
||||||
Pico_mcd->m68k_regs[a] = (u8) d;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,11 +136,14 @@ static u32 s68k_reg_read16(u32 a, int realsize)
|
||||||
u32 d=0;
|
u32 d=0;
|
||||||
a &= 0x1fe;
|
a &= 0x1fe;
|
||||||
|
|
||||||
dprintf("s68k_regs r%2i: [%02x] @ %06x", realsize&~1, a+(realsize&1), SekPcS68k);
|
// dprintf("s68k_regs r%2i: [%02x] @ %06x", realsize&~1, a+(realsize&1), SekPcS68k);
|
||||||
|
|
||||||
switch (a) {
|
switch (a) {
|
||||||
case 0:
|
case 0:
|
||||||
d = 1; goto end; // ver = 0, not in reset state
|
d = 1; goto end; // ver = 0, not in reset state
|
||||||
|
case 2:
|
||||||
|
d = (Pico_mcd->s68k_regs[a]<<8) | (Pico_mcd->s68k_regs[a+1]&0x1f);
|
||||||
|
goto end;
|
||||||
case 6:
|
case 6:
|
||||||
d = CDC_Read_Reg();
|
d = CDC_Read_Reg();
|
||||||
goto end;
|
goto end;
|
||||||
|
@ -145,7 +163,7 @@ static u32 s68k_reg_read16(u32 a, int realsize)
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
dprintf("ret = %04x", d);
|
// dprintf("ret = %04x", d);
|
||||||
|
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
@ -153,10 +171,17 @@ end:
|
||||||
static void s68k_reg_write8(u32 a, u32 d, int realsize)
|
static void s68k_reg_write8(u32 a, u32 d, int realsize)
|
||||||
{
|
{
|
||||||
a &= 0x1ff;
|
a &= 0x1ff;
|
||||||
dprintf("s68k_regs w%2i: [%02x] %02x @ %06x", realsize, a, d, SekPcS68k);
|
//dprintf("s68k_regs w%2i: [%02x] %02x @ %06x", realsize, a, d, SekPcS68k);
|
||||||
|
|
||||||
// TODO: review against Gens
|
// TODO: review against Gens
|
||||||
switch (a) {
|
switch (a) {
|
||||||
|
case 2:
|
||||||
|
return; // only m68k can change WP
|
||||||
|
case 3:
|
||||||
|
d &= 0x1d;
|
||||||
|
d |= Pico_mcd->s68k_regs[3]&0xc2;
|
||||||
|
if (d&1) d &= ~2; // returning word RAM to m68k
|
||||||
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
dprintf("s68k CDC dest: %x", d&7);
|
dprintf("s68k CDC dest: %x", d&7);
|
||||||
Pico_mcd->s68k_regs[4] = (Pico_mcd->s68k_regs[4]&0xC0) | (d&7); // CDC mode
|
Pico_mcd->s68k_regs[4] = (Pico_mcd->s68k_regs[4]&0xC0) | (d&7); // CDC mode
|
||||||
|
@ -180,12 +205,17 @@ static void s68k_reg_write8(u32 a, u32 d, int realsize)
|
||||||
case 0x34: // fader
|
case 0x34: // fader
|
||||||
Pico_mcd->s68k_regs[a] = (u8) d & 0x7f;
|
Pico_mcd->s68k_regs[a] = (u8) d & 0x7f;
|
||||||
return;
|
return;
|
||||||
case 0x37:
|
case 0x36:
|
||||||
if ((d&4) && !(Pico_mcd->s68k_regs[0x37]&4)) {
|
return; // d/m bit is unsetable
|
||||||
|
case 0x37: {
|
||||||
|
u32 d_old = Pico_mcd->s68k_regs[0x37];
|
||||||
|
Pico_mcd->s68k_regs[0x37] = d&7;
|
||||||
|
if ((d&4) && !(d_old&4)) {
|
||||||
CDD_Export_Status();
|
CDD_Export_Status();
|
||||||
// counter75hz = 0; // ???
|
// counter75hz = 0; // ???
|
||||||
}
|
}
|
||||||
break;
|
return;
|
||||||
|
}
|
||||||
case 0x4b:
|
case 0x4b:
|
||||||
Pico_mcd->s68k_regs[a] = (u8) d;
|
Pico_mcd->s68k_regs[a] = (u8) d;
|
||||||
CDD_Import_Command();
|
CDD_Import_Command();
|
||||||
|
@ -302,7 +332,10 @@ static u32 OtherRead16(u32 a, int realsize)
|
||||||
|
|
||||||
if ((a&0xe700e0)==0xc00000) { d=PicoVideoRead(a); goto end; }
|
if ((a&0xe700e0)==0xc00000) { d=PicoVideoRead(a); goto end; }
|
||||||
|
|
||||||
if ((a&0xffffc0)==0xa12000) { d=m68k_reg_read16(a, realsize); goto end; }
|
if ((a&0xffffc0)==0xa12000) {
|
||||||
|
d=m68k_reg_read16(a, realsize);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
d = UnusualRead16(a, realsize);
|
d = UnusualRead16(a, realsize);
|
||||||
|
|
||||||
|
@ -410,15 +443,21 @@ u8 PicoReadM68k8(u32 a)
|
||||||
|
|
||||||
// prg RAM
|
// prg RAM
|
||||||
if ((a&0xfe0000)==0x020000) {
|
if ((a&0xfe0000)==0x020000) {
|
||||||
u8 *prg_bank = Pico_mcd->prg_ram_b[Pico_mcd->m68k_regs[3]>>6];
|
u8 *prg_bank = Pico_mcd->prg_ram_b[Pico_mcd->s68k_regs[3]>>6];
|
||||||
d = *(prg_bank+((a^1)&0x1ffff));
|
d = *(prg_bank+((a^1)&0x1ffff));
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((a&0xff4000)==0xa00000) { d=z80Read8(a); goto end; } // Z80 Ram
|
if ((a&0xff4000)==0xa00000) { d=z80Read8(a); goto end; } // Z80 Ram
|
||||||
|
|
||||||
|
if ((a&0xffffc0)==0xa12000)
|
||||||
|
dprintf("m68k_regs r8: [%02x] @%06x", a&0x3f, SekPc);
|
||||||
|
|
||||||
d=OtherRead16(a&~1, 8|(a&1)); if ((a&1)==0) d>>=8;
|
d=OtherRead16(a&~1, 8|(a&1)); if ((a&1)==0) d>>=8;
|
||||||
|
|
||||||
|
if ((a&0xffffc0)==0xa12000)
|
||||||
|
dprintf("ret = %02x", (u8)d);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
#ifdef __debug_io
|
#ifdef __debug_io
|
||||||
|
@ -439,13 +478,19 @@ u16 PicoReadM68k16(u32 a)
|
||||||
|
|
||||||
// prg RAM
|
// prg RAM
|
||||||
if ((a&0xfe0000)==0x020000) {
|
if ((a&0xfe0000)==0x020000) {
|
||||||
u8 *prg_bank = Pico_mcd->prg_ram_b[Pico_mcd->m68k_regs[3]>>6];
|
u8 *prg_bank = Pico_mcd->prg_ram_b[Pico_mcd->s68k_regs[3]>>6];
|
||||||
d = *(u16 *)(prg_bank+(a&0x1fffe));
|
d = *(u16 *)(prg_bank+(a&0x1fffe));
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((a&0xffffc0)==0xa12000)
|
||||||
|
dprintf("m68k_regs r16: [%02x] @%06x", a&0x3f, SekPc);
|
||||||
|
|
||||||
d = (u16)OtherRead16(a, 16);
|
d = (u16)OtherRead16(a, 16);
|
||||||
|
|
||||||
|
if ((a&0xffffc0)==0xa12000)
|
||||||
|
dprintf("ret = %04x", d);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
#ifdef __debug_io
|
#ifdef __debug_io
|
||||||
|
@ -466,14 +511,20 @@ u32 PicoReadM68k32(u32 a)
|
||||||
|
|
||||||
// prg RAM
|
// prg RAM
|
||||||
if ((a&0xfe0000)==0x020000) {
|
if ((a&0xfe0000)==0x020000) {
|
||||||
u8 *prg_bank = Pico_mcd->prg_ram_b[Pico_mcd->m68k_regs[3]>>6];
|
u8 *prg_bank = Pico_mcd->prg_ram_b[Pico_mcd->s68k_regs[3]>>6];
|
||||||
u16 *pm=(u16 *)(prg_bank+(a&0x1fffe));
|
u16 *pm=(u16 *)(prg_bank+(a&0x1fffe));
|
||||||
d = (pm[0]<<16)|pm[1];
|
d = (pm[0]<<16)|pm[1];
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((a&0xffffc0)==0xa12000)
|
||||||
|
dprintf("m68k_regs r32: [%02x] @%06x", a&0x3f, SekPc);
|
||||||
|
|
||||||
d = (OtherRead16(a, 32)<<16)|OtherRead16(a+2, 32);
|
d = (OtherRead16(a, 32)<<16)|OtherRead16(a+2, 32);
|
||||||
|
|
||||||
|
if ((a&0xffffc0)==0xa12000)
|
||||||
|
dprintf("ret = %08x", d);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
#ifdef __debug_io
|
#ifdef __debug_io
|
||||||
dprintf("r32: %06x, %08x @%06x", a&0xffffff, d, SekPc);
|
dprintf("r32: %06x, %08x @%06x", a&0xffffff, d, SekPc);
|
||||||
|
@ -499,12 +550,15 @@ void PicoWriteM68k8(u32 a,u8 d)
|
||||||
|
|
||||||
// prg RAM
|
// prg RAM
|
||||||
if ((a&0xfe0000)==0x020000) {
|
if ((a&0xfe0000)==0x020000) {
|
||||||
u8 *prg_bank = Pico_mcd->prg_ram_b[Pico_mcd->m68k_regs[3]>>6];
|
u8 *prg_bank = Pico_mcd->prg_ram_b[Pico_mcd->s68k_regs[3]>>6];
|
||||||
u8 *pm=(u8 *)(prg_bank+((a^1)&0x1ffff));
|
u8 *pm=(u8 *)(prg_bank+((a^1)&0x1ffff));
|
||||||
*pm=d;
|
*pm=d;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((a&0xffffc0)==0xa12000)
|
||||||
|
dprintf("m68k_regs w8: [%02x] %02x @%06x", a&0x3f, d, SekPc);
|
||||||
|
|
||||||
OtherWrite8(a,d,8);
|
OtherWrite8(a,d,8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -522,11 +576,13 @@ void PicoWriteM68k16(u32 a,u16 d)
|
||||||
|
|
||||||
// prg RAM
|
// prg RAM
|
||||||
if ((a&0xfe0000)==0x020000) {
|
if ((a&0xfe0000)==0x020000) {
|
||||||
u8 *prg_bank = Pico_mcd->prg_ram_b[Pico_mcd->m68k_regs[3]>>6];
|
u8 *prg_bank = Pico_mcd->prg_ram_b[Pico_mcd->s68k_regs[3]>>6];
|
||||||
*(u16 *)(prg_bank+(a&0x1fffe))=d;
|
*(u16 *)(prg_bank+(a&0x1fffe))=d;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((a&0xffffc0)==0xa12000)
|
||||||
|
dprintf("m68k_regs w16: [%02x] %04x @%06x", a&0x3f, d, SekPc);
|
||||||
|
|
||||||
OtherWrite16(a,d);
|
OtherWrite16(a,d);
|
||||||
}
|
}
|
||||||
|
@ -549,12 +605,19 @@ void PicoWriteM68k32(u32 a,u32 d)
|
||||||
|
|
||||||
// prg RAM
|
// prg RAM
|
||||||
if ((a&0xfe0000)==0x020000) {
|
if ((a&0xfe0000)==0x020000) {
|
||||||
u8 *prg_bank = Pico_mcd->prg_ram_b[Pico_mcd->m68k_regs[3]>>6];
|
u8 *prg_bank = Pico_mcd->prg_ram_b[Pico_mcd->s68k_regs[3]>>6];
|
||||||
u16 *pm=(u16 *)(prg_bank+(a&0x1fffe));
|
u16 *pm=(u16 *)(prg_bank+(a&0x1fffe));
|
||||||
pm[0]=(u16)(d>>16); pm[1]=(u16)d;
|
pm[0]=(u16)(d>>16); pm[1]=(u16)d;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// word RAM
|
||||||
|
if (a!=0x200000 && (a&0xfc0000)==0x200000) // tmp hack
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
if ((a&0xffffc0)==0xa12000)
|
||||||
|
dprintf("m68k_regs w32: [%02x] %08x @%06x", a&0x3f, d, SekPc);
|
||||||
|
|
||||||
OtherWrite16(a, (u16)(d>>16));
|
OtherWrite16(a, (u16)(d>>16));
|
||||||
OtherWrite16(a+2,(u16)d);
|
OtherWrite16(a+2,(u16)d);
|
||||||
|
@ -578,7 +641,9 @@ u8 PicoReadS68k8(u32 a)
|
||||||
|
|
||||||
// regs
|
// regs
|
||||||
if ((a&0xfffe00) == 0xff8000) {
|
if ((a&0xfffe00) == 0xff8000) {
|
||||||
|
dprintf("s68k_regs r8: [%02x] @ %06x", a&0x1ff, SekPcS68k);
|
||||||
d = s68k_reg_read16(a&~1, 8|(a&1)); if ((a&1)==0) d>>=8;
|
d = s68k_reg_read16(a&~1, 8|(a&1)); if ((a&1)==0) d>>=8;
|
||||||
|
dprintf("ret = %02x", (u8)d);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,7 +671,9 @@ u16 PicoReadS68k16(u32 a)
|
||||||
|
|
||||||
// regs
|
// regs
|
||||||
if ((a&0xfffe00) == 0xff8000) {
|
if ((a&0xfffe00) == 0xff8000) {
|
||||||
|
dprintf("s68k_regs r16: [%02x] @ %06x", a&0x1fe, SekPcS68k);
|
||||||
d = s68k_reg_read16(a, 16);
|
d = s68k_reg_read16(a, 16);
|
||||||
|
dprintf("ret = %04x", d);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -635,7 +702,9 @@ u32 PicoReadS68k32(u32 a)
|
||||||
|
|
||||||
// regs
|
// regs
|
||||||
if ((a&0xfffe00) == 0xff8000) {
|
if ((a&0xfffe00) == 0xff8000) {
|
||||||
|
dprintf("s68k_regs r32: [%02x] @ %06x", a&0x1fe, SekPcS68k);
|
||||||
d = (s68k_reg_read16(a, 32)<<16)|s68k_reg_read16(a+2, 32);
|
d = (s68k_reg_read16(a, 32)<<16)|s68k_reg_read16(a+2, 32);
|
||||||
|
dprintf("ret = %08x", d);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -666,8 +735,12 @@ void PicoWriteS68k8(u32 a,u8 d)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (a != 0xff0011 && (a&0xff8000) == 0xff0000) // PCM hack
|
||||||
|
return;
|
||||||
|
|
||||||
// regs
|
// regs
|
||||||
if ((a&0xfffe00) == 0xff8000) {
|
if ((a&0xfffe00) == 0xff8000) {
|
||||||
|
dprintf("s68k_regs w8: [%02x] %02x @ %06x", a&0x1ff, d, SekPcS68k);
|
||||||
s68k_reg_write8(a,d,8);
|
s68k_reg_write8(a,d,8);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -691,6 +764,7 @@ void PicoWriteS68k16(u32 a,u16 d)
|
||||||
|
|
||||||
// regs
|
// regs
|
||||||
if ((a&0xfffe00) == 0xff8000) {
|
if ((a&0xfffe00) == 0xff8000) {
|
||||||
|
dprintf("s68k_regs w16: [%02x] %04x @ %06x", a&0x1ff, d, SekPcS68k);
|
||||||
s68k_reg_write8(a, d>>8, 16);
|
s68k_reg_write8(a, d>>8, 16);
|
||||||
s68k_reg_write8(a+1,d&0xff, 16);
|
s68k_reg_write8(a+1,d&0xff, 16);
|
||||||
return;
|
return;
|
||||||
|
@ -716,6 +790,7 @@ void PicoWriteS68k32(u32 a,u32 d)
|
||||||
|
|
||||||
// regs
|
// regs
|
||||||
if ((a&0xfffe00) == 0xff8000) {
|
if ((a&0xfffe00) == 0xff8000) {
|
||||||
|
dprintf("s68k_regs w32: [%02x] %08x @ %06x", a&0x1ff, d, SekPcS68k);
|
||||||
s68k_reg_write8(a, d>>24, 32);
|
s68k_reg_write8(a, d>>24, 32);
|
||||||
s68k_reg_write8(a+1,(d>>16)&0xff, 32);
|
s68k_reg_write8(a+1,(d>>16)&0xff, 32);
|
||||||
s68k_reg_write8(a+2,(d>>8) &0xff, 32);
|
s68k_reg_write8(a+2,(d>>8) &0xff, 32);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// This is part of Pico Library
|
// This is part of Pico Library
|
||||||
|
|
||||||
// (c) Copyright 2004 Dave, All rights reserved.
|
// (c) Copyright 2004 Dave, All rights reserved.
|
||||||
// (c) Copyright 2006 notaz, All rights reserved.
|
// (c) Copyright 2007 notaz, All rights reserved.
|
||||||
// Free for non-commercial use.
|
// Free for non-commercial use.
|
||||||
|
|
||||||
// For commercial use, separate licencing terms must be obtained.
|
// For commercial use, separate licencing terms must be obtained.
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
#include "../sound/sound.h"
|
#include "../sound/sound.h"
|
||||||
|
|
||||||
|
|
||||||
int counter75hz = 0;
|
static int counter75hz = 0; // TODO: move 2 context
|
||||||
|
|
||||||
|
|
||||||
int PicoInitMCD(void)
|
int PicoInitMCD(void)
|
||||||
|
@ -33,6 +33,7 @@ int PicoResetMCD(int hard)
|
||||||
// clear everything except BIOS
|
// clear everything except BIOS
|
||||||
memset(Pico_mcd->prg_ram, 0, sizeof(mcd_state) - sizeof(Pico_mcd->bios));
|
memset(Pico_mcd->prg_ram, 0, sizeof(mcd_state) - sizeof(Pico_mcd->bios));
|
||||||
PicoMCD |= 2; // s68k reset pending
|
PicoMCD |= 2; // s68k reset pending
|
||||||
|
Pico_mcd->s68k_regs[3] = 1; // 2M word RAM mode with m68k access after reset
|
||||||
counter75hz = 0;
|
counter75hz = 0;
|
||||||
|
|
||||||
LC89510_Reset();
|
LC89510_Reset();
|
||||||
|
@ -71,7 +72,7 @@ extern unsigned char s68k_regs[0x200];
|
||||||
static int PicoFrameHintsMCD(void)
|
static int PicoFrameHintsMCD(void)
|
||||||
{
|
{
|
||||||
struct PicoVideo *pv=&Pico.video;
|
struct PicoVideo *pv=&Pico.video;
|
||||||
int total_z80=0,lines,y,lines_vis = 224,z80CycleAim = 0,line_sample;
|
int total_z80=0,lines,y,lines_vis = 224,z80CycleAim = 0,line_sample,counter75hz_lim;
|
||||||
const int cycles_68k=488,cycles_z80=228,cycles_s68k=795; // both PAL and NTSC compile to same values
|
const int cycles_68k=488,cycles_z80=228,cycles_s68k=795; // both PAL and NTSC compile to same values
|
||||||
int skip=PicoSkipFrame || (PicoOpt&0x10);
|
int skip=PicoSkipFrame || (PicoOpt&0x10);
|
||||||
int hint; // Hint counter
|
int hint; // Hint counter
|
||||||
|
@ -81,11 +82,13 @@ static int PicoFrameHintsMCD(void)
|
||||||
//cycles_z80 = (int) ((double) OSC_PAL / 15 / 50 / 312 + 0.4); // 228
|
//cycles_z80 = (int) ((double) OSC_PAL / 15 / 50 / 312 + 0.4); // 228
|
||||||
lines = 312; // Steve Snake says there are 313 lines, but this seems to also work well
|
lines = 312; // Steve Snake says there are 313 lines, but this seems to also work well
|
||||||
line_sample = 68;
|
line_sample = 68;
|
||||||
|
counter75hz_lim = 2080;
|
||||||
if(pv->reg[1]&8) lines_vis = 240;
|
if(pv->reg[1]&8) lines_vis = 240;
|
||||||
} else {
|
} else {
|
||||||
//cycles_68k = (int) ((double) OSC_NTSC / 7 / 60 / 262 + 0.4); // 488
|
//cycles_68k = (int) ((double) OSC_NTSC / 7 / 60 / 262 + 0.4); // 488
|
||||||
//cycles_z80 = (int) ((double) OSC_NTSC / 15 / 60 / 262 + 0.4); // 228
|
//cycles_z80 = (int) ((double) OSC_NTSC / 15 / 60 / 262 + 0.4); // 228
|
||||||
lines = 262;
|
lines = 262;
|
||||||
|
counter75hz_lim = 2096;
|
||||||
line_sample = 93;
|
line_sample = 93;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,6 +163,7 @@ static int PicoFrameHintsMCD(void)
|
||||||
|
|
||||||
// Run scanline:
|
// Run scanline:
|
||||||
//dprintf("m68k starting exec @ %06x", SekPc);
|
//dprintf("m68k starting exec @ %06x", SekPc);
|
||||||
|
if(Pico.m.dma_bytes) SekCycleCnt+=CheckDMA();
|
||||||
SekRun(cycles_68k);
|
SekRun(cycles_68k);
|
||||||
if ((Pico_mcd->m68k_regs[1]&3) == 1) { // no busreq/no reset
|
if ((Pico_mcd->m68k_regs[1]&3) == 1) { // no busreq/no reset
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -185,9 +189,8 @@ static int PicoFrameHintsMCD(void)
|
||||||
total_z80+=z80_run(z80CycleAim-total_z80);
|
total_z80+=z80_run(z80CycleAim-total_z80);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if cdd is on, counter elapsed and irq4 is not masked, do irq4
|
if ((counter75hz+=10) >= counter75hz_lim) {
|
||||||
if ((Pico_mcd->s68k_regs[0x37]&4) && ++counter75hz > 209 && (Pico_mcd->s68k_regs[0x33]&(1<<4))) {
|
counter75hz -= counter75hz_lim;
|
||||||
counter75hz = 0;
|
|
||||||
Check_CD_Command();
|
Check_CD_Command();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ m68ki_cpu_core PicoS68kCPU; // Mega CD's CPU
|
||||||
#ifdef EMU_M68K
|
#ifdef EMU_M68K
|
||||||
int SekIntAckS68k(int level)
|
int SekIntAckS68k(int level)
|
||||||
{
|
{
|
||||||
dprintf("s68k: int %i ack [%i|%i]", level, Pico.m.scanline, SekCyclesDone());
|
dprintf("s68kACK %i", level);
|
||||||
CPU_INT_LEVEL = 0;
|
CPU_INT_LEVEL = 0;
|
||||||
return M68K_INT_ACK_AUTOVECTOR;
|
return M68K_INT_ACK_AUTOVECTOR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,8 +39,8 @@ static const char* copyright_notice =
|
||||||
/* ================================= DATA ================================= */
|
/* ================================= DATA ================================= */
|
||||||
/* ======================================================================== */
|
/* ======================================================================== */
|
||||||
|
|
||||||
int m68ki_initial_cycles;
|
// int m68ki_initial_cycles; // moved to m68k_execute() stack
|
||||||
int m68ki_remaining_cycles = 0; /* Number of clocks remaining */
|
// int m68ki_remaining_cycles = 0; /* Number of clocks remaining */
|
||||||
uint m68ki_tracing = 0;
|
uint m68ki_tracing = 0;
|
||||||
uint m68ki_address_space;
|
uint m68ki_address_space;
|
||||||
|
|
||||||
|
@ -771,6 +771,8 @@ void m68k_set_cpu_type(unsigned int cpu_type)
|
||||||
/* ASG: removed per-instruction interrupt checks */
|
/* ASG: removed per-instruction interrupt checks */
|
||||||
int m68k_execute(int num_cycles)
|
int m68k_execute(int num_cycles)
|
||||||
{
|
{
|
||||||
|
int m68ki_initial_cycles;
|
||||||
|
|
||||||
/* Make sure we're not stopped */
|
/* Make sure we're not stopped */
|
||||||
if(!CPU_STOPPED)
|
if(!CPU_STOPPED)
|
||||||
{
|
{
|
||||||
|
@ -827,17 +829,19 @@ int m68k_execute(int num_cycles)
|
||||||
return num_cycles;
|
return num_cycles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
int m68k_cycles_run(void)
|
int m68k_cycles_run(void)
|
||||||
{
|
{
|
||||||
return m68ki_initial_cycles - GET_CYCLES();
|
return m68ki_initial_cycles - GET_CYCLES();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int m68k_cycles_remaining(void)
|
int m68k_cycles_remaining(void)
|
||||||
{
|
{
|
||||||
return GET_CYCLES();
|
return GET_CYCLES();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* Change the timeslice */
|
/* Change the timeslice */
|
||||||
void m68k_modify_timeslice(int cycles)
|
void m68k_modify_timeslice(int cycles)
|
||||||
{
|
{
|
||||||
|
@ -851,7 +855,7 @@ void m68k_end_timeslice(void)
|
||||||
m68ki_initial_cycles = GET_CYCLES();
|
m68ki_initial_cycles = GET_CYCLES();
|
||||||
SET_CYCLES(0);
|
SET_CYCLES(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ASG: rewrote so that the int_level is a mask of the IPL0/IPL1/IPL2 bits */
|
/* ASG: rewrote so that the int_level is a mask of the IPL0/IPL1/IPL2 bits */
|
||||||
/* KS: Modified so that IPL* bits match with mask positions in the SR
|
/* KS: Modified so that IPL* bits match with mask positions in the SR
|
||||||
|
|
|
@ -891,13 +891,16 @@ typedef struct
|
||||||
void (*set_fc_callback)(unsigned int new_fc); /* Called when the CPU function code changes */
|
void (*set_fc_callback)(unsigned int new_fc); /* Called when the CPU function code changes */
|
||||||
void (*instr_hook_callback)(void); /* Called every instruction cycle prior to execution */
|
void (*instr_hook_callback)(void); /* Called every instruction cycle prior to execution */
|
||||||
|
|
||||||
|
sint cyc_remaining_cycles;
|
||||||
} m68ki_cpu_core;
|
} m68ki_cpu_core;
|
||||||
|
|
||||||
|
|
||||||
extern m68ki_cpu_core *m68ki_cpu_p;
|
extern m68ki_cpu_core *m68ki_cpu_p;
|
||||||
#define m68ki_cpu (*m68ki_cpu_p) // test
|
#define m68ki_cpu (*m68ki_cpu_p) // test
|
||||||
|
|
||||||
extern sint m68ki_remaining_cycles;
|
// extern sint m68ki_remaining_cycles;
|
||||||
|
#define m68ki_remaining_cycles m68ki_cpu_p->cyc_remaining_cycles
|
||||||
|
|
||||||
extern uint m68ki_tracing;
|
extern uint m68ki_tracing;
|
||||||
extern uint8 m68ki_shift_8_table[];
|
extern uint8 m68ki_shift_8_table[];
|
||||||
extern uint16 m68ki_shift_16_table[];
|
extern uint16 m68ki_shift_16_table[];
|
||||||
|
|
|
@ -92,10 +92,15 @@ ifeq "$(up)" "1"
|
||||||
@cmd //C copy $@ \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\
|
@cmd //C copy $@ \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\
|
||||||
endif
|
endif
|
||||||
|
|
||||||
up: up940
|
up: # up940
|
||||||
@cmd //C copy PicoDrive.gpe \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\
|
@cp -v PicoDrive.gpe /mnt/gp2x/mnt/sd/games/PicoDrive/
|
||||||
|
|
||||||
|
# @cmd //C copy PicoDrive.gpe \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\
|
||||||
|
|
||||||
up940:
|
up940:
|
||||||
@cmd //C copy code940.bin \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\
|
@cp -v code940.bin /mnt/gp2x/mnt/sd/games/PicoDrive/
|
||||||
|
|
||||||
|
# @cmd //C copy code940.bin \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\
|
||||||
|
|
||||||
testrefr.gpe : test.o gp2x.o asmutils.o
|
testrefr.gpe : test.o gp2x.o asmutils.o
|
||||||
@echo $@
|
@echo $@
|
||||||
|
|
|
@ -79,14 +79,15 @@ static void strlwr(char* string)
|
||||||
while ( (*string++ = (char)tolower(*string)) );
|
while ( (*string++ = (char)tolower(*string)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static int try_rfn_ext(char *ext)
|
static int try_rfn_cut(void)
|
||||||
{
|
{
|
||||||
FILE *tmp;
|
FILE *tmp;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
p = romFileName + strlen(romFileName) - 4;
|
p = romFileName + strlen(romFileName) - 1;
|
||||||
if (p < romFileName) p = romFileName;
|
for (; p > romFileName; p--)
|
||||||
strcpy(p, ext);
|
if (*p == '.') break;
|
||||||
|
*p = 0;
|
||||||
|
|
||||||
if((tmp = fopen(romFileName, "rb"))) {
|
if((tmp = fopen(romFileName, "rb"))) {
|
||||||
fclose(tmp);
|
fclose(tmp);
|
||||||
|
@ -156,8 +157,7 @@ int emu_ReloadRom(void)
|
||||||
sprintf(menuErrorMsg, "Invalid GMV file.");
|
sprintf(menuErrorMsg, "Invalid GMV file.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
dummy = try_rfn_ext(".zip") || try_rfn_ext(".bin") ||
|
dummy = try_rfn_cut() || try_rfn_cut();
|
||||||
try_rfn_ext(".smd") || try_rfn_ext(".gen");
|
|
||||||
if (!dummy) {
|
if (!dummy) {
|
||||||
sprintf(menuErrorMsg, "Could't find a ROM for movie.");
|
sprintf(menuErrorMsg, "Could't find a ROM for movie.");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -352,11 +352,11 @@ static char *romsel_loop(char *curr_path)
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
draw_dirlist(curr_path, namelist, n, sel);
|
draw_dirlist(curr_path, namelist, n, sel);
|
||||||
inp = wait_for_input(GP2X_UP|GP2X_DOWN|GP2X_LEFT|GP2X_RIGHT|GP2X_B|GP2X_X);
|
inp = wait_for_input(GP2X_UP|GP2X_DOWN|GP2X_LEFT|GP2X_RIGHT|GP2X_L|GP2X_R|GP2X_B|GP2X_X);
|
||||||
if(inp & GP2X_UP ) { sel--; if (sel < 0) sel = n-2; }
|
if(inp & GP2X_UP ) { sel--; if (sel < 0) sel = n-2; }
|
||||||
if(inp & GP2X_DOWN) { sel++; if (sel > n-2) sel = 0; }
|
if(inp & GP2X_DOWN) { sel++; if (sel > n-2) sel = 0; }
|
||||||
if(inp & GP2X_LEFT) { sel-=10; if (sel < 0) sel = 0; }
|
if(inp &(GP2X_LEFT|GP2X_L)) { sel-=10; if (sel < 0) sel = 0; }
|
||||||
if(inp & GP2X_RIGHT) { sel+=10; if (sel > n-2) sel = n-2; }
|
if(inp &(GP2X_RIGHT|GP2X_R)) { sel+=10; if (sel > n-2) sel = n-2; }
|
||||||
if(inp & GP2X_B) { // enter dir/select
|
if(inp & GP2X_B) { // enter dir/select
|
||||||
again:
|
again:
|
||||||
if (namelist[sel+1]->d_type == DT_REG) {
|
if (namelist[sel+1]->d_type == DT_REG) {
|
||||||
|
@ -827,7 +827,7 @@ static void draw_menu_credits(void)
|
||||||
int tl_x = 15, tl_y = 70, y;
|
int tl_x = 15, tl_y = 70, y;
|
||||||
memset(gp2x_screen, 0, 320*240);
|
memset(gp2x_screen, 0, 320*240);
|
||||||
|
|
||||||
gp2x_text_out8(tl_x, 20, "PicoDrive v" VERSION " (c) notaz, 2006");
|
gp2x_text_out8(tl_x, 20, "PicoDrive v" VERSION " (c) notaz, 2006,2007");
|
||||||
y = tl_y;
|
y = tl_y;
|
||||||
gp2x_text_out8(tl_x, y, "Credits:");
|
gp2x_text_out8(tl_x, y, "Credits:");
|
||||||
gp2x_text_out8(tl_x, (y+=10), "Dave: Cyclone 68000 core,");
|
gp2x_text_out8(tl_x, (y+=10), "Dave: Cyclone 68000 core,");
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#define VERSION "0.964"
|
#define VERSION "0.965"
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// pico.c
|
// pico.c
|
||||||
#define CAN_HANDLE_240_LINES 1
|
#define CAN_HANDLE_240_LINES 1
|
||||||
|
|
||||||
#define dprintf(f,...) printf("%05i: " f "\n",Pico.m.frame_count,##__VA_ARGS__)
|
#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)
|
||||||
//#define dprintf(x...)
|
//#define dprintf(x...)
|
||||||
|
|
||||||
#endif //PORT_CONFIG_H
|
#endif //PORT_CONFIG_H
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue