Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.
All it goes to is a pink screen.
In "_inc/Pattern load cues.asm",
you will see this:
PLC_Main: dc.w 4
Change the "4" to a "3". (Without the quotes, of course)
Okay, thank you bobesh, it's working.
For FFUser, his head is now static and when he pushes the lamppost tiles appear.
We can talk about that through PMs. I had that happen too and the fix is probably simple if it's the exact same thing on your end.
I'm making a Sonic hack where there are two characters: Sonic and Anti-Sonic. I don't know much about Sonic coding (or whatever the proper terminology is, maybe ASM coding), so most of the coded elements are from tutorials here and on Sonic Retro. I used the extra characters tutorial on Sonic Retro, then went on to make Anti-Sonic load a separate pallet, and it works fine. The problem: badniks, monitors, sign posts, and Eggman all use Sonic's pallet, so their colors are all fucked up. How can I get those objects to always load Sonic's pallet, even when playing as Anti-Sonic?
You can't. Do to the limited lines of palette on screen, you can only have the main palette line and the three level palette lines. And no, replacing a palette line isn't an option. Kuddos for getting that far as a beginner though.
That's not possible. This has been explained several times, but it doesn't hurt to say it again. You only have 4 palettes available at a given time on the Genesis, and each of them can only use 15 colours + a transparent index (with one exception, but let's not get technical). We usually refer to them as "palette lines". The main character (e.g. Sonic) uses the first palette line; in Sonic 1, that line is used by many other objects as well, which is why it's not so trivial to implement other characters (e.g. Tails and/or Knuckles, or even Super Sonic) without screwing most other graphic elements in the process. From Sonic 2 onwards, they made sure that most objects didn't use the first palette line anymore, to avoid this kind of problem (one notable exception is that certain springs flash if you play as Super Tails in Sonic 3 & Knuckles).
You will need to redraw something, either by finding a way to put some needed colours in your new first palette line, or by finding suitable colors in the other palette lines, or a combination of the above techniques and/or some palette index rearranging. Not impossible, but time consuming. Good luck!
edit: damn you SuperEgg, it took me a lot of time to write this post because I was chatting with a cute girl in the mean time
Well, I guess Eggman is gonna be gothic in my hack, thanks to changing Anti-Sonic's reds to black . I should probably just stop being lazy and use the blacks that are already in Sonic's pallet to recolor his shoes in his art. (This is the part where you facepalm at me )
EDIT: Oh, that's right. I had another question. I want to use music from both Sonic 2 and 3&K in my hack (and don't worry, I know what a sound driver is, but not much about them). Is it possible to have two sound drivers in one hack? (Apologies if I sound like an idiot right now.) If not, how do other hacks I've seen have music from various different games? Would I have to modify the tracks so they work on a different sound driver?
From what I know with the music and stuff, all they did was convert the songs to be played on Sonic 1's Z80, but I really have no idea on how to do so. As for your first question, I believe it's not impossible, but nearly.
Well, I can't help it if you're pushing the Nineko charm on an unsuspecting, hot, barely legal, Italian girl. You should've took her home instead of coming here, asshat =P
Oh, put two sound drivers into a game. Trust me, it CAN be done. Ask vladikcomper, he's the one who made it possible. Anywho, the concept of it is now really void and no longer needed. You'd be better off just plopping in the S3K/flamewing driver into your S1 hack, or you could plop in the S2 2007 disasm's z80 driver, but modify it to run non-saxman compressed tracks. I actually have that lying around if you need help, so there's always that.
Once again, I agree. Look into Flamewing's driver and you'll be able to use all the songs you want.
I'm starting to think the only thing in this hack that will done by me is the concept, at this rate. I have a lot more ideas that I probably won't be able to pull off, but I'll try anyways. And most likely you will be the ones doing to dirty work
I'm just saying, that really isn't the attitude to have. As they say, practice makes perfect, and if you want something done, do it yourself.
Just exactly where is the limitation in the palette anyway? Of course there's only so much space in CRAM but is there a bottleneck anywhere else in the process?
If I'm coding, I could theoretically have a palette and draw an object and send that to the VDP or wherever the final image product gets stored while waiting for all image information. Then within the same frame, change the palette and draw some other objects and send that as well. Basically:
Load Anti-sonic's palette
Load the normal palette
Draw the rest of the stuff that uses that palette
Send the full image using both palette's to the TV.
My initial guess is that this would result in the last defined palette to be used for everything, but why?
I know something similar is used with the water palettes since the lines being drawn can be interrupted by such a change. Could that theoretically work with a vertical line as well if you have enough interrupts instead of just a single one by the correct horizontal line (as in: can you interrupt the drawing process and change palette mid-line)? If so, why not a box around Sonic ?
EDIT: Nevermind I think I figured out the answer to my own question . Anyway the one question still remains, if you can change a palette mid-line or if it only can be done between them.
Stop thinking outside the box TimpZ, you're going to hurt yourself =P This is SSRG, not a serious hardware website =P
Well first off I think it's an interesting question. Usually you start with simple questions, but as you learn more you get more complex questions, a whole heap of them at that. I find it to be a good method of learning.
Another reason I'm interested is because I've thought of incorporating water in new ways. Not to spoil anything but think of Asteroid Coaster from Sonic Colours.
I have some questions regarding fixing some issues with a Tails attack I've been working on for Sonic 1. One has to do with the way the animation is playing and the other is how the object designated to act like a "hitbox" behaves when the character is facing left. Edit: the hitbox thing is fixed and I edited the code section to reflect that, but I still don't know what to do with the animation issue
I wanted the animation to play once whenever you press A whether you're just standing or walking/running on the ground, but it only seems to play out the whole animation when there's ground velocity acting on the character and when you're not pressing any directions. It only plays the first frame of animation when he's standing still then it goes right back to idle animation. I'm guessing the same type of thing is going on when you press a direction too (the attack animation is "interrupted" by the walking or running animation, when I'd like it to be the other way around). I've been searching around and am still not really sure what to do about it. Any help/advice?
Here's the code for the attack (branched only from Obj02_MdNormal):
move.b ($FFFFF603).w,d0 ; read controller
andi.b #$40,d0 ; pressing A?
move.w #$A2,d0 ; set sound effect for the attack
jsr (PlaySound_Special).l ;and play it
tst.b $2A(a0) ;is there already a hitbox on screen
move.b #1,$2A(a0) ;Set flag until hitbox is gone
move.b #$6,0(a1) ; load tails hitbox object
btst #0,$22(a0) ;Is Tails facing left
move.w $10(a0),$10(a1) ;testing
And here's the animation code for it:
TailsAni_Attack: dc.b 2,$8B,$8C,$8D,$8E,$8F,$90,$91,$92,$93,$6A,$FD,0
TailsAni_Attack: dc.b 2,$8B,$8C,$8D,$8E,$8F,$90,$91,$92,$93,$6A,$FD,0
edit: this message is a reply to TimpZ. Once again someone else posted while I was typing.
It is possible to change palettes (almost) as much as you want, that's how Flamewing performs his 3-players black magic in Sonic 1 & 2: Heroes, but that's not trivial at all and it's not 100% faultproof, either. It also takes some time to update a full palette line, I don't remember how much, but I do remember that the moving "wave" objects on the water surface in water levels are added to somehow hide the few screen lines which use partially updated palette lines.
-last question; I'll have 19 posts after this one-
I'm trying to add a health meter to Terra; and it seems to either allow her infinite hits or no hits (disregard a shield). I swear I'm doing something wrong.
btst #0,status_secondary(a0) ; Does Sonic not have a shield?
bne.s Hurt_Shield ; if he does, remove the shield
tst.w d0 ; does he have zero rings?
beq.w Test_0HP ; if so, test if Sonic has 0 HP
jmp HurtSonic2 ; jump over HP related code
subi.b #1,$FFFFE740 ; Since we branched here, we must have more than 0 HP; reduce it by 1
tst.w $FFFFE740 ; Does Sonic have 0 HP?
bne.w Hurt_Shield ; No, he has over 0 HP left; hurt him, but don't kill him
beq.w KillCharacter ; Yes, he has 0 HP; kill him
tst.w $FFFE740 ; does he have zero HP?
bne.w Take1HP ; take 1 HP away if he doesn't, else, continue
jmp take1HP_return ; go back to checking crap related to being hurt if he had over 1 HP
move.b #ObjID_LostRings,id(a1) ; load object
bclr #0,status_secondary(a0) ; remove shield
move.w #-$400,y_vel(a0) ; make Sonic bounce away from the object
btst #6,status(a0) ; underwater?
beq.s Hurt_Reverse ; if not, branch
move.w #-$200,y_vel(a0) ; bounce slower
blo.s Hurt_ChkSpikes ; if Sonic is left of the object, branch
neg.w x_vel(a0) ; if Sonic is right of the object, reverse
move.w #SndID_Hurt,d0 ; load normal damage sound
cmpi.b #ObjID_Spikes,(a2) ; was damage caused by spikes?
bne.s Hurt_Sound ; if not, branch
move.w #SndID_HurtBySpikes,d0 ; load spikes damage sound
What am I doing wrong?
EDIT: Ralakimus: if she has rings, don't lose any HP and act like Sonic; if she doesn't and has >0 HP, take one HP off and act as if she'd been hit with a shield; if she has no rings and no HP, kill her
Do you want Terra to lose rings when HP is 0, or is it just part of the code that is to be removed?
Separate names with a comma.