don't click here

In need of some help.

Discussion in 'Engineering & Reverse Engineering' started by Hitaxas, Mar 2, 2008.

Thread Status:
Not open for further replies.
  1. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Alright. So, I have attempted to port the motobug enemy from Sonic 1 into Sonic 2. The code compiles and all, but if fails to show up at all. I am not exactly sure what I have done wrong/haven't done to make this not work.


    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='geshimain'><!--eg1--><pre class="asm">[color= #adadad; font-style: italic;]; ===========================================================================[/color]
    [color= #adadad; font-style: italic;]; ---------------------------------------------------------------------------[/color]
    [color= #adadad; font-style: italic;]; Object 4C - Bug enemy (AHZ)[/color]
    [color= #adadad; font-style: italic;]; ---------------------------------------------------------------------------[/color]
    &nbsp;
    obj4C: [color= #adadad; font-style: italic;]; XREF: Obj_Index[/color]
    [color= #00bfff;]moveq[/color] [color= #ff0000;]#[/color][color= #ff0000;]0[/color],<span style="font-weight:bold;">d0</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]24[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="font-weight:bold;">d0</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] obj4C_Index<span style="">(</span>pc,<span style="font-weight:bold;">d0</span>.[color= #00bfff;]w[/color]<span style="">)</span>,<span style="font-weight:bold;">d1</span>
    [color= #00bfff;]jmp[/color] obj4C_Index<span style="">(</span>pc,<span style="font-weight:bold;">d1</span>.[color= #00bfff;]w[/color]<span style="">)</span>
    [color= #adadad; font-style: italic;]; ===========================================================================[/color]
    obj4C_Index: [color= #00bfff;]dc[/color].[color= #00bfff;]w[/color] obj4C_Main-obj4C_Index
    [color= #00bfff;]dc[/color].[color= #00bfff;]w[/color] obj4C_Action-obj4C_Index
    [color= #00bfff;]dc[/color].[color= #00bfff;]w[/color] obj4C_Animate-obj4C_Index
    [color= #00bfff;]dc[/color].[color= #00bfff;]w[/color] obj4C_Delete-obj4C_Index
    [color= #adadad; font-style: italic;]; ===========================================================================[/color]
    &nbsp;
    obj4C_Main: [color= #adadad; font-style: italic;]; XREF: obj4C_Index[/color]
    [color= #00bfff;]move[/color].[color= #00bfff;]l[/color] [color= #ff0000;]#[/color]Map_obj4C,[color= #ff0000;]4[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]4F0[/color],[color= #ff0000;]2[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]4[/color],[color= #ff0000;]1[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]4[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]18[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]14[/color][/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]19[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]tst[/color].[color= #00bfff;]b[/color] [color= #ff0000;]$[/color][color= #ff0000;]1C[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span> [color= #adadad; font-style: italic;]; is object a smoke trail?[/color]
    [color= #00bfff;]bne[/color].[color= #00bfff;]s[/color] obj4C_SetSmoke [color= #adadad; font-style: italic;]; if yes, branch[/color]
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]E[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]16[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]8[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]17[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]C[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]20[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]bsr[/color].[color= #00bfff;]w[/color] ObjectmoveandFall
    [color= #00bfff;]jsr[/color] ObjCheckFloorDist
    [color= #00bfff;]tst[/color].[color= #00bfff;]w[/color] <span style="font-weight:bold;">d1</span>
    [color= #00bfff;]bpl[/color].[color= #00bfff;]s[/color] locret_F68A
    [color= #00bfff;]add[/color].[color= #00bfff;]w[/color] <span style="font-weight:bold;">d1</span>,[color= #ff0000;]$[/color][color= #ff0000;]C[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span> [color= #adadad; font-style: italic;]; match object's position with the floor[/color]
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]0[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]12[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]addq[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]2[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]24[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]bchg[/color] [color= #ff0000;]#[/color][color= #ff0000;]0[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]22[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    &nbsp;
    locret_F68A:
    [color= #00bfff;]rts[/color]
    [color= #adadad; font-style: italic;]; ===========================================================================[/color]
    &nbsp;
    obj4C_SetSmoke: [color= #adadad; font-style: italic;]; XREF: obj4C_Main[/color]
    [color= #00bfff;]addq[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]4[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]24[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]bra[/color].[color= #00bfff;]w[/color] obj4C_Animate
    [color= #adadad; font-style: italic;]; ===========================================================================[/color]
    &nbsp;
    obj4C_Action: [color= #adadad; font-style: italic;]; XREF: obj4C_Index[/color]
    [color= #00bfff;]moveq[/color] [color= #ff0000;]#[/color][color= #ff0000;]0[/color],<span style="font-weight:bold;">d0</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]25[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="font-weight:bold;">d0</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] obj4C_Index2<span style="">(</span>pc,<span style="font-weight:bold;">d0</span>.[color= #00bfff;]w[/color]<span style="">)</span>,<span style="font-weight:bold;">d1</span>
    [color= #00bfff;]jsr[/color] obj4C_Index2<span style="">(</span>pc,<span style="font-weight:bold;">d1</span>.[color= #00bfff;]w[/color]<span style="">)</span>
    [color= #00bfff;]lea[/color] <span style="">(</span>Ani_obj4C<span style="">)</span>.[color= #00bfff;]l[/color],<span style="font-weight:bold;">a1</span>
    [color= #00bfff;]bsr[/color].[color= #00bfff;]w[/color] AnimateSprite
    &nbsp;
    [color= #adadad; font-style: italic;]; ---------------------------------------------------------------------------[/color]
    [color= #adadad; font-style: italic;]; Routine to mark an enemy/monitor/ring as destroyed[/color]
    [color= #adadad; font-style: italic;]; ---------------------------------------------------------------------------[/color]
    &nbsp;
    MarkObjGonem:
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]8[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="font-weight:bold;">d0</span>
    [color= #00bfff;]andi[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]FF80[/color],<span style="font-weight:bold;">d0</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] <span style="">(</span>[color= #ff0000;]$[/color][color= #ff0000;]FFFFF700[/color]<span style="">)</span>.[color= #00bfff;]w[/color],<span style="font-weight:bold;">d1</span>
    [color= #00bfff;]subi[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]80[/color][/color],<span style="font-weight:bold;">d1</span>
    [color= #00bfff;]andi[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]FF80[/color],<span style="font-weight:bold;">d1</span>
    [color= #00bfff;]sub[/color].[color= #00bfff;]w[/color] <span style="font-weight:bold;">d1</span>,<span style="font-weight:bold;">d0</span>
    [color= #00bfff;]cmpi[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]280[/color][/color],<span style="font-weight:bold;">d0</span>
    [color= #00bfff;]bhi[/color].[color= #00bfff;]w[/color] Mark_ChkGone
    [color= #00bfff;]bra[/color].[color= #00bfff;]w[/color] DisplaySprite
    [color= #adadad; font-style: italic;]; ===========================================================================[/color]
    &nbsp;
    Mark_ChkGone:
    [color= #00bfff;]lea[/color] <span style="">(</span>[color= #ff0000;]$[/color][color= #ff0000;]FFFFFC00[/color]<span style="">)</span>.[color= #00bfff;]w[/color],<span style="font-weight:bold;">a2</span>
    [color= #00bfff;]moveq[/color] [color= #ff0000;]#[/color][color= #ff0000;]0[/color],<span style="font-weight:bold;">d0</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]23[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,<span style="font-weight:bold;">d0</span>
    [color= #00bfff;]beq[/color].[color= #00bfff;]s[/color] Mark_Delete
    [color= #00bfff;]bclr[/color] [color= #ff0000;]#[/color][color= #ff0000;]7[/color],[color= #ff0000;]2[/color]<span style="">(</span><span style="font-weight:bold;">a2</span>,<span style="font-weight:bold;">d0</span>.[color= #00bfff;]w[/color]<span style="">)</span>
    &nbsp;
    Mark_Delete:
    [color= #00bfff;]bra[/color].[color= #00bfff;]w[/color] DeleteObject
    &nbsp;
    [color= #adadad; font-style: italic;]; ===========================================================================[/color]
    obj4C_Index2: [color= #00bfff;]dc[/color].[color= #00bfff;]w[/color] obj4C_Move-obj4C_Index2
    [color= #00bfff;]dc[/color].[color= #00bfff;]w[/color] obj4C_FixToFloor-obj4C_Index2
    [color= #adadad; font-style: italic;]; ===========================================================================[/color]
    &nbsp;
    obj4C_Move: [color= #adadad; font-style: italic;]; XREF: obj4C_Index2[/color]
    [color= #00bfff;]subq[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]1[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]30[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span> [color= #adadad; font-style: italic;]; subtract 1 from pause time[/color]
    [color= #00bfff;]bpl[/color].[color= #00bfff;]s[/color] locret_F70A [color= #adadad; font-style: italic;]; if time remains, branch[/color]
    [color= #00bfff;]addq[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]2[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]25[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color]-[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]100[/color][/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]10[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span> [color= #adadad; font-style: italic;]; move object to the left[/color]
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]1[/color],[color= #ff0000;]$[/color][color= #ff0000;]1C[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]bchg[/color] [color= #ff0000;]#[/color][color= #ff0000;]0[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]22[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]bne[/color].[color= #00bfff;]s[/color] locret_F70A
    [color= #00bfff;]neg[/color].[color= #00bfff;]w[/color] [color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]10[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span> [color= #adadad; font-style: italic;]; change direction[/color]
    &nbsp;
    locret_F70A:
    [color= #00bfff;]rts[/color]
    [color= #adadad; font-style: italic;]; ===========================================================================[/color]
    &nbsp;
    obj4C_FixToFloor: [color= #adadad; font-style: italic;]; XREF: obj4C_Index2[/color]
    [color= #00bfff;]bsr[/color].[color= #00bfff;]w[/color] ObjectMove
    [color= #00bfff;]jsr[/color] ObjCheckFloorDist
    [color= #00bfff;]cmpi[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]-8[/color],<span style="font-weight:bold;">d1</span>
    [color= #00bfff;]blt[/color].[color= #00bfff;]s[/color] obj4C_Pause
    [color= #00bfff;]cmpi[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]C[/color],<span style="font-weight:bold;">d1</span>
    [color= #00bfff;]bge[/color].[color= #00bfff;]s[/color] obj4C_Pause
    [color= #00bfff;]add[/color].[color= #00bfff;]w[/color] <span style="font-weight:bold;">d1</span>,[color= #ff0000;]$[/color][color= #ff0000;]C[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span> [color= #adadad; font-style: italic;]; match object's position with the floor[/color]
    [color= #00bfff;]subq[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]1[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]33[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]bpl[/color].[color= #00bfff;]s[/color] locret_F756
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]F[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]33[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]bsr[/color].[color= #00bfff;]w[/color] SingleObjLoad
    [color= #00bfff;]bne[/color].[color= #00bfff;]s[/color] locret_F756
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]40[/color][/color],[color= #ff0000;]0[/color]<span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span> [color= #adadad; font-style: italic;]; load exhaust smoke object[/color]
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]8[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,[color= #ff0000;]8[/color]<span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]$[/color][color= #ff0000;]C[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,[color= #ff0000;]$[/color][color= #ff0000;]C[/color]<span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]22[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>,[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]22[/color][/color]<span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]2[/color],[color= #ff0000;]$[/color][color= #ff0000;]1C[/color]<span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span>
    &nbsp;
    locret_F756:
    [color= #00bfff;]rts[/color]
    [color= #adadad; font-style: italic;]; ===========================================================================[/color]
    &nbsp;
    obj4C_Pause: [color= #adadad; font-style: italic;]; XREF: obj4C_FixToFloor[/color]
    [color= #00bfff;]subq[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]2[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]25[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]59[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]30[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span> [color= #adadad; font-style: italic;]; set pause time to 1 second[/color]
    [color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]0[/color],[color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]10[/color][/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span> [color= #adadad; font-style: italic;]; stop the object moving[/color]
    [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]0[/color],[color= #ff0000;]$[/color][color= #ff0000;]1C[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span>
    [color= #00bfff;]rts[/color]
    [color= #adadad; font-style: italic;]; ===========================================================================[/color]
    &nbsp;
    obj4C_Animate: [color= #adadad; font-style: italic;]; XREF: obj4C_Index[/color]
    [color= #00bfff;]lea[/color] <span style="">(</span>Ani_obj4C<span style="">)</span>.[color= #00bfff;]l[/color],<span style="font-weight:bold;">a1</span>
    [color= #00bfff;]bsr[/color].[color= #00bfff;]w[/color] AnimateSprite
    [color= #00bfff;]bra[/color].[color= #00bfff;]w[/color] DisplaySprite
    [color= #adadad; font-style: italic;]; ===========================================================================[/color]
    &nbsp;
    obj4C_Delete: [color= #adadad; font-style: italic;]; XREF: obj4C_Index[/color]
    [color= #00bfff;]bra[/color].[color= #00bfff;]w[/color] DeleteObject
    [color= #adadad; font-style: italic;]; ===========================================================================[/color]
    Ani_obj4C: BINCLUDE [color= #CC33CC;]"mappingsspriteDPLCobj4C.asm"[/color]
    &nbsp;
    [color= #adadad; font-style: italic;]; ---------------------------------------------------------------------------[/color]
    [color= #adadad; font-style: italic;]; Sprite mappings - Moto Bug enemy (GHZ)[/color]
    [color= #adadad; font-style: italic;]; ---------------------------------------------------------------------------[/color]
    Map_obj4C: BINCLUDE [color= #CC33CC;]"mappingsspriteobj4C.asm"[/color]
    &nbsp;
    [color= #adadad; font-style: italic;]; ---------------------------------------------------------------------------[/color]
    Nem_Motobug: BINCLUDE [color= #CC33CC;]"artnemesismotobug.bin"[/color] [color= #adadad; font-style: italic;]; moto bug[/color]
    &nbsp;
    [color= #adadad; font-style: italic;]; ---------------------------------------------------------------------------[/color]</pre><!--gc2--><!--OyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
    PT09PT09PT09PT09PT09PT0KOyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL
    S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KOyBPYmplY3QgNEMgLSAgQnVnIGVuZW15IC
    hBSFopCjsgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0
    tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCgpvYmo0QzoJCQkJCTsgWFJFRjogT2JqX0luZGV4CgkJbW92ZXEJ
    IzAsZDAKCQltb3ZlLmIJJiMwMzY7MjQoYTApLGQwCgkJbW92ZS53CW9iajRDX0luZGV4KHBjLGQwLncpL
    GQxCgkJam1wCW9iajRDX0luZGV4KHBjLGQxLncpCjsgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT
    09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Cm9iajRDX0luZGV4Ogl
    kYy53IG9iajRDX01haW4tb2JqNENfSW5kZXgKCQlkYy53IG9iajRDX0FjdGlvbi1vYmo0Q19JbmRleAoJ
    CWRjLncgb2JqNENfQW5pbWF0ZS1vYmo0Q19JbmRleAoJCWRjLncgb2JqNENfRGVsZXRlLW9iajRDX0luZ
    GV4CjsgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT
    09PT09PT09PT09PT09PT09PT09CgpvYmo0Q19NYWluOgkJCQk7IFhSRUY6IG9iajRDX0luZGV4CgkJbW9
    2ZS5sCSNNYXBfb2JqNEMsNChhMCkKCQltb3ZlLncJIyYjMDM2OzRGMCwyKGEwKQoJCW1vdmUuYgkjNCwx
    KGEwKQoJCW1vdmUuYgkjNCwmIzAzNjsxOChhMCkKCQltb3ZlLmIJIyYjMDM2OzE0LCYjMDM2OzE5KGEwK
    QoJCXRzdC5iCSYjMDM2OzFDKGEwKQkJOyBpcyBvYmplY3QgYSBzbW9rZSB0cmFpbD8KCQlibmUucwlvYm
    o0Q19TZXRTbW9rZQk7IGlmIHllcywgYnJhbmNoCgkJbW92ZS5iCSMmIzAzNjtFLCYjMDM2OzE2KGEwKQo
    JCW1vdmUuYgkjOCwmIzAzNjsxNyhhMCkKCQltb3ZlLmIJIyYjMDM2O0MsJiMwMzY7MjAoYTApCgkJYnNy
    LncJT2JqZWN0bW92ZWFuZEZhbGwKCQlqc3IJT2JqQ2hlY2tGbG9vckRpc3QKCQl0c3QudwlkMQoJCWJwb
    C5zCWxvY3JldF9GNjhBCgkJYWRkLncJZDEsJiMwMzY7QyhhMCkJOyBtYXRjaAlvYmplY3QmIzM5O3MgcG
    9zaXRpb24gd2l0aCB0aGUgZmxvb3IKCQltb3ZlLncJIzAsJiMwMzY7MTIoYTApCgkJYWRkcS5iCSMyLCY
    jMDM2OzI0KGEwKQoJCWJjaGcJIzAsJiMwMzY7MjIoYTApCgpsb2NyZXRfRjY4QToKCQlydHMJCjsgPT09
    PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P
    T09PT09PT09PT09CgpvYmo0Q19TZXRTbW9rZToJCQkJOyBYUkVGOiBvYmo0Q19NYWluCgkJYWRkcS5iCS
    M0LCYjMDM2OzI0KGEwKQoJCWJyYS53CW9iajRDX0FuaW1hdGUKOyA9PT09PT09PT09PT09PT09PT09PT0
    9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KCm9iajRD
    X0FjdGlvbjoJCQkJOyBYUkVGOiBvYmo0Q19JbmRleAoJCW1vdmVxCSMwLGQwCgkJbW92ZS5iCSYjMDM2O
    zI1KGEwKSxkMAoJCW1vdmUudwlvYmo0Q19JbmRleDIocGMsZDAudyksZDEKCQlqc3IJb2JqNENfSW5kZX
    gyKHBjLGQxLncpCgkJbGVhCShBbmlfb2JqNEMpLmwsYTEKCQlic3IudwlBbmltYXRlU3ByaXRlCgo7IC0
    tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
    LS0tLS0tLS0tLS0tLQo7IFJvdXRpbmUgdG8gbWFyayBhbiBlbmVteS9tb25pdG9yL3JpbmcJYXMgZGVzd
    HJveWVkCjsgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS
    0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCgpNYXJrT2JqR29uZW06CgkJbW92ZS53CTgoYTApLGQwCgkJYW5
    kaS53CSMmIzAzNjtGRjgwLGQwCgkJbW92ZS53CSgmIzAzNjtGRkZGRjcwMCkudyxkMQoJCXN1Ymkudwkj
    JiMwMzY7ODAsZDEKCQlhbmRpLncJIyYjMDM2O0ZGODAsZDEKCQlzdWIudwlkMSxkMAoJCWNtcGkudwkjJ
    iMwMzY7MjgwLGQwCgkJYmhpLncJTWFya19DaGtHb25lCgkJYnJhLncJRGlzcGxheVNwcml0ZQo7ID09PT
    09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
    9PT09PT09PT09PQoKTWFya19DaGtHb25lOgoJCWxlYQkoJiMwMzY7RkZGRkZDMDApLncsYTIKCQltb3Zl
    cQkjMCxkMAoJCW1vdmUuYgkmIzAzNjsyMyhhMCksZDAKCQliZXEucwlNYXJrX0RlbGV0ZQoJCWJjbHIJI
    zcsMihhMixkMC53KQoKTWFya19EZWxldGU6CgkJYnJhLncJRGVsZXRlT2JqZWN0Cgo7ID09PT09PT09PT
    09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
    9PT09PQpvYmo0Q19JbmRleDI6CWRjLncgb2JqNENfTW92ZS1vYmo0Q19JbmRleDIKCQlkYy53IG9iajRD
    X0ZpeFRvRmxvb3Itb2JqNENfSW5kZXgyCjsgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P
    T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CgpvYmo0Q19Nb3ZlOgkJCQk7IF
    hSRUY6IG9iajRDX0luZGV4MgoJCXN1YnEudwkjMSwmIzAzNjszMChhMCkJOyBzdWJ0cmFjdCAxIGZyb20
    gcGF1c2UJdGltZQoJCWJwbC5zCWxvY3JldF9GNzBBCTsgaWYgdGltZSByZW1haW5zLCBicmFuY2gKCQlh
    ZGRxLmIJIzIsJiMwMzY7MjUoYTApCgkJbW92ZS53CSMtJiMwMzY7MTAwLCYjMDM2OzEwKGEwKQk7IG1vd
    mUgb2JqZWN0IHRvIHRoZSBsZWZ0CgkJbW92ZS5iCSMxLCYjMDM2OzFDKGEwKQoJCWJjaGcJIzAsJiMwMz
    Y7MjIoYTApCgkJYm5lLnMJbG9jcmV0X0Y3MEEKCQluZWcudwkmIzAzNjsxMChhMCkJCTsgY2hhbmdlIGR
    pcmVjdGlvbgoKbG9jcmV0X0Y3MEE6CgkJcnRzCQo7ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09
    PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQoKb2JqNENfRml4VG9Gb
    G9vcjoJCQk7IFhSRUY6IG9iajRDX0luZGV4MgoJCWJzci53CU9iamVjdE1vdmUKCQlqc3IJT2JqQ2hlY2
    tGbG9vckRpc3QKCQljbXBpLncJIy04LGQxCgkJYmx0LnMJb2JqNENfUGF1c2UKCQljbXBpLncJIyYjMDM
    2O0MsZDEKCQliZ2UucwlvYmo0Q19QYXVzZQoJCWFkZC53CWQxLCYjMDM2O0MoYTApCTsgbWF0Y2gJb2Jq
    ZWN0JiMzOTtzIHBvc2l0aW9uIHdpdGggdGhlIGZsb29yCgkJc3VicS5iCSMxLCYjMDM2OzMzKGEwKQoJC
    WJwbC5zCWxvY3JldF9GNzU2CgkJbW92ZS5iCSMmIzAzNjtGLCYjMDM2OzMzKGEwKQoJCWJzci53CVNpbm
    dsZU9iakxvYWQKCQlibmUucwlsb2NyZXRfRjc1NgoJCW1vdmUuYgkjJiMwMzY7NDAsMChhMSkJOyBsb2F
    kIGV4aGF1c3Qgc21va2Ugb2JqZWN0CgkJbW92ZS53CTgoYTApLDgoYTEpCgkJbW92ZS53CSYjMDM2O0Mo
    YTApLCYjMDM2O0MoYTEpCgkJbW92ZS5iCSYjMDM2OzIyKGEwKSwmIzAzNjsyMihhMSkKCQltb3ZlLmIJI
    zIsJiMwMzY7MUMoYTEpCgpsb2NyZXRfRjc1NjoKCQlydHMJCjsgPT09PT09PT09PT09PT09PT09PT09PT
    09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CgpvYmo0Q19
    QYXVzZToJCQkJOyBYUkVGOiBvYmo0Q19GaXhUb0Zsb29yCgkJc3VicS5iCSMyLCYjMDM2OzI1KGEwKQoJ
    CW1vdmUudwkjNTksJiMwMzY7MzAoYTApCTsgc2V0IHBhdXNlIHRpbWUgdG8gMSBzZWNvbmQKCQltb3ZlL
    ncJIzAsJiMwMzY7MTAoYTApCTsgc3RvcCB0aGUgb2JqZWN0IG1vdmluZwoJCW1vdmUuYgkjMCwmIzAzNj
    sxQyhhMCkKCQlydHMJCjsgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
    9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CgpvYmo0Q19BbmltYXRlOgkJCQk7IFhSRUY6IG9i
    ajRDX0luZGV4CgkJbGVhCShBbmlfb2JqNEMpLmwsYTEKCQlic3IudwlBbmltYXRlU3ByaXRlCgkJYnJhL
    ncJRGlzcGxheVNwcml0ZQo7ID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT
    09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQoKb2JqNENfRGVsZXRlOgkJCQk7IFhSRUY6IG9
    iajRDX0luZGV4CgkJYnJhLncJRGVsZXRlT2JqZWN0CjsgPT09PT09PT09PT09PT09PT09PT09PT09PT09
    PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CkFuaV9vYmo0QzogQ
    klOQ0xVREUgJnF1b3Q7bWFwcGluZ3MmIzA5MjtzcHJpdGVEUExDJiMwOTI7b2JqNEMuYXNtJnF1b3Q7Cg
    o7IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0
    tLS0tLS0tLS0tLS0tLS0tLQo7IFNwcml0ZSBtYXBwaW5ncyAtIE1vdG8gQnVnIGVuZW15IChHSFopCjsg
    LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL
    S0tLS0tLS0tLS0tLS0tCk1hcF9vYmo0QzogQklOQ0xVREUgJnF1b3Q7bWFwcGluZ3MmIzA5MjtzcHJpdG
    UmIzA5MjtvYmo0Qy5hc20mcXVvdDsKCjsgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0
    tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCk5lbV9Nb3RvYnVnOglCSU5DTFVE
    RQkmcXVvdDthcnQmIzA5MjtuZW1lc2lzJiMwOTI7bW90b2J1Zy5iaW4mcXVvdDsJOyBtb3RvIGJ1ZwoKO
    yAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS
    0tLS0tLS0tLS0tLS0tLS0=--><!--egc2--><!--g2--></div><!--eg2-->
     
  2. Sonic 65

    Sonic 65

    Tech Member
    Change:

    [codebox]obj4C_Action: ; XREF: obj4C_Index
    moveq #0,d0
    move.b $25(a0),d0
    move.w obj4C_Index2(pc,d0.w),d1
    jsr obj4C_Index2(pc,d1.w)
    lea (Ani_obj4C).l,a1
    bsr.w AnimateSprite[/codebox]

    to:

    [codebox]obj4C_Action: ; XREF: obj4C_Index
    moveq #0,d0
    move.b $25(a0),d0
    move.w obj4C_Index2(pc,d0.w),d1
    jsr obj4C_Index2(pc,d1.w)
    lea (Ani_obj4C).l,a1
    bra.s AnimateSprite[/codebox]

    EDIT: wait no. fixed.
     
  3. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Thanks, now all I have to do is fix the mappings and art.

    (go figure all my errors are 1-liners >.>;)


    EDIT:now the jump distance is "too big". 0.o
     
  4. Sonic 65

    Sonic 65

    Tech Member
    Replace bra.s with bra.w.

    also are the mappings at least in S2 format? because that might have been your problem all along.
     
  5. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    No, they aren't. It'd be good if I knew how to convert/rewrite, huh?
     
  6. Sonic 65

    Sonic 65

    Tech Member
    It's actually really simple with SonMapEd.

    load up your mappings in S1 format, go to Settings -> Game Format, set it to Sonic 2, and save the new mappings.

    I don't think art needs to be changed, just add it into the PLC table.
     
  7. Tweaker

    Tweaker

    Misfit
    12,389
    1
    0
    You can just open them up in SonMapEd, switch to Sonic 2 format, then export. Instant conversion.
     
  8. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    What about the _anim file? That won't convert in SonMapEd.
     
  9. Tweaker

    Tweaker

    Misfit
    12,389
    1
    0
    ...you don't need to change the animation script.
     
  10. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Ignore the extra sonic.

    I am sure the enemy should not look like and act like a spring... this is strange. Because I believe I have the art set up correctly and the mappings.

    [​IMG]
     
  11. JoseTB

    JoseTB

    Tech Member
    717
    59
    28
    Did you add your art to the Pattern Load cue of the level? In any case, I'd suggest to check the VRAM to verify that the tiles have been loaded AND make sure the address where you load them match with the value set to 2(a0).
     
  12. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    It is in the PLC for EHZ (AHZ), but it still shows up that way. As for checking the VRAM stuff, I wouldn't know where to start. But I do know that the Tiles are loaded, just not where they should be.


    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='geshimain'><!--eg1--><pre class="asm">PlrList_Ehz1: plrlistheader
    plreq [color= #ff0000;]$[/color][color= #ff0000;]73C0[/color], ArtNem_Waterfall
    plreq [color= #ff0000;]$[/color][color= #ff0000;]76C0[/color], ArtNem_EHZ_Bridge
    plreq [color= #ff0000;]$[/color][color= #ff0000;]77C0[/color], ArtNem_Buzzer_Fireball
    plreq [color= #ff0000;]$[/color][color= #ff0000;]7A40[/color], ArtNem_Buzzer
    plreq [color= #ff0000;]$[/color][color= #ff0000;]7DC0[/color], ArtNem_Coconuts
    plreq [color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]8280[/color][/color], ArtNem_Masher
    plreq [color= #ff0000;]$[/color][color= #ff0000;]7A80[/color], Nem_Motobug
    PlrList_Ehz1_End</pre><!--gc2--><!--UGxyTGlzdF9FaHoxOiBwbHJsaXN0aGVhZGVyCglwbHJlcSAmIzAzNjs3M0MwLCBBcnROZW1fV2F0ZXJm
    YWxsCglwbHJlcSAmIzAzNjs3NkMwLCBBcnROZW1fRUhaX0JyaWRnZQoJcGxyZXEgJiMwMzY7NzdDMCwgQ
    XJ0TmVtX0J1enplcl9GaXJlYmFsbAoJcGxyZXEgJiMwMzY7N0E0MCwgQXJ0TmVtX0J1enplcgoJcGxyZX
    EgJiMwMzY7N0RDMCwgQXJ0TmVtX0NvY29udXRzCglwbHJlcSAmIzAzNjs4MjgwLCBBcnROZW1fTWFzaGV
    yCglwbHJlcSAmIzAzNjs3QTgwLCBOZW1fTW90b2J1ZwpQbHJMaXN0X0VoejFfRW5kIA==--><!--egc2--><!--g2--></div><!--eg2-->

    I am guessing "$7A80" is incorrect, but I really have no clue.
     
  13. Basically, the value you put into $2(a0) has to be equal to the VRAM address of the art divided by twenty. In your case, since you're loading the art at $7A80, you should change

    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm">[color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]4F0[/color],[color= #ff0000;]2[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span></pre><!--gc2--><!--bW92ZS53CSMmIzAzNjs0RjAsMihhMCk=--><!--egc2--><!--g2--></div><!--eg2-->

    to

    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm">[color= #00bfff;]move[/color].[color= #00bfff;]w[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]3D4[/color],[color= #ff0000;]2[/color]<span style="">(</span><span style="font-weight:bold;">a0</span><span style="">)</span></pre><!--gc2--><!--bW92ZS53CSMmIzAzNjszRDQsMihhMCk=--><!--egc2--><!--g2--></div><!--eg2-->
     
  14. Rika Chou

    Rika Chou

    Tech Member
    5,272
    164
    43
  15. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    Thanks, Now I understand how that works. But the object still ends up like a bunch of springs...

    Isn't present in my code.


    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm"> [color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]40[/color][/color],[color= #ff0000;]0[/color]<span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span></pre><!--gc2--><!--CQltb3ZlLmIJIyYjMDM2OzQwLDAoYTEp--><!--egc2--><!--g2--></div><!--eg2-->

    That was.

    Well, even with that changed to $4C (the motobug object number), I still get springs.
     
  16. What Rika means is that:

    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm">[color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;][color= #ff0000;]40[/color][/color],[color= #ff0000;]0[/color]<span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span></pre><!--gc2--><!--bW92ZS5iCSMmIzAzNjs0MCwwKGExKQ==--><!--egc2--><!--g2--></div><!--eg2-->

    needs to be changed to

    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm">[color= #00bfff;]move[/color].[color= #00bfff;]b[/color] [color= #ff0000;]#[/color][color= #ff0000;]$[/color][color= #ff0000;]4C[/color],[color= #ff0000;]0[/color]<span style="">(</span><span style="font-weight:bold;">a1</span><span style="">)</span></pre><!--gc2--><!--bW92ZS5iCSMmIzAzNjs0QywwKGExKQ==--><!--egc2--><!--g2--></div><!--eg2-->

    The current line is loading up a pressure spring instead of a smoke trail.
     
  17. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    I fixed my last post. I did just that, and it still loaded springs.
     
  18. Wait, are the mappings and the animations in actual ASM files? If they are, you're supposed to INCLUDE them not BINCLUDE them.
     
  19. Hitaxas

    Hitaxas

    Retro 80's themed Twitch streamer ( on hiatus) Member
    How can I include them in the 2007 disassembly? Whenever I tried something like that, I'd get an error.



    Mappings are BIN, Animations are ASM.
     
  20. Well, if the mappings are in binary form, BINCLUDING them should be fine. Includes use pretty much the same syntax as BINCLUDES - an example from the 2007 disasm:

    <!--g1--><div class='geshitop'>Syntax Highlighted Code: ASM</div><div class='codemain'><!--eg1--><pre class="asm"> [color= #00CC66;]include[/color] [color= #CC33CC;]"s2.macrosetup.asm"[/color]</pre><!--gc2--><!--CWluY2x1ZGUgJnF1b3Q7czIubWFjcm9zZXR1cC5hc20mcXVvdDs=--><!--egc2--><!--g2--></div><!--eg2-->

    If that doesn't work for whatever reason, you can try actually copy-pasting the animation script into the disassembly.
     
Thread Status:
Not open for further replies.