model3: Added Real3D DMA timer. (nw)

This commit is contained in:
Ville Linde 2014-10-12 23:21:22 +00:00
parent 0cc17d08a9
commit cea787b3b6
2 changed files with 24 additions and 6 deletions

View File

@ -25,13 +25,14 @@
lemans24 - works lemans24 - works
vs29815 - massive memory trashing and page faults vs29815 - massive memory trashing and page faults
vs2 - waiting for decrementer (same code as eca) vs2 - works
harley - harley - works, massive slowdown ingame
skichamp - waiting for decrementer skichamp - boots after skipping the drive board errors, massive slowdowns
srally2/sraly2dx - works srally2/sraly2dx - works
von2/von254g - works von2/von254g - works
fvipers2 - waiting for decrementer (same code as eca) fvipers2 - waiting for decrementer (same code as eca)
vs298/vs299/vs2v991 - waiting for decrementer vs298 - works, hangs with an onscreen error code
vs299/vs2v991 - works
oceanhun - same as daytona2 oceanhun - same as daytona2
lamachin - works lamachin - works
@ -42,7 +43,7 @@
swtrilgy - swtrilgy -
swtrilga - swtrilga -
magtruck - works magtruck - works
eca/ecax - waiting for decrementer eca/ecax - cabinet network error
=================================================================================== ===================================================================================
@ -1074,7 +1075,7 @@ READ64_MEMBER(model3_state::real3d_dma_r)
switch(offset) switch(offset)
{ {
case 1: case 1:
return (m_dma_irq << 24) | (m_dma_endian << 8); return (m_dma_irq << 24) | (m_dma_endian << 8) | m_dma_busy;
case 2: case 2:
if(ACCESSING_BITS_0_31) { if(ACCESSING_BITS_0_31) {
return m_dma_data; return m_dma_data;
@ -1139,6 +1140,8 @@ WRITE64_MEMBER(model3_state::real3d_dma_w)
m_dma_status ^= 0xffffffff; m_dma_status ^= 0xffffffff;
m_dma_data = m_dma_status; m_dma_data = m_dma_status;
} }
m_dma_busy = 0x80000000;
m_real3d_dma_timer->adjust(attotime::from_nsec(20000));
return; return;
} }
if(ACCESSING_BITS_0_31) { /* ??? */ if(ACCESSING_BITS_0_31) { /* ??? */
@ -1200,29 +1203,38 @@ TIMER_CALLBACK_MEMBER(model3_state::model3_sound_timer_tick)
} }
} }
TIMER_CALLBACK_MEMBER(model3_state::real3d_dma_timer_callback)
{
m_dma_busy = 0;
}
MACHINE_START_MEMBER(model3_state,model3_10) MACHINE_START_MEMBER(model3_state,model3_10)
{ {
configure_fast_ram(machine()); configure_fast_ram(machine());
m_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::model3_sound_timer_tick),this)); m_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::model3_sound_timer_tick),this));
m_real3d_dma_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::real3d_dma_timer_callback),this));
} }
MACHINE_START_MEMBER(model3_state,model3_15) MACHINE_START_MEMBER(model3_state,model3_15)
{ {
configure_fast_ram(machine()); configure_fast_ram(machine());
m_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::model3_sound_timer_tick),this)); m_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::model3_sound_timer_tick),this));
m_real3d_dma_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::real3d_dma_timer_callback),this));
} }
MACHINE_START_MEMBER(model3_state,model3_20) MACHINE_START_MEMBER(model3_state,model3_20)
{ {
configure_fast_ram(machine()); configure_fast_ram(machine());
m_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::model3_sound_timer_tick),this)); m_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::model3_sound_timer_tick),this));
m_real3d_dma_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::real3d_dma_timer_callback),this));
} }
MACHINE_START_MEMBER(model3_state,model3_21) MACHINE_START_MEMBER(model3_state,model3_21)
{ {
configure_fast_ram(machine()); configure_fast_ram(machine());
m_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::model3_sound_timer_tick),this)); m_sound_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::model3_sound_timer_tick),this));
m_real3d_dma_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(model3_state::real3d_dma_timer_callback),this));
} }
void model3_state::model3_init(int step) void model3_state::model3_init(int step)
@ -1232,6 +1244,9 @@ void model3_state::model3_init(int step)
m_sound_irq_enable = 0; m_sound_irq_enable = 0;
m_sound_timer->adjust(attotime::never); m_sound_timer->adjust(attotime::never);
m_dma_busy = 0;
m_real3d_dma_timer->adjust(attotime::never);
membank("bank1")->set_base(memregion( "user1" )->base() + 0x800000 ); /* banked CROM */ membank("bank1")->set_base(memregion( "user1" )->base() + 0x800000 ); /* banked CROM */
membank("bank4")->set_base(memregion("samples")->base() + 0x200000); membank("bank4")->set_base(memregion("samples")->base() + 0x200000);

View File

@ -104,6 +104,7 @@ public:
int m_sound_irq_enable; int m_sound_irq_enable;
emu_timer *m_sound_timer; emu_timer *m_sound_timer;
emu_timer *m_real3d_dma_timer;
UINT8 m_irq_enable; UINT8 m_irq_enable;
UINT8 m_irq_state; UINT8 m_irq_state;
UINT8 m_scsi_irq_state; UINT8 m_scsi_irq_state;
@ -126,6 +127,7 @@ public:
UINT32 m_dma_dest; UINT32 m_dma_dest;
UINT32 m_dma_endian; UINT32 m_dma_endian;
UINT32 m_dma_irq; UINT32 m_dma_irq;
UINT32 m_dma_busy;
UINT64 m_controls_2; UINT64 m_controls_2;
UINT64 m_controls_3; UINT64 m_controls_3;
UINT8 m_serial_fifo1; UINT8 m_serial_fifo1;
@ -269,6 +271,7 @@ public:
DECLARE_MACHINE_START(model3_21); DECLARE_MACHINE_START(model3_21);
DECLARE_MACHINE_RESET(model3_21); DECLARE_MACHINE_RESET(model3_21);
TIMER_CALLBACK_MEMBER(model3_sound_timer_tick); TIMER_CALLBACK_MEMBER(model3_sound_timer_tick);
TIMER_CALLBACK_MEMBER(real3d_dma_timer_callback);
TIMER_DEVICE_CALLBACK_MEMBER(model3_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(model3_interrupt);
void model3_exit(); void model3_exit();
DECLARE_WRITE8_MEMBER(scsp_irq); DECLARE_WRITE8_MEMBER(scsp_irq);