Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - Need help with EvilPeers Snes9x tracer. | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Omega45889

Panser
Level: 30

Posts: 153/335
EXP: 148978
For next: 16891

Since: 03-22-04
From: Vancouver Canada

Since last post: 5 days
Last activity: 6 hours
Posted on 08-06-04 06:54 AM Link | Quote
I cant seem to get it to work properly. I have seen documents created by it that are barly a page long. But, no matter what I do, I get this insanly long document that looks like this.

024, 00000000, 0012F83C
081, 00000000, 0012F81C
083, 00000000, 0012F85C
001, 00000000, 0012F7BC
046, 00000000, 0012FE74
024, 00000000, 0012F070
083, 00000001, 0012FE48
047, 00000000, 0012FE74
003, 00000000, 0135018C
005, 00000000, 01D60200
07F, 00000002, 00000000
07F, 00000000, 00000000
07F, 00000001, 00000000
083, 00000001, 0012FAB0
07C, FFFFFFF0, 0012F9BC

I do use the Split, Squelch, and Tilde FF options. I have tried others, but cant seem to get the same useful outcome that I saw in a document someone sent me. Any help is appreciated. THX.
Chickenlump

Level: 41

Posts: 313/722
EXP: 474192
For next: 5953

Since: 03-15-04
From: Columbia City Indiana

Since last post: 3 hours
Last activity: 4 min.
Posted on 08-06-04 07:25 AM Link | Quote
Could you post the document that was sent to you? I'm thinking he or she probably trimmed everything out that wasn't relevent to what they were searching for.
Omega45889

Panser
Level: 30

Posts: 155/335
EXP: 148978
For next: 16891

Since: 03-22-04
From: Vancouver Canada

Since last post: 5 days
Last activity: 6 hours
Posted on 08-06-04 07:42 AM Link | Quote
I wish I could, but I dont have it anymore. It wasnt formatted the same as mine though. It was wierd. It had alot more information about what goes on at the ram adresses.

Can someone else just try it out and see if they get the same kind of info as me?


(edited by Omega45889 on 08-06-04 01:58 AM)
MathOnNapkins

Math n' Hacks
Level: 67

Posts: 365/2189
EXP: 2495887
For next: 96985

Since: 03-18-04
From: Base Tourian

Since last post: 1 hour
Last activity: 32 min.
Posted on 08-06-04 11:30 AM Link | Quote
Although I love Peer's tracer, the output is far from pretty. If you would be so kind as to tell us what you call "useful output" then I'd be happy to assist. But what you printed out is similar to what I'd expect the tracer to output.

As I recall, the output gives the instruction address, the opcode and any number/address the opcode operates on, and then gives the machine code mnemonic, followed by the current state of the machine variables (registers). Sorry if I end up confusing anybody...

So please tell us what you're looking for Omega.
Omega45889

Panser
Level: 30

Posts: 156/335
EXP: 148978
For next: 16891

Since: 03-22-04
From: Vancouver Canada

Since last post: 5 days
Last activity: 6 hours
Posted on 08-06-04 11:42 AM Link | Quote
Well, the output that I got was like 110 pages long for the slightest fraction of a second tracing. Could you take a second and trace something random and just post a sample of what it outputted for you?

If anyone knows what they are doing well enough, would you be so kind as to help me with a small hack to change something that would add some awesome features to my hack. I doubt it would be difficult.

WOW.... THIS IS UNBELIEVABLE... all this time ive been looking at the WRONG text file all this time. This is what I come up with when I use the correct text file.

$81/F772 AE 14 42 LDX $4214 [$81:4214] A:003C X:003A Y:003C P:envmxdIzC
$81/F775 E0 00 01 CPX #$0100 A:003C X:00F7 Y:003C P:envmxdIzC
$81/F778 90 03 BCC $03 [$F77D] A:003C X:00F7 Y:003C P:eNvmxdIzc
$81/F77D E2 30 SEP #$30 A:003C X:00F7 Y:003C P:eNvmxdIzc
$81/F77F BF 00 00 7F LDA $7F0000,x[$7F:00F7] A:003C X:00F7 Y:003C P:eNvMXdIzc
$81/F783 A6 04 LDX $04 [$00:0004] A:001F X:00F7 Y:003C P:envMXdIzc
$81/F785 48 PHA A:001F X:0004 Y:003C P:envMXdIzc
$81/F786 BF C3 F7 81 LDA $81F7C3,x[$81:F7C7] A:001F X:0004 Y:003C P:envMXdIzc
$81/F78A F0 0A BEQ $0A [$F796] A:0000 X:0004 Y:003C P:envMXdIZc
$81/F796 68 PLA A:0000 X:0004 Y:003C P:envMXdIZc
$81/F797 18 CLC A:001F X:0004 Y:003C P:envMXdIzc
$81/F798 7F CB F7 81 ADC $81F7CB,x[$81:F7CF] A:001F X:0004 Y:003C P:envMXdIzc
$81/F79C 60 RTS A:001F X:0004 Y:003C P:envMXdIzc





(edited by Omega45889 on 08-06-04 02:59 AM)
Geiger

Buster Beetle
Level: 34

Posts: 93/460
EXP: 241080
For next: 12571

Since: 03-15-04
From: Indianapolis, IN, USA

Since last post: 6 hours
Last activity: 6 hours
Posted on 08-06-04 12:16 PM Link | Quote
Originally posted by MathOnNapkins
Although I love Peer's tracer, the output is far from pretty.


Nor is it likely to ever be, unless I someday understand the SNES well enough to write a GUI debugger.

Do not hold your breath.

---Evil Peer
jman2050

Red Koopa
Level: 19

Posts: 14/123
EXP: 33172
For next: 2605

Since: 03-21-04

Since last post: 10 days
Last activity: 103 days
Posted on 08-06-04 11:06 PM Link | Quote
Four things you should know:

1) Split, Squelch, and tabbed output. Axe all of them. They are neither useful nor convinient (except for possibly tabbed output, which can be used to import it into Excel for example, and I believe Evil Peer stated that already). With all of them off the output still will be a lot of messy numbers, but it'll look a lot neater, with all the important parts of it seperated into neat columns as opposed to what you've shown.

The important information on each line will be shown in this order: Current location (Bank/Address), actual hex numbers in ROM (usually the opcode followed by the arguments it needs), the ASM instruction (if the instruction uses indexing, or is abranch statement, the actual ROM/RAM address the instruction is looking for will be in brackets [] ), the current values of registers A, X, and Y, as well as the current machine flags (P) at the time of executing that particular instruction. Now, the reason I say don't use squelch is because among all the extra garbage after all of this, there is the current stack pointer position (S:xxxx) and the Function level (FL:xxxx) The former being extremely useful in finding bugs caused by messing with the stack improperly. I have yet to really study what the other values are for.

2) Make absolutely sure you are using trace and not trace all. Trace will only trace each individual section of code once into the file. All later instances will be ignored (note though that they are still executed, so it is your responsibility to figure out when in your tracings a specific instruction written earlier was executed). Trace all should ONLY be used if you must know EVERYTHING that's happened before a bug in the program has occured (and even then you should be very careful, as even 1 or 2 seconds of tracing will results in a 50+ MB file or larger)

3) Trace from... assuming you have Mark 5/6 or up, you should have this feature in the trace menu. This is absolutely INVALUABLE is there is a specific routine that you want to trace without searching through pages of worthless stuff. Basically, in the dialog box, put in the starting address of tracing, number of times executed (I just put 1) than the ending address of tracing, along with number of times executed. Check 'Capture every pass' and press okay. Now, when tracing, only the instructions between when the instruction at the starting address and the instructions at the ending address will be written to file. Convinient, yes? Learn to use it and you'll save yourself many headaches.

4) If you can't use trace from, probably because you simply don't know the addresses of the section of code you're aiming for, take advantage of the emulator's trace memory. When you complete a tracing, all instructions executed will be written to file. Note when I said earlier that these instructions will only be written to file once, and all later executions of that instruction will be ignored by the tracer. If you decide to make a second tracing within the emulator, this tracing will actually replace the first tracing file completely, but the tracing memory is still intact, so if an instruction was written to the first file, it will not appear in the second file even though it is a brand new tracing. Say, for example, you're tracing Super metroid, and want to isolate the code that handles what happens when you go through a door. Obviously, you can't go into the door without moving the character, so to eliminate that useless data, you'd begin a first tracing of just you moving around and stuff. That way all instructions pertaining to that will be put into the trace memory. Now, end the first tracing and start a second tracing, this time going through the door. The movement code won't be traced because it was already traced in the first file.

Crap, this was more than I wanted to write, but I guess it'll be useful for those who really want to get the best of Evil Peer's tracer
Geiger

Buster Beetle
Level: 34

Posts: 94/460
EXP: 241080
For next: 12571

Since: 03-15-04
From: Indianapolis, IN, USA

Since last post: 6 hours
Last activity: 6 hours
Posted on 08-06-04 11:29 PM Link | Quote
Originally posted by jman2050
1) Split, Squelch, and tabbed output. Axe all of them. They are neither useful nor convinient (except for possibly tabbed output, which can be used to import it into Excel for example).


I practically never use Tabbed Output, but if you plan to import the files into a spreadsheet program, you will certainly want to use it along with Split. PST (should) split the file at 65535 lines, which is the maximum Excel can read. It will also keep your files from becoming so large that they cannot be opened (though this usually is not much of an issue if you do not use Trace All).

When you first start out, you will probably want to leave Squelch off. You should quickly discover whether or not the extra information is worth having for your purposes.

As for Trace v. Trace All, I have figured a lot more out about Chrono Trigger than I would have without Trace All. The downside to this is I have also had to wait 20+ minutes while finder searches through a gigabyte-worth of log files. With judicious use of Trace and Trace From, you can probably skirt your way around this feature.

---Evil Peer
Omega45889

Panser
Level: 30

Posts: 160/335
EXP: 148978
For next: 16891

Since: 03-22-04
From: Vancouver Canada

Since last post: 5 days
Last activity: 6 hours
Posted on 08-06-04 11:45 PM Link | Quote
awesome. Thats gonna be pretty useful. I knew most of that, but not in that detail. Im sure ill have some questions soon enough.

Quick Question. What does this mean in the output file.
*** NMI
*** NMI
*** NMI
*** NMI

A quick guess is that it means that it has already traced those memory adresses and its letting me know that.

Also, if someone is willing to help me, i need to find the location of the data for turning Link into a bunny. You can just use HM and add the Transform/smoke sprite to any dungeon room.


(edited by Omega45889 on 08-06-04 03:29 PM)
(edited by Omega45889 on 08-06-04 03:33 PM)
Geiger

Buster Beetle
Level: 34

Posts: 95/460
EXP: 241080
For next: 12571

Since: 03-15-04
From: Indianapolis, IN, USA

Since last post: 6 hours
Last activity: 6 hours
Posted on 08-07-04 02:52 AM Link | Quote
Originally posted by Omega45889
What does this mean in the output file.
*** NMI
*** NMI
*** NMI
*** NMI


The NMI / IRQ stuff is for interrupts (an internal SNES thing). Unfortunately, I did not notice the official team had snuck a couple more of these statements into the core code before I released Mark 7. They will probably be disabled again in Mark 8 (whenever that is).

Just try to ignore them.

---Evil Peer
MathOnNapkins

Math n' Hacks
Level: 67

Posts: 366/2189
EXP: 2495887
For next: 96985

Since: 03-18-04
From: Base Tourian

Since last post: 1 hour
Last activity: 32 min.
Posted on 08-08-04 12:53 AM Link | Quote
You can also sort of think of NMI as a wait loop until new code begins executing.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 1447/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 08-08-04 04:14 AM Link | Quote
I don't get the 'trace' option myself. All I get is the same thing repeated over and over and over...
***NMI
***RTS
***NMI
***RTS
***NMI
***RTS
***NMI
***RTS
***NMI
***RTS
etc. Trace All works well but the output is HUGE, it takes ages for Notepad to open them. I've had logs up to 1GB.
jman2050

Red Koopa
Level: 19

Posts: 15/123
EXP: 33172
For next: 2605

Since: 03-21-04

Since last post: 10 days
Last activity: 103 days
Posted on 08-08-04 04:57 AM Link | Quote
As for Trace v. Trace All, I have figured a lot more out about Chrono Trigger than I would have without Trace All. The downside to this is I have also had to wait 20+ minutes while finder searches through a gigabyte-worth of log files. With judicious use of Trace and Trace From, you can probably skirt your way around this feature.


I don't want to downplay the effectiveness of trace all, but a bit of logic and smart string searching can garner quite a bit of good results when just using trace. But I understand your point. It's a lot easier to find out what a routine does if you're able to see everything that happens at that point. Also, thanks for clearing up the tabbed output and split options. As you said though, in practical terms they aren't really that useful.

And ***NMI usually refers to the VBlank routine on the SNES, and can basically be read as a new frame within the tracings. And Hyperhacker, try clearing the trace memory before every tracing (unless of course you want to implement the suggestion I gave in my earlier post)

A lot of this I figured out on my own, so I don't mind sharing it if it means making things easier for fellow SNES hackers
ev0

Goomba
Level: 9

Posts: 1/27
EXP: 2513
For next: 649

Since: 12-16-04

Since last post: 10 days
Last activity: 7 days
Posted on 12-16-04 02:09 PM Link | Quote
I'm new to this forum...
well

There is a GUI debugger for Snes :Q_____

he he he DD

is Super Sleuth

http://users.tpg.com.au/trauma/spx/

this is the official home page

it has the best breakpoint support i've ever seen

It's developed by Kris Bleakley
Nevitsky says "It was written by Overload (the same guy that leads the DSP work for the SNES emulators)".

This is the first public release after 6 years of development
jman2050

Red Koopa
Level: 19

Posts: 33/123
EXP: 33172
For next: 2605

Since: 03-21-04

Since last post: 10 days
Last activity: 103 days
Posted on 12-16-04 05:42 PM Link | Quote
Perhaps you should've put it in a seperate topic? Anyway, Super Sleuth is a pretty nifty utility, and just recently helped me find a very evil bug in my code that a simple tracing didn't make readily apparant. It's breakpoint support is good, and I love how it gives you an easy-to-read representation of the values of just about all the SNES registers, PPU and otherwise.

It also has an SPC debugger. Yayness.

*notices date of topic and date of newest post*

I can't be too sure, but I don't think gravedigging is allowed. Ah well, the information in this topic is still pretty useful, so there shouldn't be a problem with it, right?
Geiger

Buster Beetle
Level: 34

Posts: 211/460
EXP: 241080
For next: 12571

Since: 03-15-04
From: Indianapolis, IN, USA

Since last post: 6 hours
Last activity: 6 hours
Posted on 12-16-04 06:53 PM Link | Quote
There is a GUI debugger for Snes, Super Sleuth

Thank you for bringing this to my attention. It is very promising, though it is not something I would use yet. Hopefully, he will bring it up to speed with other SNES emulators.

Believe me, I would love to be put out of business on this front.

---Evil Peer
MathOnNapkins

Math n' Hacks
Level: 67

Posts: 1244/2189
EXP: 2495887
For next: 96985

Since: 03-18-04
From: Base Tourian

Since last post: 1 hour
Last activity: 32 min.
Posted on 12-17-04 03:31 AM Link | Quote
One of the things I've always coveted was a variable viewer similar to what you'd find in most debuggers. Using snes9x's find cheat function ad nauseum has convinced me of that.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - Need help with EvilPeers Snes9x tracer. | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.016 seconds.