Open lethal-guitar opened 4 months ago
Yeah, that could be a bit of work. The instruction decoding logic in instruction.cpp
would need to be extended, the (limited) register tracking logic in class Registers
likewise would need 32bit regs support... should be totally doable.
Where I foresee the most trouble is with protected mode and flat addressing. Right now, it's tied to real mode and assumes segmented addressing. For real mode, it should work, but I'm not sure how many games use 386 instructions in real mode. For 286 that might be a significant number, so could be worth it.
However, as things stand today, I'm swamped adding more features for the 8086 functionality and working on the f15se2 reconstruction, so not likely I'm going to pick it up anytime soon.
Extending the toolkit to support instructions added in 286/386 CPUs would make the tools usable for a wider range of real-mode DOS games. For example, these newer CPUs support shifting by values other than 1 when specifying the shift amount via immediate operand (i.e.
SHL 5
), whereas the original 8086/8088 only supports shifting by 1 or by a value specified in a register.I understand that this might not be in scope for the foreseeable future, since the primary focus of the toolkit is to support your reversing efforts on Strike Eagle II, but it would be nice to have. I might be interested in working on this myself at some point, although likely not anytime soon.