Use the upper tile attribute bits from the *next* row on Grasspin? (nw)

(yes, this seems like utter lunacy but it's the ONLY way I can see this working.  The CPU comms problem in transferring the dipswitches remains)
This commit is contained in:
David Haywood 2013-01-03 20:37:18 +00:00
parent 169b825e3d
commit 84b404d396
2 changed files with 12 additions and 4 deletions

View File

@ -96,8 +96,7 @@ static ADDRESS_MAP_START( blueprnt_map, AS_PROGRAM, 8, blueprnt_state )
AM_RANGE(0xc003, 0xc003) AM_READ(blueprnt_sh_dipsw_r)
AM_RANGE(0xd000, 0xd000) AM_WRITE(blueprnt_sound_command_w)
AM_RANGE(0xe000, 0xe000) AM_READ(watchdog_reset_r) AM_WRITE(blueprnt_flipscreen_w)
AM_RANGE(0xf000, 0xf3ff) AM_RAM_WRITE(blueprnt_colorram_w) AM_SHARE("colorram")
AM_RANGE(0xf400, 0xf7ff) AM_RAM // mirror?
AM_RANGE(0xf000, 0xf3ff) AM_RAM_WRITE(blueprnt_colorram_w) AM_MIRROR(0x400) AM_SHARE("colorram")
ADDRESS_MAP_END
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, blueprnt_state )

View File

@ -58,6 +58,10 @@ WRITE8_MEMBER(blueprnt_state::blueprnt_colorram_w)
m_colorram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset);
offset+=32;
offset &=0x3ff;
m_bg_tilemap->mark_tile_dirty(offset);
}
WRITE8_MEMBER(blueprnt_state::blueprnt_flipscreen_w)
@ -87,13 +91,18 @@ TILE_GET_INFO_MEMBER(blueprnt_state::get_bg_tile_info)
// or flipscreen after startup... this certainly doesn't work for 'Saturn'
TILE_GET_INFO_MEMBER(blueprnt_state::get_bg_tile_info_grasspin)
{
int attr = m_colorram[tile_index];
int attr = m_colorram[tile_index] & 0x3f;
attr |= m_colorram[(tile_index+32)&0x3ff] & 0xc0; // from the next row?
int code = m_videoram[tile_index];
int color = attr & 0x7f;
tileinfo.category = (attr & 0x80) ? 1 : 0;
if (!(attr & 0x10)) code += m_gfx_bank * 0x100;
if ((attr & 0x40)) code += m_gfx_bank * 0x100;
else code &=0xff;
SET_TILE_INFO_MEMBER(0, code, color, 0);