summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/vtech2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/vtech2.h')
-rw-r--r--src/mame/includes/vtech2.h43
1 files changed, 19 insertions, 24 deletions
diff --git a/src/mame/includes/vtech2.h b/src/mame/includes/vtech2.h
index 06d69009c1a..ccfed0f13a6 100644
--- a/src/mame/includes/vtech2.h
+++ b/src/mame/includes/vtech2.h
@@ -9,6 +9,7 @@
#ifndef MAME_INCLUDES_VTECH2_H
#define MAME_INCLUDES_VTECH2_H
+#include "machine/bankdev.h"
#include "bus/generic/carts.h"
#include "bus/generic/slot.h"
#include "imagedev/cassette.h"
@@ -30,7 +31,12 @@ public:
, m_laser_file(*this, {FLOPPY_0, FLOPPY_1})
, m_gfxdecode(*this, "gfxdecode")
, m_palette(*this, "palette")
+ , m_videoram(*this, "videoram")
, m_io_keyboard(*this, {"ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7", "ROWD", "ROWC", "ROWB", "ROWA"})
+ , m_banka(*this, "banka")
+ , m_bankb(*this, "bankb")
+ , m_bankc(*this, "bankc")
+ , m_bankd(*this, "bankd")
{ }
void laser350(machine_config &config);
@@ -48,31 +54,20 @@ private:
DECLARE_WRITE8_MEMBER(laser_two_color_w);
DECLARE_READ8_MEMBER(laser_fdc_r);
virtual void machine_reset() override;
- virtual void video_start() override;
DECLARE_PALETTE_INIT(vtech2);
- DECLARE_MACHINE_RESET(laser500);
- DECLARE_MACHINE_RESET(laser700);
uint32_t screen_update_laser(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(vtech2_interrupt);
+ DECLARE_WRITE8_MEMBER(mmio_w);
+ DECLARE_READ8_MEMBER(mmio_r);
- int mra_bank(int bank, int offs);
- void mwa_bank(int bank, int offs, int data);
-
- DECLARE_WRITE8_MEMBER(mwa_bank1);
- DECLARE_WRITE8_MEMBER(mwa_bank2);
- DECLARE_WRITE8_MEMBER(mwa_bank3);
- DECLARE_WRITE8_MEMBER(mwa_bank4);
- DECLARE_READ8_MEMBER(mra_bank1);
- DECLARE_READ8_MEMBER(mra_bank2);
- DECLARE_READ8_MEMBER(mra_bank3);
- DECLARE_READ8_MEMBER(mra_bank4);
-
- void laser_machine_init(int bank_mask, int video_mask);
void laser_get_track();
void laser_put_track();
- void vtech2_io(address_map &map);
- void vtech2_mem(address_map &map);
+ void io_map(address_map &map);
+ void mem_map(address_map &map);
+ void m_map350(address_map &map);
+ void m_map500(address_map &map);
+ void m_map700(address_map &map);
required_device<cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
@@ -81,16 +76,16 @@ private:
optional_device_array<legacy_floppy_image_device, 2> m_laser_file;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
+ optional_shared_ptr<u8> m_videoram;
required_ioport_array<12> m_io_keyboard;
+ required_device<address_map_bank_device> m_banka;
+ required_device<address_map_bank_device> m_bankb;
+ required_device<address_map_bank_device> m_bankc;
+ required_device<address_map_bank_device> m_bankd;
- uint8_t *m_videoram;
- int m_laser_latch;
char m_laser_frame_message[64+1];
int m_laser_frame_time;
- uint8_t *m_mem;
- int m_laser_bank_mask;
- int m_laser_bank[4];
- int m_laser_video_bank;
+ u8 m_laser_latch;
uint8_t m_laser_track_x2[2];
uint8_t m_laser_fdc_status;
uint8_t m_laser_fdc_data[TRKSIZE_FM];