Previous 15994 Revisions Next

r7743 Tuesday 6th April, 2010 at 23:16:00 UTC by Barry Rodewald
[FMTOWNS] Minor updates.
[src/mess/drivers]fmtowns.c
[src/mess/video]fmtowns.c

src/mess/video/fmtowns.c
r7742r7743
689689   int xdir,ydir;
690690   int width = (towns_crtc_reg[12] - towns_crtc_reg[11]) / (((towns_crtc_reg[27] & 0x0f00) >> 8)+1);
691691   int height = (towns_crtc_reg[16] - towns_crtc_reg[15]) / (((towns_crtc_reg[27] & 0xf000) >> 12)+1);
692   UINT32 vram_start = (towns_sprite_reg[6] & 0x10) ? 0x60000 : 0x40000;
692693
693694   if(xflip)
694695   {
r7742r7743
730731         voffset += (towns_crtc_reg[24] * 4) * ypos;  // scanline size in bytes * y pos
731732         voffset += (xpos & 0x1ff) * 2;
732733         voffset &= 0x3ffff;
733         voffset += (towns_sprite_reg[6] & 0x10) ? 0x60000 : 0x40000;
734         //voffset += (towns_sprite_reg[6] & 0x10) ? 0x60000 : 0x40000;
734735         if(xpos < width && ypos < height && pixel != 0)
735736         {
736            towns_gfxvram[voffset+1] = (col & 0xff00) >> 8;
737            towns_gfxvram[voffset] = col & 0x00ff;
737            towns_gfxvram[voffset+vram_start+1] = (col & 0xff00) >> 8;
738            towns_gfxvram[voffset+vram_start] = col & 0x00ff;
738739         }
739740         if(xflip)
740741            voffset+=2;
r7742r7743
743744         pixel = towns_txtvram[poffset] & 0x0f;
744745         col = towns_txtvram[coffset+(pixel*2)] | (towns_txtvram[coffset+(pixel*2)+1] << 8);
745746         voffset &= 0x3ffff;
746         voffset += (towns_sprite_reg[6] & 0x10) ? 0x60000 : 0x40000;
747747         if(xpos < width && ypos < height && pixel != 0)
748748         {
749            towns_gfxvram[voffset+1] = (col & 0xff00) >> 8;
750            towns_gfxvram[voffset] = col & 0x00ff;
749            towns_gfxvram[voffset+vram_start+1] = (col & 0xff00) >> 8;
750            towns_gfxvram[voffset+vram_start] = col & 0x00ff;
751751         }
752752         poffset++;
753753         poffset &= 0x1ffff;
r7742r7743
828828      return;
829829
830830   // clears VRAM for each frame?
831   memset(towns_gfxvram+0x40000,0x80,0x40000);
831   if(towns_sprite_reg[6] & 0x10)
832      memset(towns_gfxvram+0x60000,0x80,0x20000);
833   else
834      memset(towns_gfxvram+0x40000,0x80,0x20000);
832835
833836   for(n=sprite_limit;n<1024;n++)
834837   {
src/mess/drivers/fmtowns.c
r7742r7743
17231723   running_device* pic = devtag_get_device(device->machine,"pic8259_slave");
17241724
17251725   towns_pcm_irq_flag = 1;
1726   towns_pcm_channel_flag |= (1 << channel);
17271726   if(towns_pcm_channel_mask & (1 << channel))
1727   {
1728      towns_pcm_channel_flag |= (1 << channel);
17281729      pic8259_ir5_w(pic, 1);
1730   }
17291731}
17301732
17311733static WRITE_LINE_DEVICE_HANDLER( towns_pic_irq )
r7742r7743
18481850  AM_RANGE(0x0c30,0x0c33) AM_READ8(towns_unknown_r,0x00ff0000)
18491851  // CMOS
18501852  AM_RANGE(0x3000,0x3fff) AM_READWRITE8(towns_cmos8_r, towns_cmos8_w,0x00ff00ff)
1851  // Something (MS-DOS wants this 0x41ff be 1
1853  // Something (MS-DOS wants this 0x41ff to be 1)
18521854  AM_RANGE(0x41fc,0x41ff) AM_READ8(towns_41ff_r,0xff000000)
18531855  // CRTC / Video (again)
18541856  AM_RANGE(0xfd90,0xfda3) AM_READWRITE8(towns_video_fd90_r, towns_video_fd90_w, 0xffffffff)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team