[stella] That .byte thing

Subject: [stella] That .byte thing
From: John K Harvey <jkharvey@xxxxxxxxxxxxxxxxx>
Date: Thu, 24 Sep 1998 19:39:24 -0500
Ok, I'm hooked.  I finally can start programming for 6502 and this is good
for me, but they are probably a lot of standard or inane questions which
are too easy to contemplate.  Well, here goes.

I now have playfield and background stuff mostly figured out.

I want to draw an X on the background using the Player0 graphic.
I have some problems.  I do not know how to do that .byte thing and when I
do it the hard way (see below) I require 2 STA WSYNCs in order to see
something draw on the screen.  Will the .byte command help me out?

Here is the subroutine from the main drawing function.  The accumulator is
counting down for each scanline.  That is why I transfer it to X.

PLAYER_DRAW:
        TAX 
        LDA #$C3
        STA GRP0;put numbers in
        STA RESP0;set for print
        STA WSYNC;why does nothing print here?
        STA WSYNC;2 here works fine, but only one draw
        LDA #$66
        STA GRP0
        STA RESP0
        STA WSYNC
        STA WSYNC
        LDA #$3C
        STA GRP0
        STA RESP0
        STA WSYNC
        LDA #$18
        STA GRP0
        STA RESP0
        STA WSYNC
        LDA #$18
        STA GRP0
        STA RESP0
        STA WSYNC
        LDA #$3C
        STA GRP0
        STA RESP0
        STA WSYNC
        LDA #$66
        STA GRP0
        STA RESP0
        STA WSYNC
        LDA #$C3
        STA GRP0
        STA RESP0
        STA WSYNC

        LDA #0;delete all graphics now
        STA GRP0
        TXA;reset accumulator
        SBC #10;subtract scanlines used
        JMP RETURN ;back to main


Thanks.  I know this is probably boring stuff, but I'm trying to learn it,
and there's a LOT to learn.

		-John K. Harvey

http://www.cae.wisc.edu/~harveyj

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

Current Thread