NESe (pronounced "Nessie") is a NES emulator based on the e6502 emulator, also written in C with a focus on speed and portability for use on embedded platforms, especially ARM.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
422B

  1. #ifndef NESE_INPUT_H_
  2. #define NESE_INPUT_H_
  3. #define nes_controller_bus_mask (0b11111000)
  4. typedef enum {
  5. Button_A = 0,
  6. Button_B,
  7. Button_Select,
  8. Button_Start,
  9. Button_Up,
  10. Button_Down,
  11. Button_Left,
  12. Button_Right,
  13. } nes_Input_Button;
  14. typedef struct {
  15. uint8_t buttons;
  16. int8_t shift;
  17. } nes_Gamepad;
  18. typedef struct {
  19. nes_Gamepad gamepads[2];
  20. } nes_Input;
  21. #endif // NESE_INPUT_H_