removed MCFG_LR35902_RESET_VALUES

This commit is contained in:
Michaël Banaan Ananas 2014-06-14 19:43:08 +00:00
parent d899e20c9b
commit b3ecf73db3
3 changed files with 2 additions and 33 deletions

View File

@ -79,7 +79,6 @@ lr35902_cpu_device::lr35902_cpu_device(const machine_config &mconfig, const char
, m_timer_func(*this)
, m_enable(0)
, m_features(0)
, c_regs(NULL)
{
}
@ -194,11 +193,6 @@ void lr35902_cpu_device::state_string_export(const device_state_entry &entry, as
}
}
/*** Reset lr353902 registers: ******************************/
/*** This function can be used to reset the register ***/
/*** file before starting execution with lr35902_execute(cpustate)***/
/*** It sets the registers to their initial values. ***/
/************************************************************/
void lr35902_cpu_device::device_reset()
{
m_A = 0x00;
@ -211,18 +205,6 @@ void lr35902_cpu_device::device_reset()
m_L = 0x00;
m_SP = 0x0000;
m_PC = 0x0000;
if ( c_regs ) {
m_A = c_regs[0] >> 8;
m_F = c_regs[0] & 0xFF;
m_B = c_regs[1] >> 8;
m_C = c_regs[1] & 0xFF;
m_D = c_regs[2] >> 8;
m_E = c_regs[2] & 0xFF;
m_H = c_regs[3] >> 8;
m_L = c_regs[3] & 0xFF;
m_SP = c_regs[4];
m_PC = c_regs[5];
}
m_enable = 0;
m_IE = 0;

View File

@ -8,9 +8,6 @@
lr35902_cpu_device::set_timer_cb(*device, DEVCB_##_devcb);
#define MCFG_LR35902_HALT_BUG \
lr35902_cpu_device::set_halt_bug(*device);
// This should be removed/improved once all gameboy boot roms have been dumped
#define MCFG_LR35902_RESET_VALUES(_regs) \
lr35902_cpu_device::set_reset_values(*device, _regs);
enum
{
@ -32,7 +29,6 @@ public:
// static configuration helpers
template<class _Object> static devcb_base &set_timer_cb(device_t &device, _Object object) { return downcast<lr35902_cpu_device &>(device).m_timer_func.set_callback(object); }
static void set_halt_bug(device_t &device) { downcast<lr35902_cpu_device &>(device).m_features |= LR35902_FEATURE_HALT_BUG; }
static void set_reset_values(device_t &device, const UINT16 *regs) { downcast<lr35902_cpu_device &>(device).c_regs = regs; }
UINT8 get_speed();
void set_speed( UINT8 speed_request );
@ -108,8 +104,6 @@ protected:
int m_enable;
int m_doHALTbug;
UINT8 m_features;
const UINT16 *c_regs;
const struct lr35902_config *m_config;
};
extern const device_type LR35902;

View File

@ -425,10 +425,6 @@ space. This mapper uses 32KB sized banks.
#include "bus/gameboy/mbc.h"
/* Initial value of the cpu registers (hacks until we get bios dumps) */
static const UINT16 megaduck_cpu_regs[6] = { 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFE, 0x0000 }; /* Megaduck */
READ8_MEMBER(gb_state::gb_cart_r)
{
if (m_bios_disable && m_cartslot)
@ -827,7 +823,6 @@ static MACHINE_CONFIG_START( megaduck, megaduck_state )
MCFG_CPU_PROGRAM_MAP( megaduck_map)
MCFG_LR35902_TIMER_CB( WRITE8( gb_state, gb_timer_callback ) )
MCFG_LR35902_HALT_BUG
MCFG_LR35902_RESET_VALUES(megaduck_cpu_regs)
/* video hardware */
MCFG_SCREEN_ADD("screen", LCD)
@ -899,7 +894,5 @@ CONS( 1994, supergb, gameboy, 0, supergb, gameboy, driver_device, 0,
CONS( 1996, gbpocket, gameboy, 0, gbpocket, gameboy, driver_device, 0, "Nintendo", "Game Boy Pocket", GAME_SUPPORTS_SAVE )
CONS( 1998, gbcolor, gameboy, 0, gbcolor, gameboy, driver_device, 0, "Nintendo", "Game Boy Color", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
/* Sound is not 100% yet, it generates some sounds which could be ok. Since we're lacking a real
system there's no way to verify. Same goes for the colors of the LCD. We are no using the default
Game Boy green colors */
CONS( 1993, megaduck, 0, 0, megaduck, gameboy, driver_device, 0, "Creatronic/Videojet/Timlex/Cougar", "MegaDuck/Cougar Boy" , GAME_SUPPORTS_SAVE )
// Sound is not 100% yet, it generates some sounds which could be ok. Since we're lacking a real system there's no way to verify.
CONS( 1993, megaduck, 0, 0, megaduck, gameboy, driver_device, 0, "Welback Holdings (Timlex International) / Creatronic / Videojet / Cougar USA", "Mega Duck / Cougar Boy", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )