home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore 64 Scene Diskmags Assortment
/
Dump_2_1997-06-21_Raiders_of_the_Lost_Empire_Side_A.d64
/
init.ass
< prev
next >
Wrap
Text File
|
2023-02-26
|
10KB
|
603 lines
; sensei/arise/fraction/kreciki
; darek domaga\a
; kusocinskiego 2/3
; 64-920
; pi\a
; tel. (0-67) 13-69-45
;
; - loadery na zamowienie
;
;-------------------
;
; procedura wprowadzajaca loader
; do stacji. wywolywana tylko raz - na
; poczatku - potem mozna skasowac.
;
;-------------------
jmp fastinit ;
;-------------------
fastmw
.byte $78,$20,$91,$01,$49,$18
.byte $8d,$07,$1c,$49,$13,$85
.byte $10,$49,$79,$8d,$02,$18
.byte $20,$e9,$f5,$20,$68,$01
.byte $ee,$8d,$01,$c6,$10,$d0
.byte $f6,$4c,$03,$05,$a2,$00
.byte $8e,$00,$18,$ad,$00,$18
.byte $d0,$fb,$08,$ad,$00,$18
.byte $0a,$28,$4d,$00,$18,$0a
.byte $0a,$0a,$ea,$ea,$ea,$4d
.byte $00,$18,$0a,$ea,$ea,$ea
.byte $4d,$00,$18,$9d,$00,$05
.byte $e8,$d0,$dc,$a9,$08,$8d
.byte $00,$18,$60,$0f,$07,$0d
.byte $05,$0b,$03,$09,$01,$0e
.byte $06,$0c,$04,$0a,$02,$08
.byte $00
;-------------------
tab .byte $07,$87,$27,$a7,$47,$c7
.byte $67,$e7
.byte $17,$97,$37,$b7,$57,$d7
.byte $77,$f7
;-------------------
mw .byte $ff,32,$01,$46
.text "w-m"
.byte $ff
.byte $01,$46
.text "e-m"
;-------------------
open lda #8
jsr $ed0c
lda #$6f
jmp $edb9
;-------------------
proc lda mw,y
cmp #$ff
beq *+8
jsr $eddd
dey
bpl proc
errors rts
;-------------------
fastinit lda #4
sta $ab
lda #>fastmw
sta $ad
lda #<fastmw
sta $ac
x5 lda #0
sta $90
jsr open
asl $90
bcs errors
ldy #6
jsr proc
ldx #32
x4 lda ($ac),y
jsr $eddd
inc mw+3
bne *+5
inc mw+2
iny
dex
bne x4
jsr $edfe
clc
lda $ac
adc #32
sta $ac
bcc *+4
inc $ad
dec $ab
bne x5
;-------------------
jsr open
ldy #12
jsr proc
jsr $edfe
;-------------------
lda $dd00
and #3
sta x2+1
ora #%00100000
sta x6+1
sta $dd00
tax
dey
bne *-1
dex
bne *-4
lda #3
sta $90
x3 lda drive,y
bit $dd00
bvc *-3
pha
lsr a
lsr a
lsr a
lrPzz
tax
sec
sei
x1 lda $d012
sbc #50
bcc x2
and #7
beq x1
x2 lda #%00000011
sta $dd00
lda tab,x
sta $dd00
lsr a
lsr a
and #%11110111
sta $dd00
pla
and #%00001111
tax
lda tab,x
sta $dd00
lsr a
lsr a
and #%11110111
sta $dd00
x6 lda #%00100011
iny
nop
sta $dd00
cli
bne x3
inc x3+2
dec $90
bne x3
lda #>drive
sta x3+2
lda #$01
sta mw+2
lda #$46
sta mw+3
clc
rts
;-------------------
;-------------------
drive = *
*= $0500
.offs drive-*
;--------------------
;--------------------
irqok = $fd9e
silon = $f982
siloff = $f9e8
tabtrans = $0197
osiem = $0191
;--------------------
jmp irq
jmp start
;--------------------
odb
ldy #8
a1 lda $1800
cmp $1800
beq *-3
lda $1800
bmi quit
lsr a
ror $0a,x
dey
bne a1
inx
rts
;--------------------
quit pla
pla
jsr $e9a5
cli
rts
;--------------------
irq
lda $11
bne pomin
jsr read
lda $0402
jsr trans
lda $0403
jsr trans
bne pomin
;--------------------
next
lda #2
sta count+1
lda $0a
eor $11
beq pomin
jmp irqok
pomin jsr read
ldx $0401
ldy $0400
stx $19
sty $18
sty $0a
;--------------------
php
bne nie
dex
stx $10
lda #$c6
sta wrr
nie jsr bajty
plp
bne next
lda #2
sta $1800
tax
asl a
bit $1800
beq *-3
inx
bpl *-1
jmp irqok
;--------------------
read
lda #$ee
jsr $fe05
;--------------------
lda $16
eor $17
eor $18
eor $19
sta $1a
jsr $f934
a51 ldx #0
lda #8
eor $1c00
sta $1c00
bmi a51+2
and #%11110111
sta $1c00
jsr $f567
a21 bvc *
clv
lda $1c01
eor $24,x
bne a51
inx
cpx #8
bne a21
bit $1c00
bmi *-3
jsr $f567
;--------------------
konwert
bvc *
clv
lda $1c01
tax
lsr a
lsr a
lsr a
sta $02ff,y
bvc *
clv
lda $1c01
lsr a
sta $0300,y
txa
and #%00000111
sta $03ff,y
bvc *
clv
lda $1c01
tax
ror a
lsr a
lsr a
lsr a
sta $0400,y
bvc *
clv
lda $1c01
sta $0401,y
asl a
txa
rol a
sta $0301,y
bvc *
clv
lda $1c01
sta $0402,y
iny
iny
iny
iny
bne konwert
bvc *
clv
lda $1c01
sta $55
lsr a
lsr a
lsr a
sta $54
bvc *
clv
lda $1c01
sta $4e
asl a
rol $55
asl a
rol $55
;------------------
kon lda $0300,y
asl a
asl a
sta $52
lda $03ff,y
rol a
asl $52
rol a
tax
lda $f8c0,x
ldx $02ff,y
ora $f8a0,x
sta $03ff,y
lda $0300,y
and #%00011111
tax
lda $f8a0,x
ldx $0400,y
ora $f8c0,x
sta $0400,y
lda $0401,y
sta $56
lsr a
lsr a
and #%00011111
sta $52
lda $0301,y
and #%00011111
tax
lda $f8a0,x
ldx $52
ora $f8c0,x
sta $0401,y
lda $0402,y
sta $52
and #%00011111
sta $53
lda $56
asl $52
rol a
asl $52
rol a
asl $52
rol a
and #%00011111
tax
lda $f8a0,x
ldx $53
ora $f8c0,x
sta $0402,y
iny
iny
iny
iny
bne kon
lda $55
and #%00011111
tax
lda $f8c0,x
ldx $54
ora $f8a0,x
sta $04ff
lda $0a
sta $11
rts
;--------------------
start
tsx
stx stos+1
power sei
stos ldx #$66
txs
jsr siloff
jsr osiem
jsr flash
ldx #0
stx $11
stx $1800
jsr odb
jsr odb
jsr osiem
jsr silon
agien jsr init
cmp #2
bcs agien
lda $12
sta $16
lda $13
sta $17
lda $0a
sta $18
lda $0b
sta $19
;--------------------
fast lda #$e0
jsr glowica
lda $0a
bne fast
jmp power
;--------------------
init lda #4
sta count+1
lda #$85
sta wrr
lda #$60
sta ha
lda #1
sta $09
lda #$12
sta $08
lda #$b0
;--------------------
ldx #1
.byte $2c
glowica ldx #2
sta $0298
jsr $d580
cli
jsr $d5c6
sei
rts
;--------------------
bajty lda #$ea
sta ha
count lda $0404
trans tay
and #%00001111
tax
tya
lsr a
lsr a
lsr a
lsr a
tay
lda #0
sta $1800
lda tabtrans,x
ldx $1800
bne *-3
sta $1800
asl a
and #%00001010
sta $1800
lda tabtrans,y
sta $1800
asl a
and #%00001010
sta $1800
jsr osiem
ha rts
inc count+1
wrr sta $10
bne count
rts
;--------------------
flash
sta $07
sta $06
lda #$e6
sta p4
p1 ldx $06
lda $1c00
ora #8
sta $1c00
p2 ldy #1
tya
dey
bne *-1
;------------
bit $1800
bmi *+4
bne tu1
rts
;------------
tu1 inx
bne p2
lda $1c00
and #$f7
sta $1c00
ldx $06
p3 ldy #5
dey
bne *-1
;------------
lda #1
bit $1800
bmi *+4
bne tu2
rts
;------------
tu2 dex
bne p3
p4 inc $06
bne p1
lda p4
eor #$20
sta p4
lda $07
eor #$ff
sta $07
sta $06
bne p1
;--------------------
.byte $a0,$8c,$8f,$81,$84,$85
.byte $92,$a0,$82,$99,$a0,$93
.byte $85,$8e,$93,$85,$89,$a0
;--------------------