Hi guys, sorry to bother you again so soon, but I'm working on a Rocket colour power for my hack and it's not really working like it's supposed to; Sonic_Rocket: tst.b $29(a0) bne.w Rocket_Move move.b ($FFFFF603).w,d0 andi.b #$70,d0 beq.w Rocket_End tst.b $2F(a0) bne.s Rocket_End move.b #1,$2F(a0) move.b #$C,$29(a0) move.b #$BC,d0 jsr (PlaySound_Special).l move.w $10(a0),d0 move.w d0,($FFFFF63C).w btst #0,$22(a0) beq.s Rocket_NoFlip sub.w #$600,d0 bra.s Rocket_Cont Rocket_NoFlip: move.w #-$EEE,$12(a0) Rocket_Cont: move.w #-$EEE,$12(a0) Rocket_Move: sub.b #1,$29(a0) tst.b $29(a0) beq.s Rocket_Reset clr.w $10(a0) Rocket_End: rts Rocket_Reset: tst.w $12(a0) beq.s Rocket_End blt.s Rocket_Reset2 tst.b ($FFFFF63C).w bgt.s Rocket_Reset3 bra.s Rocket_Reset4 Rocket_Reset2: tst.b ($FFFFF63C).w blt.s Rocket_Reset3 Rocket_Reset4: neg.w ($FFFFF63C).w Rocket_Reset3: move.w ($FFFFF63C).w,$10(a0) rts The idea here is to take Selbi's jump dash code and alter it so that Sonic shoots upwards at a high speed. I can't work out how to make it more rocket-like, for example pausing before shooting off into the sky. Could someone help me out in doing this stuff?
Is anyone here good with editing subobjects, I'm having two problems: Code (Text): Obj92_SubObjData: dc.l Obj92_Obj93_MapUnc_37092 dc.w 0 dc.w $404 dc.w $1012 1. I wanna edit the object's VRAM location, and I'm having problems figuring this out. Nothing I edit seems to alter it's art location effectively. (I want it in $EC00 by the way). 2. Is there any way to add subobjdata routines here, and have the object branch to a different one according to a certain circumstance?
Honestly, you should probably just not use the sub-object system. Just code everything into the object manually. If you really want, you can set up a table of values just for that object, and have it read from there based on subtype or whatever.
So let me preface this by saying I admit to being a total beginner at this. I'm trying to make it so the checkpoint poles in Sonic 2 warp you to a specific level, instead of the special stage. Right now I'm doing it like this: Code (Text): ; loc_1F536: Obj79_Star: move.b collision_property(a0),d0 beq.w loc_1F554 andi.b #1,d0 beq.s + ; Warp to pinball stage move.w #pinball_stage_act_1,(Current_ZoneAndAct).w move.b #GameModeID_Level,(Game_Mode).w ; => Level (Zone play mode) jmp Level + clr.b collision_property(a0) However, this brings along with some data from the stage you were previously in, most notably the level boundaries. This isn't related to the custom stage I've made (called "pinball stage" above), since using any other level, e.g. #casino_night_zone_act_1, results in the same issue. What is the proper way to to do this?
So, I recently overwrote CPZ's data with that of EHZ for 2P preservation purposes in my hack, but when I open up the 2P stage select from the title screen & title screen only, it results in this: It also has the same issue occur to the stages, with the HUD and Rings also having stripes appear - but accessing the 2P Menu from beating a 2P Stage has it load normally - and the 2P demo on the title screen works perfectly. Any ideas as to how to fix this? EDIT: Changing the call to $0D on the 2P Level Select entry code to $00 worked and fixed it.
@Billy instead of setting Game_Mode and jumping to Level, do this: Code (Text): move.w #1,(Level_Inactive_flag).w rts Copied from the end-of-act score tally (Obj3A).
@MainMemory That code still transports the player to the new level, but with the same issue. I suspect the new level thinks you're loading from a checkpoint, because it'll put you in the new level where the checkpoint was in the old one. Right after the level size array is this code (around line 41400): Code (Text): tst.b (Last_star_pole_hit).w ; was a star pole hit yet? beq.s + ; if not, branch jsr (Obj79_LoadData).l ; load the previously saved data move.w (MainCharacter+x_pos).w,d1 move.w (MainCharacter+y_pos).w,d0 bra.s ++ Commenting out the first three lines does indeed load the level boundaries for the new stage... but it breaks a number of other things, including the player's start position in every level. I'll play around with it, but let me know if you have any insight.
You could add a check for the special stage's level ID and branch to the + label to skip checkpoints for that level.
How would one go about porting music from other genesis games into Sonic 2? I would love to have some Ristar/Sonic3DBlast music in a romhack i'm working on
So, I've brought this question here to Sonic Retro from SSRG in order to hopefully get a bit more help, so sorry if this seems like I'm an impatient brat. I'm not asking for the code to be handed to me, but I'd rather have pointers to the issue in the code. So, I've been trying to port the S3 level layout format to my hack, and whilst I have put in plenty of effort into getting this fully functional, I've hit a roadblock: Whilst collision is fully functional and displays the behavior you'd expect from the S3 level layout (aka, loopbacks), the visuals have gone out the window. Here's a picture to show what I mean: Wherever Sonic spawns, this is in the FG, and shortly after this screenshot, the FG becomes empty. The BG is just random palmtree chunks. I'm confused as to what the issue is. I've even referenced S3&K for some hope that I could get this working to no avail. I have some ideas as to what MIGHT be an issue, but I doubt it. Notably, S3 moves the level layout into a3 and then moves it into a4 later in a sense. I'll show the code now, in spoilers for viewing convenience. Contained is GetBlockData as it is with all that is currently set to be complied, and an example of what is being sent into a4. Spoiler: GetBlockData Code (Text): GetBlockData: add.w (a3),d5 GetBlockData_2: add.w 4(a3),d4 lea (v16x16).w,a1 move.w d4,d3 lsr.w #5,d0 and.w (Layout_row_index_mask).w,d3 move.w (a4,d3.w),d3 lsr.w #3,d5 move.w d5,d0 lsr.w #4,d0 add.w d0,d3 moveq #-1,d3 clr.w d3 move.b (a4),d3 lsl.w #7,d3 andi.w #$70,d4 andi.w #$E,d5 add.w d4,d3 add.w d5,d3 movea.l d3,a0 move.w (a0),d3 andi.w #$3FF,d3 adda.w d3,a1 locret_6CIE: rts Spoiler: a4 initialization Code (Text): lea (Level_layout_main).w,a4 move.w #$4000,d2 bsr.s DrawChunks lea (v_bgscreenposx).w,a3 addq.w #2,a4 move.w #$6000,d2 I've tried referencing a lot of materials to get this working. Hopefully I got at least something right. I really don't want to scrap my plans for level layouts, and for those to work, I probably will need this. My apologies if this sounds stupid. EDIT: Solved. Ignore.
So, I've actually got the Peelout into S1 successfully. I just don't know how to add any sound for it. Any help?
You need to place "move.b #(sound id),d0", "jsr PlaySound" at the right place (duh) I hope you know where to place it : )
You should find something like "is Up released?" and if there's "if yes, branch" next to it, find that label and paste the code there. If there's "if not, branch", paste the code after that line
Okay, er does anyone know what is going on here? Basically the further into HPZ the player goes, the more tiles disappear in the background. This issue exists in EVERY damn project I've made that ports the level back in and I wanna just fix it once and for all.
Surprisingly simple, this. Your background doesn't extend to the maximum extent of the Background layer. In order to have the background loop properly, you need to extend it out.