Jump to content
IGNORED

Making a trainer?


wayneout

Recommended Posts

I downloaded some of the tools that was mentioned in a previous

post, but not sure what to do to convert the rom to a trainer.

 

The basic technique for making a trainer is to find the piece of code that decrements the player's life counter, and then change it so it doesn't.

 

The approach I use (and I'm sure Stella fans will tell me I'm crazy) is to run Z26, turn on logging just before I lose a life, and exit the emulator once the new number of lives is shown on screen. Then I estimate what scan line the lives counter was displayed on, search through the Z26 log for that code, and identify what seems to be the life counter. Then I search through the log file to find any writes to that counter (typically DEC or STA).

 

Probably not the most sophisticated method, but it took me about 20 minutes to do a Montezuma's Revenge trainer that way.

Link to comment
Share on other sites

I downloaded some of the tools that was mentioned in a previous

post, but not sure what to do to convert the rom to a trainer.

 

The basic technique for making a trainer is to find the piece of code that decrements the player's life counter, and then change it so it doesn't.

 

The approach I use (and I'm sure Stella fans will tell me I'm crazy) is to run Z26

:)

 

turn on logging just before I lose a life, and exit the emulator once the new number of lives is shown on screen. Then I estimate what scan line the lives counter was displayed on, search through the Z26 log for that code, and identify what seems to be the life counter. Then I search through the log file to find any writes to that counter (typically DEC or STA).

This works fine, but the whole procedure can be done much easier in the Stella debugger. What I normally do is search RAM without any input value (in this case, it looks at all locations). Then, exit the debugger and lose a live. Next, re-enter the debugger and search RAM again, this time with a seach value of '-1' (this indicates to search all previously selected locations for values one less than they were before; ie, which RAM cells decreased by one). At this point, there may be more than one cell for a candidate. If so, simply repeat the procedure until you narrow down which cell is storing the # of lives. Then you can reset the game and issue a 'trapwrite' on the cell, and it will set a breakpoint at the section of code where that cell was modified/written. After that, you can either no-op the code directly from the debugger and save the modified binary, or create a Stella cheatcode so anyone can use it. Usually takes me 1-2 minutes max to do all this.

Probably not the most sophisticated method, but it took me about 20 minutes to do a Montezuma's Revenge trainer that way.

It just so happens that entering the debugger with that ROM causes a problem, so the above procedure can't be used for MR. I still haven't figured out the problem there ...

Link to comment
Share on other sites

How do I get into Stella debugger?

I have Stella, but I am not sure about the use of the debugger.

Thanks,

Bill

Always go with the latest version of Stella (currently 2.2), and while playing a game, press the backquote character. Actually, on the Stella main page (and with the downloaded archive) there's a debugger documentation, and this type of cheatcode searching is described in much more detail.

Link to comment
Share on other sites

Sorry to bother you one more time.

(I am a baby boomer so sometimes we can be slow)

 

I used the debugger and found what am sure is the correct thing.

In the hexacode, it is line 80: going down and across it is 03.

I have checked this several times. In this box, it starts off with 3, then when

I lose a life, it goes down to 2, then when I lose another life it goes now to 1.

Also after I lost the second life, it was the only one that showed a change.

 

So, the part that I am not sure of is

"Then you can reset the game and issue a 'trapwrite' on the cell, and it will set a breakpoint at the section of code where that cell was modified/written. After that, you can either no-op the code directly from the debugger and save the modified binary, or create a Stella cheatcode so anyone can use it."

 

I am going to read the part about traps on the Stella page again and see if I can make sense of it.

And then read about creating a cheatcode.

Not sure how well I will do but I think I have the part where the lives are kept.

Bill

Link to comment
Share on other sites

Hello,

A followup on my last post. I re-read the debugging part of the Stella page.

I understand most of it. What I am not sure about is the wording for the

"trapwrite"

In my case, I found the "lives" part at 80 vertical, 03 horizontal.

So how to I write this for my trapwrite?

In his case, he used trapwrite $ba. And his was a b0 vertical and a horitzonal.

Thanks,

Bill

 

Never mind I figured it out.

Thanks for all the help

Bill

Edited by wayneout
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...