1c00 c314dc jp 0dc14h
1c03 c35adc jp 0dc5ah ;; os calls this on startup.
;; this is the command to run
defb &aa ;; command to autorun from basic
defb 'RUN"DISC',0
defb 'ST2',0
1c14 f3 di
1c15 c5 push bc
1c4c fb ei
1c4d c9 ret
1c4e ed79 out (c),a
1c50 0602 ld b,02h
1c57 ed49 out (c),c
1c59 c9 ret
;; called by OS on startup
1c5a cd96dc call 0dc96h ;; unlock plus features
1c77 110040 ld de,4000h ;; plus sprite ram
;; unpack pixels into sprite ram
1c7a 7e ld a,(hl) ;; read byte containing 2 pixels (one in upper nibble, other in lower nibble)
1c7b 0f rrca ;; transfer upper nibble into lower nibble
1c7c 0f rrca
1c83 03 inc bc
1c84 10f4 djnz 1c7ah ;; loop for more sprite pixels
1c86 1660 ld d,60h ;; plus sprite coordinates and magnification
1c88 0e0d ld c,0dh ;; (X,Y, magnification for 2 sprites)
1c8a edb0 ldir
1c8c 01a07f ld bc,7fa0h ;; page out plus registers
1c8f ed49 out (c),c
;; lock plus
1c91 0110bc ld bc,0bc10h
1c94 1803 jr 1c99h
1c96 0111bc ld bc,0bc11h
1c99 21a4dc ld hl,0dca4h ;; plus unlock sequence
1ca1 20f9 jr nz,1c9ch
1ca3 c9 ret
;; plus unlock sequence
1ca4
defb &ff,&00,&ff,&77,&b3,&51,&a8,&d4,&62,&39,&9c,&46,&2b,&15,&8a,&cd,&ee
1cb5:
defw &07
;; sprite pixels
1cbd defb &1
;; &1cbe-&1dbc is 0
defs 254
1dbd 04 inc b
1dbe 00 nop