added Tamagotchi generation 1 driver

This commit is contained in:
hap 2015-05-09 21:24:09 +02:00
parent bb3ac09be2
commit 54c88e91e6
7 changed files with 76 additions and 8 deletions

View File

@ -1171,6 +1171,7 @@ createMESSProjects(_target, _subtarget, "bandai")
files {
MAME_DIR .. "src/mess/drivers/sv8000.c",
MAME_DIR .. "src/mess/drivers/rx78.c",
MAME_DIR .. "src/mess/drivers/tamag1.c",
MAME_DIR .. "src/mess/drivers/wswan.c",
MAME_DIR .. "src/mess/audio/wswan_snd.c",
MAME_DIR .. "src/mess/machine/wswan.c",

View File

@ -89,6 +89,8 @@ void e0c6200_cpu_device::device_start()
save_item(NAME(m_f));
// register state for debugger
state_add(STATE_GENPC, "curpc", m_pc).formatstr("%04X").noshow();
state_add(STATE_GENFLAGS, "GENFLAGS", m_f).formatstr("%4s").noshow();
m_icountptr = &m_icount;
}

View File

@ -92,7 +92,7 @@ protected:
inline void set_zf(UINT8 data);
inline void inc_x();
inline void inc_y();
void do_branch(int condition = 0);
void do_branch(int condition = 1);
// opcode handlers
UINT8 op_inc(UINT8 x);

View File

@ -9,23 +9,23 @@
#include "e0c6s46.h"
const device_type EPSON_E0C6S46 = &device_creator<e0c6s46_device>;
const device_type E0C6S46 = &device_creator<e0c6s46_device>;
// internal memory maps
static ADDRESS_MAP_START(program_1k, AS_PROGRAM, 16, e0c6s46_device)
AM_RANGE(0x0000, 0x03ff) AM_ROM
static ADDRESS_MAP_START(e0c6s46_program, AS_PROGRAM, 16, e0c6s46_device)
AM_RANGE(0x0000, 0x17ff) AM_ROM
ADDRESS_MAP_END
static ADDRESS_MAP_START(data_64x4, AS_DATA, 8, e0c6s46_device)
AM_RANGE(0x00, 0x3f) AM_RAM
static ADDRESS_MAP_START(e0c6s46_data, AS_DATA, 8, e0c6s46_device)
AM_RANGE(0x0000, 0x027f) AM_RAM
ADDRESS_MAP_END
// device definitions
e0c6s46_device::e0c6s46_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: e0c6200_cpu_device(mconfig, EPSON_E0C6S46, "E0C6S46", tag, owner, clock, 10, ADDRESS_MAP_NAME(program_1k), 6, ADDRESS_MAP_NAME(data_64x4), "e0c6s46", __FILE__)
: e0c6200_cpu_device(mconfig, E0C6S46, "E0C6S46", tag, owner, clock, 13, ADDRESS_MAP_NAME(e0c6s46_program), 12, ADDRESS_MAP_NAME(e0c6s46_data), "e0c6s46", __FILE__)
{ }

View File

@ -24,6 +24,6 @@ protected:
extern const device_type EPSON_E0C6S46;
extern const device_type E0C6S46;
#endif /* _E0C6S46_H_ */

64
src/mame/drivers/tamag1.c Normal file
View File

@ -0,0 +1,64 @@
// license:BSD-3-Clause
// copyright-holders:hap
/***************************************************************************
Bandai Tamagotchi generation 1 hardware
** SKELETON Driver - feel free to add notes here, but driver itself is WIP
***************************************************************************/
#include "emu.h"
#include "cpu/e0c6200/e0c6s46.h"
#include "sound/speaker.h"
class tamag1_state : public driver_device
{
public:
tamag1_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_speaker(*this, "speaker")
{ }
required_device<cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
};
static INPUT_PORTS_START( tama )
INPUT_PORTS_END
static MACHINE_CONFIG_START( tama, tamag1_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", E0C6S46, 32768)
/* no video! */
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
/***************************************************************************
Game driver(s)
***************************************************************************/
ROM_START( tama )
ROM_REGION( 0x3000, "maincpu", 0 )
ROM_LOAD( "tama.b", 0x0000, 0x3000, CRC(5c864cb1) SHA1(4b4979cf92dc9d2fb6d7295a38f209f3da144f72) )
ROM_END
CONS( 1997, tama, 0, 0, tama, tama, driver_device, 0, "Bandai", "Tamagotchi (USA)", GAME_NOT_WORKING )

View File

@ -2666,3 +2666,4 @@ bitgrpha
bitgrphb
monty
mmonty
tama