SGDK & Blue Justifier

Announce (tech) demos or games releases

Moderator: Mask of Destiny

Post Reply
Moon-Watcher
Very interested
Posts: 117
Joined: Sun Jan 02, 2011 9:14 pm
Contact:

SGDK & Blue Justifier

Post by Moon-Watcher » Mon Oct 20, 2014 11:36 pm

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

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Oct 21, 2014 3:10 am

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.

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Re: SGDK & Blue Justifier

Post by Eke » Tue Oct 21, 2014 9:42 am

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.

Moon-Watcher
Very interested
Posts: 117
Joined: Sun Jan 02, 2011 9:14 pm
Contact:

Post by Moon-Watcher » Fri Dec 05, 2014 8:54 am

Thanks to both!

I failed adding Light Phaser support :oops:

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri Dec 05, 2014 6:43 pm

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.

Moon-Watcher
Very interested
Posts: 117
Joined: Sun Jan 02, 2011 9:14 pm
Contact:

Post by Moon-Watcher » Fri Dec 05, 2014 7:56 pm

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

Post Reply