After getting DOSBox to compile and then playing around with the memory reading functions to track the changes of the RAM location I wanted, I had the instruction pointer trace of the CoAB running.
The weird thing was the trail just stopped at the last good instruction location. So I dug around in the assembly of while loop, and found that I had flipped the while loop logic. Is should have been
while ( A == false **&&** B == false )
{...}
but was
while ( A == false **||** B == false )
{...}
Now the game moves on to the next bit of non-decoded assembly and stops. Yeah!
Now that I am on the other side of the simple decoding mistake, I’m feeling really pleased or chuffed as I was saying last night. But besides finding the silly mistake, I have:
- built up an assortment of tools, to better diagnose what the game is doing
- named quite a few global variables
- removed quite a few unused global variables (left overs from low level functions that no longer exist)
- improved the graphics drawing in places.
I think DOSBox is going to be very handy in completing this project. I also dream of ways of using it to decode other games that interest me like Ancient Art of War