Previous 15994 Revisions Next

r10626 Tuesday 1st March, 2011 at 03:51:03 UTC by Angelo Salese
[uPD7220]: Drawing pixels are subsceptible of WDAT modifiers, fixes line color drawing in PC-9801
[src/mess/video]upd7220.c

src/mess/video/upd7220.c
r10625r10626
202202
203203   UINT16 vram[0x40000];
204204   UINT32 vram_bank;
205
206   UINT8 bitmap_mod;
205207};
206208
207209static const int x_dir[8] = { 0, 1, 1, 1, 0,-1,-1,-1};
r10625r10626
658660
659661   dad = x & 0xf;
660662
663   if((upd7220->bitmap_mod & 3) == 2) //reset to zero
664      tile_data = 0;
665
666   if((upd7220->bitmap_mod & 2) == 0)
667      printf("Used bitmap modifier %02x\n",upd7220->bitmap_mod);
668
661669   upd7220->vram[addr + upd7220->vram_bank] &= ~(0x8000 >> (15-dad));
662670   upd7220->vram[addr + upd7220->vram_bank] |= ((tile_data) & (0x8000 >> (15-dad)));
663671}
r10625r10626
674682   UINT8 dot;
675683
676684   line_size = upd7220->figs.dc + 1;
677   /* TODO: line pattern is unchecked */
678685   line_pattern = (upd7220->ra[8]) | (upd7220->ra[9]<<8);
679686
680   //printf("%d %d %08x %04x %d %04x\n",x,y,line_size,line_pattern,upd7220->figs.dir,upd7220->pitch);
681
682687   for(i = 0;i<line_size;i++)
683688   {
684689      line_step = (upd7220->figs.d1 * i);
r10625r10626
10231028            upd7220->ra_addr++;
10241029         }
10251030
1026         upd7220->param_ptr = 1;
1031         upd7220->param_ptr = 0;
10271032      }
10281033      break;
10291034
r10625r10626
10371042      break;
10381043
10391044   case COMMAND_WDAT: /* write data into display memory */
1040      //printf("CR %02x\n",upd7220->cr);
1045      upd7220->bitmap_mod = upd7220->cr & 3;
1046
10411047      if (upd7220->param_ptr == 3 || (upd7220->param_ptr == 2 && upd7220->cr & 0x10))
10421048      {
10431049         //printf("%02x = %02x %02x (%c) %04x\n",upd7220->cr,upd7220->pr[2],upd7220->pr[1],upd7220->pr[1],EAD);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team