summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/bus/msx_slot/rom.h
diff options
context:
space:
mode:
author Wilbert Pol <wilbert@jdg.info>2014-05-14 19:04:52 +0000
committer Wilbert Pol <wilbert@jdg.info>2014-05-14 19:04:52 +0000
commitc74226bb26acd1afdcc59f20e174d126423f60b9 (patch)
tree67a584a596dc13b820cfdbe411eaf826852475ff /src/emu/bus/msx_slot/rom.h
parent8ab3ccb194ff9cb37bda434489a82da854b24af6 (diff)
(MESS) msx.c: [Wilbert Pol]
- Reimplemented the cartridge slots as slot devices. - Moved the msx slot layouts to inline machine configuration. - Started adding support for a few more firmware types. - Add turbo support to Panasonic FS-A1FX/FS-A1WX/FS-A1WSX.
Diffstat (limited to 'src/emu/bus/msx_slot/rom.h')
-rw-r--r--src/emu/bus/msx_slot/rom.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/emu/bus/msx_slot/rom.h b/src/emu/bus/msx_slot/rom.h
new file mode 100644
index 00000000000..dfed30f902d
--- /dev/null
+++ b/src/emu/bus/msx_slot/rom.h
@@ -0,0 +1,32 @@
+#ifndef __MSX_SLOT_ROM_H
+#define __MSX_SLOT_ROM_H
+
+#include "slot.h"
+
+#define MCFG_MSX_SLOT_ROM_ADD(_tag, _startpage, _numpages, _region, _offset) \
+ MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_ROM, _startpage, _numpages) \
+ msx_slot_rom_device::set_rom_start(*device, _region, _offset);
+
+class msx_slot_rom_device : public device_t,
+ public msx_internal_slot_interface
+{
+public:
+ msx_slot_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+ msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // static configuration helpers
+ static void set_rom_start(device_t &device, const char *region, UINT32 offset);
+
+ virtual void device_start();
+
+ virtual DECLARE_READ8_MEMBER(read);
+
+private:
+ const char *m_region;
+ UINT32 m_region_offset;
+ const UINT8 *m_rom;
+};
+
+extern const device_type MSX_SLOT_ROM;
+
+#endif