don't click here

Sonic 2: Rebirth of Paradise

Discussion in 'Engineering & Reverse Engineering' started by .hack//zero, Aug 1, 2003.

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

    .hack//zero

    Member
    3,001
    3
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    Okay, I get it. You have a problem with me. Now that I got that point, you can leave me the fuck alone now.
     
  2. Rika Chou

    Rika Chou

    Tech Member
    5,272
    164
    43
    Maybe you should listen to what he's saying, rather than getting all defensive about it.

    Each and every time, he has had a good point.
     
  3. StephenUK

    StephenUK

    Liquor in the front, poker in the rear Tech Member
    1,678
    0
    16
    Manchester, UK
    Quackshot Disassembly
    I haven't got a problem with you as such. I'm just pointing out that we're on page 8 (under standard post number settings), and all you have done is half finished a zone. I wouldn't bring this up if the topic was littered with other people's opinions, thus boosting the number of posts. The thing is, every couple of replies, you post to say you've changed a zone name, or changed a pixel of art. Last time you did this, people started getting pissed off with it and the topic just died.

    The help topics is another thing. Just how many help topics does one person really need to make. You could have easily contained all of your questions in one topic, but instead you must have made about 10 topics, most of which ask the most basic of questions, and you're supposed to be a tech member.
     
  4. .hack//zero

    .hack//zero

    Member
    3,001
    3
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    hmm, I guess you're right. I guess I'll just save the small changes for the chat room to see if they like it. I usually like to see people like before going to far in to the zone art. BTW, I've finished over 3 quarters of EHZ as a whole.
    You're right, I have been asking some basic questions. Porting the crabmeat to s2 isn't one of them. All I keep hearing is that I need to change the VRAM/PLCs. I've done that, I've made sure that everything is right. The crabmeat still doesn't show up. I've tried learning asm the normal way. It doesn't work for me that way. I learn best by example. My most recent example. When I learned how to convert the mappings from s1 to s2. I'll give learning asm the normal way another try.
     
  5. SMTP

    SMTP

    Tech Member
    Did you even change an empty Object ID to point to the new code?
     
  6. .hack//zero

    .hack//zero

    Member
    3,001
    3
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    Well, take a look at the code. All the needed s2 pointers(or whatever they are called) are compatible with the crabmeat.

    Code (Text):
    1. ; ===========================================================================
    2. ; ---------------------------------------------------------------------------
    3. ; Object 1F - Crabmeat enemy (GHZ, SYZ)
    4. ; ---------------------------------------------------------------------------
    5.  
    6. Obj1F:    ; XREF: Obj_Index
    7.   moveq    #0,d0
    8.   move.b   $24(a0),d0
    9.   move.w   Obj1F_Index(pc,d0.w),d1
    10.   jmp  Obj1F_Index(pc,d1.w)
    11. ; ===========================================================================
    12. Obj1F_Index:    dc.w Obj1F_Main-Obj1F_Index
    13.   dc.w Obj1F_Action-Obj1F_Index
    14.   dc.w Obj1F_Delete-Obj1F_Index
    15.   dc.w Obj1F_BallMain-Obj1F_Index
    16.   dc.w Obj1F_BallMove-Obj1F_Index
    17. ; ===========================================================================
    18.  
    19. Obj1F_Main:      ; XREF: Obj1F_Index
    20.   move.b   #$10,$16(a0)
    21.   move.b   #8,$17(a0)
    22.   move.l   #Map_obj1F,4(a0)
    23.   move.w   #$400,2(a0)
    24.   move.b   #4,1(a0)
    25.   move.b   #3,$18(a0)
    26.   move.b   #6,$20(a0)
    27.   move.b   #$15,$19(a0)
    28.   dc.l ObjectFall
    29.   dc.l ObjHitFloor
    30.   tst.w    d1
    31.   bpl.s    locret_955A
    32.   add.w    d1,$C(a0)
    33.   move.b   d3,$26(a0)
    34.   move.w   #0,$12(a0)
    35.   addq.b   #2,$24(a0)
    36.  
    37. locret_955A:
    38.   rts 
    39. ; ===========================================================================
    40.  
    41. Obj1F_Action:    ; XREF: Obj1F_Index
    42.   moveq    #0,d0
    43.   move.b   $25(a0),d0
    44.   move.w   Obj1F_Index2(pc,d0.w),d1
    45.   jsr  Obj1F_Index2(pc,d1.w)
    46.   lea  (Ani_obj1F).l,a1
    47.   dc.l AnimateSprite
    48.   dc.l MarkObjGone
    49. ; ===========================================================================
    50. Obj1F_Index2:   dc.w Obj1F_WaitFire-Obj1F_Index2
    51.   dc.w Obj1F_WalkOnFloor-Obj1F_Index2
    52. ; ===========================================================================
    53.  
    54. Obj1F_WaitFire:      ; XREF: Obj1F_Index2
    55.   subq.w   #1,$30(a0); subtract 1 from time delay
    56.   bpl.s    locret_95B6
    57.   tst.b    1(a0)
    58.   bpl.s    Obj1F_Move
    59.   bchg #1,$32(a0)
    60.   bne.s    Obj1F_MakeFire
    61.  
    62. Obj1F_Move:
    63.   addq.b   #2,$25(a0)
    64.   move.w   #127,$30(a0); set time delay to approx 2 seconds
    65.   move.w   #$80,$10(a0); move Crabmeat to the right
    66.   bsr.w    Obj1F_SetAni
    67.   addq.b   #3,d0
    68.   move.b   d0,$1C(a0)
    69.   bchg #0,$22(a0)
    70.   bne.s    locret_95B6
    71.   neg.w    $10(a0) ; change direction
    72.  
    73. locret_95B6:
    74.   rts 
    75. ; ===========================================================================
    76.  
    77. Obj1F_MakeFire:      ; XREF: Obj1F_WaitFire
    78.   move.w   #$3B,$30(a0)
    79.   move.b   #6,$1C(a0); use firing animation
    80.   dc.l SingleObjLoad
    81.   bne.s    Obj1F_MakeFire2
    82.   move.b   #$1F,0(a1); load left fireball
    83.   move.b   #6,$24(a1)
    84.   move.w   8(a0),8(a1)
    85.   subi.w   #$10,8(a1)
    86.   move.w   $C(a0),$C(a1)
    87.   move.w   #-$100,$10(a1)
    88.  
    89. Obj1F_MakeFire2:
    90.   dc.l SingleObjLoad
    91.   bne.s    locret_9618
    92.   move.b   #$1F,0(a1); load right fireball
    93.   move.b   #6,$24(a1)
    94.   move.w   8(a0),8(a1)
    95.   addi.w   #$10,8(a1)
    96.   move.w   $C(a0),$C(a1)
    97.   move.w   #$100,$10(a1)
    98.  
    99. locret_9618:
    100.   rts 
    101. ; ===========================================================================
    102.  
    103. Obj1F_WalkOnFloor:  ; XREF: Obj1F_Index2
    104.   subq.w   #1,$30(a0)
    105.   bmi.s    loc_966E
    106.   dc.l SpeedToPos
    107.   bchg #0,$32(a0)
    108.   bne.s    loc_9654
    109.   move.w   8(a0),d3
    110.   addi.w   #$10,d3
    111.   btst #0,$22(a0)
    112.   beq.s    loc_9640
    113.   subi.w   #$20,d3
    114.  
    115. loc_9640:
    116.   jsr  ObjHitFloor2
    117.   cmpi.w   #-8,d1
    118.   blt.s    loc_966E
    119.   cmpi.w   #$C,d1
    120.   bge.s    loc_966E
    121.   rts 
    122. ; ===========================================================================
    123.  
    124. loc_9654:    ; XREF: Obj1F_WalkOnFloor
    125.   jsr  ObjHitFloor
    126.   add.w    d1,$C(a0)
    127.   move.b   d3,$26(a0)
    128.   bsr.w    Obj1F_SetAni
    129.   addq.b   #3,d0
    130.   move.b   d0,$1C(a0)
    131.   rts 
    132. ; ===========================================================================
    133.  
    134. loc_966E:    ; XREF: Obj1F_WalkOnFloor
    135.   subq.b   #2,$25(a0)
    136.   move.w   #59,$30(a0)
    137.   move.w   #0,$10(a0)
    138.   bsr.w    Obj1F_SetAni
    139.   move.b   d0,$1C(a0)
    140.   rts 
    141. ; ---------------------------------------------------------------------------
    142. ; Subroutine to set the correct animation for a Crabmeat
    143. ; ---------------------------------------------------------------------------
    144.  
    145. ; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
    146.  
    147.  
    148. Obj1F_SetAni:    ; XREF: loc_966E
    149.   moveq    #0,d0
    150.   move.b   $26(a0),d3
    151.   bmi.s    loc_96A4
    152.   cmpi.b   #6,d3
    153.   bcs.s    locret_96A2
    154.   moveq    #1,d0
    155.   btst #0,$22(a0)
    156.   bne.s    locret_96A2
    157.   moveq    #2,d0
    158.  
    159. locret_96A2:
    160.   rts 
    161. ; ===========================================================================
    162.  
    163. loc_96A4:    ; XREF: Obj1F_SetAni
    164.   cmpi.b   #-6,d3
    165.   bhi.s    locret_96B6
    166.   moveq    #2,d0
    167.   btst #0,$22(a0)
    168.   bne.s    locret_96B6
    169.   moveq    #1,d0
    170.  
    171. locret_96B6:
    172.   rts 
    173. ; End of function Obj1F_SetAni
    174.  
    175. ; ===========================================================================
    176.  
    177. Obj1F_Delete:    ; XREF: Obj1F_Index
    178.   dc.l DeleteObject
    179.   rts 
    180. ; ===========================================================================
    181. ; ---------------------------------------------------------------------------
    182. ; Sub-object - missile that the Crabmeat throws
    183. ; ---------------------------------------------------------------------------
    184.  
    185. Obj1F_BallMain:      ; XREF: Obj1F_Index
    186.   addq.b   #2,$24(a0)
    187.   move.l   #Map_obj1F,4(a0)
    188.   move.w   #$400,2(a0)
    189.   move.b   #4,1(a0)
    190.   move.b   #3,$18(a0)
    191.   move.b   #$87,$20(a0)
    192.   move.b   #8,$19(a0)
    193.   move.w   #-$400,$12(a0)
    194.   move.b   #7,$1C(a0)
    195.  
    196. Obj1F_BallMove:      ; XREF: Obj1F_Index
    197.   lea  (Ani_obj1F).l,a1
    198.   dc.l AnimateSprite
    199.   dc.l ObjectFall
    200.   dc.l DisplaySprite
    201.   move.w   ($FFFFF72E).w,d0
    202.   addi.w   #$E0,d0
    203.   cmp.w    $C(a0),d0; has object moved below the level boundary?
    204.   bcs.s    Obj1F_Delete2; if yes, branch
    205.   rts 
    206. ; ===========================================================================
    207.  
    208. Obj1F_Delete2:
    209.   dc.l DeleteObject
    210. ; ===========================================================================
    211. ; ---------------------------------------------------------------------------
    212. ; Animation script - Crabmeat enemy
    213. ; ---------------------------------------------------------------------------
    214. Ani_obj1F:  dc.w byte_10972A-Ani_obj1F, byte_10972E-Ani_obj1F, byte_109732-Ani_obj1F
    215.   dc.w byte_109736-Ani_obj1F, byte_10973C-Ani_obj1F, byte_109742-Ani_obj1F
    216.   dc.w byte_109748-Ani_obj1F, byte_10974C-Ani_obj1F
    217. byte_10972A:    dc.b $F, 0, $FF, 0
    218. byte_10972E:    dc.b $F, 2, $FF, 0
    219. byte_109732:    dc.b $F, $22, $FF, 0
    220. byte_109736:    dc.b $F, 1, $21, 0, $FF, 0
    221. byte_10973C:    dc.b $F, $21, 3, 2, $FF, 0
    222. byte_109742:    dc.b $F, 1, $23, $22, $FF, 0
    223. byte_109748:    dc.b $F, 4, $FF, 0
    224. byte_10974C:    dc.b 1, 5, 6, $FF
    225.  
    226. ; ---------------------------------------------------------------------------
    227. ; Sprite mappings - Crabmeat enemy (GHZ, SYZ)
    228. ; ---------------------------------------------------------------------------
    229. Map_obj1F: dc.w byte_1975E-Map_obj1F, byte_19773-Map_obj1F
    230. dc.w byte_19788-Map_obj1F, byte_1979D-Map_obj1F
    231. dc.w byte_197B2-Map_obj1F, byte_197D1-Map_obj1F
    232. dc.w byte_197D7-Map_obj1F
    233. byte_1975E: dc.b 4
    234. dc.w $F009, $0000, $0000, $00E8
    235. dc.w $F009, $8000, $4000, $0000
    236. dc.w $0005, $0006, $0003, $00F0
    237. dc.w $0005, $0806, $0403, $0000
    238. byte_19773: dc.b 4
    239. dc.w $F009, $00A0, $0050, $00E8
    240. dc.w $F009, $0010, $0008, $0000
    241. dc.w $0005, $0016, $000B, $00F0
    242. dc.w $0009, $001A, $000D, $0000
    243. byte_19788: dc.b 4
    244. dc.w $EC09, $0000, $0000, $00E8
    245. dc.w $EC09, $0008, $0004, $0000
    246. dc.w $FC05, $0806, $0403, $0000
    247. dc.w $FC06, $0020, $0010, $00F0
    248. byte_1979D: dc.b 4
    249. dc.w $EC09, $000A, $0005, $00E8
    250. dc.w $EC09, $0010, $0008, $0000
    251. dc.w $FC09, $0026, $0013, $0000
    252. dc.w $FC06, $002C, $0016, $00F0
    253. byte_197B2: dc.b 6
    254. dc.w $F004, $0032, $0016, $00F0
    255. dc.w $F004, $0832, $0419, $0000
    256. dc.w $F809, $0034, $001A, $00E8
    257. dc.w $F809, $0834, $041A, $0000
    258. dc.w $0804, $003A, $001A, $00F0
    259. dc.w $0804, $083A, $001A, $0000
    260. byte_197D1: dc.b 1
    261. dc.w $F805, $003C, $001E, $00F8
    262. byte_197D7: dc.b 1
    263. dc.w $F805, $0040, $0020, $00F8
    264.  
    265. art_obj1F: BINCLUDE  "art\nemesis\crabmeat.bin"
     
  7. SMTP

    SMTP

    Tech Member
    I cant read that f00l... :P

    What I'm saying though is, does the Object have an Object ID? If so, was that ObjectID already in use?

    (I'm pretty much pulling things out the air here...)
     
  8. StephenUK

    StephenUK

    Liquor in the front, poker in the rear Tech Member
    1,678
    0
    16
    Manchester, UK
    Quackshot Disassembly
    I can see a problem with that code right off the bat, but I'll let you figure it out. Common sense would play a major factor in helping you figure it out as well, beside the fact that you have already been told once.

    EDIT: Fuck it, I might as well tell you, or you're just gonna create another 30 pages trying to find out. Whoever helped you convert the mappings format (I believe it was Solaris) fucked up. Yes, you did have to add another word in, that much is correct, but that person clearly didn't know enough about mappings to pick up on the other faults.

    Change all the dc.b commands in bold to dc.w. Change the first 00 of all the underlined words to FF. That'll fix your mappings problem. A little bit of research goes a long way, and I think it's about time you started doing some. You can't rely on other people to do all the hard work for you. This stuff is basic knowledge, and the information for it is even on a Sonic related website created by one of our very own admin.
     
  9. Hivebrain

    Hivebrain

    Administrator
    3,001
    99
    28
    53.4N, 1.5W
    Github
    Those should be JSRs.
     
  10. StephenUK

    StephenUK

    Liquor in the front, poker in the rear Tech Member
    1,678
    0
    16
    Manchester, UK
    Quackshot Disassembly
    All the dc.l commands should be JSR commands. If someone is helping him with this, they're just making it a hell of a lot worse.
     
  11. Tweaker

    Tweaker

    Misfit
    12,389
    1
    0
    The master of porting bosses, of course!

    I DID wonder what was up with those dc.ls, though. Guess I know, now.
     
  12. StephenUK

    StephenUK

    Liquor in the front, poker in the rear Tech Member
    1,678
    0
    16
    Manchester, UK
    Quackshot Disassembly
    Ah yeah I forgot. The master of ASM who has reworked the entire game engine and ported/created a load of bosses for his hack, yet still makes hundreds of retarded errors. How could I forget about him. He usually makes my BS meter go completely off the scale.
     
  13. .hack//zero

    .hack//zero

    Member
    3,001
    3
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    The dc.l thing was my idea. I'm still very new to asm. The crabmeat is almost working. Don't worry, I'm not gonna ask for help till I've run out of ideas. AFTER I'm done porting the crabmeat, don't expect as many help topics. Since everything I need. I've already asked. I'll be porting more enemies after him, but it'll be a lot easier.
     
  14. StephenUK

    StephenUK

    Liquor in the front, poker in the rear Tech Member
    1,678
    0
    16
    Manchester, UK
    Quackshot Disassembly
    Don't consider that to be a fact. I've ported quite a few enemies, but some are still too hard for me to do.
     
  15. .hack//zero

    .hack//zero

    Member
    3,001
    3
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    Which ones where the hardest for you. And about how hard is the crabmeat to port?
     
  16. Tweaker

    Tweaker

    Misfit
    12,389
    1
    0
    And do explain HOW at ANY time that seemed like a good idea?
     
  17. .hack//zero

    .hack//zero

    Member
    3,001
    3
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    Which part do I need to explain? Can't exactly explain something that I don't even know what I'm explaining about.
     
  18. BadCopNoDonut

    BadCopNoDonut

    O RLY? Oldbie
    785
    0
    0
    Sonic D T
    People, you do realize that by arguing back and forth like this, you are making the topic stretch out by many pages, which is what you are irritated about in the first place, right?
     
  19. .hack//zero

    .hack//zero

    Member
    3,001
    3
    18
    Working on a vulkan game engine for fun. Learning Ray-Tracing.
    I'm back. I've haven't had a chance to work on it since I got addicted to Disgaea 2. Now, I'm pretty much done with it, and I'm back to working on my hack. WTF is wrong with the file atachments?

    File Attachments
    Global Space Left: 0bytes

    [​IMG]
     
  20. Varion Icaria

    Varion Icaria

    He's waiting.... Tech Member
    1,014
    3
    18
    S4: Cybernetic Outbreak
    Nice fucking job on the level, Keep up the great work.
     
Thread Status:
Not open for further replies.