home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ArachnoPhobia 30
/
ArachnoPhobia_30_2003-11-01_Spiders-Crew_ROLE.d64
/
simpleintro1.seq
< prev
Wrap
Text File
|
2023-02-26
|
8KB
|
288 lines
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
;simpleintro.src
;
;a routine that displays art studio's
;multi-hires pictures (.mpic).
;
;and which scrolls a text, with playing
;music (at memory $1000..$2000).
;
;last modified on 14.10.2003
;coded by stirf/spiders-crew/role
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
;art studio pic present at $2000..$4711,
;load "beast city mpic" for example
;to get music in memory (warm-)reset the
;c64 while arachnophobia plays music.
;constances...
scrline = $18;!changed! (from $0c)
scrolltext = $4800 ;where text is at
kcol = $4338 ;colordata! koala=$4328
kscr = $3f40 ;screendata! (chars)
*= $4900;!changed! not to
;conflict with scroltxt
;init...
lda #$00 ;00 to $d011 via accu
sta $d011 ;to turn off screen
sta $d020 ;border: black ($00)
sta $d021 ;screen set black too
;!new here!
lda #$00 ;set accu to #$00
tax ;set x-reg to accu
tay ;set y-reg to accu
jsr $1000 ;do music-init
;routine usage...
;!new here!
jsr scrollinit ;initialisation
jsr getmpic ;get mpic-data 1st!
;!new here!
jsr newrastirq ;use the routine
jsr showpic ;view multi hires
;new code... (to make scroller readable)
ldx #$00 ;!new! x=0
schar ;!new! show scroller
lda #$20 ;!new!space/empty char
sta $0400+($28*23),x ;to screen
lda #$01 ;!new! white ($01)
sta $d800+($28*23),x ;to colmem
inx ;!new! x=x+1
cpx #$50 ;!new!2lines=$28*2=$50
bne schar;!new! wait for last
;line otherwise continue
;additional...
wait
lda $dc01;read keyboard direct
cmp #$7f ;run/stop check
bne wait ;if not try again
jmp $9000;back to assembler
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
showpic ;vic settings!
lda #$18 ;use $18 and $3b
sta $d016;to set c64-vic up to
sta $d018;view multi-coloured
lda #$3b ;high resolution
sta $d011;pictures
rts ;end of vic settings
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
getmpic ;get screen+colour data!
ldx #$00 ;start with x=0
gdat lda kcol,x ;first get colordata
sta $d800,x;place at colormem
lda kscr,x ;then get screendata
sta $0400,x;place on screen
inx ;x=x+1
cpx #<$07e8 ;check x=$e8 (lo)
beq lastpos ;if $e8 check hi
cpx #$00 ;check x=0
bne gdat ;not 0 is continue
inc gdat+2 ;incr #>kcol,x
inc gdat+5 ;incr #>$d800,x
inc gdat+8 ;incr #>kscr,x
inc gdat+11;incr #>0400,x
jmp gdat ;always continue
lastpos
lda gdat+11 ;check is #>$0400
cmp #>$07e8 ;has become #>$07xx
bne gdat ;if not continue
rts ;last line is reached
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
;irqscroller.seq (only the subroutines )
;
;newrastirq and the charscroller
;modified.
;"!new!" mark a modification!
;
;usable scroller effect with music.
;
;last modified on 8.6.2003
;coded by stirf/spiders-crew/role
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
scrollinit
jsr setvic38c;$c0 to $d016
jsr maketext ;convert text
jsr getstart ;set start
rts ;end scrollinit subroutine
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
setvic38c ;setup vic for scroll
lda #$c0 ;bit3=38col bit 2,1,0
sta $d016 ;=VICaddress 4 scroll
rts ;end setvic38c subroutine
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
maketext
ldx #$00 ;make x-register 0
ad1 lda text,x ;load original text
cmp #$40 ;compare original to
bcc ad2 ;$40 if beneath=>ok!
cmp #$80 ;compare original to
bcs ad2 ;$80 ($40..$80!!) if
sec ;so subtract $40.
sbc #$40 ;$41 will become $01
ad2 sta scrolltext,x ;overwrite old
beq done ;@($00)-sign is wrap
inx ;next char
bne ad1 ;continue conversion
inc ad1+2 ;if x=$ff=>$00 then
inc ad2+2 ;increase hi-bytes
jmp ad1 ;of addies, continue
done rts ;end maketext subroutine
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
getstart
lda #$00 ;set counter
sta counter+1 ;to 0
lda #<scrolltext ;set lobyte of
sta textaddy+1 ;address text-
lda #>scrolltext ;addy and hi-
sta textaddy+2 ;byte to begin
rts ;end subrout.
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
scroller ;actual scroller
tab ldx #$00 ;start with 1st tab-
lda tab+1 ;position (=pos.)
clc ;add speed to tabpos.
adc #$02 ;speed=>1,2,4 or 8
sta tab+1 ;try it!
cpx #$08 ;if tab-pos.8 isnt
bcc nextbits ;reached continue
ldx #$00 ;start over table
stx tab+1 ;by setting tab to 0
jsr pulltext ;moves text and
jsr putnewchar ;adds new char
jmp tab ;do scroller-routine
nextbits
lda scrolltab,x ;set scrollpos.
sta scrollreg ;!new!/was $d016
rts ;end scroller routine
scrolltab
.byte $c7,$c6,$c5,$c4 ;scroll-
.byte $c3,$c2,$c1,$c0 ;values
scrollreg ;!new!
.byte 0 ;!new!
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
putnewchar
counter ldx #$00 ;ldx counter
textaddy lda scrolltext,x ;get next char
bne noend ;if not $00
jsr getstart ;start over
jmp putnewchar ;continue
noend
sta $0400+($28*scrline)+$27
inc counter+1 ;^put new char
lda counter+1 ;next char, if
bne nohi ;$ff=>$00 incr.
inc textaddy+2 ;high byte
nohi rts ;end putnewchar subroutine
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
pulltext
ldx #$00 ;start left
pullnext
lda $0400+($28*scrline)+1,x
sta $0400+($28*scrline),x
inx ;move x=1 to x=0,x=2 to x=1
cpx #$27 ;untill x=$27 to x=$26
bne pullnext
rts ;end pulltext subroutine
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
text .text "this is a simple intro!"
.byte 0 ;!changed!text ended
;with $00
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
newrastirq
lda irqrast+1 ;wait for
clc ;a good
adc #$80 ;moment to
cmp $d012 ;start the
bne *-3 ;raster-interrupt
sei ;block interrupt first
lda #$35 ;set c64 to all=ram
sta $01 ;except $d000-$e000
lda #$7f
sta $dc0d
lda $dc0d ;set i/o to irq
lda #$01
sta $d019 ;initialise the
sta $d01a ;new interrupt
lda #<newirq ;give in the
sta $fffe ;location of
lda #>newirq ;the new interrupt
sta $ffff ;to $fffe & $ffff
lda $d011 ;reset hi-byte
and #$7f ;of the intterupt-
sta $d011 ;irq=$00xx not $01xx
irqrast lda #$28 ;raster takes place
sta $d012 ;on raster $0028
cli ;allow the new interrupt.
rts ;end this routine
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
newirq
pha ;push a,x,y to stack
txa ;
pha ;
tya ;
pha ;
inc $d019 ;allow next interrupt
jsr showpic ;!new here!
jsr $1003 ;do music-play
jsr scroller;!moved!do scroller
lda #$ea ;!changed!wait for
cmp $d012 ;raster $ea.
bne *-3 ;$d012=actual raster
ldx #$09 ;!moved!/!changed!
dex ;switch exactly right
bne *-1 ;not in the middle
lda #$17 ;!new! normal
sta $d018;!new! rom-char
lda #$1b ;!new! normal
sta $d011 ;!new! vic display
lda scrollreg ;!moved!
sta $d016;!moved! vic status
lda $dc01 ;read run/stop
cmp #$7f ;if pressed
beq runstop ;jump to "runstop"
pla ;pull a,x,y from stack
tay ;
pla ;
tax ;
pla ;
rti ;end this interrupt
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}
runstop
jmp $9000 ;jump to assembler
;{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}{SHIFT-*}