don't click here

Object commenting.

Discussion in 'Engineering & Reverse Engineering' started by .hack//zero, Oct 1, 2006.

Thread Status:
Not open for further replies.
  1. .hack//zero

    .hack//zero

    Member
    3,011
    4
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    I'm thinking it might be a good idea to do to make it easier to edit objects, and stuff. Maybe something good will come out of it like me learning how to make my own objects. Well, just tell me if it's a good idea or a bad one.

    Also, it takes me like 5 min to save in asm everytime I save no matter how small the change is. Pasting can also be a pain in the ass. Anybody know a way to fix it? It'll make doing this a lot easier.

    Don't worry, I won't do post here for every object I do. Just doing this to see what you think.

    Code (Text):
    1. ----------------------------------------------------------------------------
    2. ; Sprite
    3. ;
    4. ; jaws from EHZ
    5. ; ----------------------------------------------------------------------------
    6.  
    7. jaws:       ; DATA XREF: ROM:0001600Co
    8.         moveq   #0,d0
    9.         move.b  $24(a0),d0
    10.         move.w  jaws_mainpointers(pc,d0.w),d1
    11.         jsr jaws_mainpointers(pc,d1.w)
    12.         bra.w   loc_2D47C
    13. ; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    14. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    15. jaws_mainpointers: 
    16.         dc.w loc_2D3AA-jaws_mainpointers; 0;
    17.         dc.w loc_2D3E4-jaws_mainpointers; 1; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    18. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    19.  
    20. loc_2D3AA:      ; DATA XREF: h+16432o
    21.         addq.b  #2,$24(a0); keeps the jumping fish from jumping         into space.
    22.         move.l  #jaws_mappingspointer,4(a0)
    23.         move.w  #$414,2(a0); VRAM location
    24.         bsr.w   loc_2D488
    25.         move.b  #4,1(a0);not sure, but I'm guessing it has          something to do with the jumping fish showing. Since if         you remove this         command the fish        doesn't show up, but it's still         active.
    26.         move.b  #4,$18(a0)
    27.         move.b  #9,$20(a0); Something to do with enemy              collision
    28.         move.b  #$10,$19(a0); not sure, might just be there to          look pretty.
    29.         move.w  #-$400,$12(a0); not sure about this one.
    30.         move.w  $C(a0),$30(a0)
    31.  
    32. loc_2D3E4:      ; DATA XREF: h+16432o
    33.         lea (jaws_spritetable_pointers).l,a1
    34.         bsr.w   jaws_animatesprite
    35.         bsr.w   jaws_speedtopos
    36.         addi.w  #$18,$12(a0)
    37.         move.w  $30(a0),d0;not sure, but if it's removed. The           object won't show up at all, or in anyfrom.
    38.         cmp.w   $C(a0),d0;not sure, but if removed. It rains            fish.
    39.         bcc.s   loc_2D40C
    40.         move.w  d0,$C(a0)
    41.         move.w  #-$500,$12(a0); affects how high the                jaws will jump.
    42.  
    43. loc_2D40C:      ; CODE XREF: h+1648Cj
    44.         move.b  #1,$1C(a0)
    45.         subi.w  #$C0,d0; Makes the jaws do the jaw              moving animation all the time.(Only when removed)
    46.         cmp.w   $C(a0),d0;Makes the jaws do the jaw                 moving animation all the time.(Only when removed)
    47.         bcc.s   locret_2D42E
    48.         move.b  #0,$1C(a0)
    49.         tst.w   $12(a0); removing this disables the animation.
    50.         bmi.s   locret_2D42E
    51.         move.b  #2,$1C(a0)
    52.  
    53. locret_2D42E:       ; CODE XREF: h+164A6j h+164B2j
    54.         rts
    55. ; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    56. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    57. jaws_spritetable_pointers: 
    58.         dc.w jaws_spritetable-jaws_spritetable_pointers; 0;
    59.         dc.w jaws_spritetable2-jaws_spritetable_pointers; 1
    60.         dc.w jaws_spritetable3-jaws_spritetable_pointers; 2
    61. jaws_spritetable:   dc.b   7,  0,  1,$FF; 0
    62. jaws_spritetable2:  dc.b   3,  0,  1,$FF; 0
    63. jaws_spritetable3:  dc.b   7,  0,$FF,  0; 0
    64. ; ----------------------------------------------------------------------------
    65. ; Unknown Sprite Mappings
    66. ; ----------------------------------------------------------------------------
    67. jaws_mappingspointer:       ; DATA XREF: h+1643Ao h+164CEo ...
    68.         dc.w jaws_mappings-jaws_mappingspointer; 0
    69.         dc.w jaws_mappings2-jaws_mappingspointer; 1
    70. jaws_mappings:  dc.w 3  ; DATA XREF: h+164CEo
    71.         dc.w $F005, 0,  0,$FFF4; 0
    72.         dc.w $F001, 4,  2,     4; 4
    73.         dc.w     9,   $A,   5,$FFF4; 8
    74. jaws_mappings2: dc.w 3  ; DATA XREF: h+164CEo
    75.         dc.w $F005, 0,  0,$FFF4; 0
    76.         dc.w $F005, 6,  3,     2; 4
    77.         dc.w     9,  $10,   8,$FFF4; 8
    78.         dc.w     0; 12
    79. ; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    80. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    81.  
    82. loc_2D47C:      ; CODE XREF: h+1642Ej
    83.         jmp loc_163D2
    84. ; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    85. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    86.  
    87. jaws_animatesprite:     ; CODE XREF: h+16476p
    88.         jmp AnimateSprite
    89. ; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    90. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    91.  
    92. loc_2D488:      ; CODE XREF: h+16448p
    93.         jmp sub_16D6E
    94. ; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    95. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    96.  
    97. jaws_speedtopos:        ; CODE XREF: h+1647Ap
    98.         jmp sub_163AC
    99. ; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    100. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    101. ;
     
  2. WiteoutKing

    WiteoutKing

    The artist formerly known as WiteoutKing Member
    1,709
    0
    0
    Worcester, MA
    Two-Bit Pictures and The D-Pad
    After about a dozen people saying you should understand more about this first, you do it anyway *sigh*

    It does no one any good if you have comments that start with "not sure what this is"
     
  3. .hack//zero

    .hack//zero

    Member
    3,011
    4
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    Either way it's better than what we've had before. If nobody else is gonna do it. Then I'll do it. Besides it's probably the best way for me to learnasm. Dammit I can barely seeWTF I'm typing.
     
  4. StephenUK

    StephenUK

    Liquor in the front, poker in the rear Tech Member
    1,678
    0
    16
    Manchester, UK
    Quackshot Disassembly
    People do comment the objects, but they tend to do it for their own use. Reason for this is that most people who comment the objects actually have some kind of understanding of what they are actually looking at.

    On a side note, how did I know this topic was started by you, just by reading the topic title on the main site? Must be psychic.
     
  5. Cinossu

    Cinossu

    Administrator
    2,832
    44
    28
    London, UK
    Sonic the Hedgehog Extended Edition
    Mayhaps because you remember him talking about it on IRC. :P
     
  6. .hack//zero

    .hack//zero

    Member
    3,011
    4
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    Then I guess I should keep going with it, unless someone is gonna release their version. Despite what you guys think, this is the best way for me to learn. I learn by doing. I can learn by reading, but it's harder for me and it's more of a pain in the ass.
     
  7. StephenUK

    StephenUK

    Liquor in the front, poker in the rear Tech Member
    1,678
    0
    16
    Manchester, UK
    Quackshot Disassembly
    Never heard him mention it on IRC, since I'm rarely there, but who else would make a topic about commenting objects. It could only be DHZ.
     
  8. .hack//zero

    .hack//zero

    Member
    3,011
    4
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    I'm just trying to help push the SHC forward while still learning things myself.
     
  9. SMTP

    SMTP

    Tech Member
    What kind of slow computer do you have...?
     
  10. .hack//zero

    .hack//zero

    Member
    3,011
    4
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    I have a very good computer. I was just trying to edit it with a wordpad document. Now I'm using word, it's a lot better now. Also just so everyone knows. I'm not trying to pick a fight with stephen. I'm just trying to prove a point.
     
  11. StephenUK

    StephenUK

    Liquor in the front, poker in the rear Tech Member
    1,678
    0
    16
    Manchester, UK
    Quackshot Disassembly
    I know you weren't trying to pick a fight, and neither was I. What I was getting at though is that commented objects aren't really much use to people with little or no ASM experience, which is why they never get posted. Full routines like the water slides though are of interest to others and do get posted.

    About the ASM, notepad and wordpad are shit for editing because they seem to struggle with big documents. I use Notepad 2 and it's never failed me yet. It has a handy assembler syntax colour scheme as well which can helpful at times.
     
  12. .hack//zero

    .hack//zero

    Member
    3,011
    4
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    Knowing this part alone is more than useful. Even without knowing asm real well.

    Code (Text):
    1. octo2ndpointers:    dc.w grounded_octo-octo2ndpointers; Octopus on the ground.
    2.             dc.w airborn_octo-octo2ndpointers; Octopus jumping.
    3.             dc.w octo_shoot-octo2ndpointers; Octopus shooting
    4.             dc.w octo_airtime-octo2ndpointers; Octopus air time
    5.             dc.w octo_backonground-octo2ndpointers; Octopus back on the                             ground.
     
  13. Cinossu

    Cinossu

    Administrator
    2,832
    44
    28
    London, UK
    Sonic the Hedgehog Extended Edition
    Notepad isn't too bad, but Wordpad and Word are the worst two editors you could be using. I personally use TextPad.
     
  14. stormislandgal

    stormislandgal

    It's not a phase! Tech Member
    4,534
    10
    18
    Married life <3
    Wordpad is much quicker than Notepad, however, Notepad2 saves the day. It's much quicker than Wordpad.
     
  15. Aurochs

    Aurochs

    Единый, могучий Советский Союз! Tech Member
    2,343
    0
    0
    Whatever catches my fancy
    I would say that the unnecessary punctuation gave it away.

    gvim wins hands down.

    dhz: There are several things that you call pointers there that aren't actually pointers. On the 68000 family*, a pointer is an absolute address, period. You're actually referring to offset tables (variously switch tables).




    * As opposed to Intel x86 processors in real mode, where you can have near pointers, which are absolute addresses within a segment, and far pointers, which are near pointers with a segment word attached.
     
Thread Status:
Not open for further replies.