mirror of
https://github.com/holub/mame
synced 2025-06-06 12:53:46 +03:00
arcadia, beathead, bw12, calchase, halleys, mediagx, model2, namcos10, s3, s4, seattle: initialized some variables that were causing crashes in drvnoclear builds
This commit is contained in:
parent
9e71712b3b
commit
03d201bf8b
@ -460,6 +460,8 @@ void bw12_state::machine_start()
|
||||
|
||||
void bw12_state::machine_reset()
|
||||
{
|
||||
m_key_stb = 0;
|
||||
m_key_shift = 0;
|
||||
}
|
||||
|
||||
static void bw12_floppies(device_slot_interface &device)
|
||||
|
@ -145,6 +145,8 @@ something wrong in the disk geometry reported by calchase.chd (20,255,63) since
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class calchase_state : public pcat_base_state
|
||||
{
|
||||
public:
|
||||
@ -158,6 +160,10 @@ public:
|
||||
void init_calchase();
|
||||
void init_hostinv();
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<uint32_t[]> m_bios_ram;
|
||||
std::unique_ptr<uint32_t[]> m_bios_ext_ram;
|
||||
@ -178,8 +184,6 @@ private:
|
||||
uint32_t calchase_idle_skip_r();
|
||||
void calchase_idle_skip_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
void intel82439tx_init();
|
||||
void calchase_io(address_map &map);
|
||||
void calchase_map(address_map &map);
|
||||
@ -619,6 +623,9 @@ void calchase_state::machine_start()
|
||||
|
||||
m_nvram_data = std::make_unique<uint8_t[]>(0x800);
|
||||
subdevice<nvram_device>("nvram")->set_base(m_nvram_data.get(), 0x800);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
std::fill(std::begin(m_piix4_config_reg[i]), std::end(m_piix4_config_reg[i]), 0);
|
||||
}
|
||||
|
||||
void calchase_state::machine_reset()
|
||||
@ -764,6 +771,9 @@ ROM_START( eggsplc )
|
||||
DISK_IMAGE_READONLY( "eggsplc", 0, SHA1(fa38dd6b0d25cde644f68cf639768f137c607eb5) )
|
||||
ROM_END
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
|
||||
GAME( 1998, hostinv, 0, hostinv, calchase, calchase_state, init_hostinv, ROT0, "The Game Room", "Host Invaders", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 1999, calchase, 0, calchase, calchase, calchase_state, init_calchase, ROT0, "The Game Room", "California Chase", MACHINE_NOT_WORKING|MACHINE_IMPERFECT_GRAPHICS )
|
||||
GAME( 2002, eggsplc, 0, calchase, calchase, calchase_state, init_hostinv, ROT0, "The Game Room", "Eggs Playing Chicken", 0 )
|
||||
|
@ -174,6 +174,8 @@ Video sync 6 F Video sync Post 6 F Post
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
#define HALLEYS_DEBUG 0
|
||||
|
||||
|
||||
@ -235,6 +237,7 @@ public:
|
||||
void init_halleysp();
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
@ -1916,9 +1919,13 @@ INPUT_PORTS_END
|
||||
//**************************************************************************
|
||||
// Machine Definitions and Initializations
|
||||
|
||||
void halleys_state::machine_reset()
|
||||
void halleys_state::machine_start()
|
||||
{
|
||||
m_mVectorType = 0;
|
||||
}
|
||||
|
||||
void halleys_state::machine_reset()
|
||||
{
|
||||
m_firq_level = 0;
|
||||
m_blitter_busy = 0;
|
||||
m_collision_count = 0;
|
||||
@ -2270,6 +2277,8 @@ void halleys_state::init_halley87()
|
||||
init_common();
|
||||
}
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// Game Definitions
|
||||
|
@ -79,6 +79,9 @@
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
#define SPEEDUP_HACKS 1
|
||||
|
||||
class mediagx_state : public pcat_base_state
|
||||
@ -912,6 +915,10 @@ void mediagx_state::mediagx(machine_config &config)
|
||||
void mediagx_state::init_mediagx()
|
||||
{
|
||||
m_frame_width = m_frame_height = 1;
|
||||
m_parallel_pointer = 0;
|
||||
std::fill(std::begin(m_disp_ctrl_reg), std::end(m_disp_ctrl_reg), 0);
|
||||
std::fill(std::begin(m_biu_ctrl_reg), std::end(m_biu_ctrl_reg), 0);
|
||||
std::fill(std::begin(m_speedup_hits), std::end(m_speedup_hits), 0);
|
||||
}
|
||||
|
||||
#if SPEEDUP_HACKS
|
||||
@ -1015,6 +1022,8 @@ ROM_START( a51site4a ) /* When dumped connected straight to IDE the cylinders we
|
||||
DISK_IMAGE( "a51site4-2_0", 0, SHA1(4de421e4d1708ecbdfb50730000814a1ea36a044) ) /* Stock drive, sticker on drive shows REV 2.0 and Test Mode screen shows the date September 11, 1998 */
|
||||
ROM_END
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
@ -301,6 +301,13 @@ void model2_tgp_state::machine_reset()
|
||||
m_copro_tgp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
}
|
||||
|
||||
void model2o_gtx_state::machine_reset()
|
||||
{
|
||||
model2_tgp_state::machine_reset();
|
||||
|
||||
m_gtx_state = 0;
|
||||
}
|
||||
|
||||
void model2a_state::machine_reset()
|
||||
{
|
||||
model2_tgp_state::machine_reset();
|
||||
@ -318,6 +325,9 @@ void model2b_state::machine_reset()
|
||||
m_copro_adsp->set_input_line(SHARC_INPUT_FLAG0, ASSERT_LINE);
|
||||
// clear FIFOOUT buffer full flag on SHARC
|
||||
m_copro_adsp->set_input_line(SHARC_INPUT_FLAG1, CLEAR_LINE);
|
||||
|
||||
m_iop_data = 0;
|
||||
m_iop_write_num = 0;
|
||||
}
|
||||
|
||||
void model2c_state::machine_reset()
|
||||
|
@ -415,6 +415,8 @@ earlier TK games, so it appears to be optional or is only used by the later TK51
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class namcos10_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -451,6 +453,9 @@ public:
|
||||
void init_chocovdr();
|
||||
void init_konotako();
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
|
||||
private:
|
||||
// memm variant interface
|
||||
void crypto_switch_w(uint16_t data);
|
||||
@ -516,6 +521,12 @@ private:
|
||||
};
|
||||
|
||||
|
||||
void namcos10_state::machine_start()
|
||||
{
|
||||
nand_address = 0;
|
||||
}
|
||||
|
||||
|
||||
void namcos10_state::namcos10_map(address_map &map)
|
||||
{
|
||||
map(0x1f500000, 0x1f501fff).ram().share("share3"); /* ram? stores block numbers */
|
||||
@ -1339,6 +1350,9 @@ ROM_START( pacmball )
|
||||
ROM_LOAD( "k9f2808u0c.8d", 0x1080000, 0x1080000, CRC(f79d7199) SHA1(4ef9b758ee778e12f7fef717e063597299fb8219) )
|
||||
ROM_END
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
|
||||
GAME( 2000, mrdrilr2, 0, ns10_mrdrilr2, namcos10, namcos10_state, init_mrdrilr2, ROT0, "Namco", "Mr. Driller 2 (Japan, DR21 Ver.A)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // PORT_4WAY joysticks
|
||||
GAME( 2000, mrdrlr2a, mrdrilr2, ns10_mrdrilr2, namcos10, namcos10_state, init_mrdrilr2, ROT0, "Namco", "Mr. Driller 2 (World, DR22 Ver.A)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // PORT_4WAY joysticks
|
||||
GAME( 2000, ptblank3, 0, namcos10_memn_exio, namcos10, namcos10_state, init_gunbalna, ROT0, "Namco", "Point Blank 3 (World, GNN2 Ver.A)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // needs to hookup gun IO
|
||||
|
@ -49,6 +49,8 @@ ToDo:
|
||||
#include "s3.lh"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class s3_state : public genpin_class
|
||||
{
|
||||
public:
|
||||
@ -71,6 +73,9 @@ public:
|
||||
DECLARE_INPUT_CHANGED_MEMBER(main_nmi);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(audio_nmi);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override { m_digits.resolve(); m_strobe = 0; }
|
||||
|
||||
private:
|
||||
uint8_t sound_r();
|
||||
void dig0_w(uint8_t data);
|
||||
@ -104,7 +109,6 @@ private:
|
||||
uint8_t m_switch_col;
|
||||
bool m_data_ok;
|
||||
bool m_chimes;
|
||||
virtual void machine_start() override { m_digits.resolve(); }
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<cpu_device> m_audiocpu;
|
||||
required_device<pia6821_device> m_pia22;
|
||||
@ -602,6 +606,8 @@ ROM_START(pkrno_l1)
|
||||
ROM_LOAD("488_s0_pokerino.716", 0x0000, 0x0800, CRC(5de02e62) SHA1(f838439a731511a264e508a576ae7193d9fed1af))
|
||||
ROM_END
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
GAME( 1977, httip_l1, 0, s3, s3, s3_state, empty_init, ROT0, "Williams", "Hot Tip (L-1)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING )
|
||||
GAME( 1977, lucky_l1, 0, s3, s3, s3_state, empty_init, ROT0, "Williams", "Lucky Seven (L-1)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING )
|
||||
GAME( 1978, wldcp_l1, 0, s3a, s3, s3_state, empty_init, ROT0, "Williams", "World Cup (L-1)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING )
|
||||
|
@ -43,6 +43,8 @@ ToDo:
|
||||
#include "s4.lh"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class s4_state : public genpin_class
|
||||
{
|
||||
public:
|
||||
@ -65,6 +67,9 @@ public:
|
||||
DECLARE_INPUT_CHANGED_MEMBER(main_nmi);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(audio_nmi);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override { m_digits.resolve(); m_strobe = 0; }
|
||||
|
||||
private:
|
||||
uint8_t sound_r();
|
||||
void dig0_w(uint8_t data);
|
||||
@ -98,7 +103,6 @@ private:
|
||||
uint8_t m_switch_col;
|
||||
bool m_data_ok;
|
||||
bool m_chimes;
|
||||
virtual void machine_start() override { m_digits.resolve(); }
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<cpu_device> m_audiocpu;
|
||||
required_device<pia6821_device> m_pia22;
|
||||
@ -713,6 +717,8 @@ ROM_START(tstrk_l1)
|
||||
ROM_LOAD("b_ic17.716", 0x1800, 0x0800, CRC(cfc2518a) SHA1(5e99e40dcb7e178137db8d7d7d6da82ba87130fa))
|
||||
ROM_END
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
|
||||
GAME( 1979, flash_l2, 0, s4a, s4, s4_state, empty_init, ROT0, "Williams", "Flash (Williams, L-2)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING )
|
||||
GAME( 1979, flash_l1, flash_l2, s4a, s4, s4_state, empty_init, ROT0, "Williams", "Flash (Williams, L-1)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING )
|
||||
|
@ -205,6 +205,9 @@
|
||||
#include "hyprdriv.lh"
|
||||
#include "sfrush.lh"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Debugging constants
|
||||
@ -493,6 +496,7 @@ void seattle_state::machine_reset()
|
||||
m_wheel_force = 0;
|
||||
m_wheel_offset = 0;
|
||||
m_wheel_calibrated = false;
|
||||
m_ethernet_irq_num = 0;
|
||||
// reset either the DCS2 board or the CAGE board
|
||||
if (m_dcs != nullptr)
|
||||
{
|
||||
@ -2810,6 +2814,7 @@ void seattle_state::init_hyprdriv()
|
||||
}
|
||||
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
/*************************************
|
||||
*
|
||||
|
@ -56,21 +56,8 @@ public:
|
||||
void arcadia(machine_config &config);
|
||||
|
||||
protected:
|
||||
DECLARE_READ_LINE_MEMBER(vsync_r);
|
||||
uint8_t video_r(offs_t offset);
|
||||
void video_w(offs_t offset, uint8_t data);
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void video_start() override;
|
||||
void palette_init(palette_device &palette) const;
|
||||
uint32_t screen_update_arcadia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(video_line);
|
||||
void arcadia_mem(address_map &map);
|
||||
|
||||
void draw_char(uint8_t *ch, int charcode, int y, int x);
|
||||
void vh_draw_line(int y, uint8_t chars1[16]);
|
||||
int sprite_collision(int n1, int n2);
|
||||
void draw_sprites();
|
||||
|
||||
private:
|
||||
int m_line;
|
||||
@ -135,6 +122,19 @@ private:
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
required_device<screen_device> m_screen;
|
||||
|
||||
DECLARE_READ_LINE_MEMBER(vsync_r);
|
||||
uint8_t video_r(offs_t offset);
|
||||
void video_w(offs_t offset, uint8_t data);
|
||||
void palette_init(palette_device &palette) const;
|
||||
uint32_t screen_update_arcadia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(video_line);
|
||||
void arcadia_mem(address_map &map);
|
||||
|
||||
void draw_char(uint8_t *ch, int charcode, int y, int x);
|
||||
void vh_draw_line(int y, uint8_t chars1[16]);
|
||||
int sprite_collision(int n1, int n2);
|
||||
void draw_sprites();
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_ARCADIA_H
|
||||
|
@ -141,8 +141,6 @@ protected:
|
||||
u8 m_driveio_comm_data;
|
||||
int m_iop_write_num;
|
||||
u32 m_iop_data;
|
||||
int m_geo_iop_write_num;
|
||||
u32 m_geo_iop_data;
|
||||
|
||||
u32 m_geo_read_start_address;
|
||||
u32 m_geo_write_start_address;
|
||||
@ -441,12 +439,16 @@ public:
|
||||
: model2o_state(mconfig, type, tag)
|
||||
{}
|
||||
|
||||
u8 gtx_r(offs_t offset);
|
||||
void daytona_gtx(machine_config &config);
|
||||
void model2o_gtx_mem(address_map &map);
|
||||
|
||||
protected:
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
int m_gtx_state;
|
||||
|
||||
u8 gtx_r(offs_t offset);
|
||||
void model2o_gtx_mem(address_map &map);
|
||||
};
|
||||
|
||||
/*****************************
|
||||
|
@ -288,9 +288,8 @@ static const uint8_t chars[0x40][8]={
|
||||
|
||||
void arcadia_state::video_start()
|
||||
{
|
||||
int i;
|
||||
memcpy(&m_chars, chars, sizeof(chars));
|
||||
for (i=0; i<0x40; i++)
|
||||
for (int i=0; i<0x40; i++)
|
||||
{
|
||||
m_rectangle[i][0]=0;
|
||||
m_rectangle[i][4]=0;
|
||||
@ -309,6 +308,9 @@ void arcadia_state::video_start()
|
||||
int height = m_screen->height();
|
||||
m_bitmap = std::make_unique<bitmap_ind16>(width, height);
|
||||
}
|
||||
|
||||
m_line = 0;
|
||||
std::fill(std::begin(m_reg.d.pal), std::end(m_reg.d.pal), 0);
|
||||
}
|
||||
|
||||
uint8_t arcadia_state::video_r(offs_t offset)
|
||||
|
@ -24,6 +24,8 @@ void beathead_state::video_start()
|
||||
save_item(NAME(m_hsyncram_offset));
|
||||
save_item(NAME(m_hsyncram_start));
|
||||
save_item(NAME(m_hsyncram));
|
||||
|
||||
m_hsyncram_offset = 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user