Re: [stella] Programming tricks guide

Subject: Re: [stella] Programming tricks guide
From: Thomas Jentzsch <tjentzsch@xxxxxx>
Date: Sun, 2 Feb 2003 10:53:10 +0100
Paul wrote:
> Has anyone put together a guide of programming tricks?  I've started a 
> small one with stuff like skip draw, efficient cycle wasting, paddle 
> reading, and well that's all I got so far.

I have a few more:
- the 48 pixel routine
- usage of VDEL in general
- BIT tricks
- register and single bits reusing
- avoiding page penalties
- early HMOVEs
- shifting vs. ANDing
- branching out of the kernel flow to keep the slowest part as fast as
- constant cycle count to avoid WSYNC
- Combat missile trick
- normal and Fatal Run positioning routines
- Parker Bros. BRK trick
- useful illegal opcodes (LAX, DCP, NOP)
- exact timings for writing to PFx (in both modes)
- multiple RESP tricks
- constant carry status (e.g. EOR instead of CMP) to avoid CLC/SEC
- counting down when looping
- trying to preserve X and Y inside the kernel
- using branches instead of JMPs, using JMP,...RTS instead of
JSR,...RTS,RTS at the end of a subroutine
- multiplication tricks with shifts vs. using a table
- using TXS, TSX to save CPU cycles
- ...

Have fun!
Thomas Jentzsch         | *** Every bit is sacred ! ***
tjentzsch at web dot de |

Archives (includes files) at
Unsub & more at

Current Thread