Previous 15994 Revisions Next

r9016 Thursday 2nd September, 2010 at 11:14:42 UTC by Angelo Salese
[PASOPIA7]: Fixed video attribute latch behaviour
[src/mess/drivers]pasopia.c

src/mess/drivers/pasopia.c
r9015r9016
2323static UINT8 bank_reg;
2424static UINT16 cursor_addr;
2525static UINT8 cursor_blink,cursor_raster;
26static UINT8 plane_reg,attr_data,attr_wrap,attr_latch,pal_sel,x_width;
26static UINT8 plane_reg,attr_data,attr_wrap,attr_latch,pal_sel,x_width,gfx_mode;
2727
2828#define VDP_CLOCK XTAL_3_579545MHz/4
2929
r9015r9016
220220   if((plane_reg & 0x44) == 0x44)
221221   {
222222      res &= vram[offset | 0x8000];
223      attr_latch = vram[offset | 0xc000];
224      i8255a_w(space->machine->device("ppi8255_0"), 1,  (attr_latch << 4) | (attr_latch & 0x7));
223      attr_latch = vram[offset | 0xc000] & 0x87;
225224   }
226225
227226   return res;
r9015r9016
240239      }
241240
242241      if(plane_reg & 0x10)
243         vram[offset | 0x0000] = (plane_reg & 1) ? data : 0xff;
242         vram[(offset & 0x3fff) | 0x0000] = (plane_reg & 1) ? data : 0xff;
244243      if(plane_reg & 0x20)
245         vram[offset | 0x4000] = (plane_reg & 2) ? data : 0xff;
244         vram[(offset & 0x3fff) | 0x4000] = (plane_reg & 2) ? data : 0xff;
246245      if(plane_reg & 0x40)
247246      {
248         vram[offset | 0x8000] = (plane_reg & 4) ? data : 0xff;
247         vram[(offset & 0x3fff) | 0x8000] = (plane_reg & 4) ? data : 0xff;
249248         attr_latch = attr_wrap ? attr_latch : attr_data;
250         vram[offset | 0xc000] = attr_latch;
251         i8255a_w(space->machine->device("ppi8255_0"), 1, (attr_latch << 4) | (attr_latch & 0x7));
249         vram[(offset & 0x3fff) | 0xc000] = attr_latch;
252250      }
253251   }
254252   else
r9015r9016
550548static READ8_DEVICE_HANDLER( crtc_portb_r )
551549{
552550   // --x- ---- vsync bit
551   // ---x ---- lcd dip-sw
553552   // ---- x--- disp bit
554   int lcd_bit = input_port_read(device->machine, "DSW") & 1;
555   int vdisp = (device->machine->primary_screen->vpos() < (lcd_bit ? 200 : 28)) ? 0x08 : 0x00; //TODO: check LCD vpos trigger
553   UINT8 lcd_bit = input_port_read(device->machine, "DSW") & 1;
554   UINT8 vdisp = (device->machine->primary_screen->vpos() < (lcd_bit ? 200 : 28)) ? 0x08 : 0x00; //TODO: check LCD vpos trigger
555   UINT8 vsync = vdisp ? 0x00 : 0x20;
556556
557   return 0xe7 | vdisp | (lcd_bit << 4);
557   return 0x40 | (attr_latch & 0x87) | vsync | vdisp | (lcd_bit << 4);
558558}
559559
560560static WRITE8_DEVICE_HANDLER( screen_mode_w )
561561{
562   if(data & 0xdf)
562   if(data & 0x7f)
563563      printf("GFX MODE %02x\n",data);
564
564565   x_width = data & 0x20;
566   gfx_mode = data & 0x80;
567
568//   printf("%02x\n",gfx_mode);
565569}
566570
567571static WRITE8_DEVICE_HANDLER( plane_reg_w )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team