Jump to content

Photo

Lightgun detection incorrect


23 replies to this topic

#1 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Tue Dec 27, 2011 9:35 AM

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

Attached Files



#2 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Thu Jan 19, 2012 12:35 PM

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

#3 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,979 posts
  • Busy bee!
  • Location:North, England

Posted Thu Jan 19, 2012 1:05 PM

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.

#4 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Thu Jan 19, 2012 2:10 PM


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

Attached Files



#5 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash

  • 19,018 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany

Posted Thu Jan 19, 2012 2:40 PM

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

#6 SpiceWare ONLINE  

SpiceWare

    Quadrunner

  • 8,345 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Thu Jan 19, 2012 2:56 PM

We it's been almost a month and 100+ views and not a single reply has been made.


Considering you're using an uncommon controller for the 2600, I'm not surprised. It's difficult to diagnose problems w/out the appropriate equipment.

#7 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Thu Jan 19, 2012 3:26 PM

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, Thu Jan 19, 2012 3:27 PM.


#8 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,979 posts
  • Busy bee!
  • Location:North, England

Posted Thu Jan 19, 2012 3:59 PM

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.

#9 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash

  • 19,018 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany

Posted Thu Jan 19, 2012 4:22 PM

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.

#10 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Fri Jan 20, 2012 9:21 AM

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

Attached Files



#11 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,979 posts
  • Busy bee!
  • Location:North, England

Posted Fri Jan 20, 2012 9:32 AM

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

#12 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Fri Jan 20, 2012 10:15 AM

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

Attached Files



#13 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash

  • 19,018 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany

Posted Fri Jan 20, 2012 4:09 PM

I cannot see anything wrong in the positioning code. But I cannot see the crosshair AT ALL. Are you sure your display code works?

#14 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Sat Jan 21, 2012 1:44 PM

I cannot see anything wrong in the positioning code. But I cannot see the crosshair AT ALL. Are you sure your display code works?

If the display wasn't working then why is the duck being displayed??? Any assistance would be greatly appreciated.

Sincerely,

Primordial Ooze

#15 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,979 posts
  • Busy bee!
  • Location:North, England

Posted Sat Jan 21, 2012 1:55 PM

What happens if you single step the code and simulate a light gun trigger press 25 scan lines down and half way into the screen. What coordinates is the cross hair positioned to?

#16 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash

  • 19,018 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany

Posted Sat Jan 21, 2012 1:58 PM

If the display wasn't working then why is the duck being displayed???

Because that's different code. Can you see the crosshair AT ALL? I can't.

#17 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Wed Feb 1, 2012 9:51 AM

If i modify the x/y position of the crosshair and step through the code, the crosshair appears on screen. However when i press the lightgun trigger normally it doesn't.

Sincerely,

Primordial Ooze

#18 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Fri Jun 8, 2012 11:22 AM

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

#19 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Mon Sep 10, 2012 10:50 AM

Since no one has managed to figure out whats wrong with the light gun code for a year now, would you like to see a joystick version of this game made?

Sincerely,

Primordial Ooze

#20 31336haxx0r OFFLINE  

31336haxx0r

    Dragonstomper

  • 515 posts
  • Location:Germany

Posted Mon Sep 10, 2012 11:24 AM

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.

#21 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,979 posts
  • Busy bee!
  • Location:North, England

Posted Mon Sep 10, 2012 12:06 PM

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?

#22 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Mon Sep 10, 2012 1:01 PM


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, Mon Sep 10, 2012 1:48 PM.


#23 Prime_Suspect OFFLINE  

Prime_Suspect

    Combat Commando

  • 4 posts

Posted Sat Sep 15, 2012 2:08 AM

Update on this?
I reversed engineered duck hunt
Curious as to your version will handle


p.s
english isn't my native language

Edited by Prime_Suspect, Sat Sep 15, 2012 2:17 AM.


#24 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • Topic Starter
  • 541 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Fri Oct 19, 2012 9:11 AM

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




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users