Previous 199869 Revisions Next

r19641 Tuesday 18th December, 2012 at 03:22:00 UTC by Angelo Salese
Some additions
[src/mess/drivers]pc9801.c

trunk/src/mess/drivers/pc9801.c
r19640r19641
431431   UINT8 *m_vram256;
432432   UINT8 m_pc9821_window_bank;
433433   UINT8 m_joy_sel;
434   UINT8 m_ext2_ff;
434435
435436   DECLARE_READ8_MEMBER(pc9801_xx_r);
436437   DECLARE_WRITE8_MEMBER(pc9801_xx_w);
r19640r19641
676677   if(state->m_video_ff[DISPLAY_REG] == 0) //screen is off
677678      return;
678679
680//   popmessage("%02x %d",state->m_video_ff[INTERLACE_REG],device->machine().primary_screen->visible_area().max_y + 1);
681//   interlace_on = ((device->machine().primary_screen->visible_area().max_y + 1) >= 400) ? 1 : 0;
679682   interlace_on = state->m_video_ff[INTERLACE_REG];
680683   colors16_mode = (state->m_ex_video_ff[ANALOG_16_MODE]) ? 16 : 8;
681684
r19640r19641
11511154   if((offset & 1) == 0)
11521155   {
11531156      /*
1154        TODO: this is my best bet so far. Register 4 is annoying, the pattern seems to be:
1157      TODO: this is my best bet so far. Register 4 is annoying, the pattern seems to be:
11551158        Write to video FF register Graphic -> 00
11561159        Write to video FF register 200 lines -> 0x
11571160        Write to video FF register 200 lines -> 00
r19640r19641
11611164      switch((data & 0x0e) >> 1)
11621165      {
11631166         case 1:
1164            m_gfx_ff = 1;
1165            if(data & 1)
1166               printf("Graphic f/f actually enabled!\n");
1167            break;
1167              m_gfx_ff = 1;
1168              if(data & 1)
1169                 printf("Graphic f/f actually enabled!\n");
1170               break;
11681171         case 4:
11691172            if(m_gfx_ff)
1170            {
1171               m_video_ff[(data & 0x0e) >> 1] = data & 1;
1173              {
1174               m_video_ff[(data & 0x0e) >> 1] = data &1;
11721175               m_gfx_ff = 0;
11731176            }
1174            break;
1177              break;
11751178         default: m_video_ff[(data & 0x0e) >> 1] = data & 1; break;
11761179      }
11771180
1178
11791181      if(0)
11801182      {
11811183         static const char *const video_ff_regnames[] =
r19640r19641
24152417   return m_maincpu->total_cycles();
24162418}
24172419
2420/* basically a read-back of various registers */
24182421READ8_MEMBER(pc9801_state::pc9821_ext2_video_ff_r)
24192422{
2420   return 0;
2423   UINT8 res;
2424
2425   if(offset)
2426      return 0xff;
2427
2428   res = 0;
2429
2430   switch(m_ext2_ff)
2431   {
2432      case 3: res = m_video_ff[DISPLAY_REG]; break; // display reg
2433      default:
2434         printf("PC-9821: read ext2 f/f with value %02x\n",m_ext2_ff);
2435   }
2436
2437   return res;
24212438}
24222439
24232440WRITE8_MEMBER(pc9801_state::pc9821_ext2_video_ff_w)
24242441{
2425   // ...
2442   if(offset == 0)
2443      m_ext2_ff = data;
24262444}
24272445
24282446static ADDRESS_MAP_START( pc9821_map, AS_PROGRAM, 32, pc9801_state )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team