ice00 / jc64

Java C64 Emulator (and disassembler)
GNU General Public License v2.0
45 stars 7 forks source link

Small bugs and big suggestions :) #7

Open SukkoPera opened 2 days ago

SukkoPera commented 2 days ago

Hi,

thanks a lot for this tool. I'm new to ASM disassembly and it's helping a lot. After using it quite a bit, I think I have a few comments and feature requests, so here we go! :)

In no particular order:

  1. It would be nice to have an option to manually specify the load address of a file, without taking it from the first two bytes.

  2. There is a bug when selecting several lines and clicking the "remove automatic comment" button: the first line is ignored and the comment remains.

  3. Capital letters are not handled in the !pet directive

    image

    (The above should say "Starting Zero Page test.. ")

  4. I think there is a problem with the Commodore font in the Show hex/text/char view, since the above shows as:

    image image

    and I don't think it's correct (This is the same astrnig as above).

Now the big thing:

  1. It would be amazing to have some sort of "navigation" for jumps and branches. Something like CTRL+Click on a jmp/jsr/beq/bne/etc. instruction and the listing scrolls there immediately. Then, a "Back" arrow in the toolbar would bring you back to the call point. Of course this should be stackable, and the arrow would bring you back one step at a time. This would make the workflow much faster!

Now the thing I'm sure you won't like:

  1. I feel having the two disassembly windows is totally useless. I find myself always looking at the left window while trying to make sense of the code, I see no use in the right one until I'm done. I think this could be reorganized in one of two ways:
    • Keep the "generic" (left) disassembly in the main program window and only show the listing in the "chosen dialect" in a preview window when the "Export source" command is selected.
    • Merge the "generic disassembly" and "chosen dialect" in a single window, which would basically be the current right one with the addition of the address and bytes listing. After all the whole point of choosing a dialect is because it's the one I'm most familiar with and Id love to just see its syntax during the whole disassembly job.

Those are my thoughts that I think would make the tool even more useful. But thanks a lot for making it in the first place!

ice00 commented 2 days ago

hi,

1) I had implemented this for Odyssey console (it is in next version) as there is no load address in the binary, so I think that it can be reused even for Commodore programs

2) Added a fix (already into the git) that should works for comments

3) I did not find documentation about !pet format itself into assemblers, so I use the rule that a compiled line must give the correct byte value, that is why you see those values

4) I used the documentation that follow the font: at UFT code 0xee00 there is lower char rom and at 0xef00 the upper char rom (so the one described here: https://www.c64-wiki.com/wiki/Character_set)

5) Added into git. However it is ALT+click as CTRL+click is already used

6) I can say that you are not taking advantage of the two windows :) For me it is essential: while I look at the code in left windows, I can see the data managed by the code in the right window. This speed up the whole disassembly process. Else, as I try to put lot of comments to document the code, the right windows gives always a good eyes feeling). However, if you want, you can handle the middle bar and extend the left window to cover the right window, having virtually only the left windows visible and using the export button, you can export the final code :)