again, I'm looking for some informations to improve the compatibility of the NGC Genesis PLus port and it looks like this forum is the only one around that is still really active for Megadrive technical stuff
Actually, I have some questions about special peripherals such as the Sega Menacer and the Multiplayer adapters.
First, about the Menacer (and other compatible lightguns),I only found infos in the Charles Mc Donald's VDP documentation, and if I'm not getting wrong, it works quite like the MS Light Phaser except that the console uses INT2 to inform the software that TH input value has changed (no more polling needed on the input ports) which means that the pixel lightbeam has been detected.
For people who know how software usually do to support lightgun on the Megadrive, do you think the following implementation in an emulator could work ?
1) at the beginning of each frame, use analog input to update the current X and Y position of the "simulated" lightgun
2) in the main loop, at each line, test the distance between the current line and the lightgun Y pos
3) if the distance is less than a determined range (let say 5 lines) and TH is set as an input then:
. set TH bit in IO data port to zero.
. if Hcount latch is set in VDP register, then fix the value of Hcounter that must be returned on next HVC read (made some calculations according to the current lightgun Hposition and the former calculated Vertical distance to simulate a "circular" area)
. if INT level 2 is enabled, trigger it
Secondly, about multiplayer adapters, I didn't found any technical informations on how software use them. I could directly read in Gens sourcecode for TeamPlay support but I was wondering if technical notes exist ?
Any suggestions or help would be greatly appreciated
thanks