Someone once told me that Cinossu released a guide on retrohack how to add a splash screen, but then retrohack died along with that guide.
Various questions for Sonic 1 animations. 1. How do I change what sprites the game loads for the different rotations? I can't find this in the animation script. 2. How do I change the speed an animation plays at? 3. For some reason my normal standing frame is using the second frame of the waiting animation, but I can't find anywhere in the animation script I could have fucked up Sonic's first frame because I can't find it on there, unless the standing frame is under wait for some reason.
Sonic.asm is the animations, the routine to load these animatons is sonic_animate. In sonic.asm look for say sonani_wait: and there should be a number or letter, like dc.b 7 or, dc.b $FF. Now these first numbers are the speed. So say you have it at 7, if you want it faster, then lower the number, and if you want it slower then increase the number. E.g: 1 really fast, $1F quite slow. Yes the standing sprite is included in sonani_wait: In an orignal rom its one, but if you altered it, then check sonmaped to see what frame it is and then change it to suit the animation script. Hope this helped.
They were public for a short while before I decided to make them private. Cinossu is welcome to post them anywhere else if he wants to though.
To use the code anyway. If you were to create your own code and import the art yourself—I don't see why not.
A few years back I spent weeks working on creating almost an exact replica, although I never finished creating it as my knowledge was still limited at the time, but even after all that work, I was told I wasn't allowed to use it, "full stop" (Even though it was incomplete), so I just deleted the fucking thing, and now that I am a Tech Member, I just don't feel my time's worth while to recreate such a screen, nor use one already provided in the tech lounge as MainMemory stated. Though if you want a specific location, "SAnim_WalkRun:" is the routine related to it, as it collects the angle and calcilates it based on sonic's circumstances, then later it gets added to the frame number, increasing the ID down to the other frames: add.b d3,$1A(a0) ; modify frame number EDIT: if you want the frame numbers for the other angles.. Code (ASM): SonAni_Walk: dc.b $FF, 8, 9, $A, $B, 6, 7, $FF 6, 7, 8, 9, A, B, (are the normal frames) C, D, E, F, 10, 11, (45 degrees) 12, 13, 14, 15, 16, 17, (90 degrees) 18, 19, 1A, 1B, 1C, 1D, (135 degrees) Pretty much what Anime said, though the one's that start with $FF, are the ones that have their speed controlled by routines. Such as the walking which is controlled by "loc_13A78:".. Code (ASM): move.w $14(a0),d2 ; get Sonic's speed It collects the speed from here (Sonic's Ground Speed), makes the value positive, and checks for a speed amount of $0600, if it is higher, it'll be fourced to use the running animation, otherwise walking animation. It'll then negate it and add $0800, if it's a negative value, then the speed was higher than $0800, and the animation speed is set to it's maximum speed amount ($00), however if positive, it was lower than the speed of $0800, so the left byte is read from the speed and set as the frame duration, I.e. if the speed is $0600, then $06 is the speed set: Code (ASM): loc_13AC2: lsr.w #8,d2 move.b d2,$1E(a0) ; modify frame duration as seen here (d2 = the speed, negated + $0800), it's shifted right by 8 bits sending the left byte of the word to the right (or gets divided by $100, which ever one seems more logical), and is then set as the frame duration. Anime has more or less summed it up =)
I have a SonmapED question. Okay I'm working on changing coconuts sprites, and after I import my new sprite, coconuts arms don't get replaced. I've tried deleting the arms tiles but that only garbles the sprites =/. Any ideas guys?
I'm not entirely sure, but I think it may have something to do with the animation script trying to load the arms as separate sprites. I remember replacing buzz bomber and the flames caused a similar problem. Play around with the script and remove what you don't need or something.
Me + ASM = killer headache. I'll still give it a shot, im guessing all I have to search for is like obj_coconuts or something of the similar?
I'm not exactly a genius when it comes to ASM, so that should give you a clue as to how easy it is to work with Animation scripts. =P Anyway, yeah, search for 'coconuts', or his object ID equivalent (I think it's 9D, or something like that.) What you're looking for will be easy to spot, depending on the frames in SonMapEd. For example, if you have 5 frames in SonMapEd (I think there's always an empty 0 slot in front of the first frame, so 5 sprites would appear as 'frame 5/6' in SonMapEd), the animation script should not have any references to something higher than 5. The first byte is the speed (this was stated a few posts back), everything after that is a frame, and the last one is usually the byte that tells it to repeat, stop, etc. I'm not a technical person so I won't go into extreme details on all of this, and I'm probably wrong about that last part.
I play around with it, and if I have to I'll just make new mappings and play it from there, but that would probably dish out a worse head ache lol.
Code (Text): move.l #$40000001,($C00004).l lea (Nem_TitleFg).l,a0; load title screen patterns bsr.w NemDec move.l #$60000001,($C00004).l lea (Nem_TitleSonic).l,a0; load Sonic title screen patterns bsr.w NemDec I'm reading this right when I say $40000001 is $4000 in vram and $60000001 is $6000 correct? I moved the Sonic title art to $7800 and he loads parts of the title banner. If I don't move Sonics art it loads it in place of the large text box at the top. I seem to have plenty of space left in VRAM for the character so I don't know what I'm doing wrong.
Those values are correct, yes. Is the value #$78000001 sent to VDP when loading sonic's title art? Also asuming that your Sonic Title Object is still "Obj0E:", then is: Code (ASM): move.w #$2300,2(a0) ...This altered? It would be $7800 divided by 20 (Number of bytes per tile) so: Code (ASM): move.w #($7800/$20),$02(a0) ..or.. Code (ASM): move.w #$03C0,$02(a0) ..though baring in mind that value could be $23C0, $43C0 or $63C0 depending on the palette line being used. If that's not the case, then I'm not sure, sorry.
okay well, I finally found the coconuts code after some searching. Thing thing is I don't really see anything that relates to frames in the script. Here's the code. Code (ASM): ; =========================================================================== ; ---------------------------------------------------------------------------- ; Object 9D - Coconuts (monkey badnik) from EHZ ; ---------------------------------------------------------------------------- ; Sprite_37BFA: Obj9D: moveq #0,d0 move.b routine(a0),d0 move.w off_37C08(pc,d0.w),d1 jmp off_37C08(pc,d1.w) ; =========================================================================== off_37C08: dc.w loc_37C10-off_37C08; 0 dc.w loc_37C1C-off_37C08; 2 dc.w Obj09_Climbing-off_37C08; 4 dc.w Obj09_Throwing-off_37C08; 6 ; =========================================================================== loc_37C10: bsr.w LoadSubObject move.b #$10,objoff_2A(a0) rts ; =========================================================================== loc_37C1C: bsr.w loc_366D6 bclr #0,render_flags(a0) bclr #0,status(a0) tst.w d0 beq.s + bset #0,render_flags(a0) bset #0,status(a0) + addi.w #$60,d2 cmpi.w #$C0,d2 bcc.s + tst.b objoff_2E(a0) beq.s loc_37C66 subq.b #1,objoff_2E(a0) + subq.b #1,objoff_2A(a0) bmi.s + bra.w JmpTo39_MarkObjGone ; --------------------------------------------------------------------------- + addq.b #2,routine(a0) bsr.w loc_37C82 bra.w JmpTo39_MarkObjGone ; --------------------------------------------------------------------------- loc_37C66: move.b #6,routine(a0) ; Obj09_Throwing move.b #1,mapping_frame(a0) move.b #8,objoff_2A(a0) move.b #$20,objoff_2E(a0) bra.w JmpTo39_MarkObjGone ; --------------------------------------------------------------------------- loc_37C82: move.w objoff_2C(a0),d0 cmpi.w #$C,d0 bcs.s + moveq #0,d0 + lea Obj09_ClimbData(pc,d0.w),a1 addq.w #2,d0 move.w d0,objoff_2C(a0) move.b (a1)+,y_vel(a0) ; climbing speed move.b (a1)+,objoff_2A(a0) ; time to spend moving at this speed rts ; =========================================================================== ; byte_37CA2: Obj09_ClimbData: dc.b -1,$20 dc.b 1,$18 ; 2 dc.b -1,$10 ; 4 dc.b 1,$28 ; 6 dc.b -1,$20 ; 8 dc.b 1,$10 ; 10 ; =========================================================================== ; loc_37CAE: Obj09_Climbing: subq.b #1,objoff_2A(a0) beq.s loc_37CC6 bsr.w JmpTo26_ObjectMove lea (off_37D88).l,a1 bsr.w JmpTo25_AnimateSprite bra.w JmpTo39_MarkObjGone ; =========================================================================== loc_37CC6: subq.b #2,routine(a0) move.b #$10,objoff_2A(a0) bra.w JmpTo39_MarkObjGone ; =========================================================================== ; loc_37CD4: Obj09_Throwing: moveq #0,d0 move.b routine_secondary(a0),d0 move.w off_37CE6(pc,d0.w),d1 jsr off_37CE6(pc,d1.w) bra.w JmpTo39_MarkObjGone ; =========================================================================== off_37CE6: dc.w loc_37CEA-off_37CE6 dc.w loc_37D06-off_37CE6; 1 ; =========================================================================== loc_37CEA: subq.b #1,objoff_2A(a0) bmi.s + rts ; --------------------------------------------------------------------------- + addq.b #2,routine_secondary(a0) move.b #8,objoff_2A(a0) move.b #2,mapping_frame(a0) bra.w loc_37D22 ; =========================================================================== loc_37D06: subq.b #1,objoff_2A(a0) bmi.s + rts ; --------------------------------------------------------------------------- + clr.b routine_secondary(a0) move.b #4,routine(a0) ; Obj09_Climbing move.b #8,objoff_2A(a0) bra.w loc_37C82 ; =========================================================================== loc_37D22: bsr.w JmpTo19_SingleObjLoad bne.s return_37D74 _move.b #$98,0(a1) ; load obj98 move.b #3,mapping_frame(a1) move.b #$20,subtype(a1) ; <== Obj9D_SubObjData2 move.w x_pos(a0),x_pos(a1) move.w y_pos(a0),y_pos(a1) addi.w #-$D,y_pos(a1) moveq #0,d0 btst #0,render_flags(a0) bne.s loc_37D58 moveq #4,d0 loc_37D58: lea word_37D76(pc,d0.w),a2 move.w (a2)+,d0 add.w d0,x_pos(a1) move.w (a2)+,x_vel(a1) move.w #-$100,y_vel(a1) lea Obj98_CoconutFall(pc),a2 ; set the routine used to move the projectile move.l a2,objoff_2A(a1) return_37D74: rts ; =========================================================================== word_37D76: dc.w $FFF5 dc.w $100 ; 1 dc.w $B ; 2 dc.w $FF00 ; 3 ; off_37D7E: Obj9D_SubObjData: dc.l Obj9D_Obj98_MapUnc_37D96 dc.w $3EE dc.w $405 dc.w $C09 ; animation script off_37D88: dc.w byte_37D8C-off_37D88 dc.w byte_37D90-off_37D88; 1 byte_37D8C: dc.b 5, 0, 1,$FF byte_37D90: dc.b 9, 1, 2, 1,$FF even ; ------------------------------------------------------------------------ ; sprite mappings ; ------------------------------------------------------------------------ Obj9D_Obj98_MapUnc_37D96: BINCLUDE "mappings/sprite/obj9D.bin" Like I said above, I'm trying to remove coconuts arms from loading, or being used in any way. Code (ASM): ; =========================================================================== ; byte_37CA2: Obj09_ClimbData: dc.b -1,$20 dc.b 1,$18 ; 2 dc.b -1,$10 ; 4 dc.b 1,$28 ; 6 dc.b -1,$20 ; 8 dc.b 1,$10 ; 10 ; =========================================================================== That code was the only thing I though relevant to which sprite is loaded or used, but like I said I have no clue what I'm doing when it comes to asm.
Code (Text): ; animation script off_37D88: dc.w byte_37D8C-off_37D88 dc.w byte_37D90-off_37D88; 1 byte_37D8C: dc.b 5, 0, 1,$FF byte_37D90: dc.b 9, 1, 2, 1,$FF even This is the animation script. I can't help you all that much because I don't really know what kind of frames you're using, but basically the "dc.b #," part is the speed. The number will adjust your speed accordingly. the numbers "5, 0, 1," and "1, 2, 1," are the frames. You'll have to play with these numbers to make your own animations. And last the "$FF" part is the... Well this is telling it to repeat the animation when finished. I honestly don't know exactly what is wrong, but if you change the numbers around and the arms turn into other sprites, then you know should get an idea of what to do.
That helps me out alot thanks for pointing out the script for me, im sure I'll be able to figure it out.
I need a bit of help guys, I'm having trouble with my Sonic 1 hack: I have no idea how to make a palette for my character for Labyrinth Zone underwater. I tried messing up with HivePal to get colours right but I've never been able to do so. Could maybe someone help me on this?