diff --git a/.idea/editor.xml b/.idea/editor.xml new file mode 100644 index 0000000..66c8679 --- /dev/null +++ b/.idea/editor.xml @@ -0,0 +1,102 @@ + + + + + \ No newline at end of file diff --git a/cpu/CMakeLists.txt b/cpu/CMakeLists.txt index 8f62661..9cb24fa 100644 --- a/cpu/CMakeLists.txt +++ b/cpu/CMakeLists.txt @@ -1,5 +1,5 @@ -set(HEADERS cpu.h decoding.h memory.h op.h) -set(SOURCE cpu.c decoding.c memory.c op.c) +set(HEADERS cpu.h decoding.h memory.h op.h input.h) +set(SOURCE cpu.c decoding.c memory.c op.c input.h) add_library(nes_cpu ${SOURCE} ${HEADERS}) diff --git a/cpu/input.c b/cpu/input.c new file mode 100644 index 0000000..5ab7139 --- /dev/null +++ b/cpu/input.c @@ -0,0 +1,5 @@ +// +// Created by william on 10/6/24. +// + +#include "input.h" diff --git a/cpu/input.h b/cpu/input.h new file mode 100644 index 0000000..1cd5fd4 --- /dev/null +++ b/cpu/input.h @@ -0,0 +1,17 @@ +// +// Created by william on 10/6/24. +// + +#ifndef NES_EMULATOR_INPUT_H +#define NES_EMULATOR_INPUT_H + +#define INPUT_BTN_A 0 +#define INPUT_BTN_B 1 +#define INPUT_BTN_SELECT 2 +#define INPUT_BTN_START 3 +#define INPUT_BTN_UP 4 +#define INPUT_BTN_DOWN 5 +#define INPUT_BTN_LEFT 6 +#define INPUT_BTN_RIGHT 7 + +#endif //NES_EMULATOR_INPUT_H