src/emu/video/pc_vga.c
| r14249 | r14250 | |
| 22 | 22 | - fix video update. |
| 23 | 23 | - rewrite video drawing functions (they are horrible) |
| 24 | 24 | - add VESA etc. |
| 25 | - "System Information" UI currently crashes the emulation |
| 25 | 26 | - (and many more ...) |
| 26 | 27 | |
| 27 | 28 | per-game issues: |
| 28 | 29 | - The Incredible Machine: fix partial updates |
| 29 | 30 | - MAME 0.01: fix 92 Hz refresh rate bug (uses VESA register?). |
| 30 | 31 | - Bio Menace: jerky H scrolling (uses EGA mode) |
| 32 | - Virtual Pool: ET4k unrecognized; |
| 33 | - California Chase (calchase): init bug causes messed up chars at POST |
| 34 | (gfxs works if you soft reset). |
| 31 | 35 | |
| 32 | 36 | ROM declarations: |
| 33 | 37 | |
| r14249 | r14250 | |
| 355 | 359 | addr %= vga.svga_intf.vram_size; |
| 356 | 360 | for (pos=curr_addr, c=0, column=0; column<VGA_COLUMNS; column++, c+=8, pos++) |
| 357 | 361 | { |
| 358 | | if(pos > vga.svga_intf.vram_size/4) |
| 362 | if(pos > 0x80000/4) |
| 359 | 363 | return; |
| 360 | 364 | |
| 361 | 365 | for(xi=0;xi<8;xi++) |
| r14249 | r14250 | |
| 382 | 386 | addr %= vga.svga_intf.vram_size; |
| 383 | 387 | for (pos=curr_addr, c=0, column=0; column<VGA_COLUMNS; column++, c+=0x10, pos+=0x8) |
| 384 | 388 | { |
| 385 | | if(pos + 0x08 > vga.svga_intf.vram_size) |
| 389 | if(pos + 0x08 > 0x80000) |
| 386 | 390 | return; |
| 387 | 391 | |
| 388 | 392 | for(xi=0;xi<0x10;xi++) |
| r14249 | r14250 | |
| 494 | 498 | addr %= vga.svga_intf.vram_size; |
| 495 | 499 | for (pos=curr_addr, c=0, column=0; column<VGA_COLUMNS; column++, c+=8, pos+=0x8) |
| 496 | 500 | { |
| 497 | | if(pos + 0x08 > vga.svga_intf.vram_size) |
| 501 | if(pos + 0x08 > 0x80000) |
| 498 | 502 | return; |
| 499 | 503 | |
| 500 | 504 | for(xi=0;xi<8;xi++) |
| 501 | 505 | { |
| 502 | 506 | if(!machine.primary_screen->visible_area().contains(c+xi, line + yi)) |
| 503 | 507 | continue; |
| 504 | | bitmapline[c+xi] = machine.pens[vga.memory[pos+(xi)]]; |
| 508 | bitmapline[c+xi] = machine.pens[vga.memory[(pos+(xi))|0x80000]]; |
| 505 | 509 | } |
| 506 | 510 | } |
| 507 | 511 | } |
| r14249 | r14250 | |
| 1364 | 1368 | } |
| 1365 | 1369 | else |
| 1366 | 1370 | { |
| 1367 | | vga.svga_intf.vram_size = 0x80000; |
| 1371 | vga.svga_intf.vram_size = 0x100000; |
| 1368 | 1372 | vga.svga_intf.seq_regcount = 0x05; |
| 1369 | 1373 | vga.svga_intf.gc_regcount = 0x09; |
| 1370 | 1374 | vga.svga_intf.crtc_regcount = 0x19; |
| r14249 | r14250 | |
| 1376 | 1380 | vga.gc.data = auto_alloc_array(machine, UINT8, vga.svga_intf.gc_regcount); |
| 1377 | 1381 | memset(vga.memory, '\0', vga.svga_intf.vram_size); |
| 1378 | 1382 | memset(vga.sequencer.data, '\0', vga.svga_intf.seq_regcount); |
| 1379 | | memset(vga.crtc.data, '\0', vga.svga_intf.crtc_regcount); |
| 1383 | memset(vga.crtc.data, '\0', 0x100); |
| 1380 | 1384 | memset(vga.gc.data, '\0', vga.svga_intf.gc_regcount); |
| 1381 | 1385 | |
| 1382 | 1386 | pc_vga_reset(machine); |
| 1387 | |
| 1383 | 1388 | } |
| 1384 | 1389 | |
| 1385 | 1390 | void pc_vga_io_init(running_machine &machine, address_space *mem_space, offs_t mem_offset, address_space *io_space, offs_t port_offset) |
| r14249 | r14250 | |
| 1629 | 1634 | { |
| 1630 | 1635 | if(svga.rgb8_en) |
| 1631 | 1636 | { |
| 1632 | | return vga.memory[offset+svga.bank_r*0x10000]; |
| 1637 | offset &= 0xffff; |
| 1638 | return vga.memory[(offset+svga.bank_r*0x10000) | 0x80000]; |
| 1633 | 1639 | } |
| 1634 | 1640 | |
| 1635 | 1641 | return vga_mem_r(space,offset); |
| r14249 | r14250 | |
| 1639 | 1645 | { |
| 1640 | 1646 | if(svga.rgb8_en) |
| 1641 | 1647 | { |
| 1642 | | vga.memory[offset+svga.bank_w*0x10000] = data; |
| 1648 | offset &= 0xffff; |
| 1649 | vga.memory[(offset+svga.bank_w*0x10000) | 0x80000] = data; |
| 1643 | 1650 | } |
| 1644 | 1651 | else |
| 1645 | 1652 | vga_mem_w(space,offset,data); |