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 > Show Koala Pic
2014-11-09 19:57
Ejner

Registered: Oct 2012
Posts: 43
Show Koala Pic

I'm sure noone here has any problems with showing a simple Koala picture, but I came across this piece of code on codebase64.org and wondered why this had to be done so complicated...?

http://codebase64.org/doku.php?id=base:calculate_vic_settings_f..

In TurboAssembler it's pretty simple to calculate the VIC settings, see my example below. Isn't something similar possible with KickAssembler? Just wondering...

Example in TurboAssembler:

;---------------------------------------
;        Show Koala
;---------------------------------------
koala    = $6000
screen   = $5c00
;---------------------------------------
bank     = koala/$4000

         *= $1000

         lda #$3b
         sta $d011
         lda #koala-($4000*bank)/1024
         ora #(screen-($4000*bank))/64
         sta $d018
         lda #$d8
         sta $d016
         lda $dd02
         ora #%00000011
         sta $dd02
         lda $dd00
         and #%11111100
         ora #3-bank
         sta $dd00

         ldx #0
copy     lda koala+$1f40,x
         sta screen,x
         lda koala+$2040,x
         sta screen+$0100,x
         lda koala+$2140,x
         sta screen+$0200,x
         lda koala+$2228,x
         sta screen+$02e8,x
         lda koala+$2328,x
         sta $d800,x
         lda koala+$2428,x
         sta $d900,x
         lda koala+$2528,x
         sta $da00,x
         lda koala+$2610,x
         sta $dae8,x
         inx
         bne copy
         lda koala+$2710
         sta $d021
         lsr a
         lsr a
         lsr a
         lsr a
         sta $d020

         lda #0
         cmp $0277     ;wait for key
         bne *-3

         lda $dd02
         ora #%00000011
         sta $dd02
         lda $dd00
         and #%11111100
         ora #%00000011
         sta $dd00
         lda #$1b
         sta $d011
         lda #$15
         sta $d018
         lda #$c8
         sta $d016

         jmp $9000
;---------------------------------------

Note: The result of "bank = koala/$4000" is an integer.
 
... 32 posts hidden. Click here to view all posts....
 
2015-09-21 20:04
Oswald

Registered: Apr 2002
Posts: 5017
keep it on topic, here I show Koala Pic

2015-09-21 22:57
Smasher

Registered: Feb 2003
Posts: 512
my routine uses all vic banks and displays 4 koalas...

2015-09-22 00:28
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
This is the koala setup i used since 1985.
coded by kaze. he used the book.
TST Ripp #6
2015-09-22 05:46
ChristopherJam

Registered: Aug 2004
Posts: 1378
So much cultural appropriation in this thread D''':

Oswald and ZeSmasher better keep their eyes peeled for Dropbears, that's all I can say.

2015-09-22 10:49
chatGPZ

Registered: Dec 2001
Posts: 11108
Koala Interlace, bitch!
2015-09-22 11:01
Oswald

Registered: Apr 2002
Posts: 5017
for bonus points convert it to 16cols :) then the next one make a release named koala pic shower :o)
2015-09-22 11:49
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
;KOALA PIC 2000
lda $dd00
and #%11111100
ora #%00000011
sta $dd00
lda $d016
ora #$10
sta $d016
LDA #$19
STA $D018
lda #$3b
sta $d011
2015-09-22 11:55
Smasher

Registered: Feb 2003
Posts: 512
Oswald, I think you cheated... that's drazlace :)
so lemme check aswell: FLI with fli-bug on!

2015-09-22 11:57
Bitbreaker

Registered: Oct 2002
Posts: 500
Quoting SIDWAVE

lda $dd00
and #%11111100
ora #%00000011
sta $dd00


This might break with elite loaders active.
Also, why storing #$19 in $d018?
Where to copy the colram?
Where is $d021 set?
...
Previous - 1 | 2 | 3 | 4 | 5 - 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
Mr. SID
Didi/Laxity
Slaxx/Q/HF/MYD!
Krill/Plush
zscs
Guests online: 134
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Webmasters
1 Slaygon  (9.7)
2 Perff  (9.6)
3 Morpheus  (9.5)
4 Sabbi  (9.5)
5 CreaMD  (9.1)

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