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 > sprite sprite collision interrupt ?
2006-04-03 16:05
Trifox
Account closed

Registered: Mar 2006
Posts: 108
sprite sprite collision interrupt ?

hi, i have tried to set bit 3 in $d01a and $d019
but somehow my interrupt is not initiated when 2 sprites overlap ... ;( i leave the interrupt with

asl $d019 ; ACK interrupt (to re-enable it)
pla
tay
pla
tax
pla
2006-04-03 16:06
chatGPZ

Registered: Dec 2001
Posts: 11386
are you sure you want to use this irq? its practically useless :=P
2006-04-03 16:19
Oswald

Registered: Apr 2002
Posts: 5094
you'll need an rti at the very end of the irq exit routine too.

AFAIK you can read any time some register ($d019?) for checking for collisions so an interrupt is not necessary. IIRC that register has to be cleared manually aswell.
2006-04-03 17:20
hollowman

Registered: Dec 2001
Posts: 474
"Sprite to sprite collisions are recognized by the computer, or flagged,in the sprite to sprite collision register at location 53278 ($D01E in HEX) in the VIC-II chip control register. Each sprite has a bit in this register. If that bit is a 1, then that sprite is involved in a collision. The bits in this register will remain set until read (PEEKed). Once read, the register is automatically cleared, so it is a good idea to save the value in a variable until you are finished with it."
2006-04-03 18:36
TNT
Account closed

Registered: Oct 2004
Posts: 189
Try using bit 2... also, make sure you don't have other IRQs enabled if you use rmw instruction to ack interrupts.
2006-04-04 00:26
Krill

Registered: Apr 2002
Posts: 2980
why no other irq sources?
2006-04-04 07:30
TNT
Account closed

Registered: Oct 2004
Posts: 189
I was thinking of other VIC-II interrupts, sorry for not being more clear. Problem with that is ofcourse acking them too. No problem with CIA interrupts.

(But who would use sprite-background and/or light pen IRQs? Sprite-sprite collision IRQ *can* sometimes be used to cut down comparisons when combined creatively with raster IRQ.)



2006-04-04 08:55
MRT
Account closed

Registered: Sep 2005
Posts: 149
cli ?

;-)
2006-04-04 09:06
Oswald

Registered: Apr 2002
Posts: 5094
is there a priority amongst different vic interruts?
2006-04-04 09:16
chatGPZ

Registered: Dec 2001
Posts: 11386
i dont think so, they are all connected to the same irq line on the cpu afterall
2006-04-04 13:35
Graham
Account closed

Registered: Dec 2002
Posts: 990
You don't need a priority because you can read all IRQ sources via LDA $D019 and clear all IRQ flags as you like via setting their bits in $D019.
 
... 3 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 - 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
celticdesign/G★P/M..
A3/AFL
iAN CooG/HVSC
Alakran_64
Mike
slimeysmine
Mibri/ATL^MSL^PRX
pcollins/Quantum
leonofsgr/Singular C..
Acidchild/Padua
iceout/Avatar/HF
Andy/AEG
MCM/ONSLAUGHT
Guests online: 181
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.7)
4 Acidchild  (9.7)
5 Cash  (9.6)

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