don't click here

TUTORIAL: Debugging with Gens

Discussion in 'Engineering & Reverse Engineering' started by fuzzbuzz, Nov 19, 2003.

  1. fuzzbuzz

    fuzzbuzz

    Tech Member
    625
    0
    0
    Here
    Many Many Programming/hacking tools...
    Ah, for those of you who have Win2000/XP, Gencyst has a hard time running, IF you can even get it running...I've been unsuccessful in all attempts to force gencyst to run. Unfortunately, Gencyst had the best dumps, and now I can't use it cause of stupid WinXP. I found out recently that the Emulator 'Gens' has support for debugging, looking at the current code, the graphics in the VRAM, the variable and memory contents, processor status, etc... This is fine and dandy, but there is no reference to ANY commands for the debugger, whatsoever in all the Gens Documentation.
    To find out some more information about the debugger, I did my customary Testing procedures and slammed both hands on the keyboard and looked to see if the screen changed. After many failed attempts, I downloaded the Gens source and looked at that. My luck changed. Here we go!

    For Gens (2.11)
    Debugger Commands:

    When viewing the Genesis VDP:
    You'll see a whole bunch of squares that make out-of-order pictures and pallete colors. I'm not quite sure how the Sprite List and it's values work...

    [*] - Changes the current pallete. Changes are seen in the VDP memory display
    [-] - Scrolls down the VDP Memory Display to reveal more tiles!
    [+] - Scrolls up the VDP memory display to reveal tiles already seen!
    [x] - toggles between the DEBUG and the playing screen

    When Viewing the Genesis 68000 status:
    You'll see the code that is currently being executed as well at the next 16 or so lines waiting in line. You'll also see the status of several parts of the 68k processor, as well as all of the values of the registers, the flags, and the contents of the memory.

    [T] - Execute next instruction.

    [next few lines are good to get through loops and stuff]
    [Y] - executes next 10 lines of code
    - executes next 100 lines of code
    - executes next 1000 lines of code
    [O] - executes next 10000 lines of code
    [P] - executes next 100000 lines of code

    [F] = subtract 0x8 from memory start address
    [D] = subtract 0x40 from memory start address
    = subtract 0x200 from memory start address
    [R] = add 0x8 from memory start address
    [E] = add 0x40 from memory start address
    [W] = add 0x200 from memory start address

    In all debug screens:

    [X] - toggles debug screen and play screen
    [Space] - switches between each debug screen [68k, z80, VDP]

    There are a couple other commands, but they don't really do much. Those ones above are the most important if you want to see what goes on. There is an addition to the Gens Debugger, that allows you to set Breakpoints. You need to go to the Developer's page at Sourceforge.net. Just search for Gens. You'll find it.

    Optionally, for those of you who don't know who to read 68k or z80 assembly, you can use the VDP to look at sprites. If you go to any level in S1, you can see the Goggle Box in all the levels in the VDP debug screen.

    Let me know if this guide has or will be of any help to you rom programmers. Okay. I'm off!
     
  2. NTICompass

    NTICompass

    Slamma Lamma Ding Dong Member
    175
    0
    0
    How do you debug using Gencyst?
    ...I have win95...so Gencyst works!
     
  3. fuzzbuzz

    fuzzbuzz

    Tech Member
    625
    0
    0
    Here
    Many Many Programming/hacking tools...
    I'm not entirely sure if Genecyst can debug, but I know that it can dump RAM, ROM, VRAM, VSRAM, CRAM, Z80 RAM, YM regs, messages, VDP base, VDP regs, sprites from GUI. I haven't used genecyst in a long time, so I don't remember how. Just play around with buttons, for example, go down all of the 'F' keys at the top of the keyboard.
     
  4. NTICompass

    NTICompass

    Slamma Lamma Ding Dong Member
    175
    0
    0
    Thanx fuzzbuzz! I'll figure out how Genecyst debugs....if no on can for me...
     
  5. XFox Prower

    XFox Prower

    Member
    1,196
    0
    0
    x86 Assembly, Tails Search Assistant
    I miss the VRAM dumping of Genesyst dearly (and so does my Project Emerald). I've been told by a few that there is an operating system emulator called Connectix but its not free. There's a techie here that has it but he's not sharing with us ;). Genecyst rules the top of the compatibility and dumps. All emulators should be based on this one, it's still the best.
     
  6. fuzzbuzz

    fuzzbuzz

    Tech Member
    625
    0
    0
    Here
    Many Many Programming/hacking tools...
    I KNOW! Gens doesn't support dumping...only viewing. Sad really, if you want to see what's in the VRAM, you have to take a friggin' screenshot and arrange it afterwards in Photoshop....so damn annoying!
     
  7. DDRKhat

    DDRKhat

    Keep on runnin' to the finish! Member
    XFoxPrower, you can simply go onto KaZaA lite and download it, its the sewers for all sorts of pay to use programs
     
  8. XFox Prower

    XFox Prower

    Member
    1,196
    0
    0
    x86 Assembly, Tails Search Assistant
    I don't feel like installing Kazaa again. I just reinstalled Windows again last week. If I wanted a virus or spyware problem, I would reinstall Real Player. I've been hearing some bad stuff about the Kazaa lite being busted down on though.
     
  9. fuzzbuzz

    fuzzbuzz

    Tech Member
    625
    0
    0
    Here
    Many Many Programming/hacking tools...
    if you mean busted by the RIAA or the MPAA, I kinda doubt it. Kazaa Lite not only blocks their IP, but it also blocks allowing other users to get a list of all your files. Anyway, Kazaa lite is safe to use if you download something then delete....it kinda defeats the whole purpose of P2P, but it's safe! :P
     
  10. DDRKhat

    DDRKhat

    Keep on runnin' to the finish! Member
    I said KaZaA Lite not KaZaA , KaZaA = spyware central
    Lite = non :) plus it still works for me quite well
     
  11. fuzzbuzz

    fuzzbuzz

    Tech Member
    625
    0
    0
    Here
    Many Many Programming/hacking tools...
    Ooh. I found it. 32MBs.....DLing it right now...
     
  12. XFox Prower

    XFox Prower

    Member
    1,196
    0
    0
    x86 Assembly, Tails Search Assistant
    I know the difference between the regular and Lite (I said Lite the 2nd time but forgot it on the first). I don't have that much hard drive space though. I'd be really tempted to download some movies or something and I only have about 1 gb left. I guess I'll keep looking.
     
  13. LOst

    LOst

    Tech Member
    4,891
    8
    18
    This topic must be moved into archives.
     
  14. fuzzbuzz

    fuzzbuzz

    Tech Member
    625
    0
    0
    Here
    Many Many Programming/hacking tools...
    This forum needs an actual Tutorial Forums. People can share their knowledge, tips and tricks with other fans who want to learn how do Hack/program.
     
  15. LOst

    LOst

    Tech Member
    4,891
    8
    18
    Hmmn, but I don't think Simon would create one :)
     
  16. fuzzbuzz

    fuzzbuzz

    Tech Member
    625
    0
    0
    Here
    Many Many Programming/hacking tools...
    You never know ^_^
     
  17. Simon

    Simon

    Oldbie
    Hmm, a tech forum has potential, I might just do that. Lemme think about this one.
     
  18. fuzzbuzz

    fuzzbuzz

    Tech Member
    625
    0
    0
    Here
    Many Many Programming/hacking tools...
    Woo-Hoo!

    EDIT: that'd be my favorite forum!
     
  19. LOst

    LOst

    Tech Member
    4,891
    8
    18
    Then you can think about SHaCk, SSRG, Cult and SClassic's Hacking Headquarters. Do we really need one more?
     
  20. Simon

    Simon

    Oldbie
    Sure, many of our members don't go to any of these forums. The user bases are different.