Some additions

This commit is contained in:
Angelo Salese 2012-12-18 03:22:00 +00:00
parent 9f10ae6d39
commit e7d3826aa5

View File

@ -431,6 +431,7 @@ public:
UINT8 *m_vram256; UINT8 *m_vram256;
UINT8 m_pc9821_window_bank; UINT8 m_pc9821_window_bank;
UINT8 m_joy_sel; UINT8 m_joy_sel;
UINT8 m_ext2_ff;
DECLARE_READ8_MEMBER(pc9801_xx_r); DECLARE_READ8_MEMBER(pc9801_xx_r);
DECLARE_WRITE8_MEMBER(pc9801_xx_w); DECLARE_WRITE8_MEMBER(pc9801_xx_w);
@ -676,6 +677,8 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
if(state->m_video_ff[DISPLAY_REG] == 0) //screen is off if(state->m_video_ff[DISPLAY_REG] == 0) //screen is off
return; return;
// popmessage("%02x %d",state->m_video_ff[INTERLACE_REG],device->machine().primary_screen->visible_area().max_y + 1);
// interlace_on = ((device->machine().primary_screen->visible_area().max_y + 1) >= 400) ? 1 : 0;
interlace_on = state->m_video_ff[INTERLACE_REG]; interlace_on = state->m_video_ff[INTERLACE_REG];
colors16_mode = (state->m_ex_video_ff[ANALOG_16_MODE]) ? 16 : 8; colors16_mode = (state->m_ex_video_ff[ANALOG_16_MODE]) ? 16 : 8;
@ -1168,14 +1171,13 @@ WRITE8_MEMBER(pc9801_state::pc9801_video_ff_w)
case 4: case 4:
if(m_gfx_ff) if(m_gfx_ff)
{ {
m_video_ff[(data & 0x0e) >> 1] = data & 1; m_video_ff[(data & 0x0e) >> 1] = data &1;
m_gfx_ff = 0; m_gfx_ff = 0;
} }
break; break;
default: m_video_ff[(data & 0x0e) >> 1] = data & 1; break; default: m_video_ff[(data & 0x0e) >> 1] = data & 1; break;
} }
if(0) if(0)
{ {
static const char *const video_ff_regnames[] = static const char *const video_ff_regnames[] =
@ -2415,14 +2417,30 @@ READ32_MEMBER(pc9801_state::pc9821_timestamp_r)
return m_maincpu->total_cycles(); return m_maincpu->total_cycles();
} }
/* basically a read-back of various registers */
READ8_MEMBER(pc9801_state::pc9821_ext2_video_ff_r) READ8_MEMBER(pc9801_state::pc9821_ext2_video_ff_r)
{ {
return 0; UINT8 res;
if(offset)
return 0xff;
res = 0;
switch(m_ext2_ff)
{
case 3: res = m_video_ff[DISPLAY_REG]; break; // display reg
default:
printf("PC-9821: read ext2 f/f with value %02x\n",m_ext2_ff);
}
return res;
} }
WRITE8_MEMBER(pc9801_state::pc9821_ext2_video_ff_w) WRITE8_MEMBER(pc9801_state::pc9821_ext2_video_ff_w)
{ {
// ... if(offset == 0)
m_ext2_ff = data;
} }
static ADDRESS_MAP_START( pc9821_map, AS_PROGRAM, 32, pc9801_state ) static ADDRESS_MAP_START( pc9821_map, AS_PROGRAM, 32, pc9801_state )