English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 16 December 2018, 13:24   #1
LeCaravage
Registered User

LeCaravage's Avatar
 
Join Date: May 2017
Location: AmigaLand
Posts: 172
Ocs clxdat & clxcon

Hey,

-Qst for Amiga 500 OCS-


I have pain in the butt understanding how works these hardware collision detections registers.
I'm trying to detect collision between sprites and bobs. The screen is dualplayfield.

I set all bits on in CLXCON once at start and then at each frame I read CLXDAT then I "AND.W" it with #%0000000111100000

It doesn't work.
Any help because the mist is deep ^^
LeCaravage is offline  
Old 16 December 2018, 14:01   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,357
If you set all bits, you only get collision if all 6 planes had bit set which probably isn't what you wanted?

Perhaps this helps: http://eab.abime.net/showpost.php?p=965074&postcount=2
Toni Wilen is offline  
Old 16 December 2018, 18:19   #3
LeCaravage
Registered User

LeCaravage's Avatar
 
Join Date: May 2017
Location: AmigaLand
Posts: 172
When you start to input random values, that means you must pass.
Too bad because this hardware feature would have saved some raster time.
Anyway, thanks for helping.
LeCaravage is offline  
Old 20 December 2018, 10:27   #4
Asman
68k

Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 665
@LeCaravage
Please check my very simple game - there is used hardware collision.

https://github.com/asman2000/grim

If you have questions then just ask.
Asman is offline  
Old 21 December 2018, 16:45   #5
LeCaravage
Registered User

LeCaravage's Avatar
 
Join Date: May 2017
Location: AmigaLand
Posts: 172
@Asman
Thanks for the help. Much appreciated.
I checked your code and it seems I use a similar method than yours.
But I use a dualplayfield, may be it's what makes the pb.
It's like it only detects a certain color or so.
Anyway, as I lost too much time on this hardware method, I skipped to a cross box detection, it's not very accurate but it does the job.
LeCaravage is offline  
Old 08 February 2019, 15:35   #6
Photon
Moderator
Photon's Avatar
 
Join Date: Nov 2004
Location: Hult / Sweden
Posts: 4,596
Dual Playfield is perfect for collision detection
Photon is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Monkey Island 1 & 2 - Remastered for OCS / ECS HAM6_Video Amiga scene 22 07 April 2017 17:10
Morton Strikes Back & Trog [OCS & AGA] - Trained Versions DamienD support.Games 7 13 October 2016 10:53
Alterego (+3) Trainer & Zerosphere (+5) OCS warfalcon Amiga scene 8 12 January 2016 16:43
Pinball Dreams & Pinball Fantasies - Special Edition (OCS/ECS) teh HOL contributions 3 23 March 2012 15:39
aminet & amiga Plus cds - floppy & cd software/games - hardware & magazines for SALE! bastibs MarketPlace 1 07 May 2008 12:33

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.06231 seconds with 15 queries