; Enhance Wars ; using ATALAN programming language ;(c) 2010 patarik out GPRIOR@$026F:byte out SDMCTL@559:byte PORTB@$d301:byte cursor_x_pos:byte cursor_y_pos:byte const CURSOR_HEIGHT = 10 CURSOR_MIN_X = 48+16 ; these are valid for narrow mode a our cursor CURSOR_MIN_Y = 16-1 ;-1 leading zero in player CURSOR_MAX_X = 208-16-8 ;-8 = cursor width CURSOR_MAX_Y = 112-16-CURSOR_HEIGHT+1 ;+1 ending zero in player pmg_mem@$A000:array(0..1023) of byte const cursor_data:array(0..9) of byte = 0,195,129,4 times 0,129,195,0 fillpmg: proc= for i:0..1023 pmg_mem(i) = 0 for i:0..9 pmg_mem(512+i) = cursor_data(i) setpmg: proc= PMBASE= $A0 ;lo pmg_mem GRACTL=2 ; turn on players GPRIOR=1 player_x(0)=cursor_x_pos player_size(0)=0 ;double size player_color(0)=Red COLOR0(0)=Red SDMCTL = 32+1+8 ;enabled DMA + players + narrow field + double resolution of PMG fillpmg cursor_x_pos = CURSOR_MIN_X PORTB = PORTB bitor 2 setpmg