Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > How to split the screen horizontally ?
2008-06-01 11:53
turtle
Account closed

Registered: Mar 2005
Posts: 44
How to split the screen horizontally ?

........
No problem, to split the screen vertically, through the use of $ d012

..................

graphic

lda # $ 60
aa cmp $ d012
bne aa

text

........
2008-06-01 12:14
chatGPZ

Registered: Dec 2001
Posts: 11386
it works exactly the same, except you need cycle exact timing. (that said, it doesnt really work terribly well with $d011 ... try $d021 first to get the idea, and to get the timing right).
2008-06-01 14:09
turtle
Account closed

Registered: Mar 2005
Posts: 44
someone who has a small example?
2008-06-01 21:20
Cybernator

Registered: Jun 2002
Posts: 154
1000   78         SEI
1001   A9 00      LDA #$00
1003   8D 11 D0   STA $D011
1006   A9 06      LDA #$06
1008   A2 04      LDX #$04
100a   8D 20 D0   STA $D020
100d   A0 05      LDY #$05
100f   88         DEY
1010   D0 FD      BNE $100F
1012   EA         NOP
1013   8E 20 D0   STX $D020
1016   A0 04      LDY #$04
1018   88         DEY
1019   D0 FD      BNE $1018
101b   24 00      BIT $00
101d   4C 0A 10   JMP $100A

This one simply switches the border color. (Try hitting RESTORE repeatedly. :)) Making a graphics/text split gets more involved. Since you can't make a split in a middle of a badline, you'll have to abort (yes, begin then abort) the badlines. Also, the modes won't work the way you probably expect since the VIC won't do any C-accesses.
2008-06-01 22:47
null
Account closed

Registered: Jun 2006
Posts: 645
uhm. wouldn't a horizontal be much easier than vertical?
becauase, afaik:

left to right == horizontal

top to bottom == vertical.


...or I just misunderstand the question..

------------------------------------
http://zomgwtfbbq.info
2008-06-01 23:41
Trooper

Registered: Sep 2002
Posts: 39
                SEI
nope1           lda $d012 ;these lines check
raster1         cmp #$80  ;the raster and wait
                bne nope1 ;until it reaches the point
                LDA #$01
                STA $D020
nope2           lda $d012 ;these lines check
raster2         cmp #$90  ;the raster and wait
                bne nope2 ;until it reaches the point
                lda #$02
                sta $d020
                ldx #$50
slowdown        dex
                bpl slowdown
                inc raster1+1
                inc raster2+1
                JMP nope1
2008-06-02 12:19
Mace

Registered: May 2002
Posts: 1799
Quote: uhm. wouldn't a horizontal be much easier than vertical?
becauase, afaik:

left to right == horizontal

top to bottom == vertical.


...or I just misunderstand the question..

------------------------------------
http://zomgwtfbbq.info


Yeah, left to right == horizontal, but if you want left and right to be different (i.e. split), it's vertical ;-)
2008-06-02 14:07
iAN CooG

Registered: May 2002
Posts: 3197
        *=$0801
        word eop
        word 7102
        byte $9e,[startprg]d,0
eop
        word 0
startprg
        sei
        lda #$35
        sta $01

        lda #$7f
        sta $dc0d
        lda $dc0d
        lda #<irq
        sta $fffe
        lda #>irq
        sta $ffff
        lda #<nmi
        sta $fffa
        lda #>nmi
        sta $fffb
        lda #$18
        sta $d012
        lda #$0b
        sta $d011
        lda #01
        sta $d01a
        sta $d019
        cli
        jmp *


irq
        inc $d019
        sta sa+1
        stx sx+1
        sty sy+1

        nop
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        lda #$00
        sta $ff
startpiece
        lda #$05
        ldx #$01
        ldy #$02
        sta $d020
        bit $24
        bit $24
        bit $24
        stx $d020
        bit $24
        bit $24
        bit $24
        bit $24
        sty $d020
        bit $24
        bit $24
        nop
        lda #$00
        sta $d020
        nop
endpiece
        dec $ff
        bne startpiece
        nop

sa      lda #00
sx      ldx #00
sy      ldy #00
nmi     rti
2008-06-02 17:44
turtle
Account closed

Registered: Mar 2005
Posts: 44
Quote:
        *=$0801
        word eop
        word 7102
        byte $9e,[startprg]d,0
eop
        word 0
startprg
        sei
        lda #$35
        sta $01

        lda #$7f
        sta $dc0d
        lda $dc0d
        lda #<irq
        sta $fffe
        lda #>irq
        sta $ffff
        lda #<nmi
        sta $fffa
        lda #>nmi
        sta $fffb
        lda #$18
        sta $d012
        lda #$0b
        sta $d011
        lda #01
        sta $d01a
        sta $d019
        cli
        jmp *


irq
        inc $d019
        sta sa+1
        stx sx+1
        sty sy+1

        nop
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        bit $24
        lda #$00
        sta $ff
startpiece
        lda #$05
        ldx #$01
        ldy #$02
        sta $d020
        bit $24
        bit $24
        bit $24
        stx $d020
        bit $24
        bit $24
        bit $24
        bit $24
        sty $d020
        bit $24
        bit $24
        nop
        lda #$00
        sta $d020
        nop
endpiece
        dec $ff
        bne startpiece
        nop

sa      lda #00
sx      ldx #00
sy      ldy #00
nmi     rti


word eop
word 7102
byte $9e,[startprg]d,0

word 0

dont work to type in assembler ?

this rutine make raster that is cros on the screen.?

i want to have text on the left and gfx on the right =)
2008-06-02 18:41
Frantic

Registered: Mar 2003
Posts: 1648
Oh... so you want to do a vertical split. ;)
2008-06-02 19:04
Stainless Steel

Registered: Mar 2003
Posts: 966
For ACME compatible xcompilers, try this :

*=$5000

sei
lda #$35
sta $01

lda #$7f
sta $dc0d
lda $dc0d
lda #<irq
sta $fffe
lda #>irq
sta $ffff
lda #<nmi
sta $fffa
lda #>nmi
sta $fffb
lda #$18
sta $d012
lda #$0b
sta $d011
lda #01
sta $d01a
sta $d019
cli
jmp *


irq
inc $d019
sta sa+1
stx sx+1
sty sy+1

nop
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
bit $24
lda #$00
sta $ff
startpiece
lda #$00
ldx #$02
ldy #$07
sta $d020
bit $24
bit $24
bit $24
stx $d020
bit $24
bit $24
bit $24
bit $24
sty $d020
bit $24
bit $24
nop
lda #$01
sta $d020
nop
endpiece
dec $ff
bne startpiece
nop

sa lda #00
sx ldx #00
sy ldy #00
nmi rti

just jump to $5000 once the file is loaded.

 
... 30 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 | 4 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
BYB/Hokuto Force
Mike
iAN CooG/HVSC
Guests online: 309
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Stinsen  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.088 sec.