mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-12 03:09:06 +01:00
[Core/MS] fixed disabled slot returned value
This commit is contained in:
parent
068769a02e
commit
236e783ec2
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.8 MiB After Width: | Height: | Size: 3.8 MiB |
Binary file not shown.
Before Width: | Height: | Size: 4.0 MiB After Width: | Height: | Size: 4.0 MiB |
@ -426,6 +426,7 @@ static unsigned char read_mapper_93c46(unsigned int address);
|
|||||||
static unsigned char read_mapper_terebi(unsigned int address);
|
static unsigned char read_mapper_terebi(unsigned int address);
|
||||||
static unsigned char read_mapper_korea_8k(unsigned int address);
|
static unsigned char read_mapper_korea_8k(unsigned int address);
|
||||||
static unsigned char read_mapper_default(unsigned int address);
|
static unsigned char read_mapper_default(unsigned int address);
|
||||||
|
static unsigned char read_mapper_none(unsigned int address);
|
||||||
|
|
||||||
void sms_cart_init(void)
|
void sms_cart_init(void)
|
||||||
{
|
{
|
||||||
@ -920,7 +921,7 @@ static void mapper_reset(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* set default Z80 memory handlers */
|
/* set default Z80 memory handlers */
|
||||||
z80_readmem = read_mapper_default;
|
z80_readmem = read_mapper_none;
|
||||||
z80_writemem = write_mapper_none;
|
z80_writemem = write_mapper_none;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1567,3 +1568,14 @@ static unsigned char read_mapper_default(unsigned int address)
|
|||||||
{
|
{
|
||||||
return z80_readmap[address >> 10][address & 0x03FF];
|
return z80_readmap[address >> 10][address & 0x03FF];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static unsigned char read_mapper_none(unsigned int address)
|
||||||
|
{
|
||||||
|
if (address >= 0xC000)
|
||||||
|
{
|
||||||
|
return z80_readmap[address >> 10][address & 0x03FF];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return last fetched z80 instruction / data */
|
||||||
|
return z80_last_fetch;
|
||||||
|
}
|
||||||
|
@ -210,6 +210,7 @@ UINT32 z80_cycle_ratio;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
Z80_Regs Z80;
|
Z80_Regs Z80;
|
||||||
|
UINT8 z80_last_fetch;
|
||||||
|
|
||||||
unsigned char *z80_readmap[64];
|
unsigned char *z80_readmap[64];
|
||||||
unsigned char *z80_writemap[64];
|
unsigned char *z80_writemap[64];
|
||||||
@ -660,7 +661,8 @@ INLINE UINT8 ROP(void)
|
|||||||
{
|
{
|
||||||
unsigned pc = PCD;
|
unsigned pc = PCD;
|
||||||
PC++;
|
PC++;
|
||||||
return cpu_readop(pc);
|
z80_last_fetch = cpu_readop(pc);
|
||||||
|
return z80_last_fetch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
|
@ -50,6 +50,7 @@ typedef struct
|
|||||||
|
|
||||||
|
|
||||||
extern Z80_Regs Z80;
|
extern Z80_Regs Z80;
|
||||||
|
extern UINT8 z80_last_fetch;
|
||||||
|
|
||||||
#ifdef Z80_OVERCLOCK_SHIFT
|
#ifdef Z80_OVERCLOCK_SHIFT
|
||||||
extern UINT32 z80_cycle_ratio;
|
extern UINT32 z80_cycle_ratio;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user