Browse Source

r897@Knoppix: root | 2008-03-27 20:57:24 +0800

change sm502's rgb12 to not default.
 add x86emu testchar() to debug and emulate inb 0x61.


git-svn-id: file:///svn/pmon-all/pmon-all@276 214b0138-1524-0410-9122-e5cb4b5bc56c
master
cpu 17 years ago
parent
commit
047c8c28ed
  1. 4
      sys/dev/pci/sm502.c
  2. 16
      x86emu/src/biosemu/besys.c
  3. 2
      x86emu/src/biosemu/freebiosvga.c
  4. 12
      x86emu/src/x86emu/decode.c

4
sys/dev/pci/sm502.c

@ -533,8 +533,8 @@ static void SmiSetRegs (void)
preg ++;
}
#ifdef DEVBD2F_SM502
if(!getenv("rgb24"))
write32(0x80000,0x0f413105); // bit21-20=1: 9-bit RGB 3:3:3.
if(getenv("sm502_rgb12"))
write32(0x80000,0x0f413105); // bit22-21=10b: 12-bit RGB 4:4:4.
#endif
}

16
x86emu/src/biosemu/besys.c

@ -290,9 +290,9 @@ DB( if (DEBUG_MEM())
#ifdef DEBUG_EMU_VGA
#define DEBUG_IO() (M.x86.debug & DEBUG_IO_TRACE_F)
void check_io(int port,int read,int val)
{
return;
if(port==0x40||port==0x43) return;
//if(port>0x3ff) return;
/* static int printed[1024];
@ -336,6 +336,20 @@ static unsigned short Int10Current_inb40time=0;
}
#endif
#ifdef MY61IO
{
static unsigned short Int10Current_inb61time=0;
if (port == 0x61) {
Int10Current_inb61time++;
val = (u8)(Int10Current_inb61time>>3);
#ifdef PRINT_PORT
printf(" inb(%#x) = %2.2x\n", port, val);
#endif
return val;
}
}
#endif
#if !defined(_PC) && !defined(_PC_PCI)
if (!pciCfg1in(port,(u32 *)&val,1))
#endif

2
x86emu/src/biosemu/freebiosvga.c

@ -119,7 +119,7 @@ int vga_bios_init(void)
// Execute the BIOS POST code
#ifdef DEBUG_EMU_VGA
X86EMU_trace_on();
//X86EMU_trace_on();
#endif
BE_callRealMode(0xC000,0x0003,&regs,&sregs);
#if 0

12
x86emu/src/x86emu/decode.c

@ -113,6 +113,18 @@ DB( printf("halted\n");
}
op1 = (*sys_rdb)(((u32)M.x86.R_CS << 4) + (M.x86.R_IP++));
(*x86emu_optab[op1])(op1);
#ifdef DEBUG_EMU_VGA
{
char c;
if(tgt_testchar()){
printf("press d to show debug info,x to exit,others to continue\n");
c=tgt_getchar();
if(c=='d')X86EMU_trace_on();
if(c=='x'){M.x86.debug &= ~DEBUG_EXIT;return;}
}
}
#endif
if (M.x86.debug & DEBUG_EXIT) {
M.x86.debug &= ~DEBUG_EXIT;
return;

Loading…
Cancel
Save