|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
|
INlib: A controller input library for SMS
Posted: Fri Sep 16, 2022 5:14 am
|
I like supporting less common peripherals in my projects, such as Paddles, the Sports Pad and the Mega Mouse. Recently I decided it was time to stop copying code between projects and make a library that I could share:
https://github.com/raphnet/inlib I almost always use devkitSMS, so naturally my library is usable in C, but I only use __naked __z88dk_fastcall functions implemented in inline assembly. I believe converting this for use in pure assembly would be easy. I tested everything on real hardware, on both PAL and NTSC systems. I also tested on Mark III for the Sports Pad in Mark-III mode. My most recently published project (SKBN v2) uses this library to support the Sports Pad and the Sega Mega Mouse. https://www.raphnet.net/programmation/skbn/index_en.php |
|
|
Posted: Fri Sep 16, 2022 8:14 am |
Nice one @raphnet! That's some really neat code :)
Loving the support for different controllers, e.g. MD controller, nice touch. |
|
|
Posted: Fri Sep 16, 2022 9:34 am |
Nice, @raphnet! 6btn MD support! | |
|
Posted: Fri Sep 16, 2022 12:41 pm |
MD pads (6 and 3 button versions) were already supported by SMSlib (deactivated since nobody seemed to need that)... but this is a very nice library to support exotic peripherals with multiple different configurations so it's extremely useful :)
edit: also, this library supports MD pads in both ports whereas SMSlib support was limited to the first player only (and never bothered adding more because there was no demand...) so I guess it means I'll probably remove that support completely sooner or later and suggest to use INlib instead. a wonderful addition would be to support the light gun(s), though nowadays these are somewhat less usable (due to the fact that they works only with CRTs) so I don't even know if it's worth bothering... |
|
|
Posted: Sun Sep 18, 2022 1:49 am |
I should have a light gun soon for testing, I intend to add support for those soon. Even if the demand is probably very low, it should be be fun to add! I may even make a mini-game to demonstrate. | |
|
Posted: Sun Sep 18, 2022 8:57 am |
How about Terebi Oekaki and drawing board support? :) they are somewhat supported by emulators but we might get homebrew versions if they are more widely used.
Also how about supporting the Mega Drive multi tap devices? I’ve always meant to do that to enable some sort of many-player game. |
|
|
Posted: Tue Sep 20, 2022 9:06 am |
Today I added Light Phaser support. Tested in both ports on real hardware.
I'll try to add drawing board and/or Terebi Oekaki support soon. Multitaps too are possible, the protocol is very similar to the mouse so it should not be too difficult... |
|
|
Posted: Tue Sep 20, 2022 10:29 am |
I would love a good one player - two guns game! :D I just need a CRT and an additional gun... |
|
|
Posted: Tue Sep 20, 2022 12:04 pm |
This is how I most enjoy playing Gangster Town! |
|
|
Posted: Tue Sep 20, 2022 4:27 pm |
I have two Saturn Virtua Guns and play Virtua Cop 2 like that :) |
|
|
Posted: Tue Sep 27, 2022 2:49 am |
Last week I added support for the Graphic Board. Of course only tested in Emulation.
Next I think I'll add Megadrive Multitap support.[/quote] |
|