Skip to content

Commit

Permalink
log this write for further research
Browse files Browse the repository at this point in the history
  • Loading branch information
David Haywood committed Dec 13, 2024
1 parent 5508719 commit 235df45
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mame/tvgames/xavix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ void xavix_state::superxavix_lowbus_map(address_map &map)
// map(0x6a40, 0x6a7f).ram().share("ext_segment_regs"); // 16x32 extended segment regs

// bitmap plotter(!) (with auto-inc?) - used by super pc tv units
map(0x6f60, 0x6f60).nopw(); // writes here to flush plotter FIFO
map(0x6f60, 0x6f60).w(FUNC(xavix_state::superxavix_plt_flush_w)); // writes here to flush plotter FIFO
map(0x6f62, 0x6f62).w(FUNC(xavix_state::superxavix_plt_dat_w)); // writes plotter data here
// 0x6f63 can be used to read from bitmap?
map(0x6f64, 0x6f67).rw(FUNC(xavix_state::superxavix_plt_loc_r), FUNC(xavix_state::superxavix_plt_loc_w)).share("sx_plt_loc");
Expand Down
2 changes: 2 additions & 0 deletions src/mame/tvgames/xavix.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ class xavix_state : public driver_device
void superxavix_crtc_2_w(offs_t offset, uint8_t data);
uint8_t superxavix_crtc_2_r(offs_t offset);

void superxavix_plt_flush_w(uint8_t data);
void superxavix_plt_dat_w(uint8_t data);
void superxavix_plt_loc_w(offs_t offset, uint8_t data);
uint8_t superxavix_plt_loc_r(offs_t offset);
Expand Down Expand Up @@ -562,6 +563,7 @@ class xavix_state : public driver_device
uint8_t m_superxavix_pal_index = 0;
uint8_t m_superxavix_bitmap_pal_index = 0;
uint32_t m_sx_plt_address = 0;
uint8_t m_sx_plt_mode = 0;

int16_t get_vectors(int which, int half);

Expand Down
1 change: 1 addition & 0 deletions src/mame/tvgames/xavix_m.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ void xavix_state::machine_start()
save_item(NAME(m_superxavix_pal_index));
save_item(NAME(m_superxavix_bitmap_pal_index));
save_item(NAME(m_sx_plt_address));
save_item(NAME(m_sx_plt_mode));

save_item(NAME(m_sx_extended_extbus));
}
Expand Down
13 changes: 12 additions & 1 deletion src/mame/tvgames/xavix_v.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,21 @@ uint8_t xavix_state::superxavix_crtc_2_r(offs_t offset)
return m_sx_crtc_2[offset];
}

void xavix_state::superxavix_plt_flush_w(uint8_t data)
{
// flush current write buffer, maybe also set write mode?
logerror("%s: superxavix_plt_flush_w %02x\n", machine().describe_context(), data);
m_sx_plt_mode = data;
}


void xavix_state::superxavix_plt_dat_w(uint8_t data)
{
uint32_t realaddress = m_sx_plt_address / 0x8;
uint32_t realaddress = m_sx_plt_address / 0x8; // it's a bit-offset?

//if (m_sx_plt_mode == 0x07) // maybe 8bpp, suprtvpc doesn't write the bad status bar or bad text with this, but suprtvpchk drawing breaks
m_maincpu->space(6).write_byte(realaddress & 0x7fffff, data);

m_sx_plt_address += 0x8;
}

Expand Down

0 comments on commit 235df45

Please sign in to comment.