don't click here

Removing Seafood and Birds from Special Stages

Discussion in 'Engineering & Reverse Engineering' started by theocas, Jan 1, 2011.

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

    theocas

    Tech Member
    346
    0
    16
    (I'm not sure if this has been posted before on here, a quick search only gave me this guide to remove the bubbles and clouds.)

    So, I decided that the seafood and the stupid-ass birds in my special stage looked like ass. I wanted them gone. Hell, I wanted them to die in a ditch with Flash.

    With that much set out, about two hours and 5 cans of coke later, I finally got rid of them. It is actually pretty easy - you just have to modify the routine that loads the BG patterns. And stuff.

    You want the food gone from the special stages too? Then be my guest, and read the guide below.

    First of all, find the label SS_BGLoad in your code. If you haven't touched it yet, it should look something like this:
    Code (ASM):
    1.  
    2. SS_BGLoad:              ; XREF: SpecialStage
    3.         lea ($FF0000).l,a1
    4.         lea (Eni_SSBg1).l,a0 ; load mappings for the birds and fish
    5.         move.w  #$4051,d0
    6.         bsr.w   EniDec
    7.         move.l  #$50000001,d3
    8.         lea ($FF0080).l,a2
    9.         moveq   #6,d7
    10.  
    11. loc_48BE:
    12.         move.l  d3,d0
    13.         moveq   #3,d6
    14.         moveq   #0,d4
    15.         cmpi.w  #3,d7
    16.         bcc.s   loc_48CC
    17.         moveq   #1,d4
    18.  
    19. loc_48CC:
    20.         moveq   #7,d5
    21.  
    22. loc_48CE:
    23.         movea.l a2,a1
    24.         eori.b  #1,d4
    25.         bne.s   loc_48E2
    26.         cmpi.w  #6,d7
    27.         bne.s   loc_48F2
    28.         lea ($FF0000).l,a1
    29.  
    30. loc_48E2:
    31.         movem.l d0-d4,-(sp)
    32.         moveq   #7,d1
    33.         moveq   #7,d2
    34.         bsr.w   ShowVDPGraphics
    35.         movem.l (sp)+,d0-d4
    36.  
    37. loc_48F2:
    38.         addi.l  #$100000,d0
    39.         dbf d5,loc_48CE
    40.         addi.l  #$3800000,d0
    41.         eori.b  #1,d4
    42.         dbf d6,loc_48CC
    43.         addi.l  #$10000000,d3
    44.         bpl.s   loc_491C
    45.         swap    d3
    46.         addi.l  #$C000,d3
    47.         swap    d3
    48.  
    49. loc_491C:
    50.         adda.w  #$80,a2
    51.         dbf d7,loc_48BE
    52.         lea ($FF0000).l,a1
    53.         lea (Eni_SSBg2).l,a0 ; load mappings for the clouds
    54.         move.w  #$4000,d0
    55.         bsr.w   EniDec
    56.         lea ($FF0000).l,a1
    57.         move.l  #$40000003,d0
    58.         moveq   #$3F,d1
    59.         moveq   #$1F,d2
    60.         bsr.w   ShowVDPGraphics
    61.         lea ($FF0000).l,a1
    62.         move.l  #$50000003,d0
    63.         moveq   #$3F,d1
    64.         moveq   #$3F,d2
    65.         bsr.w   ShowVDPGraphics
    66.         rts
    67. ; End of function SS_BGLoad
    68.  
    Now, you can see that it is loading the mappings. Simply un-commenting that won't do the trick. Un-comment everything up until
    Code (ASM):
    1.  
    2. dbf d7, loc_48BE
    3.  
    Now you finally got rid of those hideous birds and fishes.

    If you need some more VRAM in the special stage, continue reading. If not, you can do something else.
    Open the file _inc/Pattern load cues.asm and find the label PLC_SpeStage You can see that right below the BGCloud entry, there's the entry for the fish and birds. As you can clearly see, they take up a whole lot of VRAM. Remove the entry for Nem_SSBgFish and update the PLC entry count. If you did this correctly, you should get this:

    Code (ASM):
    1.  
    2. PLC_SpeStage:   dc.w $F
    3.         dc.l Nem_SSBgCloud  ; bubble and cloud background
    4.         dc.w 0
    5.         dc.l Nem_SSWalls    ; walls
    6.         dc.w $2840
    7.         dc.l Nem_Bumper     ; bumper
    8.         dc.w $4760
    9.         dc.l Nem_SSGOAL     ; GOAL block
    10.         dc.w $4A20
    11.         dc.l Nem_SSUpDown   ; UP and DOWN blocks
    12.         dc.w $4C60
    13.         dc.l Nem_SSRBlock   ; R block
    14.         dc.w $5E00
    15.         dc.l Nem_SS1UpBlock ; 1UP block
    16.         dc.w $6E00
    17.         dc.l Nem_SSEmStars  ; emerald collection stars
    18.         dc.w $7E00
    19.         dc.l Nem_SSRedWhite ; red and white block
    20.         dc.w $8E00
    21.         dc.l Nem_SSGhost    ; ghost block
    22.         dc.w $9E00
    23.         dc.l Nem_SSWBlock   ; W block
    24.         dc.w $AE00
    25.         dc.l Nem_SSGlass    ; glass block
    26.         dc.w $BE00
    27.         dc.l Nem_SSEmerald  ; emeralds
    28.         dc.w $EE00
    29.         dc.l Nem_SSZone1    ; ZONE 1 block
    30.         dc.w $F2E0
    31.         dc.l Nem_SSZone2    ; ZONE 2 block
    32.         dc.w $F400
    33.         dc.l Nem_SSZone3    ; ZONE 3 block
    34.         dc.w $F520
    35.         dc.l Nem_SSZone4    ; ZONE 4 block
    36.         dc.w $F2E0
    37.         dc.l Nem_SSZone5    ; ZONE 5 block
    38.         dc.w $F400
    39.         dc.l Nem_SSZone6    ; ZONE 6 block
    40.         dc.w $F520
    41.  
    See, it wasn't that hard, was it? Got questions, feedback or something else? Please post them below.

    Also, I'd appreciate some credit if you add this to your hack, but it's not required.

    EDIT: I added a few pictures just to show a sort of before and after effect:

    BEFORE:
    [​IMG] [​IMG]

    AFTER:
    [​IMG] [​IMG]
     
  2. Mr Lange

    Mr Lange

    A wise guy eh. I know how to DEAL with wise guys. Member
    1,286
    11
    18
    The Land of Waldos
    Sonic Utopia, Sonic Overture
    Or, I can just turn off the bg layers in Gens.
    lol jk this is really cool. Good job.
     
  3. Rika Chou

    Rika Chou

    Tech Member
    5,276
    169
    43
    Why would anyone want those removed? They're one of the best things about that special stages..
     
  4. Shadow Fire

    Shadow Fire

    Ultimate victory! Member
    1,557
    0
    16
    The Land of Darkness
    Sonic: The Lost Land (Series), The GCN (site)
    Actually, I prefer the bubbles by themselves, though I would rather change the clouds. lol
     
  5. Selbi

    Selbi

    The Euphonic Mess Member
    1,497
    48
    28
    Northern Germany
    Sonic ERaZor
    I already removed them a looooong time ago and I like it this way much better.

    Anyway, good guide. =)
     
  6. Eduardo Knuckles

    Eduardo Knuckles

    Not a loved one, but the most hated person. Banned
    414
    10
    18
    Someplace somewhere
    Project S.A.M.G.
    That's quite interesting, because some people could do other kind of artwork on the background, so these fishes and birdies could be a bit unnecessary, though they are pretty cool and I like them.
     
  7. Shadow Hog

    Shadow Hog

    "I'm a superdog!" Member
    If you were removing them to use a new background entirely, that'd be one thing; to be frank, though, I don't see the appeal of just random clouds and/or bubbles, constantly alternating from one to another.

    I wonder if it's possible to use that BG in an actual stage, though, birds and all?
     
  8. Shadow Fire

    Shadow Fire

    Ultimate victory! Member
    1,557
    0
    16
    The Land of Darkness
    Sonic: The Lost Land (Series), The GCN (site)
    StephenUK did some awesome art for... I think it was Megamix? Anyway, he did art for a hack and the special stages had awesome backgrounds.

    So, I'd say it is possible.

    Misread the question, lol.
     
  9. nineko

    nineko

    I am the Holy Cat Tech Member
    6,314
    489
    63
    italy
    No, it's not possible. It uses both layers at the same time, and the entire special stage is drawn with sprites.
    Actual levels use one layer for the foreground and one layer for the background.
    So technically you could use either the birds OR the clouds as background in a regular level, but not both at the same time.
     
  10. pyrotix

    pyrotix

    Member
    118
    0
    0
    Brooklyn, NY
    Newmindspace
    lol "seafood"
     
  11. theocas

    theocas

    Tech Member
    346
    0
    16
    Why thank you. I was actually playing around with the BG layers in Gens one day and figured it out, and wanted to make that permanent.

    Some people might want a different sort of BG for their special stages, and those birds/fishes/foodstuffs could interfere with it ;)

    Yes, I think I might have seen your video a while ago, but I'm not exactly sure if anyone ever wrote a guide for this, and thank you.

    Can you come up with a better name? To be honest though, I was half asleep slaving over a keyboard and probably high on sugar too at the time of writing. =P

    Still pondering if I should continue making guides like this. We'll see what sorts of weird things I can come up with in the time being that I find worth sharing ;)
     
  12. Blue Emerald

    Blue Emerald

    Teleportation, yeah! Member
    1,923
    5
    18
    TBD
    It seems the mysterious recent deaths of birds and fish have gotten so extreme that it's even affected video games! :v:
     
  13. Yuzoboy

    Yuzoboy

    Member
    114
    0
    16
    UK
    Very odd bird deaths...
    Thanks for sharing, been a while since I've used ASM but the code could come in handy someday.
     
Thread Status:
Not open for further replies.