Should I get rid of the koopa tiles too? I have been replacing them after the girder tiles, where they used to be. Either way I can't check until friday, and that is only if I can get out of the house and go to the local library. I can't run the build program involving Sonic 2 at school anymore, which is a shame.
Yes, that came to me too. Back then I noticed that when encountering tiles on the low plane, the girder object would go right over them and that's a problem because I wanted to create the ol' blocking background wall AND have objects seen. I looked into removing it, found some interesting stuff but not exactly what I wanted. In the end I desided that I would only make the "inside" parts happen between whenever the girder doesn't show itself. (it is slow enough)
Small question, where does Sonic 2 store its 'table' to tell what level to use what palette/underwater palette? I thought it was the palette pointer I added my palette but Nothing: Code (Text): ;---------------------------------------------------------------------------- ; Palette pointers ; (PALETTE DESCRIPTOR ARRAY) ; This struct array defines the palette to use for each level. ;---------------------------------------------------------------------------- (Other palettes and things, removed for the sake of this post) PalPtr_EHZ_U: palptr Pal_EHZ_U, 0; Emerald Hill underwater pal It's probably the size that I have wrong, which is the '0', but I looked off ARZ's, and I don't really understand it <_<. So my question is is do I have the size right? And how do I get EHZ's water to use that palette instead of ARZ's?
Random guess, but: Code (ASM): Level_LoadPal: moveq #3,d0 bsr.w PalLoad2 ; load Sonic's palette line tst.b (Water_flag).w ; does level have water? beq.s Level_GetBgm ; if not, branch moveq #$15,d0 ; palette number $15 cmpi.b #8,(Current_Zone).w beq.s Level_WaterPal ; branch if level is HPZ moveq #$16,d0 ; palette number $16 cmpi.b #$D,(Current_Zone).w beq.s Level_WaterPal ; branch if level is CPZ moveq #$17,d0 ; palette number $17 Maybe adding to that may help.
Here's what it looks like in the svn disassembly: Code (ASM): Level_LoadPal: moveq #PalID_BGND,d0 bsr.w PalLoad2 ; load Sonic's palette line tst.b (Water_flag).w ; does level have water? beq.s Level_GetBgm ; if not, branch moveq #PalID_HPZ_U,d0 ; palette number $15 cmpi.b #hidden_palace_zone,(Current_Zone).w beq.s Level_WaterPal ; branch if level is HPZ moveq #PalID_CPZ_U,d0 ; palette number $16 cmpi.b #chemical_plant_zone,(Current_Zone).w beq.s Level_WaterPal ; branch if level is CPZ moveq #PalID_ARZ_U,d0 ; palette number $17 So yes, ARZ is the "default."
Alright, well I added Code (Text): cmpi.b #emerald_hill_zone,(Current_Zone).w beq.s Level_WaterPal; branch if level is EHZ moveq #PalID_EHZ_U,d0; load EHZ's underwater pal underneath, however, where is PalID_ARZ_U defined? I searched in s2.asm and only came up with two results. Neither of which define.
It's defined in s2.constants.asm. Also, you're checking for the wrong zone ID; you should check for Aquatic Ruin instead of Emerald Hill.
ALRIGHT. Everything works now: except one thing. The tiles that use the rotating palette—don't work underwater. Is there a way around this?
You'd need to edit PalCycle_EHZ. If you want to use the same colors underwater, you could change the code this way: Code (ASM): PalCycle_EHZ: lea (CyclingPal_EHZ_ARZ_Water).l,a0 subq.w #1,(PalCycle_Timer).w bpl.s + ; rts move.w #7,(PalCycle_Timer).w move.w (PalCycle_Frame).w,d0 addq.w #1,(PalCycle_Frame).w andi.w #3,d0 lsl.w #3,d0 move.l (a0,d0.w),(Normal_palette_line2+6).w move.l 4(a0,d0.w),(Normal_palette_line2+$1C).w move.l (a0,d0.w),(Underwater_palette_line2+6).w move.l 4(a0,d0.w),(Underwater_palette_line2+$1C).w + rts If you want different colors, add a lea (like the first instruction, only with a different label) before the move instructions that set the underwater colors. That data should be the same length as that labelled as CyclingPal_EHZ_ARZ_Water.
Alright, now that that's working, my last and final question. I'm having some trouble figuring out PLCs (Sort of revisiting the area, trying again.) For example: PlrList_Ehz1: plrlistheader plreq $7500, ArtNem_WaterSurface2 plreq $7600, ArtNem_EHZ_Bridge plreq $8200, ArtNem_HtzRock plreq $8500, ArtNem_Masher PlrList_Ehz1_End A few things go overwrite each other, the EHZ bridge and the HTZ rock for one, and the Masher and water surface. I've changed these values but then it completely becomes garbled. My question is is how do I figure out what I change it to to keep it from garbling <_<
Ok, so I just ported the BG Rev01 additions to S1 as per the guide on the wiki. However, on running Build.bat, I get this error. Code (Text): s1comb.asm<6211> : Error 06052 : Branch offset <-34464> out of range at address 0 s1comb.asm<6224> : Error 06052 : Branch offset <-34438> out of range at address 0 I'm hopeless at ASM, so can anyone help me ?
Go to those lines (most editors use Ctrl+G). As far as I remember these lines contain a bra or bsr, so change a bra to jmp and a bsr to jsr. If that doesn't work, I think it's something to do with the GHZ3 resize routine, so you may want to look there.
Thanks for the help, however I'm still getting the same error no matter what I try. The thing is, in porting the code in the guide, I didn't touch Lines 6211 and 6224 (the TRY AGAIN and END screen main loop) However, 6211 does have a bsr.w, which I changed to jsr , but then I still get the same error code as before. I looked at GHZ3 resize, but I can't see anything. I'll post what I have: Code (Text): ; =========================================================================== Resize_GHZ3: moveq #0,d0 move.b ($FFFFF742).w,d0 move.w off_6E4A(pc,d0.w),d0 jmp off_6E4A(pc,d0.w) ; =========================================================================== off_6E4A: dc.w Resize_GHZ3main-off_6E4A dc.w Resize_GHZ3boss-off_6E4A dc.w Resize_GHZ3end-off_6E4A ; =========================================================================== Resize_GHZ3main: move.w #$300,($FFFFF726).w cmpi.w #$380,($FFFFF700).w bcs.s locret_6E96 move.w #$310,($FFFFF726).w cmpi.w #$960,($FFFFF700).w bcs.s locret_6E96 cmpi.w #$280,($FFFFF704).w bcs.s loc_6E98 move.w #$400,($FFFFF726).w cmpi.w #$1380,($FFFFF700).w bcc.s loc_6E8E move.w #$4C0,($FFFFF726).w move.w #$4C0,($FFFFF72E).w loc_6E8E: cmpi.w #$1700,($FFFFF700).w bcc.s loc_6E98 locret_6E96: rts ; =========================================================================== loc_6E98: move.w #$300,($FFFFF726).w addq.b #2,($FFFFF742).w rts ; =========================================================================== Resize_GHZ3boss: cmpi.w #$960,($FFFFF700).w bcc.s loc_6EB0 subq.b #2,($FFFFF742).w loc_6EB0: cmpi.w #$2960,($FFFFF700).w bcs.s locret_6EE8 bsr.w SingleObjLoad bne.s loc_6ED0 move.b #$3D,0(a1); load GHZ boss object move.w #$2A60,8(a1) move.w #$280,$C(a1) loc_6ED0: move.w #$8C,d0 bsr.w PlaySound; play boss music move.b #1,($FFFFF7AA).w; lock screen addq.b #2,($FFFFF742).w moveq #$11,d0 bra.w LoadPLC ; load boss patterns ; =========================================================================== locret_6EE8: rts ; =========================================================================== Resize_GHZ3end: move.w ($FFFFF700).w,($FFFFF728).w rts ; ===========================================================================
Gah, Yeah, sorry, I quickly edited my post. I did that and still get the original 2 errors. Here are the two lines that appear to be giving me errors. They are the "jsr PauseGame", and the move.b at the TryAg_Exit Code (Text): ; --------------------------------------------------------------------------- ; "TRY AGAIN" and "END" screen main loop ; --------------------------------------------------------------------------- TryAg_MainLoop: jsr PauseGame move.b #4,($FFFFF62A).w bsr.w DelayProgram jsr ObjectsLoad jsr BuildSprites andi.b #$80,($FFFFF605).w; is Start button pressed? bne.s TryAg_Exit; if yes, branch tst.w ($FFFFF614).w; has 30 seconds elapsed? beq.s TryAg_Exit; if yes, branch cmpi.b #$1C,($FFFFF600).w beq.s TryAg_MainLoop TryAg_Exit: move.b #0,($FFFFF600).w; go to Sega screen rts ; =========================================================================== Note: That first jsr was changed from the bsr.w
Its Lines 6211 and 6224 in S1comb.asm. Not S1.asm. So, find those lines in S1comb.asm and see what loc_xxxx they come under, and modify them in S1.asm.
What are these "voices" I keep hearing about when it comes to music hacking? Also, I got a MPD24 Midi thing for this a while back and I'll be putting into use. Any good programs? I've got FL Studio , but a still a bit loss with everything.