Previous 15994 Revisions Next

r14250 Saturday 28th January, 2012 at 19:32:56 UTC by Angelo Salese
Some data work-around
[src/emu/video]pc_vga.c

src/emu/video/pc_vga.c
r14249r14250
2222    - fix video update.
2323   - rewrite video drawing functions (they are horrible)
2424   - add VESA etc.
25   - "System Information" UI currently crashes the emulation
2526    - (and many more ...)
2627
2728   per-game issues:
2829   - The Incredible Machine: fix partial updates
2930   - MAME 0.01: fix 92 Hz refresh rate bug (uses VESA register?).
3031   - 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).
3135
3236    ROM declarations:
3337
r14249r14250
355359            addr %= vga.svga_intf.vram_size;
356360            for (pos=curr_addr, c=0, column=0; column<VGA_COLUMNS; column++, c+=8, pos++)
357361            {
358               if(pos > vga.svga_intf.vram_size/4)
362               if(pos > 0x80000/4)
359363                  return;
360364
361365               for(xi=0;xi<8;xi++)
r14249r14250
382386            addr %= vga.svga_intf.vram_size;
383387            for (pos=curr_addr, c=0, column=0; column<VGA_COLUMNS; column++, c+=0x10, pos+=0x8)
384388            {
385               if(pos + 0x08 > vga.svga_intf.vram_size)
389               if(pos + 0x08 > 0x80000)
386390                  return;
387391
388392               for(xi=0;xi<0x10;xi++)
r14249r14250
494498         addr %= vga.svga_intf.vram_size;
495499         for (pos=curr_addr, c=0, column=0; column<VGA_COLUMNS; column++, c+=8, pos+=0x8)
496500         {
497            if(pos + 0x08 > vga.svga_intf.vram_size)
501            if(pos + 0x08 > 0x80000)
498502               return;
499503
500504            for(xi=0;xi<8;xi++)
501505            {
502506               if(!machine.primary_screen->visible_area().contains(c+xi, line + yi))
503507                  continue;
504               bitmapline[c+xi] = machine.pens[vga.memory[pos+(xi)]];
508               bitmapline[c+xi] = machine.pens[vga.memory[(pos+(xi))|0x80000]];
505509            }
506510         }
507511      }
r14249r14250
13641368   }
13651369   else
13661370   {
1367      vga.svga_intf.vram_size = 0x80000;
1371      vga.svga_intf.vram_size = 0x100000;
13681372      vga.svga_intf.seq_regcount = 0x05;
13691373      vga.svga_intf.gc_regcount = 0x09;
13701374      vga.svga_intf.crtc_regcount = 0x19;
r14249r14250
13761380   vga.gc.data         = auto_alloc_array(machine, UINT8, vga.svga_intf.gc_regcount);
13771381   memset(vga.memory, '\0', vga.svga_intf.vram_size);
13781382   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);
13801384   memset(vga.gc.data, '\0', vga.svga_intf.gc_regcount);
13811385
13821386   pc_vga_reset(machine);
1387
13831388}
13841389
13851390void pc_vga_io_init(running_machine &machine, address_space *mem_space, offs_t mem_offset, address_space *io_space, offs_t port_offset)
r14249r14250
16291634{
16301635   if(svga.rgb8_en)
16311636   {
1632      return vga.memory[offset+svga.bank_r*0x10000];
1637      offset &= 0xffff;
1638      return vga.memory[(offset+svga.bank_r*0x10000) | 0x80000];
16331639   }
16341640
16351641   return vga_mem_r(space,offset);
r14249r14250
16391645{
16401646   if(svga.rgb8_en)
16411647   {
1642      vga.memory[offset+svga.bank_w*0x10000] = data;
1648      offset &= 0xffff;
1649      vga.memory[(offset+svga.bank_w*0x10000) | 0x80000] = data;
16431650   }
16441651   else
16451652      vga_mem_w(space,offset,data);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team