_arr equ 128
DMACTL equ 559
color__Medium__green equ 192
pmg__base equ 54279
player__x equ 53248
player__scolor equ 704
player__bitmap equ pmg__memory+4*256
GRACTL equ 53277
SPRIOR equ 623
_21 equ 130
_22 equ 131
_23 equ 132
   org $2e0
   dta a($2000)
   org $2000
;### PMG.atl(24) pmg.initbase
   lda #>pmg__memory
   sta pmg__base
;### PMG.atl(25) DMACTL = playfield + dl + players + missiles + hires_sprites
   lda #62
   sta DMACTL
;### PMG.atl(26) GRACTL = players + missiles
   lda #3
   sta GRACTL
;### PMG.atl(27) SPRIOR = 1
   lda #1
   sta SPRIOR
;### PMG.atl(30) player(0).scolor = medium'green
   lda #color__Medium__green
   sta player__scolor-0
;### PMG.atl(31) player(0).x = 100
   lda #100
   sta player__x-0
;### PMG.atl(32) player(0).bitmap(50) = smiley
   lda #50
   sta _21
   lda #0
   sta _22
_lbl4:
   lda _22
   ;
   tax
   lda smiley-0,x
   sta _23
   ldy #0
   lda player__bitmap_lo,y
   sta _arr-0
   lda player__bitmap_hi,y
   sta _arr-0+1
   ldy _21
   lda _23
   sta (_arr),y
   inc _22
   lda _22
   cmp #14
   jeq _lbl5
   inc _21
   lda _21
   cmp #0
   jne _lbl4
_lbl5:
   jmp _lbl5
smiley:
;### PMG.atl(8) 	%00000000
   dta b(0)
;### PMG.atl(9) 	%00111100
   dta b(60)
;### PMG.atl(10) 	%01000010
   dta b(66)
;### PMG.atl(11) 	%10000001
   dta b(129)
;### PMG.atl(12) 	%10100101
   dta b(165)
;### PMG.atl(13) 	%10000001
   dta b(129)
;### PMG.atl(14) 	%10000001
   dta b(129)
;### PMG.atl(15) 	%10000001
   dta b(129)
;### PMG.atl(16) 	%10100101
   dta b(165)
;### PMG.atl(17) 	%10011001
   dta b(153)
;### PMG.atl(18) 	%10000001
   dta b(129)
;### PMG.atl(19) 	%01000010
   dta b(66)
;### PMG.atl(20) 	%00111100
   dta b(60)
;### PMG.atl(21) 	%00000000	 
   dta b(0)
pmg__memory_lo:  :8 dta l(pmg__memory + #*256)
pmg__memory_hi:  :8 dta h(pmg__memory + #*256)
player__bitmap_lo:  :4 dta l(player__bitmap + #*256)
player__bitmap_hi:  :4 dta h(player__bitmap + #*256)
   rts
   icl 'C:\nes\atalan\codebase\atalan\platform\atari\atari.asm'
   icl 'C:\nes\atalan\codebase\atalan\processor\m6502\m6502.asm'

   .align 2048
pmg__memory:
   .ds 8*256
