summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nes/kaiser.h
diff options
context:
space:
mode:
author 0kmg <9137159+0kmg@users.noreply.github.com>2021-07-16 17:12:49 -0800
committer 0kmg <9137159+0kmg@users.noreply.github.com>2021-09-07 22:31:51 -0800
commitc092e80075d7069a1a597387e3029ac157808aff (patch)
treee99c8a14f4cfe1d12ee02576b0dbd398905973d9 /src/devices/bus/nes/kaiser.h
parent972d324eb2463a8628a6a20234c66af520dd0b88 (diff)
bus/nes: Improved IRQ emulation for Kaiser KS202 and KS7032.
- Corrected IRQ behavior based on more recent PCB observations. Fixes some flickering on World X-Y interlevel screens in SMB2J bootleg. - Corrected SMB3 bootleg's banking, also per PCB analysis.
Diffstat (limited to 'src/devices/bus/nes/kaiser.h')
-rw-r--r--src/devices/bus/nes/kaiser.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/devices/bus/nes/kaiser.h b/src/devices/bus/nes/kaiser.h
index f76c018175e..690201233d0 100644
--- a/src/devices/bus/nes/kaiser.h
+++ b/src/devices/bus/nes/kaiser.h
@@ -73,27 +73,28 @@ class nes_ks7032_device : public nes_nrom_device
{
public:
// construction/destruction
- nes_ks7032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ nes_ks7032_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
- virtual uint8_t read_m(offs_t offset) override;
- void ks7032_write(offs_t offset, uint8_t data);
- virtual void write_h(offs_t offset, uint8_t data) override { ks7032_write(offset, data); }
+ virtual u8 read_m(offs_t offset) override;
+ virtual void write_h(offs_t offset, u8 data) override;
virtual void pcb_reset() override;
protected:
- nes_ks7032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ // construction/destruction
+ nes_ks7032_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
// device-level overrides
virtual void device_start() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- void prg_update();
+ u8 m_reg[8];
- uint8_t m_latch;
- uint8_t m_reg[8];
+private:
+ void prg_update();
+ u8 m_latch;
- uint16_t m_irq_count;
+ u16 m_irq_count, m_irq_count_latch;
int m_irq_enable;
static const device_timer_id TIMER_IRQ = 0;
@@ -107,11 +108,10 @@ class nes_ks202_device : public nes_ks7032_device
{
public:
// construction/destruction
- nes_ks202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ nes_ks202_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
- // device-level overrides
- virtual uint8_t read_m(offs_t offset) override;
- virtual void write_h(offs_t offset, uint8_t data) override;
+ virtual u8 read_m(offs_t offset) override;
+ virtual void write_h(offs_t offset, u8 data) override;
};
@@ -129,6 +129,7 @@ public:
virtual void pcb_reset() override;
protected:
+ // construction/destruction
nes_ks7016_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 mask);
// device-level overrides