Well, I would need to watch the VRAM, but I would also need to number of the tile, my curser is currently hovering over. KMod lacks of that feature.
More S1 pallette related questions: * I'd like the Try Again/End screens to load a separate pallette from the ending cutscene itself, at which point would I edit for this change (I've tried it at different points but it either doesn't change the pallette or f*** up the sprites altogether). * Is there a way to change which pallette line a sprite mapping uses without changing it's layer order? I edited the lighting balls in the Final Zone to use the first pallette line rather than the second and now you can see them fall inside the walls and disappear where the animation ends.
You know what would be nice to have on the wiki? Subroutines. Like have a description of each one, what it does, how to set it up in your code so it activates correctly, and what to be ready for when it finishes. For example Sonic 1's DeleteObject. I also want Malevolence's Simple Boss that he posted on Sofia, if possible. I PM'd him however it has been a few days (I assume he is away from viewing Retro right now, busy etc) so I wonder if anyone else had saved it. In short I want to know how stuff works more than what is explained in the how to work with objects tutorial. Edit: Code (ASM): jsr ChkObjOnScreen tst d0 bne.w DeleteObject I don't know why this doesn't work.
I use DebuGens for watching VRAM and general debugging. Never had a problem with it as far as getting information goes, and it can dump various files such as the VRAM, CRAM etc. It doesn't give the tile number by hovering over it, but its easy enough to work out by the VRAM location on the left of the tile rows.
Why does this bug happen? How can I fix it? The wiki page states that it was fixed in S2K, however, the code for the object is exactly the same.
What happens is that an object with ID $97 (Rexon's head) has its routine counter set to $A, although its last routine is 8. I think routine 8 is used when the head is destroyed. There are a few places where the routine counter is incremented by 2: Code (ASM): addq.b #2,routine(a0) In particular, at loc_37454, there's a call to loc_3750C, which can set the routine counter to 8, and then increments the routine counter by 2 if the counter at objoff_2A(a0) is -1, so it's really a matter of timing.
Wouldn't it be much easier to just like duplicate the last line in the routine counter? I mean this one (in off_373DE): Code (ASM): dc.w loc_374F4-off_373DE; 4 For me it works just fine now.
Well, I just got back into hacking again, and after failing with building my rom because I renamed a folder ( :v: ) I decided to try adding dynamic pallets to see what I could remember. I managed to create the separate pallet files and the like, but just realized I have no idea what subroutine controls loading pallets. Only thing I can find is this: Code (Text): Level_LoadPal: move.w #$1E,($FFFFFE14).w move #$2300,sr moveq #3,d0 bsr.w PalLoad2 ; load Sonic's pallet line cmpi.b #1,($FFFFFE10).w; is level LZ? bne.s Level_GetBgm ; if not, branch moveq #$F,d0 ; pallet number $0F (LZ) cmpi.b #3,($FFFFFE11).w; is act number 3? bne.s Level_WaterPal ; if not, branch moveq #$10,d0 ; pallet number $10 (SBZ3) I'm using the 2005 disassembly mainly because I'm already used to its structure (and I'm far too lazy to move my work over to the SVN disassembly). Can someone give me a pointer (no pun intended) as to where I should start with pallet loading? Thanks.
Palettes are loaded by the PalLoad* routines (PalLoad1, PalLoad2, PalLoad3_Water and PalLoad4_Water). They load one or more palette lines according to the data in _inc\Pallet pointers.asm. Each entry is made up of a longword pointing to the palette data, a word indicating at what RAM address the palette will be loaded and a word indicating how many longwords to load (number of colors / 2 - 1). Palette animation is done in PalCycle_Load.
Ah, thanks. I managed to get the game to load the new pallets I had this time, but on the wrong levels now (because I accidentally incremented the offset of the pallets outside GHZ). From my understanding, what PalLoad* does is check the value of d0 and add #3 to it, giving the pallet offset, correct? If that's the case I think I have an idea to go with from here.
No, it shifts the value to the left by 3 bits, which has the effect of multiplying it by 8 (because each entry in the table takes up 8 bytes). The first entry is the SEGA palette, so by moving 0 to d0, it will load the SEGA palette. The palette that is loaded for a level is specified in _inc\Main level load blocks.asm (it's the last byte on each dc.b line). If you want to load a different palette for each act, you'll have to come up with another mechanism.
I've never hacked a rom a day in my life. So, in layman's terms, can someone answer a few questions for me? 1) Is it possible to put Sonic 3-style level transitions into Sonic 2? If so, how? 2) Are Sonic 3 style level transitions possible in Sonic 2? If so, how? 3) Are "infinite loop" areas like the fall in Metropolis Zone editable? If so, how? 4) Is the a step-by-step walkthrough for editing with SonED2 anywhere? Just out of curiosity. Thanks for your time fellas
1 & 2: Yes, but with lots of ASM work. 3: Yes, you can edit it in SonED2, though if you want to stop the endless looping, you'll need to edit the correct parts in ASM. 4: SCHG:SonED2_Manual
Just realized 1 and 2 are the same. Whoops. That SonED2 manual doesn't have any pictures to go along with explanations, so it's kinda hard to figure out if its something I could even feasibly wrap my head around without downloading SonED2 and going through the effort of figuring out how to split Sonic 2 and all that jazz.
Porting a specific something from one Megadrive/Genesis game to another is most likely 90% possible, regardless of the differences between the two, porting can be done in any shape or form, therefore the answer to all of your questions from 1 to 3 are "Yes", "How?" well that is down to how much research and work you're will to through at it.
Like I said, I've never hacked a day before in my life, so I shove in the right direction is all I'm asking for. Like PsychoSk8er's ASM tip. Do you know where those routines might be found in the Sonic 3 disassembly, MarkeyJester?
The infinite fall parts are acheived by setting the horizontal boundary to -100. then once you're at the bottom you'll be at the top, etc
Is it possible to program commands for diagonal buttons (eg. 'Is forward up/forward down being pressed?').
Code (ASM): #%SACBRLDU S = Start B = B C = C A = A R = Right L = Left D = Down U = Up Code (ASM): move.b ($FFFFF602).w,d0 ; load control buttons andi.b #%00001010,d0 ; get only right and down button presses cmp.b #%00001010,d0 ; are right and down both pressed? beq.s DiagonalButtonIsPressed ; if so, branch Edit: Correcting button bit codes as stated by FraGag below.