News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: How to get data like jump height and duration  (Read 1116 times)

saltymanj

  • Newbie
  • *
  • Posts: 1
    • View Profile
How to get data like jump height and duration
« on: May 25, 2018, 06:08:29 am »
Is there a tool to help determine jump height and duration out of an nes rom? Right now I'm using VLC and a screen recording. It's pretty painful.

MathOnNapkins

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 637
  • Who ya gonna call
    • View Profile
    • Arc-Nova - Rohmackin' and Chiptunin'
Re: How to get data like jump height and duration
« Reply #1 on: May 25, 2018, 11:04:24 am »
While that is a rather natural question to ask, the answer would highly depend the game in question. In practice, however, many games probably use fairly similar logic to handle jumping and gravity. It would take some time to track down, perhaps with a cheat finder utility (built into some emulators). There are also emulators with TAS features that let you step frame by frame and you could use such a feature to painstakingly measure those properties with high accuracy. But then, you're already kind of doing that with VLC...

nesrocks

  • Hero Member
  • *****
  • Posts: 608
    • View Profile
    • nesrocks.com
Re: How to get data like jump height and duration
« Reply #2 on: May 25, 2018, 11:40:35 am »
Don't use VLC. Use an emulator. Count the frames for the duration and count the pixels for the height. Use frame advance hotkey to make counting frames easy and use emulator pause to make counting the pixels at the highest point easy.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6923
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: How to get data like jump height and duration
« Reply #3 on: May 25, 2018, 02:13:47 pm »
Considering jumping moves a character up the screen, wouldn't it be easier to use frame advance and cheat searching to look for a decreasing Y coordinate? (even on the easier on the NES since the game is almost certain to use sprite OAM (haven't yet seen a game that doesn't) so if you know the sprite format you can look at the table and find that pretty quick. (that is the table will occupy a full $100 byte page of RAM. Often $200 or $700), and Y coordinate is the first byte of the sprite so it will be at an address on that page that is a multiple of 4) (but if you don't want to just eyeball the RAM for the sprite table, go to the Debugger and set a Write Breakpoint for CPU $4014 and you'll pretty much instantly get a hit by whatever value it wants to write * $100 is the RAM address of the OAM)
"My watch says 30 chickens" Google, 2018