[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Coding for IIgs 2 - working on screen memory
Ouch. Got wedged trying to pull this off, perhaps I'm interpreting the
hardware wrong. Looks like it's trying to write in bank 0 instead of bank
1. (I'm using the //e way to access bank 1, according to the docs I have,
rather than trying to go '816 and do it that way, as I don't yet
understand 65816 mode.)
The way I *wrote* the code, I meant it to leave ][+ space readable while
making //e space writable. (It doesn't seem to have done that.) Whether
I .org this high or low, it still gets wedged. (There's nothing
IIgs-dependent about the code beyond the C029 thing.)
I'm trying to create a memory environment conducive to plotting pixels in
320x200x16 mode. The palette approximates EGA.
-uso.
setty: lda $C029
ora #$80
sta $C029
bit $C005
ldy #32
@1: lda paltab-1, y
sta $9E00, y
sta $9E20, y
sta $9E40, y
sta $9E60, y
sta $9E80, y
sta $9EA0, y
sta $9EC0, y
sta $9EE0, y
sta $9F00, y
sta $9F20, y
sta $9F40, y
sta $9F60, y
sta $9F80, y
sta $9FA0, y
sta $9FC0, y
sta $9FE0, y
dey
bne @1
lda #$00
ldy #$C7
@2: sta $9D00, y
dey
bne @2
bit $C004
rts
paltab: .byte $00, $00, $0C, $00, $C0, $00, $CC, $00
.byte $00, $0C, $0C, $0C, $70, $0C, $CC, $0C
.byte $77, $07, $0F, $00, $F0, $00, $FF, $00
.byte $00, $0F, $0F, $0F, $F0, $0F, $FF, $0F