cosmicg: Using new TMS9980 implementation [Michael Zapf]
This commit is contained in:
parent
f503c9a88c
commit
957a6fd0e6
@ -33,7 +33,7 @@ cosmicg - board can operate in b&w mode if there is no PROM, in this case
|
|||||||
|
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/tms9900/tms9900l.h"
|
#include "cpu/tms9900/tms9980a.h"
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "sound/samples.h"
|
#include "sound/samples.h"
|
||||||
#include "sound/dac.h"
|
#include "sound/dac.h"
|
||||||
@ -528,7 +528,8 @@ INPUT_PORTS_END
|
|||||||
|
|
||||||
INPUT_CHANGED_MEMBER(cosmic_state::cosmicg_coin_inserted)
|
INPUT_CHANGED_MEMBER(cosmic_state::cosmicg_coin_inserted)
|
||||||
{
|
{
|
||||||
m_maincpu->set_input_line_and_vector(0, newval ? ASSERT_LINE : CLEAR_LINE, 6);
|
m_ic_state = 6;
|
||||||
|
m_maincpu->set_input_line(0, newval? ASSERT_LINE : CLEAR_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static INPUT_PORTS_START( cosmicg )
|
static INPUT_PORTS_START( cosmicg )
|
||||||
@ -980,6 +981,19 @@ MACHINE_RESET_MEMBER(cosmic_state,cosmic)
|
|||||||
m_color_registers[2] = 0;
|
m_color_registers[2] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MACHINE_RESET_MEMBER(cosmic_state,cosmicg)
|
||||||
|
{
|
||||||
|
m_pixel_clock = 0;
|
||||||
|
m_background_enable = 0;
|
||||||
|
m_color_registers[0] = 0;
|
||||||
|
m_color_registers[1] = 0;
|
||||||
|
m_color_registers[2] = 0;
|
||||||
|
|
||||||
|
// For TMS 9980
|
||||||
|
m_ic_state = 0; // RESET
|
||||||
|
m_maincpu->set_input_line(0, ASSERT_LINE);
|
||||||
|
m_ic_state = 7; // CLEAR
|
||||||
|
}
|
||||||
|
|
||||||
static MACHINE_CONFIG_START( cosmic, cosmic_state )
|
static MACHINE_CONFIG_START( cosmic, cosmic_state )
|
||||||
|
|
||||||
@ -1059,20 +1073,36 @@ static MACHINE_CONFIG_DERIVED( cosmica, cosmic )
|
|||||||
|
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
|
/*
|
||||||
|
Will be called back from the CPU when triggering an interrupt.
|
||||||
|
*/
|
||||||
|
READ8_MEMBER( cosmic_state::interrupt_level )
|
||||||
|
{
|
||||||
|
return m_ic_state;
|
||||||
|
}
|
||||||
|
|
||||||
|
static TMS99xx_CONFIG( cpuconf )
|
||||||
|
{
|
||||||
|
DEVCB_NULL,
|
||||||
|
DEVCB_DRIVER_MEMBER(cosmic_state, interrupt_level),
|
||||||
|
DEVCB_NULL, // Instruction acquisition
|
||||||
|
DEVCB_NULL, // Clock out
|
||||||
|
DEVCB_NULL, // wait
|
||||||
|
DEVCB_NULL, // Hold acknowledge
|
||||||
|
DEVCB_NULL // DBIN
|
||||||
|
};
|
||||||
|
|
||||||
static MACHINE_CONFIG_START( cosmicg, cosmic_state )
|
static MACHINE_CONFIG_START( cosmicg, cosmic_state )
|
||||||
|
|
||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD("maincpu", TMS9980L, COSMICG_MASTER_CLOCK/8)
|
MCFG_TMS99xx_ADD("maincpu", TMS9980A, COSMICG_MASTER_CLOCK/8, cosmicg_map, cosmicg_io_map, cpuconf)
|
||||||
/* 9.828 MHz Crystal */
|
/* 9.828 MHz Crystal */
|
||||||
/* R Nabet : huh ? This would imply the crystal frequency is somehow divided by 2 before being
|
/* R Nabet : huh ? This would imply the crystal frequency is somehow divided by 2 before being
|
||||||
fed to the tms9904 or tms9980. Also, I have never heard of a tms9900/9980 operating under
|
fed to the tms9904 or tms9980. Also, I have never heard of a tms9900/9980 operating under
|
||||||
1.5MHz. So, if someone can check this... */
|
1.5MHz. So, if someone can check this... */
|
||||||
MCFG_CPU_PROGRAM_MAP(cosmicg_map)
|
|
||||||
MCFG_CPU_IO_MAP(cosmicg_io_map)
|
|
||||||
|
|
||||||
MCFG_MACHINE_START_OVERRIDE(cosmic_state,cosmic)
|
MCFG_MACHINE_START_OVERRIDE(cosmic_state,cosmic)
|
||||||
MCFG_MACHINE_RESET_OVERRIDE(cosmic_state,cosmic)
|
MCFG_MACHINE_RESET_OVERRIDE(cosmic_state,cosmicg)
|
||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
MCFG_SCREEN_ADD("screen", RASTER)
|
MCFG_SCREEN_ADD("screen", RASTER)
|
||||||
@ -1569,8 +1599,8 @@ DRIVER_INIT_MEMBER(cosmic_state,panic)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GAME( 1979, cosmicg, 0, cosmicg, cosmicg, cosmic_state, cosmicg, ROT270, "Universal", "Cosmic Guerilla", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
|
GAME( 1979, cosmicg, 0, cosmicg, cosmicg, cosmic_state, cosmicg, ROT270, "Universal", "Cosmic Guerilla", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL )
|
||||||
GAME( 1979, cosmicgi, cosmicg, cosmicg, cosmicg, cosmic_state, cosmicg, ROT270, "bootleg (Inder)", "Cosmic Guerilla (Spanish bootleg)", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
|
GAME( 1979, cosmicgi, cosmicg, cosmicg, cosmicg, cosmic_state, cosmicg, ROT270, "bootleg (Inder)", "Cosmic Guerilla (Spanish bootleg)", GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL )
|
||||||
GAME( 1979, cosmica, 0, cosmica, cosmica, cosmic_state, cosmica, ROT270, "Universal", "Cosmic Alien (version II)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
GAME( 1979, cosmica, 0, cosmica, cosmica, cosmic_state, cosmica, ROT270, "Universal", "Cosmic Alien (version II)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
||||||
GAME( 1979, cosmica1, cosmica, cosmica, cosmica, cosmic_state, cosmica, ROT270, "Universal", "Cosmic Alien (first version)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
GAME( 1979, cosmica1, cosmica, cosmica, cosmica, cosmic_state, cosmica, ROT270, "Universal", "Cosmic Alien (first version)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
||||||
GAME( 1979, cosmica2, cosmica, cosmica, cosmica, cosmic_state, cosmica, ROT270, "Universal", "Cosmic Alien (early version II?)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
GAME( 1979, cosmica2, cosmica, cosmica, cosmica, cosmic_state, cosmica, ROT270, "Universal", "Cosmic Alien (early version II?)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
||||||
|
@ -40,6 +40,8 @@ public:
|
|||||||
|
|
||||||
/* misc */
|
/* misc */
|
||||||
UINT32 m_pixel_clock;
|
UINT32 m_pixel_clock;
|
||||||
|
int m_ic_state; // for 9980
|
||||||
|
DECLARE_READ8_MEMBER( interrupt_level );
|
||||||
|
|
||||||
/* devices */
|
/* devices */
|
||||||
optional_device<samples_device> m_samples;
|
optional_device<samples_device> m_samples;
|
||||||
@ -67,6 +69,7 @@ public:
|
|||||||
DECLARE_DRIVER_INIT(panic);
|
DECLARE_DRIVER_INIT(panic);
|
||||||
DECLARE_MACHINE_START(cosmic);
|
DECLARE_MACHINE_START(cosmic);
|
||||||
DECLARE_MACHINE_RESET(cosmic);
|
DECLARE_MACHINE_RESET(cosmic);
|
||||||
|
DECLARE_MACHINE_RESET(cosmicg);
|
||||||
DECLARE_PALETTE_INIT(cosmicg);
|
DECLARE_PALETTE_INIT(cosmicg);
|
||||||
DECLARE_PALETTE_INIT(panic);
|
DECLARE_PALETTE_INIT(panic);
|
||||||
DECLARE_PALETTE_INIT(cosmica);
|
DECLARE_PALETTE_INIT(cosmica);
|
||||||
|
Loading…
Reference in New Issue
Block a user