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 > Four split rasterbar with moving color and music
2009-10-28 20:56
8bitforever
Account closed

Registered: Oct 2009
Posts: 48
Four split rasterbar with moving color and music

Eight hours ago I proudly coded a wonderful stable four split rasterbar with the colors moving within the rasterbar with different timing.
The stable raster was provided by http://www.ffd2.com/fridge/vic/stableraster.txt.

Three hours ago I got the idea to play some music to.
I tried to place jsr $1003 in irq3. I tried to place jsr $1003 in the main or hold loop and start it at a specific raster location. The music plays fine with both methods but my wonderful four split rasterbar starting location seems to move by 1 or 2 cycles. This makes the rasterbar move slightly to the right and back. It almost moves to the music.

Question 1) What is the reason for this ?
Question 2) What can be done to make it stable again ?




2009-10-28 21:06
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Forget it all.

Learn to code it yourself, or forget it all.
2009-10-28 21:15
plagueis
Account closed

Registered: Dec 2007
Posts: 48
This guy has been communicating with me via PM, and I've told him the same. The fun part is going through great frustration, sometimes for hours at a time, and then feeling that great release when your routine finally does what you want.

@8bitforever,

Like I said in my last letter...relax. Learn to code a 1x1 scroller. Make your own character set. Pixel a logo, learn to display it on the screen. Swing it, tech it, enjoy yourself. Try not to be so eager to show out and leech.

-DP
2009-10-28 21:19
8bitforever
Account closed

Registered: Oct 2009
Posts: 48
Come on guys...
What´s is the point of a coding forum if you cannot at least give a small hint or answer to the subject in some way ?

Please give me something on question 1 or question 2.
I´m working hard to learn.
2009-10-28 21:36
plagueis
Account closed

Registered: Dec 2007
Posts: 48
Then we harshly differ on the proper way to learn. I spelled it out for you once in a private message and mentioned that I am relatively new to demos on the c64 as well, but you don't seem to reply to the important things I say either, such as my advice that you start with the basics, and aim to learn about how the VIC works before worrying about impressing people.

Intelligent questions are a great thing, after you've showed a penchant for hard work. But with you it keeps coming back to one thing, asking for a handout. I actually haven't posted much on this forum, because I'm usually too busy coding, so what you ought to do is forget stable rasters for now, and just set up some routines on the screen using $d012 polling wait loops.

When I ask more experienced coders questions, I expect a reply which gives an explanation of the procedure of how to pull off an effect, or even a partial one. Like a verbal flow chart...an algorithm. It's no fun when the most exciting aspects of coding are given away from the outset. In addition, it often takes longer to reverse engineer source than to code something from scratch (at least for me).

-DP
2009-10-28 21:47
8bitforever
Account closed

Registered: Oct 2009
Posts: 48
IRQ instable with music playing?!

The music problem has been discussed here before.
Is there something more to add to this subject matter ?
2009-10-28 22:16
Mr. SID

Registered: Jan 2003
Posts: 424
2009-10-28 22:33
Stryyker

Registered: Dec 2001
Posts: 465
Look for what a proper stable raster interrupt is. There have been discussions on this forum about them. I found double interrupt the easiest to use especially if there are no sprites. There are some docs somewhere that description what the processor does when an interrupt is triggered.

I suspect what has happened is without the music the rest of the code falls in to nice cycle use. Music will be much more variable.

Do you use PAL or NTSC configurations?
2009-10-28 22:49
8bitforever
Account closed

Registered: Oct 2009
Posts: 48

Stryyker, I use PAL.
Yes, the split rasterbars are perfect without the music.
Where should I put the music to be able to handle it´s variable cycles ?
The music seems to push the starting point of the rasterbar by one or two cycles variable. The rasterbar jumps to the right and then back.
The rasterbar is in irq2.
The music in irq3.
2009-10-28 23:11
8bitforever
Account closed

Registered: Oct 2009
Posts: 48
Thanks PAL, :-)

You lead me to it Stryyker !

The NOP:s I forgot to remove in fungus code.
; nop ;<--- remove 1 NOP for PAL

Very simple !
Problem Solved.
Now the music plays and the split rasterbar is stable.



2009-10-28 23:48
plagueis
Account closed

Registered: Dec 2007
Posts: 48
Nice, a little bit longer and you would have solved that completely on your own.

Here's something that will help you with simple visualization of basic timing issues:

In your IRQ's (or $d012 wait loops) do this:

IRQ:

inc $d020
jsr music
dec $d020

dec $d020
jsr effect
inc $d020

...
etc.

This will help you determine how much raster time a subroutine takes up, and where in the frame it occurs. Also, it will point out on what line a raster collision between two routines occurs. This is a common basic technique, known to basically everyone when they are starting out. Many people told me about this simple technique and showed it to me 2 years ago when I was starting out, and it is well known. It helps greatly for NTSC/PAL fixing projects as well. Of course, beginning to familiarize yourself with how many cycles common opcodes use in their various addressing modes is the most beneficial toward this end.

-DP
 
... 16 posts hidden. Click here to view all posts....
 
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
Hend/Protovision (ptv)
nucleus/TempesT
wil
bugjam
Dr. Doom/RAD
LightSide
A3/AFL
Alakran_64
megasoftargentina
Sokratekk
Didi/Laxity
kenchis
Guests online: 75
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Aliens in Wonderland  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Dawnfall V1.1  (9.5)
8 Birth of a Flower  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Offence  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 S!R  (9.7)
5 Fungus  (9.7)

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