diff options
Diffstat (limited to 'src/devices/bus/odyssey2/rally.h')
-rw-r--r-- | src/devices/bus/odyssey2/rally.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/devices/bus/odyssey2/rally.h b/src/devices/bus/odyssey2/rally.h new file mode 100644 index 00000000000..580d3f1df63 --- /dev/null +++ b/src/devices/bus/odyssey2/rally.h @@ -0,0 +1,46 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/********************************************************************** + + Videopac 55/58/59/60 cartridge emulation + +**********************************************************************/ + +#ifndef MAME_BUS_ODYSSEY2_RALLY_H +#define MAME_BUS_ODYSSEY2_RALLY_H + +#pragma once + +#include "slot.h" +#include "rom.h" + + +// ======================> o2_rally_device + +class o2_rally_device : public o2_rom_device +{ +public: + // construction/destruction + o2_rally_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + // device-level overrides + virtual void device_start() override; + + virtual void cart_init() override; + + virtual u8 read_rom04(offs_t offset) override; + virtual u8 read_rom0c(offs_t offset) override { return read_rom04(offset); } + + virtual void write_p1(u8 data) override { m_control = data; } + virtual void io_write(offs_t offset, u8 data) override; + +private: + u8 m_control = 0; + u8 m_bank = 0; +}; + +// device type definition +DECLARE_DEVICE_TYPE(O2_ROM_RALLY, o2_rally_device) + +#endif // MAME_BUS_ODYSSEY2_RALLY_H |