First post, by superfury
When I try to run software other than the basic IBM AT BIOS starting up or running 80(1)86 MS-DOS software, it will end up at strange points in the executable code. Windows 95 setup(on the 80386+ emulation) will simply end up with infinite General Protection faults on an REP MOVSD instruction. The same kind of errors happen when I try to run Day of The Tentacle(DOTT.EXE, when starting the game from it's MS-DOS launcher).
Memory accesses itself:
MMU: https://bitbucket.org/superfury/unipcemu/src/ … mmu.c?at=master
Support for modr/m data and flags:
ModR/M: https://bitbucket.org/superfury/unipcemu/src/ … drm.c?at=master
Flags: https://bitbucket.org/superfury/unipcemu/src/ … ags.c?at=master
Opcodes themselves:
80286 opcodes: https://bitbucket.org/superfury/unipcemu/src/ … 286.c?at=master
80386 opcodes: https://bitbucket.org/superfury/unipcemu/src/ … 386.c?at=master
80386 0F opcodes: https://bitbucket.org/superfury/unipcemu/src/ … 386.c?at=master
Remaining protected mode functionality:
Paging: https://bitbucket.org/superfury/unipcemu/src/ … ing.c?at=master
Protected mode debugger: https://bitbucket.org/superfury/unipcemu/src/ … ing.c?at=master
Protected mode basics: https://bitbucket.org/superfury/unipcemu/src/ … ion.c?at=master
Multitasking(task switching itself to be exact): https://bitbucket.org/superfury/unipcemu/src/ … ing.c?at=master
The main functions involved in protected mode are:
Paging: is_paging, isvalidpage, mappage for paging translation and exception checking.
Multitasking: CPU_switchtask, CPU_TSSFault for task switching.
Protected mode debuggger: checkProtectedModeDebugger, checkProtectedModeDebuggerAfter for Protected Mode debugging using the debugger registers.
Protected mode basics: segmentWritten(for all segment register loading), CPU_MMU_start(for the start address of a segment register in linear memory), CPU_MMU_checklimit for memory checks in protected or other memory modes(when accessing memory using segments), checkSTICLI, disallowPOPFI, checkPortRights, CPU_ProtectedModeInterrupt(for protected mode interrupt execution).
The remaining given units handle different part of normal execution within the CPU(flags, opcodes, ModR/M decoding and access using the BIU).
Anyone can see if there are any errors with my handling of the protected-mode specific features? Up until the 80286 have been adjustted to use the BIU to access memory and BUS. The 80386 opcodes and extensions still uses them directly(without taking care of any BUS timings by using the BIU, atm).
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io