src/mess/drivers/multi8.c
| r8621 | r8622 | |
| 14 | 14 | |
| 15 | 15 | static UINT8 *vram; |
| 16 | 16 | static UINT8 mcu_init; |
| 17 | | static UINT8 keyb_press,keyb_press_flag; |
| 17 | static UINT8 keyb_press,keyb_press_flag,display_reg; |
| 18 | 18 | static UINT16 cursor_addr,cursor_raster; |
| 19 | 19 | |
| 20 | 20 | static VIDEO_START( multi8 ) |
| r8621 | r8622 | |
| 24 | 24 | static VIDEO_UPDATE( multi8 ) |
| 25 | 25 | { |
| 26 | 26 | int x,y,count; |
| 27 | int x_width; |
| 27 | 28 | count = 0x0000; |
| 28 | 29 | |
| 30 | x_width = (display_reg & 0x40) ? 80 : 40; |
| 31 | |
| 29 | 32 | for(y=0;y<25;y++) |
| 30 | 33 | { |
| 31 | | for(x=0;x<40;x++) |
| 34 | for(x=0;x<x_width;x++) |
| 32 | 35 | { |
| 33 | 36 | int tile = vram[count]; |
| 34 | 37 | int color = vram[count+0x800] & 0x20; |
| r8621 | r8622 | |
| 60 | 63 | } |
| 61 | 64 | } |
| 62 | 65 | } |
| 63 | | count+=2; |
| 66 | (display_reg & 0x40) ? count++ : count+=2; |
| 64 | 67 | } |
| 65 | 68 | } |
| 66 | 69 | return 0; |
| r8621 | r8622 | |
| 366 | 369 | static WRITE8_DEVICE_HANDLER( portb_w ) |
| 367 | 370 | { |
| 368 | 371 | // printf("Port B w = %02x\n",data); |
| 372 | |
| 373 | { |
| 374 | if((display_reg & 0x40) != (data & 0x40)) |
| 375 | { |
| 376 | rectangle visarea = device->machine->primary_screen->visible_area(); |
| 377 | int x_width; |
| 378 | |
| 379 | x_width = (data & 0x40) ? 640 : 320; |
| 380 | |
| 381 | visarea.min_x = visarea.min_y = 0; |
| 382 | visarea.max_y = (200) - 1; |
| 383 | visarea.max_x = (x_width) - 1; |
| 384 | |
| 385 | device->machine->primary_screen->configure(640, 200, visarea, device->machine->primary_screen->frame_period().attoseconds); |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | |
| 390 | display_reg = data; |
| 369 | 391 | } |
| 370 | 392 | |
| 371 | 393 | static WRITE8_DEVICE_HANDLER( portc_w ) |