Subject: RE: [stella] Climber5 source and binary From: Thomas Jentzsch <tjentzsch@xxxxxx> Date: Fri, 18 Apr 2003 16:47:09 +0200 |
Dennis wrote: >Would playerMotion here be the "delay" frames I have set up for the >players (i.e. 4, 3, 2, and 1)? No, playerMotion would contain "fractional delay frames". Example: (SBC #$60) frame playerMotion C - $00 - 0 $a0 0 1 $40 1 2 $e0 0 3 $80 1 4 $20 1 5 $c0 0 6 $60 1 7 $00 1 The carry is clear in 3 out of 8 frames, so your resulting speed is 3/8 = ($60/$100). Fractional! Other values: $aa -> ~2/3, $80 -> 1/2, $55 -> ~1/3, $40 = 1/4, ... (but you can use *any* values you like here, e.g. $ca -> ~0.79) Note that playerMotion is only changed here and *not* reseted when moving! >As a matter of fact, where did you get the numbers for the first >routine? Is there a formula you're using that I'm missing? I think by now you should have got the answer already. Else it's my fault and I should learn to explain myself better. ;-) >you clear the carry bit instead of setting it so a bcc would move the >player for the given frame. I am using CLC to be able to subtract $100 (by using $ff) so that the carry after the subtraction is always cleared and I get maximum speed then (SBC M: A = A - M - 1 + C). Therefore I am reducing all subtract values by 1. BTW: You can use ADC (and SEC) instead. That's maybe a bit easier to understand. >$04 - $3F = $C5 -> carry set, right? >$C5 - $3F = $86 -> carry cleared??? No, it's exactly the other way around. The carry is cleared when the subtraction "crosses" 0. >My only question for this is where do you come up with the number 30? >I understand you get 36 from 30*6/5. Why 30? Hm, it's 5*6. :-) But you can use any higher value here as long as the results don't get larger than $ff. And the conversion to PAL works best when it can be divided by 5. Have fun! Thomas ---------------------------------------------------------------------------------------------- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: RE: [stella] Climber5 source an, Andrew Davie | Thread | [stella] Everyone loves a newbie!, Sam Jeffreys |
Re: [stella] RPG Kernal, Glenn Saunders | Date | Re: Re: Moving objects 1/n pixels (, Christopher Tumber |
Month |