fixed more missing functions

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

View File

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

View File

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

View File

@@ -99,7 +99,7 @@ int run_bios_int(int num)
return 1; return 1;
} }
static uint8_t inb(uint16_t port) uint8_t inb(uint16_t port)
{ {
uint8_t val = 0; uint8_t val = 0;
@@ -113,7 +113,7 @@ static uint8_t inb(uint16_t port)
return val; return val;
} }
static uint16_t inw(uint16_t port) uint16_t inw(uint16_t port)
{ {
uint16_t val = 0; uint16_t val = 0;
@@ -126,7 +126,7 @@ static uint16_t inw(uint16_t port)
return val; return val;
} }
static uint32_t inl(uint16_t port) uint32_t inl(uint16_t port)
{ {
uint32_t val = 0; uint32_t val = 0;
if ((port >= offset_port) && (port <= offset_port+0xFF)) 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; char temp[100], *p;
doprnt(xaddchar, x, y);
#ifdef DBG_X86EMU #ifdef DBG_X86EMU
{ {
p = temp; p = temp;
while(x[0] != 0) while (x[0] != 0)
{ {
if(x[0]=='%' && x[1]=='d') if (x[0] =='%' && x[1] =='d')
{ {
x+=2; x += 2;
Funcs_ltoa(p, y, 10); Funcs_ltoa(p, y, 10);
while(p[0] != 0) while (p[0] != 0)
p++; p++;
} }
else if(x[0]=='%' && x[1]=='x') else if (x[0]=='%' && x[1]=='x')
{ {
x+=2; x += 2;
*p++ = '0'; *p++ = '0';
*p++ = 'x'; *p++ = 'x';
y &= 0xffff; y &= 0xffff;
Funcs_ltoa(p, y, 16); Funcs_ltoa(p, y, 16);
while(p[0] != 0) while (p[0] != 0)
p++; p++;
} }
else else
*p++ = *x++; *p++ = *x++;
@@ -376,7 +377,7 @@ static int parse_line (char *s, int *ps, int *n)
int cmd; int cmd;
*n = 0; *n = 0;
while(*s == ' ' || *s == '\t') s++; while (*s == ' ' || *s == '\t') s++;
ps[*n] = *s; ps[*n] = *s;
switch (*s) { switch (*s) {
case '\n': case '\n':
@@ -393,7 +394,7 @@ static int parse_line (char *s, int *ps, int *n)
if (*s == '\n') if (*s == '\n')
return cmd; return cmd;
while(*s == ' ' || *s == '\t') s++; while (*s == ' ' || *s == '\t') s++;
sscanf(s,"%x",&ps[*n]); sscanf(s,"%x",&ps[*n]);
*n += 1; *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 outb(uint8_t val, uint16_t port);
extern void outw(uint16_t val, uint16_t port); extern void outw(uint16_t val, uint16_t port);
extern void outl(uint32_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 ------------------------------*/ /*------------------------- Global Variables ------------------------------*/
@@ -202,7 +200,7 @@ uint32_t X86API rdl(uint32_t addr)
#ifdef DEBUG_X86EMU_PCI #ifdef DEBUG_X86EMU_PCI
DPRINTVALHEX("rdl(", addr); DPRINTVALHEX("rdl(", addr);
#endif #endif
val = swap_long(*(uint32_t *)(offset_mem+addr)); val = swpl(*(uint32_t *)(offset_mem+addr));
#ifdef DEBUG_X86EMU_PCI #ifdef DEBUG_X86EMU_PCI
DPRINTVALHEX(") = ", val); DPRINTVALHEX(") = ", val);
DPRINT("\r\n"); DPRINT("\r\n");
@@ -227,7 +225,7 @@ uint32_t X86API rdl(uint32_t addr)
DPRINT("\r\n"); DPRINT("\r\n");
} }
#endif #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); // val = *(uint32_t *)(M.mem_base + addr);
} }
DB(if (DEBUG_MEM_TRACE()) DB(if (DEBUG_MEM_TRACE())
@@ -302,15 +300,7 @@ void X86API wrw(uint32_t addr, uint16_t val)
DPRINTVALHEX(") = ", val); DPRINTVALHEX(") = ", val);
DPRINT("\r\n"); DPRINT("\r\n");
#endif #endif
#ifdef DIRECT_ACCESS *(uint16_t *)(offset_mem+addr) = swpw(val);
*(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
} }
else else
{ {
@@ -358,15 +348,7 @@ void X86API wrl(uint32_t addr, uint32_t val)
DPRINTVALHEX(") = ", val); DPRINTVALHEX(") = ", val);
DPRINT("\r\n"); DPRINT("\r\n");
#endif #endif
#ifdef DIRECT_ACCESS *(uint32_t *)(offset_mem+addr) = swpl(val);
*(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
} }
else else
{ {
@@ -385,7 +367,7 @@ void X86API wrl(uint32_t addr, uint32_t val)
DPRINT("\r\n"); DPRINT("\r\n");
} }
#endif #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; // *(uint32_t *)(M.mem_base + addr) = val;
} }
DB(if (DEBUG_MEM_TRACE()) DB(if (DEBUG_MEM_TRACE())