Jump to content
IGNORED

Lightgun detection incorrect


Primordial Ooze

Recommended Posts

I am using Eckhard Stolberg's light gun detection routing modified to work on the right controller port. However for some reason the detection code doesn't work as the cross-hair sprite isn't moved to where the player fired his light gun. I have tested my lightning with his GUNTEST binary to verify that my light gun isn't at fault and verified that the light gun is working. I have attached the latest version of my source code for reference. Any assistance in this matter would be greatly appreciated.

 

Sincerely,

 

Primordial Ooze

Link to comment
Share on other sites

  • 4 weeks later...

I am using Eckhard Stolberg's light gun detection routing modified to work on the right controller port. However for some reason the detection code doesn't work as the cross-hair sprite isn't moved to where the player fired his light gun. I have tested my lightning with his GUNTEST binary to verify that my light gun isn't at fault and verified that the light gun is working. I have attached the latest version of my source code for reference. Any assistance in this matter would be greatly appreciated.

 

Sincerely,

 

Primordial Ooze

We it's been almost a month and 100+ views and not a single reply has been made. There has been 13 downloads of the source code, yet still no solutions? Can someone please look into this as i really want to start this up again.

 

Sincerely,

 

Primordial Ooze

Link to comment
Share on other sites

We it's been almost a month and 100+ views and not a single reply has been made. There has been 13 downloads of the source code, yet still no solutions? Can someone please look into this as i really want to start this up again.

 

A better debugging strategy would be :-

 

- Modify Eckhard's original light gun source to use a different port and verify it is working. Make the same changes to your code (if different to what you have now).

- If that doesn't work modify your code to fake a lightgun trigger when a normal stick fire button is pressed. E.g. hard code x and y coordinates and watch them being processed in your code as you single step through it.

 

You need to find where the bug(s) are, so isolating blocks of functionality is the only way to do it.

Link to comment
Share on other sites

We it's been almost a month and 100+ views and not a single reply has been made. There has been 13 downloads of the source code, yet still no solutions? Can someone please look into this as i really want to start this up again.

 

A better debugging strategy would be :-

 

- Modify Eckhard's original light gun source to use a different port and verify it is working. Make the same changes to your code (if different to what you have now).

- If that doesn't work modify your code to fake a lightgun trigger when a normal stick fire button is pressed. E.g. hard code x and y coordinates and watch them being processed in your code as you single step through it.

 

You need to find where the bug(s) are, so isolating blocks of functionality is the only way to do it.

I modified the code to meet both conditions above. I also removed the screen flashing code to make debugging easier both in code and the eyes. I still haven't managed to get it working and am very frusterated as there doesn't seem to be any problems in the logic of my code. I have tested my lightgun and it is working propperly. I have attached the latest version of my source code with the modifications stated above. Any assistance would be greatly appreciated.

 

Sincerely

 

Primordial Ooze

Link to comment
Share on other sites

Where does the cross-hair move to? Is there a constant offset or does it move just randomly?

Nope it doesn't move at all. I am not using a constant offset, just purely the lightgun code you posted in another thread with no modifications. Any assistance would be greatly appreciated.

 

Sincerely,

 

Primordial Ooze

 

P.S. Yes, the lightgun is an uncommon controller which is why I'm trying to create more demand for it. Of course you can buy it from ebay for about $40.

Edited by Primordial Ooze
Link to comment
Share on other sites

How about in the faking the trigger code you increment the trigger X coordinate to see the sprite move when you hit fire on the stick. Do the same with Y too.

Done and it still does work. Seems it may be skipping HitCycleAdjust but, not sure and even then why..

 

If I would know how to read the lightgun, I might be able to help. :)

 

The HitCycleAdjust loop looks very odd, but that could be because see above.

For your first question see this post. For your second question the HitCycleAjust was take from Eckhard Stolberg's light gun detection routine which was taken from Sentinel.

 

Any assistance would be greatly appreciated.

 

Sincerely,

 

Primordial Ooze

Link to comment
Share on other sites

Please can you post Eckhard's source code that you modified to work in the 2nd port.

I have attached the original source code(guntest5.asm) and the modified source code(QuackerBlaster.asm) to this post. As you will see it is largely unchanged becides replacing INPT4 with INPT5 and bit4 of SWCHA with bit0 of SWCHA based on the reference provided in the link i posted above. Any assistance would be greatly appreciated.

 

Sincerely,

 

Primordial Ooze

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...

Hey,

 

It's been more then 3 months and it seems no one has found the bug yet. My code seems correct, yet the gun detection isn't working. Can someone please look into this? I would hate to have this project die due to this bug. Any assistance would be greatly appreciated.

 

Sincerely,

 

Primordial Ooze

Link to comment
Share on other sites

  • 3 months later...

Since no one has managed to figure out whats wrong with the light gun code for a year now,

 

Its the homebrew developer's job to find bugs in their own code. If anybody else finds it before you then its a bonus. How about explaining your debug/simulation strategy of the problem?

Thing is I have tried for months to get it working. If you look at the posts above you will see I have tried everyone's suggestions to no avail. After months of no success I posted my problem and waited to see if anyone else could figure it out.

How about explaining your debug/simulation strategy of the problem?

My strategy is doing what was suggested to no avail. :(

 

How about a joystick version and after you finished that we'll look into the light gun affair again? I have some strange ideas about light guns at the moment, like getting them to work on modern TVs other than CRTs.

That's what I plan on doing if next if no one can figure out whats wrong with my code. As stated above, I tried to fix it for 3 months, trying everything that was suggested and not getting anywhere.

 

Sincerely,

 

Primordial ooze

Edited by Primordial Ooze
Link to comment
Share on other sites

  • 1 month later...

Update on this?

I reversed engineered duck hunt

Curious as to your version will handle

 

 

p.s

english isn't my native language

Sorry about the late reply, glad to see people are still interested in this :) I'm redoing the controls so you can play using a joystick instead of using the rare XE Gun. I've busy with other stuff lately so i haven't worked on it for awhile, but you will be happy to know I'm am starting to work on it again. :-D

 

Sincerely,

 

Primordial Ooze

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...