The best way to avoid wasting space is moving stuff around though =P
Transform at will in Sonic 2
#16
Posted 28 May 2012 - 12:58 PM
The best way to avoid wasting space is moving stuff around though =P
#17
Posted 28 May 2012 - 01:47 PM
Anyway, that's useful to know, thanks for the tip.
#18
Posted 28 May 2012 - 02:45 PM
redhotsonic, on 28 May 2012 - 12:36 PM, said:
vladikcomper, on 28 May 2012 - 10:56 AM, said:
Check out this post for fixing it: http://forums.sonicr...25
This is for Sonic 1. In Sonic 2 it's exactly the same, except for the label you'll be looking for is 'ArtUnc_Sonic'.
I use to have that problem years ago, but "align $20000" takes up quite a bit of space. I use "align $10000" (any lower and the glitch still happens) and I haven't had any glitches since. So I've applied this for all my characters. Seeming as I've had no problems since, I guess this is fine?
Yes, sure. If your art is smaller than $10000 bytes (64 KB), you can align it like that without worrying that your art may cross 128 KB boundary.
But notice, that bug only happens when transferred tiles cross the boundary, not the whole art. So you may even place one bunch of tiles in before the boundary, and another after it, for example. But such alignment would be a real pain in ass though =P
But like Sik said, to avoid wasting space, it's good to organize your data order. Use listing file to see what offsets your data takes and how much 'align' directives take. If they take too much, you can always move some data from end of ROM to wasted space.
#19
Posted 28 May 2012 - 03:50 PM
vladikcomper, on 28 May 2012 - 02:45 PM, said:
#20
Posted 29 May 2012 - 04:58 PM
#21
Posted 30 May 2012 - 02:51 AM
Machenstein, on 29 May 2012 - 04:58 PM, said:
I just tested my code again and there is no such bug.
Maybe you forgot to delete some code from the first guide before applying my alternative one? Check if you don't have anything odd in Sonic_CheckGoSuper as well. Because it looks like something calls Sonic_RevertToNormal where it isn't needed.
#23
Posted 30 May 2012 - 08:36 AM
#24
Posted 30 May 2012 - 10:12 AM
vladikcomper, on 30 May 2012 - 02:51 AM, said:
Machenstein, on 29 May 2012 - 04:58 PM, said:
I just tested my code again and there is no such bug.
Maybe you forgot to delete some code from the first guide before applying my alternative one? Check if you don't have anything odd in Sonic_CheckGoSuper as well. Because it looks like something calls Sonic_RevertToNormal where it isn't needed.
I think the problem was this part threw me off:
Quote
bne.s return_1ABA4
with
bne.w Sonic_RevertToNormal
Because there are two "bne.s return_1ABA4" under Sonic_CheckGoSuper, so I replaced both of them with Sonic_RevertToNormal. Should I only replace the first one?
#25
Posted 30 May 2012 - 03:13 PM
Machenstein, on 30 May 2012 - 10:12 AM, said:
Yes. I meant to replace only the first one.
I wrote the guide quickly and I didn't take into account that someone would want to replace the second one, that goes after 'cmpi.b #7,(Emerald_count).w' line. In terms of basic program logic, it will be incorrect and cause the bug you've got. The logic will be: 'Does Sonic has 7 emeralds? If not, goto Sonic_RevertToNormal'. You know what it causes already: Sonic flashes yellow (reverts to normal) when he is in normal form.
EDIT: Just edited the guide to mention that. I think it doesn't have any ambiguous places now.
#26
Posted 10 June 2012 - 07:55 AM
#27
Posted 10 June 2012 - 02:10 PM
ObjB2_Prepare_to_jump: bsr.w ObjB2_Waiting_animation addq.w #1,objoff_2A(a0) cmpi.w #$30,objoff_2A(a0) bne.s + addq.b #2,routine_secondary(a0) move.w #(button_A_mask<<8)|button_A_mask,(Ctrl_1_Logical).w move.w #$38,objoff_2E(a0) tst.b (Super_Sonic_flag).w beq.s + move.w #$28,objoff_2E(a0) + bsr.w ObjB2_Align_plane bra.w JmpTo45_DisplaySprite ; =========================================================================== ObjB2_Jump_to_plane: clr.w (Ctrl_1_Logical).w addq.w #1,objoff_2A(a0) subq.w #1,objoff_2E(a0) bmi.s + move.w #((button_right_mask|button_A_mask)<<8)|button_right_mask|button_A_mask,(Ctrl_1_Logical).w [...]
A quick way to fix this is to change all instances of "button_A_mask" with whatever is not your transformation button. But for those who have all three buttons as their transformation button, I don't have an answer there. Perhaps someone more knowledgeable could provide a better solution.
#28
Posted 10 June 2012 - 03:13 PM
#29
Posted 10 June 2012 - 03:17 PM
#30
Posted 10 June 2012 - 04:17 PM
