Jump to content



1

Kernel Timing Problem in my Hack (QuadraTank)


2 replies to this topic

#1 starfighter1314 OFFLINE  

starfighter1314

    Space Invader

  • 35 posts

Posted Sun Oct 29, 2006 7:10 PM

Hello,

I posted this in the Hacks forum, but haven't heard anything. Maybe someone in here can help. I am having a timing problem in my Combat hack. When all 4 paddles are rotated counter-clockwise, the whole playfield shifts downward a couple of scanlines. I haven't been able to pinpoint the problem, but it only happens when all 4 paddles are in that zone. Any ideas?

thanks in advance,
-s

Edited by starfighter1314, Thu Apr 19, 2007 9:56 PM.


#2 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!

  • 16,745 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany

Posted Mon Oct 30, 2006 3:22 AM

:idea: Reading the pods takes too long in worst case.

Optimizing the slowest execution path may help:
 	LDX #$08
	LDA  INPT0;3
	BPL  PotNot00; 2 or 3
	STX  POT0;3
PotNot00
	LDA  INPT1
	BPL  PotNot01
	STX  POT1
PotNot01
	LDA  INPT2
	BPL  PotNot02
	STX  POT2
PotNot02
	LDA  INPT3
	BPL  PotNot04
	STX  POT3	
PotNot04
	JMP  PotNot3; 3
Do the same with SecondFrame code. This saves 6 cycles, which should be enough.

Edited by Thomas Jentzsch, Mon Oct 30, 2006 3:23 AM.


#3 starfighter1314 OFFLINE  

starfighter1314

    Space Invader

  • 35 posts

Posted Sun Nov 5, 2006 1:34 AM

Thanks! That did the trick.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users