Well, the host app is a mere thrall. The main game code is in the dll (a "module" as I call it). It can be recompiled and reloaded "on the fly" in the matter of milliseconds. For this to be possible, we need:
a). That the code won't be locked in Windows (does it by first copying the dll to a new location and only then launching it).
b). That the resources that take a long time to load (sounds, textures, the application window, the loaded and initialized OpenGL with its context) won't be unloaded together with the game code. So, the host application owns them all, serving as a storage basket for the game module when it gets unloaded, then loaded again.
c). That the session (the entire game state) is 100% saveable and is fully restored at reload. For this, I built my persistency system.

The goal?
To create a system where you can modify your algorithms on the fly, without restarting the game. (ever tried to build something for Morrowind or Neverwinter? Debugging eats up 95% of your time, because you need to restart the game each time).

now this looks HACKY
You didn't see chepersy then. It hacks into the VMT structure, injecting its own data there, the Delphi version needs to modify memory access rights to allows that.

PervertedFormat...? A bit similar to format. It takes a widestring (directly of from a text manager) where the parameters to be inserted marked with %0, %1 and so on, and a random list of parameters of random type ("array of const") and composes a message from it. Initially returned an array of widestrings (thus the name).

I started working on this thing when FreePascal was still in its diapers, wihout widestring and dynamic array support. Some things are left untouched since then.