I was thinking more along the lines of ISA, PCI etc.Owen wrote:"What bus does it use?"
I'd guess, given that it's based upon the 8086, that it would use the 8086 bus...
JAL
I was thinking more along the lines of ISA, PCI etc.Owen wrote:"What bus does it use?"
I'd guess, given that it's based upon the 8086, that it would use the 8086 bus...
my guess would be it doesn't have any bus in that sort, probably just hacked together stuff working off a multiplexer and the IO ports of the 8086jal wrote:I was thinking more along the lines of ISA, PCI etc.Owen wrote:"What bus does it use?"
I'd guess, given that it's based upon the 8086, that it would use the 8086 bus...
JAL
Well, I wasn't actually for sure what the official startup address was. I can change that very quickly, as I wasn't aware there was an official one(so I just used the BIOS reset address).myk wrote:Last night I started playing with x86Lib. Very nice I must say. I put one of my old binaries from school as the bios.bin file and hacked around in the WriteByte stuff to catch everything going to location 0x50002 and print it to the console (this is the address for the LCD data) and it actually prints out the bootup memtest message before it causes the cpu to panic during the memtest (I'm sure I have something setup wrong).
I think I'm going to make a little Qt app that displays a 4x20 character LCD and I'll hook that into the WriteByte so I can emulate the LCD. 0x50000 is the LCD Command address so I'd have to emulate that as well but it shouldn't be too difficult. Might be a nice weekend project. If I can get this thing going nicely I'll have to forward it onto my old professor and maybe he can use it for class.
About the dev tools I was using before, I scrapped them in favor of some old Intel toolchain I found that works perfectly. So far I've just dink-ed around with some asm bootup code to C and after inspecting the binary coming from the locator it looks like everything is working perfectly. I'm very excited! Once I get it going, I'll post a little tutorial how to write your own startup ROM.
Speaking of bootup code, I'm wondering why the x86Lib doesn't start with CS:IP at 0xF000:0xFFFE? That's technically the x86 reset address. It currently starts at 0xF000:0x0000 which works due to how my ROM is setup, but if someone has data other than the executable at location 0 of their ROM it will be executed as code.
Code: Select all
LCD Command: 38
LCD Command: 38
LCD Command: 38
LCD Command: 38
LCD Command: 1
LCD Command: 6
LCD Command: c
LCD Command: 2
LCD Command: 80
Physical Memory TestCPU Panic!
Message: 16bit Faults
Code: 0x1f006
EAX: 5555
ECX: ffff
EDX: 0
EBX: 0
ESP: 1000
EBP: 0
ESI: 0
EDI: 0
CS: f000
SS: 0
DS: 0
ES: 0
FS: 0
GS: 0
EIP: 3b
--Flags:44
CF: 0
PF: 1
AF: 0
ZF: 1
SF: 0
TF: 0
IF: 0
DF: 0
OF: 0
Code: Select all
MOV Cursor_Row B, 0
MOV Cursor_Column B, 0
CALL Set_Pos
MOV DX, OFFSET s_mem_check ;output check of memory string
CALL Write_String
Code: Select all
static const uint32_t DIV0_IEXCP=0xF000; //Divide by zero exception
static const uint32_t DEBUG_IEXCP=0xF001; //Debug exception
static const uint32_t NMI_IEXCP=0xF002; //NMI
static const uint32_t BREAK_IEXCP=0xF003; //Breakpoint/int 3
static const uint32_t OVERFLOW_IEXCP=0xF004; //Overflow/into
static const uint32_t BOUNDS_IEXCP=0xF005; //Bounds Check
static const uint32_t UNK_IEXCP=0xF006; //unknown opcode
static const uint32_t UNDEV_IEXCP=0xF007; //Unknown device
static const uint32_t DOUBLE_FAULT_IEXCP=0xF008;
static const uint32_t SEG_OVERRUN_IEXCP=0xF009; //Co-processor segment overrun..(not used after i486
static const uint32_t ITSS_IEXCP=0xF00A; //Invalid TSS
static const uint32_t ISEG_IEXCP=0xF00B; //Invalid/non-existent segment
static const uint32_t STACK_IEXCP=0xF00C; //Stack Exception
static const uint32_t GPF_IEXCP=0xF00D; //GPF
static const uint32_t PAGE_FAULT_IEXCP=0xF00E;
static const uint32_t RESERVED_IEXCP=0xF00F; //Reserved by intel, so internal use?
static const uint32_t FLOAT_ERROR_IEXCP=0xF010; //Floating Point Error..
static const uint32_t ALIGN_IEXCP=0xF011; //Alignment Check...
Code: Select all
Addr Opcode Instruction
0032: B85555 MOV AX, 5555
0035: B9FFFF MOV CX, FFFF
0038: FC CLD
0039: FA CLI
003A: F3 REPZ
0003B: AB STOSW <- Invalid Instruction
holy crap! I'm missing an opcode lolmyk wrote:The Opcode it's choking on is 0xAB (STOSW). According to the debugger built into windows (debug at the command prompt) this is what is happening:
Code: Select all
Addr Opcode Instruction 0032: B85555 MOV AX, 5555 0035: B9FFFF MOV CX, FFFF 0038: FC CLD 0039: FA CLI 003A: F3 REPZ 0003B: AB STOSW <- Invalid Instruction