mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
some poor timing improvement attempts
This commit is contained in:
parent
75b84e4b7c
commit
d1b8bcc634
2 changed files with 8 additions and 2 deletions
|
@ -1195,6 +1195,8 @@ void PicoWrite16_32x(u32 a, u32 d) {}
|
||||||
|
|
||||||
static unsigned char z80_md_vdp_read(unsigned short a)
|
static unsigned char z80_md_vdp_read(unsigned short a)
|
||||||
{
|
{
|
||||||
|
z80_subCLeft(2);
|
||||||
|
|
||||||
if ((a & 0x00f0) == 0x0000) {
|
if ((a & 0x00f0) == 0x0000) {
|
||||||
switch (a & 0x0d)
|
switch (a & 0x0d)
|
||||||
{
|
{
|
||||||
|
@ -1218,8 +1220,10 @@ static unsigned char z80_md_bank_read(unsigned short a)
|
||||||
unsigned int addr68k;
|
unsigned int addr68k;
|
||||||
unsigned char ret;
|
unsigned char ret;
|
||||||
|
|
||||||
|
z80_subCLeft(3);
|
||||||
|
|
||||||
addr68k = Pico.m.z80_bank68k << 15;
|
addr68k = Pico.m.z80_bank68k << 15;
|
||||||
addr68k += a & 0x7fff;
|
addr68k |= a & 0x7fff;
|
||||||
|
|
||||||
ret = m68k_read8(addr68k);
|
ret = m68k_read8(addr68k);
|
||||||
|
|
||||||
|
|
|
@ -185,6 +185,7 @@ extern struct DrZ80 drZ80;
|
||||||
#define z80_nmi() drZ80.Z80IF |= 8
|
#define z80_nmi() drZ80.Z80IF |= 8
|
||||||
|
|
||||||
#define z80_cyclesLeft drZ80.cycles
|
#define z80_cyclesLeft drZ80.cycles
|
||||||
|
#define z80_subCLeft(c) drZ80.cycles -= c
|
||||||
#define z80_pc() (drZ80.Z80PC - drZ80.Z80PC_BASE)
|
#define z80_pc() (drZ80.Z80PC - drZ80.Z80PC_BASE)
|
||||||
|
|
||||||
#elif defined(_USE_CZ80)
|
#elif defined(_USE_CZ80)
|
||||||
|
@ -196,6 +197,7 @@ extern struct DrZ80 drZ80;
|
||||||
#define z80_nmi() Cz80_Set_IRQ(&CZ80, IRQ_LINE_NMI, 0)
|
#define z80_nmi() Cz80_Set_IRQ(&CZ80, IRQ_LINE_NMI, 0)
|
||||||
|
|
||||||
#define z80_cyclesLeft (CZ80.ICount - CZ80.ExtraCycles)
|
#define z80_cyclesLeft (CZ80.ICount - CZ80.ExtraCycles)
|
||||||
|
#define z80_subCLeft(c) CZ80.ICount -= c
|
||||||
#define z80_pc() Cz80_Get_Reg(&CZ80, CZ80_PC)
|
#define z80_pc() Cz80_Get_Reg(&CZ80, CZ80_PC)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue