FAQ debugging/dissi

I realy like program XY and I would like to know how it functions, what is the best way to start disassembling and commenting it?

Wow that question should have a real long answer.
Here are some tips:

My program seems to have a bug, how do I start debugging it?

When a program starts, there is ALWAYS a dissi window! Click on the only button without a tooltip, that is a BUG button. With that you start debugging. Alternatively you can go in dissi to an address you like, and press space or the "Breakpoint" button. With that you enable a breakpoint at that location and once the emulator reaches that address it will switch to debugging mode.

I use assembler xy for many years now, I don't like using assi, can I debug my programs anyway using Vide?

Yep!

I disassemble a file and after a jump to BIOS dissi jumps to $7fff what is that?

Per default the BIOS area is not displayed in dissi. If you want dissi to display BIOS area, check the "BIOS" checkbox.

How do I best start debugging unkown sources?

See answer about debugging above.
Apart from that, some more tips:

How can I persist my comments I did with dissi?

Press button "save gathered information to cnt file"!

Why would I want to "select a vector with the mouse"? And what can I use that for?

See two questions above.

Tracki - some programs do not show any tracki information, why is that?

They do to!
Most probably you didn't configure tracki correctly. Tracky measure cycles between two memory locations the CPU (pc - program counter) passes.
The default configuration is set up to measure cycles between the exit and the entry of the BIOS routine "WaitRecal". Many programs use that routine to do vector recalibration at the end of their game loop. Therefor for these programs the given locations measures the cylces of a game loop round.
For programs which do not use the "WaitRecal" routine for their recalibration, the setup does not show any results. You must figure out what the program you are interested in uses for a game loop and/or recalibration. You can enter the so found addresses into the supplied start/end addreesses of tracki - than you can measure those programs.
Also: Remember to switch the "always update" button to "on" - otherwise you won't see anything either :-)

In dissi, what is the advantage of setting DP register knowledge to a location?

DP - Variable names can be automatically used. Some DP variables (like VIA addresses) are "automatically" used if DP is set correctly. "VIA ORB" is IMHO better readable than "$d000".

In dissi, sometimes something is marked bright green what happened?

If you click on a "Label" (coloumn label, and a label must be present) all usages of that label are highlighted in bright green. That way you can find branches to a location very easily!

In dissi, when I search something, what exactly is searched?

In dissi, the number of cycles sometimes do not match with the table I got from motorola, what the...?

Well yes.
Dissi displays the REAL number of cycles, some official tables only show the "base" number of cycles. For indirect and/or indexed addressing you must add some cycles because the address has to be calculated by the CPU. Believe me, the cycle information in dissi is "more" correct!

In dissi, what is "highlight op" usefull for?

Well, depends what your definition of usefull is. Play with it! The column "Operand" is taken as a string, if (case independend) the string you entered in "highlight op:" was part of the string, the operand column for that row is highlighted (yellow). This can be anything you like, a label, an address or anything that can be an operand. Great for a quick visual search!

In dissi is a "Label" panel, what can I use that for?

As the name suggests, this is a listing of all known labels. The advantage of the list is, that you can use it as a "table of contents" and quickly move to locations, double click on any entry jumps dissi to the given address, shift double click moves dumpi to the given address.

Can I debug code that is lying in RAM?

  1. in dissi switch "nu" (no unkown) to not selected (GUI checkbox)

  2. better switch of "following" of dissi "df" (don't follow) (CLI command)

  3. switch on disassemble ram with "dr" disasm RAM (CLI command)

Now RAM will be viewable in dissi. But usually all RAM is configured as Data - so no code will be displayed. While dissi is not tracking (camera is OFF) - best done also in pause mode, mark a RAM memory region and via popup menu cast to code. Perhaps you habe to "shift" memory regions, with "cast to byte" and "ungroup" also, to access the addresses that need to be cast to code.

Disassembling RAM takes many resources, since the DISASM is done for each RAM - poke. If you do not need to disasm RAM, you better leave it switched off.

Also note - disasm RAM might be usefull for bankswitch disasm. The cast to disasm is only done for the current active bank in dissi. Upon a bankswitch the casts have to be redone for the other bank!