It is currently Mon Dec 18, 2017 3:32 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 46 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject: Re: Corrupt File?
PostPosted: Fri Mar 24, 2017 1:07 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 807
Location: cypress, texas
So you've quickly reached a point in your game where you want to start the trace log... Then press the pause button on your keyboard. With the game paused press the '-' key to set your game to run at the slowest speed possible (~2 seconds per frame). Next click the 'Start Logging' button on the trace logger window. Now, the game is still paused so your file isn't growing at all... you have ample time to open the hex editor (click Debug>Hex Editor...) or click Tools>Memory Watch... to watch up to 24 decimal values.

Press the pause key again and the file will slowly build. I'm testing a direction and a being pressed together... so I hold down and then press a many times. The game is running at a rate of two seconds per frame so pressing a once will probably not be recognized. Having the hex editor or memory watch window open should allow you to view exactly when your controller bytes change. My controller bytes read 84 (or 132 decimal) once down and a are pressed together. Once you know your controller input has been recognized correctly, wait a few frames for your game to react... then click the stop logging button on the Trace Logger window to stop your file from growing.

Open the file with a text editor... windows notepad is great for these .log files. Then, in windows notepad, to find the first time down and a were pressed: click Edit>Find... and then type "A:41 X:08" and press enter. The abetudlr helps me to quickly find button presses...

A:41 X:08 finds a
A:41 X:07 finds b
A:41 X:06 finds select
A:41 X:05 finds start
A:41 X:04 finds up
A:41 X:03 finds down
A:41 X:02 finds left
A:41 X:01 finds right being pressed :)

(Holding down and then pressing a many times makes 100% chance that the first instance of "A:41 X:08" found will be at a time when both a and down were pressed. :) Well, maybe not a 100% chance cause you could have something like
Code:
lda #$41
ldx #$08
in the very beginning... but once you are certain your controller routine works and you have memorized the address of your "look at controller" routine, there is 100% chance that the first stop at the address you memorized will be a time when both
a and down are pressed :) )

edit. addition
colored buttons
edit2


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 46 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group