mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-13 06:15:07 +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_korea_8k(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)
|
||||
{
|
||||
@ -920,7 +921,7 @@ static void mapper_reset(void)
|
||||
}
|
||||
|
||||
/* set default Z80 memory handlers */
|
||||
z80_readmem = read_mapper_default;
|
||||
z80_readmem = read_mapper_none;
|
||||
z80_writemem = write_mapper_none;
|
||||
return;
|
||||
}
|
||||
@ -1567,3 +1568,14 @@ static unsigned char read_mapper_default(unsigned int address)
|
||||
{
|
||||
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
|
||||
|
||||
Z80_Regs Z80;
|
||||
UINT8 z80_last_fetch;
|
||||
|
||||
unsigned char *z80_readmap[64];
|
||||
unsigned char *z80_writemap[64];
|
||||
@ -660,7 +661,8 @@ INLINE UINT8 ROP(void)
|
||||
{
|
||||
unsigned pc = PCD;
|
||||
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 UINT8 z80_last_fetch;
|
||||
|
||||
#ifdef Z80_OVERCLOCK_SHIFT
|
||||
extern UINT32 z80_cycle_ratio;
|
||||
|
Loading…
Reference in New Issue
Block a user