[Coco] ASM Coders - please help!
David Roper
dave at ebonhost.com
Mon Aug 28 22:36:47 EDT 2006
Hi there,
I've been trying to figure out how to perform a "simple" task or two
using 6809 on a 512k Coco3 - I want to avoid making bios calls if
possible, simply because later down the track I'll need every ounce of
speed I can get out of this thing (and specific-code is always faster
than generalised code)
I'm trying to
a) Set the equivalent of HSCREEN 2
and
b) Clear (some of) the graphics screen - in the example below, 8K's
worth (so I can visually see what's been done)
Eventually I'd like to plot a pixel, but that's an extension of b)
This is the code I've got so far (in Rainbow IDE format) cobbled
together from various sources (coco3.com forum, coco3 secrets revealed, etc)
org $0300
START lda #%01001100 Coco3, MMU on, DRAM constant, standard SCS 16K
internal 16K external ROM
sta $FF90
lda #%10000000 graphics
sta $FF98
lda #%00111110 200 lines of 320H by 16 colors
sta $FF99
clr $FF9C clear vertical scroll
ldd #$C000 screen start divided by 8
std $FF9D vertical offset
clr $FF9F clear horizontal scroll
orcc #$50
lda #$30 first block of graphics screen at $60000
sta $FFA1 mapped to $2000
andcc #$AF
CLRSCRN ldy HSCLEN
ldx HRESSCRN
CLRLOOP clr ,X+
leay -1,Y
bne CLRLOOP
ENDLOOP jmp ENDLOOP
HRESSCRN equ $2000
HSCLEN equ $2000
end START
So!
What I end up seeing (in MESS, at least) is a screen of alternating
vertical black and green lines.. and not much else
I'm missing something, or messed something up, or generally on the wrong
track *somewhere*, and I'm sure someone out there will have much more
luck explaing where, and why I've gone wrong!
Any takers to place me under their wing?
Kind regards,
David
More information about the Coco
mailing list