Commit c92b2e845f0669c71081f0f637191d553f9f3499

Authored by bellard
1 parent 68e73e39

vga memory address fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@591 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 4 additions and 0 deletions
hw/vga.c
@@ -494,6 +494,8 @@ static uint32_t vga_mem_readb(uint32_t addr) @@ -494,6 +494,8 @@ static uint32_t vga_mem_readb(uint32_t addr)
494 default: 494 default:
495 case 3: 495 case 3:
496 addr -= 0xb8000; 496 addr -= 0xb8000;
  497 + if (addr >= 0x8000)
  498 + return 0xff;
497 break; 499 break;
498 } 500 }
499 501
@@ -570,6 +572,8 @@ void vga_mem_writeb(uint32_t addr, uint32_t val) @@ -570,6 +572,8 @@ void vga_mem_writeb(uint32_t addr, uint32_t val)
570 default: 572 default:
571 case 3: 573 case 3:
572 addr -= 0xb8000; 574 addr -= 0xb8000;
  575 + if (addr >= 0x8000)
  576 + return;
573 break; 577 break;
574 } 578 }
575 579