Previous 15994 Revisions Next

r14218 Thursday 26th January, 2012 at 23:33:50 UTC by Angelo Salese
Fix for EGA address masking
[src/emu/video]pc_vga.c

src/emu/video/pc_vga.c
r14217r14218
2727   per-game issues:
2828   - The Incredible Machine: fix partial updates
2929   - MAME 0.01: fix 92 Hz refresh rate bug (uses VESA register?).
30   - Bio Menace: jerky H scrolling (uses EGA mode)
3031
3132    ROM declarations:
3233
r14217r14218
290291   UINT32 *bitmapline;
291292   pen_t pen;
292293
294   popmessage("%08x",EGA_START_ADDRESS);
295
293296   for (addr=EGA_START_ADDRESS, pos=0, line=0; line<LINES;
294297       line += height, addr += EGA_LINE_LENGTH)
295298   {
r14217r14218
297300      {
298301         bitmapline = &bitmap.pix32(line + yi);
299302
300         for (pos=addr, c=0, column=0; column<EGA_COLUMNS; column++, c+=8, pos=(pos+1)&0x3ffff)
303         for (pos=addr, c=0, column=0; column<EGA_COLUMNS; column++, c+=8, pos=(pos+1)&0xffff)
301304         {
302305            int data[4];
303306
304            data[0]=vga.memory[(pos & 0x1ffff)];
305            data[1]=vga.memory[(pos & 0x1ffff)+0x20000]<<1;
306            data[2]=vga.memory[(pos & 0x1ffff)+0x40000]<<2;
307            data[3]=vga.memory[(pos & 0x1ffff)+0x60000]<<3;
307            data[0]=vga.memory[(pos & 0xffff)];
308            data[1]=vga.memory[(pos & 0xffff)+0x20000]<<1;
309            data[2]=vga.memory[(pos & 0xffff)+0x40000]<<2;
310            data[3]=vga.memory[(pos & 0xffff)+0x60000]<<3;
308311
309312            for (i = 7; i >= 0; i--)
310313            {
r14217r14218
901904
902905         crtc_reg_write(space->machine(),vga.crtc.index,data);
903906         //space->machine().primary_screen->update_partial(space->machine().primary_screen->vpos());
904         //printf("%02x %02x %d\n",vga.crtc.index,data,space->machine().primary_screen->vpos());
907         #if 0
908         if((vga.crtc.index & 0xfe) != 0x0e)
909            printf("%02x %02x %d\n",vga.crtc.index,data,space->machine().primary_screen->vpos());
910         #endif
905911         break;
906912   }
907913}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team