Primordial Ooze Posted December 27, 2011 Share Posted December 27, 2011 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 Quote Link to comment Share on other sites More sharing options...
Primordial Ooze Posted January 19, 2012 Author Share Posted January 19, 2012 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 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 19, 2012 Share Posted January 19, 2012 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. Quote Link to comment Share on other sites More sharing options...
Primordial Ooze Posted January 19, 2012 Author Share Posted January 19, 2012 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 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted January 19, 2012 Share Posted January 19, 2012 Where does the cross-hair move to? Is there a constant offset or does it move just randomly? Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted January 19, 2012 Share Posted January 19, 2012 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. Quote Link to comment Share on other sites More sharing options...
Primordial Ooze Posted January 19, 2012 Author Share Posted January 19, 2012 (edited) 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 January 19, 2012 by Primordial Ooze Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 19, 2012 Share Posted January 19, 2012 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. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted January 19, 2012 Share Posted January 19, 2012 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. Quote Link to comment Share on other sites More sharing options...
Primordial Ooze Posted January 20, 2012 Author Share Posted January 20, 2012 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 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 20, 2012 Share Posted January 20, 2012 Please can you post Eckhard's source code that you modified to work in the 2nd port. Quote Link to comment Share on other sites More sharing options...
Primordial Ooze Posted January 20, 2012 Author Share Posted January 20, 2012 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 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted January 20, 2012 Share Posted January 20, 2012 I cannot see anything wrong in the positioning code. But I cannot see the crosshair AT ALL. Are you sure your display code works? Quote Link to comment Share on other sites More sharing options...
Primordial Ooze Posted January 21, 2012 Author Share Posted January 21, 2012 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 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 21, 2012 Share Posted January 21, 2012 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? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted January 21, 2012 Share Posted January 21, 2012 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. Quote Link to comment Share on other sites More sharing options...
Primordial Ooze Posted February 1, 2012 Author Share Posted February 1, 2012 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 Quote Link to comment Share on other sites More sharing options...
Primordial Ooze Posted June 8, 2012 Author Share Posted June 8, 2012 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 Quote Link to comment Share on other sites More sharing options...
Primordial Ooze Posted September 10, 2012 Author Share Posted September 10, 2012 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 Quote Link to comment Share on other sites More sharing options...
31336haxx0r Posted September 10, 2012 Share Posted September 10, 2012 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. Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted September 10, 2012 Share Posted September 10, 2012 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? 1 Quote Link to comment Share on other sites More sharing options...
Primordial Ooze Posted September 10, 2012 Author Share Posted September 10, 2012 (edited) 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 September 10, 2012 by Primordial Ooze Quote Link to comment Share on other sites More sharing options...
Prime_Suspect Posted September 15, 2012 Share Posted September 15, 2012 (edited) Update on this? I reversed engineered duck hunt Curious as to your version will handle p.s english isn't my native language Edited September 15, 2012 by Prime_Suspect Quote Link to comment Share on other sites More sharing options...
Primordial Ooze Posted October 19, 2012 Author Share Posted October 19, 2012 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. Sincerely, Primordial Ooze Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.