mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
sms: improve irq handling
This commit is contained in:
parent
8fde2033ac
commit
cf83610baa
3 changed files with 34 additions and 6 deletions
|
@ -169,7 +169,7 @@ extern struct DrZ80 drZ80;
|
|||
#define z80_run(cycles) ((cycles) - DrZ80Run(&drZ80, cycles))
|
||||
#define z80_run_nr(cycles) DrZ80Run(&drZ80, cycles)
|
||||
#define z80_int() drZ80.Z80_IRQ = 1
|
||||
#define z80_int() drZ80.Z80_IRQ = 1
|
||||
#define z80_int_assert(a) drZ80.Z80_IRQ = (a)
|
||||
#define z80_nmi() drZ80.Z80IF |= 8
|
||||
|
||||
#define z80_cyclesLeft drZ80.cycles
|
||||
|
@ -182,6 +182,7 @@ extern struct DrZ80 drZ80;
|
|||
#define z80_run(cycles) Cz80_Exec(&CZ80, cycles)
|
||||
#define z80_run_nr(cycles) Cz80_Exec(&CZ80, cycles)
|
||||
#define z80_int() Cz80_Set_IRQ(&CZ80, 0, HOLD_LINE)
|
||||
#define z80_int_assert(a) Cz80_Set_IRQ(&CZ80, 0, (a) ? ASSERT_LINE : CLEAR_LINE)
|
||||
#define z80_nmi() Cz80_Set_IRQ(&CZ80, IRQ_LINE_NMI, 0)
|
||||
|
||||
#define z80_cyclesLeft (CZ80.ICount - CZ80.ExtraCycles)
|
||||
|
@ -193,6 +194,7 @@ extern struct DrZ80 drZ80;
|
|||
#define z80_run(cycles) (cycles)
|
||||
#define z80_run_nr(cycles)
|
||||
#define z80_int()
|
||||
#define z80_int_assert(a)
|
||||
#define z80_nmi()
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue