Hallol Leute! Brauche eure Hilfe
Habe endlich einen passenden Scroller gefunden, aber ich schaffe es nicht den mit meinem Intro zu kombinieren.
Könnt Ihr mir helfen.
Code
- smooth = $02
- screenloc = $0798
- sei
- lda #<message
- ldy #>message
- sta read+1
- sty read+2
- lda #<interrupt1
- ldx #>interrupt1
- ldy #$1b
- sta $314
- stx $315
- sty $d011
- lda #$7f
- sta $dc0d
- lda #$01
- sta $d01a
- cli
- hold jmp hold
- interrupt1 inc $d019
- lda #$00
- sta $d012
- lda smooth ;Scroll section
- sta $d016
- lda #<interrupt2
- ldx #>interrupt2
- sta $314
- stx $315
- jmp $ea7e
- interrupt2 inc $d019
- lda #$e0
- sta $d012
- lda #$08 ;No scroll section here
- sta $d016
- lda #<interrupt1
- ldx #>interrupt1
- sta $314
- stx $315
- jsr scroll
- jmp $ea7e
- scroll lda smooth
- sec
- sbc #$01 ; Scrollgeschwindigkeit
- and #$07
- sta smooth
- bcs endscroll
- ldx #$00
- wrapmessage lda screenloc+1,x
- sta screenloc,x
- inx
- cpx #$28
- bne wrapmessage
- read lda screenloc+$27
- cmp #$00
- bne nowrap
- lda #<message
- ldy #>message
- sta read+1
- sty read+2
- jmp read
- nowrap sta screenloc+$27
- inc read+1
- lda read+1
- cmp #$00
- bne endscroll
- inc read+2
- endscroll rts
- message !scr "hier kommt dann der text rein"
- !scr" "
- !byte 0
und hier mein Intro Code
Code
- !to "intro.prg", cbm
- *=$0800+64*4
- !bin"cds.spr"
- *=$3800-28
- !bin "FNT.P00"
- * = $1000 ;start=4096
- rand = $d020
- back = $d021
- font = $0286
- bsout = $ffd2
- getin = $ff4e
- scr = $0400
- spr = 53248 ; blocks 36-43
- sei
- lda #$7f
- sta $dc0d
- bit $dc0d
- lda #$72 ;oberste Rasterzeile
- sta $d012
- lda $d011
- and #$7f
- sta $d011
- lda #$81
- sta $d01a
- ldx #<irq
- ldy #>irq
- stx $0314
- sty $0315
- cli
- jsr sky
- frame rts
- irq dec $d019
- nop
- jsr frame
- jsr frame
- ldy #$00
- gc ldx #$08
- gc1 lda raster,y ;tabelle
- sta rand
- sta back
- iny
- dex
- beq gc
- lda frame
- jsr frame
- jsr frame
- jsr frame
- cpy #$31 :rasterzeilen
- bcc gc1
- lda #$00
- sta rand
- sta back
- jmp $ea31
- sky lda #$93 ; clear screen
- jsr $ffd2
- lda #$81
- sta $048f
- ldx #$00
- loop lda txt,x
- cmp #$ff
- beq ende
- sta $048f+25,x
- inx
- bne loop
- ende lda #$0b
- ldx #$00
- farbe sta $d800+120,x
- dex
- bne farbe
- lda $d018 ; font aktivieren
- and #$f0
- ora #14
- sta $d018
- ldx #$00
- showms lda message,x
- sta $0400,x
- inx
- cpx #$28
- bne showms
- colwash lda colour+$00
- sta colour+$28
- ldx #$00
- cycle lda colour+$01,x
- sta colour+$00,x
- lda colour,x
- sta $d800,x
- inx
- cpx #$28
- bne cycle
- lda #$01
- sta font
- jsr Kobolde ; drei an der Zahl
- rts
- message !scr " cybernetic datasystems presents"
- !scr " "
- colour !byte $09,$09,$02,$02,$08,$08,$0A,$0A,$0F,$0F,$07,$07,$01,$01,$01
- !byte $01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$07,$07
- !byte $0F,$0F,$0A,$0A,$08,$08,$02,$02,$09,$09,$00,$00,$00,$00,$00
- raster !byte $00,$00,$00,$00,$00,$00,$0b,$00,$0b,$0c,$00,$0b,$0c,$05,$00
- !byte $0b,$0c,$05,$03,$00,$0b,$0c,$05,$03,$0d,$00,$0b,$0c,$05,$03
- !byte $0d,$07,$00,$0b,$0c,$05,$03,$0d,$07,$01,$01,$07,$0d,$03,$05
- !byte $0c,$0b,$00,$00
- txt !byte $82,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$83
- !byte $84,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20
- !byte $20,$20,$20,$20,$20,$20,$20,$20,$20,$85,$63,$86,$20,$20,$20
- !byte $87,$88,$20,$89,$8a,$20,$8b,$8c,$20,$8d,$8e,$8f,$90,$91,$92
- !byte $93,$20,$20,$94,$64,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20
- !byte $20,$20,$20,$20,$95,$96,$97,$98,$99,$99,$9a,$9b,$9c,$9d,$9e
- !byte $9f,$a1,$a3,$a4,$a5,$8f,$a6,$a7,$a8,$a9,$aa,$ab,$ac,$9d,$ad
- !byte $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$ae,$af
- !byte $9d,$95,$b0,$20,$b1,$b2,$b3,$b4,$b5,$b6,$b7,$b8,$b9,$ba,$bb
- !byte $bc,$bd,$be,$bf,$c0,$c1,$c2,$c3,$c4,$c5,$c6,$20,$20,$20,$20
- !byte $20,$20,$20,$20,$20,$20,$20,$c7,$c8,$c5,$c9,$ca,$cb,$cc,$cd
- !byte $ce,$cf,$d0,$d1,$d2,$d3,$d4,$d5,$d6,$d7,$d8,$d9,$da,$db,$dc
- !byte $dd,$de,$df,$e1,$e2,$e3,$e4,$ff
- Kobolde lda #$ff ; alle ein
- sta spr+21
- sta spr+28
- lda #36 ; Blöcke zuweisen
- sta 2040 ; Block 36
- lda #37
- sta 2041 ; Block 37
- lda #38
- sta 2042 ; Block 38
- lda #5 ; und die Farbe dazu
- sta spr+37
- lda #$b
- sta spr+38
- lda #1
- sta spr+39 ; 53287
- sta spr+40
- sta spr+41
- lda #150 ; auf die X-Positionen mit euch
- sta spr+0
- lda #140+36
- sta spr+2
- lda #140+62
- sta spr+4
- lda #28 ; und die Y-Postion dazu
- sta spr+1
- sta spr+3
- sta spr+5
- ;rts
- ;----------------------------------------------------------------------------
- bit $d011 ; Wird der normale Screen angezeigt?
- bpl *-3
- bit $d011
- bmi *-3
- lda #$1b
- sta $d011
- bloop lda #$f9 ; For each frame, set screen-mode to 24 lines at
- cmp $d012 ; y-position $f9 - $fa..
- bne *-3
- lda $d011
- and #$f7
- sta $d011
- bit $d011 ; .. and below y-position $fc, set it back to 25 lines.
- bpl *-3
- ora #8
- sta $d011
- jmp bloop
- ;----------------------------------------------------------------------------
- hier soll dan den scroller hin
Es geht mir auch darum wie ich das HI/LO Byte auf den richtigen Adressen finden kann.
Habe ja erst mit dem coden unter asm begonnen, darum wäre ich euch wircklich dankbar für jede Hilfe.
Es macht auf jeden Fall riesig Spaß wie sich mein Prg entwickelt
Edit: Sorry für den ganzen Code aber so ist es für mich leichter :rotwerd: