Previous 15994 Revisions Next

r15898 Tuesday 14th August, 2012 at 16:46:33 UTC by Angelo Salese
PC-8801: Fixed cursor drawing while in 1bpp 400 lines mode
[src/mess/drivers]pc8801.c

src/mess/drivers/pc8801.c
r15897r15898
1616    - waitstates;
1717    - dipswitches needs to be controlled;
1818    - below notes states that plain PC-8801 doesn't have a disk CPU, but the BIOS clearly checks the floppy ports. Wrong info?
19    - Basic Nihongo disks shows that bitmap and text colors mixes with additive blending (basically if the tv charset has white then the bitmap draws
20      with inverted color output).
2119   - clean-ups, banking and video in particular (i.e. hook-ups with memory region should go away and device models should be used instead)
2220   - OPNA needs dumping of YM2608 deltat ROM
2321   - YMF288 support;
r15897r15898
518516   UINT32 count;
519517   UINT8 *gvram = machine().root_device().memregion("gvram")->base();
520518   UINT8 color;
519   UINT8 is_cursor;
521520
522521   count = 0;
523522   color = (m_gfx_ctrl & 1) ? 7 & ((m_layer_mask ^ 0xe) >> 1) : 7;
523   is_cursor = 0;
524524
525525   for(y=0;y<200;y++)
526526   {
527527      for(x=0;x<640;x+=8)
528528      {
529         if(!(m_gfx_ctrl & 1))
530            is_cursor = calc_cursor_pos(x/8,y/lines_per_char,y & (lines_per_char-1));
531
529532         for(xi=0;xi<8;xi++)
530533         {
531534            int pen;
532535
533            pen = ((gvram[count+0x0000] >> (7-xi)) & 1) << 0;
536            pen = ((gvram[count+0x0000] >> (7-xi)) & 1);
537            if(is_cursor)
538               pen^=1;
534539
535540            if((m_gfx_ctrl & 1))
536541            {
r15897r15898
559564      {
560565         for(x=0;x<640;x+=8)
561566         {
567            if(!(m_gfx_ctrl & 1))
568               is_cursor = calc_cursor_pos(x/8,y/lines_per_char,y & (lines_per_char-1));
569
562570            for(xi=0;xi<8;xi++)
563571            {
564572               int pen;
565573
566               pen = ((gvram[count+0x4000] >> (7-xi)) & 1) << 0;
574               pen = ((gvram[count+0x4000] >> (7-xi)) & 1);
575               if(is_cursor)
576                  pen^=1;
567577
568578               if(cliprect.contains(x+xi, y))
569579                  bitmap.pix16(y, x+xi) = machine().pens[pen ? 7 : 0];
r15897r15898
651661   y_height = lines_per_char;
652662   y_double = (pc8801_pixel_clock());
653663   y_step = (non_special) ? 80 : 120; // trusted by Elthlead
664   is_cursor = 0;
654665
655666   for(yi=0;yi<y_height;yi++)
656667   {
657      is_cursor = calc_cursor_pos(x,y,yi);
668      if(m_gfx_ctrl & 1)
669         is_cursor = calc_cursor_pos(x,y,yi);
658670
659671      for(xi=0;xi<8;xi++)
660672      {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team