Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) 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?
 
... 29 posts hidden. Click here to view all posts....
 
2014-10-02 13:28
The Phantom

Registered: Jan 2004
Posts: 360
It's odd that you would say the file didn't work. When I provided the link, naturally, I downloaded the file. I looked at the directory first and didn't pay attention to the file being 0 blocks, and loaded it anyway.

It loaded fine for me. I didn't change my emulation settings from NTSC to PAL, not sure if that is an issue. I just know it worked for me and I had used it to walk through the steps I gave.

AFAIK, it's a working file.

And I'm glad you got it working ;)

Happy coding :D
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: 276
@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: 2476
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: 1031
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: 11100
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: 1820
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
t0m3000/ibex-crew
eryngi
Scooby/G★P/Light
Krill/Plush
Twoflower/ΤRIΛD
St0rmfr0nt/Quantum
Flex/Artline Designs
www.gb64.com
kbs/Pht/Lxt
Guests online: 101
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 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (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 Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

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