Skip to content

Commit

Permalink
superxavix CRTC(?) logging
Browse files Browse the repository at this point in the history
  • Loading branch information
David Haywood committed Dec 12, 2024
1 parent b02571d commit 6169926
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/mame/tvgames/xavix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ void xavix_state::superxavix_lowbus_map(address_map &map)
map(0x6f7e, 0x6f7e).rw(FUNC(xavix_state::superxavix_bitmap_pal_saturation_r), FUNC(xavix_state::superxavix_bitmap_pal_saturation_w)); // SgdPalBmpSat
map(0x6f7f, 0x6f7f).rw(FUNC(xavix_state::superxavix_bitmap_pal_lightness_r), FUNC(xavix_state::superxavix_bitmap_pal_lightness_w)); // SgdPalBmpLgt

map(0x6f80, 0x6f99).rw(FUNC(xavix_state::superxavix_crtc_1_r), FUNC(xavix_state::superxavix_crtc_1_w)).share("sx_crtc_1"); // Super XaviX CRTC?
map(0x6fa0, 0x6fa7).rw(FUNC(xavix_state::superxavix_crtc_2_r), FUNC(xavix_state::superxavix_crtc_2_w)).share("sx_crtc_2"); // maybe more CRTC regs?

map(0x6fb0, 0x6fc7).ram().share("bmp_base");

// extended external bus stuff (possible banking control?)
Expand Down
11 changes: 10 additions & 1 deletion src/mame/tvgames/xavix.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ class xavix_state : public driver_device
m_anport(*this, "anport"),
m_math(*this, "math"),
m_xavix2002io(*this, "xavix2002io"),
m_sx_plt_loc(*this, "sx_plt_loc")
m_sx_plt_loc(*this, "sx_plt_loc"),
m_sx_crtc_1(*this, "sx_crtc_1"),
m_sx_crtc_2(*this, "sx_crtc_2")
{ }

void xavix(machine_config &config);
Expand Down Expand Up @@ -420,6 +422,11 @@ class xavix_state : public driver_device

void spriteregs_w(uint8_t data);

void superxavix_crtc_1_w(offs_t offset, uint8_t data);
uint8_t superxavix_crtc_1_r(offs_t offset);
void superxavix_crtc_2_w(offs_t offset, uint8_t data);
uint8_t superxavix_crtc_2_r(offs_t offset);

void superxavix_plt_loc_w(offs_t offset, uint8_t data);
uint8_t superxavix_plt_loc_r(offs_t offset);

Expand Down Expand Up @@ -617,6 +624,8 @@ class xavix_state : public driver_device
required_device<xavix_math_device> m_math;
optional_device<xavix2002_io_device> m_xavix2002io;
optional_shared_ptr<uint8_t> m_sx_plt_loc;
optional_shared_ptr<uint8_t> m_sx_crtc_1;
optional_shared_ptr<uint8_t> m_sx_crtc_2;

uint8_t m_extbusctrl[3]{};

Expand Down
25 changes: 24 additions & 1 deletion src/mame/tvgames/xavix_v.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,32 @@ void xavix_state::spriteram_w(offs_t offset, uint8_t data)
}
}

void xavix_state::superxavix_crtc_1_w(offs_t offset, uint8_t data)
{
logerror("%s superxavix_crtc_1_w %02x %02x\n", machine().describe_context(), offset, data);
m_sx_crtc_1[offset] = data;
}

uint8_t xavix_state::superxavix_crtc_1_r(offs_t offset)
{
return m_sx_crtc_1[offset];
}

void xavix_state::superxavix_crtc_2_w(offs_t offset, uint8_t data)
{
logerror("%s superxavix_crtc_2_w %02x %02x\n", machine().describe_context(), offset, data);
m_sx_crtc_2[offset] = data;
}

uint8_t xavix_state::superxavix_crtc_2_r(offs_t offset)
{
return m_sx_crtc_2[offset];
}


void xavix_state::superxavix_plt_loc_w(offs_t offset, uint8_t data)
{
logerror("%s superxavix_plt_loc_w %02x %08x\n", machine().describe_context(), offset, data);
logerror("%s superxavix_plt_loc_w %02x %02x\n", machine().describe_context(), offset, data);

m_sx_plt_loc[offset] = data;
if (offset == 3)
Expand Down

0 comments on commit 6169926

Please sign in to comment.