Previous 199869 Revisions Next

r19463 Tuesday 11th December, 2012 at 03:44:50 UTC by Angelo Salese
Added gfx strip mode, tested with a doujinshi game
[src/mess/drivers]pc9801.c

trunk/src/mess/drivers/pc9801.c
r19462r19463
680680      UINT8 attr,pen;
681681      UINT32 tile_addr;
682682      UINT8 knj_tile;
683      UINT8 gfx_mode;
683684
684685      tile_addr = addr+(x*(state->m_video_ff[WIDTH40_REG]+1));
685686
r19462r19463
713714      //blink = attr & 2;
714715      reverse = attr & 4;
715716      u_line = attr & 8;
716      v_line = attr & 0x10;
717      v_line = (state->m_video_ff[ATTRSEL_REG]) ? 0 : attr & 0x10;
718      gfx_mode = (state->m_video_ff[ATTRSEL_REG]) ? attr & 0x10 : 0;
717719      color = (attr & 0xe0) >> 5;
718720
719      if(state->m_video_ff[ATTRSEL_REG])
720         v_line = 0;
721
722721      for(yi=0;yi<lr;yi++)
723722      {
724723         for(xi=0;xi<8;xi++)
r19462r19463
735734
736735            if(!secret)
737736            {
738               if(kanji_sel)
737               /* TODO: priority */
738               if(gfx_mode)
739               {
740                  int gfx_bit;
741                  tile_data = 0;
742
743                  /*
744                     gfx strip mode:
745
746                     number refers to the bit number in the tile data.
747                     This mode is identical to the one seen in PC-8801
748                     00004444
749                     11115555
750                     22226666
751                     33337777
752                  */
753
754                  gfx_bit = (xi & 4);
755                  gfx_bit+= (yi & (2 << (char_size == 16)))>>(1+(char_size == 16));
756                  gfx_bit+= (yi & (4 << (char_size == 16)))>>(1+(char_size == 16));
757
758                  tile_data = ((tile >> gfx_bit) & 1) ? 0xff : 0x00;
759               }
760               else if(kanji_sel)
739761                  tile_data = (state->m_kanji_rom[tile*0x20+yi*2+pcg_lr]);
740762               else if(pcg_sel)
741763                  tile_data = (state->m_pcg_ram[0xac000+tile*0x20+yi*2+pcg_lr]);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team