Atari PMG

9 views
Skip to first unread message

rudla

unread,
Jan 3, 2011, 1:07:15 PM1/3/11
to Atalan Programming Langugage
Hi,

This post is to inform you on current development of Atalan.

In latest version of Atalan, there are new features (custom scopes aka
namespaces, slices, arrays of arrays) that provide for kind of nice
interface for PMG on Atari.
Currently I'm in process of defining all the registers etc, but here
is the simplest program to show a sprite on the screen:

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
const smiley:array =
%00000000
%00111100
%01000010
%10000001
%10100101
%10000001
%10000001
%10000001
%10100101
%10011001
%10000001
%01000010
%00111100
%00000000

;Initialize PMG, screen and DMA

set'pmbase player.memory
DMACTL = playfield + dl + players + missiles + hires_sprites
GRACTL = players + missiles

;Define sprite position, color and shape
player(0).scolor = Medium'green
player(0).x = 100
player(0).bitmap(50) = smiley
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

This is how current section defining the PMG looks like:

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;Player-missile graphics
pmg:scope

type pmg'bitmap@2048:array(0..7) of array(0..255) of byte

type pmx'type:byte

player:scope

out player.x@$d000:array(3) of pmx'type
out player.gfx@$d00d:array(3) of byte
out player.scolor@704:array(3) of color ;we must define scolor
before color, otherwise if would use player.color as array type
out player.color@$d012:array(3) of color
out player.size@$d008:array(3) of byte
out player.memory:pmg'bitmap
out player.PMBASE@$D407:byte ;top byte of player missile bitmaps
player...@player.memory(4..7)

missile:scope

out missile.x@$d004:array(0..3) of pmx'type
out gfx@$d001:byte
missile...@player.memory(3) ;missile bitmap is stored in this
location

set'pmbase:macro x:pmg'bitmap =
player.pmbase = hi x

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Reply all
Reply to author
Forward
0 new messages