fixed more missing functions

This commit is contained in:
Markus Fröschle
2013-12-29 23:44:09 +00:00
parent 7b4e8fa3a4
commit 14ac39a052
7 changed files with 5577 additions and 5598 deletions

View File

@@ -116,13 +116,14 @@ CSRCS= \
radeon_cursor.c \
radeon_monitor.c \
\
biosemu.c \
decode.c \
sys.c \
debug.c \
prim_ops.c \
ops.c \
ops2.c \
fpu.c \
biosemu.c \
x86pcibios.c \
\
basflash.c \

View File

@@ -86,11 +86,12 @@ SECTIONS
OBJDIR/fbmodedb.o
OBJDIR/offscreen.o
OBJDIR/biosemu.o
OBJDIR/decode.o
OBJDIR/ops.o
OBJDIR/ops2.o
OBJDIR/fpu.o
OBJDIR/sys.o
OBJDIR/biosemu.o
OBJDIR/debug.o
OBJDIR/prim_ops.o
OBJDIR/x86pcibios.o

View File

@@ -99,7 +99,7 @@ int run_bios_int(int num)
return 1;
}
static uint8_t inb(uint16_t port)
uint8_t inb(uint16_t port)
{
uint8_t val = 0;
@@ -113,7 +113,7 @@ static uint8_t inb(uint16_t port)
return val;
}
static uint16_t inw(uint16_t port)
uint16_t inw(uint16_t port)
{
uint16_t val = 0;
@@ -126,7 +126,7 @@ static uint16_t inw(uint16_t port)
return val;
}
static uint32_t inl(uint16_t port)
uint32_t inl(uint16_t port)
{
uint32_t val = 0;
if ((port >= offset_port) && (port <= offset_port+0xFF))

View File

@@ -176,27 +176,28 @@ void x86emu_decode_printf2 (char *x, int y)
{
char temp[100], *p;
doprnt(xaddchar, x, y);
#ifdef DBG_X86EMU
{
p = temp;
while(x[0] != 0)
while (x[0] != 0)
{
if(x[0]=='%' && x[1]=='d')
if (x[0] =='%' && x[1] =='d')
{
x+=2;
Funcs_ltoa(p, y, 10);
while(p[0] != 0)
p++;
x += 2;
Funcs_ltoa(p, y, 10);
while (p[0] != 0)
p++;
}
else if(x[0]=='%' && x[1]=='x')
else if (x[0]=='%' && x[1]=='x')
{
x+=2;
x += 2;
*p++ = '0';
*p++ = 'x';
y &= 0xffff;
Funcs_ltoa(p, y, 16);
while(p[0] != 0)
p++;
Funcs_ltoa(p, y, 16);
while (p[0] != 0)
p++;
}
else
*p++ = *x++;
@@ -376,7 +377,7 @@ static int parse_line (char *s, int *ps, int *n)
int cmd;
*n = 0;
while(*s == ' ' || *s == '\t') s++;
while (*s == ' ' || *s == '\t') s++;
ps[*n] = *s;
switch (*s) {
case '\n':
@@ -393,7 +394,7 @@ static int parse_line (char *s, int *ps, int *n)
if (*s == '\n')
return cmd;
while(*s == ' ' || *s == '\t') s++;
while (*s == ' ' || *s == '\t') s++;
sscanf(s,"%x",&ps[*n]);
*n += 1;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -60,8 +60,6 @@ extern uint32_t inl(uint16_t port);
extern void outb(uint8_t val, uint16_t port);
extern void outw(uint16_t val, uint16_t port);
extern void outl(uint32_t val, uint16_t port);
extern uint16_t swap_short(uint16_t val);
extern uint32_t swap_long(uint32_t val);
/*------------------------- Global Variables ------------------------------*/
@@ -202,7 +200,7 @@ uint32_t X86API rdl(uint32_t addr)
#ifdef DEBUG_X86EMU_PCI
DPRINTVALHEX("rdl(", addr);
#endif
val = swap_long(*(uint32_t *)(offset_mem+addr));
val = swpl(*(uint32_t *)(offset_mem+addr));
#ifdef DEBUG_X86EMU_PCI
DPRINTVALHEX(") = ", val);
DPRINT("\r\n");
@@ -227,7 +225,7 @@ uint32_t X86API rdl(uint32_t addr)
DPRINT("\r\n");
}
#endif
val = swap_long(*(uint32_t *)(M.mem_base + addr));
val = swpl(*(uint32_t *)(M.mem_base + addr));
// val = *(uint32_t *)(M.mem_base + addr);
}
DB(if (DEBUG_MEM_TRACE())
@@ -302,15 +300,7 @@ void X86API wrw(uint32_t addr, uint16_t val)
DPRINTVALHEX(") = ", val);
DPRINT("\r\n");
#endif
#ifdef DIRECT_ACCESS
*(uint16_t *)(offset_mem+addr) = swap_short(val);
#else
#ifdef PCI_XBIOS
write_mem_word(rinfo_biosemu->handle, offset_mem+addr, val);
#else
Write_mem_word(rinfo_biosemu->handle, offset_mem+addr, val);
#endif
#endif
*(uint16_t *)(offset_mem+addr) = swpw(val);
}
else
{
@@ -358,15 +348,7 @@ void X86API wrl(uint32_t addr, uint32_t val)
DPRINTVALHEX(") = ", val);
DPRINT("\r\n");
#endif
#ifdef DIRECT_ACCESS
*(uint32_t *)(offset_mem+addr) = swap_long(val);
#else
#ifdef PCI_XBIOS
write_mem_longword(rinfo_biosemu->handle, offset_mem+addr, val);
#else
Write_mem_longword(rinfo_biosemu->handle, offset_mem+addr, val);
#endif
#endif
*(uint32_t *)(offset_mem+addr) = swpl(val);
}
else
{
@@ -385,7 +367,7 @@ void X86API wrl(uint32_t addr, uint32_t val)
DPRINT("\r\n");
}
#endif
*(uint32_t *)(M.mem_base + addr) = swap_long(val);
*(uint32_t *)(M.mem_base + addr) = swpl(val);
// *(uint32_t *)(M.mem_base + addr) = val;
}
DB(if (DEBUG_MEM_TRACE())