mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
atarist, fmtowns, megadriv, model3, pc6001: initialized some variables which were causing incorrect behaviours in drvnoclear debug builds
This commit is contained in:
parent
23769b0970
commit
9a25a60fe2
@ -1887,6 +1887,10 @@ void st_state::machine_start()
|
||||
m_mfp->i4_w(1);
|
||||
m_mfp->i5_w(1);
|
||||
m_mfp->i7_w(1);
|
||||
|
||||
m_shifter_base = 0;
|
||||
m_shifter_ofs = 0;
|
||||
m_shifter_mode = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2762,6 +2762,10 @@ void towns_state::machine_start()
|
||||
m_flop[0]->get_device()->set_rpm(360);
|
||||
if (m_flop[1]->get_device())
|
||||
m_flop[1]->get_device()->set_rpm(360);
|
||||
|
||||
m_timer0 = 0;
|
||||
m_timer1 = 0;
|
||||
m_serial_irq_enable = 0;
|
||||
}
|
||||
|
||||
void towns_state::machine_reset()
|
||||
|
@ -1364,7 +1364,16 @@ void model3_state::model3_init(int step)
|
||||
m_sound_irq_enable = 0;
|
||||
m_sound_timer->adjust(attotime::never);
|
||||
|
||||
m_irq_enable = 0;
|
||||
|
||||
m_pci_bus = 0;
|
||||
m_pci_device = 0;
|
||||
m_pci_function = 0;
|
||||
m_pci_reg = 0;
|
||||
|
||||
m_dma_busy = 0;
|
||||
m_dma_irq = 0;
|
||||
m_dma_endian = 0;
|
||||
m_real3d_dma_timer->adjust(attotime::never);
|
||||
|
||||
m_bank_crom->set_base(memregion( "user1" )->base() + 0x800000 ); /* banked CROM */
|
||||
|
@ -1407,6 +1407,8 @@ void pc6001sr_state::machine_reset()
|
||||
m_sr_text_mode = false;
|
||||
m_sr_text_rows = 20;
|
||||
|
||||
m_kludge = 0;
|
||||
|
||||
std::string region_tag;
|
||||
m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
|
||||
// should this be mirrored into the EXROM regions? hard to tell without an actual cart dump...
|
||||
|
@ -160,6 +160,9 @@ protected:
|
||||
void ux_mem(address_map &map);
|
||||
|
||||
virtual void driver_start() override;
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
|
||||
required_device<ram_device> m_ram;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
@ -276,9 +279,6 @@ private:
|
||||
optional_shared_ptr<uint32_t> m_nvram;
|
||||
optional_shared_ptr<uint16_t> m_nvram16;
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
|
||||
@ -457,8 +457,10 @@ class marty_state : public towns_state
|
||||
: towns_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
virtual void driver_start() override;
|
||||
void marty(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void driver_start() override;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_FMTOWNS_H
|
||||
|
@ -32,14 +32,6 @@ INPUT_PORTS_EXTERN( megadri6 );
|
||||
INPUT_PORTS_EXTERN( ssf2mdb );
|
||||
INPUT_PORTS_EXTERN( mk3mdb );
|
||||
|
||||
struct genesis_z80_vars
|
||||
{
|
||||
int z80_is_reset;
|
||||
int z80_has_bus;
|
||||
uint32_t z80_bank_addr;
|
||||
std::unique_ptr<uint8_t[]> z80_prgram;
|
||||
};
|
||||
|
||||
|
||||
class md_base_state : public driver_device
|
||||
{
|
||||
@ -70,6 +62,14 @@ public:
|
||||
ioport_port *m_io_pad_3b[4];
|
||||
ioport_port *m_io_pad_6b[4];
|
||||
|
||||
struct genesis_z80_vars
|
||||
{
|
||||
int z80_is_reset = 0;
|
||||
int z80_has_bus = 0;
|
||||
uint32_t z80_bank_addr = 0;
|
||||
std::unique_ptr<uint8_t[]> z80_prgram;
|
||||
};
|
||||
|
||||
genesis_z80_vars m_genz80;
|
||||
int m_version_hi_nibble;
|
||||
|
||||
|
@ -144,6 +144,9 @@ public:
|
||||
void init_lamachin();
|
||||
void init_model3_15();
|
||||
|
||||
protected:
|
||||
virtual void video_start() override;
|
||||
|
||||
private:
|
||||
required_device<ppc_device> m_maincpu;
|
||||
optional_device<lsi53c810_device> m_lsi53c810;
|
||||
@ -332,7 +335,6 @@ private:
|
||||
void set_irq_line(uint8_t bit, int line);
|
||||
void model3_init(int step);
|
||||
// video
|
||||
virtual void video_start() override;
|
||||
uint32_t screen_update_model3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
TILE_GET_INFO_MEMBER(tile_info_layer0_4bit);
|
||||
TILE_GET_INFO_MEMBER(tile_info_layer1_4bit);
|
||||
|
@ -231,6 +231,34 @@ public:
|
||||
m_sr_irq_vectors(*this, "irq_vectors")
|
||||
{ }
|
||||
|
||||
void pc6001sr(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void video_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
uint8_t m_sr_bank_r[8];
|
||||
uint8_t m_sr_bank_w[8];
|
||||
uint8_t m_kludge;
|
||||
bool m_sr_text_mode;
|
||||
uint8_t m_sr_text_rows;
|
||||
std::unique_ptr<uint8_t []> m_gvram;
|
||||
uint8_t m_bitmap_yoffs,m_bitmap_xoffs;
|
||||
|
||||
enum{
|
||||
SUB_CPU_IRQ = 0,
|
||||
JOYSTICK_IRQ,
|
||||
TIMER_IRQ,
|
||||
VOICE_IRQ,
|
||||
VRTC_IRQ,
|
||||
RS232_IRQ,
|
||||
PRINTER_IRQ,
|
||||
EXT_IRQ
|
||||
};
|
||||
|
||||
required_shared_ptr<uint8_t> m_sr_irq_vectors;
|
||||
|
||||
uint8_t hw_rev_r();
|
||||
uint8_t sr_bank_rn_r(offs_t offset);
|
||||
void sr_bank_rn_w(offs_t offset, uint8_t data);
|
||||
@ -255,35 +283,8 @@ public:
|
||||
|
||||
uint32_t screen_update_pc6001sr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void pc6001sr(machine_config &config);
|
||||
|
||||
void pc6001sr_io(address_map &map);
|
||||
void pc6001sr_map(address_map &map);
|
||||
protected:
|
||||
virtual void video_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
uint8_t m_sr_bank_r[8];
|
||||
uint8_t m_sr_bank_w[8];
|
||||
uint8_t m_kludge;
|
||||
bool m_sr_text_mode;
|
||||
uint8_t m_sr_text_rows;
|
||||
uint8_t *m_gvram;
|
||||
uint8_t m_bitmap_yoffs,m_bitmap_xoffs;
|
||||
|
||||
enum{
|
||||
SUB_CPU_IRQ = 0,
|
||||
JOYSTICK_IRQ,
|
||||
TIMER_IRQ,
|
||||
VOICE_IRQ,
|
||||
VRTC_IRQ,
|
||||
RS232_IRQ,
|
||||
PRINTER_IRQ,
|
||||
EXT_IRQ
|
||||
};
|
||||
|
||||
required_shared_ptr<uint8_t> m_sr_irq_vectors;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
// copyright-holders:R. Belmont, Ville Linde
|
||||
/*
|
||||
|
||||
machine/model3.c: functions emulating various aspects of the Model 3 hardware
|
||||
machine/model3.cpp: functions emulating various aspects of the Model 3 hardware
|
||||
|
||||
*/
|
||||
|
||||
|
@ -128,7 +128,8 @@ void pc6001mk2_state::video_start()
|
||||
void pc6001sr_state::video_start()
|
||||
{
|
||||
// m_video_ram = auto_alloc_array_clear(machine(), uint8_t, 0x4000);
|
||||
m_gvram = auto_alloc_array_clear(machine(), uint8_t, 320*256*8); // TODO: size
|
||||
m_gvram = std::make_unique<uint8_t []>(320*256*8); // TODO: size
|
||||
std::fill_n(m_gvram.get(), 320*256*8, 0);
|
||||
save_pointer(NAME(m_gvram), 320*256*8);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user