Changes
3 changed files (+23/-3)
-
-
@@ -5,4 +5,5 @@ roms*.nes build LaiNES .vscode .vscode *.exe
-
-
-
@@ -8,7 +8,7 @@ |____/ \__,_|\__,_|_| \_|______|_____/EMULATOR ``` A nearly complete NES emulator in only 700 lines of C++, based on [LaiNES](https://github.com/AndreaOrru/LaiNES). A nearly complete NES emulator in a single 700-line C++ source file, based on [LaiNES](https://github.com/AndreaOrru/LaiNES). ``` cloc main.cpp
-
@@ -33,11 +33,18 @@ - C++11- SDL2 ## Building ### *nix systems ```sh git clone --recursive https://github.com/Ta180m/BadNES && cd BadNES g++ main.cpp -o badnes -std=c++11 -lSDL2main -lSDL2 ``` ### Windows ```sh git clone --recursive https://github.com/Ta180m/BadNES && cd BadNES g++ main.cpp -o badnes -std=c++11 -IC:\mingw\include\SDL2 -LC:\mingw\lib -w -Wl,-subsystem,windows -lmingw32 -lSDL2main -lSDL2 ``` ## Usage ```sh ./badnes [path to rom]
-
@@ -53,6 +60,19 @@ - MMC3, MMC6 / TxROM (Mapper 004)You can check the compatibility for each ROM in the following list: http://tuxnes.sourceforge.net/nesmapper.txt ## FAQ ### Why the name? http://www.usaco.org/index.php?page=viewproblem2&cpid=1041 ### Why did you do this? I really like LaiNES: it's very minimal and compact -- but it has several dependencies, so I try to write the shortest NES emulator possible, in a single source file. ### There's no sound! I'm working on it right now. ### What do you mean by "nearly complete"? I will declare it complete once I finish implementing the APU, savestates, and maybe Mapper 7. ## Credits Special thanks to [Andrea Orru](https://github.com/AndreaOrru) for creating [LaiNES](https://github.com/AndreaOrru/LaiNES), the emulator that this project derives much of its code from.
-
-
-
@@ -757,7 +757,6 @@ keys = SDL_GetKeyboardState(0);} // Get the joypad state from SDL u8 get_joypad_state(int n) { const int DEAD_ZONE = 8000; u8 j = 0; j |= keys[KEY_A] << 0; j |= keys[KEY_B] << 1; j |= keys[KEY_SELECT] << 2; j |= keys[KEY_START] << 3; j |= keys[KEY_UP] << 4; j |= keys[KEY_DOWN] << 5; j |= keys[KEY_LEFT] << 6; j |= keys[KEY_RIGHT] << 7;
-