Thanks for the help.
I tried almost the same code and added a check to see if the file was found and copied the first 24 bytes (palette data exported by convimg) to the palette ram area for the LCD but the colors aren't right.
As for the include file, ezstudio does support this, but I want to do as much as I can on-calc so I will be adding images with Design.
Here's my graphics code:
Code: call ClrScrnFull
call RunIndicOff
ld a,mb
push af
push iy
;load appvar
ld hl,appvarName
call Mov9ToOP1
call ChkFindSym
jr c,Fail ;if appvar not found jr fail
ld (AppvarPtr),de
;call GetCurrentMB
;Set screen to 8bpp
;%WUUVPBBRFMTBMMME
ld de,%0000100100100111
ld (mpLcdCtrl),de
;Palette setup
ld de,mpLcdPalette
;ld hl,Palette ;palette defs
ld hl,(AppvarPtr) ;palette from appvar
ld bc,12*2 ;size of palette
ldir ;load palette
ld a,0 ;color
call FillScrn
ld bc,26 ;skip palette and xy size
ld hl,(AppvarPtr)
add hl,bc
ld b,h
ld c,l
call SpriteTest
Finish:
pop iy
pop af
ld mb,a
call GetKey
call ClrScrnFull
;set back to 16bpp
;%WUUVPBBRFMTBMMME
ld de,%0000100100101101
ld (mpLcdCtrl),de
res 5,(iy+0) ;doneprgm,doneflags
ret
Fail:
ld hl,failString
call PutS
jr Finish
SpriteTest:
ld hl,AppvarPtr+258*2+24 ;skip palette
;and sprite xy
ld b,h
ld c,l
ld de,vRam
ld ixl,16 ;y lines
NextLine:
push de
ld bc,16;AppvarPtr+24 ;x bytes
ldir ;copy 1 line
pop de
push hl
ld hl,320 ;move down 1 line
add hl,de
ex de,hl
pop hl
dec ixl
jr nz,NextLine
ret
FillScrn:
ld hl,vRam
ld (hl),a ;load color
ld de,vRam+1
ld bc,320*240-1 ;(320*240)-1
ldir
ret
appvarName:
db $15
db "BUILDINE"
db $0
failString:
db "couldnt load. "
AppvarPtr:
dw 0
Unfortunately I don't have the yaml file I used but I was able to load the first 24 bytes as palette data into Design and the colors were right