mirror of
https://github.com/holub/mame
synced 2025-05-22 13:48:55 +03:00
Port from MESS, nw
This commit is contained in:
parent
40ac372de6
commit
0dd4dbb2a2
@ -1999,14 +1999,13 @@ static MACHINE_CONFIG_START( saturn, saturn_state )
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 11289600) //11.2896 MHz
|
||||
MCFG_CPU_PROGRAM_MAP(sound_mem)
|
||||
|
||||
MCFG_TIMER_ADD_PERIODIC("sh1_cmd", stv_sh1_sim, attotime::from_hz(16667))
|
||||
|
||||
MCFG_MACHINE_START(saturn)
|
||||
MCFG_MACHINE_RESET(saturn)
|
||||
|
||||
MCFG_NVRAM_HANDLER(saturn)
|
||||
|
||||
MCFG_TIMER_ADD("sector_timer", stv_sector_cb)
|
||||
MCFG_TIMER_ADD("sh1_cmd", stv_sh1_sim)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
@ -2051,14 +2050,13 @@ static MACHINE_CONFIG_START( stv, saturn_state )
|
||||
MCFG_CPU_ADD("audiocpu", M68000, 11289600) //11.2896 MHz
|
||||
MCFG_CPU_PROGRAM_MAP(sound_mem)
|
||||
|
||||
MCFG_TIMER_ADD_PERIODIC("sh1_cmd", stv_sh1_sim, attotime::from_hz(16667))
|
||||
|
||||
MCFG_MACHINE_START(stv)
|
||||
MCFG_MACHINE_RESET(stv)
|
||||
|
||||
MCFG_EEPROM_93C46_ADD("eeprom") /* Actually 93c45 */
|
||||
|
||||
MCFG_TIMER_ADD("sector_timer", stv_sector_cb)
|
||||
MCFG_TIMER_ADD("sh1_cmd", stv_sh1_sim)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
|
||||
|
@ -209,5 +209,3 @@ WRITE32_HANDLER ( saturn_vdp2_regs_w );
|
||||
|
||||
VIDEO_START ( stv_vdp2 );
|
||||
SCREEN_UPDATE( stv_vdp2 );
|
||||
|
||||
TIMER_DEVICE_CALLBACK( stv_sh1_sim );
|
||||
|
@ -106,6 +106,7 @@ typedef enum
|
||||
|
||||
// local variables
|
||||
static timer_device *sector_timer;
|
||||
static timer_device *sh1_timer;
|
||||
static partitionT partitions[MAX_FILTERS];
|
||||
static partitionT *transpart;
|
||||
|
||||
@ -1196,6 +1197,8 @@ static void cd_exec_command(running_machine &machine)
|
||||
|
||||
TIMER_DEVICE_CALLBACK( stv_sh1_sim )
|
||||
{
|
||||
sh1_timer->adjust(attotime::from_hz(16667));
|
||||
|
||||
if(cmd_pending)
|
||||
{
|
||||
cd_exec_command(timer.machine());
|
||||
@ -1301,6 +1304,8 @@ void stvcd_reset(running_machine &machine)
|
||||
|
||||
sector_timer = machine.device<timer_device>("sector_timer");
|
||||
sector_timer->adjust(attotime::from_hz(150)); // 150 sectors / second = 300kBytes/second
|
||||
sh1_timer = machine.device<timer_device>("sh1_cmd");
|
||||
sh1_timer->adjust(attotime::from_hz(16667));
|
||||
}
|
||||
|
||||
static blockT *cd_alloc_block(UINT8 *blknum)
|
||||
@ -1626,6 +1631,8 @@ static void cd_writeWord(running_machine &machine, UINT32 addr, UINT16 data)
|
||||
case 0x0026:
|
||||
// CDROM_LOG(("WW CR4: %04x\n", data))
|
||||
cr4 = data;
|
||||
sh1_timer->reset();
|
||||
sh1_timer->adjust(attotime::from_hz(16667));
|
||||
break;
|
||||
default:
|
||||
CDROM_LOG(("CD: WW %08x %04x\n", addr, data))
|
||||
|
@ -13,6 +13,7 @@ void stvcd_reset(running_machine& machine);
|
||||
void stvcd_exit(running_machine& machine);
|
||||
|
||||
TIMER_DEVICE_CALLBACK( stv_sector_cb );
|
||||
TIMER_DEVICE_CALLBACK( stv_sh1_sim );
|
||||
|
||||
READ32_HANDLER( stvcd_r );
|
||||
WRITE32_HANDLER( stvcd_w );
|
||||
|
Loading…
Reference in New Issue
Block a user