mirror of
https://github.com/holub/mame
synced 2025-06-16 17:29:27 +03:00
taitopjc.c: simulate DSP boot. (nw)
This commit is contained in:
parent
af10577a30
commit
626aed8fab
@ -93,6 +93,8 @@ public:
|
|||||||
UINT32 screen_update_taitopjc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_taitopjc(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||||
|
|
||||||
DECLARE_DRIVER_INIT(optiger);
|
DECLARE_DRIVER_INIT(optiger);
|
||||||
|
|
||||||
|
UINT16 m_dsp_ram[0x1000];
|
||||||
};
|
};
|
||||||
|
|
||||||
void taitopjc_state::video_start()
|
void taitopjc_state::video_start()
|
||||||
@ -211,20 +213,6 @@ WRITE64_MEMBER(taitopjc_state::video_w)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
static UINT16 com_ram[256] =
|
|
||||||
{
|
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
|
||||||
0x434F, 0x4D4E, 0x4F4B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // COMNOK
|
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
|
||||||
0x574F, 0x524B, 0x4F4B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // WORKOK
|
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
|
||||||
0x5355, 0x4E44, 0x4F4B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // SUNDOK
|
|
||||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
READ64_MEMBER(taitopjc_state::ppc_common_r)
|
READ64_MEMBER(taitopjc_state::ppc_common_r)
|
||||||
{
|
{
|
||||||
UINT64 r = 0;
|
UINT64 r = 0;
|
||||||
@ -263,36 +251,35 @@ READ64_MEMBER(taitopjc_state::ppc_common_r)
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT32 dsp_value = 0x4f4b0000;
|
|
||||||
|
|
||||||
static UINT16 dsp_ram[0x1000];
|
|
||||||
|
|
||||||
READ64_MEMBER(taitopjc_state::dsp_r)
|
READ64_MEMBER(taitopjc_state::dsp_r)
|
||||||
{
|
{
|
||||||
UINT64 r = 0;
|
UINT64 r = 0;
|
||||||
|
|
||||||
if (offset == 0x7fe)
|
if (ACCESSING_BITS_48_63)
|
||||||
{
|
{
|
||||||
if (!(mem_mask & U64(0xffffffff00000000)))
|
int addr = offset * 2;
|
||||||
{
|
r |= (UINT64)(m_dsp_ram[addr+0]) << 48;
|
||||||
r |= (UINT64)(dsp_value) << 32;
|
|
||||||
}
|
}
|
||||||
|
if (ACCESSING_BITS_16_31)
|
||||||
|
{
|
||||||
|
int addr = offset * 2;
|
||||||
|
r |= (UINT64)(m_dsp_ram[addr+1]) << 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE64_MEMBER(taitopjc_state::dsp_w)
|
WRITE64_MEMBER(taitopjc_state::dsp_w)
|
||||||
|
{
|
||||||
|
printf("dsp_w: %08X, %08X%08X, %08X%08X\n", offset, (UINT32)(data >> 32), (UINT32)(data), (UINT32)(mem_mask >> 32), (UINT32)(mem_mask));
|
||||||
|
|
||||||
|
if (offset != 0x7fe)
|
||||||
{
|
{
|
||||||
logerror("dsp_w: %08X, %08X%08X, %08X%08X\n", offset, (UINT32)(data >> 32), (UINT32)(data), (UINT32)(mem_mask >> 32), (UINT32)(mem_mask));
|
logerror("dsp_w: %08X, %08X%08X, %08X%08X\n", offset, (UINT32)(data >> 32), (UINT32)(data), (UINT32)(mem_mask >> 32), (UINT32)(mem_mask));
|
||||||
|
}
|
||||||
|
|
||||||
if (offset == 0x7fe)
|
if (offset == 0x7fe)
|
||||||
{
|
{
|
||||||
if (!(mem_mask & U64(0xffffffff00000000)))
|
|
||||||
{
|
|
||||||
dsp_value = data >> 32;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -307,15 +294,34 @@ WRITE64_MEMBER(taitopjc_state::dsp_w)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(mem_mask & U64(0xffff000000000000)))
|
if (ACCESSING_BITS_48_63)
|
||||||
{
|
{
|
||||||
int addr = offset * 2;
|
int addr = offset * 2;
|
||||||
dsp_ram[addr+0] = (data >> 48) & 0xffff;
|
m_dsp_ram[addr+0] = (data >> 48) & 0xffff;
|
||||||
}
|
}
|
||||||
if (!(mem_mask & U64(0x00000000ffff0000)))
|
if (ACCESSING_BITS_16_31)
|
||||||
{
|
{
|
||||||
int addr = offset * 2;
|
int addr = offset * 2;
|
||||||
dsp_ram[addr+1] = (data >> 16) & 0xffff;
|
m_dsp_ram[addr+1] = (data >> 16) & 0xffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (offset == 0x7fe && ACCESSING_BITS_48_63)
|
||||||
|
{
|
||||||
|
UINT16 w = data >> 48;
|
||||||
|
if (w == 0x4450)
|
||||||
|
{
|
||||||
|
m_dsp_ram[0xffc] = 0;
|
||||||
|
}
|
||||||
|
else if (w == 0x4558)
|
||||||
|
{
|
||||||
|
m_dsp_ram[0xffc] = 0;
|
||||||
|
}
|
||||||
|
else if (w == 0x5349)
|
||||||
|
{
|
||||||
|
m_dsp_ram[0xffc] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,6 +423,8 @@ void taitopjc_state::machine_reset()
|
|||||||
m_soundcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
m_soundcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||||
|
|
||||||
m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||||
|
|
||||||
|
m_dsp_ram[0x0ffc] = 0x4f4b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user