Previous 199869 Revisions Next

r32420 Saturday 27th September, 2014 at 00:09:56 UTC by Angelo Salese
Support for mode 0 chars in upd7220 (text in DMV diag program)
[src/emu/video]upd7220.c
[src/mess/drivers]dmv.c pc9801.c

trunk/src/emu/video/upd7220.c
r32419r32420
852852   int dad = x & 0x7;
853853   UINT8 data = readbyte(addr);
854854   UINT8 new_pixel = (tile_data) & (0x80 >> (dad));
855
855   
856856   switch(m_bitmap_mod)
857857   {
858858      case 0: //replace
r32419r32420
985985
986986   /* snippet for character checking */
987987   #if 0
988   if((m_figs.m_dir & 7) == 3)
988989   for(yi=0;yi<8;yi++)
989990   {
990991      for(xi=0;xi<8;xi++)
r32419r32420
10001001   ysize = ((m_figs.m_d & 0x400) + m_figs.m_dc) + 1;
10011002
10021003   /* TODO: internal direction, zooming, size stuff bigger than 8, rewrite using draw_pixel function */
1003   for(yi=0;yi<ysize;yi++)
1004   if((m_figs.m_dir & 7) == 0)
1005   {   
1006      for(yi=0;yi<8;yi++)
1007      {
1008         for(xi=0;xi<8;xi++)
1009         {
1010            UINT8 dot = (m_ra[((7-xi) & 7) | 8]);
1011            dot >>= yi;
1012            dot &= 1;
1013            dot*=0xff;
1014            draw_pixel(x+xi,y+yi,dot);
1015         }
1016      }
1017   }
1018   else
10041019   {
1005      switch(m_figs.m_dir & 7)
1020      for(yi=0;yi<ysize;yi++)
10061021      {
1007         case 0: tile_data = BITSWAP8(m_ra[((yi) & 7) | 8],0,1,2,3,4,5,6,7); break; // TODO
1008         case 2: tile_data = BITSWAP8(m_ra[((yi) & 7) | 8],0,1,2,3,4,5,6,7); break;
1009         case 6: tile_data = BITSWAP8(m_ra[((ysize-1-yi) & 7) | 8],7,6,5,4,3,2,1,0); break;
1010         default: tile_data = BITSWAP8(m_ra[((yi) & 7) | 8],7,6,5,4,3,2,1,0);
1011                  logerror("%d %d %d\n",m_figs.m_dir,xsize,ysize);
1022         switch(m_figs.m_dir & 7)
1023         {
1024            case 2: tile_data = BITSWAP8(m_ra[((yi) & 7) | 8],0,1,2,3,4,5,6,7); break;
1025            case 6: tile_data = BITSWAP8(m_ra[((ysize-1-yi) & 7) | 8],7,6,5,4,3,2,1,0); break;
1026            default: tile_data = BITSWAP8(m_ra[((yi) & 7) | 8],7,6,5,4,3,2,1,0);
1027                  logerror("upd7220 draw char: %d %d %d\n",m_figs.m_dir,xsize,ysize);
10121028                  break;
1013      }
1029         }
10141030
1015      for(xi=0;xi<xsize;xi++)
1016      {
1017         UINT32 addr = ((y+yi) * m_pitch * 2) + ((x+xi) >> 3);
1031         for(xi=0;xi<xsize;xi++)
1032         {
1033            UINT32 addr = ((y+yi) * m_pitch * 2) + ((x+xi) >> 3);
10181034
1019         writebyte(addr & 0x3ffff, readbyte(addr & 0x3ffff) & ~(1 << (xi & 7)));
1020         writebyte(addr & 0x3ffff, readbyte(addr & 0x3ffff) | ((tile_data) & (1 << (xi & 7))));
1035            writebyte(addr & 0x3ffff, readbyte(addr & 0x3ffff) & ~(1 << (xi & 7)));
1036            writebyte(addr & 0x3ffff, readbyte(addr & 0x3ffff) | ((tile_data) & (1 << (xi & 7))));
1037         }
10211038      }
10221039   }
1023
10241040   m_ead = ((x+8*x_dir_dot[m_figs.m_dir]) >> 4) + ((y+8*y_dir_dot[m_figs.m_dir]) * m_pitch);
10251041   m_dad = ((x+8*x_dir_dot[m_figs.m_dir]) & 0xf);
10261042}
r32419r32420
13431359      break;
13441360
13451361   case COMMAND_FIGD: /* figure draw start */
1346      if(m_figs.m_figure_type == 0)
1362      if(m_figs.m_figure_type == 0 || m_figs.m_figure_type == 4)
13471363      {
13481364         UINT16 line_pattern = check_pattern((m_ra[8]) | (m_ra[9]<<8));
13491365         UINT8 dot = ((line_pattern >> (0 & 0xf)) & 1) << 7;
trunk/src/mess/drivers/dmv.c
r32419r32420
271271      const rgb_t *palette = m_palette->palette()->entry_list_raw();
272272
273273      // 32KB videoram
274      UINT8 gfx = m_video_ram[address & 0x7fff];
274      UINT8 gfx = m_video_ram[address & 0xffff];
275275
276276      for(int xi=0;xi<8;xi++)
277277      {
trunk/src/mess/drivers/pc9801.c
r32419r32420
552552   UINT8 m_joy_sel;
553553   UINT8 m_ext2_ff;
554554   UINT8 m_sys_type;
555   UINT8 m_is_nec_bank;
556555   
557556   DECLARE_WRITE_LINE_MEMBER( keyboard_irq );
558557   DECLARE_WRITE_LINE_MEMBER( write_uart_clock );
r32419r32420
19051904WRITE8_MEMBER(pc9801_state::pc9801rs_bank_w)
19061905{
19071906   if(offset == 1)
1908   {
1909      #if 0
1910      if(m_is_nec_bank)
1911      {
1912         m_rom_bank = 1;
1913         return;
1914      }
1915      #endif
1916   
1907   {   
19171908      if((data & 0xf0) == 0x00 || (data & 0xf0) == 0x10)
19181909      {
19191910         if((data & 0xed) == 0x00)
r32419r32420
33893380   m_ide_ram = auto_alloc_array(machine(), UINT8, 0x2000);
33903381   m_ext_gvram = auto_alloc_array(machine(), UINT8, 0xa0000);
33913382
3392   m_is_nec_bank = 0;
33933383   save_pointer(NAME(m_sdip), 24);
33943384   save_pointer(NAME(m_ide_ram), 0x2000);
33953385   save_pointer(NAME(m_ext_gvram), 0xa0000);
r32419r32420
33993389{
34003390   MACHINE_START_CALL_MEMBER(pc9821);
34013391   
3402   m_is_nec_bank = 1;
3392   // ...
34033393}
34043394
34053395MACHINE_RESET_MEMBER(pc9801_state,pc9801_common)
r32419r32420
39013891   MCFG_CPU_IO_MAP(pc9821_io)
39023892   MCFG_CPU_VBLANK_INT_DRIVER("screen", pc9801_state, pc9801_vrtc_irq)
39033893   MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259_master", pic8259_device, inta_cb)
3904
3894   
39053895   MCFG_MACHINE_START_OVERRIDE(pc9801_state,pc9821ap2)
39063896MACHINE_CONFIG_END
39073897

Previous 199869 Revisions Next


© 1997-2024 The MAME Team