[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 65816ASM - SHR question included.
yoshi@atlantis.CS.ORST.EDU (Yoshi Tagawa) writes:
>It seems that if I change a pallate-colour-entry right after checking
>the keyboard, the actual desired routine will activate, but the graphics
>updation doesn't update until the SECOND time you hit the key.
>(Note: This is ORCA, not Merlin. Blech. :)).
>((I'm sure this code isn't correct, but im not going to actually show my
> code here. HMPH! J/K!)).
The problem seems to be that you're reading the keyboard with the M
flag clear (ie. 16-bit accumulator/memory). You should be doing a SEP
#$20 before reading the keyboard and a REP #$20 after clearing the
keyboard strobe.
nuke this >KB lda >$E1C000
KB sep #$20
> bpl KB
> sta >$E1C010
rep #$20
> cmp #$C1 ; Check for "A" key.
> bne KB
> lda #$600
> sta >$E19E48 ; Turn Pal.2, colour #4 dark-red.
> lda #$F00
> sta >$E19E4A ; Turn pal.2, color #5 bright-red.
> jsr StopMusic ; Stop music.
> jmp KB
>OK, so, what happens is I have to hit "A" twice in a row before the
>actual PALLATE COLOUR changes. The music will stop the first time around,
>but then the result becomes when the music is on, the wrong colour is
>in the wrong place.
> Is this because of my Keyboard Buffer: Yes setting, or is
>it my code? I've been trying to figure out the deal for the last 45
>minutes, and i'm stuck. Dave Huang, where are you! :)
Hopefully that's the fix. If it's not, I'm kind of stumped unless I
see your real code.
--
Jerry Penner jpenne@ee.ualberta.ca or jjp@myrias.ab.ca