summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/namcos21.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/namcos21.h')
-rw-r--r--src/mame/includes/namcos21.h81
1 files changed, 78 insertions, 3 deletions
diff --git a/src/mame/includes/namcos21.h b/src/mame/includes/namcos21.h
index 965241af099..5e4db1e258a 100644
--- a/src/mame/includes/namcos21.h
+++ b/src/mame/includes/namcos21.h
@@ -8,15 +8,28 @@
#pragma once
-#include "namcos2.h"
+
#include "machine/namcoio_gearbox.h"
#include "machine/timer.h"
+#include "machine/namco_c139.h"
+#include "machine/namco_c148.h"
+#include "machine/timer.h"
+#include "sound/c140.h"
+#include "video/c45.h"
+#include "machine/namco65.h"
+#include "machine/namco68.h"
+#include "video/namco_c355spr.h"
+#include "video/namcos2_sprite.h"
+#include "video/namcos2_roz.h"
+
#define NAMCOS21_POLY_FRAME_WIDTH 496
#define NAMCOS21_POLY_FRAME_HEIGHT 480
#define WINRUN_MAX_POLY_PARAM (1+256*3)
+#define NAMCOS21_NUM_COLORS 0x8000
+
#define DSP_BUF_MAX (4096*12)
struct dsp_state
{
@@ -46,12 +59,38 @@ struct edge
};
-class namcos21_state : public namcos2_shared_state
+class namcos21_state : public driver_device
{
public:
+ enum
+ { /* Namco System21 */
+ NAMCOS21_AIRCOMBAT = 0x4000,
+ NAMCOS21_STARBLADE,
+ NAMCOS21_CYBERSLED,
+ NAMCOS21_SOLVALOU,
+ NAMCOS21_WINRUN91,
+ NAMCOS21_DRIVERS_EYES,
+ };
+
namcos21_state(const machine_config &mconfig, device_type type, const char *tag) :
- namcos2_shared_state(mconfig, type, tag),
+ driver_device(mconfig, type, tag),
m_master_dsp_code(*this,"master_dsp_code"),
+ m_gametype(0),
+ m_dspmaster(*this, "dspmaster"),
+ m_dspslave(*this, "dspslave"),
+ m_maincpu(*this, "maincpu"),
+ m_audiocpu(*this, "audiocpu"),
+ m_slave(*this, "slave"),
+ m_c65(*this, "c65mcu"),
+ m_c68(*this, "c68mcu"),
+ m_sci(*this, "sci"),
+ m_master_intc(*this, "master_intc"),
+ m_slave_intc(*this, "slave_intc"),
+ m_c140(*this, "c140"),
+ m_c355spr(*this, "c355spr"),
+ m_palette(*this, "palette"),
+ m_screen(*this, "screen"),
+ m_audiobank(*this, "audiobank"),
m_winrun_dspbios(*this,"winrun_dspbios"),
m_winrun_polydata(*this,"winrun_polydata"),
m_dspram16(*this,"dspram16"),
@@ -80,7 +119,27 @@ public:
void clear_poly_framebuffer();
std::unique_ptr<dsp_state> m_mpDspState;
+ int m_gametype;
+
+ optional_device<cpu_device> m_dspmaster;
+ optional_device<cpu_device> m_dspslave;
+
private:
+ required_device<cpu_device> m_maincpu;
+ optional_device<cpu_device> m_audiocpu;
+ optional_device<cpu_device> m_slave;
+ optional_device<namcoc65_device> m_c65;
+ optional_device<namcoc68_device> m_c68;
+ optional_device<namco_c139_device> m_sci;
+ optional_device<namco_c148_device> m_master_intc;
+ optional_device<namco_c148_device> m_slave_intc;
+ optional_device<c140_device> m_c140;
+ optional_device<namco_c355spr_device> m_c355spr;
+ required_device<palette_device> m_palette;
+
+ optional_device<screen_device> m_screen;
+ optional_memory_bank m_audiobank;
+
optional_shared_ptr<uint16_t> m_winrun_dspbios;
optional_shared_ptr<uint16_t> m_winrun_polydata;
optional_shared_ptr<uint16_t> m_dspram16;
@@ -179,12 +238,27 @@ private:
DECLARE_WRITE16_MEMBER(winrun_gpu_videoram_w);
DECLARE_READ16_MEMBER(winrun_gpu_videoram_r);
+ DECLARE_WRITE8_MEMBER( namcos2_68k_eeprom_w );
+ DECLARE_READ8_MEMBER( namcos2_68k_eeprom_r );
+
+ DECLARE_WRITE8_MEMBER( namcos2_sound_bankselect_w );
+
+ DECLARE_WRITE8_MEMBER(sound_reset_w);
+ DECLARE_WRITE8_MEMBER(system_reset_w);
+ void reset_all_subcpus(int state);
+
+ // game type helpers
+ bool is_system21();
+
+ std::unique_ptr<uint8_t[]> m_eeprom;
+
TIMER_DEVICE_CALLBACK_MEMBER(screen_scanline);
uint8_t m_gearbox_state;
DECLARE_CUSTOM_INPUT_MEMBER(driveyes_gearbox_r);
DECLARE_MACHINE_START(namcos21);
+ DECLARE_MACHINE_RESET(namcos21);
DECLARE_VIDEO_START(namcos21);
uint32_t screen_update_namcos21(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_winrun(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -205,6 +279,7 @@ private:
void winrun_flush_poly();
void init(int game_type);
void configure_c65_namcos21(machine_config &config);
+ void configure_c68_namcos21(machine_config &config);
void common_map(address_map &map);
void driveyes_common_map(address_map &map);
void driveyes_master_map(address_map &map);