Search Results
7/19/2025, 10:39:12 PM
>>105959002
A little bit of both. Some things could be pasted in directly from Ida and worked fine with minimal fixup, others I had to figure out. A lot of times when the compiler optimized loops it referenced adjacent pieces of data with an offset. Especially if referencing multiple pieces of data and it wanted to increment the same value for all of them. I have to fix this because I cannot guarantee identical data layout. Annoying but not too difficult.
Texture rendering I had to figure out too because they wrote a heavily optimized algorithm that did crazy pointer math on 64-bit values (4 16 bit DOS memory selectors) to draw up to 4 pixels at once. This won't work in modern x64 compilers where pointers are 64 bits themselves of course. Fortunately they had another slower (and simpler) algorithm that looks at each pixel individually so they can handle transparent pixels if the texture tile has any that I was able to re-write and adapt to modern pointers. I just made the optimized function call my adapted slower version too lol. I preserved the 16.16 fixed point math so it looks exactly the same with the textures kind of walking/shifting around like a Playstation 1. Same Z fighting issues of the original game too.
A little bit of both. Some things could be pasted in directly from Ida and worked fine with minimal fixup, others I had to figure out. A lot of times when the compiler optimized loops it referenced adjacent pieces of data with an offset. Especially if referencing multiple pieces of data and it wanted to increment the same value for all of them. I have to fix this because I cannot guarantee identical data layout. Annoying but not too difficult.
Texture rendering I had to figure out too because they wrote a heavily optimized algorithm that did crazy pointer math on 64-bit values (4 16 bit DOS memory selectors) to draw up to 4 pixels at once. This won't work in modern x64 compilers where pointers are 64 bits themselves of course. Fortunately they had another slower (and simpler) algorithm that looks at each pixel individually so they can handle transparent pixels if the texture tile has any that I was able to re-write and adapt to modern pointers. I just made the optimized function call my adapted slower version too lol. I preserved the 16.16 fixed point math so it looks exactly the same with the textures kind of walking/shifting around like a Playstation 1. Same Z fighting issues of the original game too.
7/18/2025, 4:05:17 PM
7/18/2025, 12:24:37 PM
Page 1