Commit graph

301 commits

Author SHA1 Message Date
StrikerX3
af0fb8bd71 Comment to remind me what to do next 2018-03-11 22:38:18 -03:00
StrikerX3
f9b0366bd2 More small changes
There seems to be a race condition happening when trying to read and/or write the serial port
2018-03-11 22:35:46 -03:00
StrikerX3
a7e61eecf5 Reverted to polling
It's less than ideal, but works a little better
2018-03-11 22:02:15 -03:00
StrikerX3
3f4e2125ba Some changes, but serial comm is still not working 2018-03-11 21:48:07 -03:00
StrikerX3
37992038c4 Partially working Windows serial character driver
Polling is pegging down a CPU for no good reason
2018-03-11 21:07:10 -03:00
StrikerX3
6076adab0a Fix FIFO entry type 2018-03-11 19:23:05 -03:00
StrikerX3
f599fa0145 Added serial character driver for Win32. Untested 2018-03-11 19:21:10 -03:00
StrikerX3
e4a3a9961b Implemented Super I/O, serial devices and a null char driver 2018-03-11 17:51:22 -03:00
StrikerX3
550a870680 Flesh out SuperIO and make devices map themselves
Only enable SuperIO on Debug Kits
2018-03-11 14:04:56 -03:00
StrikerX3
bc09528869 Stubbed SuperIO and CMOS devices
Properly clean up devices when Xbox is deleted
2018-03-11 13:32:13 -03:00
StrikerX3
131b7f9c80 Refactored I/O and MMIO mapping
The mapping is now performed by a separate object which allows I/O devices to be registered to specified I/O and/or MMIO ranges. It also prevents overlapping ranges.

