Previous 199869 Revisions Next

r32128 Tuesday 16th September, 2014 at 10:52:11 UTC by Barry Rodewald
trident: extended 3d8/3d9/CR0E new mode SVGA bank size.  BIOS now detects 2MB VRAM (but win95 is still clueless).
[src/emu/bus/isa]trident.c trident.h

trunk/src/emu/bus/isa/trident.c
r32127r32128
4444
4545   m_vblank_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vga_device::vblank_timer_cb),this));
4646   vga.svga_intf.seq_regcount = 0x0f;
47   vga.svga_intf.crtc_regcount = 0x50;
47   vga.svga_intf.crtc_regcount = 0x60;
4848   memset(&tri, 0, sizeof(tri));
4949}
5050
r32127r32128
5252{
5353   svga_device::device_reset();
5454   svga.id = 0xd3;  // identifies at TGUI9660XGi
55   tri.revision = 0x05;  // revision identifies as TGUI9680
55   tri.revision = 0x01;  // revision identifies as TGUI9680
5656   tri.new_mode = false;  // start up in old mode
5757   tri.dac_active = false;
5858   tri.linear_active = false;
r32127r32128
201201            if(tri.new_mode)
202202            {
203203               tri.sr0e_new = data ^ 0x02;
204               svga.bank_w = (data & 0x1f) ^ 0x02;  // bit 1 is inverted, used for card detection, it is not XORed on reading
204               svga.bank_w = (data & 0x3f) ^ 0x02;  // bit 1 is inverted, used for card detection, it is not XORed on reading
205205               if(!(tri.gc0f & 0x01))
206                  svga.bank_r = (data & 0x1f) ^ 0x02;
206                  svga.bank_r = (data & 0x3f) ^ 0x02;
207207               // TODO: handle planar modes, where bits 0 and 2 only are used
208208            }
209209            else
r32127r32128
281281         break;
282282      case 0x1f:
283283         tri.cr1f = data;  // "Software Programming Register"  written to by software (BIOS?)
284         debugger_break(machine());
284285         break;
285286      case 0x21:  // Linear aperture
286287         tri.cr21 = data;
r32127r32128
458459            break;
459460         case 8:
460461            if(tri.gc0f & 0x04)  // if enabled
461               res = svga.bank_w & 0x1f;
462               res = svga.bank_w & 0x3f;
462463            else
463464               res = 0xff;
464465            break;
465466         case 9:
466467            if(tri.gc0f & 0x04)  // if enabled
467468               if(tri.gc0f & 0x01)  // and if bank regs are separated
468                  res = svga.bank_r & 0x1f;
469                  res = svga.bank_r & 0x3f;
469470               else
470471                  res = 0xff;
471472            else
r32127r32128
493494         case 8:
494495            if(tri.gc0f & 0x04)  // if enabled
495496            {
496               svga.bank_w = data & 0x1f;
497               svga.bank_w = data & 0x3f;
497498               if(!(tri.gc0f & 0x01))  // if bank regs are not separated
498                  svga.bank_r = data & 0x1f; // then this is also the read bank register
499                  svga.bank_r = data & 0x3f; // then this is also the read bank register
499500            }
500501            break;
501502         case 9:
502503            if(tri.gc0f & 0x04)  // if enabled
503504            {
504505               if(tri.gc0f & 0x01)  // and if bank regs are separated
505                  svga.bank_r = data & 0x1f;
506                  svga.bank_r = data & 0x3f;
506507            }
507508            break;
508509         default:
trunk/src/emu/bus/isa/trident.h
r32127r32128
2222   virtual WRITE8_MEMBER(port_03d0_w);
2323   DECLARE_READ8_MEMBER(port_83c6_r);
2424   DECLARE_WRITE8_MEMBER(port_83c6_w);
25   DECLARE_READ8_MEMBER(vram_r) { if (svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb32_en) return vga.memory[offset % vga.svga_intf.vram_size]; else return 0xff; }
26   DECLARE_WRITE8_MEMBER(vram_w) { if (svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb32_en) vga.memory[offset % vga.svga_intf.vram_size] = data; }
2527   virtual READ8_MEMBER(mem_r);
2628   virtual WRITE8_MEMBER(mem_w);
2729   virtual UINT16 offset();

Previous 199869 Revisions Next


© 1997-2024 The MAME Team