mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
missile, mpz80, mz700, pockstat, pofo, proteus3, savquest: initialized some variables which were causing incorrect behaviours in drvnoclear debug builds
This commit is contained in:
parent
a425bd5d90
commit
85cb1fc955
@ -359,6 +359,9 @@ Super Missile Attack Board Layout
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class missile_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -379,6 +382,8 @@ public:
|
||||
, m_screen(*this, "screen")
|
||||
, m_palette(*this, "palette")
|
||||
, m_leds(*this, "led%u", 0U)
|
||||
, m_mainrom(*this, "maincpu")
|
||||
, m_writeprom(*this, "proms")
|
||||
{ }
|
||||
|
||||
void missileb(machine_config &config);
|
||||
@ -390,6 +395,10 @@ public:
|
||||
|
||||
DECLARE_READ_LINE_MEMBER(vblank_r);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
void missile_w(address_space &space, offs_t offset, uint8_t data);
|
||||
uint8_t missile_r(address_space &space, offs_t offset);
|
||||
@ -410,9 +419,6 @@ private:
|
||||
void bootleg_main_map(address_map &map);
|
||||
void main_map(address_map &map);
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
required_device<m6502_device> m_maincpu;
|
||||
required_shared_ptr<uint8_t> m_videoram;
|
||||
required_device<watchdog_timer_device> m_watchdog;
|
||||
@ -429,8 +435,8 @@ private:
|
||||
required_device<palette_device> m_palette;
|
||||
output_finder<2> m_leds;
|
||||
|
||||
const uint8_t *m_mainrom;
|
||||
const uint8_t *m_writeprom;
|
||||
required_region_ptr<uint8_t> m_mainrom;
|
||||
required_region_ptr<uint8_t> m_writeprom;
|
||||
emu_timer *m_irq_timer;
|
||||
emu_timer *m_cpu_timer;
|
||||
uint8_t m_irq_state;
|
||||
@ -541,9 +547,8 @@ void missile_state::machine_start()
|
||||
m_leds.resolve();
|
||||
|
||||
/* initialize globals */
|
||||
m_mainrom = memregion("maincpu")->base();
|
||||
m_writeprom = memregion("proms")->base();
|
||||
m_flipscreen = 0;
|
||||
m_ctrld = 0;
|
||||
|
||||
/* create a timer to speed/slow the CPU */
|
||||
m_cpu_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(missile_state::adjust_cpu_speed),this));
|
||||
@ -1491,6 +1496,8 @@ void missile_state::init_missilem()
|
||||
}
|
||||
}
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
|
@ -687,6 +687,7 @@ static void mpz80_s100_cards(device_slot_interface &device)
|
||||
|
||||
void mpz80_state::machine_start()
|
||||
{
|
||||
m_task = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Sony PocketStation
|
||||
|
||||
PocketStation games were dowloaded from PS1 games into flash RAM after
|
||||
PocketStation games were downloaded from PS1 games into flash RAM after
|
||||
the unit had been inserted in the memory card slot, and so this should
|
||||
be emulated alongside the PS1. However, as many flash dumps exist, it
|
||||
is possible to emulate the PocketStation in the meantime.
|
||||
@ -55,6 +55,9 @@
|
||||
#define VERBOSE (0)
|
||||
#include "logmacro.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class pockstat_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -69,10 +72,11 @@ public:
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(input_update);
|
||||
|
||||
private:
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
void mem_map(address_map &map);
|
||||
|
||||
uint32_t screen_update_pockstat(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
@ -880,6 +884,7 @@ void pockstat_state::machine_start()
|
||||
{
|
||||
m_timers[index].timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pockstat_state::timer_tick), this));
|
||||
m_timers[index].timer->adjust(attotime::never, index);
|
||||
m_timers[index].count = 0;
|
||||
}
|
||||
|
||||
m_rtc_regs.time = 0x01000000;
|
||||
@ -1013,6 +1018,9 @@ ROM_START( pockstat )
|
||||
ROM_LOAD( "kernel.bin", 0x0000, 0x4000, CRC(5fb47dd8) SHA1(6ae880493ddde880827d1e9f08e9cb2c38f9f2ec) )
|
||||
ROM_END
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
|
||||
/* Driver */
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
//**************************************************************************
|
||||
// MACROS / CONSTANTS
|
||||
@ -92,10 +93,11 @@ public:
|
||||
|
||||
void portfolio(machine_config &config);
|
||||
|
||||
private:
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
void portfolio_io(address_map &map);
|
||||
void portfolio_lcdc(address_map &map);
|
||||
void portfolio_mem(address_map &map);
|
||||
@ -990,6 +992,8 @@ void portfolio_state::machine_start()
|
||||
save_item(NAME(m_counter));
|
||||
save_item(NAME(m_keylatch));
|
||||
save_item(NAME(m_rom_b));
|
||||
|
||||
m_ip = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1086,6 +1090,7 @@ ROM_START( pofo )
|
||||
ROM_LOAD( "c101783-001a-01.u3", 0x0000, 0x8000, CRC(61fdaff1) SHA1(5eb99e7a19af7b8d77ea8a2f1f554e6e3d382fa2) )
|
||||
ROM_END
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
|
@ -61,6 +61,8 @@
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class proteus3_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -78,6 +80,10 @@ public:
|
||||
|
||||
void proteus3(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_reset() override;
|
||||
virtual void machine_start() override;
|
||||
|
||||
private:
|
||||
DECLARE_WRITE_LINE_MEMBER(ca2_w);
|
||||
void video_w(u8 data);
|
||||
@ -106,8 +112,6 @@ private:
|
||||
|
||||
void mem_map(address_map &map);
|
||||
|
||||
virtual void machine_reset() override;
|
||||
virtual void machine_start() override;
|
||||
u8 m_video_data;
|
||||
u8 m_flashcnt;
|
||||
u16 m_curs_pos;
|
||||
@ -385,6 +389,8 @@ void proteus3_state::machine_start()
|
||||
save_item(NAME(m_cassbit));
|
||||
save_item(NAME(m_cassold));
|
||||
save_item(NAME(m_cassinbit));
|
||||
|
||||
m_flashcnt = 0;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@ -492,6 +498,8 @@ ROM_START(proteus3)
|
||||
ROM_LOAD( "proteus3_pbug.bin", 0x0000, 0x0800, CRC(1118694d) SHA1(2dfc08d405e8f2936f5b0bd1c4007995151abbba) )
|
||||
ROM_END
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
Drivers
|
||||
|
@ -2,7 +2,7 @@
|
||||
// copyright-holders:R. Belmont, Peter Ferrie
|
||||
/***************************************************************************
|
||||
|
||||
savquest.c
|
||||
savquest.cpp
|
||||
|
||||
"Savage Quest" (c) 1999 Interactive Light, developed by Angel Studios.
|
||||
Skeleton by R. Belmont
|
||||
@ -59,6 +59,9 @@
|
||||
#include "machine/ds128x.h"
|
||||
#include "bus/isa/sblaster.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class savquest_state : public pcat_base_state
|
||||
{
|
||||
public:
|
||||
@ -67,10 +70,18 @@ public:
|
||||
m_vga(*this, "vga"),
|
||||
m_voodoo(*this, "voodoo")
|
||||
{
|
||||
std::fill(std::begin(m_mtxc_config_reg), std::end(m_mtxc_config_reg), 0);
|
||||
}
|
||||
|
||||
void savquest(machine_config &config);
|
||||
|
||||
protected:
|
||||
// driver_device overrides
|
||||
// virtual void video_start();
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<uint32_t[]> m_bios_f0000_ram;
|
||||
std::unique_ptr<uint32_t[]> m_bios_e0000_ram;
|
||||
@ -119,11 +130,6 @@ private:
|
||||
void savquest_io(address_map &map);
|
||||
void savquest_map(address_map &map);
|
||||
|
||||
// driver_device overrides
|
||||
// virtual void video_start();
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
void intel82439tx_init();
|
||||
void vid_3dfx_init();
|
||||
|
||||
@ -791,6 +797,9 @@ void savquest_state::machine_start()
|
||||
|
||||
intel82439tx_init();
|
||||
vid_3dfx_init();
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
std::fill(std::begin(m_piix4_config_reg[i]), std::end(m_piix4_config_reg[i]), 0);
|
||||
}
|
||||
|
||||
void savquest_state::machine_reset()
|
||||
@ -865,5 +874,7 @@ ROM_START( savquest )
|
||||
DISK_IMAGE( "savquest", 0, SHA1(b7c8901172b66706a7ab5f5c91e6912855153fa9) )
|
||||
ROM_END
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
|
||||
GAME(1999, savquest, 0, savquest, savquest, savquest_state, empty_init, ROT0, "Interactive Light", "Savage Quest", MACHINE_IS_SKELETON)
|
||||
|
@ -39,6 +39,10 @@ public:
|
||||
|
||||
void mpz80(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<ram_device> m_ram;
|
||||
@ -47,9 +51,6 @@ private:
|
||||
memory_share_creator<uint8_t> m_map_ram;
|
||||
required_ioport m_16c;
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
inline offs_t get_address(offs_t offset);
|
||||
inline offs_t get_io_address(offs_t offset);
|
||||
|
||||
|
@ -50,6 +50,9 @@ public:
|
||||
void init_mz800();
|
||||
void init_mz700();
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
|
||||
private:
|
||||
uint8_t mz700_e008_r();
|
||||
void mz700_e008_w(uint8_t data);
|
||||
@ -75,7 +78,6 @@ private:
|
||||
void mz800_cgram_w(offs_t offset, uint8_t data);
|
||||
DECLARE_MACHINE_RESET(mz700);
|
||||
DECLARE_MACHINE_RESET(mz800);
|
||||
virtual void machine_start() override;
|
||||
uint32_t screen_update_mz700(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_mz800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(ne556_cursor_callback);
|
||||
|
@ -20,7 +20,9 @@ public:
|
||||
: pocketc_state(mconfig, type, tag)
|
||||
, m_keys(*this, "KEY%u", 0U)
|
||||
, m_mode(*this, "MODE")
|
||||
{ }
|
||||
{
|
||||
std::fill(std::begin(m_reg), std::end(m_reg), 0);
|
||||
}
|
||||
|
||||
void init_pc1251();
|
||||
|
||||
|
@ -21,7 +21,9 @@ public:
|
||||
: pocketc_state(mconfig, type, tag)
|
||||
, m_ram(*this, RAM_TAG)
|
||||
, m_keys(*this, "KEY%u", 0U)
|
||||
{ }
|
||||
{
|
||||
std::fill(std::begin(m_reg), std::end(m_reg), 0);
|
||||
}
|
||||
|
||||
void pc1350(machine_config &config);
|
||||
|
||||
|
@ -19,7 +19,9 @@ public:
|
||||
pc1401_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: pocketc_state(mconfig, type, tag)
|
||||
, m_keys(*this, "KEY%u", 0U)
|
||||
{ }
|
||||
{
|
||||
std::fill(std::begin(m_reg), std::end(m_reg), 0);
|
||||
}
|
||||
|
||||
void init_pc1401();
|
||||
|
||||
|
@ -19,7 +19,9 @@ public:
|
||||
pc1403_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: pocketc_state(mconfig, type, tag)
|
||||
, m_keys(*this, "KEY%u", 0U)
|
||||
{ }
|
||||
{
|
||||
std::fill(std::begin(m_reg), std::end(m_reg), 0);
|
||||
}
|
||||
|
||||
void pc1403(machine_config &config);
|
||||
void pc1403h(machine_config &config);
|
||||
|
@ -91,6 +91,10 @@ void mz_state::machine_start()
|
||||
{
|
||||
/* reset memory map to defaults */
|
||||
mz700_bank_4_w(0);
|
||||
|
||||
m_cursor_bit = 0;
|
||||
m_speaker_level = 0;
|
||||
m_prev_state = 0;
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER( mz_state, mz700 )
|
||||
|
Loading…
Reference in New Issue
Block a user