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 > help needed for simple demo
2014-09-29 07:46
Technotron

Registered: Sep 2014
Posts: 23
help needed for simple demo

hi all,

first of all I have to tell that I'm pretty newbie in the scene, so bear with me.

I have coded a simple scroller in assembler located at $c000 and it works. now I would like to add some music located at $1003 but I don't know how to proceed. I need a small routine that could be called with JSR and that returns to the scroller after some bits of music is played.


I have tried with the following routine but it doesn't work since it continues playing without returning to the scroller:

c010 lda $d012
cmp #$80
bne $c010
inc $d020
jsr $1003
dec $d020
rts

can anybody help me?
 
... 30 posts hidden. Click here to view all posts....
 
2014-10-02 18:59
Technotron

Registered: Sep 2014
Posts: 23
@ The Phantom

It's odd, I've tried PAl and NTSC and tried to change 1541 II drive with 1541 but the result with that file is "File not found" error. I use VICE 2.4 with a Linux box.


@ Mr. SID

I report a success in packaging the bundle with exomizer ! good tool and cross platform.


@ Dr. J
unluckily I was unable to use Bongo Cruncher with success, the resulting .prg file does not run. I've tried to use the the option "Use My load address as SAFE load address" and set it to $4000 (the location of the scroller) but the resulting file does not run.

Quote:
@Technotron: one more thing mate , if you like send me your scroller or program (music/text) and i try to help you and make it working .


beware, I can take you seriously and send you my rubbish for real! :-)
2014-10-02 19:49
Dr.j

Registered: Feb 2003
Posts: 277
@Technotron: Bongo should get the jumping address of the program
when you use "only crunch" option. why you gave it $4000 for your
scroller i don't know..anyway if you succeed get Exomizer work
so its great mate
2014-10-03 05:23
bugjam

Registered: Apr 2003
Posts: 2594
Interesting with this ECA Compactor - works fine for me in VICE under Windows. By the way, anyone knows what STN might stand for?
2014-10-22 16:11
Technotron

Registered: Sep 2014
Posts: 23
Hi all,

now that I have solved the problem of the scroller I've got another problem.


I would like to show a koala image with a simple assembler routine. I have found one in a tutorial. It supposes that the image should be loaded from $2000 onwards.


* = $0801

lda #$00
sta $d020
sta $d021 ; set border and screen colour to black

tax
copyloop:
lda $3f40,x ; copy colours to screen RAM
sta $0400,x
lda $4040,x
sta $0500,x
lda $4140,x
sta $0600,x
lda $4240,x
sta $0700,x
lda $4328,x ; copy colours to colour RAM
sta $d800,x
lda $4428,x
sta $d900,x
lda $4528,x
sta $da00,x
lda $4628,x
sta $db00,x
dex
bne copyloop

lda #$3b ; bitmap mode
ldx #$18 ; multi-colour mode
ldy #$18 ; screen at $0400, bitmap at $2000
sta $d011
stx $d016
sty $d018

mainloop:
jmp mainloop ; keep going...

the fact is that it doesn't work for me. could someone help me with this routine or could someone give me another one?


thanks in advance for your reply.
2014-10-22 16:37
Burglar

Registered: Dec 2004
Posts: 1105
if it doesnt work, you should fix it.

or you should be a bit more specific than "it doesn't work".
2014-10-22 16:51
Technotron

Registered: Sep 2014
Posts: 23
it doesn't work here means that instead of a koala picture the screen goes black with some scattered coloured boxes all over.

if I knew how to fix the problem I wouldn't have posted this message in the forums in the first place. I hope that someone could give me a hand.
2014-10-22 16:58
chatGPZ

Registered: Dec 2001
Posts: 11390
that code looks correct - are you sure the koala actually loaded to $2000? (depending on the gfx program the load adress is different)
2014-10-22 16:58
Count Zero

Registered: Jan 2003
Posts: 1940
Maybe he means that it looks ugly? dex:bne is no good here - use INX

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

prolly missing $dd00?

PS: Forget the first line - X = 0 at start of loop - all good.
2014-10-22 18:08
Technotron

Registered: Sep 2014
Posts: 23
@groepaz


Quote:
that code looks correct - are you sure the koala actually loaded to $2000?


indeed you're right! I used hesmon to load the image from $2000 but it didn't really load the image in that place! so I've used Brix/Plush's picture splitter as suggested in the tutorial that Count zero has posted and here we go... the picture finally appeared :-)

thanks guys for your replies !
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
csabanw
REBEL 1/HF
CA$H/TRiAD
Matt
Holy Moses/Role
celticdesign/G★P/M..
ready./Level64/HF
Krill/Plush
EALL/HT
Smasher/F4CG
t0m3000/hf^boom!^ibx
B.A./QUANTUM
Guests online: 118
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.6)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 The Demo Coder  (9.6)
8 Comaland 100%  (9.6)
9 Wonderland XIV  (9.6)
10 What Is The Matrix 2  (9.6)
Top onefile Demos
1 Layers  (9.7)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 Morph  (9.5)
7 Dawnfall V1.1  (9.5)
8 Libertongo  (9.5)
9 Katzen-Video.mp4  (9.5)
10 Onscreen 5k  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Performers  (9.3)
4 Triad  (9.3)
5 Fairlight  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Stormbringer  (10)
3 Fungus  (9.7)
4 Booze  (9.7)
5 Grim Reaper  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.044 sec.