barotto / test386.asm

x86 CPU tester for emulators
GNU General Public License v3.0
50 stars 4 forks source link

Implement Bochs' 0xE9 debugging port #2

Closed barotto closed 6 years ago

barotto commented 6 years ago

https://bitbucket.org/superfury/unipcemu/wiki/Debugging

superfury commented 6 years ago

I've written a bit of assembly that can be inserted at the logging printing support in print_p.asm, although it's made simple to only provide support for UniPCemu's/Bochs' shared port E9 hack and not the UniPCemu extensions of it(which also rely on port 0xEA with extra protocols). test386-portE9hack.zip

It works by simply detecting the port by probing it's value, then using it if it's detected. The patch was created using Sourcetree's patch support(my usual Smartgit program doesn't seem to support creating diff files).

barotto commented 6 years ago

I've decided to skip the autodetection because it would be called for every printed char, which would require too many cycles. A custom value in the config section will do.