Page 1 of 1

SGDK & Blue Justifier

Posted: Mon Oct 20, 2014 11:36 pm
by Moon-Watcher
Working great on real hardware. Here is it https://app.box.com/s/nddkss0rpzqlwrb8jzj7

Justifier must be plugged on JOY_2.

* Black background do not read Justifier position
* Remove Justifier and then plug the SMS Light Phaser. It read position but will not shoot

Posted: Tue Oct 21, 2014 3:10 am
by Chilly Willy
Lightguns require a certain level of light to work. My example app for the controllers doesn't use a black background for that reason. At least it's better than the old Phaser. The Phaser works like this: you check if the user is pulling the trigger periodically (like once per frame). If they are, you set the palette to all white for one frame; this allows the Phaser to detect the light, which then triggers the signal. After the one frame, you set the palette back to the normal colors. That is why all old SMS (and NES for that matter) games flash the screen when playing lightgun games.

Re: SGDK & Blue Justifier

Posted: Tue Oct 21, 2014 9:42 am
by Eke
Moon-Watcher wrote: * Remove Justifier and then plug the SMS Light Phaser. It read position but will not shoot
Light Phaser Trigger button is read from TL pin (bit 4) while Justifiers Trigger button is read from UP pin (bit 0).
Also TL is usually set as an ouput to justifiers so you will need to change pin direction in your code.

Posted: Fri Dec 05, 2014 8:54 am
by Moon-Watcher
Thanks to both!

I failed adding Light Phaser support :oops:

Posted: Fri Dec 05, 2014 6:43 pm
by Chilly Willy
I have a Phazer, now, so I'll add support for it over the weekend. Like some other input devices, it can't be sensed directly, so the program will have to set it directly itself, like the trackball device support. That was one of the primary benefits of the MD controllers - they all have a device ID protocol.

Posted: Fri Dec 05, 2014 7:56 pm
by Moon-Watcher
Chilly Willy wrote:I have a Phazer, now, so I'll add support for it over the weekend. Like some other input devices, it can't be sensed directly, so the program will have to set it directly itself, like the trackball device support. That was one of the primary benefits of the MD controllers - they all have a device ID protocol.
Great! It would be really appreciate :D