0

My younger brother loves to play a game on Sega Emulator: Gens.exe He uses some cheats as well in the game-genie section of the emulator.
Gens Emulator for Sega Games
Opening game rom and adding cheats later on, is difficult for him at his age.

What i want is to make him a batch file, which will automatically open the ROM (.smd file) and will add some cheats after opening the ROM.

For instance, i want the batch file to open the ROM "Contra_Hard Corps.smd"
and add following two cheats in Game Genie section

CheatCode | Name
AM4A-AA8C | No Weapon Loss
ADXT-A60L | Super Jump

The Game Genie window looks like this:
Game Genie window

You can get the emulator from link:
http://www.emulator-zone.com/doc.php/genesis/

You can get ROM from this link:
https://wowroms.com/en/roms/sega-genesis-megadrive/contra-hard-corps-usa/25433.html

1 Answer 1

2

Create a batch file with the following contents and place in the same folder with gens.exe and the smd ROM file.

If you want to change the ROM file also change the name in the batch file appeared at two places preserving the file extensions.

(
echo AM4A-AA8C No Weapon Loss
echo ADXT-A60L Super Jump
)>"Contra - Hard Corps (USA, Korea).pat"

echo Pat file created. 

start "" gens.exe "Contra - Hard Corps (USA, Korea).smd"
4
  • Your script does the job very well. I am going to accept your script as my answer. But before that, i need to know, if it was not for the .pat file, would we still be able to add cheats to the Game Genie window?
    – McFly
    Nov 3, 2020 at 4:26
  • 1
    I thought by getting an answer to my question, i would be able to input values to any program via a batch file. But in this case, there is a .pat file which the emulator reads before launching the game. Is there any other way?
    – McFly
    Nov 3, 2020 at 4:28
  • @AhsanTaqveem Before discovered this way I tried AutoHotkey and it was somehow worked but need some bug tracing. codepile.net/pile/8W8AlMOM Nov 3, 2020 at 12:07
  • 1
    Thank you so much for the response. It helped :) Farewell.
    – McFly
    Nov 3, 2020 at 14:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .