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 > Moving koala to different address (n00b)
2015-02-19 14:35
awsm

Registered: Feb 2015
Posts: 13
Moving koala to different address (n00b)

I'm having a hard time understanding why this doesn't work for me:

The code below loads a koala file to $2000. All fine.
But in combination with music (starting at $1000) I get the music messed up. I figured that the pic overwrites parts of the music (>4096 bytes). Any other starting address than $2000 fails however, showing just garbage (updated $d018 too, but it didn't do the trick).

PICTURE 		= $2000
VIDEO 			= PICTURE+$1f40 
COLOR 			= PICTURE+$2328 
BACKGROUND 		= PICTURE+$2710 

* = PICTURE
!binary "resources/mypic.kla",,2 

* = $c000

init_koala	 
			
			sei
			lda #$00 
			sta $d020 ; Border Color 
			lda BACKGROUND 
			sta $d021 ; Screen Color 

			; Transfer Video and Color 
			ldx #$00 

			; Transfers video data 
vloop	       	lda VIDEO,x 
			sta $0400,x 
			lda VIDEO+$100,x 
			sta $0500,x 
			lda VIDEO+$200,x 
			sta $0600,x 
			lda VIDEO+$2e8,x 
			sta $06e8,x 
			; Transfers color data 
			lda COLOR,x 
			sta $d800,x 
			lda COLOR+$100,x 
			sta $d900,x 
			lda COLOR+$200,x 
			sta $da00,x 
			lda COLOR+$2e8,x 
			sta $dae8,x 
			inx 
			bne vloop 
			; 
			; Bitmap Mode On 
			; 
			lda #$3b 
			sta $d011 
			; 
			; MultiColor On 
			; 
			lda #$d8 
			sta $d016 

			; When bitmap adress is $2000
			; Screen at $0400 
			; Value of $d018 is $18
			lda #$18
			sta $d018 

          	        jmp *
 
... 20 posts hidden. Click here to view all posts....
 
2015-02-20 21:08
awsm

Registered: Feb 2015
Posts: 13
Got it Ejner, thank you for the heads up!
Previous - 1 | 2 | 3 - 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
Dr. Doom/RAD
theK/ATL
Acidchild/Padua
Guests online: 88
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 Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

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