summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/c64/z80videopak.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/c64/z80videopak.h')
-rw-r--r--src/devices/bus/c64/z80videopak.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/devices/bus/c64/z80videopak.h b/src/devices/bus/c64/z80videopak.h
new file mode 100644
index 00000000000..0e563518ca9
--- /dev/null
+++ b/src/devices/bus/c64/z80videopak.h
@@ -0,0 +1,61 @@
+// license:BSD-3-Clause
+// copyright-holders:Curt Coder, smf
+/**********************************************************************
+
+ Z80 Video Pak cartridge emulation
+
+**********************************************************************/
+
+#ifndef MAME_BUS_C64_Z80VIDEOPAK_H
+#define MAME_BUS_C64_Z80VIDEOPAK_H
+
+#pragma once
+
+
+#include "cpm.h"
+#include "video/mc6845.h"
+#include "emupal.h"
+
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> c64_z80videopak_device
+
+class c64_z80videopak_device : public c64_cpm_cartridge_device
+{
+public:
+ // construction/destruction
+ c64_z80videopak_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 device_reset() override;
+
+ // optional information overrides
+ virtual const tiny_rom_entry *device_rom_region() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
+ // device_c64_expansion_card_interface overrides
+ virtual uint8_t c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+ virtual void c64_cd_w(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override;
+
+private:
+ MC6845_UPDATE_ROW( crtc_update_row );
+
+ required_device<hd6845s_device> m_crtc;
+ required_device<palette_device> m_palette;
+ required_memory_region m_char_rom;
+ memory_share_creator<uint8_t> m_ram;
+ int m_case;
+};
+
+
+// device type definition
+DECLARE_DEVICE_TYPE(C64_Z80VIDEOPAK, c64_z80videopak_device)
+
+
+#endif // MAME_BUS_C64_Z80VIDEOPAK_H
d='n168' href='#n168'>168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271