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.
ldy #$ff
v_audctl equ *-1
lda trackn_audf+0
and byte
ldx trackn_audc+0
sta $d200
stx $d201
lda trackn_audf+1
and byte
ldx trackn_audc+1
sta $d200+2
stx $d201+2
lda trackn_audf+2
and byte
ldx trackn_audc+2
sta $d200+4
stx $d201+4
;* init part
lda #0
sta songLine
;* subroutines
msxOff
lda p_song
sec
sbc MODUL+8+6
php
IFT TRACKS>4
lsr @
EIF
lsr @
lsr @
sta songLine
plp
lda p_song+1
sbc MODUL+8+7
lsr @
IFT TRACKS>4
ror @
EIF
ror @
ror @
ora songLine
; sbc #0
sta songLine
lda #emptySongLine
ldx #<MODUL
ldy #>MODUL
jmp RASTERMUSICTRACKER
msxOn
lda songLine
ldx #<MODUL
ldy #>MODUL
jmp RASTERMUSICTRACKER
rmt_p2
IFT FEAT_PAUSE
lda v_speed
beq rmt_p3
EIF
FEAT_PAUSE equ 1
lda v_bspeed
ldy v_speed
beq waitkey2
ldx <TRACKS-1
lda #0
waitkey3
sta trackn_volume,x
dex
bpl waitkey3
waitkey2
sta v_speed
lda v_bspeed
ldy v_speed
beq waitkey2
ldx <TRACKS-1
lda #0
waitkey3
sta trackn_volume,x
dex
bpl waitkey3
waitkey2
sta v_speed
lda v_bspeed
ldx <TRACKS-1
ldy v_speed
beq waitkey2
waitkey3
lda trackn_volume,x
sta c_trackn_volume,x
lda #0
sta trackn_volume,x
dex
bpl waitkey3
waitkey2
sta v_speed
bmi loop
waitkey4
lda c_trackn_volume,x
sta trackn_volume,x
dex
bpl waitkey4
bmi loop
;*
c_trackn_volume equ * ; :TRACKS brk
fr0 equ $d4
cnt equ $e0 ;fr1
org $600
; opt h-
usr
ldy #idxOldVbl
pla
bne usr1
lda (fr0),y
beq retUsr
tax
dey
lda (fr0),y
tay
lda #7
jmp $e45c
retUsr
rts
usr1
cmp #4
bcs retUsr
sta cnt
lda $225
sta (fr0),y
dey
lda $224
sta (fr0),y
pla
ldy #idxJmpIniPlr
sta (fr0),y
ldy #idxJsrPlyPlr
sta (fr0),y
lda #idxVblank
adc fr0
tay
ldx fr0+1
bcc *+3
inx
lda #7
jsr $e45c
pla
dec cnt
beq retUsr
pla
tay
pla
tax
lda #0
dec cnt
beq *+4
pla
pla
jmp $ff00
idxJmpIniPlr equ *-1-usr
idxVblank equ *-usr
jsr $ff03
idxJsrPlyPlr equ *-1-usr
dta b($4c),a(0) ;jmp a
idxOldVbl equ *-1-usr
end
fr0 equ $d4
cnt equ 205
Arc equ 203
tis equ 205
x0tis equ 7
x1tis equ 18
org $600
; opt h-
usr
ldy #idxOldVbl
pla
bne usr1
lda (fr0),y
beq retUsr
tax
dey
lda (fr0),y
tay
lda #7
jsr $e45c
jmp $ff09
idxJmpSilPlr equ *-1-usr
popUsr
tax
pla
pla
dex
bne *-3
retUsr
rts
usr1
cmp #4
bcs popUsr
sta cnt
lda $225
sta (fr0),y
dey
lda $224
sta (fr0),y
pla
ldy #idxJsrIniPlr
sta (fr0),y
ldy #idxJsrPlyPlr
sta (fr0),y
ldy #idxJmpSilPlr
sta (fr0),y
lda #idxArc
adc fr0
sta Arc
lda fr0+1
adc #0
sta Arc+1
lda #idxVblank
adc fr0
tay
ldx fr0+1
bcc *+3
inx
lda $14
cmp $14
bcs *-2
lda #7
jsr $e45c
pla
dec cnt
beq retUsr
ldy #x0tis
usr_v3
lda (Arc),y
tax
lda tis,y
sta (Arc),y
stx tis,y
dey
bpl usr_v3
pla
tay
pla
tax
lda #0
dec cnt
beq *+4
pla
pla
jsr $ff00
idxJsrIniPlr equ *-1-usr
ldy #x0tis
usr_v4
lda (Arc),y
tax
lda tis,y
sta (Arc),y
stx tis,y
dey
bpl usr_v4
rts
idxVblank equ *-usr
ldy #x1tis
usr_v1
lda (Arc),y
tax
lda tis,y
sta (Arc),y
stx tis,y
dey
bpl usr_v1
jsr $ff03
idxJsrPlyPlr equ *-1-usr
ldy #x1tis
usr_v2
lda (Arc),y
tax
lda tis,y
sta (Arc),y
stx tis,y
dey
bpl usr_v2
dta b($4c),a(0) ;jmp a
idxOldVbl equ *-1-usr
idxArc equ *-usr
end
FOR I=1536 TO I+(16*11):B=PEEK(I):? CHR$(27);CHR$(B);
:NEXT I:FOR I=I TO I+20:? CHR$(0);:NEXT I
PLAYER equ nowyadresplayera ;bylo $3400
;* dalsze linie zostawiamy w spokoju, az do..
org 205 ;bylo 203
p_tis * ta linia wyglada tak jak w oryginale (podana dla orientacji
; przy okazji widac ze w poprzednim wpisie pomylilem nazwe tej zmiennej na p_tip)
;* i to wszystkie zmiany w rmtplayr.a65 (chyba ze o czyms zapomnialem ;))
IFT TRACKS>4
org PLAYER-$400+$40
ELS
org PLAYER-$400+$e0
EIF
0 GRAPHICS 0:? CHR$(125):X=2:Y=1:DIM PMV$(198)
1 FOR I=1536 TO I+197:B=PEEK(I):? CHR$(27);CHR$(B);:LOCATE X,Y,Z:
PMV$(I-1535)=CHR$(Z):X=X+1:IF X>39 THEN X=2:Y=Y+1
2 NEXT I:INPUT L
3 N=39-PEEK(82)-7:J=L
4 IF J>9 THEN N=N-1:J=J/10:GOTO 4
5 FOR I=1 TO 198:IF INT((I-1)/N)=(I-1)/N THEN ? :? L;" DATA ";:L=L+1
6 ? CHR$(27);PMV$(I,I);:NEXT I
7 DIM C$(198),H$(N):X=1
8 READ H$:C$(X,X+N-1)=H$:X=X+N:IF X+N<198 THEN 8
9 READ H$:C$(X,198)=H$(1,199-X)
10 FOR I=1 TO LEN(C$):POKE 1535+I,ASC(C$(I)):NEXT I
; czytamy zawartość PC!
; zakładamy, że obsługa BRK
; po zrobieniu czego jej tam trzeba
; wróci do nas
sei
brk
addr equ *
tsx
ldy $100,x
dex
lda $100,x
tax
cli
; XY zawiera adres addr
sty $cb
stx $cc
pha
pha
php
pha
txa
pha
tsx
inx
inx
inx
inx
lda $cb
sec
sbc #1
sta $100,x
dex
lda $cc
sbc #0
sta $100,x
pla
tax
pla
plp
rts
sei
brk
addr equ *
tsx
lda $00ff,x ;to MUSI być adresowanie Q a nie Z
ldy $0100,x
cli
sty $cb
sta $cc
pha
pha
ldy $cc
ldx $cb
bne *+3
dey
dex
txa
tsx
sta $0100,x
tya
sta $00ff,x ;adresowanie Q
rts
0 GOTO 32758:REM TRANS D->M
1 DIM D$(108):A=1536-1:M=1536+197
2 READ D$:FOR I=1 TO LEN(D$):POKE A+I,ASC(D$(I)):NEXT I:A=A+LEN(D$):IF A<M THEN 2
32758 REM TRANS M->D
32760 A=1536:L=10000
32761 M=1536+197:DIM H$(1):X=(40-PEEK(82))*3-13:IF A+X>M THEN X=M-A:IF X<0 THEN END
32762 ? L;" DATA ";:FOR N=0 TO X:H$=CHR$(PEEK(A+N)):? CHR$(27);H$;:NEXT N
32763 A=A+N:L=L+1:? :? "32759 A=";A;":L=";L;":G.32761":? "RUN";:FOR X=0 TO 5:? CHR$(28);:NEXT X