Odp: Silly Venture 2k13 - never give up. STay Atari !
Są tam fonty, dane ekranu, dane PMG, tablice kolorów i fontów dla poszczególnych linii no i oczywiście display list. To są dane, nie kod
Oto pierwszy lepszy przykład (znakomity Fred autorstwa Piesia). To tylko jeden z plików generowany przez G2F:
/***************************************/
/* Use MADS http://mads.atari8.info/ */
/* Mode: DLI (char mode) */
/***************************************/
icl "fred.h"
org $00
fcnt .ds 2
fadr .ds 2
fhlp .ds 2
cloc .ds 1
regA .ds 1
regX .ds 1
regY .ds 1
; --- BASIC switch OFF
org $2000\ mva #$ff portb\ rts\ ini $2000
; --- MAIN PROGRAM
org $2000
ant dta $C4,a(scr)
dta $04,$84,$84,$84,$84,$84,$84,$84,$04,$84,$84,$84,$04,$84,$84,$04
dta $04,$84,$84,$84,$84,$84,$84,$84,$04,$84,$84,$84,$04
dta $41,a(ant)
scr ins "fred.scr"
.ALIGN $0400
fnt ins "fred.fnt"
ift USESPRITES
.ALIGN $0800
pmg .ds $0300
SPRITES
eif
main
; --- init PMG
ift USESPRITES
mva >pmg pmbase ;missiles and players data address
mva #$03 pmcntl ;enable players and missiles
eif
lda:cmp:req $14 ;wait 1 frame
sei ;stop IRQ interrupts
mva #$00 nmien ;stop NMI interrupts
sta dmactl
mva #$fe portb ;switch off ROM to get 16k more ram
mwa #NMI $fffa ;new NMI handler
mva #$c0 nmien ;switch on NMI+DLI again
ift CHANGES ;if label CHANGES defined
_lp lda trig0 ; FIRE #0
beq stop
lda trig1 ; FIRE #1
beq stop
lda consol ; START
and #1
beq stop
lda skctl
and #$04
bne _lp ;wait to press any key; here you can put any own routine
els
null jmp DLI.dli1 ;CPU is busy here, so no more routines allowed
eif
stop mva #$00 pmcntl ;PMG disabled
tax
sta:rne hposp0,x+
mva #$ff portb ;ROM switch on
mva #$40 nmien ;only NMI interrupts, DLI disabled
cli ;IRQ enabled
rts ;return to ... DOS
; --- DLI PROGRAM
.local DLI
?old_dli = *
ift !CHANGES
dli1 lda trig0 ; FIRE #0
beq stop
lda trig1 ; FIRE #1
beq stop
lda consol ; START
and #1
beq stop
lda skctl
and #$04
beq stop
lda vcount
cmp #$02
bne dli1
:3 sta wsync
DLINEW dli13
eif
dli_start
dli13
sta regA
sta wsync ;line=8
sta wsync ;line=9
c9 lda #$14
sta wsync ;line=10
sta color0
sta wsync ;line=11
sta wsync ;line=12
sta wsync ;line=13
c10 lda #$C2
sta wsync ;line=14
sta color3
DLINEW dli14 1 0 0
dli14
sta regA
sta wsync ;line=24
sta wsync ;line=25
c11 lda #$16
sta wsync ;line=26
sta color0
DLINEW dli15 1 0 0
dli15
sta regA
sta wsync ;line=32
sta wsync ;line=33
sta wsync ;line=34
c12 lda #$24
sta wsync ;line=35
sta color1
DLINEW DLI.dli2 1 0 0
dli2
sta regA
lda >fnt+$400*$01
sta wsync ;line=40
sta chbase
sta wsync ;line=41
sta wsync ;line=42
c13 lda #$18
sta wsync ;line=43
sta color0
DLINEW dli16 1 0 0
dli16
sta regA
sta wsync ;line=48
sta wsync ;line=49
sta wsync ;line=50
c14 lda #$D2
sta wsync ;line=51
sta color3
DLINEW dli17 1 0 0
dli17
sta regA
sta wsync ;line=56
sta wsync ;line=57
c15 lda #$1A
sta wsync ;line=58
sta color0
DLINEW dli18 1 0 0
dli18
sta regA
sta wsync ;line=64
sta wsync ;line=65
sta wsync ;line=66
x7 lda #$83
sta wsync ;line=67
sta hposp0
DLINEW dli3 1 0 0
dli3
sta regA
lda >fnt+$400*$02
sta wsync ;line=72
sta chbase
DLINEW dli19 1 0 0
dli19
sta regA
x8 lda #$B2
sta wsync ;line=88
sta hposm3
sta wsync ;line=89
sta wsync ;line=90
sta wsync ;line=91
sta wsync ;line=92
x9 lda #$9C
sta wsync ;line=93
sta hposp2
sta colpm2
DLINEW dli4 1 0 0
dli4
sta regA
lda >fnt+$400*$03
sta wsync ;line=96
sta chbase
sta wsync ;line=97
x10 lda #$6B
sta wsync ;line=98
sta hposp0
sta wsync ;line=99
sta wsync ;line=100
x11 lda #$98
sta wsync ;line=101
sta hposp1
DLINEW dli20 1 0 0
dli20
sta regA
sta wsync ;line=104
sta wsync ;line=105
sta wsync ;line=106
sta wsync ;line=107
x12 lda #$98
sta wsync ;line=108
sta hposp2
DLINEW dli21 1 0 0
dli21
sta regA
sta wsync ;line=120
sta wsync ;line=121
c16 lda #$06
sta wsync ;line=122
sta colpm1
DLINEW dli5 1 0 0
dli5
sta regA
lda >fnt+$400*$04
sta wsync ;line=128
sta chbase
DLINEW dli6 1 0 0
dli6
sta regA
lda >fnt+$400*$05
sta wsync ;line=152
sta chbase
DLINEW dli22 1 0 0
dli22
sta regA
stx regX
sta wsync ;line=160
sta wsync ;line=161
sta wsync ;line=162
sta wsync ;line=163
x13 lda #$6F
c17 ldx #$1C
sta wsync ;line=164
sta hposp3
stx colpm3
DLINEW dli23 1 1 0
dli23
sta regA
stx regX
sty regY
sta wsync ;line=168
sta wsync ;line=169
sta wsync ;line=170
sta wsync ;line=171
sta wsync ;line=172
s5 lda #$01
x14 ldx #$9D
c18 ldy #$04
sta wsync ;line=173
sta sizep1
stx hposp1
sty colpm1
DLINEW dli7 1 1 1
dli7
sta regA
stx regX
sty regY
lda >fnt+$400*$06
s6 ldx #$01
x15 ldy #$B0
sta wsync ;line=176
sta chbase
stx sizep2
sty hposp2
x16 lda #$6C
sta hposp3
c19 lda #$06
sta colpm2
c20 lda #$1E
sta colpm3
DLINEW dli24 1 1 1
dli24
sta regA
stx regX
sta wsync ;line=184
sta wsync ;line=185
sta wsync ;line=186
c21 lda #$C0
sta wsync ;line=187
sta color3
x17 lda #$A8
c22 ldx #$06
sta wsync ;line=188
sta hposp0
stx colpm0
DLINEW dli25 1 1 0
dli25
sta regA
stx regX
sty regY
sta wsync ;line=192
sta wsync ;line=193
sta wsync ;line=194
sta wsync ;line=195
s7 lda #$00
x18 ldx #$BA
c23 ldy #$08
sta wsync ;line=196
sta sizep2
stx hposp2
sty colpm2
DLINEW dli8 1 1 1
dli8
sta regA
stx regX
sty regY
lda >fnt+$400*$07
sta wsync ;line=200
sta chbase
sta wsync ;line=201
sta wsync ;line=202
sta wsync ;line=203
sta wsync ;line=204
sta wsync ;line=205
c24 lda #$C2
sta wsync ;line=206
sta color3
sta wsync ;line=207
c25 lda #$1C
sta wsync ;line=208
sta color0
sta wsync ;line=209
s8 lda #$00
x19 ldx #$B3
c26 ldy #$0A
sta wsync ;line=210
sta sizep0
stx hposp0
sty colpm0
DLINEW dli26 1 1 1
dli26
sta regA
sta wsync ;line=216
sta wsync ;line=217
c27 lda #$1A
sta wsync ;line=218
sta color0
c28 lda #$C6
sta wsync ;line=219
sta color0
DLINEW dli9 1 0 0
dli9
sta regA
stx regX
lda >fnt+$400*$08
c29 ldx #$EC
sta wsync ;line=224
sta chbase
stx color1
DLINEW dli10 1 1 0
dli10
sta regA
lda >fnt+$400*$02
sta wsync ;line=232
sta chbase
lda regA
rti
.endl
; ---
CHANGES = 1
; ---
.proc NMI
bit nmist
bpl VBL
jmp DLI.dli_start
dliv equ *-2
VBL
sta regA
stx regX
sty regY
sta nmist ;reset NMI flag
mwa #ant dlptr ;ANTIC address program
mva #scr40 dmactl ;set new screen width
inc cloc ;little timer
; Initial values
lda >fnt+$400*$00
sta chbase
c0 lda #$00
sta colbak
c1 lda #$16
sta color0
c2 lda #$E6
sta color1
c3 lda #$10
sta color2
c4 lda #$C0
sta color3
lda #$04
sta gtictl
s0 lda #$01
sta sizep0
x0 lda #$7C
sta hposp0
c5 lda #$1E
sta colpm0
s1 lda #$03
sta sizem
x1 lda #$79
sta hposm0
s2 lda #$00
sta sizep2
x2 lda #$9F
sta hposp2
c6 lda #$0E
sta colpm2
s3 lda #$00
sta sizep3
x3 lda #$AA
sta hposp3
c7 lda #$A0
sta colpm3
s4 lda #$00
sta sizep1
x4 lda #$9D
sta hposp1
x5 lda #$B3
sta hposm3
c8 lda #$98
sta colpm1
x6 lda #$00
sta hposm1
sta hposm2
mwa #DLI.dli_start dliv ;set the first address of DLI interrupt
;this area is for yours routines
quit
lda regA
ldx regX
ldy regY
rti
.endp
; ---
run main
; ---
opt l-
.MACRO SPRITES
missiles
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 03 03 03 03 03
.he 03 03 03 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 80 00 80 00 00 40 80 00 80 40 00 00 80 00 80
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
player0
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 5D 6C 7C EC FC F0
.he F1 F1 B3 B3 3F 3F 1F 1F 9F BF FF C7 C7 CF CF 9F
.he 9F BF 38 78 70 66 EA DC DE FF FF 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 FC FC FC FE FE FE
.he FF FF FF FF FF FF FF EF EF CF C7 87 87 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 08 1C 3C 3E 7E 7E 7E FF FF FF FF FF
.he FF FF FF FF 7F 1F 0C 00 00 00 B8 7C FE 7F FF 7F
.he BF 4F A3 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
player1
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F8
.he FD FF FF FF FF E7 C7 CF CF CF DF FF FF FF FF FF
.he FF FF FF FF F7 E7 E3 C7 C3 C7 83 C7 EB F7 7F 7F
.he BF DF FF FF 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 08 1C 1C 3C 7E 7E FE FE FE FF FF
.he FF FF FF FF FF FF 7F 3F 8F 87 63 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
player2
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 10 38 78 78 78 7C FC FE
.he FE FF FF FF FF FF FF FE F0 F0 F0 00 38 7C 7E FE
.he FF FF FF FF FF FF FF FF FE 78 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
player3
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 28 55 BA EC 5A F5 FA 75 A8 54 AA 04 4A 25 10
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF
.he FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
.he FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.he 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
.ENDM
USESPRITES = 1
.MACRO DLINEW
mva <:1 NMI.dliv
ift [>?old_dli]<>[>:1]
mva >:1 NMI.dliv+1
eif
ift :2
lda regA
eif
ift :3
ldx regX
eif
ift :4
ldy regY
eif
rti
.def ?old_dli = *
.ENDM
Jak na brak kodu, to całkiem sporo go tu jest :P