Skip to content

Instantly share code, notes, and snippets.

@fuzz6001
Created August 2, 2012 02:26
Show Gist options
  • Save fuzz6001/3232625 to your computer and use it in GitHub Desktop.
Save fuzz6001/3232625 to your computer and use it in GitHub Desktop.
put8 for PC-6601SR
;put8x8(left side)
; in hl *data
; de *vram ($1a00~$7fff)
; (0,0)-(255,203)
; x=0,2,4,...
put8l:
ld a,4
ld b,0
put8l_lp:
push de
ld c,8
ldir
pop de
inc d ;+$100
dec a
jr nz,put8l_lp
ret
;vram format
; y\x 0 1 2 3 4 5 6 7
; 0 +$000 +$001 +$004 +$005 +$008 +$009 +$00c +$00d
; 1 +$002 +$003 +$006 +$007 +$00a +$00b +$00e +$00f
; 2 +$100 +$101 +$104 +$105 +$108 +$109 +$10c +$10d
; 3 +$102 +$103 +$106 +$107 +$10a +$10b +$10e +$10f
; 4 +$200 +$201 +$204 +$205 +$208 +$209 +$20c +$20d
; 5 +$202 +$203 +$206 +$207 +$20a +$20b +$20e +$20f
; 6 +$300 +$301 +$304 +$305 +$308 +$309 +$30c +$30d
; 7 +$302 +$303 +$306 +$307 +$30a +$30b +$30e +$30f
;data format
;012389AB
;4567CDEF
;00002222
;11113333
;00000000
;FFFFFFFF
;01234567
;89ABCDEF
dw $3210,$7654,$BA98,$FEDC
dw $0000,$1111,$2222,$3333
dw $0000,$FFFF,$0000,$FFFF
dw $3210,$BA98,$7654,$FEDC
;put8x8(right side)
; in hl *data
; de *vram ($0000~$1a00)
; (256,0)-(319,203)
; x=0,2,4,...
; y=0,4,8,12,...
put8r:
ret
;vram format
; y\x 0 1 2 3 4 5 6 7
; 0 +$000 +$001 +$004 +$005 +$008 +$009 +$00c +$00d
; 1 +$002 +$003 +$006 +$007 +$00a +$00b +$00e +$00f
; 2 +$100 +$101 +$104 +$105 +$108 +$109 +$10c +$10d
; 3 +$102 +$103 +$106 +$107 +$10a +$10b +$10e +$10f
; 4 +$040 +$041 +$044 +$045 +$048 +$049 +$04c +$00d
; 5 +$042 +$043 +$046 +$047 +$04a +$04b +$04e +$00f
; 6 +$140 +$141 +$144 +$145 +$148 +$149 +$14c +$10d
; 7 +$142 +$143 +$146 +$147 +$14a +$14b +$14e +$10f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment