That's a good question. I suppose dependencies do not depend on the build mode either.
I don't know, how to do it. Hardcoding search paths isn't good idea. And there is no easy way to do it, as for example add "-PLCL -PBGRABitmap" options to build mode. So here it is. With little optimization for ModeY - DosMemPut should be faster. There is even faster way - to access memory directly. But it requires asm code, I guess, as it's the only way to deal with selector in 32bit mode.
In order to compile DOS version you need to install
cross compiler, extract units from
here and choose Dos build mode. Problem is - you need to manually remove packages, cuz they won't compile in this mode. Program requires DOSBox or other DOS emulator to run. Or FreeDOS installed on real machine. Not sure, but CWSDPMI may be required.
CODE1 - initial Mode13 with lazy software double buffering
CODE2 - ModeY (320x200) with direct rendering and hardware double buffering (feels slower, than it should be, but fixing it would overcomplicate things)