10 hours ago, SlithyMatt said:
No, I just use direct manipulation of VRAM. The Kernal routines are limited, and not terribly useful unless you are doing something exactly like what they were written for,
That's what I thought - and thanks for that about the Kernal routines. THAT's what I was trying to find out.
Quote
and the VRAM interface is really just as simple to use.
There's a VRAM interface? OK I'll look at your tutorial.
See, I was going on the register documentation for VERA... and that is a jolly pain to work with, at least in BASIC. VPOKEs with unfriendly bit packing.
In C, at least I can encapsulate things into a library, and from there perhaps develop assembly language routines.
My BASIC code would resemble this:
POKE $9F29,($40 OR PEEK($9F29)) :REM ENABLE SPRITES
rem ship
s0 = $fc10
x = px + 164
y = py + 164
bk = 2
ls = int(rnd(1)*8) * 32
fl = 0
po = 0 :rem pallette offset
VPOKE $F, S0+0, %00000000+ls :REM LSB
VPOKE $F, S0+1, %10000000+bk :REM R...BBBB
VPOKE $F, S0+2, X AND 255 :REM X
VPOKE $F, S0+3, X / 256 :REM X MSB
VPOKE $F, S0+4, Y AND 255 :REM Y
VPOKE $F, S0+5, Y / 256 :REM Y MSB
VPOKE $F, S0+6, %00001100+FL :REM coll,ZZ,FLIP
VPOKE $F, S0+7, %10100000+PO :REM HHWW..PO