Important! Repository idea! (was: Re: [stella] Very BASIC ASM Info needed..)

Subject: Important! Repository idea! (was: Re: [stella] Very BASIC ASM Info needed..)
From: Manuel Polik <manuel.polik@xxxxxxxxxxx>
Date: Thu, 08 Mar 2001 10:09:29 +0100
Russ Perry Jr wrote:
 
> But you're doing that AND a lot to mask the high 6 bits, so...

I'd just turn the shifting direction, then it's done with:

Preloading:  x10x01x00 (The first X is the carry, so it doesn't matter,
too!)

lda FrameCounter
ror
ror
ror
sta FrameCounter
and #$03
tax ;(or tay whichever index you need)

Which is 10 bytes and 16 cycles I think.

But there's yet another (more hidden) advantage of the table: You don't
have to preload anything, when zeroing out the machine on startup
anyway.

But another brilliant thought, Russ! I love thinking about such
'alternate ways for standard probs' :-)

------------------------------------------------

Besides, as a summary I'd say:

For getting sequences of powers of two (0/1 v 0/1/2/3 v ...):

INC FrameCounter
LDA FrameCounter
AND $XX
TAX

For getting sequences of three different values (0/1/2):

LDY frameCounter
LDX framecountertab,Y
STX frameCounter

framecountertab
    .byte $01,$02,$00

For getting sequences of other uneven values (0/1/2/3/4/5):

    dec FrameCounter
    bpl .skipReset
    lda #MAXVAL
    sta FrameCounter
.skipReset
    ldx FrameCounter

Is there any more ideas for these problems?


Besides, I have an idea:

-----------------------------------------------------------------
Maybe we should somewhere gather such 'ASM methodism' results?

Brilliant thought: What if, when we have final consens about something
being the 'ultimate best' solution, post it under a Non-Discussion,
extra preserved topic?
Let's say, when nobody comes with a better solution to this prob until
monday, I'll revamp this topic with a little article and post it tagged
as 
"[ASM WIZARDRY] #1 : Sequence Counting [Don't Reply!]". Now, it could be
very easy found in the archive, with a simple query for 'ASM WIZARDRY'.
One would get only the most useful results like this:

"[ASM WIZARDRY] #1 : Sequence Counting [Don't Reply!]"
"[ASM WIZARDRY] #2 : Cycle Optimizing [Don't Reply!]"
"[ASM WIZARDRY] #3 : RAM Optimizing [Don't Reply!]"
"[ASM WIZARDRY] #4 : ROM Optimizing [Don't Reply!]"
"[ASM WIZARDRY] #5 : Illegal Opcodes LAX [Don't Reply!]"

So, the general future way would be to write an article for building up
such an "methodism repository", review it under any name and when
approved by the whole list, post a tagged variant again.

I'd even suggest a second series for specific 2600 topics like:

"[2600 WIZARDRY] #1 : Horizontal positioning [Don't Reply!]"
"[2600 WIZARDRY] #2 : NTSC/PAL conversions [Don't Reply!]"
"[2600 WIZARDRY] #3 : Speeding up the kernal [Don't Reply!]"

I know, most of these articles are already written and hidden somewhere,
but what about dusting them of, revamping them and tag them for an easy
find?

Ok, there's one little drawback: When someone is pointing out to such an
article saying something like "Search in the archive for [ASM WIZARDRY]"
he would get all messages containing previous "Search in the archive for
[ASM WIZARDRY]" pointers, since the archive doesn't provide topic only
searches.

But in general, what about this idea? Good/bad? Go for it?

Greetings,
	Manuel

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

Current Thread