[stella] RE: Thrust illegal opcodes

Subject: [stella] RE: Thrust illegal opcodes
From: "Thomas Jentzsch" <tjentzsch@xxxxxx>
Date: Sat, 16 Sep 2000 09:35:36 +0200
Andrew wrote:
> Thomas
> Any comments on my recent 'optimization' of the score routine?

Hello Andrew,
the problem with your code is, that it looks very
good as long as you don't care about the timing. But
the correct timing is the real problem.

For details, you should refer to earlier postings about
the 48 pixel routine. These explain it much better
than i ever could do.

But i can *try* to give you some information:

One rule goes like this:
The last two writes to both players must be done in not
more than 8 cycles each, and they have to be done both.

This can't be achieved with your straight forward
solution. You have to preload some values to get the
compact timing, that's why i'm using the stackpointer
and the x register for it.
To get a value into the x register you need 2 (tax)
extra cycles , to get it into and out of the
stackpointer you need 6 (tax, txs,...tsx) extra cylces.
That makes 8 and you only have 6 cylces left :-(

I'm using lax and that saves me 4 cyles (2*tax), so i
have 2 cyles in reserve, which i'm wasting with the tay
at the end of the loop (y = 0, i need that value to
reset some TIA registers just in time).

Best regards,

Thomas Jentzsch         | *** Every bit is sacred ! ***
tjentzsch at web dot de |
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
IhrName@xxxxxx, 8MB Speicher, Verschluesselung - http://freemail.web.de

Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread