bsnes/sfc/system/input.hpp

40 lines
777 B
C++
Raw Normal View History

struct Input {
enum class Device : unsigned {
Joypad,
Multitap,
Mouse,
SuperScope,
Justifier,
Justifiers,
USART,
Update to v088r14 release. byuu says: Changelog: - added NSS DIP switch settings window (when loading NSS carts with appropriate manifest.xml file) - added video shader selection (they go in ~/.config/bsnes/Video Shaders/ now) - added driver selection - added timing settings (not only allows video/audio settings, also has code to dynamically compute the values for you ... and it actually works pretty good!) - moved "None" controller device to bottom of list (it is the least likely to be used, after all) - added Interface::path() to support MSU1, USART, Link - input and hotkey mappings remember list position after assignment - and more! target-ethos now has all of the functionality of target-ui, and more. Final code size for the port is 101.2KB (ethos) vs 167.6KB (ui). A ~67% reduction in code size, yet it does even more! And you can add or remove an entire system with only three lines of code (Makefile include, header include, interface append.) The only problem left is that the BS-X BIOS won't load the BS Zelda no Densetsu file. I can't figure out why it's not working, would appreciate any assistance, but otherwise I'm probably just going to leave it broken for v089, sorry. So the show stoppers for a new release at this point are: - fix laevateinn to compile with the new interface changes (shouldn't be too hard, it'll still use the old, direct interface.) - clean up Emulator::Interface as much as possible (trim down Information, mediaRequest should use an alternate struct designed to load firmware / slots separately) - enhance purify to strip SNES ROM headers, and it really needs a GUI interface - it would be highly desirable to make a launcher that can create a cartridge folder from an existing ROM set (* ethos will need to accept command-line arguments for this.) - probably need to remember which controller was selected in each port for each system across runs - need to fix the cursor for Super Scope / Justifier games (move from 19-bit to 32-bit colors broke it) - have to refactor that cache.(hv)offset thing to fix ASP
2012-05-06 23:27:42 +00:00
None,
};
enum class JoypadID : unsigned {
B = 0, Y = 1, Select = 2, Start = 3,
Up = 4, Down = 5, Left = 6, Right = 7,
A = 8, X = 9, L = 10, R = 11,
};
enum class MouseID : unsigned {
X = 0, Y = 1, Left = 2, Right = 3,
};
enum class SuperScopeID : unsigned {
X = 0, Y = 1, Trigger = 2, Cursor = 3, Turbo = 4, Pause = 5,
};
enum class JustifierID : unsigned {
X = 0, Y = 1, Trigger = 2, Start = 3,
};
Controller* port1 = nullptr;
Controller* port2 = nullptr;
void connect(bool port, Input::Device id);
Input();
~Input();
};
extern Input input;