mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
galaga fix (nw)
This commit is contained in:
parent
1d65d9520f
commit
42e0242e91
@ -2529,8 +2529,11 @@ files {
|
||||
MAME_DIR .. "src/mame/audio/galaga.cpp",
|
||||
MAME_DIR .. "src/mame/video/galaga.cpp",
|
||||
MAME_DIR .. "src/mame/video/bosco.cpp",
|
||||
MAME_DIR .. "src/mame/includes/bosco.h",
|
||||
MAME_DIR .. "src/mame/video/digdug.cpp",
|
||||
MAME_DIR .. "src/mame/includes/digdug.h",
|
||||
MAME_DIR .. "src/mame/machine/xevious.cpp",
|
||||
MAME_DIR .. "src/mame/includes/xevious.h",
|
||||
MAME_DIR .. "src/mame/video/xevious.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/galaxian.cpp",
|
||||
MAME_DIR .. "src/mame/includes/galaxian.h",
|
||||
|
@ -707,6 +707,9 @@ TODO:
|
||||
#include "machine/namco51.h"
|
||||
#include "machine/namco53.h"
|
||||
#include "includes/galaga.h"
|
||||
#include "includes/xevious.h"
|
||||
#include "includes/bosco.h"
|
||||
#include "includes/digdug.h"
|
||||
#include "audio/namco52.h"
|
||||
#include "machine/rescap.h"
|
||||
#include "machine/watchdog.h"
|
||||
|
41
src/mame/includes/bosco.h
Normal file
41
src/mame/includes/bosco.h
Normal file
@ -0,0 +1,41 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nicola Salmoria
|
||||
|
||||
class bosco_state : public galaga_state
|
||||
{
|
||||
public:
|
||||
bosco_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: galaga_state(mconfig, type, tag),
|
||||
m_bosco_radarattr(*this, "bosco_radarattr"),
|
||||
m_bosco_starcontrol(*this, "starcontrol"),
|
||||
m_bosco_starblink(*this, "bosco_starblink") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_bosco_radarattr;
|
||||
|
||||
required_shared_ptr<UINT8> m_bosco_starcontrol;
|
||||
required_shared_ptr<UINT8> m_bosco_starblink;
|
||||
|
||||
UINT8 *m_bosco_radarx;
|
||||
UINT8 *m_bosco_radary;
|
||||
|
||||
UINT8 *m_spriteram;
|
||||
UINT8 *m_spriteram2;
|
||||
UINT32 m_spriteram_size;
|
||||
DECLARE_WRITE8_MEMBER(bosco_flip_screen_w);
|
||||
TILEMAP_MAPPER_MEMBER(fg_tilemap_scan);
|
||||
TILE_GET_INFO_MEMBER(bg_get_tile_info);
|
||||
TILE_GET_INFO_MEMBER(fg_get_tile_info);
|
||||
DECLARE_VIDEO_START(bosco);
|
||||
DECLARE_PALETTE_INIT(bosco);
|
||||
UINT32 screen_update_bosco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void screen_eof_bosco(screen_device &screen, bool state);
|
||||
|
||||
inline void get_tile_info_bosco(tile_data &tileinfo,int tile_index,int ram_offs);
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip);
|
||||
void draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip);
|
||||
void draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip);
|
||||
DECLARE_WRITE8_MEMBER( bosco_videoram_w );
|
||||
DECLARE_WRITE8_MEMBER( bosco_scrollx_w );
|
||||
DECLARE_WRITE8_MEMBER( bosco_scrolly_w );
|
||||
DECLARE_WRITE8_MEMBER( bosco_starclr_w );
|
||||
};
|
31
src/mame/includes/digdug.h
Normal file
31
src/mame/includes/digdug.h
Normal file
@ -0,0 +1,31 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nicola Salmoria
|
||||
|
||||
class digdug_state : public galaga_state
|
||||
{
|
||||
public:
|
||||
digdug_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: galaga_state(mconfig, type, tag),
|
||||
m_digdug_objram(*this, "digdug_objram"),
|
||||
m_digdug_posram(*this, "digdug_posram"),
|
||||
m_digdug_flpram(*this, "digdug_flpram") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_digdug_objram;
|
||||
required_shared_ptr<UINT8> m_digdug_posram;
|
||||
required_shared_ptr<UINT8> m_digdug_flpram;
|
||||
|
||||
UINT8 m_bg_select;
|
||||
UINT8 m_tx_color_mode;
|
||||
UINT8 m_bg_disable;
|
||||
UINT8 m_bg_color_bank;
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(shifted_port_r);
|
||||
TILEMAP_MAPPER_MEMBER(tilemap_scan);
|
||||
TILE_GET_INFO_MEMBER(bg_get_tile_info);
|
||||
TILE_GET_INFO_MEMBER(tx_get_tile_info);
|
||||
DECLARE_VIDEO_START(digdug);
|
||||
DECLARE_PALETTE_INIT(digdug);
|
||||
UINT32 screen_update_digdug(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_WRITE8_MEMBER( digdug_videoram_w );
|
||||
DECLARE_WRITE8_MEMBER( digdug_PORT_w );
|
||||
};
|
@ -90,149 +90,5 @@ public:
|
||||
static struct star m_star_seed_tab[];
|
||||
};
|
||||
|
||||
class xevious_state : public galaga_state
|
||||
{
|
||||
public:
|
||||
xevious_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: galaga_state(mconfig, type, tag),
|
||||
m_xevious_sr1(*this, "xevious_sr1"),
|
||||
m_xevious_sr2(*this, "xevious_sr2"),
|
||||
m_xevious_sr3(*this, "xevious_sr3"),
|
||||
m_xevious_fg_colorram(*this, "fg_colorram"),
|
||||
m_xevious_bg_colorram(*this, "bg_colorram"),
|
||||
m_xevious_fg_videoram(*this, "fg_videoram"),
|
||||
m_xevious_bg_videoram(*this, "bg_videoram"),
|
||||
m_samples(*this, "samples"),
|
||||
m_subcpu3(*this, "sub3") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_xevious_sr1;
|
||||
required_shared_ptr<UINT8> m_xevious_sr2;
|
||||
required_shared_ptr<UINT8> m_xevious_sr3;
|
||||
required_shared_ptr<UINT8> m_xevious_fg_colorram;
|
||||
required_shared_ptr<UINT8> m_xevious_bg_colorram;
|
||||
required_shared_ptr<UINT8> m_xevious_fg_videoram;
|
||||
required_shared_ptr<UINT8> m_xevious_bg_videoram;
|
||||
optional_device<samples_device> m_samples;
|
||||
|
||||
INT32 m_xevious_bs[2];
|
||||
DECLARE_DRIVER_INIT(xevious);
|
||||
DECLARE_DRIVER_INIT(xevios);
|
||||
DECLARE_DRIVER_INIT(battles);
|
||||
TILE_GET_INFO_MEMBER(get_fg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
DECLARE_VIDEO_START(xevious);
|
||||
DECLARE_PALETTE_INIT(xevious);
|
||||
DECLARE_MACHINE_RESET(xevios);
|
||||
DECLARE_PALETTE_INIT(battles);
|
||||
DECLARE_MACHINE_RESET(battles);
|
||||
UINT32 screen_update_xevious(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(battles_interrupt_4);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(battles_nmi_generate);
|
||||
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||
DECLARE_WRITE8_MEMBER( xevious_fg_videoram_w );
|
||||
DECLARE_WRITE8_MEMBER( xevious_fg_colorram_w );
|
||||
DECLARE_WRITE8_MEMBER( xevious_bg_videoram_w );
|
||||
DECLARE_WRITE8_MEMBER( xevious_bg_colorram_w );
|
||||
DECLARE_WRITE8_MEMBER( xevious_vh_latch_w );
|
||||
DECLARE_WRITE8_MEMBER( xevious_bs_w );
|
||||
DECLARE_READ8_MEMBER( xevious_bb_r );
|
||||
|
||||
// Custom I/O
|
||||
void battles_customio_init();
|
||||
|
||||
DECLARE_READ8_MEMBER( battles_customio0_r );
|
||||
DECLARE_READ8_MEMBER( battles_customio_data0_r );
|
||||
DECLARE_READ8_MEMBER( battles_customio3_r );
|
||||
DECLARE_READ8_MEMBER( battles_customio_data3_r );
|
||||
DECLARE_READ8_MEMBER( battles_input_port_r );
|
||||
|
||||
DECLARE_WRITE8_MEMBER( battles_customio0_w );
|
||||
DECLARE_WRITE8_MEMBER( battles_customio_data0_w );
|
||||
DECLARE_WRITE8_MEMBER( battles_customio3_w );
|
||||
DECLARE_WRITE8_MEMBER( battles_customio_data3_w );
|
||||
DECLARE_WRITE8_MEMBER( battles_CPU4_coin_w );
|
||||
DECLARE_WRITE8_MEMBER( battles_noise_sound_w );
|
||||
|
||||
UINT8 m_customio[16];
|
||||
char m_battles_customio_command;
|
||||
char m_battles_customio_prev_command;
|
||||
char m_battles_customio_command_count;
|
||||
char m_battles_customio_data;
|
||||
char m_battles_sound_played;
|
||||
|
||||
optional_device<cpu_device> m_subcpu3;
|
||||
};
|
||||
|
||||
|
||||
class bosco_state : public galaga_state
|
||||
{
|
||||
public:
|
||||
bosco_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: galaga_state(mconfig, type, tag),
|
||||
m_bosco_radarattr(*this, "bosco_radarattr"),
|
||||
m_bosco_starcontrol(*this, "starcontrol"),
|
||||
m_bosco_starblink(*this, "bosco_starblink") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_bosco_radarattr;
|
||||
|
||||
required_shared_ptr<UINT8> m_bosco_starcontrol;
|
||||
required_shared_ptr<UINT8> m_bosco_starblink;
|
||||
|
||||
UINT8 *m_bosco_radarx;
|
||||
UINT8 *m_bosco_radary;
|
||||
|
||||
UINT8 *m_spriteram;
|
||||
UINT8 *m_spriteram2;
|
||||
UINT32 m_spriteram_size;
|
||||
DECLARE_WRITE8_MEMBER(bosco_flip_screen_w);
|
||||
TILEMAP_MAPPER_MEMBER(fg_tilemap_scan);
|
||||
TILE_GET_INFO_MEMBER(bg_get_tile_info);
|
||||
TILE_GET_INFO_MEMBER(fg_get_tile_info);
|
||||
DECLARE_VIDEO_START(bosco);
|
||||
DECLARE_PALETTE_INIT(bosco);
|
||||
UINT32 screen_update_bosco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void screen_eof_bosco(screen_device &screen, bool state);
|
||||
|
||||
inline void get_tile_info_bosco(tile_data &tileinfo,int tile_index,int ram_offs);
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip);
|
||||
void draw_bullets(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip);
|
||||
void draw_stars(bitmap_ind16 &bitmap, const rectangle &cliprect, int flip);
|
||||
DECLARE_WRITE8_MEMBER( bosco_videoram_w );
|
||||
DECLARE_WRITE8_MEMBER( bosco_scrollx_w );
|
||||
DECLARE_WRITE8_MEMBER( bosco_scrolly_w );
|
||||
DECLARE_WRITE8_MEMBER( bosco_starclr_w );
|
||||
};
|
||||
|
||||
class digdug_state : public galaga_state
|
||||
{
|
||||
public:
|
||||
digdug_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: galaga_state(mconfig, type, tag),
|
||||
m_digdug_objram(*this, "digdug_objram"),
|
||||
m_digdug_posram(*this, "digdug_posram"),
|
||||
m_digdug_flpram(*this, "digdug_flpram") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_digdug_objram;
|
||||
required_shared_ptr<UINT8> m_digdug_posram;
|
||||
required_shared_ptr<UINT8> m_digdug_flpram;
|
||||
|
||||
UINT8 m_bg_select;
|
||||
UINT8 m_tx_color_mode;
|
||||
UINT8 m_bg_disable;
|
||||
UINT8 m_bg_color_bank;
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(shifted_port_r);
|
||||
TILEMAP_MAPPER_MEMBER(tilemap_scan);
|
||||
TILE_GET_INFO_MEMBER(bg_get_tile_info);
|
||||
TILE_GET_INFO_MEMBER(tx_get_tile_info);
|
||||
DECLARE_VIDEO_START(digdug);
|
||||
DECLARE_PALETTE_INIT(digdug);
|
||||
UINT32 screen_update_digdug(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_WRITE8_MEMBER( digdug_videoram_w );
|
||||
DECLARE_WRITE8_MEMBER( digdug_PORT_w );
|
||||
};
|
||||
|
||||
/*----------- defined in audio/galaga.c -----------*/
|
||||
|
||||
DISCRETE_SOUND_EXTERN( bosco );
|
||||
DISCRETE_SOUND_EXTERN( galaga );
|
||||
DISCRETE_SOUND_EXTERN( bosco );
|
||||
|
75
src/mame/includes/xevious.h
Normal file
75
src/mame/includes/xevious.h
Normal file
@ -0,0 +1,75 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nicola Salmoria
|
||||
|
||||
class xevious_state : public galaga_state
|
||||
{
|
||||
public:
|
||||
xevious_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: galaga_state(mconfig, type, tag),
|
||||
m_xevious_sr1(*this, "xevious_sr1"),
|
||||
m_xevious_sr2(*this, "xevious_sr2"),
|
||||
m_xevious_sr3(*this, "xevious_sr3"),
|
||||
m_xevious_fg_colorram(*this, "fg_colorram"),
|
||||
m_xevious_bg_colorram(*this, "bg_colorram"),
|
||||
m_xevious_fg_videoram(*this, "fg_videoram"),
|
||||
m_xevious_bg_videoram(*this, "bg_videoram"),
|
||||
m_samples(*this, "samples"),
|
||||
m_subcpu3(*this, "sub3") { }
|
||||
|
||||
required_shared_ptr<UINT8> m_xevious_sr1;
|
||||
required_shared_ptr<UINT8> m_xevious_sr2;
|
||||
required_shared_ptr<UINT8> m_xevious_sr3;
|
||||
required_shared_ptr<UINT8> m_xevious_fg_colorram;
|
||||
required_shared_ptr<UINT8> m_xevious_bg_colorram;
|
||||
required_shared_ptr<UINT8> m_xevious_fg_videoram;
|
||||
required_shared_ptr<UINT8> m_xevious_bg_videoram;
|
||||
optional_device<samples_device> m_samples;
|
||||
|
||||
INT32 m_xevious_bs[2];
|
||||
DECLARE_DRIVER_INIT(xevious);
|
||||
DECLARE_DRIVER_INIT(xevios);
|
||||
DECLARE_DRIVER_INIT(battles);
|
||||
TILE_GET_INFO_MEMBER(get_fg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
DECLARE_VIDEO_START(xevious);
|
||||
DECLARE_PALETTE_INIT(xevious);
|
||||
DECLARE_MACHINE_RESET(xevios);
|
||||
DECLARE_PALETTE_INIT(battles);
|
||||
DECLARE_MACHINE_RESET(battles);
|
||||
UINT32 screen_update_xevious(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(battles_interrupt_4);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(battles_nmi_generate);
|
||||
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||
DECLARE_WRITE8_MEMBER( xevious_fg_videoram_w );
|
||||
DECLARE_WRITE8_MEMBER( xevious_fg_colorram_w );
|
||||
DECLARE_WRITE8_MEMBER( xevious_bg_videoram_w );
|
||||
DECLARE_WRITE8_MEMBER( xevious_bg_colorram_w );
|
||||
DECLARE_WRITE8_MEMBER( xevious_vh_latch_w );
|
||||
DECLARE_WRITE8_MEMBER( xevious_bs_w );
|
||||
DECLARE_READ8_MEMBER( xevious_bb_r );
|
||||
|
||||
// Custom I/O
|
||||
void battles_customio_init();
|
||||
|
||||
DECLARE_READ8_MEMBER( battles_customio0_r );
|
||||
DECLARE_READ8_MEMBER( battles_customio_data0_r );
|
||||
DECLARE_READ8_MEMBER( battles_customio3_r );
|
||||
DECLARE_READ8_MEMBER( battles_customio_data3_r );
|
||||
DECLARE_READ8_MEMBER( battles_input_port_r );
|
||||
|
||||
DECLARE_WRITE8_MEMBER( battles_customio0_w );
|
||||
DECLARE_WRITE8_MEMBER( battles_customio_data0_w );
|
||||
DECLARE_WRITE8_MEMBER( battles_customio3_w );
|
||||
DECLARE_WRITE8_MEMBER( battles_customio_data3_w );
|
||||
DECLARE_WRITE8_MEMBER( battles_CPU4_coin_w );
|
||||
DECLARE_WRITE8_MEMBER( battles_noise_sound_w );
|
||||
|
||||
UINT8 m_customio[16];
|
||||
char m_battles_customio_command;
|
||||
char m_battles_customio_prev_command;
|
||||
char m_battles_customio_command_count;
|
||||
char m_battles_customio_data;
|
||||
char m_battles_sound_played;
|
||||
|
||||
optional_device<cpu_device> m_subcpu3;
|
||||
};
|
@ -12,6 +12,7 @@
|
||||
#include "emu.h"
|
||||
#include "sound/samples.h"
|
||||
#include "includes/galaga.h"
|
||||
#include "includes/xevious.h"
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/galaga.h"
|
||||
#include "includes/bosco.h"
|
||||
|
||||
|
||||
#define MAX_STARS 252
|
||||
|
@ -2,6 +2,7 @@
|
||||
// copyright-holders:Nicola Salmoria
|
||||
#include "emu.h"
|
||||
#include "includes/galaga.h"
|
||||
#include "includes/digdug.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/galaga.h"
|
||||
#include "includes/xevious.h"
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user