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.

2008-06-02 19:06
yago

Registered: May 2002
Posts: 333
A vertical split on $d011..

I doubt you can change graphic-mode from text to bitmap , but you will explore some nice and strange effects
2008-06-02 19:26
chatGPZ

Registered: Dec 2001
Posts: 11386
try some of the wonderland demos, the d011 split thing is in one of them (yes it does work if you do it right) :)
2008-06-02 19:27
Cybernator

Registered: Jun 2002
Posts: 154
Here goes a little experiment. Assemble with ACME and make sure you write something on the first charrow before running (so you can see the problem caused by lack of C-accesses). Be warned that it will take a lot more effort before you can display "proper" graphics/text.
            !to "hsplit.prg"
            *=$1000
            
a           = 2
x           = 3
y           = 4

            sei
            lda #$35
            sta $01
            lda #$7f
            sta $dc0d
            sta $dd0d
            lda $dc0d
            lda $dd0d
            lda #1
            sta $d01a
            lda #$1b
            sta $d011
            lda #$38
            sta $d012
            lda #$c8
            sta $d016
            lda #0
            sta $d015
            lda #<irq1
            ldx #>irq1
            sta $fffe
            stx $ffff
            lda $d019
            sta $d019
            cli
            inc $c000,x
            bne *-3
            beq *-5
            jmp *
            
irq1        sta a
            stx x
            sty y
            inc $d012
            lda #<irq2
            sta $fffe
            dec $d019
            cli
keep_noping:nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            nop
            jmp keep_noping
            
irq2        pla
            pla
            pla
            lda $d012
            ldx #6
            dex
            bne *-1
            bit $00
            cmp $d012
            beq *+2
            
            !for i, 192 {
                lda #$38 + (i&7)
                ldx #$18 + ((i+1)&7)
                
                nop
                nop
                nop
                nop
                nop
                nop
                nop
                nop
                nop
                nop
                bit $00
                sta $d011
                
                nop
                nop
                nop
                nop
                nop
                nop
                nop
                nop
                bit $00
                stx $d011
                
                nop
                nop
                nop
                bit $00
            }
            
            lda #<irq1
            sta $fffe
            lda #$38
            sta $d012
            lda #$1b
            sta $d011
            dec $d019
            lda a
            ldx x
            ldy y
            rti

2008-06-03 11:37
HCL

Registered: Feb 2003
Posts: 728
..so i say what most others seem to be trying say, only being hardly understandable.. :)

There is no easy trick to split the screen vertically between gfx and text. However, it may still be possible, depending more precisely on your interpretation of "gfx" and "text". Do you want multicolor bitmap gfx, or is it ok with 3 colors + background? Maybe we're talking gfx in hires!? And the text, is it ok with a 7 pixels high font? Does it have to be text on a char-screen, or can it be text on bitmap?

..need more info to solve the problem.
2008-06-03 11:41
chatGPZ

Registered: Dec 2001
Posts: 11386
i still recommend watching a few of the demos which demonstrate this :) in most of them you can also clearly see the problems connected to it (eg the fli-bug alike mess you almost certainly get somewhere across the screen)
2008-06-03 16:24
turtle
Account closed

Registered: Mar 2005
Posts: 44
After all, has seen many demos (from the old days) =), which raster lines divided up in many different colors from left to right.

These are split up, some ideas how it is done?
2008-06-03 16:58
HCL

Registered: Feb 2003
Posts: 728
Example plz. Name a demo.
2008-06-03 17:09
chatGPZ

Registered: Dec 2001
Posts: 11386
color splits are a lot easier to achive than text/gfx :) the stuff seen in really old demos (with say 4 or 5 splits) doesnt even need precise timing, since all you do is covering the screen with a multicolor pattern and do rasterbars in d02x. and the "40 splits" stuff is just...fli =)
2008-06-03 17:33
turtle
Account closed

Registered: Mar 2005
Posts: 44
Quote: Example plz. Name a demo.

Raster Crime

this one =) nice demo..

Someone who has example of such a routine to split the raster =)?
2008-06-03 17:37
turtle
Account closed

Registered: Mar 2005
Posts: 44
one more =)

Raster Machine
2008-06-03 17:42
Mantiz
Account closed

Registered: Apr 2006
Posts: 36
If all you want is to have regular gfx on one side of the screen and text on the other, the easiest way would probably be to simply have a picture which uses only half the screen and then plot the text into the blank side of the bitmap. It would not be hardcore coder pr0n but it will work and it will take no timing at all for the display routine, as there will be no display routine to worry about at all.
All you need is to understand how the bitmap works and is setup in order to be able to put the text wherever you want it. You probably need to setup screen and color ram for the text area as well.

In order to to a regular horizontal text scroller on one part of the screen and you want to use $d016 for softscroll, you need pretty precise timing to set $d016 accordingly between the moving part of the screen (the text) and then change $d016 back when the rasterbeam hits the picture part, and then do the same over and over for every line your chars are displayed. Also you need a routine to plot the letters on the screen from the charset, as you are working in bitmap mode.
2008-06-03 18:44
turtle
Account closed

Registered: Mar 2005
Posts: 44
what about, filling sprites on the side of the image of text.

should be the easiest way =)
2008-06-03 18:49
turtle
Account closed

Registered: Mar 2005
Posts: 44
what about, filling sprites with text, on the beside the image .


should be the easiest way =)
2008-06-03 18:50
turtle
Account closed

Registered: Mar 2005
Posts: 44
arg
2008-06-03 20:26
HCL

Registered: Feb 2003
Posts: 728
Using sprites is surely one way to go, but i still don't really get what you want to do. You talk about splitting between graphics and text, and then you show us some demos with raster splits. That's something completely different, really <:).
2008-06-03 20:50
Danzig

Registered: Jun 2002
Posts: 440
what about converting the gfx to 3col, leaving the first $0200 bytes free for a regular 1x1-charset and then showing it on screen... switch on mc in $d016 and use $d800&0x07 you get singlecolor for the charset. using some fine rasterroutine behind that for the mc-colors ($d022/23) gives you a pretty colorful logo... wisely used ;)

or take a look at crest light... vision moved the logo up and down, plotted huge balls on the screen and had even an upscroller in 1x2 size.. killer back then.
2008-06-03 20:54
turtle
Account closed

Registered: Mar 2005
Posts: 44
yes it is true =)

thought it was the same thing splitting text and graphics.
if there was a way similar like use D012 to splitt from top to bottom


understand there are 2 different things

any idea, how to splitt raster like in the demo's
2008-06-03 21:03
Hein

Registered: Apr 2004
Posts: 954
lda #color1
sta $d021
lda #color2
sta $d021
lda #color3
sta $d021

and so on till you fall of the earth.
2008-06-03 21:19
Graham
Account closed

Registered: Dec 2002
Posts: 990
Quote: A vertical split on $d011..

I doubt you can change graphic-mode from text to bitmap , but you will explore some nice and strange effects


Ice Cream Castle (part CHOCOLATE ICE splits text from MC bitmap)

Coma Light 8 (part 03 splits text from FLI)
2008-06-04 18:05
turtle
Account closed

Registered: Mar 2005
Posts: 44
thank you all

how do I find this acme assembler. ? =)
2008-06-04 18:24
Stainless Steel

Registered: Mar 2003
Posts: 966
Google is your friend.

http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/acme/

http://www.cbmhardware.de/c64/acme.php?Lang=E
2008-06-04 19:52
turtle
Account closed

Registered: Mar 2005
Posts: 44
Quote: Google is your friend.

http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/acme/

http://www.cbmhardware.de/c64/acme.php?Lang=E


this is only for win 32 not xp

sorry i am a litle bit lame =(

i am trying to learn.
2008-06-04 20:08
JackAsser

Registered: Jun 2002
Posts:
Quote: this is only for win 32 not xp

sorry i am a litle bit lame =(

i am trying to learn.


uhm... windows xp IS win32. If you're running xp 64-bit then it can run win32-binaries anyway.
2008-06-04 20:26
turtle
Account closed

Registered: Mar 2005
Posts: 44
how do i install it ? =)

just get a black screen , and so it disapear
2008-06-04 20:39
Cruzer

Registered: Dec 2001
Posts: 1048
Protip: Horizontal is like the horizon. Vertical is the other way.
2008-06-04 21:16
turtle
Account closed

Registered: Mar 2005
Posts: 44
Quote: Protip: Horizontal is like the horizon. Vertical is the other way.


thanks ..

must say I love your work ...

has to come with something new soon =)
2008-06-04 21:26
turtle
Account closed

Registered: Mar 2005
Posts: 44
Quote: ........
No problem, to split the screen vertically, through the use of $ d012

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

graphic

lda # $ 60
aa cmp $ d012
bne aa

text

........


How to split the screen vertically ?
How to split the screen vertically ?
How to split the screen vertically ?
How to split the screen vertically ?

=)
2008-06-04 21:39
Cybernator

Registered: Jun 2002
Posts: 154
> how do i install it ? =)

No need to install it, just type "ACME <name_of_source>" and you get a compiled prg file. Also, it works like a charm on 64-bit XP, so I see no reason why that would not be the case with 32-bit XP.
2008-06-05 05:48
turtle
Account closed

Registered: Mar 2005
Posts: 44
Quote: > how do i install it ? =)

No need to install it, just type "ACME <name_of_source>" and you get a compiled prg file. Also, it works like a charm on 64-bit XP, so I see no reason why that would not be the case with 32-bit XP.


eks =) ?

acme c:\pr...... hmm
2008-06-05 10:49
Cybernator

Registered: Jun 2002
Posts: 154
You might want to add ACME to your PATH (this is not absolutely necessary, but it will make life easier :)). Let's say you unpacked the assembler in C:\Acme. Right click on My Computer and select Properties. Go to the advanced tab and click Environment Variables. In the "System variables" listbox, select "Path" and click Edit. Now, in Variable value, at the end of the string (make sure you don't delete anything you might have here), add ";C:\Path" (excluding the quotes).

If you already have a DOS shell opened, close it and open it again (so the changes can take effect). Now go to the directory where you source code is. Once there (assuming the source code is named Exmaple.asm) type "acme example.asm", and that's it. The resulting filename is the one you give in the !to directive (in the source code).
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
Rub_0201
E$G/HF ⭐ 7
t0m3000/hf^boom!^ibx
stephan-a
fuzzybad
Guests online: 164
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 Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

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