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: 11149
are you sure you want to use this irq? its practically useless :=P
2006-04-03 16:19
Oswald

Registered: Apr 2002
Posts: 5031
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: 2855
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: 5031
is there a priority amongst different vic interruts?
2006-04-04 09:16
chatGPZ

Registered: Dec 2001
Posts: 11149
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.
2006-04-04 19:27
Danzig

Registered: Jun 2002
Posts: 430
you ment $D01A!?
2006-04-05 05:59
TNT
Account closed

Registered: Oct 2004
Posts: 189
You enable interrupts with $d01a, you read their status and ack them with $d019.
2006-04-07 17:24
Danzig

Registered: Jun 2002
Posts: 430
yeah, shyte, I misread grahams posting...
like "clear all IRQ flags" reads "set all IRQ flags" to me...
*dumb*
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
Trash
sailor/Triad
Mr. SID
Stinsen/G★P
ArturoDente
Clayboy
Guests online: 177
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.7)
6 No Bounds  (9.6)
7 Aliens in Wonderland  (9.6)
8 Comaland 100%  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 It's More Fun to Com..  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Happy Birthday Dr.J  (9.6)
6 Copper Booze  (9.6)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Rainbow Connection  (9.5)
9 Dawnfall V1.1  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Talent  (9.6)
4 Facet  (9.6)
5 Hend  (9.6)

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