src/emu/video/pc_vga.c
| r14213 | r14214 | |
| 172 | 172 | #define GRAPHIC_MODE (vga.gc.data[6]&1) /* else textmodus */ |
| 173 | 173 | |
| 174 | 174 | #define EGA_COLUMNS (vga.crtc.data[1]+1) |
| 175 | | #define EGA_START_ADDRESS ((vga.crtc.data[0xd]|(vga.crtc.data[0xc]<<8))) |
| 175 | #define EGA_START_ADDRESS (vga.crtc.start_addr) |
| 176 | 176 | #define EGA_LINE_LENGTH (vga.crtc.offset<<1) |
| 177 | 177 | |
| 178 | 178 | #define VGA_COLUMNS (vga.crtc.data[1]+1) |
| 179 | | #define VGA_START_ADDRESS (vga.crtc.start_addr<<3) |
| 179 | #define VGA_START_ADDRESS (vga.crtc.start_addr) |
| 180 | 180 | #define VGA_LINE_LENGTH (vga.crtc.offset<<3) |
| 181 | 181 | |
| 182 | 182 | #define CHAR_WIDTH ((vga.sequencer.data[1]&1)?8:9) |
| r14213 | r14214 | |
| 344 | 344 | /* line compare is screen sensitive */ |
| 345 | 345 | mask_comp = 0x0ff | (LINES & 0x300); |
| 346 | 346 | |
| 347 | | popmessage("%02x",vga.sequencer.data[4]); |
| 348 | | |
| 349 | 347 | curr_addr = 0; |
| 350 | | /* TODO: fix me */ |
| 351 | 348 | if(!(vga.sequencer.data[4] & 0x08)) |
| 352 | 349 | { |
| 353 | 350 | for (addr = VGA_START_ADDRESS, line=0; line<LINES; line+=height, addr+=VGA_LINE_LENGTH/4, curr_addr+=VGA_LINE_LENGTH/4) |
| r14213 | r14214 | |
| 360 | 357 | curr_addr = 0; |
| 361 | 358 | bitmapline = &bitmap.pix32(line + yi); |
| 362 | 359 | addr %= vga.svga_intf.vram_size; |
| 363 | | for (pos=curr_addr, c=0, column=0; column<VGA_COLUMNS; column++, c+=0x10, pos+=0x8) |
| 360 | for (pos=curr_addr, c=0, column=0; column<VGA_COLUMNS; column++, c+=8, pos++) |
| 364 | 361 | { |
| 365 | | if(pos + 0x08 > vga.svga_intf.vram_size) |
| 362 | if(pos > vga.svga_intf.vram_size/4) |
| 366 | 363 | return; |
| 367 | 364 | |
| 368 | | for(xi=0;xi<0x10/4;xi++) |
| 365 | for(xi=0;xi<8;xi++) |
| 369 | 366 | { |
| 370 | | int bank_n; |
| 371 | | xi_h = (xi); |
| 372 | | |
| 373 | | for(bank_n=0;bank_n<4;bank_n++) |
| 367 | for(xi_h=0;xi_h<8;xi_h++) |
| 374 | 368 | { |
| 375 | | if(!machine.primary_screen->visible_area().contains(c+xi+bank_n, line + yi)) |
| 369 | if(!machine.primary_screen->visible_area().contains(c+xi*8+xi_h, line + yi)) |
| 376 | 370 | continue; |
| 377 | | |
| 378 | | bitmapline[c+xi*4+bank_n] = machine.pens[vga.memory[pos+xi_h+bank_n*0x20000]]; |
| 371 | bitmapline[c+xi*8+xi_h] = machine.pens[vga.memory[pos+((xi_h >> 1)*0x20000)]]; |
| 379 | 372 | } |
| 380 | 373 | } |
| 381 | 374 | } |