mirror of
https://github.com/holub/mame
synced 2025-04-16 21:44:32 +03:00
wpc_flip1,wpc_flip2,wpc_dot,wpc_an: added savestate
This commit is contained in:
parent
ca85bac05f
commit
79ca56f2d2
@ -4729,9 +4729,7 @@ files {
|
|||||||
MAME_DIR .. "src/mame/drivers/wpc_dot.cpp",
|
MAME_DIR .. "src/mame/drivers/wpc_dot.cpp",
|
||||||
MAME_DIR .. "src/mame/includes/wpc_dot.h",
|
MAME_DIR .. "src/mame/includes/wpc_dot.h",
|
||||||
MAME_DIR .. "src/mame/drivers/wpc_flip1.cpp",
|
MAME_DIR .. "src/mame/drivers/wpc_flip1.cpp",
|
||||||
MAME_DIR .. "src/mame/includes/wpc_flip1.h",
|
|
||||||
MAME_DIR .. "src/mame/drivers/wpc_flip2.cpp",
|
MAME_DIR .. "src/mame/drivers/wpc_flip2.cpp",
|
||||||
MAME_DIR .. "src/mame/includes/wpc_flip2.h",
|
|
||||||
MAME_DIR .. "src/mame/drivers/wpc_s.cpp",
|
MAME_DIR .. "src/mame/drivers/wpc_s.cpp",
|
||||||
MAME_DIR .. "src/mame/machine/wpc.cpp",
|
MAME_DIR .. "src/mame/machine/wpc.cpp",
|
||||||
MAME_DIR .. "src/mame/machine/wpc.h",
|
MAME_DIR .. "src/mame/machine/wpc.h",
|
||||||
|
@ -131,7 +131,7 @@ private:
|
|||||||
|
|
||||||
// driver_device overrides
|
// driver_device overrides
|
||||||
virtual void machine_reset() override;
|
virtual void machine_reset() override;
|
||||||
virtual void machine_start() override { m_digits.resolve(); }
|
virtual void machine_start() override;
|
||||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param) override;
|
virtual void device_timer(emu_timer &timer, device_timer_id id, int param) override;
|
||||||
static const device_timer_id TIMER_VBLANK = 0;
|
static const device_timer_id TIMER_VBLANK = 0;
|
||||||
static const device_timer_id TIMER_IRQ = 1;
|
static const device_timer_id TIMER_IRQ = 1;
|
||||||
@ -384,6 +384,15 @@ void wpc_an_state::ram_w(offs_t offset, uint8_t data)
|
|||||||
if(LOG_WPC) logerror("WPC: Memory protection violation at 0x%04x (mask=0x%04x)\n",offset,m_wpc->get_memprotect_mask());
|
if(LOG_WPC) logerror("WPC: Memory protection violation at 0x%04x (mask=0x%04x)\n",offset,m_wpc->get_memprotect_mask());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wpc_an_state::machine_start()
|
||||||
|
{
|
||||||
|
m_digits.resolve();
|
||||||
|
save_item(NAME(m_vblank_count));
|
||||||
|
save_item(NAME(m_irq_count));
|
||||||
|
save_item(NAME(m_bankmask));
|
||||||
|
save_item(NAME(m_ram));
|
||||||
|
}
|
||||||
|
|
||||||
void wpc_an_state::machine_reset()
|
void wpc_an_state::machine_reset()
|
||||||
{
|
{
|
||||||
m_cpubank->set_entry(0);
|
m_cpubank->set_entry(0);
|
||||||
|
@ -191,6 +191,15 @@ void wpc_dot_state::device_timer(emu_timer &timer, device_timer_id id, int param
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wpc_dot_state::machine_start()
|
||||||
|
{
|
||||||
|
save_item(NAME(m_vblank_count));
|
||||||
|
save_item(NAME(m_irq_count));
|
||||||
|
save_item(NAME(m_bankmask));
|
||||||
|
save_item(NAME(m_ram));
|
||||||
|
save_item(NAME(m_dmdram));
|
||||||
|
}
|
||||||
|
|
||||||
void wpc_dot_state::machine_reset()
|
void wpc_dot_state::machine_reset()
|
||||||
{
|
{
|
||||||
m_cpubank->set_entry(0);
|
m_cpubank->set_entry(0);
|
||||||
|
@ -19,7 +19,7 @@ ToDo:
|
|||||||
|
|
||||||
*********************************************************************************************/
|
*********************************************************************************************/
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "includes/wpc_flip1.h"
|
#include "includes/wpc_dot.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "speaker.h"
|
#include "speaker.h"
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ ToDo:
|
|||||||
|
|
||||||
*********************************************************************************************/
|
*********************************************************************************************/
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "includes/wpc_flip2.h"
|
#include "includes/wpc_dot.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "speaker.h"
|
#include "speaker.h"
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ protected:
|
|||||||
required_memory_bank_array<6> m_dmdbanks;
|
required_memory_bank_array<6> m_dmdbanks;
|
||||||
|
|
||||||
// driver_device overrides
|
// driver_device overrides
|
||||||
|
virtual void machine_start() override;
|
||||||
virtual void machine_reset() override;
|
virtual void machine_reset() override;
|
||||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param) override;
|
virtual void device_timer(emu_timer &timer, device_timer_id id, int param) override;
|
||||||
static const device_timer_id TIMER_VBLANK = 0;
|
static const device_timer_id TIMER_VBLANK = 0;
|
||||||
@ -61,13 +62,41 @@ protected:
|
|||||||
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint16_t m_vblank_count;
|
uint16_t m_vblank_count = 0U;
|
||||||
uint32_t m_irq_count;
|
uint32_t m_irq_count = 0U;
|
||||||
uint8_t m_bankmask;
|
uint8_t m_bankmask = 0U;
|
||||||
uint8_t m_ram[0x3000];
|
uint8_t m_ram[0x3000]{};
|
||||||
uint8_t m_dmdram[0x2000];
|
uint8_t m_dmdram[0x2000]{};
|
||||||
emu_timer* m_vblank_timer;
|
emu_timer* m_vblank_timer;
|
||||||
emu_timer* m_irq_timer;
|
emu_timer* m_irq_timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class wpc_flip1_state : public wpc_dot_state
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
wpc_flip1_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
|
: wpc_dot_state(mconfig, type, tag)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
void init_wpc_flip1();
|
||||||
|
void wpc_flip1(machine_config &config);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void wpc_flip1_map(address_map &map);
|
||||||
|
};
|
||||||
|
|
||||||
|
class wpc_flip2_state : public wpc_flip1_state
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
wpc_flip2_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
|
: wpc_flip1_state(mconfig, type, tag)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
void init_wpc_flip2();
|
||||||
|
void wpc_flip2(machine_config &config);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void wpc_flip2_map(address_map &map);
|
||||||
|
};
|
||||||
|
|
||||||
#endif // MAME_INCLUDES_WPC_DOT_H
|
#endif // MAME_INCLUDES_WPC_DOT_H
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
// license:BSD-3-Clause
|
|
||||||
// copyright-holders:Barry Rodewald
|
|
||||||
/*
|
|
||||||
* wpc_flip1.h
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MAME_INCLUDES_WPC_FLIP1_H
|
|
||||||
#define MAME_INCLUDES_WPC_FLIP1_H
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "includes/wpc_dot.h"
|
|
||||||
|
|
||||||
class wpc_flip1_state : public wpc_dot_state
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wpc_flip1_state(const machine_config &mconfig, device_type type, const char *tag)
|
|
||||||
: wpc_dot_state(mconfig, type, tag)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
void init_wpc_flip1();
|
|
||||||
void wpc_flip1(machine_config &config);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void wpc_flip1_map(address_map &map);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // MAME_INCLUDES_WPC_FLIP1_H
|
|
@ -1,29 +0,0 @@
|
|||||||
// license:BSD-3-Clause
|
|
||||||
// copyright-holders:Barry Rodewald
|
|
||||||
/*
|
|
||||||
* wpc_flip2.h
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MAME_INCLUDES_WPC_FLIP2_H
|
|
||||||
#define MAME_INCLUDES_WPC_FLIP2_H
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "includes/wpc_flip1.h"
|
|
||||||
|
|
||||||
class wpc_flip2_state : public wpc_flip1_state
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
wpc_flip2_state(const machine_config &mconfig, device_type type, const char *tag)
|
|
||||||
: wpc_flip1_state(mconfig, type, tag)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
void init_wpc_flip2();
|
|
||||||
void wpc_flip2(machine_config &config);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void wpc_flip2_map(address_map &map);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // MAME_INCLUDES_WPC_FLIP2_H
|
|
Loading…
Reference in New Issue
Block a user