don't click here

Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. Shoemanbundy

    Shoemanbundy

    Researcher
    1,094
    30
    28
    Chicago, Illinois
    selling shoes
    So the first of possibly many questions to come...

    I want to edit separate animations for Sonic to allow more frames. My walking sprite for example has at least 12 frames while the default one is 6. How can I add more frames for one animation?
     
  2. Clownacy

    Clownacy

    Tech Member
    1,060
    607
    93
    The obvious solution would be to edit Sonic animation script, _anim/Sonic.asm in the Git disasm. But, the walking/running animations have a hardcoded length, because of some code in Sonic_Animate. It handles making Sonic rotate as he goes through a loop or up/down a slope. It gets Sonic's angle, and turns it into 0, 2, 4, or 6. When Sonic's running, this is multiplied by 2, then added to Sonic's current frame, meaning, if the angle was 2, it would become 4, the length of Sonic's running animation in sprites, and then be added to the mapping_frame, skipping over the regular running sprites, and instead using the slightly rotated ones. When Sonic's walking, the angle of 2 instead becomes 6, again, to match the length of Sonic's walking animation.
     
  3. Shoemanbundy

    Shoemanbundy

    Researcher
    1,094
    30
    28
    Chicago, Illinois
    selling shoes
    OK, possibly beyond me since I'm just starting out. Though I think I get the logic for the math to decide which animations to switch to. I'll come back to that since I'm more now wanting to focus on engine modification for my new character.

    How would I modify Sonic's speed? I am trying to get him to have one constant speed just like in most platformers, so I'm trying to figure out how to modify it so his initial start speed is a constant value and no acceleration occurs. I've been looking in Sonic Move.asm thinking this is where I should work, and have seen lines referencing inertia that I edited through trial and error to end up getting him to go at a snail's pace, but not figuring out what specifically to modify. I know this also needs to be modified for both ground and air.
     
  4. DjHeXy

    DjHeXy

    Member
    Hello :)

    Just looking for some advice on 2 things concerning the boss stages of sonic 2:

    I want to change the way eggman is animated, so that he is always laughing, apart from when he gets hit or destroyed (my boys love it when he laughs!) - whats the best way to go about this? Edit the dissasembly in some way, or edit his sprites (ie, replace his non-laughing sprites with copies of his laughing ones)? Any pointers on this would be fantastic :)

    I'd also like to spawn some badniks during the boss battles every few seconds to spice things up a bit, especially in the EHZ boss. Can this be done?

    I've been using the Xenowhirl asm.

    Thank you for any help you can provide!
     
  5. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,201
    431
    63
    Japan
    The simplest way I can think of, is to edit the animation script to the boss:

    Code (Text):
    1. off_2FAC8:
    2.     dc.w byte_2FAD2-off_2FAC8
    3.     dc.w byte_2FAD5-off_2FAC8; 1
    4.     dc.w byte_2FAD9-off_2FAC8; 2
    5.     dc.w byte_2FAE2-off_2FAC8; 3
    6.     dc.w byte_2FAEB-off_2FAC8; 4
    7.     even
    The above is EHZ's boss, each "dc.w" pointer will point to a specific animation, pointer 1 for example is his "idle" animation, pointer 2 is his "hurt" animation, pointer 3 is his "laughing" animation, etc. The most logical thing to do, is to copy the "laughing" pointer, and pasting it place of the "idle" pointer, like so:

    Code (Text):
    1. off_2FAC8:
    2.     dc.w byte_2FAD2-off_2FAC8
    3.     dc.w byte_2FAE2-off_2FAC8; 3   ; < Now it points to animation 3: "laughing"
    4.     dc.w byte_2FAD9-off_2FAC8; 2
    5.     dc.w byte_2FAE2-off_2FAC8; 3
    6.     dc.w byte_2FAEB-off_2FAC8; 4
    7.     even
    The next thing required, is to change the "laughing" animation script itself in one specific way:

    Code (Text):
    1. byte_2FAE2: dc.b   7,  3,  4,  3,  4,  3,  4,$FD,  1
    • The first "7" represents the speed of the animation, the lower it is, the faster the animation will run.
    • The numbers "3, 4, 3, 4, 3, 4" are the laughing frames to show in that order.
    • The "FD" followed by a "1" is a flag specifically designed to change the animation ID after the animation is finished.
    This animation will display the laughing frames 3, then 4, then 3, then 4, then 3, and finally 4, at the speed of 7. And then will change the animation ID to 1 (changing it back to "idle" animation), it couldn't be simpler.

    The problem here, is that since we've changed the pointer, the "laughing" animation now technically counts as animation ID 1, the animation routine determines an animation reset by the animation ID being changed, but since the "laughing" animation is animation ID 1, and it's changing the animation to ID 1 when its finished. As far as the animation routine is concerned, the animation hasn't changed, therefore, no reset is required. This will prevent the laughing animation from... well animating.

    The solution to this, is to change that "FD" to an "FF", the "FF" signifies the animation should loop endlessly:

    Code (Text):
    1. byte_2FAE2: dc.b   7,  3,  4,  3,  4,  3,  4,$FF,  1
    --------------------------------------------------------

    The above is only for EHZ's boss, since each boss is quite unique in Sonic 2 artistically, it stands to reason it'll have different mappings, and different animation. So you will need to change the animations for each boss individually in a similar manner to the above EHZ. I am of course, not entirely familiar with Sonic 2 myself, nor do I have much time, but if you wish to find the animations, one way would be to search for "Obj_Index:", and go along the list of object pointers, next to each pointer is a description of what that object is. You will find instances of the bosses, for example:

    Code (Text):
    1. ...
    2.     dc.l Obj50  ; Aquis (seahorse badnik) from OOZ
    3.     dc.l Obj51  ; CNZ boss
    4.     dc.l Obj52  ; HTZ boss
    5.     dc.l Obj53  ; Shield orbs that surround MTZ boss
    6.     dc.l Obj54  ; MTZ boss
    7.     dc.l Obj55  ; OOZ boss
    8.     dc.l Obj56  ; EHZ boss
    9.     dc.l Obj57  ; MCZ boss
    10.     dc.l Obj58  ; Boss explosion
    11.     dc.l Obj59  ; Emerald from Special Stage
    12. ...
    Find those routines, and search for a routine call named "AnimateSprite", for example, we'll search for MCZ's boss Obj57, this leads us to:

    Code (Text):
    1. ; ===========================================================================
    2. ; ----------------------------------------------------------------------------
    3. ; Object 57 - MCZ boss
    4. ; ----------------------------------------------------------------------------
    5. ; Sprite_30FA4:
    6. Obj57:
    7.     moveq   #0,d0
    8.     move.b  objoff_A(a0),d0
    9.     move.w  off_30FB2(pc,d0.w),d1
    10. ...
    Searching for "AnimateSprite" below that point will lead us to:

    Code (Text):
    1. ...
    2.     lea (off_3209C).l,a1
    3.     bsr.w   JmpTo20_AnimateSprite
    4. ...
    Searching for "off_3209C" leads us to:

    Code (Text):
    1. off_3209C:
    2.     dc.w byte_320B0-off_3209C
    3.     dc.w byte_320B3-off_3209C; 1
    4.     dc.w byte_320B9-off_3209C; 2
    5.     dc.w byte_320BF-off_3209C; 3
    6.     dc.w byte_320C3-off_3209C; 4
    7.     dc.w byte_320C8-off_3209C; 5
    8.     dc.w byte_320D3-off_3209C; 6
    9.     dc.w byte_320DD-off_3209C; 7
    10.     dc.w byte_320E1-off_3209C; 8
    11.     dc.w byte_320E4-off_3209C; 9
    12. byte_320B0: dc.b  $F,  1,$FF
    13. byte_320B3: dc.b  $F,  4,$FF,  5,$FC,  2
    14. byte_320B9: dc.b  $F,  2,$FF,  3,$FC,  2
    15. byte_320BF: dc.b   7,  6,  7,$FF
    16. byte_320C3: dc.b   1, $C, $D, $E,$FF
    17. byte_320C8: dc.b   7,  8,  9,  8,  9,  8,  9,  8,  9,$FD,  3
    18. byte_320D3: dc.b   7, $A, $A, $A, $A, $A, $A, $A,$FD,  3
    19. byte_320DD: dc.b   3,$13,$14,$FF
    20. byte_320E1: dc.b   1,  0,$FF
    21. byte_320E4: dc.b   1, $F,$10,$11,$FF,  0
    It should look somewhat familiar:

    Code (Text):
    1. byte_320C8: dc.b   7,  8,  9,  8,  9,  8,  9,  8,  9,$FD,  3
    Different frames, but the same animation, 7 speed, 2 frames displayed four times, ending in an FD followed by the idle animation ID. Change the FD to an FF, and since you know that the "laughing" animation ID is 5 and the "idle" animation ID is 3, you can now swap the "idle" animation pointer with the "laughing" animation pointer:

    Code (Text):
    1. off_3209C:
    2.     dc.w byte_320B0-off_3209C
    3.     dc.w byte_320B3-off_3209C; 1
    4.     dc.w byte_320B9-off_3209C; 2
    5.     dc.w byte_320C8-off_3209C; 5    ; < Now it points to animation 5: "laughing"
    6.     dc.w byte_320C3-off_3209C; 4
    7.     dc.w byte_320C8-off_3209C; 5
    8.     dc.w byte_320D3-off_3209C; 6
    9.     dc.w byte_320DD-off_3209C; 7
    10.     dc.w byte_320E1-off_3209C; 8
    11.     dc.w byte_320E4-off_3209C; 9
    12. byte_320B0: dc.b  $F,  1,$FF
    13. byte_320B3: dc.b  $F,  4,$FF,  5,$FC,  2
    14. byte_320B9: dc.b  $F,  2,$FF,  3,$FC,  2
    15. byte_320BF: dc.b   7,  6,  7,$FF
    16. byte_320C3: dc.b   1, $C, $D, $E,$FF
    17. byte_320C8: dc.b   7,  8,  9,  8,  9,  8,  9,  8,  9,$FF,  3    ; < Changed to FF...
    18. byte_320D3: dc.b   7, $A, $A, $A, $A, $A, $A, $A,$FD,  3
    19. byte_320DD: dc.b   3,$13,$14,$FF
    20. byte_320E1: dc.b   1,  0,$FF
    21. byte_320E4: dc.b   1, $F,$10,$11,$FF,  0
    Some of the bosses might have a different structure of animation, depending on how unique the boss is, but by searching through with this method, you'll at least be able to locate 90% of the intended animations, and can experiment from there.

    --------------------------------------

    As for loading badniks into the boss area at random intervals, while it is possible, one thing to keep in mind is that their art may not be loaded into VRAM (when the boss loaded, there is a possibility that the boss may have written its art over the badnik's art in VRAM, due to a lack of available VRAM space). While the badniks can load and run, they will not display the right art. This is hypothetical however, as I have not checked out VRAM to confirm it gets overwritten, so take it as a precaution as nothing more.

    To load an object (be it an enemy, or some other item), you perform the following as an example:

    Code (Text):
    1.         jsr SingleObjLoad       ; find a free object slot
    2.         bne.s   CannotLoadObject    ; if there is no more space in RAM, branch (cannot load the object)
    3.         move.b  #$26,(a1)       ; set to load a "monitor"
    4.         move.b  #$04,subtype(a1)    ; set mintor to "10 rings"
    5.         move.w  #$0100,x_pos(a1)    ; set X coordinates to 100 pixels from the left
    6.         move.w  #$0200,y_pos(a1)    ; set Y coordinates to 200 pixels from the top
    7.  
    8. CannotLoadObject:
    Keep in mind, that most objects are designed to delete themselves if they are off screen by too far a distance. So you must ensure that the X and Y coordinates are set relative to the screen's position, I.e. there's no good loading an object near the beginning of the level, if you're at the boss that's at the end of the level.
     
  6. DjHeXy

    DjHeXy

    Member
    Thanks a million MarkeyJester :-D Can't wait to get stuck into this after work :)
     
  7. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    Just out of curiosity, since it will loop endlessly anyway, can't the script be simplified to just 3, 4?
    Code (Text):
    1. byte_2FAE2: dc.b   7,  3,  4, $FF, 1
     
  8. DjHeXy

    DjHeXy

    Member
    Hello Nineko, you were correct, it could (and was) shortened :)

    Thanks again, its great seeing it in action :D
     
  9. rata

    rata

    Member
    690
    73
    28
    Argentina
    Trying to be useful somehow.
    You can do this in Sonic_Move by changing theese lines:


    Code (Text):
    1.         move.w  (v_sonspeedmax).w,d6
    2.         move.w  (v_sonspeedacc).w,d5
    3.         move.w  (v_sonspeeddec).w,d4
    So it moves max speed to d5 and d4 instead of acceleration and deceleration. Do the same in Sonic_JumpDirection. Although this doesn't apply for changing direction when you jump after Sonic was rolling, I still need to figure this out.

    + - First time I can do something helpful, as small as it is!!! I'm happy anyway!!!  
     
  10. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,201
    431
    63
    Japan
    Yes. Though I left that out to prevent further confusion as the process can be considered confusing to a newcomer.
     
  11. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    I'm not sure if this counts more as a general question, but, what are the preferred running diagnostics for SADX (preferably with Mod Loader's best settings)? I played the game on both a Windows XP PC and a Windows 8 Toshiba Satellite, and the latter has a much rougher framerate and load time than the former. Does it need a certain compatibility mode or software to run smoothly (the disc wouldn't install Direct X 9, though I think my laptop already has some version)?
     
  12. SF94

    SF94

    Tech Member
    There isn't really a good way to go about that. Although I remember back on XP, I had to run Windows Media Player in the background to get it to run at 60FPS. Weird, I know, but it worked consistently. Sort of a long shot, but you could try that :specialed:. It could just be that your GPU doesn't do well with D3D8, or that the combination of D3D8 and drivers don't agree... the list just goes on and on.

    In fact, trouble shooting anything in SADX is pretty much impossible. Any crash not caused by the mod loader code directly will make the game just exit without warning. It's great. :colbert:

    Edit: On second thought, the fact that the load times are worse could also be due to a number of things. You could be using too much memory and your system is paging to disk, or maybe you have some aggressive antivirus software that scans all disk activity slowing things down.
     
  13. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Am I meant to use the DirectX End User Runtime program for anything?

    I've also tried to work SADXLVL but can't figure out how to get it to run. I can't find a file for it to respond and load the level files (it doesn't recognise my sonic.exe file so I take it that's not it). I'm probably gonna look like an idiot, but how do you set it up?
     
  14. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,742
    338
    63
    SonLVL
    SADXLVL is no longer supported. The recommended method is to use SA Tools: copy the contents of the SADXPC folder in SA Tools into your SADX folder, run splitall.bat, then run SADXLVL2 and open the sadxlvl.ini file in it.
     
  15. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Okay, I've tried that, and the command prompt from split all.bat states it's failed for nearly every object it creates. I take it this means it's fucked up the files because when I try to load a level in SADXLVL2 it fails.
     
  16. Steelrush

    Steelrush

    Every good deed has its reward. Member
    19
    0
    1
    A humid place
    Blaze the Cat in Sonic 2
    I'm currently having issues regarding the latest version of the Sonic 2 Clone Driver v2; recently I attempted to install it onto my copy of the GitHub, and while the ROM did compile, no sound of any kind plays other than the "sega" intro sound. I followed each step in the installation guide, and couldn't pinpoint the root of the problem.

    Has anyone else had this problem, and managed to solve it?
     
  17. I've been wanting to create a character mod of a (non sonic) OC for Sonic Generations PC, and I've been doing as much digging around as possible. So from what I've seen, it looks like you need several programs, among them the 2011 version of 3ds max, which I don't have, as well as having a character model to copy over Sonic's which I also don't have. Is it going to be possible for me to make this myself, or am I going to have to find a different way?

    Also, can this be done with any program other than 3ds max, or is it proprietary to it?
     
  18. Crimson

    Crimson

    Member
    10
    0
    0
    Sonic Generations 3ds Project
    Ok, so I've recently started trying to port stages into Sonic Generations. The level itself works fine, but when I try to quit the stage, (either by selecting "quit stage" or just by pressing 'next' at the results screen,) the game crashes. I've tried several different imports, but they all do the same thing. What am I doing wrong?
     
  19. Steelrush

    Steelrush

    Every good deed has its reward. Member
    19
    0
    1
    A humid place
    Blaze the Cat in Sonic 2
    I managed to solve the issue involving the sound driver, though there is still something I would like help with.

    I'm currently trying to port the Hydrocity miniboss from Sonic 3 to Sonic 2, and I was wondering what needs to be changed right here.

    ---------------------------------------------------------------------------

    Obj_HCZMiniboss:
    lea word_69ED2(pc),a1
    jsr (Check_CameraInRange).l
    move.l #loc_69EDA,(a0)
    move.b #1,(Boss_flag).w
    st ($FFFFEEE8).w
    moveq #$5B,d0
    jsr (Load_PLC).l
    move.w #$300,(Camera_min_Y_pos).w
    lea ChildObjDat_6AD6E(pc),a2
    jmp (CreateChild1_Normal).l
    ; ---------------------------------------------------------------------------
    word_69ED2: dc.w $300, $400, $3500, $3700
    ; ---------------------------------------------------------------------------

    loc_69EDA:
    btst #0,$38(a0)
    bne.s loc_69EFE
    move.w #$638,d0
    cmp.w (Camera_Y_pos).w,d0
    bhi.s loc_69EFE
    bset #0,$38(a0)
    move.w d0,(Camera_min_Y_pos).w
    move.w d0,(Camera_max_Y_pos).w
    move.w d0,(Camera_target_max_Y_pos).w

    loc_69EFE:

    btst #1,$38(a0)
    move.w #$3680,d0
    move.w (Camera_X_pos).w,d1
    move.w d1,(Camera_min_X_pos).w
    cmp.w d1,d0
    bhi.s loc_69F22
    bset #1,$38(a0)
    move.w d0,(Camera_min_X_pos).w
    move.w d0,(Camera_max_X_pos).w

    loc_69F22:
    cmpi.b #3,$38(a0)
    beq.s loc_69F2C
    rts
    ; ---------------------------------------------------------------------------

    loc_69F2C:
    move.w (Camera_max_X_pos).w,($FFFFFA92).w
    move.w $14(a0),$44(a0)
    move.l #Obj_Wait,(a0)
    move.w #$78,$2E(a0)
    move.l #loc_69F64,$34(a0)
    moveq #-$1F,d0
    jsr (Play_Sound).l
    bset #3,$38(a0)
    lea Pal_HCZMiniboss(pc),a1
    jmp (PalLoad_Line1).l
    ; ---------------------------------------------------------------------------

    loc_69F64:
    move.l #Obj_HCZ_MinibossLoop,(a0)
    moveq #$2E,d0
    jsr (Play_Sound).l
    move.b #$2E,($FFFFFF91).w

    locret_69F78:

    rts
    ; ---------------------------------------------------------------------------

    Obj_HCZ_MinibossLoop:
    moveq #0,d0
    move.b 5(a0),d0
    move.w off_69F92(pc,d0.w),d1
    jsr off_69F92(pc,d1.w)
    bsr.w sub_6AC48
    jmp (Draw_And_Touch_Sprite).l
    ; ---------------------------------------------------------------------------
    off_69F92: dc.w loc_69FAA-off_69F92

    dc.w loc_69FE4-off_69F92
    dc.w loc_6A00A-off_69F92
    dc.w loc_69FE4-off_69F92
    dc.w loc_6A00A-off_69F92
    dc.w loc_6A076-off_69F92
    dc.w loc_6A0C2-off_69F92
    dc.w loc_6A0F8-off_69F92
    dc.w loc_6A110-off_69F92
    dc.w loc_6A15A-off_69F92
    dc.w loc_6A00A-off_69F92
    dc.w loc_6A216-off_69F92
    ; ---------------------------------------------------------------------------

    loc_69FAA:
    lea ObjDat3_6ACF0(pc),a1
    jsr (SetUp_ObjAttributes).l
    move.b #6,$29(a0)
    move.b #$28,$1E(a0)
    bset #3,$38(a0)
    move.w #$100,$1A(a0)
    move.w #$DF,$2E(a0)
    move.l #loc_69FF0,$34(a0)
    lea Child1_HCZMiniboss_RocketsEngine(pc),a2
    jmp (CreateChild1_Normal).l
    ; ---------------------------------------------------------------------------

    loc_69FE4:
    jsr (MoveSprite2).l
    jmp (Obj_Wait).l
    ; ---------------------------------------------------------------------------

    loc_69FF0:
    move.b #4,5(a0)
    clr.w $1A(a0)
    move.w #$3B,$2E(a0)
    move.l #loc_6A010,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A00A:
    jmp (Obj_Wait).l
    ; ---------------------------------------------------------------------------

    loc_6A010:
    move.b #6,5(a0)
    move.w #-$400,$1A(a0)
    move.w #$37,$2E(a0)
    move.l #loc_6A02C,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A02C:
    move.b #8,5(a0)
    move.w #$3B,$2E(a0)
    move.l #loc_6A042,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A042:

    bsr.w sub_6AAD2

    loc_6A046:
    move.b #$A,5(a0)
    moveq #$3C,d0
    jsr (Play_Sound_2).l
    bset #6,$38(a0)
    bclr #7,$38(a0)
    move.w #$400,$1A(a0)
    move.w #$47,$2E(a0)
    move.l #loc_6A098,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A076:
    btst #7,$38(a0)
    bne.s loc_6A08C
    move.w $14(a0),d0
    cmp.w (Water_level).w,d0
    bcs.s loc_6A08C
    bsr.w sub_6AAB6

    loc_6A08C:

    jsr (MoveSprite2).l
    jmp (ObjHitFloor_DoRoutine).l
    ; ---------------------------------------------------------------------------

    loc_6A098:
    move.b #$C,5(a0)
    move.w $40(a0),$18(a0)
    neg.w $40(a0)
    clr.w $1A(a0)
    move.w #$2F,$2E(a0)
    move.l #loc_6A0D8,$34(a0)
    bclr #7,$38(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A0C2:
    jsr (MoveSprite2).l
    jsr (ObjHitFloor).l
    add.w d1,$14(a0)
    jmp (Obj_Wait).l
    ; ---------------------------------------------------------------------------

    loc_6A0D8:
    move.w #-$400,$1A(a0)
    clr.w $18(a0)
    subq.b #1,$39(a0)
    bmi.s loc_6A0F0
    move.b #$E,5(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A0F0:
    move.b #$10,5(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A0F8:
    bsr.w sub_6AAA0
    jsr (MoveSprite2).l
    move.w $14(a0),d0
    cmp.w $44(a0),d0
    bls.w loc_6A046
    rts
    ; ---------------------------------------------------------------------------

    loc_6A110:
    bsr.w sub_6AAA0
    jsr (MoveSprite2).l
    move.w $44(a0),d0
    addi.w #$108,d0
    cmp.w $14(a0),d0
    bcc.s loc_6A12A
    rts
    ; ---------------------------------------------------------------------------

    loc_6A12A:
    move.b #$12,5(a0)
    bclr #7,$38(a0)
    move.w d0,$14(a0)
    move.w #$180,d0
    tst.w $40(a0)
    bpl.s loc_6A146
    neg.w d0

    loc_6A146:
    move.w d0,$18(a0)
    move.w #$3F,$2E(a0)
    move.l #loc_6A16C,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A15A:
    addi.w #$20,$1A(a0)
    jsr (MoveSprite2).l
    jmp (Obj_Wait).l
    ; ---------------------------------------------------------------------------

    loc_6A16C:
    move.b #$14,5(a0)
    moveq #-$6F,d0
    jsr (Play_Sound_2).l
    bclr #3,$38(a0)
    move.w #$9F,$2E(a0)
    move.l #loc_6A194,$34(a0)
    clr.w $18(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A194:
    bset #2,$38(a0)
    move.w #$17F,$2E(a0)
    move.l #loc_6A1AA,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A1AA:
    bclr #2,$38(a0)
    move.w #$7F,$2E(a0)
    move.l #loc_6A1C0,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A1C0:

    bset #3,$38(a0)
    move.w #$3F,$2E(a0)
    move.l #loc_6A1C0,$34(a0)
    move.l #loc_6A1DE,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A1DE:
    move.b #2,5(a0)
    move.w #-$20,$1A(a0)
    move.w #$7F,$2E(a0)
    move.l #loc_6A1FA,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A1FA:
    move.b #$16,5(a0)
    bclr #6,$38(a0)
    move.w #-$400,$1A(a0)
    moveq #$70,d0
    jsr (Play_Sound_2).l
    rts
    ; ---------------------------------------------------------------------------

    loc_6A216:
    jsr (MoveSprite2).l
    move.w $14(a0),d0
    cmp.w $44(a0),d0
    bls.w loc_6A042
    rts
    ; ---------------------------------------------------------------------------

    loc_6A22A:
    st ($FFFFFAA2).w
    jsr (Obj_EndSignControl).l
    jsr (Create_New_Sprite).l
    bne.s loc_6A242
    move.l #loc_6A24C,(a1)

    loc_6A242:
    lea ChildObjDat_6ADAA(pc),a2
    jmp (CreateChild1_Normal).l
    ; ---------------------------------------------------------------------------

    loc_6A24C:
    tst.b ($FFFFFAA8).w
    bne.w locret_69F78
    move.l #loc_6A270,(a0)
    clr.w (Ctrl_1_logical).w
    clr.w (Ctrl_2_logical).w
    st (Ctrl_1_locked).w
    st (Ctrl_2_locked).w
    move.b #-$80,($FFFFB02E).w

    loc_6A270:
    tst.b ($FFFFFAAA).w
    beq.w locret_69F78
    move.l #loc_6A2A0,(a0)
    lea ChildObjDat_6ADA4(pc),a2
    tst.b ($FFFFFF09).w
    beq.s loc_6A28C
    lea ChildObjDat_6AD9E(pc),a2

    loc_6A28C:
    jsr (CreateChild6_Simple).l
    move.w #$2F,$2E(a0)
    move.l #Go_Delete_Sprite,$34(a0)

    loc_6A2A0:
    btst #0,$38(a0)
    beq.w locret_69F78
    lea ChildObjDat_6AD98(pc),a2
    jsr (CreateChild6_Simple).l
    jmp (Obj_Wait).l
    ; ---------------------------------------------------------------------------

    Obj_HCZMiniboss_Rockets:

    moveq #0,d0
    move.b 5(a0),d0
    move.w off_6A2D0(pc,d0.w),d1
    jsr off_6A2D0(pc,d1.w)
    moveq #$20,d0
    jmp (Child_DrawTouch_Sprite_FlickerMove).l
    ; ---------------------------------------------------------------------------
    off_6A2D0: dc.w loc_6A2DE-off_6A2D0

    dc.w loc_6A2F8-off_6A2D0
    dc.w loc_6A34C-off_6A2D0
    dc.w loc_6A36C-off_6A2D0
    dc.w loc_6A37A-off_6A2D0
    dc.w loc_6A404-off_6A2D0
    dc.w loc_6A41E-off_6A2D0
    ; ---------------------------------------------------------------------------

    loc_6A2DE:
    lea ObjDat3_6ACFC(pc),a1
    jsr (SetUp_ObjAttributes).l
    bset #6,$38(a0)
    lea ChildObjDat_6AD76(pc),a2
    jmp (CreateChild1_Normal).l
    ; ---------------------------------------------------------------------------

    loc_6A2F8:
    clr.b $28(a0)
    movea.w $46(a0),a1
    btst #3,$38(a1)
    beq.w locret_69F78
    move.b #4,5(a0)
    move.b #1,$40(a0)
    move.w #$3F,$2E(a0)
    move.l #loc_6A356,$34(a0)
    moveq #0,d0
    move.b $2C(a0),d0
    move.w word_6A344(pc,d0.w),$3C(a0)
    cmpi.b #4,d0
    bcs.s locret_6A342
    bset #0,4(a0)
    move.b #6,5(a0)

    locret_6A342:
    rts
    ; ---------------------------------------------------------------------------
    word_6A344: dc.w 0
    dc.w $8080
    dc.w $8000
    dc.w $80
    ; ---------------------------------------------------------------------------

    loc_6A34C:
    bsr.w sub_6AB1A
    jmp (Obj_Wait).l
    ; ---------------------------------------------------------------------------

    loc_6A356:
    move.b #8,5(a0)
    move.w #$3F,$2E(a0)
    move.l #loc_6A384,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A36C:
    jmp (Obj_Wait).l
    ; ---------------------------------------------------------------------------

    loc_6A372:
    move.b #2,5(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A37A:
    bsr.w sub_6AB1A
    jmp (Obj_Wait).l
    ; ---------------------------------------------------------------------------

    loc_6A384:
    move.b #2,$40(a0)
    move.b #-$75,$28(a0)
    move.w #$1F,$2E(a0)
    move.l #loc_6A3A0,$34(a0)
    rts
    ;
    ---------------------------------------------------------------------------

    loc_6A3A0:
    move.b #$A,5(a0)
    move.b #4,$40(a0)
    move.l #loc_6A416,$34(a0)
    bclr #6,$38(a0)
    moveq #$67,d0
    jsr (Play_Sound_2).l
    rts
    ; ---------------------------------------------------------------------------

    loc_6A3C4:
    move.b #2,$40(a0)
    move.w #$1F,$2E(a0)
    move.l #loc_6A3DA,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A3DA:
    move.b #6,5(a0)
    cmpi.b #4,$2C(a0)
    bcs.s loc_6A3EE
    move.b #4,5(a0)

    loc_6A3EE:
    move.b #1,$40(a0)
    move.w #$3F,$2E(a0)
    move.l #loc_6A372,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A404:
    bsr.w sub_6AB1A
    movea.w $46(a0),a1
    btst #3,$38(a1)
    bne.w locret_69F78

    loc_6A416:
    move.b #$C,5(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A41E:
    bsr.w sub_6AB1A
    moveq #0,d0
    move.b $2C(a0),d0
    lsr.b #1,d0
    move.b loc_6A45C(pc,d0.w),d1
    cmp.b $3C(a0),d1
    beq.s loc_6A436
    rts
    ; ---------------------------------------------------------------------------

    loc_6A436:
    move.b #8,5(a0)
    clr.b $28(a0)
    move.b #2,$40(a0)
    move.w #$1F,$2E(a0)
    move.l #loc_6A3C4,$34(a0)
    bset #6,$38(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A45C:
    or.b d0,d0
    and.w d0,d0

    loc_6A460:
    lea word_6AD08(pc),a1
    jsr (SetUp_ObjAttributes2).l
    move.l #loc_6A478,(a0)
    bset #4,$2B(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A478:
    bsr.w sub_6ABA8

    loc_6A47C:
    movea.w $46(a0),a1
    btst #7,$2A(a1)
    bne.s loc_6A4A2
    btst #6,$38(a1)
    bne.w locret_69F78
    btst #0,(V_int_run_count+3).w
    bne.w locret_69F78
    jmp (Draw_And_Touch_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6A4A2:
    jmp (Go_Delete_Sprite).l
    ; ---------------------------------------------------------------------------

    Obj_HCZMiniboss_Engine:
    lea word_6AD10(pc),a1
    jsr (SetUp_ObjAttributes2).l
    move.l #loc_6A4C0,(a0)
    bset #4,$2B(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A4C0:
    jsr (Refresh_ChildPosition).l
    bra.s loc_6A47C
    ; ---------------------------------------------------------------------------

    loc_6A4C8:

    lea ObjDat4_6AD30(pc),a1
    jsr (SetUp_ObjAttributesSlotted).l
    move.w (Water_level).w,$14(a0)
    move.l #Obj_Wait,(a0)
    tst.b $2C(a0)
    beq.s loc_6A4EA
    move.w #7,$2E(a0)

    loc_6A4EA:
    move.l #loc_6A4F4,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A4F4:
    move.l #loc_6A504,(a0)
    move.l #Go_Delete_SpriteSlotted3,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A504:
    lea byte_6AE3B(pc),a1
    jsr (Animate_RawNoSST).l
    lea DPLCPtr_6ADE4(pc),a2
    jsr (Perform_DPLC).l
    jmp (Draw_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6A51E:
    moveq #0,d0
    move.b 5(a0),d0
    move.w off_6A536(pc,d0.w),d1
    jsr off_6A536(pc,d1.w)
    bsr.w sub_6A960
    jmp (Draw_And_Touch_Sprite).l
    ; ---------------------------------------------------------------------------
    off_6A536: dc.w loc_6A542-off_6A536

    dc.w loc_6A55C-off_6A536
    dc.w loc_6A57C-off_6A536
    dc.w loc_6A5B2-off_6A536
    dc.w loc_6A5D8-off_6A536
    dc.w loc_6A618-off_6A536
    ; ---------------------------------------------------------------------------

    loc_6A542:
    lea ObjDat3_6AD18(pc),a1
    jsr (SetUp_ObjAttributes).l
    addi.w #$148,$14(a0)
    clr.w $42(a0)
    clr.w $44(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A55C:
    tst.b 4(a0)
    bpl.w locret_69F78
    move.b #4,5(a0)
    lea Pal_HCZMinibossWater(pc),a1
    lea (Water_palette_line_2).w,a2
    moveq #7,d0

    loc_6A574:
    move.l (a1)+,(a2)+
    dbf d0,loc_6A574
    rts
    ; ---------------------------------------------------------------------------

    loc_6A57C:
    movea.w $46(a0),a1
    btst #2,$38(a1)
    beq.w locret_69F78
    move.b #6,5(a0)
    move.l #byte_6ADEC,$30(a0)
    move.l #loc_6A5BC,$34(a0)
    moveq #-$40,d0
    jsr (Play_Sound_2).l
    lea ChildObjDat_6AD92(pc),a2
    jmp (CreateChild6_Simple).l
    ; ---------------------------------------------------------------------------

    loc_6A5B2:
    lea byte_6ADEC(pc),a1
    jmp (Animate_RawNoSSTMultiDelay).l
    ; ---------------------------------------------------------------------------

    loc_6A5BC:
    move.b #8,5(a0)
    move.l #byte_6ADEC,$30(a0)
    move.l #loc_6A622,$34(a0)
    clr.b $29(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A5D8:
    bsr.w sub_6A9B8
    movea.w $46(a0),a1
    btst #2,$38(a1)
    beq.s loc_6A5FA
    moveq #-$41,d0
    jsr (sub_85E52).l
    lea byte_6AE11(pc),a1
    jmp (Animate_RawNoSST).l
    ; ---------------------------------------------------------------------------

    loc_6A5FA:
    move.b #$A,5(a0)
    bset #3,$38(a0)
    move.l #loc_6A622,$34(a0)
    bsr.w loc_6A986
    jmp (Animate_RawMultiDelay).l
    ; ---------------------------------------------------------------------------

    loc_6A618:
    lea byte_6AE16(pc),a1
    jmp (Animate_RawNoSSTMultiDelay).l
    ; ---------------------------------------------------------------------------

    loc_6A622:

    move.b #4,5(a0)
    move.b #$16,$22(a0)
    bclr #3,$38(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A636:
    movea.w $46(a0),a1
    btst #4,$38(a1)
    beq.s loc_6A656
    lea ChildObjDat_6ADC4(pc),a2
    jsr (CreateChild1_Normal).l
    bsr.w loc_6A986
    jsr (Go_Delete_Sprite_2).l

    loc_6A656:
    jmp (Draw_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6A65C:
    lea ObjDat3_6AD24(pc),a1
    jsr (SetUp_ObjAttributes).l
    move.l #loc_6A6B8,(a0)
    jsr (Random_Number).l
    andi.w #$FF,d0
    ext.w d0
    add.w d0,$10(a0)
    swap d0
    andi.w #$3F,d0
    subq.w #8,d0
    add.w d0,$14(a0)
    andi.w #3,d0
    move.b d0,$22(a0)
    lsl.w #2,d0
    move.l off_6A6A8(pc,d0.w),$30(a0)
    move.w #$1F,$2E(a0)
    move.l #loc_6A6D2,$34(a0)
    rts
    ; ---------------------------------------------------------------------------
    off_6A6A8: dc.l word_6AE46
    dc.l word_6AE4A
    dc.l word_6AE4E
    dc.l word_6AE52
    ; ---------------------------------------------------------------------------

    loc_6A6B8:

    movea.w $46(a0),a3
    bsr.w sub_6A9AA
    jsr (Animate_Raw).l
    jsr (Obj_Wait).l
    jmp (Child_Draw_Sprite2).l
    ; ---------------------------------------------------------------------------

    loc_6A6D2:
    move.l #loc_6A6E4,(a0)
    movea.l $30(a0),a1
    move.b 1(a1),$22(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A6E4:
    movea.w $46(a0),a3
    btst #3,$38(a3)
    bne.s loc_6A6FA
    bsr.w sub_6A9AA
    jmp (Child_Draw_Sprite2).l
    ; ---------------------------------------------------------------------------

    loc_6A6FA:
    move.l #loc_6A6B8,(a0)
    move.w #$1F,$2E(a0)
    move.l #Go_Delete_Sprite,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A710:
    lea ObjDat3_6AD24(pc),a1
    jsr (SetUp_ObjAttributes).l
    move.l #loc_6A79C,(a0)
    move.w (Camera_X_pos).w,d0
    addi.w #$A0,d0
    move.w d0,$10(a0)
    move.w d0,$3A(a0)
    move.w (Water_level).w,d0
    addq.w #8,d0
    move.w d0,$14(a0)
    jsr (Random_Number).l
    andi.w #$FF,d0
    move.w d0,d1
    ext.w d0
    bpl.s loc_6A74E
    st $3C(a0)

    loc_6A74E:
    add.w d0,$10(a0)
    bsr.w sub_6A940
    lsl.w #4,d0
    move.w d0,$18(a0)
    andi.b #1,d1
    move.b d1,$23(a0)
    swap d0
    andi.w #$1F,d0
    add.w d0,$14(a0)
    andi.w #3,d0
    move.b d0,$22(a0)
    lsl.w #2,d0
    lea off_6A6A8(pc),a1
    move.l (a1,d0.w),$30(a0)
    move.w #$200,$1A(a0)
    move.w #$BF,$2E(a0)
    move.l #Go_Delete_Sprite,$34(a0)
    jmp (Draw_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6A79C:
    tst.b 4(a0)
    bpl.s loc_6A7BE
    bsr.w sub_6A916
    jsr (MoveSprite2).l
    jsr (Animate_Raw).l
    jsr (Obj_Wait).l
    jmp (Draw_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6A7BE:
    jmp (Delete_Current_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6A7C4:

    lea (Player_1).w,a1
    btst #6,$2A(a1)
    beq.w locret_69F78
    move.l #loc_6A872,(a0)
    clr.b ($FFFFFAA2).w
    movea.w $46(a0),a1
    bset #0,$38(a1)
    move.b #4,4(a0)
    lea (Player_1).w,a1
    lea (Ctrl_1_locked).w,a2
    tst.b $2C(a0)
    beq.s loc_6A80C
    lea (Player_2).w,a1
    lea (Ctrl_2_locked).w,a2
    btst #6,$2A(a1)
    beq.w loc_6A86C

    loc_6A80C:
    clr.b (a2)
    tst.l (a1)
    beq.s loc_6A86C
    move.w a1,$44(a0)
    bclr #7,$A(a0)
    move.w $10(a1),d0
    move.w d0,$10(a0)
    move.w $14(a1),$14(a0)
    move.w (Camera_X_pos).w,d1
    addi.w #$A0,d1
    move.w d1,$3A(a0)
    sub.w d1,d0
    bpl.s loc_6A83E
    st $3C(a0)

    loc_6A83E:
    bsr.w sub_6A940
    move.w #$200,$1A(a0)
    bset #1,$2A(a1)
    move.b #1,$2E(a1)
    move.b #$F,$20(a1)
    clr.b $3D(a1)
    clr.w $18(a1)
    clr.w $1A(a1)
    clr.w $1C(a1)
    rts
    ; ---------------------------------------------------------------------------

    loc_6A86C:

    jmp (Delete_Current_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6A872:
    bsr.w sub_6A916
    jsr (MoveSprite2).l
    movea.w $44(a0),a1
    move.w $10(a0),$10(a1)
    move.w $14(a0),d0
    move.w d0,$14(a1)
    cmpi.w #$828,d0
    bcc.s loc_6A896
    rts
    ; ---------------------------------------------------------------------------

    loc_6A896:
    tst.b $2C(a0)
    beq.s loc_6A8AE
    lea (Player_2).w,a1
    tst.l (a1)
    beq.s loc_6A8C0
    jsr (Restore_PlayerControl2).l
    bra.w loc_6A8C0
    ; ---------------------------------------------------------------------------

    loc_6A8AE:
    jsr (Restore_PlayerControl).l
    move.w #0,($FFFFFA96).w
    jsr (Make_LevelSizeObj).l

    loc_6A8C0:

    jmp (Delete_Current_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6A8C6:

    lea byte_6AD42(pc),a1
    jsr (SetUp_ObjAttributes3).l
    move.l #Obj_FlickerMove,(a0)
    moveq #0,d0
    move.b $2C(a0),d0
    lsr.w #1,d0
    addi.b #$1B,d0
    move.b d0,$22(a0)
    moveq #$20,d0
    jmp (Set_IndexedVelocity).l
    ; ---------------------------------------------------------------------------

    loc_6A8EE:

    lea byte_6AD48(pc),a1
    jsr (SetUp_ObjAttributes3).l
    move.l #MoveChkDel,(a0)
    moveq #0,d0
    move.b $2C(a0),d0
    lsr.w #1,d0
    addi.b #$1F,d0
    move.b d0,$22(a0)
    moveq #$1C,d0
    jmp (Set_IndexedVelocity).l

    ; =============== S U B R O U T I N E =======================================


    sub_6A916:

    move.w $10(a0),d0
    move.w $18(a0),d1
    move.w #$100,d2
    cmp.w $3A(a0),d0
    scs d3
    bcs.s loc_6A92C
    neg.w d2

    loc_6A92C:
    add.w d2,d1
    cmp.b $3C(a0),d3
    beq.s loc_6A93A
    move.b d3,$3C(a0)
    add.w d2,d1

    loc_6A93A:
    move.w d1,$18(a0)
    rts
    ; End of function sub_6A916


    ; =============== S U B R O U T I N E =======================================


    sub_6A940:

    add.w d0,d0
    smi d2
    bpl.s loc_6A948
    neg.w d0

    loc_6A948:
    move.w #$100,d3
    sub.w d0,d3
    bpl.s loc_6A952
    moveq #0,d3

    loc_6A952:
    lsl.w #4,d3
    tst.b d2
    beq.s loc_6A95A
    neg.w d3

    loc_6A95A:
    move.w d3,$18(a0)
    rts
    ; End of function sub_6A940


    ; =============== S U B R O U T I N E =======================================


    sub_6A960:
    movea.w $46(a0),a1
    btst #7,$2A(a1)
    beq.w locret_69F78
    move.l #loc_6A636,(a0)
    clr.b $28(a0)
    bclr #3,$38(a0)
    beq.w locret_69F78
    bra.w *+4

    loc_6A986:

    move.w $42(a0),d0
    beq.s loc_6A990
    bsr.w sub_6A996

    loc_6A990:
    move.w $44(a0),d0
    beq.s locret_6A9A8
    ; End of function sub_6A960


    ; =============== S U B R O U T I N E =======================================


    sub_6A996:
    movea.w d0,a2
    bset #1,$2A(a2)
    clr.b $2E(a2)
    move.w #$100,8(a2)

    locret_6A9A8:
    rts
    ; End of function sub_6A996


    ; =============== S U B R O U T I N E =======================================


    sub_6A9AA:

    movea.l a0,a1
    movea.l a0,a2
    movea.l a3,a0
    bsr.w sub_6AA30
    movea.l a1,a0
    rts
    ; End of function sub_6A9AA


    ; =============== S U B R O U T I N E =======================================


    sub_6A9B8:
    clr.l $42(a0)
    move.w $14(a0),d0
    subi.w #$20,d0
    lea (Player_1).w,a2
    cmp.w $14(a2),d0
    bhi.s loc_6A9E0
    move.w a2,$42(a0)
    bsr.w sub_6AA30
    tst.b $2E(a2)
    bne.s loc_6A9E0
    bsr.w sub_6AA00

    loc_6A9E0:

    lea (Player_2).w,a2
    cmp.w $14(a2),d0
    bhi.s locret_6AA22
    cmpi.b #6,5(a2)
    bcc.s locret_6AA22
    move.w a2,$44(a0)
    bsr.w sub_6AA30
    tst.b $2E(a2)
    bne.s locret_6AA22
    ; End of function sub_6A9B8


    ; =============== S U B R O U T I N E =======================================


    sub_6AA00:
    bset #1,$2A(a2)
    move.b #1,$2E(a2)
    move.b #$F,$20(a2)
    clr.b $3D(a2)
    clr.w $18(a2)
    clr.w $1A(a2)
    clr.w $1C(a2)

    locret_6AA22:

    rts
    ; End of function sub_6AA00

    ; ---------------------------------------------------------------------------
    dc.w $B000
    dc.w 0
    dc.w $B04A
    dc.w 0
    dc.w $B04A
    dc.w $B04A

    ; =============== S U B R O U T I N E =======================================


    sub_6AA30:

    move.w $10(a2),d0
    move.w $18(a2),d1
    move.w #$40,d2
    sub.w $10(a0),d0
    scs d3
    bcc.s loc_6AA46
    neg.w d0

    loc_6AA46:
    cmpi.w #3,d0
    bhi.s loc_6AA54
    tst.w d1
    bpl.s loc_6AA62
    bra.w loc_6AA60
    ; ---------------------------------------------------------------------------

    loc_6AA54:
    cmpi.w #$70,d0
    bls.s loc_6AA5C
    moveq #0,d1

    loc_6AA5C:
    tst.b d3
    bne.s loc_6AA62

    loc_6AA60:
    neg.w d2

    loc_6AA62:

    add.w d2,d1
    move.w #$100,8(a2)
    move.w d1,$18(a2)
    bpl.s loc_6AA76
    move.w #$300,8(a2)

    loc_6AA76:
    ext.l d1
    lsl.l #8,d1
    add.l d1,$10(a2)
    move.l #$8000,d4
    move.w $14(a2),d5
    sub.w $14(a0),d5
    cmpi.w #-$10,d5
    blt.s loc_6AA9A
    cmpi.w #$10,d5
    ble.s locret_6AA9E
    neg.l d4

    loc_6AA9A:
    add.l d4,$14(a2)

    locret_6AA9E:
    rts
    ; End of function sub_6AA30


    ; =============== S U B R O U T I N E =======================================


    sub_6AAA0:

    btst #7,$38(a0)
    bne.w locret_69F78
    move.w $14(a0),d0
    cmp.w (Water_level).w,d0
    bcs.w locret_69F78
    ; End of function sub_6AAA0


    ; =============== S U B R O U T I N E =======================================


    sub_6AAB6:
    bset #7,$38(a0)
    moveq #$39,d0
    jsr (Play_Sound_2).l
    clr.w ($FFFFFA9A).w
    lea ChildObjDat_6AD7E(pc),a2
    jmp (CreateChild1_Normal).l
    ; End of function sub_6AAB6


    ; =============== S U B R O U T I N E =======================================


    sub_6AAD2:
    move.b $3A(a0),d0
    addq.b #2,$3A(a0)
    andi.w #$E,d0
    lea byte_6AB0A(pc,d0.w),a1
    move.b (a1)+,d0
    bne.s loc_6AAEA
    move.w #$100,d0

    loc_6AAEA:
    move.w #$400,d2
    cmpi.w #$A0,d0
    bcs.s loc_6AAF6
    neg.w d2

    loc_6AAF6:
    move.w d2,$40(a0)
    move.w (Camera_X_pos).w,d1
    add.w d0,d1
    move.w d1,$10(a0)
    move.b (a1)+,$39(a0)
    rts
    ; End of function sub_6AAD2

    ; ---------------------------------------------------------------------------
    byte_6AB0A: dc.b $40, 1
    dc.b 0, 1
    dc.b $40, 0
    dc.b $40, 1
    dc.b 0, 0
    dc.b 0, 1
    dc.b $40, 0
    dc.b 0, 0

    ; =============== S U B R O U T I N E =======================================


    sub_6AB1A:

    move.b $40(a0),d2
    add.b d2,$3C(a0)
    bsr.w sub_6AB60
    add.b d2,$3D(a0)
    bsr.w sub_6AB94
    moveq #0,d0
    move.b $3D(a0),d0
    lsr.w #4,d0
    move.b byte_6AB50(pc,d0.w),$22(a0)
    move.w #$200,8(a0)
    cmpi.b #8,d0
    bcs.s locret_6AB4E
    move.w #$280,8(a0)

    locret_6AB4E:
    rts
    ; End of function sub_6AB1A

    ; ---------------------------------------------------------------------------
    byte_6AB50: dc.b 1
    dc.b 2
    dc.b 3
    dc.b 4
    dc.b 5
    dc.b 6
    dc.b 7
    dc.b 8
    dc.b 9
    dc.b $A
    dc.b $B
    dc.b $1A
    dc.b $1A
    dc.b $1A
    dc.b $C
    dc.b $D

    ; =============== S U B R O U T I N E =======================================


    sub_6AB60:
    moveq #0,d0
    move.b $3C(a0),d0
    bsr.w sub_6AB76
    move.w $10(a2),d0
    add.w d1,d0
    move.w d0,$10(a0)
    rts
    ; End of function sub_6AB60


    ; =============== S U B R O U T I N E =======================================


    sub_6AB76:
    cmpi.b #-$80,d0
    bcs.s loc_6AB82
    moveq #-1,d1
    sub.b d0,d1
    move.b d1,d0

    loc_6AB82:
    lea (HCZMiniboss_RocketTwistLookup).l,a1
    move.b (a1,d0.w),d1
    ext.w d1
    movea.w $46(a0),a2
    rts
    ; End of function sub_6AB76


    ; =============== S U B R O U T I N E =======================================


    sub_6AB94:
    moveq #0,d0
    move.b $3D(a0),d0
    bsr.s sub_6AB76
    move.w $14(a2),d0
    add.w d1,d0
    move.w d0,$14(a0)
    rts
    ; End of function sub_6AB94


    ; =============== S U B R O U T I N E =======================================


    sub_6ABA8:
    movea.w $46(a0),a2
    moveq #0,d0
    move.b $3D(a2),d0
    lsr.w #3,d0
    andi.w #-2,d0
    move.w word_6ABF8(pc,d0.w),8(a0)
    lea byte_6AC18(pc,d0.w),a1
    move.b (a1)+,d1
    ext.w d1
    btst #0,4(a2)
    beq.s loc_6ABD6
    neg.w d1
    bset #0,4(a0)

    loc_6ABD6:
    move.b (a1)+,d2
    ext.w d2
    move.w $10(a2),d3
    add.w d1,d3
    move.w d3,$10(a0)
    move.w $14(a2),d3
    add.w d2,d3
    move.w d3,$14(a0)
    lsr.w #1,d0
    move.b byte_6AC38(pc,d0.w),$22(a0)
    rts
    ; End of function sub_6ABA8

    ; ---------------------------------------------------------------------------
    word_6ABF8: dc.w $280
    dc.w $200
    dc.w $200
    dc.w $200
    dc.w $200
    dc.w $180
    dc.w $180
    dc.w $180
    dc.w $180
    dc.w $180
    dc.w $180
    dc.w $280
    dc.w $280
    dc.w $280
    dc.w $280
    dc.w $280
    byte_6AC18: dc.b 3, 3
    dc.b 0, 0
    dc.b 6, 6
    dc.b $C, $C
    dc.b $12, $12
    dc.b $C, $C
    dc.b 8, 8
    dc.b 0, 0
    dc.b 3, 3
    dc.b 0, 0
    dc.b 0, 0
    dc.b 0, 0
    dc.b $FA, $FA
    dc.b $F6, $F6
    dc.b 0, 0
    dc.b 0, 0
    byte_6AC38: dc.b $E, $F
    dc.b $10, $11
    dc.b $12, $11
    dc.b $10, $F
    dc.b $E, $1A
    dc.b $1A, $1A
    dc.b $E, $E
    dc.b $1A, $1A

    ; =============== S U B R O U T I N E =======================================


    sub_6AC48:
    tst.b $28(a0)
    bne.s locret_6ACA4
    tst.b $29(a0)
    beq.s loc_6ACA6
    tst.b $20(a0)
    bne.s loc_6AC68
    move.b #$20,$20(a0)
    moveq #$6E,d0
    jsr (Play_Sound_2).l

    loc_6AC68:
    bset #6,$2A(a0)
    moveq #0,d0
    btst #0,$20(a0)
    bne.s loc_6AC7C
    addi.w #$E,d0

    loc_6AC7C:
    lea word_6ACC6(pc),a1
    lea word_6ACD4(pc,d0.w),a2
    jsr (CopyWordData_7).l
    subq.b #1,$20(a0)
    bne.s locret_6ACA4
    bclr #6,$2A(a0)
    cmpi.b #0,$22(a0)
    bne.s locret_6ACA4
    move.b $25(a0),$28(a0)

    locret_6ACA4:

    rts
    ; ---------------------------------------------------------------------------

    loc_6ACA6:
    move.l #Wait_FadeToLevelMusic,(a0)
    move.l #loc_6A22A,$34(a0)
    lea (Child6_CreateBossExplosion).l,a2
    jsr (CreateChild1_Normal).l
    jmp (BossDefeated_StopTimer).l
    ; End of function sub_6AC48

    ; ---------------------------------------------------------------------------
    word_6ACC6: dc.w $FC28
    dc.w $FC2E
    dc.w $FC32
    dc.w $FC34
    dc.w $FC36
    dc.w $FC3A
    dc.w $FC3C
    word_6ACD4: dc.w 4
    dc.w 0
    dc.w $C
    dc.w 8
    dc.w $20
    dc.w $826
    dc.w $624
    dc.w $AAA
    dc.w $AAA
    dc.w $888
    dc.w $AAA
    dc.w $EEE
    dc.w $888
    dc.w $AAA
    ObjDat3_6ACF0: dc.l Map_HCZMiniboss
    dc.w $A304
    dc.w $280
    dc.b $20
    dc.b $20
    dc.b 0
    dc.b $F
    ObjDat3_6ACFC: dc.l Map_HCZMiniboss
    dc.w $A304
    dc.w $200
    dc.b $10
    dc.b $10
    dc.b 1
    dc.b $8B
    word_6AD08: dc.w $8304
    dc.w $280
    dc.b $10
    dc.b $10
    dc.b $15
    dc.b 0
    word_6AD10: dc.w $8304
    dc.w $280
    dc.b $10
    dc.b $10
    dc.b $15
    dc.b $92
    ObjDat3_6AD18: dc.l Map_HCZMiniboss
    dc.w $A304
    dc.w $280
    dc.b $10
    dc.b $28
    dc.b $16
    dc.b 0
    ObjDat3_6AD24: dc.l Map_Bubbler

    dc.w $A45C
    dc.w $280
    dc.b $10
    dc.b $10
    dc.b 0
    dc.b 0
    ObjDat4_6AD30: dc.w 2
    dc.w $83FC
    dc.w $10
    dc.w 0
    dc.l Map_HCZMinibossSplash
    dc.w $80
    dc.b $10
    dc.b $10
    dc.b 0
    dc.b 0
    byte_6AD42: dc.b 2
    dc.b $80
    dc.b $C
    dc.b $C
    dc.b 0
    dc.b 0
    byte_6AD48: dc.b 2
    dc.b $80
    dc.b $14
    dc.b $24
    dc.b 0
    dc.b 0
    Child1_HCZMiniboss_RocketsEngine:dc.w 4
    dc.l Obj_HCZMiniboss_Rockets
    dc.w $1818
    dc.l Obj_HCZMiniboss_Rockets
    dc.w $E8E8
    dc.l Obj_HCZMiniboss_Rockets
    dc.w $E818
    dc.l Obj_HCZMiniboss_Rockets
    dc.w $18E8
    dc.l Obj_HCZMiniboss_Engine
    dc.w $24
    ChildObjDat_6AD6E:dc.w 0
    dc.l loc_6A51E
    dc.w 0
    ChildObjDat_6AD76:dc.w 0
    dc.l loc_6A460
    dc.w 0
    ChildObjDat_6AD7E:dc.w 2
    dc.l loc_6A4C8
    dc.w 0
    dc.l loc_6A4C8
    dc.w $F000
    dc.l loc_6A4C8
    dc.w $1000
    ChildObjDat_6AD92:dc.w $1D
    dc.l loc_6A65C
    ChildObjDat_6AD98:dc.w 0
    dc.l loc_6A710
    ChildObjDat_6AD9E:dc.w 0
    dc.l loc_6A7C4
    ChildObjDat_6ADA4:dc.w 1
    dc.l loc_6A7C4
    ChildObjDat_6ADAA:dc.w 3
    dc.l loc_6A8C6
    dc.w $F4F4
    dc.l loc_6A8C6
    dc.w $F40C
    dc.l loc_6A8C6
    dc.w $CF4
    dc.l loc_6A8C6
    dc.w $C0C
    ChildObjDat_6ADC4:dc.w 4
    dc.l loc_6A8EE
    dc.w $DC
    dc.l loc_6A8EE
    dc.w $F800
    dc.l loc_6A8EE
    dc.w $800
    dc.l loc_6A8EE
    dc.w $F430
    dc.l loc_6A8EE
    dc.w $C30
    DPLCPtr_6ADE4: dc.l ArtUnc_DashDust
    dc.l DPLC_HCZMinibossSplash
    byte_6ADEC: dc.b $16, 7

    dc.b $17, 7
    dc.b $18, 7
    dc.b $16, 6
    dc.b $17, 6
    dc.b $18, 6
    dc.b $16, 5
    dc.b $17, 5
    dc.b $18, 5
    dc.b $16, 4
    dc.b $17, 4
    dc.b $18, 4
    dc.b $16, 3
    dc.b $17, 3
    dc.b $18, 3
    dc.b $16, 2
    dc.b $17, 2
    dc.b $18, 2
    dc.b $F4
    byte_6AE11: dc.b 1
    dc.b $16
    dc.b $17
    dc.b $18
    dc.b $FC
    byte_6AE16: dc.b $16, 2
    dc.b $17, 2
    dc.b $18, 2
    dc.b $16, 3
    dc.b $17, 3
    dc.b $18, 3
    dc.b $16, 4
    dc.b $17, 4
    dc.b $18, 4
    dc.b $16, 5
    dc.b $17, 5
    dc.b $18, 5
    dc.b $16, 6
    dc.b $17, 6
    dc.b $18, 6
    dc.b $16, 7
    dc.b $17, 7
    dc.b $18, 7
    dc.b $F4
    byte_6AE3B: dc.b 3
    dc.b 0
    dc.b 1
    dc.b 2
    dc.b 3
    dc.b 4
    dc.b 5
    dc.b 6
    dc.b 7
    dc.b 8
    dc.b $F4
    word_6AE46: dc.w 0

    dc.w $16FC
    word_6AE4A: dc.w 1

    dc.w $16FC
    word_6AE4E: dc.w 2

    dc.w $16FC
    word_6AE52: dc.w 3

    dc.w $16FC
    Pal_HCZMiniboss: binclude "Levels/HCZ/Palettes/Miniboss.bin"
    even

    Pal_HCZMinibossWater: binclude "Levels/HCZ/Palettes/Miniboss Water.bin"
    even

    byte_6AE96: dc.b 4, $38
    dc.b 8, $38
    dc.b $3F, 0
    dc.b $41, 0
    dc.b 7, $38
    dc.b 7, $38
    dc.b $40, 0
    dc.b $40, $50
    word_6AEA6: dc.w 0
    dc.w $3B8
    dc.w $44E0
    dc.w $4640
    dc.w $2B8
    dc.w $2B8
    dc.w $4540
    dc.w $4590
    ; ---------------------------------------------------------------------------

    Obj_HCZEndBoss:
    lea byte_6AE96(pc),a1
    cmpi.b #2,($FFFFB038).w
    bne.s loc_6AEC6
    lea word_6AEA6(pc),a1

    loc_6AEC6:
    jsr (Check_CameraInRange).l
    move.b #$19,$26(a0)
    jsr (sub_85D6A).l
    move.l #loc_6AEFE,(a0)
    move.l #loc_6AF04,$34(a0)
    moveq #$6C,d0
    jsr (Load_PLC).l
    move.w #0,(Normal_palette+$1E).w
    lea Pal_HCZEndBoss(pc),a1
    jmp (PalLoad_Line1).l
    ; ---------------------------------------------------------------------------

    loc_6AEFE:
    jmp (loc_85CA4).l
    ; ---------------------------------------------------------------------------

    loc_6AF04:
    move.l #loc_6AF0C,(a0)

    locret_6AF0A:

    rts
    ; ---------------------------------------------------------------------------

    loc_6AF0C:
    moveq #0,d0
    move.b 5(a0),d0
    move.w off_6AF24(pc,d0.w),d1
    jsr off_6AF24(pc,d1.w)
    bsr.w sub_6BBC4
    jmp (Draw_And_Touch_Sprite).l
    ; ---------------------------------------------------------------------------
    off_6AF24: dc.w loc_6AF32-off_6AF24

    dc.w loc_6AF74-off_6AF24
    dc.w loc_6AFB6-off_6AF24
    dc.w loc_6AF74-off_6AF24
    dc.w loc_6AF74-off_6AF24
    dc.w loc_6AFB6-off_6AF24
    dc.w loc_6B064-off_6AF24
    ; ---------------------------------------------------------------------------

    loc_6AF32:
    lea ObjDat3_6BD20(pc),a1
    jsr (SetUp_ObjAttributes).l
    move.b #8,$29(a0)
    move.w #$80,$1A(a0)
    move.w #$EF,$2E(a0)
    move.l #loc_6AF80,$34(a0)
    lea (ChildObjDat_6BDEC).l,a2
    jsr (CreateChild1_Normal).l
    bne.s loc_6AF6A
    move.b #5,$2C(a1)

    loc_6AF6A:
    lea ChildObjDat_6BD8A(pc),a2
    jmp (CreateChild1_Normal).l
    ; ---------------------------------------------------------------------------

    loc_6AF74:
    jsr (MoveSprite2).l
    jmp (Obj_Wait).l
    ; ---------------------------------------------------------------------------

    loc_6AF80:
    move.b #4,5(a0)
    move.w $14(a0),$3A(a0)
    move.w #-$100,$44(a0)
    move.w #$9F,$30(a0)
    move.w #$3F,$2E(a0)
    move.l #loc_6AFC8,$34(a0)
    lea (PLC_83D6C).l,a1
    jsr (Load_PLC_Raw).l
    jmp Swing_Setup1(pc)
    ; ---------------------------------------------------------------------------

    loc_6AFB6:
    jsr (Swing_UpAndDown).l
    jsr (MoveSprite2).l
    jmp (Obj_Wait).l
    ; ---------------------------------------------------------------------------

    loc_6AFC8:

    bset #3,$38(a0)
    cmpi.b #2,($FFFFB038).w
    beq.s loc_6AFF2
    move.b #6,5(a0)
    move.w #$80,$1A(a0)
    move.w #$9F,$2E(a0)
    move.l #loc_6B008,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6AFF2:
    move.b #$A,5(a0)
    move.w #$1FF,$2E(a0)
    move.l #loc_6B03A,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B008:
    move.w #-$100,$1A(a0)
    move.w #$4F,$2E(a0)
    move.l #loc_6B01E,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B01E:
    move.b #$A,5(a0)
    move.w #$FF,$2E(a0)
    move.w $3A(a0),$14(a0)
    move.l #loc_6B03A,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B03A:

    move.b #$C,5(a0)
    bclr #3,$38(a0)
    move.w $44(a0),$18(a0)
    move.w #$BF,$2E(a0)
    move.l #loc_6B08E,$34(a0)
    move.b #8,$39(a0)
    jmp Swing_Setup1(pc)
    ; ---------------------------------------------------------------------------

    loc_6B064:
    jsr (Swing_UpAndDown).l
    jsr (MoveSprite2).l
    jsr (Obj_Wait).l
    subq.w #1,$30(a0)
    bpl.s locret_6B08C
    neg.w $18(a0)
    bchg #0,4(a0)
    move.w #$13F,$30(a0)

    locret_6B08C:
    rts
    ; ---------------------------------------------------------------------------

    loc_6B08E:
    move.w #$5F,$2E(a0)
    subq.b #1,$39(a0)
    bmi.s loc_6B0A2
    bset #1,$38(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B0A2:
    move.w $18(a0),$44(a0)
    clr.w $18(a0)
    bra.w loc_6AFC8
    ; ---------------------------------------------------------------------------

    loc_6B0B0:
    move.l #loc_6B0CC,(a0)
    bset #4,$38(a0)
    move.l #loc_6B0E8,$34(a0)
    moveq #$C,d0
    jmp (Set_IndexedVelocity).l
    ; ---------------------------------------------------------------------------

    loc_6B0CC:
    jsr (MoveSprite).l
    jsr (Obj_Wait).l
    btst #0,(V_int_run_count+3).w
    beq.w locret_6AF0A
    jmp (Draw_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6B0E8:
    move.l #loc_6B154,(a0)
    bclr #7,4(a0)
    st ($FFFFFAA8).w
    clr.b (Boss_flag).w
    move.w ($FFFFFAB4).w,d0
    addi.w #$180,d0
    move.w d0,($FFFFFA92).w
    lea (Child6_IncLevX).l,a2
    jsr (CreateChild6_Simple).l
    cmpi.b #2,($FFFFB038).w
    beq.s loc_6B138
    jsr (Create_New_Sprite).l
    bne.s locret_6B136
    move.l #Obj_81,(a1)
    move.w #$4250,$10(a1)
    move.w #$7E0,$14(a1)

    locret_6B136:
    rts
    ; ---------------------------------------------------------------------------

    loc_6B138:
    jsr (Create_New_Sprite).l
    bne.s locret_6B152
    move.l #Obj_81,(a1)
    move.w #$4760,$10(a1)
    move.w #$360,$14(a1)

    locret_6B152:
    rts
    ; ---------------------------------------------------------------------------

    loc_6B154:
    move.w (Camera_X_pos).w,(Camera_min_X_pos).w
    tst.b ($FFFFFAA8).w
    bne.w locret_6AF0A
    clr.w (Ctrl_1_logical).w
    clr.w (Ctrl_2_logical).w
    st (Ctrl_1_locked).w
    st (Ctrl_2_locked).w
    move.b #-$80,($FFFFB02E).w
    jsr (Restore_PlayerControl).l
    lea (Player_2).w,a1
    jsr (Restore_PlayerControl2).l
    jsr (Obj_PlayLevelMusic).l
    jsr (Create_New_Sprite).l
    bne.s loc_6B19C
    move.l #loc_6B7BC,(a1)

    loc_6B19C:
    move.w #0,(Camera_min_Y_pos).w
    jmp (Go_Delete_Sprite_2).l
    ; ---------------------------------------------------------------------------

    loc_6B1A8:
    moveq #0,d0
    move.b 5(a0),d0
    move.w off_6B1C4(pc,d0.w),d1
    jsr off_6B1C4(pc,d1.w)
    jsr (Refresh_ChildPosition).l
    moveq #0,d0
    jmp (Child_DrawTouch_Sprite2_FlickerMove).l
    ; ---------------------------------------------------------------------------
    off_6B1C4: dc.w loc_6B1CE-off_6B1C4

    dc.w loc_6B1D8-off_6B1C4
    dc.w loc_6B204-off_6B1C4
    dc.w loc_6B22A-off_6B1C4
    dc.w loc_6B25C-off_6B1C4
    ; ---------------------------------------------------------------------------

    loc_6B1CE:
    lea byte_6BD32(pc),a1
    jmp (SetUp_ObjAttributes3).l
    ; ---------------------------------------------------------------------------

    loc_6B1D8:
    movea.w $46(a0),a1
    btst #3,$38(a1)
    bne.s loc_6B1E6
    rts
    ; ---------------------------------------------------------------------------

    loc_6B1E6:
    move.b #4,5(a0)
    move.b #-$5A,$28(a0)
    move.l #byte_6BDF4,$30(a0)
    move.l #loc_6B212,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B204:
    moveq #-$40,d0
    jsr (sub_85E52).l
    jmp (Animate_RawGetFaster).l
    ; ---------------------------------------------------------------------------

    loc_6B212:
    move.b #6,5(a0)
    move.l #byte_6BDFB,$30(a0)
    lea ChildObjDat_6BDBA(pc),a2
    jmp (CreateChild1_Normal).l
    ; ---------------------------------------------------------------------------

    loc_6B22A:
    jsr (Animate_Raw).l
    movea.w $46(a0),a1
    btst #3,$38(a1)
    beq.s loc_6B244
    moveq #-$40,d0
    jmp (sub_85E52).l
    ; ---------------------------------------------------------------------------

    loc_6B244:
    move.b #8,5(a0)
    move.l #byte_6BE01,$30(a0)
    move.l #loc_6B262,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B25C:
    jmp (Animate_RawGetSlower).l
    ; ---------------------------------------------------------------------------

    loc_6B262:
    move.b #2,5(a0)
    clr.b $28(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B26E:
    move.w $10(a0),-(sp)
    moveq #0,d0
    move.b 5(a0),d0
    move.w off_6B29E(pc,d0.w),d1
    jsr off_6B29E(pc,d1.w)
    move.w #$1F,d1
    move.w #$C,d2
    move.w #$C,d3
    move.w (sp)+,d4
    jsr (SolidObjectTop).l
    bsr.w sub_6BC42
    jmp (Draw_Sprite).l
    ; ---------------------------------------------------------------------------
    off_6B29E: dc.w loc_6B2AA-off_6B29E

    dc.w loc_6B2F2-off_6B29E
    dc.w loc_6B31E-off_6B29E
    dc.w loc_6B336-off_6B29E
    dc.w loc_6B31E-off_6B29E
    dc.w loc_6B394-off_6B29E
    ; ---------------------------------------------------------------------------

    loc_6B2AA:
    lea word_6BD3E(pc),a1
    jsr (SetUp_ObjAttributes2).l
    move.w (Water_level).w,d0
    subq.w #8,d0
    move.w d0,$14(a0)
    move.w d0,$3A(a0)
    move.l #byte_6BE0C,$30(a0)
    move.l #loc_6B2F8,$34(a0)
    lea ChildObjDat_6BDCA(pc),a2
    jsr (CreateChild1_Normal).l
    lea ChildObjDat_6BDE6(pc),a2
    jsr (CreateChild6_Simple).l
    movea.w $46(a0),a1
    move.w $46(a1),$44(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B2F2:
    jmp (Animate_Raw).l
    ; ---------------------------------------------------------------------------

    loc_6B2F8:
    move.b #4,5(a0)
    move.l #byte_6BE15,$30(a0)
    move.w #-$100,$1A(a0)
    move.l #loc_6B32E,$34(a0)
    lea ChildObjDat_6BDC2(pc),a2
    jmp (CreateChild1_Normal).l
    ; ---------------------------------------------------------------------------

    loc_6B31E:
    jsr (MoveSprite2).l
    jsr (Animate_Raw).l
    bra.w sub_6BC8A
    ; ---------------------------------------------------------------------------

    loc_6B32E:
    move.b #6,5(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B336:
    jsr (Animate_Raw).l
    movea.w $44(a0),a1
    btst #3,$38(a1)
    beq.s loc_6B34A
    rts
    ; ---------------------------------------------------------------------------

    loc_6B34A:
    move.b #8,5(a0)
    bset #3,$38(a0)
    move.w #$80,$1A(a0)
    move.l #loc_6B37A,$34(a0)
    move.w #$80,$18(a0)
    tst.w $18(a1)
    bpl.s locret_6B374
    neg.w $18(a0)

    locret_6B374:
    rts
    ; ---------------------------------------------------------------------------
    bra.w sub_6BC8A
    ; ---------------------------------------------------------------------------

    loc_6B37A:
    move.l #loc_6B394,(a0)
    move.w #$F,$2E(a0)
    clr.w $18(a0)
    move.l #loc_6B3BC,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B394:

    move.w #$1F,d1
    move.w #$C,d2
    move.w #$C,d3
    move.w $10(a0),d4
    jsr (SolidObjectTop).l
    jsr (Animate_Raw).l
    jsr (Obj_Wait).l
    jmp (Draw_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6B3BC:
    jsr (Displace_PlayerOffObject).l
    jmp (Go_Delete_Sprite_2).l
    ; ---------------------------------------------------------------------------

    loc_6B3C8:
    jsr (MoveSprite2).l
    jsr (Animate_Raw).l
    bsr.w sub_6BC8A
    jmp (Draw_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6B3DE:
    moveq #0,d0
    move.b 5(a0),d0
    move.w off_6B3F6(pc,d0.w),d1
    jsr off_6B3F6(pc,d1.w)
    bsr.w sub_6BC70
    jmp (Child_Draw_Sprite2).l
    ; ---------------------------------------------------------------------------
    off_6B3F6: dc.w loc_6B3FC-off_6B3F6

    dc.w loc_6B410-off_6B3F6
    dc.w loc_6B440-off_6B3F6
    ; ---------------------------------------------------------------------------

    loc_6B3FC:
    lea byte_6BD46(pc),a1
    jsr (SetUp_ObjAttributes3).l
    move.l #byte_6BE19,$30(a0)
    rts
    ;
    ---------------------------------------------------------------------------

    loc_6B410:
    bsr.w sub_6B9E2
    bsr.w sub_6B9AC
    bsr.w sub_6B916
    jsr (Animate_Raw).l
    movea.w $46(a0),a1
    btst #3,$38(a1)
    bne.s loc_6B430
    rts
    ; ---------------------------------------------------------------------------

    loc_6B430:
    move.b #4,5(a0)
    move.w $18(a1),$18(a0)
    bra.w loc_6BB1E
    ; ---------------------------------------------------------------------------

    loc_6B440:
    bsr.w sub_6B916
    move.w $18(a1),$18(a0)
    jsr (MoveSprite2).l
    jmp (Animate_Raw).l
    ; ---------------------------------------------------------------------------

    loc_6B456:

    lea word_6BD4C(pc),a1
    jsr (SetUp_ObjAttributes3).l
    move.l #loc_6B47A,(a0)
    move.l #byte_6BE32,$30(a0)

    loc_6B46E:
    move.w (Water_level).w,d0
    subq.w #4,d0
    move.w d0,$14(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B47A:
    jsr (Animate_Raw).l
    moveq #0,d0
    move.b $2C(a0),d0
    move.w word_6B49E(pc,d0.w),d0
    movea.w $46(a0),a1
    move.w $10(a1),d1
    add.w d0,d1
    move.w d1,$10(a0)
    jmp (Child_Draw_Sprite2).l
    ; ---------------------------------------------------------------------------
    word_6B49E: dc.w $FFFC
    dc.w 4
    ; ---------------------------------------------------------------------------

    loc_6B4A2:
    lea word_6BD52(pc),a1
    jsr (SetUp_ObjAttributes2).l
    move.l #AnimateRaw_DrawTouch,(a0)
    move.l #byte_6BE36,$30(a0)
    move.l #Go_Delete_Sprite,$34(a0)
    bra.s loc_6B46E
    ; ---------------------------------------------------------------------------

    loc_6B4C4:
    lea ObjDat3_6BD5A(pc),a1
    jsr (SetUp_ObjAttributes).l
    move.l #Obj_Wait,(a0)
    move.l #loc_6B4F2,$34(a0)
    bsr.w sub_6B96C
    tst.b $2C(a0)
    bne.w locret_6AF0A
    lea ChildObjDat_6BDCA(pc),a2
    jmp (CreateChild1_Normal).l
    ; ---------------------------------------------------------------------------

    loc_6B4F2:
    move.l #loc_6B502,(a0)
    move.l #Go_Delete_Sprite_2,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B502:
    bsr.w sub_6BB40
    jmp (AnimateRaw_DrawTouch).l
    ; ---------------------------------------------------------------------------

    loc_6B50C:
    lea ObjDat3_6BD72(pc),a1
    jsr (SetUp_ObjAttributes).l
    move.l #loc_6B56C,(a0)
    jsr (Random_Number).l
    andi.w #$FF,d0
    ext.w d0
    add.w d0,$10(a0)
    swap d0
    move.w (Water_level).w,d1
    andi.w #$1F,d0
    add.w d0,d1
    move.w d1,$14(a0)
    andi.w #3,d0
    move.b d0,$22(a0)
    lsl.w #2,d0
    move.l off_6B55C(pc,d0.w),$30(a0)
    move.w #$1F,$2E(a0)
    move.l #loc_6B586,$34(a0)
    rts
    ; ---------------------------------------------------------------------------
    off_6B55C: dc.l word_6AE46
    dc.l word_6AE4A
    dc.l word_6AE4E
    dc.l word_6AE52
    ; ---------------------------------------------------------------------------

    loc_6B56C:

    movea.w $46(a0),a3
    bsr.w sub_6BB9A
    jsr (Animate_Raw).l
    jsr (Obj_Wait).l
    jmp (Child_Draw_Sprite2).l
    ; ---------------------------------------------------------------------------

    loc_6B586:
    move.l #loc_6B598,(a0)
    movea.l $30(a0),a1
    move.b 1(a1),$22(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B598:
    movea.w $46(a0),a3
    btst #3,$38(a3)
    bne.s loc_6B5AE
    bsr.w sub_6BB9A
    jmp (Child_Draw_Sprite2).l
    ; ---------------------------------------------------------------------------

    loc_6B5AE:
    move.l #loc_6B56C,(a0)
    move.w #$1F,$2E(a0)
    move.l #Go_Delete_Sprite,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B5C4:

    moveq #0,d0
    move.b 5(a0),d0
    move.w off_6B5D8(pc,d0.w),d1
    jsr off_6B5D8(pc,d1.w)
    jmp (Child_DrawTouch_Sprite).l
    ; ---------------------------------------------------------------------------
    off_6B5D8: dc.w loc_6B5E6-off_6B5D8

    dc.w loc_6B600-off_6B5D8
    dc.w loc_6B644-off_6B5D8
    dc.w loc_6B678-off_6B5D8
    dc.w loc_6B6E6-off_6B5D8
    dc.w loc_6B70E-off_6B5D8
    dc.w loc_6B734-off_6B5D8
    ; ---------------------------------------------------------------------------

    loc_6B5E6:
    lea byte_6BD38(pc),a1
    jsr (SetUp_ObjAttributes3).l
    move.b #8,$1E(a0)
    bsr.w sub_6B8F0
    jmp (Refresh_ChildPositionAdjusted).l
    ; ---------------------------------------------------------------------------

    loc_6B600:
    jsr (Refresh_ChildPositionAdjusted).l
    movea.w $46(a0),a1
    btst #1,$38(a1)
    bne.s loc_6B614
    rts
    ; ---------------------------------------------------------------------------

    loc_6B614:
    move.b #4,5(a0)
    tst.b $2C(a0)
    beq.s loc_6B622
    rts
    ; ---------------------------------------------------------------------------

    loc_6B622:
    move.b #6,5(a0)
    move.w #3,$2E(a0)
    move.l #loc_6B6BA,$34(a0)
    move.b #1,$40(a0)
    move.b #0,$41(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B644:
    jsr (Refresh_ChildPositionAdjusted).l
    movea.w $46(a0),a1
    btst #1,$38(a1)
    beq.s loc_6B658
    rts
    ; ---------------------------------------------------------------------------

    loc_6B658:
    move.b #6,5(a0)
    subq.b #2,$2C(a0)
    move.w #7,$2E(a0)
    move.l #loc_6B694,$34(a0)
    bsr.w sub_6B8F0
    bra.w loc_6B904
    ; ---------------------------------------------------------------------------

    loc_6B678:
    move.b $40(a0),d0
    add.b d0,$42(a0)
    move.b $41(a0),d0
    add.b d0,$43(a0)
    jsr (Refresh_ChildPositionAdjusted).l
    jmp (Obj_Wait).l
    ; ---------------------------------------------------------------------------

    loc_6B694:
    move.b #2,5(a0)
    tst.b $2C(a0)
    bne.s locret_6B6B8
    lea word_6BDAA(pc),a2
    jsr (CreateChild7_Normal2).l
    bne.s locret_6B6B8
    move.w $46(a0),$46(a1)
    move.b #4,$2C(a1)

    locret_6B6B8:

    rts
    ; ---------------------------------------------------------------------------

    loc_6B6BA:
    move.b #8,5(a0)
    move.l #loc_6B71C,$34(a0)
    move.w #$100,$18(a0)
    movea.w $46(a0),a1
    bclr #1,$38(a1)
    btst #0,4(a1)
    beq.s locret_6B6E4
    neg.w $18(a0)

    locret_6B6E4:
    rts
    ; ---------------------------------------------------------------------------

    loc_6B6E6:
    move.w $14(a0),d0
    cmp.w (Water_level).w,d0
    bcc.s loc_6B6FE
    jsr (MoveSprite_LightGravity).l
    jsr (ObjHitFloor_DoRoutine).l
    rts
    ; ---------------------------------------------------------------------------

    loc_6B6FE:
    move.b #$A,5(a0)
    lea ChildObjDat_6BDD8(pc),a2
    jmp (CreateChild1_Normal).l
    ; ---------------------------------------------------------------------------

    loc_6B70E:
    jsr (MoveSprite_LightGravity).l
    jsr (ObjHitFloor_DoRoutine).l
    rts
    ; ---------------------------------------------------------------------------

    loc_6B71C:
    move.b #$C,5(a0)
    move.l #byte_6BE07,$30(a0)
    move.l #loc_6B73A,$34(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B734:
    jmp (Animate_RawGetFaster).l
    ; ---------------------------------------------------------------------------

    loc_6B73A:
    lea ChildObjDat_6BDE0(pc),a2
    jsr (CreateChild6_Simple).l
    moveq #$4E,d0
    jsr (Play_Sound_2).l
    lea ChildObjDat_6BDB2(pc),a2
    jsr (CreateChild1_Normal).l
    jmp (Go_Delete_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6B75C:
    lea word_6BD2C(pc),a1
    jsr (SetUp_ObjAttributes3).l
    move.l #loc_6B76E,(a0)
    rts
    ; ---------------------------------------------------------------------------

    loc_6B76E:
    jsr (Refresh_ChildPositionAdjusted).l
    moveq #0,d0
    jmp (Child_Draw_Sprite2_FlickerMove).l
    ; ---------------------------------------------------------------------------

    loc_6B77C:
    lea ObjDat3_6BD66(pc),a1
    jsr (SetUp_ObjAttributes).l
    move.l #loc_6B7A2,(a0)
    move.l #byte_6BF02,$30(a0)
    move.l #Go_Delete_Sprite,$34(a0)
    jmp (Draw_And_Touch_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6B7A2:
    jsr (Animate_Raw).l
    cmpi.b #3,$22(a0)
    bcc.s loc_6B7B6
    jsr (Add_SpriteToCollisionResponseList).l

    loc_6B7B6:
    jmp (Draw_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6B7BC:
    lea (ArtKosM_HCZGeyserVert).l,a1
    move.w #$6D60,d2
    jsr (Queue_Kos_Module).l
    move.l #loc_6B7D2,(a0)

    loc_6B7D2:
    move.l #loc_6B7EC,(a0)
    move.w #$5F,$2E(a0)
    move.l #loc_6B804,$34(a0)
    st ($FFFFEECC).w
    rts
    ; ---------------------------------------------------------------------------

    loc_6B7EC:
    move.b (V_int_run_count+3).w,d0
    andi.b #7,d0
    bne.s loc_6B7FE
    moveq #$6F,d0
    jsr (Play_Sound_2).l

    loc_6B7FE:
    jmp (Obj_Wait).l
    ; ---------------------------------------------------------------------------

    loc_6B804:
    jsr (Create_New_Sprite).l
    bne.s loc_6B81C
    move.l #loc_6B824,(a1)
    st $2C(a1)
    move.w #4,$2E(a1)

    loc_6B81C:
    lea loc_6B832(pc),a1
    move.l a1,(a0)
    jmp (a1)
    ; ---------------------------------------------------------------------------

    loc_6B824:
    subq.w #1,$2E(a0)
    bpl.w locret_6AF0A
    move.l #loc_6B832,(a0)

    loc_6B832:

    lea ObjDat3_6BD7E(pc),a1
    jsr (SetUp_ObjAttributes).l
    move.l #loc_6B882,(a0)
    tst.b $2C(a0)
    bne.s loc_6B860
    st ($FFFFF650).w
    st ($FFFFEECC).w
    moveq #$57,d0
    jsr (Play_Sound_2).l
    lea (Player_1).w,a1
    bra.w loc_6B864
    ; ---------------------------------------------------------------------------

    loc_6B860:
    lea (Player_2).w,a1

    loc_6B864:
    move.w a1,$44(a0)
    move.w $10(a1),d0
    move.w d0,$10(a0)
    move.w (Camera_Y_pos).w,d1
    addi.w #$130,d1
    move.w d1,$14(a0)
    jmp (loc_6BCB2).l
    ; ---------------------------------------------------------------------------

    loc_6B882:
    movea.w $44(a0),a1
    move.w $14(a0),d0
    subq.w #6,d0
    move.w d0,$14(a0)
    subi.w #$60,d0
    cmp.w $14(a1),d0
    bcc.s loc_6B8B2
    move.b #-$7F,$2E(a1)
    move.b #$1A,$20(a1)
    move.l #loc_6B8C8,(a0)
    move.w #$5F,$2E(a0)

    loc_6B8B2:

    tst.b $2C(a0)
    bne.s loc_6B8C2
    move.l a0,-(sp)
    jsr (AnPal_HCZ1).l
    movea.l (sp)+,a0

    loc_6B8C2:

    jmp (Draw_Sprite).l
    ; ---------------------------------------------------------------------------

    loc_6B8C8:
    movea.w $44(a0),a1
    subq.w #6,$14(a0)
    subq.w #6,$14(a1)
    tst.b $2C(a0)
    bne.s loc_6B8C2
    subq.w #1,$2E(a0)
    bpl.s loc_6B8B2
    move.w #$200,d0
    jsr (StartNewLevel).l
    jmp (Delete_Current_Sprite).l

    ; =============== S U B R O U T I N E =======================================


    sub_6B8F0:

    moveq #0,d0
    move.b $2C(a0),d0
    move.w word_6B8FE(pc,d0.w),8(a0)
    rts
    ; End of function sub_6B8F0

    ; ---------------------------------------------------------------------------
    word_6B8FE: dc.w $280
    dc.w $200
    dc.w $180
    ; ---------------------------------------------------------------------------

    loc_6B904:
    moveq #0,d0
    move.b $2C(a0),d0
    move.w word_6B912(pc,d0.w),$40(a0)
    rts
    ; ---------------------------------------------------------------------------
    word_6B912: dc.w $101
    dc.w $100

    ; =============== S U B R O U T I N E =======================================


    sub_6B916:

    movea.w $46(a0),a1
    moveq #0,d0
    move.b $39(a1),d0
    cmp.b $39(a0),d0
    beq.s locret_6B946
    move.b d0,$39(a0)
    move.b byte_6B949(pc,d0.w),d1
    ext.w d1
    move.w (Water_level).w,d2
    add.w d1,d2
    move.w d2,$14(a0)
    lsl.w #2,d0
    move.l off_6B954(pc,d0.w),$30(a0)
    clr.b $24(a0)

    locret_6B946:
    rts
    ; End of function sub_6B916

    ; ---------------------------------------------------------------------------
    dc.b $F8 ; ΓΈ
    byte_6B949: dc.b $F8
    dc.b $F0
    dc.b $E8
    dc.b $E0
    dc.b $D8
    dc.b $D8
    dc.b 0
    dc.b 0
    dc.b 6
    dc.b $BE
    dc.b $19
    off_6B954: dc.l byte_6BE19
    dc.l byte_6BE1E
    dc.l byte_6BE23
    dc.l byte_6BE28
    dc.l byte_6BE2D
    dc.l byte_6BE2D

    ; =============== S U B R O U T I N E =======================================


    sub_6B96C:
    moveq #0,d0
    move.b $2C(a0),d0
    move.w d0,$2E(a0)
    move.w word_6B98E(pc,d0.w),d1
    move.w (Water_level).w,d2
    add.w d1,d2
    move.w d2,$14(a0)
    add.w d0,d0
    move.l off_6B998(pc,d0.w),$30(a0)
    rts
    ; End of function sub_6B96C

    ; ---------------------------------------------------------------------------
    word_6B98E: dc.w $FFF8
    dc.w $FFE8
    dc.w $FFD8
    dc.w $FFC8
    dc.w $FFB8
    off_6B998: dc.l byte_6BE3F
    dc.l byte_6BE76
    dc.l byte_6BEA5
    dc.l byte_6BECC
    dc.l byte_6BEEB

    ; =============== S U B R O U T I N E =======================================


    sub_6B9AC:
    move.w $10(a0),d0
    move.w (Water_level).w,d1
    addq.w #8,d1
    move.l #$20000,d2
    lea (Player_1).w,a1
    bsr.w sub_6B9C8
    lea (Player_2).w,a1
    ; End of function sub_6B9AC


    ; =============== S U B R O U T I N E =======================================


    sub_6B9C8:
    tst.b $2E(a1)
    bne.s locret_6B9E0
    cmp.w $14(a1),d1
    bcc.s locret_6B9E0
    cmp.w $10(a1),d0
    bcc.s loc_6B9DC
    neg.l d2

    loc_6B9DC:
    add.l d2,$10(a1)

    locret_6B9E0:
    rts
    ; End of function sub_6B9C8


    ; =============== S U B R O U T I N E =======================================


    sub_6B9E2:
    movea.w $46(a0),a1
    moveq #0,d0
    move.b $39(a1),d0
    lsl.w #2,d0
    lea word_6BAC2(pc),a1
    lea (a1,d0.w),a1
    moveq #$42,d4
    lea (Player_1).w,a2
    bsr.w sub_6BA06
    moveq #$43,d4
    lea (Player_2).w,a2
    ; End of function sub_6B9E2


    ; =============== S U B R O U T I N E =======================================


    sub_6BA06:
    movea.w $46(a0),a3
    btst #7,$2A(a3)
    bne.w sub_6BB02
    cmpi.b #6,5(a2)
    bcc.w loc_6BAB2
    tst.b $34(a2)
    bne.w loc_6BAB2
    tst.b $2E(a2)
    beq.s loc_6BA32
    tst.b (a0,d4.w)
    bne.s loc_6BA6C

    loc_6BA32:
    move.w $14(a0),d0
    move.w $14(a2),d2
    add.w (a1),d0
    cmp.w d0,d2
    bcs.w locret_6BB00
    add.w 2(a1),d0
    cmp.w d0,d2
    bcc.w locret_6BB00
    move.w $10(a0),d0
    move.w $10(a2),d2
    sub.w d2,d0
    addi.w #$10,d0
    cmpi.w #$20,d0
    bcc.w locret_6BB00
    tst.b $2E(a2)
    bne.s loc_6BA6C
    bsr.w sub_6BADA

    loc_6BA6C:

    move.w $14(a0),d0
    move.w $14(a2),d2
    add.w (a1)+,d0
    cmp.w d0,d2
    bcs.w sub_6BB02
    move.w $10(a2),d0
    move.w $18(a2),d1
    move.w #$80,d2
    sub.w $10(a0),d0
    cmpi.w #-$12,d0
    ble.s sub_6BB02
    cmpi.w #$12,d0
    bge.s sub_6BB02
    tst.w d0
    bmi.s loc_6BA9E
    neg.w d2

    loc_6BA9E:
    add.w d2,d1
    move.w d1,$18(a2)
    ext.l d1
    lsl.l #8,d1
    add.l d1,$10(a2)
    subq.w #2,$14(a2)
    rts
    ; ---------------------------------------------------------------------------

    loc_6BAB2:

    jsr (Displace_PlayerOffObject).l
    clr.b (a0,d4.w)
    clr.b $2E(a2)
    rts
    ; End of function sub_6BA06

    ; ---------------------------------------------------------------------------
    word_6BAC2: dc.w $FFE8, $48
    dc.w $FFE0, $58
    dc.w $FFD8, $68
    dc.w $FFD0, $78
    dc.w $FFC8, $88
    dc.w $FFB8, $88

    ; =============== S U B R O U T I N E =======================================


    sub_6BADA:
    st (a0,d4.w)
    bset #1,$2A(a2)
    move.b #1,$2E(a2)
    move.b #$18,$20(a2)
    clr.b $3D(a2)
    clr.w $18(a2)
    clr.w $1A(a2)
    clr.w $1C(a2)

    locret_6BB00:

    rts
    ; End of function sub_6BADA


    ; =============== S U B R O U T I N E =======================================


    sub_6BB02:

    clr.b (a0,d4.w)
    bset #1,$2A(a2)
    clr.b $2E(a2)
    move.b #2,$20(a2)
    move.w #-$200,$1A(a2)
    rts
    ; End of function sub_6BB02

    ;
    ---------------------------------------------------------------------------

    loc_6BB1E:
    tst.b $42(a0)
    beq.s loc_6BB2E
    clr.b $42(a0)
    lea (Player_1).w,a2
    bsr.s sub_6BB02

    loc_6BB2E:
    tst.b $43(a0)
    beq.s locret_6BB3E
    clr.b $43(a0)
    lea (Player_2).w,a2
    bsr.s sub_6BB02

    locret_6BB3E:
    rts

    ; =============== S U B R O U T I N E =======================================


    sub_6BB40:
    cmpi.b #$30,$23(a0)
    bcc.s locret_6BB90
    lea word_6BB92(pc),a1
    lea (Player_1).w,a2
    bsr.w sub_6BB5C
    lea word_6BB92(pc),a1
    lea (Player_2).w,a2
    ; End of function sub_6BB40


    ; =============== S U B R O U T I N E =======================================


    sub_6BB5C:
    tst.b $2E(a2)
    bne.s locret_6BB90
    move.w $10(a0),d0
    move.w $10(a2),d1
    add.w (a1)+,d0
    cmp.w d0,d1
    bcs.s locret_6BB90
    add.w (a1)+,d0
    cmp.w d0,d1
    bcc.s locret_6BB90
    move.w $14(a0),d0
    move.w $14(a2),d1
    add.w (a1)+,d0
    cmp.w d0,d1
    bcs.s locret_6BB90
    add.w (a1)+,d0
    cmp.w d0,d1
    bcc.s locret_6BB90
    move.w #-$800,$1A(a2)

    locret_6BB90:
    rts
    ; End of function sub_6BB5C

    ; ---------------------------------------------------------------------------
    word_6BB92: dc.w $FFF4, $18

    dc.w $FFC8, $40

    ; =============== S U B R O U T I N E =======================================


    sub_6BB9A:

    movea.w $46(a0),a1
    move.w $10(a0),d0
    move.w $18(a0),d1
    move.w #$80,d2
    sub.w $10(a1),d0
    tst.w d0
    bmi.s loc_6BBB4
    neg.w d2

    loc_6BBB4:
    add.w d2,d1
    move.w d1,$18(a0)
    ext.l d1
    lsl.l #8,d1
    add.l d1,$10(a0)
    rts
    ; End of function sub_6BB9A


    ; =============== S U B R O U T I N E =======================================


    sub_6BBC4:
    tst.l (a0)
    beq.s locret_6BC1A
    tst.b $28(a0)
    bne.s locret_6BC1A
    tst.b $29(a0)
    beq.s loc_6BC1C
    tst.b $20(a0)
    bne.s loc_6BBE8
    move.b #$20,$20(a0)
    moveq #$6E,d0
    jsr (Play_Sound_2).l

    loc_6BBE8:
    bset #6,$2A(a0)
    moveq #0,d0
    btst #0,$20(a0)
    bne.s loc_6BBFA
    addq.w #6,d0

    loc_6BBFA:
    lea word_6BC30(pc),a1
    lea word_6BC36(pc,d0.w),a2
    jsr (CopyWordData_3).l
    subq.b #1,$20(a0)
    bne.s locret_6BC1A
    bclr #6,$2A(a0)
    move.b $25(a0),$28(a0)

    locret_6BC1A:
    rts
    ; ---------------------------------------------------------------------------

    loc_6BC1C:
    move.l #Wait_FadeToLevelMusic,(a0)
    move.l #loc_6B0B0,$34(a0)
    jmp (BossDefeated_StopTimer).l
    ; End of function sub_6BBC4

    ; ---------------------------------------------------------------------------
    word_6BC30: dc.w $FC34
    dc.w $FC36
    dc.w $FC3C
    word_6BC36: dc.w 6, $20, $624, $EEE, $EEE, $EEE

    ; =============== S U B R O U T I N E =======================================


    sub_6BC42:
    movea.w $44(a0),a1
    btst #7,$2A(a1)
    beq.s locret_6BC6E
    bset #7,$2A(a0)
    move.l #loc_6B3C8,(a0)
    move.w #$100,$1A(a0)
    move.l #Go_Delete_Sprite_2,$34(a0)
    jsr (Displace_PlayerOffObject).l

    locret_6BC6E:
    rts
    ; End of function sub_6BC42


    ; =============== S U B R O U T I N E =======================================


    sub_6BC70:
    movea.w $46(a0),a1
    btst #7,$2A(a1)
    beq.s locret_6BC88
    bset #7,$2A(a0)
    move.b #4,5(a0)

    locret_6BC88:
    rts
    ; End of function sub_6BC70


    ; =============== S U B R O U T I N E =======================================


    sub_6BC8A:

    move.w $3A(a0),d0
    sub.w $14(a0),d0
    bcs.s loc_6BCAC
    andi.w #$F0,d0
    lsr.w #4,d0
    move.b d0,$39(a0)
    tst.w $1A(a0)
    bpl.s locret_6BCAA
    cmpi.b #5,d0
    bcc.s loc_6BCAC

    locret_6BCAA:
    rts
    ; ---------------------------------------------------------------------------

    loc_6BCAC:

    movea.l $34(a0),a2
    jmp (a2)
    ; End of function sub_6BC8A

    ; ---------------------------------------------------------------------------

    loc_6BCB2:
    lea (byte_303EA).l,a3
    move.w $10(a0),d2
    move.w $14(a0),d3
    subi.w #$80,d3
    moveq #7,d1

    loc_6BCC6:
    jsr (Create_New_Sprite3).l
    bne.s locret_6BD1E
    move.l #loc_3011A,(a1)
    move.l #Map_HCZWaterWallDebris,$C(a1)
    move.w #$43C3,$A(a1)
    move.b #-$7C,4(a1)
    move.b (a3)+,d0
    ext.w d0
    add.w d2,d0
    move.w d0,$10(a1)
    move.b (a3)+,d0
    ext.w d0
    add.w d3,d0
    move.w d0,$14(a1)
    move.w #$280,8(a1)
    move.b #$18,7(a1)
    move.b #$18,6(a1)
    move.w (a3)+,$18(a1)
    move.w (a3)+,$1A(a1)
    move.b d1,$22(a1)
    dbf d1,loc_6BCC6

    locret_6BD1E:
    rts
    ;

    In regards to the other steps that need to be taken, I know the perfect stage for this particular boss and how to place it. :v:
     
  20. lil-g-gamegenuis

    lil-g-gamegenuis

    GO! GO! GO! GO! GO! GO! Member
    27
    0
    1
    olathe, ks
    Practicing to make better SMPS
    I haven't tried porting over bosses yet but I would assume you only have to set the ram address to the correct ones in S2 and maybe change the name of the subroutines to match their S2 counterparts.
    PS: Remember to enclose asm code in asm tags and any other code as code tags.
    Code (ASM):
    1. dc.b "like this"