VOGONS

Common searches


First post, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie

Short version: (in case this is a common problem with an often used solution, which I think/hope it might be) :

I am trying to use a Windows program, that as part of it's operation, the windows program opens up a DOS window, and the DOS windows shows the program's progression and error messages. The problem is, the program is failing to perform it's operation, and the DOS window, with the error message, opens and closes almost instantly, so I can't read the error message.

I've tried capturing the screen as a video, but even then the video is too slow to show the open window with it's text. How can I get the DOS window to stay open long enough for me to read it, please?

Long version:

I am using the Windows program Game Genie Guy, available from:

https://web.archive.org/web/20150705171512/ht … iles/GGGN64.zip

this is a rom patcher type program, that converts and inserts Game Genie/Gameshark* codes directly into a rom file, so that when you play that rom file then you get the same effect as if the (virtual or real) console you are playing on has a Game Genie or Gameshark plugged in and is running these same codes.

I am trying to apply the four lines of code:

D109A0400020
8009A9770001
D109A0400020
8109A96E01F4

to the rom:

perfect dark (E)

which is the PAL (European) rom of Perfect Dark for the N64 (I can't provide a link to the rom, for copyright reasons, of course). I have the working Perfect Dark (E) file, and I place a copy in the Game Genie Guy folder. But when I run GGGuy.exe and select the Perfect Dark rom file, specify the Nintendo 64, enter the code and select PATCH, then the DOS windows opens and closes too fast for me to read the error message, and there is no new N64 rom file created, and the existing Perfect Dark rom file (that I selected in the Game Genie Guy window) is untouched (as I can verify by doing a byte by byte comparison of the rom file with the original, from which I created the copy that is in the Game Genie Guy folder).

I've tried all the obvious things that I can think of. None of the files are copy protected, the rom file works (so it's checksum isn't bad or anything), my virus killer isn't causing the problem, etc. It might be that the program is working properly, and in the DOS window it says something like "Sorry, Gameshark codes beginning with D1 are not supported by this program, so no changes will be made to the rom", but I don't know because the DOS window closes too quickly (and this seems unlikely, as the Windows program then shows, in the results area of the GUI, these codes with no error message).

There is an option to fix the checksum after the codes have been added to the rom (because of course by altering the contents of the rom, the checksum is changed), but whether or not that is selected I still get the too-fast-to-read text in the DOS window. NB: you need another program added to the folder to fix the checksum, but even when added the DOS window problem still exists, and the problem seems to be at the adding the codes stage of the process, so leaving the 'Checksum' box blank in the Game Genie Guy Windows program, and not putting the checksum fix program in the folder is OK, it doesn't alter the problem that's causing the codes to not be inserted into the game rom.

* A Gameshark or a Game Genie is a hardware add on that plugs into whatever console it's designed for (the N64, the SNES, the NES, etc) and allows you to run special codes whilst the game is playing. The code you choose might simply continually alter a memory address so that that address is permanently loaded with the value 3, so that the lives counter in the game is never depleted, staying always at 3, so you effectively have infinite lives. Or the code might make it so that when you press a certain button on the controller then one or more addresses are loaded with a pre-defined value(s), or that when you press a certain combination of buttons on the controller then the program counter of the CPU will change to a given value, and the console will continue to execute code from that given memory address. That sort of thing. Mostly these devices are used to add cheats to games or to alter simple game mechanics, but sometimes the results can result in a hundred lines or more of codes, that significantly change a level layout or whatever. Some people are really talented, and make surprising use of these gadgets.

Attachments

  • ggguy2.jpg
    Filename
    ggguy2.jpg
    File size
    16.03 KiB
    Views
    743 views
    File license
    Public domain
  • ggguy1.jpg
    Filename
    ggguy1.jpg
    File size
    14.69 KiB
    Views
    743 views
    File license
    Public domain

Reply 1 of 13, by Oetker

User metadata
Rank Oldbie
Rank
Oldbie

Those tools at least all run under 64-bit Windows 10 so it's not an OS issue.
If you're very lucky running the main exe like 'ggguy.exe > bla.txt' will redirect the output of the command-line (not dos!) programs to said text file, but chances are slim as they are external processes launched by the main exe.

Reply 2 of 13, by rmay635703

User metadata
Rank Oldbie
Rank
Oldbie

Underclock your machine to a glacial speed, it might take all day to boot but when you run the program everything should run in slow motion

What you will likely find is that nothing comprehensible will be displayed

Reply 3 of 13, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie
Oetker wrote on 2021-05-06, 15:02:

Those tools at least all run under 64-bit Windows 10 so it's not an OS issue.
If you're very lucky running the main exe like 'ggguy.exe > bla.txt' will redirect the output of the command-line (not dos!) programs to said text file, but chances are slim as they are external processes launched by the main exe.

That's a good idea, but sadly it just results in an empty text file. It was worth a try, though, thanks.

rmay635703 wrote on 2021-05-06, 15:18:

Underclock your machine to a glacial speed, it might take all day to boot but when you run the program everything should run in slow motion

What you will likely find is that nothing comprehensible will be displayed

Or I could really stress this Windows system. You know, by opening four Google Chrome pages, a music player, and two text files. This PC only has eight gigabytes of RAM, so that would normally result in the screen going white and nothing responding except the mouse cursor, thanks to Microsoft's wonderful memory (mis-)management. Except this would be the one time where Windows would cope with the 'strain'of minimal multitasking.

Reply 4 of 13, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Hmm. What if you run GGGuy.exe from a command prompt window by using the "Start" command, as in "start ggguy.exe" ?

I'm guessing it's trying to run one of the other .exe files in the zip when it does the patching. You could conceivably try to figure out how those .exe files were written or compiled, and then hex-edit them somehow so they pause when they finish execution, but I doubt that's going to be simple.

Last edited by Jorpho on 2021-05-06, 16:14. Edited 2 times in total.

Reply 5 of 13, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie
Jorpho wrote on 2021-05-06, 15:51:

Hmm. What if you run GGGuy.exe from a command prompt window by using the "Start" command, as in "start ggguy.exe" ?

I've just tried, but it doesn't give any more output. Thanks anyway.

I'm guessing it's trying to run one of the other .exe files in the zip when it does the patching. You could conceivably try to figure out how those .exe files were written or compiled, and then hex-edit them somehow so they pause when they finish execution, but I doubt that's going to be simple.

It wouldn't be for me, no!

BTW, I should have said, I've tried all three N64 rom formats (Big Endian, Little Endian, and Byte-Swapped), but with no success.

Reply 6 of 13, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

You could just try to figure out the syntax of the command that GGGuy.exe is trying to run, and then run it yourself from a command prompt window, but it's not entirely clear from https://github.com/jfktrey/n64hijack what that syntax would be. You could try replacing the .exe files with something that simply outputs the arguments with which it was called, and then pauses. If something like that doesn't exist somewhere, it should be easy to knock it together in Python. (I could not find something appropriate in a moment of Googling.)

ETA: Here we go.
https://krikzz.com/forum/index.php?topic=2920.0

Seems the program might not work properly if you're using a path with spaces in the name. Try unzipping gggn64.zip to something like c:\temp and put your ROM in there as well.

Reply 8 of 13, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
darry wrote on 2021-05-06, 17:42:

Use video/screen capture (either external or internal) and get the info you want from recorded footage .

I thought of that too, but as it says in the OP:

I've tried capturing the screen as a video, but even then the video is too slow to show the open window with it's text.

Reply 9 of 13, by darry

User metadata
Rank l33t++
Rank
l33t++
Jorpho wrote on 2021-05-06, 18:14:
darry wrote on 2021-05-06, 17:42:

Use video/screen capture (either external or internal) and get the info you want from recorded footage .

I thought of that too, but as it says in the OP:

I've tried capturing the screen as a video, but even then the video is too slow to show the open window with it's text.

Sorry, I somehow missed that. Maybe trying to capture with an external device would work better .

Alternatively, how about running the program through a debugger and tracing execution step by step. I am not an expert at that, but that should let the OP run through program execution at desired pace , AFAIK .

EDIT: Or in a VM with a cap set on allowed CPU cycles

Reply 11 of 13, by darry

User metadata
Rank l33t++
Rank
l33t++

I think that I may have found the root cause of the fundamental issue and the solution . I believe the codes should be entered as such (you apparently need the offset and value to be separated by a space) :

D109A040 0020
8009A977 0001
D109A040 0020
8109A96E 01F4

Reply 12 of 13, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie
darry wrote on 2021-05-07, 02:51:

I believe the GGGN64 program logs its errors into assembly.log

But the .log file only appears sometimes, and doesn't seem to help me get to the problem. However, your 'insert a space' solution DOES seem to help (and does make sense, since you're then separating the instruction or memory address from it's proposed value), but sadly even though the rom is now being altered (thanks to the introduction of the space character, presumably before this the program couldn't tell that the values should always be eight characters then another four characters) the now altered rom doesn't run on an N64 emulator, it just seems to lock up with a black screen. Whereas, of course, the unaltered rom boots up fine in the emulator.

Also, when running GGGuy.exe with the spaces added in the codes, the quickly disappearing text in the DOS windows is now much longer, and clearly contains the word "Error" in red letters. So we're closer to a solution thanks to your suggestion,

Reply 13 of 13, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
Kerr Avon wrote on 2021-05-07, 18:43:

the quickly disappearing text in the DOS windows is now much longer, and clearly contains the word "Error" in red letters.

Does that mean your screen recorder can capture it?

What screen recorder are you using, anyway? It is kind of weird that it would deliberately drop significant frames. I used to like Flashback Express.

I would think there would be a more practical way of doing all this, though the ideal way would be to talk to the program's author.

ETA: https://superuser.com/questions/306167/how-to … after-execution suggests you can edit the shell registry entry for .exe files, but that's hella dangerous and you might want to consider using a virtual machine if you're going to go that far.