src/mess/drivers/pasopia.c
| r9014 | r9015 | |
| 25 | 25 | static UINT8 cursor_blink,cursor_raster; |
| 26 | 26 | static UINT8 plane_reg,attr_data,attr_wrap,attr_latch,pal_sel,x_width; |
| 27 | 27 | |
| 28 | #define VDP_CLOCK XTAL_3_579545MHz/4 |
| 29 | |
| 28 | 30 | static VIDEO_START( paso7 ) |
| 29 | 31 | { |
| 30 | 32 | p7_pal = auto_alloc_array(machine, UINT8, 0x10); |
| r9014 | r9015 | |
| 117 | 119 | static VIDEO_UPDATE( paso7 ) |
| 118 | 120 | { |
| 119 | 121 | static UINT8 *vram = memory_region(screen->machine, "vram"); |
| 120 | | int x,y,xi; |
| 122 | int x,y,xi,yi; |
| 121 | 123 | int count; |
| 122 | 124 | int width; |
| 123 | 125 | |
| r9014 | r9015 | |
| 127 | 129 | |
| 128 | 130 | width = x_width ? 80 : 40; |
| 129 | 131 | |
| 130 | | count = 0x0000; |
| 131 | | |
| 132 | | for(y=0;y<200;y++) |
| 132 | for(yi=0;yi<8;yi++) |
| 133 | 133 | { |
| 134 | | for(x=0;x<8*width;x+=8) |
| 134 | count = yi; |
| 135 | for(y=0;y<200;y+=8) |
| 135 | 136 | { |
| 136 | | for(xi=0;xi<8;xi++) |
| 137 | for(x=0;x<8*width;x+=8) |
| 137 | 138 | { |
| 138 | | int pen_b,pen_r,pen_g,color; |
| 139 | for(xi=0;xi<8;xi++) |
| 140 | { |
| 141 | int pen_b,pen_r,pen_g,color; |
| 139 | 142 | |
| 140 | | pen_b = (vram[count+0x0000]>>(7-xi)) & 1; |
| 141 | | pen_r = (vram[count+0x4000]>>(7-xi)) & 1; |
| 142 | | pen_g = 0;//(p7_vram[count+0x8000]>>(7-xi)) & 1; |
| 143 | pen_b = (vram[count+0x0000]>>(7-xi)) & 1; |
| 144 | pen_r = (vram[count+0x4000]>>(7-xi)) & 1; |
| 145 | pen_g = 0;//(p7_vram[count+0x8000]>>(7-xi)) & 1; |
| 143 | 146 | |
| 144 | | color = pen_g<<2 | pen_r<<1 | pen_b<<0; |
| 147 | color = pen_g<<2 | pen_r<<1 | pen_b<<0; |
| 145 | 148 | |
| 146 | | *BITMAP_ADDR16(bitmap, y, x+xi) = screen->machine->pens[color+0x20]; |
| 149 | *BITMAP_ADDR16(bitmap, y+yi, x+xi) = screen->machine->pens[color+0x20]; |
| 150 | } |
| 151 | count+=8; |
| 147 | 152 | } |
| 148 | | count++; |
| 149 | 153 | } |
| 150 | 154 | } |
| 151 | 155 | |
| r9014 | r9015 | |
| 382 | 386 | cursor_addr = (cursor_addr & 0x3f00) | (data & 0xff); |
| 383 | 387 | |
| 384 | 388 | mc6845_register_w(space->machine->device("crtc"), 0,data); |
| 389 | |
| 390 | /* double pump the pixel clock if we are in 640 x 200 mode */ |
| 391 | mc6845_set_clock(space->machine->device("crtc"), (x_width) ? VDP_CLOCK*2 : VDP_CLOCK); |
| 385 | 392 | } |
| 386 | 393 | } |
| 387 | 394 | |
| r9014 | r9015 | |
| 719 | 726 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 720 | 727 | MDRV_SCREEN_SIZE(640, 480) |
| 721 | 728 | MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 200-1) |
| 722 | | MDRV_MC6845_ADD("crtc", H46505, XTAL_3_579545MHz/4, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */ |
| 729 | MDRV_MC6845_ADD("crtc", H46505, VDP_CLOCK, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */ |
| 723 | 730 | MDRV_PALETTE_LENGTH(0x28) |
| 724 | 731 | MDRV_PALETTE_INIT(pasopia7) |
| 725 | 732 | |