Previous 199869 Revisions Next

r20020 Wednesday 2nd January, 2013 at 20:20:20 UTC by Angelo Salese
A bunch of MMIO hooks for S3 card, used on Win 95 16-bit color mode
[src/emu/cpu/i386]i386.c
[src/emu/video]pc_vga.c pc_vga.h

trunk/src/emu/video/pc_vga.c
r20019r20020
45544554{
45554555   ibm8514a_device* dev = get_8514();
45564556   // bit 4 of CR53 enables memory-mapped I/O
4557   // 0xA0000-0xA7ffff maps to port 0xE2E8 (pixel transfer)
4557   // 0xA0000-0xA7fff maps to port 0xE2E8 (pixel transfer)
45584558   if(s3.cr53 & 0x10)
45594559   {
45604560      if(offset < 0x8000)
r20019r20020
47564756         s3.mmio_bee8 = (s3.mmio_bee8 & 0x00ff) | (data << 8);
47574757         dev->ibm8514_multifunc_w(space,0,s3.mmio_bee8,0xffff);
47584758         break;
4759      case 0x96e8:
4760         s3.mmio_96e8 = (s3.mmio_96e8 & 0xff00) | data;
4761         break;
4762      case 0x96e9:
4763         s3.mmio_96e8 = (s3.mmio_96e8 & 0x00ff) | (data << 8);
4764         dev->ibm8514_width_w(space,0,s3.mmio_96e8,0xffff);
4765         break;
4766      case 0xe2e8:
4767         dev->ibm8514.pixel_xfer = (dev->ibm8514.pixel_xfer & 0xffffff00) | data;
4768         dev->ibm8514_wait_draw();
4769         break;
47594770      default:
47604771         if(LOG_8514) logerror("S3: MMIO offset %05x write %02x\n",offset+0xa0000,data);
47614772      }
trunk/src/emu/video/pc_vga.h
r20019r20020
551551      // data for memory-mapped I/O
552552      UINT16 mmio_9ae8;
553553      UINT16 mmio_bee8;
554      UINT16 mmio_96e8;
554555
555556      // hardware graphics cursor
556557      UINT8 cursor_mode;
trunk/src/emu/cpu/i386/i386.c
r20019r20020
854854               REG16(SP) = i386_get_stack_ptr(cpustate,DPL);
855855            if(V8086_MODE)
856856            {
857               logerror("IRQ (%08x): Interrupt during V8086 task\n",cpustate->pc);
857               //logerror("IRQ (%08x): Interrupt during V8086 task\n",cpustate->pc);
858858               if(type & 0x08)
859859               {
860860                  PUSH32(cpustate,cpustate->sreg[GS].selector & 0xffff);
r20019r20020
23012301         newESP = READ32(cpustate, ea+12);
23022302         newSS = READ32(cpustate, ea+16) & 0xffff;
23032303         /* Return to v86 mode */
2304         logerror("IRET (%08x): Returning to Virtual 8086 mode.\n",cpustate->pc);
2304         //logerror("IRET (%08x): Returning to Virtual 8086 mode.\n",cpustate->pc);
23052305         if(CPL != 0)
23062306         {
23072307            UINT32 oldflags = get_flags(cpustate);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team