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.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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_