mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
XaviX - Support RAM rendering mode used by Baseball 2 Test Mode (hold Button 1+2, reset twice) (#4110)
* support reading tile data from RAM (for baseball 2 hidden test mode) * missing part (nw)
This commit is contained in:
parent
6bf0934a2d
commit
50663967e4
@ -609,6 +609,23 @@ static INPUT_PORTS_START( namcons2 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
|
||||
INPUT_PORTS_END
|
||||
|
||||
// to access hidden test mode reset while holding Button1 and Button2 (works every other reset)
|
||||
// to cycle through modes use Button 1 until you get to the input test
|
||||
static INPUT_PORTS_START( rad_bb2 )
|
||||
PORT_INCLUDE(xavix)
|
||||
|
||||
PORT_MODIFY("IN0")
|
||||
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
|
||||
|
||||
PORT_MODIFY("IN1")
|
||||
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("X")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("O")
|
||||
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME(".")
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* correct, 4bpp gfxs */
|
||||
static const gfx_layout charlayout =
|
||||
{
|
||||
@ -884,7 +901,7 @@ CONS( 200?, rad_boxp, rad_box, 0, xavixp, rad_boxp, xavix_state, init_xavix
|
||||
CONS( 200?, rad_crdn, 0, 0, xavix, rad_crdn, xavix_state, init_xavix, "Radica / SSD Company LTD", "Play TV Card Night (NTSC)", MACHINE_IS_SKELETON)
|
||||
CONS( 200?, rad_crdnp, rad_crdn, 0, xavixp, rad_crdnp,xavix_state, init_xavix, "Radica / SSD Company LTD", "ConnecTV Card Night (PAL)", MACHINE_IS_SKELETON)
|
||||
|
||||
CONS( 2002, rad_bb2, 0, 0, xavix, xavix, xavix_state, init_xavix, "Radica / SSD Company LTD", "Play TV Baseball 2", MACHINE_IS_SKELETON ) // contains string "Radica RBB2 V1.0"
|
||||
CONS( 2002, rad_bb2, 0, 0, xavix, rad_bb2, xavix_state, init_xavix, "Radica / SSD Company LTD", "Play TV Baseball 2", MACHINE_IS_SKELETON ) // contains string "Radica RBB2 V1.0"
|
||||
|
||||
CONS( 2001, rad_bass, 0, 0, xavix, xavix, xavix_state, init_xavix, "Radica / SSD Company LTD", "Play TV Bass Fishin' (NTSC)", MACHINE_IS_SKELETON)
|
||||
CONS( 2001, rad_bassp, rad_bass, 0, xavixp, xavixp, xavix_state, init_xavix, "Radica / SSD Company LTD", "ConnecTV Bass Fishin' (PAL)", MACHINE_IS_SKELETON)
|
||||
|
@ -12,7 +12,19 @@ inline void xavix_state::set_data_address(int address, int bit)
|
||||
|
||||
inline uint8_t xavix_state::get_next_bit()
|
||||
{
|
||||
uint8_t bit = m_rgn[m_tmp_dataaddress & (m_rgnlen - 1)];
|
||||
uint8_t bit;
|
||||
|
||||
// if bank is > 0x80, or address is >0x8000 it's a plain ROM read
|
||||
if ((m_tmp_dataaddress >= 0x80000) || (m_tmp_dataaddress & 0x8000))
|
||||
{
|
||||
bit= m_rgn[m_tmp_dataaddress & (m_rgnlen - 1)];
|
||||
}
|
||||
else // otherwise we read from RAM etc.? (baseball 2 secret test mode relies on this as it puts 1bpp characters in RAM)
|
||||
{
|
||||
address_space& mainspace = m_maincpu->space(AS_PROGRAM);
|
||||
bit = m_lowbus->read8(mainspace, m_tmp_dataaddress & 0x7fff);
|
||||
}
|
||||
|
||||
bit = bit >> m_tmp_databit;
|
||||
bit &= 1;
|
||||
|
||||
@ -220,7 +232,11 @@ void xavix_state::draw_tilemap(screen_device &screen, bitmap_ind16 &bitmap, cons
|
||||
|
||||
// the register being 0 probably isn't the condition here
|
||||
if (tileregs[0x0] != 0x00) tile |= mainspace.read_byte((tileregs[0x0] << 8) + count);
|
||||
if (tileregs[0x1] != 0x00) tile |= mainspace.read_byte((tileregs[0x1] << 8) + count) << 8;
|
||||
|
||||
// only read the next byte if we're not in an 8-bit mode
|
||||
if (((tileregs[0x7] & 0x7f) != 0x00) && ((tileregs[0x7] & 0x7f) != 0x08))
|
||||
tile |= mainspace.read_byte((tileregs[0x1] << 8) + count) << 8;
|
||||
|
||||
// 24 bit modes can use reg 0x2, otherwise it gets used as extra attribute in other modes
|
||||
|
||||
|
||||
@ -490,8 +506,14 @@ void xavix_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, cons
|
||||
int gfxbase = (m_segment_regs[(basereg * 2) + 1] << 16) | (m_segment_regs[(basereg * 2)] << 8);
|
||||
tile += gfxbase;
|
||||
}
|
||||
else
|
||||
{
|
||||
// ?? in 24-bit mode the upper bit isn't being set, which causes some things to be drawn from RAM instead
|
||||
// which is not what we want at all. are the segment registers still involved even in this mode?
|
||||
tile |= 0x800000;
|
||||
}
|
||||
|
||||
/* coodrinates are signed, based on screen position 0,0 being at the center of the screen
|
||||
/* coordinates are signed, based on screen position 0,0 being at the center of the screen
|
||||
tile addressing likewise, point 0,0 is center of tile?
|
||||
this makes the calculation a bit more annoying in terms of knowing when to apply offsets, when to wrap etc.
|
||||
this is likely still incorrect
|
||||
@ -597,6 +619,9 @@ uint32_t xavix_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
|
||||
{
|
||||
handle_palette(screen, bitmap, cliprect);
|
||||
|
||||
// monster truck, taito nostalgia 1, madden and more look worse with black pen, baseball 2 hidden test mode looks worse with forced pen 0
|
||||
// probably depends on transparency etc.
|
||||
//bitmap.fill(m_palette->black_pen(), cliprect);
|
||||
bitmap.fill(0, cliprect);
|
||||
|
||||
draw_tilemap(screen,bitmap,cliprect,0);
|
||||
|
Loading…
Reference in New Issue
Block a user