All I/O methods have been standardized to the same convention.
2018-03-11 13:04:09 -03:00
StrikerX3
f6d6dfbbfb Basic NV2A implementation 2018-03-11 00:09:21 -03:00
StrikerX3
271b9ebe34 More PCI work 2018-03-10 20:56:41 -03:00
StrikerX3
7a59a9da68 Applied XQEMU modifications to i8259 2018-03-10 17:07:38 -03:00
StrikerX3
04e00a62a6 Implemented i8259 PIC 2018-03-10 17:05:10 -03:00
StrikerX3
6074baf827 Moved some port handling to the appropriate device
More logging changes
2018-03-10 15:54:38 -03:00
StrikerX3
0a60b3ba96 Minor logging fixes 2018-03-10 15:38:46 -03:00
StrikerX3
531cd7cf11 Fixes to BAR mapping 2018-03-10 15:35:17 -03:00
StrikerX3
87c1b86e65 Stub all PCI devices
Reorganized hardware emulation files
2018-03-10 15:09:49 -03:00
StrikerX3
bc3b3db18e Allow PCI config space access with offset 2018-03-10 14:03:18 -03:00
StrikerX3
8de91af403 Save APIC_BASE MSR 2018-03-10 14:03:00 -03:00
StrikerX3
4c8837fc4f Hack around unexpected MMIO instruction on HAXM 2018-03-10 12:11:46 -03:00
StrikerX3
1ed8ba3f7b Properly mask PCI config space writes 2018-03-10 11:14:55 -03:00
StrikerX3
dbfadc7015 PCI configuration space refactor 2018-03-10 00:19:00 -03:00
StrikerX3
377ac26d1d Added AGP bridge stub 2018-03-09 22:16:42 -03:00
StrikerX3
4cfb81fb40 Partially handle different read/write sizes on PCI config space 2018-03-09 22:04:42 -03:00
StrikerX3
110c4fc0fb More logging 2018-03-09 20:42:06 -03:00
StrikerX3
cdcb1279f9 Refactored PCI BARs 2018-03-09 19:52:30 -03:00
StrikerX3
99879724eb Added dummy MCPX Memory Controller device
Added SMBus BARs 0 and 2
Various fixes to PCI devices
Various logging improvements
2018-03-09 19:07:10 -03:00
StrikerX3
276e6e14bb MMIO operations were reversed 2018-03-09 19:03:20 -03:00
StrikerX3
bfc6fef53b Implemented basic i8254 PIT, replacing the system clock 2018-03-09 15:01:08 -03:00
StrikerX3
d060f6ad01 HAXM: inject interrupts before running the CPU 2018-03-09 15:00:24 -03:00
StrikerX3
56675a3b99 Log non-32-bit writes to PCI config space registers 2018-03-09 14:59:40 -03:00
StrikerX3
894a1f3234 Allow SMBus reads/writes larger than 8 bits 2018-03-09 14:58:47 -03:00
StrikerX3
2ad1fa3533 Use SMC challenge codes from XQEMU 2018-03-09 14:58:22 -03:00
StrikerX3
18d8759c84 Add registers to Conexant TV encoder
Not that they do anything right now...
2018-03-08 22:47:51 -03:00
StrikerX3
040487d9de Added dummy Conexant TV encoder device
This satifies all X-codes checks and gets us to the 2BL. Now HAXM is crashing due to an unexpected MMIO instruction
2018-03-08 22:06:45 -03:00
StrikerX3
b440ba9246 Fix HAXM I/O read 2018-03-08 21:43:38 -03:00
StrikerX3
79e3790f90 Basic hardware devices implementation
The emulator does something now, but seems to hang during initialization. Needs further investigation
2018-03-07 23:25:53 -03:00
Ivan Roberto de Oliveira
7b1a533b20 Update README regarding ROM 2018-03-06 14:11:34 -03:00
Ivan Roberto de Oliveira
074c6cbc3a Pass MCPX and BIOS ROM files as command line parameters
Added their paths to the settings struct
2018-03-06 08:16:48 -03:00
Ivan Roberto de Oliveira
31a19d05f3 Clear warning 2018-03-06 08:13:02 -03:00
StrikerX3
ebe81c9f39 Preparing some basic stuff 2018-03-05 23:21:57 -03:00
Ivan Roberto de Oliveira
7a019ac317 Prepare for full LLE implementation 2018-03-05 13:39:27 -03:00
StrikerX3
d60e1cafcb Fix GDB server on Windows 2018-01-23 07:42:23 -02:00
StrikerX3
8adecb5c2d Windows build support with VS 2017 2018-01-20 18:56:30 -02:00
Matt Borgerson
126fbd13a5 Fix issue with GDB breakpoints
This patch fixes an issue with GDB breakpoints where continuing after a
breakpoint would cause an invalid instruction exception. This was due
to how GDB sets soft breakpoints, and how Unicorn records the state
after emulation is halted.

GDB sets soft breakpoints using the single byte `int3` instruction
(CCh).  After the instruction executes, EIP will point to the next
instruction, which is likely to be in the middle of the instruction we
are trying to break on! In this case, roll EIP back by 1 so that when
GDB resumes execution, EIP is will be in the correct place.

An issue with calling kernel functions is also fixed. This was due to
how `hlt` instructions are used to enter kernel functions. If we are
single stepping code, execution will stop before the `hlt` is executed
but the code which looks to see if we are entering a kernel function
would execute and incorrectly calculate the import number.
2017-12-27 14:08:57 -07:00
Matt Borgerson
803f16b752 Update README 2017-12-25 21:37:23 -07:00
Matt Borgerson
94af31d238 Add GDB server to enable CPU debug
This patch adds support for remote debugging of the guest via the GDB
debugger. Once enabled, the emulator will open a TCP socket and wait
for the GDB client to connect upon startup before beginning XBE
execution.
2017-12-22 15:31:59 -07:00
Matt Borgerson
0737574f21 Add basic system framework
This patch adds just enough to initialize the system, load an XBE,
handle a couple of Kernel functions, and render the framebuffer. No
audio, networking, 3D graphics, or even real Kernel functions yet.
2017-12-16 02:32:11 -07:00