mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
note used addresses (nw)
This commit is contained in:
parent
a65c9ef758
commit
bf61c9a5e2
@ -103,25 +103,25 @@ WRITE32_MEMBER( hng64_state::hng64_soundcpu_enable_w )
|
|||||||
// I guess it's only one of the bits, the commands are inverse of each other
|
// I guess it's only one of the bits, the commands are inverse of each other
|
||||||
if (cmd==0x55AA)
|
if (cmd==0x55AA)
|
||||||
{
|
{
|
||||||
printf("soundcpu ON\n");
|
logerror("soundcpu ON\n");
|
||||||
m_audiocpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
|
m_audiocpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
|
||||||
m_audiocpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
m_audiocpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
|
||||||
}
|
}
|
||||||
else if (cmd==0xAA55)
|
else if (cmd==0xAA55)
|
||||||
{
|
{
|
||||||
printf("soundcpu OFF\n");
|
logerror("soundcpu OFF\n");
|
||||||
m_audiocpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
m_audiocpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||||
m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("unknown hng64_soundcpu_enable_w cmd %04x\n", cmd);
|
logerror("unknown hng64_soundcpu_enable_w cmd %04x\n", cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mem_mask&0x0000ffff)
|
if (mem_mask&0x0000ffff)
|
||||||
{
|
{
|
||||||
printf("unknown hng64_soundcpu_enable_w %08x %08x\n", data, mem_mask);
|
logerror("unknown hng64_soundcpu_enable_w %08x %08x\n", data, mem_mask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
WRITE16_MEMBER(hng64_state::hng64_sound_port_0008_w)
|
WRITE16_MEMBER(hng64_state::hng64_sound_port_0008_w)
|
||||||
{
|
{
|
||||||
// printf("hng64_sound_port_0008_w %04x %04x\n", data, mem_mask);
|
// logerror("hng64_sound_port_0008_w %04x %04x\n", data, mem_mask);
|
||||||
// seems to one or more of the DMARQ on the V53, writes here when it expects DMA channel 3 to transfer ~0x20 bytes just after startup
|
// seems to one or more of the DMARQ on the V53, writes here when it expects DMA channel 3 to transfer ~0x20 bytes just after startup
|
||||||
|
|
||||||
|
|
||||||
@ -189,36 +189,57 @@ WRITE16_MEMBER(hng64_state::hng64_sound_port_0008_w)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
READ16_MEMBER(hng64_state::hng64_sound_port_0004_r)
|
||||||
|
{
|
||||||
|
// read in irq5
|
||||||
|
logerror("%08x: hng64_sound_port_0004_r mask (%04x)\n", space.device().safe_pc(), mem_mask);
|
||||||
|
return rand();
|
||||||
|
}
|
||||||
|
|
||||||
|
READ16_MEMBER(hng64_state::hng64_sound_port_0006_r)
|
||||||
|
{
|
||||||
|
// read in irq5
|
||||||
|
logerror("%08x: hng64_sound_port_0006_r mask (%04x)\n", space.device().safe_pc(), mem_mask);
|
||||||
|
return rand();
|
||||||
|
}
|
||||||
|
|
||||||
|
READ16_MEMBER(hng64_state::hng64_sound_port_0008_r)
|
||||||
|
{
|
||||||
|
// read in irq5
|
||||||
|
logerror("%08x: hng64_sound_port_0008_r mask (%04x)\n", space.device().safe_pc(), mem_mask);
|
||||||
|
return rand();
|
||||||
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(hng64_state::hng64_sound_select_w)
|
WRITE16_MEMBER(hng64_state::hng64_sound_select_w)
|
||||||
{
|
{
|
||||||
// seems to write values in the format xxyy where yy is 0x00-0x1f and xx is oten 00/01/0a
|
// seems to write values in the format xxyy where yy is 0x00-0x1f and xx is oten 00/01/0a
|
||||||
// there are said to be 32 audio channels, so maybe the lower byte is the channel?
|
// there are said to be 32 audio channels, so maybe the lower byte is the channel?
|
||||||
|
|
||||||
// printf("hng64_sound_select_w")
|
// logerror("hng64_sound_select_w")
|
||||||
COMBINE_DATA(&m_audiochannel);
|
COMBINE_DATA(&m_audiochannel);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(hng64_state::hng64_sound_data_02_w)
|
WRITE16_MEMBER(hng64_state::hng64_sound_data_02_w)
|
||||||
{
|
{
|
||||||
m_audiodat[m_audiochannel].dat[2] = data;
|
m_audiodat[m_audiochannel].dat[2] = data;
|
||||||
// printf("write port 0x0002 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]);
|
// logerror("write port 0x0002 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(hng64_state::hng64_sound_data_04_w)
|
WRITE16_MEMBER(hng64_state::hng64_sound_data_04_w)
|
||||||
{
|
{
|
||||||
m_audiodat[m_audiochannel].dat[1] = data;
|
m_audiodat[m_audiochannel].dat[1] = data;
|
||||||
// printf("write port 0x0004 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]);
|
// logerror("write port 0x0004 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]);
|
||||||
}
|
}
|
||||||
WRITE16_MEMBER(hng64_state::hng64_sound_data_06_w)
|
WRITE16_MEMBER(hng64_state::hng64_sound_data_06_w)
|
||||||
{
|
{
|
||||||
m_audiodat[m_audiochannel].dat[0] = data;
|
m_audiodat[m_audiochannel].dat[0] = data;
|
||||||
// printf("write port 0x0006 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]);
|
// logerror("write port 0x0006 chansel %04x data %04x (%04x%04x%04x)\n", m_audiochannel, data, m_audiodat[m_audiochannel].dat[0], m_audiodat[m_audiochannel].dat[1], m_audiodat[m_audiochannel].dat[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// but why not just use the V33/V53 XA mode??
|
// but why not just use the V33/V53 XA mode??
|
||||||
WRITE16_MEMBER(hng64_state::hng64_sound_bank_w)
|
WRITE16_MEMBER(hng64_state::hng64_sound_bank_w)
|
||||||
{
|
{
|
||||||
printf("%08x hng64_sound_bank_w? %02x %04x\n", space.device().safe_pc(), offset, data);
|
logerror("%08x hng64_sound_bank_w? %02x %04x\n", space.device().safe_pc(), offset, data);
|
||||||
// buriki writes 0x3f to 0x200 before jumping to the low addresses..
|
// buriki writes 0x3f to 0x200 before jumping to the low addresses..
|
||||||
// where it expects to find data from 0x1f0000
|
// where it expects to find data from 0x1f0000
|
||||||
|
|
||||||
@ -247,27 +268,75 @@ WRITE16_MEMBER(hng64_state::hng64_sound_bank_w)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WRITE16_MEMBER(hng64_state::hng64_sound_port_000a_w)
|
||||||
|
{
|
||||||
|
logerror("%08x: hng64_port hng64_sound_port_000a_w %04x mask (%04x)\n", space.device().safe_pc(), data, mem_mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE16_MEMBER(hng64_state::hng64_sound_port_000c_w)
|
||||||
|
{
|
||||||
|
logerror("%08x: hng64_port hng64_sound_port_000c_w %04x mask (%04x)\n", space.device().safe_pc(), data, mem_mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
WRITE16_MEMBER(hng64_state::hng64_sound_port_0102_w)
|
WRITE16_MEMBER(hng64_state::hng64_sound_port_0102_w)
|
||||||
{
|
{
|
||||||
printf("hng64_port 0x0102 %04x\n", data);
|
logerror("hng64_port 0x0102 %04x\n", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(hng64_state::hng64_sound_port_0080_w)
|
WRITE16_MEMBER(hng64_state::hng64_sound_port_0080_w)
|
||||||
{
|
{
|
||||||
printf("hng64_port 0x0080 %04x\n", data);
|
logerror("hng64_port 0x0080 %04x\n", data);
|
||||||
|
}
|
||||||
|
|
||||||
|
READ16_MEMBER(hng64_state::hng64_sound_port_0106_r)
|
||||||
|
{
|
||||||
|
// read in irq5
|
||||||
|
logerror("%08x: hng64_sound_port_0106_r mask (%04x)\n", space.device().safe_pc(), mem_mask);
|
||||||
|
return rand();
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE16_MEMBER(hng64_state::hng64_sound_port_010a_w)
|
||||||
|
{
|
||||||
|
logerror("%08x: hng64_port hng64_sound_port_010a_w %04x mask (%04x)\n", space.device().safe_pc(), data, mem_mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE16_MEMBER(hng64_state::hng64_sound_port_0108_w)
|
||||||
|
{
|
||||||
|
logerror("%08x: hng64_port hng64_sound_port_0108_w %04x mask (%04x)\n", space.device().safe_pc(), data, mem_mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WRITE16_MEMBER(hng64_state::hng64_sound_port_0100_w)
|
||||||
|
{
|
||||||
|
logerror("%08x: hng64_port hng64_sound_port_0100_w %04x mask (%04x)\n", space.device().safe_pc(), data, mem_mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
READ16_MEMBER(hng64_state::hng64_sound_port_0104_r)
|
||||||
|
{
|
||||||
|
// read in irq5
|
||||||
|
logerror("%08x: hng64_sound_port_0104_r mask (%04x)\n", space.device().safe_pc(), mem_mask);
|
||||||
|
return rand();
|
||||||
}
|
}
|
||||||
|
|
||||||
static ADDRESS_MAP_START( hng_sound_io, AS_IO, 16, hng64_state )
|
static ADDRESS_MAP_START( hng_sound_io, AS_IO, 16, hng64_state )
|
||||||
AM_RANGE(0x0000, 0x0001) AM_WRITE( hng64_sound_select_w )
|
AM_RANGE(0x0000, 0x0001) AM_WRITE( hng64_sound_select_w )
|
||||||
AM_RANGE(0x0002, 0x0003) AM_WRITE( hng64_sound_data_02_w )
|
AM_RANGE(0x0002, 0x0003) AM_WRITE( hng64_sound_data_02_w )
|
||||||
AM_RANGE(0x0004, 0x0005) AM_WRITE( hng64_sound_data_04_w )
|
AM_RANGE(0x0004, 0x0005) AM_READWRITE( hng64_sound_port_0004_r, hng64_sound_data_04_w )
|
||||||
AM_RANGE(0x0006, 0x0007) AM_WRITE( hng64_sound_data_06_w )
|
AM_RANGE(0x0006, 0x0007) AM_READWRITE( hng64_sound_port_0006_r, hng64_sound_data_06_w )
|
||||||
AM_RANGE(0x0008, 0x0009) AM_WRITE( hng64_sound_port_0008_w )
|
AM_RANGE(0x0008, 0x0009) AM_READWRITE( hng64_sound_port_0008_r, hng64_sound_port_0008_w )
|
||||||
// a 8 c used too?
|
AM_RANGE(0x000a, 0x000b) AM_WRITE( hng64_sound_port_000a_w )
|
||||||
|
AM_RANGE(0x000c, 0x000d) AM_WRITE( hng64_sound_port_000c_w )
|
||||||
|
|
||||||
AM_RANGE(0x0080, 0x0081) AM_WRITE( hng64_sound_port_0080_w )
|
AM_RANGE(0x0080, 0x0081) AM_WRITE( hng64_sound_port_0080_w )
|
||||||
|
|
||||||
AM_RANGE(0x0102, 0x0103) AM_WRITE( hng64_sound_port_0102_w )
|
AM_RANGE(0x0100, 0x0101) AM_WRITE( hng64_sound_port_0100_w )
|
||||||
|
AM_RANGE(0x0102, 0x0103) AM_WRITE( hng64_sound_port_0102_w ) // gets values of 0x0080 / 0x0081 / 0x0000 / 0x0001 depending on return from 0x0106 in irq5?
|
||||||
|
AM_RANGE(0x0104, 0x0105) AM_READ( hng64_sound_port_0104_r )
|
||||||
|
AM_RANGE(0x0106, 0x0107) AM_READ( hng64_sound_port_0106_r )
|
||||||
|
AM_RANGE(0x0108, 0x0109) AM_WRITE( hng64_sound_port_0108_w )
|
||||||
|
AM_RANGE(0x010a, 0x010b) AM_WRITE( hng64_sound_port_010a_w )
|
||||||
|
|
||||||
AM_RANGE(0x0200, 0x021f) AM_WRITE( hng64_sound_bank_w ) // ??
|
AM_RANGE(0x0200, 0x021f) AM_WRITE( hng64_sound_bank_w ) // ??
|
||||||
|
|
||||||
@ -288,26 +357,27 @@ WRITE8_MEMBER(hng64_state::dma_iow3_cb)
|
|||||||
// currently it reads a block of 0x20 '0x00' values from a very specific block of RAM where there is a 0x20 space in the data and transfers them repeatedly, I assume
|
// currently it reads a block of 0x20 '0x00' values from a very specific block of RAM where there is a 0x20 space in the data and transfers them repeatedly, I assume
|
||||||
// this is some kind of buffer for the audio or DSP and eventually will be populated with other values...
|
// this is some kind of buffer for the audio or DSP and eventually will be populated with other values...
|
||||||
// if this comes to life maybe something interesting is happening!
|
// if this comes to life maybe something interesting is happening!
|
||||||
if (data!=0x00) printf("dma_iow3_cb %02x\n", data);
|
if (data!=0x00) logerror("dma_iow3_cb %02x\n", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE_LINE_MEMBER(hng64_state::tcu_tm0_cb)
|
WRITE_LINE_MEMBER(hng64_state::tcu_tm0_cb)
|
||||||
{
|
{
|
||||||
// this goes high once near startup
|
// this goes high once near startup
|
||||||
printf("tcu_tm0_cb %02x\n", state);
|
logerror("tcu_tm0_cb %02x\n", state);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE_LINE_MEMBER(hng64_state::tcu_tm1_cb)
|
WRITE_LINE_MEMBER(hng64_state::tcu_tm1_cb)
|
||||||
{
|
{
|
||||||
// these are very active, maybe they feed back into the v53 via one of the IRQ pins? TM2 toggles more rapidly than TM1
|
// these are very active, maybe they feed back into the v53 via one of the IRQ pins? TM2 toggles more rapidly than TM1
|
||||||
// printf("tcu_tm1_cb %02x\n", state);
|
// logerror("tcu_tm1_cb %02x\n", state);
|
||||||
m_audiocpu->set_input_line(0, state? ASSERT_LINE:CLEAR_LINE);
|
m_audiocpu->set_input_line(5, state? ASSERT_LINE:CLEAR_LINE); // not accurate, just so we have a trigger
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE_LINE_MEMBER(hng64_state::tcu_tm2_cb)
|
WRITE_LINE_MEMBER(hng64_state::tcu_tm2_cb)
|
||||||
{
|
{
|
||||||
// these are very active, maybe they feed back into the v53 via one of the IRQ pins? TM2 toggles more rapidly than TM1
|
// these are very active, maybe they feed back into the v53 via one of the IRQ pins? TM2 toggles more rapidly than TM1
|
||||||
// printf("tcu_tm2_cb %02x\n", state);
|
// logerror("tcu_tm2_cb %02x\n", state);
|
||||||
|
m_audiocpu->set_input_line(2, state? ASSERT_LINE:CLEAR_LINE); // not accurate, just so we have a trigger
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -354,7 +354,6 @@ public:
|
|||||||
int m_vertsrom_size;
|
int m_vertsrom_size;
|
||||||
void reset_sound();
|
void reset_sound();
|
||||||
void reset_net();
|
void reset_net();
|
||||||
DECLARE_WRITE16_MEMBER(hng64_sound_port_0008_w);
|
|
||||||
|
|
||||||
DECLARE_WRITE_LINE_MEMBER(dma_hreq_cb);
|
DECLARE_WRITE_LINE_MEMBER(dma_hreq_cb);
|
||||||
DECLARE_READ8_MEMBER(dma_memr_cb);
|
DECLARE_READ8_MEMBER(dma_memr_cb);
|
||||||
@ -375,10 +374,25 @@ public:
|
|||||||
DECLARE_WRITE16_MEMBER(hng64_sound_data_02_w);
|
DECLARE_WRITE16_MEMBER(hng64_sound_data_02_w);
|
||||||
DECLARE_WRITE16_MEMBER(hng64_sound_data_04_w);
|
DECLARE_WRITE16_MEMBER(hng64_sound_data_04_w);
|
||||||
DECLARE_WRITE16_MEMBER(hng64_sound_data_06_w);
|
DECLARE_WRITE16_MEMBER(hng64_sound_data_06_w);
|
||||||
DECLARE_WRITE16_MEMBER(hng64_sound_bank_w);
|
|
||||||
DECLARE_WRITE16_MEMBER(hng64_sound_port_0102_w);
|
DECLARE_READ16_MEMBER(hng64_sound_port_0004_r);
|
||||||
|
DECLARE_READ16_MEMBER(hng64_sound_port_0006_r);
|
||||||
|
|
||||||
|
DECLARE_READ16_MEMBER(hng64_sound_port_0008_r);
|
||||||
|
DECLARE_WRITE16_MEMBER(hng64_sound_port_0008_w);
|
||||||
|
|
||||||
|
DECLARE_WRITE16_MEMBER(hng64_sound_port_000a_w);
|
||||||
|
DECLARE_WRITE16_MEMBER(hng64_sound_port_000c_w);
|
||||||
|
|
||||||
DECLARE_WRITE16_MEMBER(hng64_sound_port_0080_w);
|
DECLARE_WRITE16_MEMBER(hng64_sound_port_0080_w);
|
||||||
|
|
||||||
|
DECLARE_WRITE16_MEMBER(hng64_sound_port_0100_w);
|
||||||
|
DECLARE_WRITE16_MEMBER(hng64_sound_port_0102_w);
|
||||||
|
DECLARE_READ16_MEMBER(hng64_sound_port_0104_r);
|
||||||
|
DECLARE_READ16_MEMBER(hng64_sound_port_0106_r);
|
||||||
|
DECLARE_WRITE16_MEMBER(hng64_sound_port_0108_w);
|
||||||
|
DECLARE_WRITE16_MEMBER(hng64_sound_port_010a_w);
|
||||||
|
|
||||||
|
DECLARE_WRITE16_MEMBER(hng64_sound_bank_w);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user