https://bugs.winehq.org/show_bug.cgi?id=55439
--- Comment #12 from Rafał Mużyło galtgendo@o2.pl ---
do you mean it prints & stops, or does it mean it only prints?
While I don't have this specific game (its title was never stated), I can give my personal suspicions, based on my own experiences with ruby maker games.
Those scripts are pure ruby with custom RGSS classes for the engine. Sometimes they do reach out to Win32 libs (via the relevant ruby mechanism), but it's relatively very rare.
This script 'debug output' nearly all of the time is simply 'puts' function, that does exactly what's on the envelope - outputs to stdout a string terminated with a '\n'. No waits are involved.
I'm not 100% if I follow the (interpreter's) sources correctly, but it seems ruby's win32 write function - here applied to stdout - is rb_w32_write in win32/win32.c (ruby makers are basically embedded ruby interpreters with some extra bits for sound/graphics output and minimal config management). Obviously, the engine uses a much older version, but the general design should roughly be the same.