Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.
Is there a way to "save to ROM" in SonMapED?
No. Use a disassembly.
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;
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:
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:
; Warp to pinball stage
move.b #GameModeID_Level,(Game_Mode).w ; => Level (Zone play mode)
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:
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):
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
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: a4 initialization
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
No, I don't. Sorry. I don't really know much asm.
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
Separate names with a comma.