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 > vertical raster split
2015-01-09 16:15
xIII

Registered: Nov 2008
Posts: 210
vertical raster split

After a lot of trial and error, looking into other code and even more frustrating hours I finally think I understand how to do vertical rastersplits without flickering. Hooray hooray... but ... now I got this strange fenomena that in the middle of my rasterbars this 3 chars appear, on every line.

Anyone an idea what causes these characters to appear ?

this is a short extract of the code:
ldy #88
!loop: lda raster1,y // 4
sta $d020 // 4
lda raster2,y // 4
sta $d021 // 4
lda raster1,y // 4
sta $d021 // 4
lda raster2,y // 4
sta $d021 // 4
lda raster1,y // 4
sta $d021 // 4
lda raster2,y // 4
sta $d021 // 4
lda $d012 // 4
and #%00000111 // 2
sta $d011 // 4
dey // 2
bpl !loop- // 3
2015-01-09 16:24
iAN CooG

Registered: May 2002
Posts: 3194
what about a WORKING extract of the code? =)
2015-01-09 16:30
xIII

Registered: Nov 2008
Posts: 210
.pc = $0801 "Basic Upstart"
:BasicUpstart(start)

.pc = $0810 "intro"

// -------------------------------------------------------------- VARIABLES
.var rl1 = $32
.var rl2 = $32+8*12

// -------------------------------------------------------------- START
start:	ldx #0
		lda #$00
!l:		sta $d800,x
		sta $d900,x
		sta $da00,x
		sta $dae8,x
		inx
		bne !l-

		sei
		ldx #0
		stx $d020
		stx $d021
		inx
		stx $d01a
		stx $d019
		lda #$7f
		sta $dc0d
		and $d011
		sta $d011
		lda #<irq1
		sta $fffe
		lda #>irq1
		sta $ffff
		lda #$35
		sta $01
		lda #rl1
		sta $d012
		cli
!loop:	lda $dc01
		cmp #$ef
		bne !loop-
		lda #$37
		sta $01
		jsr $fce2

wait: 	rts

irq1:	sta $02
		stx $03
		sty $04
		lsr $d019

		ldx #6
		dex
		bne *-1
		
		ldy #88
!loop:	lda raster1,y		// 4
		sta $d020			// 4
		lda raster2,y		// 4
		sta $d021			// 4
		lda raster1,y		// 4
		sta $d021			// 4
		lda raster2,y		// 4
		sta $d021			// 4
		lda raster1,y		// 4
		sta $d021			// 4
		lda raster2,y		// 4
		sta $d021			// 4
		lda $d012			// 4
		and #%00000111			// 2
		sta $d011			// 4
		dey					// 2
		bpl !loop-			// 3

		lda #<irq2	sta $fffe
		lda #>irq2	sta $ffff	
		ldx #rl2	stx $d012


		lda $02
		ldx $03
		ldy $04
		rti
		
irq2:	sta $02
		sta $03
		sta $04
		lsr $d019

		ldx #5
		dex
		bne *-1
		
		lda #$1b	sta $d011
		lda #5		sta $d020
		lda #6		sta $d021
		lda #20		sta $d018
		lda #$c8	sta $d016
		
		jsr showtxt
		
		lda #<irq1	sta $fffe
		lda #>irq1	sta $ffff
		lda #rl1	sta $d012

		lda $02
		ldx $03
		ldy $04
		rti

.align $100
raster1:
		.byte 00,06,00,06,04,00,06,04,14,00,06,04,14,03,00,06
		.byte 04,14,03,01,03,14,04,06,00,03,14,04,06,00,14,04
		.byte 06,00,04,06,00,06,00,00,00,00,00,00,00,00,00,00
		.byte 00,06,00,06,04,00,06,04,14,00,06,04,14,03,00,06
		.byte 04,14,03,01,03,14,04,06,00,03,14,04,06,00,14,04
		.byte 06,00,04,06,00,06,00,00,00,00,00,00,00,00,00,00
		.byte 09,02,02,09,00,02,08,08,02,00,08,10,10,08,00,10
		.byte 07,07,10,00,07,01,01,07,00,10,07,07,10,00,08,10
		.byte 10,08,00,02,08,08,02,00,09,02,02,09,00,00,00,00
		.byte 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
		.byte 09,02,02,09,00,02,08,08,02,00,08,10,10,08,00,10
		.byte 07,07,10,00,07,01,01,07,00,10,07,07,10,00,08,10
		.byte 10,08,00,02,08,08,02,00,09,02,02,09,00,00,00,00
		.byte 00,09,00,09,02,00,09,02,08,00,09,02,08,07,00,09
		.byte 02,08,07,01,07,08,02,09,00,07,08,02,09,00,08,02
		.byte 09,00,02,09,00,09,00,00,00,00,00,00,00,00,00,00


raster2:
		.byte 00,09,00,09,02,00,09,02,08,00,09,02,08,07,00,09
		.byte 02,08,07,01,07,08,02,09,00,07,08,02,09,00,08,02
		.byte 09,00,02,09,00,09,00,00,00,00,00,00,00,00,00,00
		.byte 00,09,00,09,02,00,09,02,08,00,09,02,08,07,00,09
		.byte 02,08,07,01,07,08,02,09,00,07,08,02,09,00,08,02
		.byte 09,00,02,09,00,09,00,00,00,00,00,00,00,00,00,00
		.byte 00,06,00,06,04,00,06,04,14,00,06,04,14,03,00,06
		.byte 04,14,03,01,03,14,04,06,00,03,14,04,06,00,14,04
		.byte 06,00,04,06,00,06,00,00,00,00,00,00,00,00,00,00
		.byte 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
		.byte 00,09,00,09,02,00,09,02,08,00,09,02,08,07,00,09
		.byte 02,08,07,01,07,08,02,09,00,07,08,02,09,00,08,02
		.byte 09,00,02,09,00,09,00,00,00,00,00,00,00,00,00,00
		.byte 00,06,00,06,04,00,06,04,14,00,06,04,14,03,00,06
		.byte 04,14,03,01,03,14,04,06,00,03,14,04,06,00,14,04
		.byte 06,00,04,06,00,06,00,00,00,00,00,00,00,00,00,00	
		
showtxt:
		ldx #0
!loop:	lda txt,x
		sta $0400+17*40,x
		inx
		bne !loop-
		rts
		
txt:	.text "this is an example text, i hope it will be visible "
		.text "some more text to fill this part of the screen "
		.text "i can even add more text but it stops eventually "
		.text "it seems i have like 256 bytes of text available "
		.text "greets to you dear reader :) i still have some bytes to filllllllllllll"
2015-01-09 17:25
Chesoner

Registered: Apr 2013
Posts: 29
It has to do with $d011.

Change these lines :

.var rl1 = $32
.var rl2 = $32+8*12

in

.var rl1 = $38
.var rl2 = $38+8*12

The "chars" are then shifted to the right.
2015-01-09 17:49
xIII

Registered: Nov 2008
Posts: 210
@Chesoner: true, but they are still visible, so that's not a solution.

if I change $32 to $10 (or something else in the upper border) the chars are gone but also the splits are gone :p
2015-01-09 18:27
Mace

Registered: May 2002
Posts: 1799
Isn't this know as the FLI bug?
2015-01-09 18:34
Chesoner

Registered: Apr 2013
Posts: 29
If i put it on $36 then i see no bug in winvice, only rasters.
2015-01-09 20:58
xIII

Registered: Nov 2008
Posts: 210
@chesoner: true again :) thanx for checking !

But does anyone have a good explenation for the appearing chars ?
2015-01-09 21:21
Chesoner

Registered: Apr 2013
Posts: 29
Quote: @chesoner: true again :) thanx for checking !

But does anyone have a good explenation for the appearing chars ?


What Mace said.
2015-01-09 23:19
Pantaloon

Registered: Aug 2003
Posts: 124
and there is a bug in the code (will cause problems later on :))

irq2: sta $02
sta $03
sta $04
2015-01-10 13:22
Oswald

Registered: Apr 2002
Posts: 5094
with fld (tear open screen pushing it down) you can achieve more splits, but gfx is not possible. add 01 to d012 + and #07 ora #$10 + tweak horizontal timing until good.
 
... 2 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 - 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
Alakran_64
Durandal
Quetzal/Chrome
Guests online: 114
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 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.7)
4 Acidchild  (9.7)
5 Cash  (9.6)

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