Because this patch is one of the most complex ones applied to the original demo I've decided to post some screenshots of the assembler code I changed/added.
Because the original dynamic0.mul.q file is read per block (each dynidx0.mul.q entry being one block) I added a small cache engine to help speed up the modified reading process. To be honest, to make the loading process faster the complete dynamic0 loading code needs to be rewritten from scratch.
- Load & Init Cache & Read & Execute.jpg (84.92 KiB) Viewed 11584 times
Another change I had to make was adding code that checks the environment strings for IGNOREDYNIDX0 and that it is set to YES. This function was already patched into the UoDemo+ (used by SAVEDYNAMIC0), but I had to rewrite it a bit to gain extra bytes. On the screenshot: FUNC_GetDataOfMULusingIDX is the original function found in the demo, FUNC_GetDataOfDynamic0__PATCH is a function I created.
- Use Patch Or Not.jpg (94.17 KiB) Viewed 11584 times
The full FUNC_GetDataOfDynamic0__PATCH:
- The Big Function.jpg (248.48 KiB) Viewed 11584 times
These are screenshosts of the cache functions I added:
- Init Cache.jpg (29.03 KiB) Viewed 11584 times
- Update Cache.jpg (73.61 KiB) Viewed 11584 times
- Check Cache.jpg (74.03 KiB) Viewed 11584 times
To make this patch possible, a few regular demo functions had to be moved to other locations in memory. This is clearly seen should you do a bindiff between Publish 12 and Publish 13.