Hey y'all,
I haven't been here in a long time, but I still think of the good deals and conversations I've had here. Those of you who remember me may also remember that I was an active competitor on the annual "Beat Every NES Game" threads on the dearly departed Nintendo Age. The tradition has continued on the successor forum at VideoGameSage.com. I had a pretty good day of playing through games for said competition today, but then something strange happened that made this worthy of being posted over here on Famicom World as well.
I primarily game anymore on an Everdrive N8 (Famicom edition) plugged into my AV Famicom. I had a Bandai Hypershot light gun plugged into the expansion port. This light gun, if you're unaware, has a speaker built into it designed to pipe in the audio of your game into the light gun as you're playing with it. As far as I knew, this functionality was only present in Space Shadow, the Famicom light gun game that was packed in with the Hypershot light gun. But when I just started Kickle Cubicle (US version, mind you) just now, the audio came through my Hypershot and startled the crap out of me. I just thought I'd share, because some of y'all may find this interesting.
Any idea why this game would work? Are there any other games besides Space Shadow (and, apparently, Kickle Cubicle) that run their audio through the Hypershot?
Hey Jackson, I totally remember you dude! No idea about your question, but it's great to see you post again :)
Welcome back! :)
First, what kind of audio comes out the gun in Space Shadow? And what audio comes out from it in Kickle Cubicle? Is it some unique sound effects, just the same audio that comes out of the TV speakers or some kind of random noise?
AFAIK the Famicom has only 3 output pins and one of them ($4016 D0) is used by the controllers as strobe. I guess one of the other two may be used to output unique audio to the gun with.
The expansion port also has an audio pin. But if that one is used it would just output the Famicom's normal audio (APU audio on classic Famicom and APU+expansion audio on AV Famicom), and it would work with every game.
@fcgamer
Nice to see you chime in. You've always been a good dude in my book.
@P
It's been a little while since I've played Space Shadow, but if I remember right the whole sound bank came through the gun. I can't remember if the game even has music or not, but certainly all the sound effects.
With Kickle Cubicle, it did work just as you suggested as it pushed all the game sounds and music through the Hypershot. The TV was actually fully mute.
But it definitely doesn't work with all other games. I've played 130+ NES/FC games since January 1st (remember, I'm in a competition with running stats), and Kickle Cubicle was literally the first to actually pipe its sound in. It didn't trigger the gun's rumble functions, unlike Space Shadow, so at least it wasn't THAT weird.
I see, if it doesn't work with every game I guess the sound output must be enabled in the gun and Cubicle (accidentaly) does this. By fully mute do you mean the volume control was turned down on the TV or that the game didn't output any sound to the TV even though volume was turned up?
Too bad that the Bandai Hypershot isn't documented anywhere as far as I can see (Konami Hypershot is, but it's something else).
Thanks for reporting this anyway, it is indeed very interesting.
Quote from: P on February 03, 2020, 01:22:29 amToo bad that the Bandai Hypershot isn't documented anywhere as far as I can see (Konami Hypershot is, but it's something else).
Found this: http://problemkaputt.de/everynes.htm#controllerslightgunszapper (http://problemkaputt.de/everynes.htm#controllerslightgunszapper)
Bandai Hyper Shot Gun (for Space Shadow) (1989)
A black machine pistol, working (more or less) like a normal zapper combined with an additional joypad.
4016h.R.Bit1 Serial 8bit joypad3-style button data
4017h.R.Bit3 Light (0=High=Yes, 1=Low=No)
4017h.R.Bit4 Trigger (0=High=Released, 1=Low=Pressed/Held) (shoot while 1)
4016h.W.Bit1 Gun Move aka Body Vibration System (0=Off, 1=On)
4016h.W.Bit2 Sound (0=Off, 1=On)
The serial "joypad3" data is used as so (by Space Shadow):
joypad3 button B --> throw grenade
joypad3 up --> move forward (after defeating enemy)
joypad3 select --> toggle sound/gun-move (in title screen)
joypad3 start --> start/pause
The trigger is a simple push-button without the normal zapper-mechanics, this allows Space Shadow to support continous fire when the button is held down, but isn't fully compatible with normal zapper games (which will fire on 1-to-0 transitions, ie. when <releasing> the Hyper Shot trigger, rather than pressing it).
The light sensor may have different sensitivity as normal zappers (Space Shadow does use white-rectangles, but doesn't output black-background; the tunnel-backgrounds are fairly dark, but the backgrounds at tunnel-end are very bright, even including some white pixels; so apparently, the hypershot gun senses light only when aimed at all-white-pixels areas).
There seems to be some sort of rumble/vibration feature (called "Body Vibration System" on the gun, and "Gun Move" in Space Shadow).
And, some "Sound" feature (can be enabled/disabled in Space Shadow title screen), details are unknown; maybe causing the gun to produce sounds when pulling the trigger, or maybe simply outputting the APU sound/music to a speaker in the gun?
Note: Bandai's "Hyper Shot" Lightgun is not to be confused with Konami's "Hyper Shot" Push Buttons.
Ah I forgot about the everynes doc! Great! It looks like you could build a Bandai Hypershot using a Famicom light gun or Zapper, a controller, a speaker and amplifier, a rumble device and some logic for enabling/disabling sound and vibration. Though the standard Zapper has a trigger that works in a different way and the photosensor is also different so the FC-lightgun/Zapper might not be ideal.
Anyway back to Kickle Cubicle. It looks like it uses both output pins for turning audio and vibration ON/OFF respectively so that means it's indeed using the audio output pin for the audio. So all APU sound should come out the gun.
Probably the game supports some kind of device that uses those two output pins for something else and as you happened to have a Hypershot connected it enabled the sound output instead when trying to communicate with this device.
Taking a glance at the game code I found this:
;At $1C99D ROM image offset:
0000 A9 05 LDA #$05
0002 8D 16 40 STA $4016 ;this enables gun sound output, disables vibration
0005 EA NOP
0006 EA NOP
0007 A9 04 LDA #$04
0009 8D 16 40 STA $4016 ;enables it again, disables vibration again
000C A2 08 LDX #$08
000E A0 00 LDY #$00
0010 B1 0A LDA ($0A),Y
0012 85 0F STA $0F
0014 4A LSR A
0015 05 0F ORA $0F
0017 4A LSR A
0018 26 0E ROL $0E
001A CA DEX
001B D0 F3 BNE $0010
001D A0 01 LDY #$01
001F B1 08 LDA ($08),Y
0021 45 0E EOR $0E
0023 25 0E AND $0E
0025 85 0F STA $0F
0027 C8 INY
0028 B1 08 LDA ($08),Y
002A 25 0E AND $0E
002C 05 0F ORA $0F
002E A0 00 LDY #$00
0030 91 08 STA ($08),Y
0032 A5 0E LDA $0E
0034 C8 INY
0035 91 08 STA ($08),Y
0037 60 RTS
It looks like a Family BASIC keyboard read at first, but that requires 6 NOPs not 2, and it does something else later. Things like Mahjong controllers also reads a matrix of buttons using the output pins like this. Turbo File could be another possibility.
Anyone knows if Meikyuujima or Kickle Cubicle supports any kind of special peripherals?
@ P
Yeah, as I think you've figured out, I hadn't manually muted the TV. The TV was simply getting no audio information from the Famicom, which was instead channeling all of it through the speaker of my Hypershot.
Some/most of these code lines are above my level of technical expertise, but I'm glad this has been an interesting puzzle for y'all.
Quote from: P on February 03, 2020, 10:11:24 am0000 A9 05 LDA #$05
0002 8D 16 40 STA $4016 ;this enables gun sound output, disables vibration
0005 EA NOP
0006 EA NOP
0007 A9 04 LDA #$04
0009 8D 16 40 STA $4016 ;enables it again, disables vibration again
000C A2 08 LDX #$08
000E A0 00 LDY #$00
0010 B1 0A LDA ($0A),Y
0012 85 0F STA $0F
0014 4A LSR A
0015 05 0F ORA $0F
0017 4A LSR A
0018 26 0E ROL $0E
001A CA DEX
001B D0 F3 BNE $0010
Just seems like a controller reading routine. Not sure why they would use #$05 and #$04 instead of #$01 and #$00, or why they would NOP NOP, but either way it's flipping bit 0 so the controller input can be read.
But they never read $4016 in this routine so if it's for reading standard controllers (or anything else) it isn't complete. Unless $0A is pointing to input ports $4016 or $4017?
Values #$05 and #$04 would work for standard controllers but it's also exactly what you use when reading the keyboard matrix. The two NOPs also sounds like whatever device it's reading, it requires a small delay, although I guess they might just throw them in there for paranoia's sake.
One possibility is that it is part of code no longer used (I found this just by looking for a write to $4016 and didn't look very hard), or that it's code taken from another game that supports a certain peripheral and they didn't bother changing it with this game.
Quote from: nerdynebraskan on February 03, 2020, 02:24:11 pm@ P
Yeah, as I think you've figured out, I hadn't manually muted the TV. The TV was simply getting no audio information from the Famicom, which was instead channeling all of it through the speaker of my Hypershot.
No I had no idea that the Famicom mutes sound output when you take sound from the expansion port, but I guess that makes sense (for use with headphones for example).
But in that case, I guess Space Shadow may manipulate this and only enable sound in the gun when certain effects happens (like when shooting) and disabling it again when it want to use the TV speaker again (like for BGM or other sound effects). If it's possible to switch between those two very fast using the output ports, I guess it might not be noticeble to the user, and it would appear that music comes from the TV all the time and gunshot SEs comes from the gun at the same time (I may very well be totally wrong though).
Quote from: P on February 04, 2020, 02:25:19 amBut they never read $4016 in this routine so if it's for reading standard controllers (or anything else) it isn't complete. Unless $0A is pointing to input ports $4016 or $4017?
I did a quick check in the debugger and $0A is #$4016. Definitely the controller reading routine.