This commit is contained in:
DavidHaywood 2019-01-23 02:32:39 +00:00
parent efc721357c
commit a751f2eead
3 changed files with 36 additions and 0 deletions

View File

@ -399,11 +399,18 @@ void xavix_state::superxavix_lowbus_map(address_map &map)
map(0x6c00, 0x6cff).ram().w(FUNC(xavix_state::bmp_palram_sh_w)).share("bmp_palram_sh"); map(0x6c00, 0x6cff).ram().w(FUNC(xavix_state::bmp_palram_sh_w)).share("bmp_palram_sh");
map(0x6d00, 0x6dff).ram().w(FUNC(xavix_state::bmp_palram_l_w)).share("bmp_palram_l"); map(0x6d00, 0x6dff).ram().w(FUNC(xavix_state::bmp_palram_l_w)).share("bmp_palram_l");
// extended external bus stuff (possible banking control?)
map(0x7909, 0x7909).w(FUNC(xavix_state::extended_extbus_reg0_w));
map(0x790b, 0x790b).w(FUNC(xavix_state::extended_extbus_reg1_w));
map(0x790d, 0x790d).w(FUNC(xavix_state::extended_extbus_reg2_w));
map(0x7a10, 0x7a12).ram().rw(FUNC(xavix_state::pio_dir_r), FUNC(xavix_state::pio_dir_w)); map(0x7a10, 0x7a12).ram().rw(FUNC(xavix_state::pio_dir_r), FUNC(xavix_state::pio_dir_w));
map(0x7a20, 0x7a22).ram().rw(FUNC(xavix_state::pio_out_r), FUNC(xavix_state::pio_out_w)); map(0x7a20, 0x7a22).ram().rw(FUNC(xavix_state::pio_out_r), FUNC(xavix_state::pio_out_w));
map(0x7a30, 0x7a32).ram().r(FUNC(xavix_state::pio_in_r)); map(0x7a30, 0x7a32).ram().r(FUNC(xavix_state::pio_in_r));
map(0x6fb0, 0x6fc7).ram().share("bmp_base"); map(0x6fb0, 0x6fc7).ram().share("bmp_base");
map(0x7ffd, 0x7ffd).nopw(); // looks like a watchdog?
} }
static INPUT_PORTS_START( xavix ) static INPUT_PORTS_START( xavix )

View File

@ -576,6 +576,12 @@ protected:
virtual DECLARE_WRITE8_MEMBER(pio_out_w); virtual DECLARE_WRITE8_MEMBER(pio_out_w);
virtual DECLARE_READ8_MEMBER(pio_out_r); virtual DECLARE_READ8_MEMBER(pio_out_r);
virtual DECLARE_READ8_MEMBER(pio_in_r); virtual DECLARE_READ8_MEMBER(pio_in_r);
uint8_t m_sx_extended_extbus[3];
DECLARE_WRITE8_MEMBER(extended_extbus_reg0_w);
DECLARE_WRITE8_MEMBER(extended_extbus_reg1_w);
DECLARE_WRITE8_MEMBER(extended_extbus_reg2_w);
}; };
class xavix_i2c_state : public xavix_state class xavix_i2c_state : public xavix_state

View File

@ -1080,6 +1080,7 @@ void xavix_state::machine_start()
save_item(NAME(m_sx_pio_dir)); save_item(NAME(m_sx_pio_dir));
save_item(NAME(m_sx_pio_out)); save_item(NAME(m_sx_pio_out));
save_item(NAME(m_sx_extended_extbus));
} }
void xavix_state::machine_reset() void xavix_state::machine_reset()
@ -1165,6 +1166,10 @@ void xavix_state::machine_reset()
m_sx_pio_out[i] = 0x00; m_sx_pio_out[i] = 0x00;
} }
for (int i = 0; i < 3; i++)
{
m_sx_extended_extbus[i] = 0x00;
}
} }
typedef device_delegate<uint8_t(int which, int half)> xavix_interrupt_vector_delegate; typedef device_delegate<uint8_t(int which, int half)> xavix_interrupt_vector_delegate;
@ -1223,3 +1228,21 @@ READ8_MEMBER(xavix_state::pio_in_r)
LOG("%s: pio_in_r (port %d)\n", machine().describe_context(), offset); LOG("%s: pio_in_r (port %d)\n", machine().describe_context(), offset);
return 0x00; return 0x00;
} }
WRITE8_MEMBER(xavix_state::extended_extbus_reg0_w)
{
LOG("%s: extended_extbus_reg0_w %02x\n", machine().describe_context(), data);
m_sx_extended_extbus[0] = data;
}
WRITE8_MEMBER(xavix_state::extended_extbus_reg1_w)
{
LOG("%s: extended_extbus_reg1_w %02x\n", machine().describe_context(), data);
m_sx_extended_extbus[1] = data;
}
WRITE8_MEMBER(xavix_state::extended_extbus_reg2_w)
{
LOG("%s: extended_extbus_reg2_w %02x\n", machine().describe_context(), data);
m_sx_extended_extbus[2] = data;
}