summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/megasys1.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/megasys1.h')
-rw-r--r--src/mame/includes/megasys1.h65
1 files changed, 30 insertions, 35 deletions
diff --git a/src/mame/includes/megasys1.h b/src/mame/includes/megasys1.h
index e37c8e402fa..284d4f41bb2 100644
--- a/src/mame/includes/megasys1.h
+++ b/src/mame/includes/megasys1.h
@@ -30,16 +30,14 @@ public:
m_ram(*this, "ram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
- m_oki1(*this, "oki1"),
- m_oki2(*this, "oki2"),
+ m_oki(*this, "oki%u", 1U),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_screen(*this, "screen"),
- m_soundlatch(*this, "soundlatch"),
- m_soundlatch2(*this, "soundlatch2"),
- m_soundlatch_z(*this, "soundlatch_z"),
+ m_soundlatch(*this, "soundlatch%u", 1U),
m_scantimer(*this, "scantimer"),
m_rom_maincpu(*this, "maincpu"),
+ m_okibank(*this, "okibank"),
m_io_system(*this, "SYSTEM"),
m_io_p1(*this, "P1"),
m_io_p2(*this, "P2"),
@@ -57,6 +55,7 @@ public:
void system_C(machine_config &config);
void system_Bbl(machine_config &config);
void system_A(machine_config &config);
+ void system_A_jitsupro(machine_config &config);
void system_B(machine_config &config);
void system_B_hayaosi1(machine_config &config);
void system_Z(machine_config &config);
@@ -88,21 +87,19 @@ public:
void init_systemz();
private:
- required_shared_ptr<uint16_t> m_objectram;
+ required_shared_ptr<u16> m_objectram;
optional_device_array<megasys1_tilemap_device, 3> m_tmap;
- required_shared_ptr<uint16_t> m_ram;
+ required_shared_ptr<u16> m_ram;
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
- optional_device<okim6295_device> m_oki1;
- optional_device<okim6295_device> m_oki2;
+ optional_device_array<okim6295_device, 2> m_oki;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<screen_device> m_screen;
- optional_device<generic_latch_16_device> m_soundlatch;
- optional_device<generic_latch_16_device> m_soundlatch2;
- optional_device<generic_latch_8_device> m_soundlatch_z;
+ optional_device_array<generic_latch_16_device, 2> m_soundlatch;
optional_device<timer_device> m_scantimer;
- required_region_ptr<uint16_t> m_rom_maincpu;
+ required_region_ptr<u16> m_rom_maincpu;
+ optional_memory_bank m_okibank;
required_ioport m_io_system;
required_ioport m_io_p1;
required_ioport m_io_p2;
@@ -111,38 +108,38 @@ private:
optional_ioport m_io_dsw2;
// configuration
- uint16_t m_ip_select_values[7]; // System B and C
+ u16 m_ip_select_values[7]; // System B and C
int m_hardware_type_z; // System Z
int m_layers_order[16];
- uint8_t m_ignore_oki_status;
+ u8 m_ignore_oki_status;
// all
bitmap_ind16 m_sprite_buffer_bitmap;
- uint16_t m_screen_flag;
- std::unique_ptr<uint16_t[]> m_buffer_objectram;
- std::unique_ptr<uint16_t[]> m_buffer2_objectram;
- std::unique_ptr<uint16_t[]> m_buffer_spriteram16;
- std::unique_ptr<uint16_t[]> m_buffer2_spriteram16;
+ u16 m_screen_flag;
+ std::unique_ptr<u16[]> m_buffer_objectram;
+ std::unique_ptr<u16[]> m_buffer2_objectram;
+ std::unique_ptr<u16[]> m_buffer_spriteram16;
+ std::unique_ptr<u16[]> m_buffer2_spriteram16;
// all but System Z
- uint16_t m_active_layers;
- uint16_t m_sprite_flag;
+ u16 m_active_layers;
+ u16 m_sprite_flag;
// System B and C
- uint16_t m_ip_latched;
+ u16 m_ip_latched;
// System C
- uint16_t m_sprite_bank;
+ u16 m_sprite_bank;
// System A only
int m_mcu_hs;
- uint16_t m_mcu_hs_ram[0x10];
+ u16 m_mcu_hs_ram[0x10];
// peekaboo
- uint16_t m_protection_val;
+ u16 m_protection_val;
// soldam
- uint16_t *m_spriteram;
+ u16 *m_spriteram;
DECLARE_WRITE_LINE_MEMBER(sound_irq);
DECLARE_READ16_MEMBER(ip_select_r);
@@ -168,19 +165,16 @@ private:
DECLARE_WRITE16_MEMBER(monkelf_scroll0_w);
DECLARE_WRITE16_MEMBER(monkelf_scroll1_w);
void megasys1_set_vreg_flag(int which, int data);
- DECLARE_READ8_MEMBER(oki_status_1_r);
- DECLARE_READ8_MEMBER(oki_status_2_r);
- DECLARE_WRITE16_MEMBER(okim6295_both_1_w);
- DECLARE_WRITE16_MEMBER(okim6295_both_2_w);
+ template<int Chip> DECLARE_READ8_MEMBER(oki_status_r);
DECLARE_WRITE16_MEMBER(ram_w);
-
DECLARE_MACHINE_RESET(megasys1);
DECLARE_VIDEO_START(megasys1);
+ DECLARE_VIDEO_START(megasys1_z);
void megasys1_palette(palette_device &palette);
DECLARE_MACHINE_RESET(megasys1_hachoo);
- uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
INTERRUPT_GEN_MEMBER(megasys1D_irq);
TIMER_DEVICE_CALLBACK_MEMBER(megasys1A_scanline);
@@ -189,15 +183,16 @@ private:
void priority_create();
void mix_sprite_bitmap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void partial_clear_sprite_bitmap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t param);
+ void partial_clear_sprite_bitmap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, u8 param);
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect);
- inline void draw_16x16_priority_sprite(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect, int32_t code, int32_t color, int32_t sx, int32_t sy, int32_t flipx, int32_t flipy, uint8_t mosaic, uint8_t mosaicsol, int32_t priority);
+ inline void draw_16x16_priority_sprite(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect, s32 code, s32 color, s32 sx, s32 sy, s32 flipx, s32 flipy, u8 mosaic, u8 mosaicsol, s32 priority);
void rodland_gfx_unmangle(const char *region);
void jitsupro_gfx_unmangle(const char *region);
void stdragona_gfx_unmangle(const char *region);
void kickoffb_sound_map(address_map &map);
void megasys1A_map(address_map &map);
void megasys1A_sound_map(address_map &map);
+ void megasys1A_jitsupro_sound_map(address_map &map);
void megasys1B_edfbl_map(address_map &map);
void megasys1B_map(address_map &map);
void megasys1B_monkelf_map(address_map &map);