Previous 199869 Revisions Next

r32043 Wednesday 10th September, 2014 at 02:54:07 UTC by Barry Rodewald
mach32,mach64: fixed crash when reading vblank state.
[src/emu/bus/isa]mach32.c mach32.h
[src/emu/video]pc_vga.c pc_vga.h

trunk/src/emu/video/pc_vga.c
r32042r32043
51645164      if(ati.ext_reg[0x3d] & 0x04)
51655165      {
51665166         offset &= 0x1ffff;
5167         return vga.memory[(offset+svga.bank_r*0x20000)];
5167         return vga.memory[(offset+svga.bank_r*0x20000) % vga.svga_intf.vram_size];
51685168      }
51695169      else
51705170      {
51715171         offset &= 0xffff;
5172         return vga.memory[(offset+svga.bank_r*0x10000)];
5172         return vga.memory[(offset+svga.bank_r*0x10000) % vga.svga_intf.vram_size];
51735173      }
51745174   }
51755175
r32042r32043
51835183      if(ati.ext_reg[0x3d] & 0x04)
51845184      {
51855185         offset &= 0x1ffff;
5186         vga.memory[(offset+svga.bank_w*0x20000)] = data;
5186         vga.memory[(offset+svga.bank_w*0x20000) % vga.svga_intf.vram_size] = data;
51875187      }
51885188      else
51895189      {
51905190         offset &= 0xffff;
5191         vga.memory[(offset+svga.bank_w*0x10000)] = data;
5191         vga.memory[(offset+svga.bank_w*0x10000) % vga.svga_intf.vram_size] = data;
51925192      }
51935193   }
51945194   else
trunk/src/emu/video/pc_vga.h
r32042r32043
340340protected:
341341   virtual void device_start();
342342   virtual void device_config_complete();
343   vga_device* m_vga;  // for pass-through
344   astring m_vga_tag;  // pass-through device tag
343345private:
344346   void ibm8514_draw_vector(UINT8 len, UINT8 dir, bool draw);
345347   void ibm8514_wait_draw_ssv();
r32042r32043
349351   void ibm8514_write_bg(UINT32 offset);
350352   void ibm8514_write(UINT32 offset, UINT32 src);
351353
352   vga_device* m_vga;  // for pass-through
353   astring m_vga_tag;  // pass-through device tag
354354   //UINT8* m_vram;  // the original 8514/A has it's own VRAM, but most VGA+8514 combination cards will have
355355               // only one set of VRAM, so this will only be needed in standalone 8514/A cards
356356   //UINT32 m_vramsize;
trunk/src/emu/bus/isa/mach32.c
r32042r32043
5454   return MACHINE_CONFIG_NAME( mach32_8514a );
5555}
5656
57void mach32_8514a_device::device_config_complete()
58{
59   m_vga = dynamic_cast<vga_device*>(owner());
60}
61
5762void mach32_8514a_device::device_start()
5863{
5964   mach8_device::device_start();
r32042r32043
118123   return MACHINE_CONFIG_NAME( mach64_8514a );
119124}
120125
126void mach64_8514a_device::device_config_complete()
127{
128   m_vga = dynamic_cast<vga_device*>(owner());
129}
130
121131void mach64_8514a_device::device_start()
122132{
123133   mach32_8514a_device::device_start();
trunk/src/emu/bus/isa/mach32.h
r32042r32043
2727protected:
2828   virtual void device_start();
2929   virtual void device_reset();
30   virtual void device_config_complete();
3031
3132   UINT16 m_chip_ID;
3233   UINT16 m_membounds;
r32042r32043
142143protected:
143144   virtual void device_start();
144145   virtual void device_reset();
146   virtual void device_config_complete();
145147};
146148
147149// main SVGA device

Previous 199869 Revisions Next


© 1997-2024 The MAME Team