Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.
Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.
const
dl_sets:array[0..14] of byte = (
// first & secound line
hi(CHARSET1_ADDRESS), // set charset
$32, $3a, $34, $30, // sets colors
// 3th to 17th line
hi(CHARSET2_ADDRESS), // set charset
$1b, $16, $12, $14, // sets colors
// 18th to last line
hi(CHARSET3_ADDRESS), // set charset
$1b, $16, $12, $14 // sets colors
);
dl_count:byte = 0;
dl_sets_adr = word(@dl_sets);
procedure dli; assembler; interrupt;
asm {
pha
txa
pha
ldx dl_count
cpx #15
bne *+4
ldx #0
lda dl_sets_adr,x
sta atari.chbase
inx
lda dl_sets_adr,x
sta atari.colpf0
inx
lda dl_sets_adr,x
sta atari.colpf1
inx
lda dl_sets_adr,x
sta atari.colpf2
inx
lda dl_sets,x
sta atari.colpf3
inx
stx dl_count
pla
tax
pla
};
end;
dl_start
dta DL_BLANK8
dta dl_blank7 + dl_dli
dta DL_MODE_40x24T5 + DL_LMS, a(VIDEO_RAM_ADDRESS) ; first text line
dta dl_mode_40x24t5 ; 2
dta dl_blank1 + dl_dli
:16 dta dl_mode_40x24t5 ; 3 - 18
dta dl_blank1 + dl_dli
:8 dta dl_mode_40x24t5 ; 17-24
dta DL_BLANK7
dta DL_JVB, a(dl_start) ; jump to start
pha
txa
pha
lda dl_count
cmp #0
beq chg1
cmp #1
beq chg2
cmp #2
beq chg3
chg1 lda #>CHARSET1_ADDRESS
sta atari.chbase
lda #$32
sta atari.colpf0
lda #$3a
sta atari.colpf1
lda #34
sta atari.colpf2
lda #30
sta atari.colpf3
lda #1
sta dl_count
pla
tax
pla
rti
chg2 lda #>CHARSET2_ADDRESS
sta atari.chbase
lda #$1b
sta atari.colpf0
lda #$16
sta atari.colpf1
lda #12
sta atari.colpf2
lda #14
sta atari.colpf3
lda #2
sta dl_count
pla
tax
pla
rti
chg3 lda #>CHARSET3_ADDRESS
sta atari.chbase
lda #$1b
sta atari.colpf0
lda #$16
sta atari.colpf1
lda #12
sta atari.colpf2
lda #14
sta atari.colpf3
lda #0
sta dl_count
pla
tax
pla
rti
var
reg_a:byte absolute $80;
procedure dli_game1; assembler; interrupt;
asm {
sta wsync
sta reg_a
chg1 lda #>CHARSET1_ADDRESS
sta atari.chbase
lda #$32
sta atari.colpf0
lda #$3a
sta atari.colpf1
lda #$34
sta atari.colpf2
lda #$30
sta atari.colpf3
lda #<dli_game2
sta vdslst
lda #>dli_game2
sta vdslst+1
lda reg_a
};
end;
procedure dli_game2; assembler; interrupt;
asm {
sta wsync
sta reg_a
chg2 lda #>CHARSET2_ADDRESS
sta atari.chbase
lda #$1b
sta atari.colpf0
lda #$16
sta atari.colpf1
lda #$12
sta atari.colpf2
lda #$14
sta atari.colpf3
lda #<dli_game3
sta vdslst
lda #>dli_game3
sta vdslst+1
lda reg_a
};
end;
procedure dli_game3; assembler; interrupt;
asm {
sta wsync
sta reg_a
chg3 lda #>CHARSET3_ADDRESS
sta atari.chbase
lda #$1b
sta atari.colpf0
lda #$16
sta atari.colpf1
lda #$12
sta atari.colpf2
lda #$14
sta atari.colpf3
lda #<dli_game1
sta vdslst
lda #>dli_game1
sta vdslst+1
lda reg_a
};
end;
sta wsync
sta atari.chbase
lda #$aa
ldx #$bb
ldy #$cc
sta wsync
sta zzzz
stx xxxx
sty yyyy
dl_start
dta DL_BLANK8
dta dl_blank6 + dl_dli
dta dl_blank1
dta DL_MODE_40x24T5 + DL_LMS, a(VIDEO_RAM_ADDRESS) ; first text line
dta dl_mode_40x24t5 + dl_dli ; 2 + DLI
dta dl_blank1
:15 dta dl_mode_40x24t5 ; 3 - 17
dta dl_mode_40x24t5 + dl_dli ;18
dta dl_blank1
:8 dta dl_mode_40x24t5 ; 17-24
dta DL_BLANK7 ;to jest zbędne
dta DL_JVB, a(dl_start) ; jump to start
procedure dli_game3; assembler; interrupt;
asm {
sta reg_a
lda #<dli_game1
sta vdslst
lda #>dli_game1
sta vdslst+1
chg3 lda #>CHARSET3_ADDRESS
sta wsync
sta atari.chbase
lda #$1b
sta atari.colpf0
lda #$16
sta atari.colpf1
lda #$12
sta atari.colpf2
lda #$14
sta atari.colpf3
lda reg_a
};