BEWARE: this test could be unsafe for your computer!
@crazyc :
I was wondering if I could get some help about this strange case. The game is a obscure Spanish adventure that I found on MyAbandonware. I tried to follow the install instructions, but on Win11 I could not complete the install, so I organized the files and the registry entries by myself. I got a nice full RIP with fake-CD and CDA music that plays very well up to the main menu. But when I select the Hispanic equivalent for "new game" something strange happens: the whole computer freezes for about one minute where no actions can be performed, not even the usual Ctrl-Alt-Del sequence. This seems quite unexpected on Win11, and I am wondering what sort of operation could cause this sort of problem. Of course, I tried to debug the game, but the debugger was frozen as everything else, so that was not possible.
It is possible that my RIP could be wrong, but nevertheless I can't understand what could make all this. In case you was to give it a try, my RIP and DxWnd profile (required because it has the registry entries) was uploaded here: https://we.tl/t-j7eQv3TSAuZxi6mY
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I go to new game it just exits. It seems to grab the mouse so clicks are unresponsive everywhere but the computer otherwise seems to be fine. Pressing the windows key breaks it out. Debugging shows it's looking for save\default.gb3 to have ALOB at the start but it has ALAC instead.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmm here in Win7 it works.
The game installs only 3 files in the folder c:\Archivos de Programa\Zeta Games\Capitán Trueno 2\ (attached). I also attach the registry entry.
After selecting a new game, a very long conversational intro starts. Then the game itself follows.
In the meanwhile I tried some experiment with the first episode "El Capitán Trueno en la Montaña de los Suspiros" that seems implemented with the same engine. Here, maybe because I found a way to install the game somehow, I noted a game bug that could be related with the second game as well.
The game uses a registry key SAVEPATH to tell where the saved games should be placed, the default savegame being $SAVEPATH\savegame.sav, but when reading this key there is an error for insufficient buffer size and the game logs an attempt to access to "(NULL)/savegame.sav".
This happens with my fake-registry, but it should not be different from what it happens with the system registry:
I tried to set the savegame path to a path shorter than 12 characters, but that didn't help. Maybe I will have to revise my implementation for the RegEnumValueA call, perhaps I made a mistake and I should have returned the string length for the buffer allocation. Well, after Easter I will try. Happy Easter and thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Happy Easter. I am attaching a savefile from the beginning of the game.
There are some graphical problems with DxWnd, you can see it in the picture, it won't happen without DxWnd.
Update:
I take it back, it happens even without DxWnd, I just didn't notice it.
Here is my registry log.
Update2:
OK, the Support offscreen 3D flag was causing the artifacts.
I found the real default.gb3 in the cd image. Game starts properly with this. Annoyingly it's aggressive mouse capture tends to crash explorer. Center on exit seems to help by fooling the game into thinking the mouse is still in the window.
In the meanwhile I moved my focus on the first episode "El Capitán Trueno en la Montaña de los Suspiros" that, as I supposed, shared with the second episodes all the troubles.
I start to realize that this incredible situation is the sum of many different problems. I will try to list those that I met so far:
1) the CD installer "Instalar.exe" doesn't let you chose the target folder (at least, here on my Win11) and copies the files to C:\Program Files (x86)\Zeta Multimedia\Capitán Trueno (or "Trueno 2" for the second episode). This folder is protected on Win11, so any attempt to write on savegame.savfails and saving/loading the game locks the game. The problem can be fixed by moving the entire folder somewhere else (like C:\Games\Capitán Trueno) and editing the registry key "SAVEPATH" to reflect the new situation.
2) To make a relocable RIP it is necessary to copy the registry keys on the DxWnd virtual registry, but as I supposed and feared, DxWnd has a bug here. The savegame file s correct with the system registry, it has a (NULL) folder value with the fake registry, so this is definitely a DxWnd BUG!! Let me fix it, in the meanwhile it is necessary not to use the fake registry.
3) Even with correct setup and registry, the game hangs when clicking on the "Salir" (Exit) command. Here I suspect that the problem could be of a different nature. I see no exceptions here nor mouse GetMousePosition() operations, but, as crazyc said, the game seems suffering because of an "aggressive mouse capture". The problem is that I can't see any input operation in the log. I wonder if it is possible that the game is using some legacy BIOS interrupt to tell the mouse position, or whatever it could be.
4) The only good news is that the fake-CD mechanism instead works perfectly, so we can use it to eliminate the need to mount a CD image.
@crazyc : please, could you explain better what you mean by ALOB vs. ALAC? A link to some documentation will be enough.
Last edit: gho 5 days ago
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Regarding Trueno 2, in WinXP it was in c:\Archivos de Programa\Zeta Games\Capitán Trueno 2\ but the installer couldn't create it and ended with an error. I had to create the folders manually and then the installation went fine. @crazyc probably means the file header default.gb3.
It seems that I really got into troubles with these two games.
The problem about virtual registry is complex.
From the logs, I believe that the game uses RegQueryInfoKeyA to get information about the sub-keys like the number of keys and the maximum key value length. Once assessed these values, the game loops into the registry sub-keys with RegEnumValueA using a reasonable buffer size.
Instead, the implementation of my fake RegQueryInfoKeyA is not accurate and outputs wrong numbers (like 0 sub-keys with 0 size!) so the buffer is badly allocated, the RegEnumValueA can throw exceptions and return ERROR_MORE_DATA.
When I first wrote the RegQueryInfoKeyA I didn't know how to handle these values and I left the work unfinished, hoping that that part would never be useful. Well, I was wrong.
Anyway, while I try to fill the gap and fix the registry wrappers, every test costs me one minute of idle wait because of the blocked screen, so I would really appreciate a solution for that mouse problem as well, it would save me time and frustration.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll be out of home until afternoon, but I already patched the RegQueryInfoKeyA to return a big enough size value and it works. The code is to be finished (a constant value is not good enough for all cases, I need to calculate the value) but the game now works perfectly with fake-CD and fake-Registry (so it is perfectly portable) except for the annoying problem of the locked desktop for about one minute when you select "Salir". Once fixed that problem these two games will be all right.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Done.
I fixed the RegQueryInfoKeyA wrapper that now no longer crashes the game when using the fake-registry entries.
Now "El Capitán Trueno en la Montaña de los Suspiros" works perfectly except for the annoying locked desktop on the "Salir" (exit) command.
Instead I messed something with "El Capitán Trueno: La Espada del Toledano", but surely is some mistake I did.
The fixed dxwnd.dll is in the .rc thread as .rc7
In attach my relocatable profile with fake-registry and fake-CD H:
Good news, I found that for some unknown reason the delay on the game termination (Salir) was related to some mess in the DirectInput handling. I cleaned my configuration turning off some unnecessary flags and now the game is very responsive. In attach my last (and definitive?) configuration.
Instead, I still have troubles with the second episode, but probably I messed some configuration here again.
El Capitan Trueno still hides some surprise.
I got the two game exiting with no hang, but the configuration was not replicate. I saved all the game folder and configuration, deleted everything and restored from the backup and the hang was still there. A way to make the game more responsive is to unhook DirectInput: this way the game reacts well, but the mouse control is lost and you can't play the game, but it is a track for some research maybe.
Also, despite not proven yet, I noted that the hang period seems to depend on the duration of the play session: the more you fiddle with the game and the more you'll have to wait to return responsive.
Apart from this mysterious problem, I noted another small flaw: the first episode has only one save slot, but the second episode has 10 slots and when you save the game you can select one of them. When the slot is selected a short description with location and timestamp appears on the slot, but when you load a saved game all slot descriptions are empty, so you have to chose one blindly.
Last edit: gho 3 days ago
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When the slot is selected a short description with location and timestamp appears on the slot, but when you load a saved game all slot descriptions are empty.....
This is very strange, because here it works, look.
Oh, yes, so obviously no timestamp will ever be visible as long as I use the virtual-registry with the "Override registry" flag! Well, it's not too bad because the savegame files is created and accessed anyway, you only have to know what slot to select.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
BEWARE: this test could be unsafe for your computer!
@crazyc :
I was wondering if I could get some help about this strange case. The game is a obscure Spanish adventure that I found on MyAbandonware. I tried to follow the install instructions, but on Win11 I could not complete the install, so I organized the files and the registry entries by myself. I got a nice full RIP with fake-CD and CDA music that plays very well up to the main menu. But when I select the Hispanic equivalent for "new game" something strange happens: the whole computer freezes for about one minute where no actions can be performed, not even the usual Ctrl-Alt-Del sequence. This seems quite unexpected on Win11, and I am wondering what sort of operation could cause this sort of problem. Of course, I tried to debug the game, but the debugger was frozen as everything else, so that was not possible.
It is possible that my RIP could be wrong, but nevertheless I can't understand what could make all this. In case you was to give it a try, my RIP and DxWnd profile (required because it has the registry entries) was uploaded here: https://we.tl/t-j7eQv3TSAuZxi6mY
When I go to new game it just exits. It seems to grab the mouse so clicks are unresponsive everywhere but the computer otherwise seems to be fine. Pressing the windows key breaks it out. Debugging shows it's looking for save\default.gb3 to have ALOB at the start but it has ALAC instead.
Hmm here in Win7 it works.
The game installs only 3 files in the folder c:\Archivos de Programa\Zeta Games\Capitán Trueno 2\ (attached). I also attach the registry entry.
After selecting a new game, a very long conversational intro starts. Then the game itself follows.
Last edit: huh 5 days ago
In the meanwhile I tried some experiment with the first episode "El Capitán Trueno en la Montaña de los Suspiros" that seems implemented with the same engine. Here, maybe because I found a way to install the game somehow, I noted a game bug that could be related with the second game as well.
The game uses a registry key SAVEPATH to tell where the saved games should be placed, the default savegame being $SAVEPATH\savegame.sav, but when reading this key there is an error for insufficient buffer size and the game logs an attempt to access to "(NULL)/savegame.sav".
This happens with my fake-registry, but it should not be different from what it happens with the system registry:
I tried to set the savegame path to a path shorter than 12 characters, but that didn't help. Maybe I will have to revise my implementation for the RegEnumValueA call, perhaps I made a mistake and I should have returned the string length for the buffer allocation. Well, after Easter I will try. Happy Easter and thanks.
Happy Easter. I am attaching a savefile from the beginning of the game.
There are some graphical problems with DxWnd, you can see it in the picture, it won't happen without DxWnd.
Update:
I take it back, it happens even without DxWnd, I just didn't notice it.
Here is my registry log.
Update2:
OK, the Support offscreen 3D flag was causing the artifacts.
Last edit: huh 5 days ago
I found the real default.gb3 in the cd image. Game starts properly with this. Annoyingly it's aggressive mouse capture tends to crash explorer. Center on exit seems to help by fooling the game into thinking the mouse is still in the window.
Last edit: crazyc 5 days ago
This is the same file in my archive posted above.
https://sourceforge.net/p/dxwnd/discussion/general/thread/9784e4f835/#8386
I used the approach "Do not notify on task switch" + "Hook dinput" + "Unacquire input devices on focus lost"
Last edit: huh 5 days ago
In the meanwhile I moved my focus on the first episode "El Capitán Trueno en la Montaña de los Suspiros" that, as I supposed, shared with the second episodes all the troubles.
I start to realize that this incredible situation is the sum of many different problems. I will try to list those that I met so far:
1) the CD installer "Instalar.exe" doesn't let you chose the target folder (at least, here on my Win11) and copies the files to
C:\Program Files (x86)\Zeta Multimedia\Capitán Trueno(or "Trueno 2" for the second episode). This folder is protected on Win11, so any attempt to write onsavegame.savfails and saving/loading the game locks the game. The problem can be fixed by moving the entire folder somewhere else (likeC:\Games\Capitán Trueno) and editing the registry key "SAVEPATH" to reflect the new situation.2) To make a relocable RIP it is necessary to copy the registry keys on the DxWnd virtual registry, but as I supposed and feared, DxWnd has a bug here. The savegame file s correct with the system registry, it has a (NULL) folder value with the fake registry, so this is definitely a DxWnd BUG!! Let me fix it, in the meanwhile it is necessary not to use the fake registry.
3) Even with correct setup and registry, the game hangs when clicking on the "Salir" (Exit) command. Here I suspect that the problem could be of a different nature. I see no exceptions here nor mouse GetMousePosition() operations, but, as crazyc said, the game seems suffering because of an "aggressive mouse capture". The problem is that I can't see any input operation in the log. I wonder if it is possible that the game is using some legacy BIOS interrupt to tell the mouse position, or whatever it could be.
4) The only good news is that the fake-CD mechanism instead works perfectly, so we can use it to eliminate the need to mount a CD image.
@crazyc : please, could you explain better what you mean by ALOB vs. ALAC? A link to some documentation will be enough.
Last edit: gho 5 days ago
Regarding Trueno 2, in WinXP it was in c:\Archivos de Programa\Zeta Games\Capitán Trueno 2\ but the installer couldn't create it and ended with an error. I had to create the folders manually and then the installation went fine. @crazyc probably means the file header default.gb3.
Last edit: huh 5 days ago
It seems that I really got into troubles with these two games.
The problem about virtual registry is complex.
From the logs, I believe that the game uses RegQueryInfoKeyA to get information about the sub-keys like the number of keys and the maximum key value length. Once assessed these values, the game loops into the registry sub-keys with RegEnumValueA using a reasonable buffer size.
Instead, the implementation of my fake RegQueryInfoKeyA is not accurate and outputs wrong numbers (like 0 sub-keys with 0 size!) so the buffer is badly allocated, the RegEnumValueA can throw exceptions and return ERROR_MORE_DATA.
When I first wrote the RegQueryInfoKeyA I didn't know how to handle these values and I left the work unfinished, hoping that that part would never be useful. Well, I was wrong.
Anyway, while I try to fill the gap and fix the registry wrappers, every test costs me one minute of idle wait because of the blocked screen, so I would really appreciate a solution for that mouse problem as well, it would save me time and frustration.
I can't try it on Win11 today, but none of this helps?
https://sourceforge.net/p/dxwnd/discussion/general/thread/9784e4f835/#8e9f/b060/ca76
https://sourceforge.net/p/dxwnd/discussion/general/thread/9784e4f835/#8e9f/b060/ca76/3d48
I'll be out of home until afternoon, but I already patched the RegQueryInfoKeyA to return a big enough size value and it works. The code is to be finished (a constant value is not good enough for all cases, I need to calculate the value) but the game now works perfectly with fake-CD and fake-Registry (so it is perfectly portable) except for the annoying problem of the locked desktop for about one minute when you select "Salir". Once fixed that problem these two games will be all right.
Done.
I fixed the RegQueryInfoKeyA wrapper that now no longer crashes the game when using the fake-registry entries.
Now "El Capitán Trueno en la Montaña de los Suspiros" works perfectly except for the annoying locked desktop on the "Salir" (exit) command.
Instead I messed something with "El Capitán Trueno: La Espada del Toledano", but surely is some mistake I did.
The fixed dxwnd.dll is in the .rc thread as .rc7
In attach my relocatable profile with fake-registry and fake-CD H:
Last edit: gho 4 days ago
Good news, I found that for some unknown reason the delay on the game termination (Salir) was related to some mess in the DirectInput handling. I cleaned my configuration turning off some unnecessary flags and now the game is very responsive. In attach my last (and definitive?) configuration.
Instead, I still have troubles with the second episode, but probably I messed some configuration here again.
I somehow fixed and uploaded my full rips. here: https://we.tl/t-RZPT71gEmgL4K2ht
Later I will try to discuss some details and minor flaws ....
El Capitan Trueno still hides some surprise.
I got the two game exiting with no hang, but the configuration was not replicate. I saved all the game folder and configuration, deleted everything and restored from the backup and the hang was still there. A way to make the game more responsive is to unhook DirectInput: this way the game reacts well, but the mouse control is lost and you can't play the game, but it is a track for some research maybe.
Also, despite not proven yet, I noted that the hang period seems to depend on the duration of the play session: the more you fiddle with the game and the more you'll have to wait to return responsive.
Apart from this mysterious problem, I noted another small flaw: the first episode has only one save slot, but the second episode has 10 slots and when you save the game you can select one of them. When the slot is selected a short description with location and timestamp appears on the slot, but when you load a saved game all slot descriptions are empty, so you have to chose one blindly.
Last edit: gho 3 days ago
This is very strange, because here it works, look.
Update:
The timestamp is in the registry.
Last edit: huh 3 days ago
Oh, yes, so obviously no timestamp will ever be visible as long as I use the virtual-registry with the "Override registry" flag! Well, it's not too bad because the savegame files is created and accessed anyway, you only have to know what slot to select.