diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index bec9971..c5f67eb 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -26,4 +26,5 @@ jobs: - uses: actions/upload-artifact@v4 with: name: meson-logs - path: build/meson-logs/ \ No newline at end of file + path: build/meson-logs/ + \ No newline at end of file diff --git a/meson.build b/meson.build index f530726..3005132 100644 --- a/meson.build +++ b/meson.build @@ -47,7 +47,7 @@ quickerNESTester = executable('quickerNESTester', quickNESTester = executable('quickNESTester', 'source/tester.cpp', - cpp_args : [ commonCompileArgs, '-Wno-multichar', '-DDISABLE_AUTO_FILE', '-D__LIBRETRO__', '-DNDEBUG', '-DBLARGG_NONPORTABLE' ], + cpp_args : [ commonCompileArgs, '-w', '-DDISABLE_AUTO_FILE', '-D__LIBRETRO__', '-DNDEBUG', '-DBLARGG_NONPORTABLE' ], dependencies : [ quickNESDependency, toolDependency ], include_directories : include_directories(['../extern/json']) ) diff --git a/source/emuInstance.hpp b/source/emuInstance.hpp index 028978e..8878578 100644 --- a/source/emuInstance.hpp +++ b/source/emuInstance.hpp @@ -64,38 +64,14 @@ class EmuInstance std::string moveString = "|..|........|"; #endif - if (move & 0b00010000) - moveString += 'U'; - else - moveString += '.'; - if (move & 0b00100000) - moveString += 'D'; - else - moveString += '.'; - if (move & 0b01000000) - moveString += 'L'; - else - moveString += '.'; - if (move & 0b10000000) - moveString += 'R'; - else - moveString += '.'; - if (move & 0b00001000) - moveString += 'S'; - else - moveString += '.'; - if (move & 0b00000100) - moveString += 's'; - else - moveString += '.'; - if (move & 0b00000010) - moveString += 'B'; - else - moveString += '.'; - if (move & 0b00000001) - moveString += 'A'; - else - moveString += '.'; + if (move & 0b00010000) moveString += 'U'; else moveString += '.'; + if (move & 0b00100000) moveString += 'D'; else moveString += '.'; + if (move & 0b01000000) moveString += 'L'; else moveString += '.'; + if (move & 0b10000000) moveString += 'R'; else moveString += '.'; + if (move & 0b00001000) moveString += 'S'; else moveString += '.'; + if (move & 0b00000100) moveString += 's'; else moveString += '.'; + if (move & 0b00000010) moveString += 'B'; else moveString += '.'; + if (move & 0b00000001) moveString += 'A'; else moveString += '.'; moveString += "|"; return moveString; @@ -108,8 +84,6 @@ class EmuInstance advanceStateImpl(moveStringToCode(move), 0); } - inline size_t getStateSize() const { return _stateSize; } - inline size_t getLiteStateSize() const { return _liteStateSize; } inline std::string getRomSHA1() const { return _romSHA1String; } inline hash_t getStateHash() const @@ -117,9 +91,9 @@ class EmuInstance MetroHash128 hash; hash.Update(getLowMem(), _LOW_MEM_SIZE); - hash.Update(getHighMem(), _HIGH_MEM_SIZE); - hash.Update(getNametableMem(), _NAMETABLES_MEM_SIZE); - hash.Update(getChrMem(), getChrMemSize()); + // hash.Update(getHighMem(), _HIGH_MEM_SIZE); + // hash.Update(getNametableMem(), _NAMETABLES_MEM_SIZE); + // hash.Update(getChrMem(), getChrMemSize()); hash_t result; hash.Finalize(reinterpret_cast(&result)); @@ -134,14 +108,14 @@ class EmuInstance std::string stateData; bool status = loadStringFromFile(stateData, stateFilePath); if (status == false) EXIT_WITH_ERROR("Could not find/read state file: %s\n", stateFilePath.c_str()); - deserializeState((uint8_t *)stateData.data()); + deserializeFullState((uint8_t *)stateData.data()); } inline void saveStateFile(const std::string &stateFilePath) const { std::string stateData; - stateData.resize(_stateSize); - serializeState((uint8_t *)stateData.data()); + stateData.resize(_fullStateSize); + serializeFullState((uint8_t *)stateData.data()); saveStringToFile(stateData, stateFilePath.c_str()); } @@ -159,10 +133,10 @@ class EmuInstance if (status == false) EXIT_WITH_ERROR("Could not process ROM file: %s\n", romFilePath.c_str()); // Detecting full state size - _stateSize = getStateSizeImpl(); + _fullStateSize = getFullStateSize(); // Detecting lite state size - _liteStateSize = getLiteStateSizeImpl(); + _liteStateSize = getLiteStateSize(); } // Virtual functions @@ -174,10 +148,15 @@ class EmuInstance virtual uint8_t *getHighMem() const = 0; virtual const uint8_t *getChrMem() const = 0; virtual size_t getChrMemSize() const = 0; - virtual void serializeState(uint8_t *state) const = 0; - virtual void deserializeState(const uint8_t *state) = 0; - virtual size_t getStateSizeImpl() const = 0; - virtual size_t getLiteStateSizeImpl() const { return getStateSizeImpl(); }; + virtual void serializeFullState(uint8_t *state) const = 0; + virtual void deserializeFullState(const uint8_t *state) = 0; + virtual void serializeLiteState(uint8_t *state) const = 0; + virtual void deserializeLiteState(const uint8_t *state) = 0; + virtual size_t getFullStateSize() const = 0; + virtual size_t getLiteStateSize() const = 0; + virtual void enableLiteStateBlock(const std::string& block) = 0; + virtual void disableLiteStateBlock(const std::string& block) = 0; + virtual void doSoftReset() = 0; virtual void doHardReset() = 0; virtual std::string getCoreName() const = 0; @@ -190,7 +169,7 @@ class EmuInstance size_t _liteStateSize; // Storage for the full state size - size_t _stateSize; + size_t _fullStateSize; // Flag to determine whether to enable/disable rendering bool _doRendering = true; diff --git a/source/playbackInstance.hpp b/source/playbackInstance.hpp index 3f26f9b..db8ab38 100644 --- a/source/playbackInstance.hpp +++ b/source/playbackInstance.hpp @@ -29,13 +29,16 @@ struct stepData_t class PlaybackInstance { + static const uint16_t image_width = 256; + static const uint16_t image_height = 240; + public: void addStep(const std::string &input) { stepData_t step; step.input = input; - step.stateData = (uint8_t *)malloc(_emu->getStateSize()); - _emu->serializeState(step.stateData); + step.stateData = (uint8_t *)malloc(_emu->getFullStateSize()); + _emu->serializeFullState(step.stateData); step.hash = _emu->getStateHash(); // Adding the step into the sequence @@ -50,8 +53,8 @@ class PlaybackInstance // Loading Emulator instance HQN _hqnState.setEmulatorPointer(_emu->getInternalEmulatorPointer()); - static uint8_t video_buffer[emulator_t::image_width * emulator_t::image_height]; - _hqnState.m_emu->set_pixels(video_buffer, emulator_t::image_width + 8); + static uint8_t video_buffer[image_width * image_height]; + _hqnState.m_emu->set_pixels(video_buffer, image_width + 8); // Building sequence information for (const auto &input : sequence) @@ -166,7 +169,7 @@ class PlaybackInstance if (stepId > 0) { const auto stateData = getStateData(stepId - 1); - _emu->deserializeState(stateData); + _emu->deserializeFullState(stateData); _emu->advanceState(getStateInput(stepId - 1)); } diff --git a/source/player.cpp b/source/player.cpp index 6ddae77..66de329 100644 --- a/source/player.cpp +++ b/source/player.cpp @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) auto p = PlaybackInstance(&e, sequence); // Getting state size - auto stateSize = e.getStateSize(); + auto stateSize = e.getFullStateSize(); // Flag to continue running playback bool continueRunning = true; diff --git a/source/quickNES/quickNESInstance.hpp b/source/quickNES/quickNESInstance.hpp index 46d5c30..2c451ed 100644 --- a/source/quickNES/quickNESInstance.hpp +++ b/source/quickNES/quickNESInstance.hpp @@ -45,20 +45,37 @@ class QuickNESInstance : public EmuInstance const uint8_t *getChrMem() const override { return _nes->chr_mem(); }; size_t getChrMemSize() const override { return _nes->chr_size(); }; - void serializeState(uint8_t *state) const override + void serializeLiteState(uint8_t *state) const override { serializeFullState(state); } + void deserializeLiteState(const uint8_t *state) override { deserializeFullState(state); } + inline size_t getLiteStateSize() const override { return getFullStateSize(); } + + void enableLiteStateBlock(const std::string& block) override {}; + void disableLiteStateBlock(const std::string& block) override {}; + + void serializeFullState(uint8_t *state) const override { - Mem_Writer w(state, _stateSize, 0); + Mem_Writer w(state, _fullStateSize, 0); Auto_File_Writer a(w); _nes->save_state(a); } - void deserializeState(const uint8_t *state) override + void deserializeFullState(const uint8_t *state) override { - Mem_File_Reader r(state, _stateSize); + Mem_File_Reader r(state, _fullStateSize); Auto_File_Reader a(r); _nes->load_state(a); } + inline size_t getFullStateSize() const override + { + uint8_t *data = (uint8_t *)malloc(_DUMMY_SIZE); + Mem_Writer w(data, _DUMMY_SIZE); + Auto_File_Writer a(w); + _nes->save_state(a); + free(data); + return w.size(); + } + void advanceStateImpl(const inputType controller1, const inputType controller2) override { if (_doRendering == true) _nes->emulate_frame(controller1, controller2); @@ -72,15 +89,6 @@ class QuickNESInstance : public EmuInstance void *getInternalEmulatorPointer() const override { return _nes; } private: - inline size_t getStateSizeImpl() const override - { - uint8_t *data = (uint8_t *)malloc(_DUMMY_SIZE); - Mem_Writer w(data, _DUMMY_SIZE); - Auto_File_Writer a(w); - _nes->save_state(a); - free(data); - return w.size(); - } // Video buffer uint8_t *video_buffer; diff --git a/source/quickerNES/apu/Blip_Buffer.cpp b/source/quickerNES/apu/blipBuffer.cpp similarity index 98% rename from source/quickerNES/apu/Blip_Buffer.cpp rename to source/quickerNES/apu/blipBuffer.cpp index 7252d7b..568db77 100644 --- a/source/quickerNES/apu/Blip_Buffer.cpp +++ b/source/quickerNES/apu/blipBuffer.cpp @@ -1,11 +1,11 @@ // Blip_Buffer 0.4.0. http://www.slack.net/~ant/ -#include "Blip_Buffer.hpp" -#include -#include -#include -#include +#include +#include +#include +#include +#include "blipBuffer.hpp" /* Copyright (C) 2003-2006 Shay Green. This module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser diff --git a/source/quickerNES/apu/Blip_Buffer.hpp b/source/quickerNES/apu/blipBuffer.hpp similarity index 100% rename from source/quickerNES/apu/Blip_Buffer.hpp rename to source/quickerNES/apu/blipBuffer.hpp diff --git a/source/quickerNES/apu/buffer.hpp b/source/quickerNES/apu/buffer.hpp index d368dd5..c55642a 100644 --- a/source/quickerNES/apu/buffer.hpp +++ b/source/quickerNES/apu/buffer.hpp @@ -3,8 +3,8 @@ // NES non-linear audio buffer // Emu 0.7.0 -#include "Multi_Buffer.hpp" #include +#include "multiBuffer.hpp" namespace quickerNES { diff --git a/source/quickerNES/apu/effectsBuffer.hpp b/source/quickerNES/apu/effectsBuffer.hpp index b5ae33c..6878c58 100644 --- a/source/quickerNES/apu/effectsBuffer.hpp +++ b/source/quickerNES/apu/effectsBuffer.hpp @@ -3,8 +3,8 @@ // Multi-channel effects buffer with panning, echo and reverb // Game_Music_Emu 0.3.0 -#include "Multi_Buffer.hpp" #include +#include "multiBuffer.hpp" namespace quickerNES { diff --git a/source/quickerNES/apu/fme7/apu.hpp b/source/quickerNES/apu/fme7/apu.hpp index 503b1d9..b7397ff 100644 --- a/source/quickerNES/apu/fme7/apu.hpp +++ b/source/quickerNES/apu/fme7/apu.hpp @@ -4,7 +4,7 @@ // Emu 0.7.0 #include -#include "apu/Blip_Buffer.hpp" +#include "apu/blipBuffer.hpp" namespace quickerNES { diff --git a/source/quickerNES/apu/Multi_Buffer.cpp b/source/quickerNES/apu/multiBuffer.cpp similarity index 99% rename from source/quickerNES/apu/Multi_Buffer.cpp rename to source/quickerNES/apu/multiBuffer.cpp index e9a2353..5583c94 100644 --- a/source/quickerNES/apu/Multi_Buffer.cpp +++ b/source/quickerNES/apu/multiBuffer.cpp @@ -1,8 +1,8 @@ // Blip_Buffer 0.4.0. http://www.slack.net/~ant/ -#include "Multi_Buffer.hpp" #include +#include "multiBuffer.hpp" /* Copyright (C) 2003-2006 Shay Green. This module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser diff --git a/source/quickerNES/apu/Multi_Buffer.hpp b/source/quickerNES/apu/multiBuffer.hpp similarity index 99% rename from source/quickerNES/apu/Multi_Buffer.hpp rename to source/quickerNES/apu/multiBuffer.hpp index 20a1ff3..461af0f 100644 --- a/source/quickerNES/apu/Multi_Buffer.hpp +++ b/source/quickerNES/apu/multiBuffer.hpp @@ -4,7 +4,7 @@ // Multi-channel sound buffer interface, and basic mono and stereo buffers // Blip_Buffer 0.4.0 -#include "Blip_Buffer.hpp" +#include "blipBuffer.hpp" namespace quickerNES { diff --git a/source/quickerNES/apu/namco/apu.cpp b/source/quickerNES/apu/namco/apu.cpp index b6064a4..5cc6831 100644 --- a/source/quickerNES/apu/namco/apu.cpp +++ b/source/quickerNES/apu/namco/apu.cpp @@ -2,7 +2,7 @@ // Snd_Emu 0.1.7. http://www.slack.net/~ant/ #include "apu/namco/apu.hpp" -#include "apu/Blip_Buffer.hpp" +#include "apu/blipBuffer.hpp" /* Copyright (C) 2003-2006 Shay Green. This module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser diff --git a/source/quickerNES/apu/oscs.hpp b/source/quickerNES/apu/oscs.hpp index 88e8b24..302f0dd 100644 --- a/source/quickerNES/apu/oscs.hpp +++ b/source/quickerNES/apu/oscs.hpp @@ -4,7 +4,7 @@ // Private oscillators used by Apu // Snd_Emu 0.1.7 -#include "Blip_Buffer.hpp" +#include "blipBuffer.hpp" namespace quickerNES { diff --git a/source/quickerNES/apu/vrc6/apu.hpp b/source/quickerNES/apu/vrc6/apu.hpp index 6e3dcec..e25e057 100644 --- a/source/quickerNES/apu/vrc6/apu.hpp +++ b/source/quickerNES/apu/vrc6/apu.hpp @@ -5,7 +5,7 @@ // Snd_Emu 0.1.7 #include -#include "apu/Blip_Buffer.hpp" +#include "apu/blipBuffer.hpp" #include "apu/apu.hpp" namespace quickerNES diff --git a/source/quickerNES/apu/vrc7/apu.hpp b/source/quickerNES/apu/vrc7/apu.hpp index c48949f..dae5e37 100644 --- a/source/quickerNES/apu/vrc7/apu.hpp +++ b/source/quickerNES/apu/vrc7/apu.hpp @@ -5,7 +5,7 @@ // Snd_Emu 0.1.7. Copyright (C) 2003-2005 Shay Green. GNU LGPL license. #include -#include "apu/Blip_Buffer.hpp" +#include "apu/blipBuffer.hpp" #include "apu/vrc7/emu2413_state.hpp" namespace quickerNES diff --git a/source/quickerNES/core.hpp b/source/quickerNES/core.hpp index f0f3b62..018d716 100644 --- a/source/quickerNES/core.hpp +++ b/source/quickerNES/core.hpp @@ -48,6 +48,13 @@ struct nes_state_t uint32_t frame_count; // number of frames emulated since power-up }; +struct nes_state_lite_t +{ + uint16_t timestamp; // CPU clocks * 15 (for NTSC) + uint8_t frame_count; // number of frames emulated since power-up +}; + + struct joypad_state_t { uint32_t joypad_latches[2]; // joypad 1 & 2 shift registers @@ -73,6 +80,20 @@ class Core : private Cpu typedef Cpu cpu; public: + + // Flags for lite state storage + bool TIMEBlockEnabled = true; + bool CPURBlockEnabled = true; + bool PPURBlockEnabled = true; + bool APURBlockEnabled = true; + bool CTRLBlockEnabled = true; + bool MAPRBlockEnabled = true; + bool LRAMBlockEnabled = true; + bool SPRTBlockEnabled = true; + bool NTABBlockEnabled = true; + bool CHRRBlockEnabled = true; + bool SRAMBlockEnabled = true; + Core() : ppu(this) { cart = NULL; @@ -129,93 +150,7 @@ class Core : private Cpu reset(true, true); } - size_t getLiteStateSize() const - { - size_t size = 0; - - size += sizeof(nes_state_t); - size += sizeof(registers_t); - size += sizeof(ppu_state_t); - size += sizeof(Apu::apu_state_t); - size += sizeof(joypad_state_t); - size += mapper->state_size; - size += low_ram_size; - size += Ppu::spr_ram_size; - size_t nametable_size = 0x800; - if (ppu.nt_banks[3] >= &ppu.impl->nt_ram[0xC00]) nametable_size = 0x1000; - size += nametable_size; - if (ppu.chr_is_writable) size += ppu.chr_size; - if (sram_present) size += impl->sram_size; - - return size; - } - - size_t getStateSize() const - { - size_t size = 0; - - size += sizeof(char[4]); // NESS Block - size += sizeof(uint32_t); // Block Size - - size += sizeof(char[4]); // TIME Block - size += sizeof(uint32_t); // Block Size - size += sizeof(nes_state_t); - - size += sizeof(char[4]); // CPUR Block - size += sizeof(uint32_t); // Block Size - size += sizeof(registers_t); - - size += sizeof(char[4]); // PPUR Block - size += sizeof(uint32_t); // Block Size - size += sizeof(ppu_state_t); - - size += sizeof(char[4]); // APUR Block - size += sizeof(uint32_t); // Block Size - size += sizeof(Apu::apu_state_t); - - size += sizeof(char[4]); // CTRL Block - size += sizeof(uint32_t); // Block Size - size += sizeof(joypad_state_t); - - size += sizeof(char[4]); // MAPR Block - size += sizeof(uint32_t); // Block Size - size += mapper->state_size; - - size += sizeof(char[4]); // LRAM Block - size += sizeof(uint32_t); // Block Size - size += low_ram_size; - - size += sizeof(char[4]); // SPRT Block - size += sizeof(uint32_t); // Block Size - size += Ppu::spr_ram_size; - - size += sizeof(char[4]); // NTAB Block - size += sizeof(uint32_t); // Block Size - size_t nametable_size = 0x800; - if (ppu.nt_banks[3] >= &ppu.impl->nt_ram[0xC00]) nametable_size = 0x1000; - size += nametable_size; - - if (ppu.chr_is_writable) - { - size += sizeof(char[4]); // CHRR Block - size += sizeof(uint32_t); // Block Size - size += ppu.chr_size; - } - - if (sram_present) - { - size += sizeof(char[4]); // SRAM Block - size += sizeof(uint32_t); // Block Size - size += impl->sram_size; - } - - size += sizeof(char[4]); // gend Block - size += sizeof(uint32_t); // Block Size - - return size; - } - - size_t serializeState(uint8_t *buffer) const + size_t serializeFullState(uint8_t *buffer) const { size_t pos = 0; std::string headerCode; @@ -225,9 +160,9 @@ class Core : private Cpu headerCode = "NESS"; // NESS Block blockSize = 0xFFFFFFFF; - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; headerCode = "TIME"; // TIME Block @@ -235,11 +170,11 @@ class Core : private Cpu state.timestamp *= 5; blockSize = sizeof(nes_state_t); dataSource = (void *)&state; - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; - memcpy(&buffer[pos], dataSource, blockSize); + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); pos += blockSize; headerCode = "CPUR"; // CPUR Block @@ -253,72 +188,72 @@ class Core : private Cpu s.p = r.status; blockSize = sizeof(cpu_state_t); dataSource = (void *)&s; - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; - memcpy(&buffer[pos], dataSource, blockSize); + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); pos += blockSize; headerCode = "PPUR"; // PPUR Block blockSize = sizeof(ppu_state_t); dataSource = (void *)&ppu; - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; - memcpy(&buffer[pos], dataSource, blockSize); + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); pos += blockSize; headerCode = "APUR"; // APUR Block Apu::apu_state_t apuState; impl->apu.save_state(&apuState); blockSize = sizeof(Apu::apu_state_t); - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; - memcpy(&buffer[pos], &apuState, blockSize); + if (buffer != nullptr) memcpy(&buffer[pos], &apuState, blockSize); pos += blockSize; headerCode = "CTRL"; // CTRL Block blockSize = sizeof(joypad_state_t); dataSource = (void *)&joypad; - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; - memcpy(&buffer[pos], dataSource, blockSize); + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); pos += blockSize; headerCode = "MAPR"; // MAPR Block blockSize = mapper->state_size; dataSource = (void *)mapper->state; - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; - memcpy(&buffer[pos], dataSource, blockSize); + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); pos += blockSize; headerCode = "LRAM"; // LRAM Block blockSize = low_ram_size; dataSource = (void *)low_mem; - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; - memcpy(&buffer[pos], dataSource, blockSize); + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); pos += blockSize; headerCode = "SPRT"; // SPRT Block blockSize = Ppu::spr_ram_size; dataSource = (void *)ppu.spr_ram; - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; - memcpy(&buffer[pos], dataSource, blockSize); + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); pos += blockSize; headerCode = "NTAB"; // NTAB Block @@ -326,11 +261,11 @@ class Core : private Cpu if (ppu.nt_banks[3] >= &ppu.impl->nt_ram[0xC00]) nametable_size = 0x1000; blockSize = nametable_size; dataSource = (void *)ppu.impl->nt_ram; - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; - memcpy(&buffer[pos], dataSource, blockSize); + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); pos += blockSize; if (ppu.chr_is_writable) @@ -338,11 +273,11 @@ class Core : private Cpu headerCode = "CHRR"; // CHRR Block blockSize = ppu.chr_size; dataSource = (void *)ppu.impl->chr_ram; - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; - memcpy(&buffer[pos], dataSource, blockSize); + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); pos += blockSize; } @@ -351,25 +286,25 @@ class Core : private Cpu headerCode = "SRAM"; // SRAM Block blockSize = impl->sram_size; dataSource = (void *)impl->sram; - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; - memcpy(&buffer[pos], dataSource, blockSize); + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); pos += blockSize; } headerCode = "gend"; // gend Block blockSize = 0; - memcpy(&buffer[pos], headerCode.data(), headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], headerCode.data(), headerSize); pos += headerSize; - memcpy(&buffer[pos], &blockSize, headerSize); + if (buffer != nullptr) memcpy(&buffer[pos], &blockSize, headerSize); pos += headerSize; return pos; // Bytes written } - size_t deserializeState(const uint8_t *buffer) + size_t deserializeFullState(const uint8_t *buffer) { disable_rendering(); error_count = 0; @@ -491,6 +426,275 @@ class Core : private Cpu return pos; // Bytes read } +void enableLiteStateBlock(const std::string& block) +{ + bool recognizedBlock = false; + + if (block == "TIME") { TIMEBlockEnabled = true; recognizedBlock = true; } + if (block == "CPUR") { CPURBlockEnabled = true; recognizedBlock = true; } + if (block == "PPUR") { PPURBlockEnabled = true; recognizedBlock = true; } + if (block == "APUR") { APURBlockEnabled = true; recognizedBlock = true; } + if (block == "CTRL") { CTRLBlockEnabled = true; recognizedBlock = true; } + if (block == "MAPR") { MAPRBlockEnabled = true; recognizedBlock = true; } + if (block == "LRAM") { LRAMBlockEnabled = true; recognizedBlock = true; } + if (block == "SPRT") { SPRTBlockEnabled = true; recognizedBlock = true; } + if (block == "NTAB") { NTABBlockEnabled = true; recognizedBlock = true; } + if (block == "CHRR") { CHRRBlockEnabled = true; recognizedBlock = true; } + if (block == "SRAM") { SRAMBlockEnabled = true; recognizedBlock = true; } + + if (recognizedBlock == false) { fprintf(stderr, "Unrecognized block type: %s\n", block.c_str()); exit(-1);} +}; + + +void disableLiteStateBlock(const std::string& block) +{ + bool recognizedBlock = false; + + if (block == "TIME") { TIMEBlockEnabled = false; recognizedBlock = true; } + if (block == "CPUR") { CPURBlockEnabled = false; recognizedBlock = true; } + if (block == "PPUR") { PPURBlockEnabled = false; recognizedBlock = true; } + if (block == "APUR") { APURBlockEnabled = false; recognizedBlock = true; } + if (block == "CTRL") { CTRLBlockEnabled = false; recognizedBlock = true; } + if (block == "MAPR") { MAPRBlockEnabled = false; recognizedBlock = true; } + if (block == "LRAM") { LRAMBlockEnabled = false; recognizedBlock = true; } + if (block == "SPRT") { SPRTBlockEnabled = false; recognizedBlock = true; } + if (block == "NTAB") { NTABBlockEnabled = false; recognizedBlock = true; } + if (block == "CHRR") { CHRRBlockEnabled = false; recognizedBlock = true; } + if (block == "SRAM") { SRAMBlockEnabled = false; recognizedBlock = true; } + + if (recognizedBlock == false) { fprintf(stderr, "Unrecognized block type: %s\n", block.c_str()); exit(-1);} +}; + + +size_t serializeLiteState(uint8_t *buffer) const + { + size_t pos = 0; + uint32_t blockSize = 0; + void *dataSource; + + if (TIMEBlockEnabled == true) + { + nes_state_lite_t state; + state.timestamp = nes.timestamp; + state.frame_count = (uint8_t)nes.frame_count; + state.timestamp *= 5; + blockSize = sizeof(nes_state_lite_t); + dataSource = (void *)&state; + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); + pos += blockSize; + } + + if (CPURBlockEnabled == true) + { + blockSize = sizeof(cpu::registers_t); + dataSource = (void *)&r; + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); + pos += blockSize; + } + + if (PPURBlockEnabled == true) + { + blockSize = sizeof(ppu_state_t); + dataSource = (void *)&ppu; + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); + pos += blockSize; + } + + if (APURBlockEnabled == true) + { + Apu::apu_state_t apuState; + impl->apu.save_state(&apuState); + blockSize = sizeof(Apu::apu_state_t); + if (buffer != nullptr) memcpy(&buffer[pos], &apuState, blockSize); + pos += blockSize; + } + + if (CTRLBlockEnabled == true) + { + blockSize = sizeof(joypad_state_t); + dataSource = (void *)&joypad; + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); + pos += blockSize; + } + + if (MAPRBlockEnabled == true) + { + blockSize = mapper->state_size; + dataSource = (void *)mapper->state; + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); + pos += blockSize; + } + + if (LRAMBlockEnabled == true) + { + blockSize = low_ram_size; + dataSource = (void *)low_mem; + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); + pos += blockSize; + } + + if (SPRTBlockEnabled == true) + { + blockSize = Ppu::spr_ram_size; + dataSource = (void *)ppu.spr_ram; + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); + pos += blockSize; + } + + if (NTABBlockEnabled == true) + { + size_t nametable_size = 0x800; + if (ppu.nt_banks[3] >= &ppu.impl->nt_ram[0xC00]) nametable_size = 0x1000; + blockSize = nametable_size; + dataSource = (void *)ppu.impl->nt_ram; + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); + pos += blockSize; + } + + if (CHRRBlockEnabled == true) + { + if (ppu.chr_is_writable) + { + blockSize = ppu.chr_size; + dataSource = (void *)ppu.impl->chr_ram; + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); + pos += blockSize; + } + } + + if (SRAMBlockEnabled == true) + { + if (sram_present) + { + blockSize = impl->sram_size; + dataSource = (void *)impl->sram; + if (buffer != nullptr) memcpy(&buffer[pos], dataSource, blockSize); + pos += blockSize; + } + } + + return pos; // Bytes written + } + + size_t deserializeLiteState(const uint8_t *buffer) + { + disable_rendering(); + error_count = 0; + ppu.burst_phase = 0; // avoids shimmer when seeking to same time over and over + + size_t pos = 0; + uint32_t blockSize = 0; + + // TIME Block + if (TIMEBlockEnabled == true) + { + nes_state_lite_t nesState; + blockSize = sizeof(nes_state_lite_t); + memcpy(&nesState, &buffer[pos], blockSize); + pos += blockSize; + nes.frame_count = nesState.frame_count; + nes.timestamp = nesState.timestamp; + nes.timestamp /= 5; + } + + // CPUR Block + if (CPURBlockEnabled == true) + { + blockSize = sizeof(cpu::registers_t); + memcpy((void *)&r, &buffer[pos], blockSize); + pos += blockSize; + } + + // PPUR Block + if (PPURBlockEnabled == true) + { + blockSize = sizeof(ppu_state_t); + memcpy((void *)&ppu, &buffer[pos], blockSize); + pos += blockSize; + } + + // APUR Block + if (APURBlockEnabled == true) + { + Apu::apu_state_t apuState; + blockSize = sizeof(Apu::apu_state_t); + memcpy(&apuState, &buffer[pos], blockSize); + pos += blockSize; + impl->apu.load_state(apuState); + impl->apu.end_frame(-(int)nes.timestamp / ppu_overclock); + } + + // CTRL Block + if (CTRLBlockEnabled == true) + { + blockSize = sizeof(joypad_state_t); + memcpy((void *)&joypad, &buffer[pos], blockSize); + pos += blockSize; + } + + // MAPR Block + if (MAPRBlockEnabled == true) + { + mapper->default_reset_state(); + blockSize = mapper->state_size; + memcpy((void *)mapper->state, &buffer[pos], blockSize); + pos += blockSize; + mapper->apply_mapping(); + } + + // LRAM Block + if (LRAMBlockEnabled == true) + { + blockSize = low_ram_size; + memcpy((void *)low_mem, &buffer[pos], blockSize); + pos += blockSize; + } + + // SPRT Block + if (SPRTBlockEnabled == true) + { + blockSize = Ppu::spr_ram_size; + memcpy((void *)ppu.spr_ram, &buffer[pos], blockSize); + pos += blockSize; + } + + // NTAB Block + if (NTABBlockEnabled == true) + { + size_t nametable_size = 0x800; + if (ppu.nt_banks[3] >= &ppu.impl->nt_ram[0xC00]) nametable_size = 0x1000; + blockSize = nametable_size; + memcpy((void *)ppu.impl->nt_ram, &buffer[pos], blockSize); + pos += blockSize; + } + + if (CHRRBlockEnabled == true) + { + if (ppu.chr_is_writable) + { + // CHRR Block + blockSize = ppu.chr_size; + memcpy((void *)ppu.impl->chr_ram, &buffer[pos], blockSize); + pos += blockSize; + } + } + + if (SRAMBlockEnabled == true) + { + if (sram_present) + { + // SRAM Block + blockSize = impl->sram_size; + memcpy((void *)impl->sram, &buffer[pos], blockSize); + pos += blockSize; + } + } + + if (sram_present) enable_sram(true); + + return pos; // Bytes read + } + void reset(bool full_reset, bool erase_battery_ram) { if (full_reset) diff --git a/source/quickerNES/cpu.cpp b/source/quickerNES/cpu.cpp index 1327002..6cd6c63 100644 --- a/source/quickerNES/cpu.cpp +++ b/source/quickerNES/cpu.cpp @@ -121,10 +121,11 @@ imm##op: \ #define BRANCH( cond ) \ { \ pc++; \ - if ( (cond) == false ) [[likely]] {clock_count--; goto loop; } \ - int32_t offset = (int8_t) data; \ - int32_t extra_clock = (pc & 0xFF) + offset; \ + int offset = (int8_t) data; \ + int extra_clock = (pc & 0xFF) + offset; \ + if ( !(cond) ) {clock_count--; goto loop; } \ pc += offset; \ + pc = uint16_t( pc ); \ clock_count += (extra_clock >> 8) & 1; \ goto loop; \ } @@ -201,7 +202,26 @@ inline void Cpu::write( nes_addr_t addr, int value ) } // status flags -extern uint8_t clock_table [256]; +uint8_t clock_table [256] = { +// 0 1 2 3 4 5 6 7 8 9 A B C D E F + 7,6,2,8,3,3,5,5,3,2,2,2,4,4,6,6,// 0 + 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 1 + 6,6,2,8,3,3,5,5,4,2,2,2,4,4,6,6,// 2 + 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 3 + 6,6,2,8,3,3,5,5,3,2,2,2,3,4,6,6,// 4 + 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 5 + 6,6,2,8,3,3,5,5,4,2,2,2,5,4,6,6,// 6 + 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 7 + 2,6,2,6,3,3,3,3,2,2,2,2,4,4,4,4,// 8 + 3,6,2,6,4,4,4,4,2,5,2,5,5,5,5,5,// 9 + 2,6,2,6,3,3,3,3,2,2,2,2,4,4,4,4,// A + 3,5,2,5,4,4,4,4,2,4,2,4,4,4,4,4,// B + 2,6,2,8,3,3,5,5,2,2,2,2,4,4,6,6,// C + 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// D + 2,6,2,8,3,3,5,5,2,2,2,2,4,4,6,6,// E + 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7 // F +}; + __attribute__((optimize("align-functions=" _PAGE_SIZE))) Cpu::result_t Cpu::run ( nes_time_t end ) @@ -1148,24 +1168,5 @@ end: return result; } -uint8_t clock_table [256] = { -// 0 1 2 3 4 5 6 7 8 9 A B C D E F - 7,6,2,8,3,3,5,5,3,2,2,2,4,4,6,6,// 0 - 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 1 - 6,6,2,8,3,3,5,5,4,2,2,2,4,4,6,6,// 2 - 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 3 - 6,6,2,8,3,3,5,5,3,2,2,2,3,4,6,6,// 4 - 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 5 - 6,6,2,8,3,3,5,5,4,2,2,2,5,4,6,6,// 6 - 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// 7 - 2,6,2,6,3,3,3,3,2,2,2,2,4,4,4,4,// 8 - 3,6,2,6,4,4,4,4,2,5,2,5,5,5,5,5,// 9 - 2,6,2,6,3,3,3,3,2,2,2,2,4,4,4,4,// A - 3,5,2,5,4,4,4,4,2,4,2,4,4,4,4,4,// B - 2,6,2,8,3,3,5,5,2,2,2,2,4,4,6,6,// C - 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7,// D - 2,6,2,8,3,3,5,5,2,2,2,2,4,4,6,6,// E - 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7 // F -}; } // namespace quickNES \ No newline at end of file diff --git a/source/quickerNES/emu.hpp b/source/quickerNES/emu.hpp index 7fb74d4..9f6ce40 100644 --- a/source/quickerNES/emu.hpp +++ b/source/quickerNES/emu.hpp @@ -6,7 +6,7 @@ #include "cart.hpp" #include "core.hpp" -#include "apu/Multi_Buffer.hpp" +#include "apu/multiBuffer.hpp" namespace quickerNES { @@ -44,8 +44,18 @@ class Emu const uint8_t *getHostPixels() const { return emu.ppu.host_pixels; } - size_t getLiteStateSize() const { return emu.getLiteStateSize(); } - size_t getStateSize() const { return emu.getStateSize(); } +// Save emulator state variants + size_t serializeFullState(uint8_t *buffer) const { return emu.serializeFullState(buffer); } + size_t serializeLiteState(uint8_t *buffer) const { return emu.serializeLiteState(buffer); } + + size_t deserializeFullState(const uint8_t *buffer) { return emu.deserializeFullState(buffer); } + size_t deserializeLiteState(const uint8_t *buffer) { return emu.deserializeLiteState(buffer); } + + size_t getLiteStateSize() const { return emu.serializeLiteState(nullptr); } + size_t getFullStateSize() const { return emu.serializeFullState(nullptr); } + + void enableLiteStateBlock(const std::string& block) { emu.enableLiteStateBlock(block); }; + void disableLiteStateBlock(const std::string& block) { emu.disableLiteStateBlock(block); }; // Basic emulation @@ -141,10 +151,6 @@ class Emu // File save/load - // Save emulator state - size_t serializeState(uint8_t *buffer) const { return emu.serializeState(buffer); } - size_t deserializeState(const uint8_t *buffer) { return emu.deserializeState(buffer); } - // True if current cartridge claims it uses battery-backed memory bool has_battery_ram() const { return cart()->has_battery_ram(); } @@ -231,8 +237,8 @@ class Emu virtual const char *init_(); virtual void loading_state(State const &) {} - long timestamp() const { return emu.nes.frame_count; } - void set_timestamp(long t) { emu.nes.frame_count = t; } + long timestamp() const { return 0; } + void set_timestamp(long t) { } private: // noncopyable diff --git a/source/quickerNES/meson.build b/source/quickerNES/meson.build index 8e44de1..bbda328 100644 --- a/source/quickerNES/meson.build +++ b/source/quickerNES/meson.build @@ -4,10 +4,10 @@ quickerNESAPUSrc = [ 'apu/apu.cpp', 'apu/oscs.cpp', 'apu/buffer.cpp', - 'apu/Blip_Buffer.cpp', + 'apu/blipBuffer.cpp', 'apu/NESEffectsBuffer.cpp', 'apu/effectsBuffer.cpp', - 'apu/Multi_Buffer.cpp', + 'apu/multiBuffer.cpp', 'apu/namco/apu.cpp', 'apu/vrc6/apu.cpp', 'apu/vrc7/emu2413.cpp', diff --git a/source/quickerNES/quickerNESInstance.hpp b/source/quickerNES/quickerNESInstance.hpp index e395ad1..1439be3 100644 --- a/source/quickerNES/quickerNESInstance.hpp +++ b/source/quickerNES/quickerNESInstance.hpp @@ -36,15 +36,17 @@ class QuickerNESInstance : public EmuInstance const uint8_t *getChrMem() const override { return _nes->chr_mem(); }; size_t getChrMemSize() const override { return _nes->chr_size(); }; - void serializeState(uint8_t *state) const override - { - _nes->serializeState(state); - } + void serializeFullState(uint8_t *state) const override { _nes->serializeFullState(state); } + void deserializeFullState(const uint8_t *state) override { _nes->deserializeFullState(state); } - void deserializeState(const uint8_t *state) override - { - _nes->deserializeState(state); - } + void serializeLiteState(uint8_t *state) const override { _nes->serializeLiteState(state); } + void deserializeLiteState(const uint8_t *state) override { _nes->deserializeLiteState(state); } + + size_t getFullStateSize() const override { return _nes->getFullStateSize(); } + size_t getLiteStateSize() const override { return _nes->getLiteStateSize(); } + + void enableLiteStateBlock(const std::string& block) override { _nes->enableLiteStateBlock(block); }; + void disableLiteStateBlock(const std::string& block) override { _nes->disableLiteStateBlock(block); }; void advanceStateImpl(const inputType controller1, const inputType controller2) override { @@ -58,17 +60,6 @@ class QuickerNESInstance : public EmuInstance void *getInternalEmulatorPointer() const override { return _nes; } - private: - inline size_t getStateSizeImpl() const override - { - return _nes->getStateSize(); - } - - inline size_t getLiteStateSizeImpl() const override - { - return _nes->getLiteStateSize(); - } - // Video buffer uint8_t *video_buffer; diff --git a/source/tester.cpp b/source/tester.cpp index b0c31dc..0590646 100644 --- a/source/tester.cpp +++ b/source/tester.cpp @@ -4,6 +4,8 @@ #include "utils.hpp" #include #include +#include +#include #ifdef _USE_QUICKNES #include "quickNESInstance.hpp" @@ -76,14 +78,29 @@ int main(int argc, char *argv[]) if (scriptJson["Expected ROM SHA1"].is_string() == false) EXIT_WITH_ERROR("Script file 'Expected ROM SHA1' entry is not a string\n"); std::string expectedROMSHA1 = scriptJson["Expected ROM SHA1"].get(); -// Creating emulator instance -#ifdef _USE_QUICKNES + // Parsing disabled blocks in lite state serialization + std::vector stateDisabledBlocks; + std::string stateDisabledBlocksOutput; + if (scriptJson.contains("Disable State Blocks") == false) EXIT_WITH_ERROR("Script file missing 'Disable State Blocks' entry\n"); + if (scriptJson["Disable State Blocks"].is_array() == false) EXIT_WITH_ERROR("Script file 'Disable State Blocks' is not an array\n"); + for (const auto& entry : scriptJson["Disable State Blocks"]) + { + if (entry.is_string() == false) EXIT_WITH_ERROR("Script file 'Disable State Blocks' entry is not a string\n"); + stateDisabledBlocks.push_back(entry.get()); + stateDisabledBlocksOutput += entry.get() + std::string(" "); + } + + // Creating emulator instance + #ifdef _USE_QUICKNES auto e = QuickNESInstance(); -#endif + #endif -#ifdef _USE_QUICKERNES + #ifdef _USE_QUICKERNES auto e = quickerNES::QuickerNESInstance(); -#endif + #endif + + // Disabling requested blocks from light state serialization + for (const auto& block : stateDisabledBlocks) e.disableLiteStateBlock(block); // Loading ROM File e.loadROMFile(romFilePath); @@ -94,12 +111,6 @@ int main(int argc, char *argv[]) // Disable rendering e.disableRendering(); - // Getting initial hash - auto initialHash = e.getStateHash(); - - // Getting full state size - const auto stateSize = e.getStateSize(); - // Getting lite state size const auto liteStateSize = e.getLiteStateSize(); @@ -128,19 +139,22 @@ int main(int argc, char *argv[]) printf("[] Cycle Type: '%s'\n", cycleType.c_str()); printf("[] Emulation Core: '%s'\n", emulationCoreName.c_str()); printf("[] ROM File: '%s'\n", romFilePath.c_str()); - printf("[] ROM SHA1: '%s'\n", romSHA1.c_str()); + //printf("[] ROM SHA1: '%s'\n", romSHA1.c_str()); printf("[] Sequence File: '%s'\n", sequenceFilePath.c_str()); printf("[] Sequence Length: %lu\n", sequenceLength); - printf("[] Initial State Hash: 0x%lX%lX\n", initialHash.first, initialHash.second); - printf("[] Full State Size: %lu bytes\n", stateSize); - printf("[] Lite State Size: %lu bytes\n", liteStateSize); + #ifdef _USE_QUICKNES + printf("[] State Size: %lu bytes\n", e.getFullStateSize()); + #endif + #ifdef _USE_QUICKERNES + printf("[] State Size: %lu bytes - Disabled Blocks: [ %s ]\n", e.getLiteStateSize(), stateDisabledBlocksOutput.c_str()); + #endif printf("[] ********** Running Test **********\n"); fflush(stdout); // Serializing initial state - uint8_t *currentState = (uint8_t *)malloc(stateSize); - e.serializeState(currentState); + uint8_t *currentState = (uint8_t *)malloc(liteStateSize); + e.serializeLiteState(currentState); // Check whether to perform each action bool doPreAdvance = cycleType == "Full"; @@ -152,9 +166,9 @@ int main(int argc, char *argv[]) for (const std::string &input : sequence) { if (doPreAdvance == true) e.advanceState(input); - if (doDeserialize == true) e.deserializeState(currentState); + if (doDeserialize == true) e.deserializeLiteState(currentState); e.advanceState(input); - if (doSerialize == true) e.serializeState(currentState); + if (doSerialize == true) e.serializeLiteState(currentState); } auto tf = std::chrono::high_resolution_clock::now(); diff --git a/tests/.gitignore b/tests/.gitignore index 4f4a32c..0a169d8 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -5,4 +5,5 @@ test.sol *.hash *.out +*.sh diff --git a/tests/README.md b/tests/README.md index ee212c9..9b501b7 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1 +1,20 @@ -Some of the sequences hosted in this folder correspond to movies published in tasvideos.org under the Creative Commons 2.0 license. These movies were created by the author of this code (Sergio Martin, a.k.a. eien86), unless stated otherwise. +Some of the sequences hosted in this folder correspond to movies published in tasvideos.org under the Creative Commons 2.0 license. These movies were created by the author of this code (Sergio Martin, a.k.a. eien86) and collaborators, unless otherwise stated. + +Notes: + +Sprilo is a open-source free game. This rom was obtained from + - https://itch.io/jam/game-off-2017 + - https://github.com/cbrwn/gameoff + - We use the movie https://tasvideos.org/3557G by MrTASer distributed under the CC2.0 license + +Nova The Squirrel is a open-source free game. This rom was obtained from + - https://github.com/NovaSquirrel/NovaTheSquirrel + - https://novasquirrel.itch.io/nova-the-squirrel + - We use the movie https://tasvideos.org/5246M by Cephla distributed under the CC2.0 license + +For Saiyuuki World + - We use the movie https://tasvideos.org/4422M by aiqiyou & J.Y distributed under the CC2.0 license + + For Metroid + - We use part of the movie https://tasvideos.org/3666M by The8bitbeast distributed under the CC2.0 license + \ No newline at end of file diff --git a/tests/arkanoid/warpless.sol b/tests/arkanoid.warpless.sol similarity index 100% rename from tests/arkanoid/warpless.sol rename to tests/arkanoid.warpless.sol diff --git a/tests/arkanoid.warpless.test b/tests/arkanoid.warpless.test new file mode 100644 index 0000000..a41acfc --- /dev/null +++ b/tests/arkanoid.warpless.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Arkanoid (U) [!].nes", + "Expected ROM SHA1": "B2B30C4F30DD853C215C17B0C67CFE63D61A3062", + "Initial State File": "", + "Sequence File": "arkanoid.warpless.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "MAPR", "CTRL", "APUR" ] +} diff --git a/tests/arkanoid/warps.sol b/tests/arkanoid.warps.sol similarity index 100% rename from tests/arkanoid/warps.sol rename to tests/arkanoid.warps.sol diff --git a/tests/arkanoid.warps.test b/tests/arkanoid.warps.test new file mode 100644 index 0000000..f6b2d6c --- /dev/null +++ b/tests/arkanoid.warps.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Arkanoid (U) [!].nes", + "Expected ROM SHA1": "B2B30C4F30DD853C215C17B0C67CFE63D61A3062", + "Initial State File": "", + "Sequence File": "arkanoid.warps.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "MAPR", "CTRL", "APUR" ] +} diff --git a/tests/arkanoid/meson.build b/tests/arkanoid/meson.build deleted file mode 100644 index 399ce6c..0000000 --- a/tests/arkanoid/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -game = 'arkanoid' - -bash = find_program('bash') - -goal = 'warpless' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) - -goal = 'warps' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/arkanoid/warpless.test b/tests/arkanoid/warpless.test deleted file mode 100644 index 98fe513..0000000 --- a/tests/arkanoid/warpless.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Arkanoid (U) [!].nes", - "Expected ROM SHA1": "B2B30C4F30DD853C215C17B0C67CFE63D61A3062", - "Initial State File": "", - "Sequence File": "warpless.sol" -} diff --git a/tests/arkanoid/warps.test b/tests/arkanoid/warps.test deleted file mode 100644 index 2cf1843..0000000 --- a/tests/arkanoid/warps.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Arkanoid (U) [!].nes", - "Expected ROM SHA1": "B2B30C4F30DD853C215C17B0C67CFE63D61A3062", - "Initial State File": "", - "Sequence File": "warps.sol" -} diff --git a/tests/castlevania1/anyPercent.sol b/tests/castlevania1.anyPercent.sol similarity index 100% rename from tests/castlevania1/anyPercent.sol rename to tests/castlevania1.anyPercent.sol diff --git a/tests/castlevania1.anyPercent.test b/tests/castlevania1.anyPercent.test new file mode 100644 index 0000000..e54c381 --- /dev/null +++ b/tests/castlevania1.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Castlevania (U) (PRG0) [!].nes", + "Expected ROM SHA1": "A31B8BD5B370A9103343C866F3C2B2998E889341", + "Initial State File": "", + "Sequence File": "castlevania1.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/castlevania1/pacifist.sol b/tests/castlevania1.pacifist.sol similarity index 100% rename from tests/castlevania1/pacifist.sol rename to tests/castlevania1.pacifist.sol diff --git a/tests/castlevania1.pacifist.test b/tests/castlevania1.pacifist.test new file mode 100644 index 0000000..e59321f --- /dev/null +++ b/tests/castlevania1.pacifist.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Castlevania (U) (PRG0) [!].nes", + "Expected ROM SHA1": "A31B8BD5B370A9103343C866F3C2B2998E889341", + "Initial State File": "", + "Sequence File": "castlevania1.pacifist.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/castlevania1/anyPercent.test b/tests/castlevania1/anyPercent.test deleted file mode 100644 index ef42c08..0000000 --- a/tests/castlevania1/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Castlevania (U) (PRG0) [!].nes", - "Expected ROM SHA1": "A31B8BD5B370A9103343C866F3C2B2998E889341", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/castlevania1/meson.build b/tests/castlevania1/meson.build deleted file mode 100644 index e492077..0000000 --- a/tests/castlevania1/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -game = 'castlevania1' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) - -goal = 'pacifist' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/castlevania1/pacifist.test b/tests/castlevania1/pacifist.test deleted file mode 100644 index cfef218..0000000 --- a/tests/castlevania1/pacifist.test +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Rom File": "../roms/Castlevania (U) (PRG0) [!].nes", - "Expected ROM SHA1": "A31B8BD5B370A9103343C866F3C2B2998E889341", - "Initial State File": "", - "Verification State File": "pacifist.final.state", - "Sequence File": "pacifist.sol" -} diff --git a/tests/galaga/anyPercent.sol b/tests/galaga.anyPercent.sol similarity index 100% rename from tests/galaga/anyPercent.sol rename to tests/galaga.anyPercent.sol diff --git a/tests/galaga.anyPercent.test b/tests/galaga.anyPercent.test new file mode 100644 index 0000000..38ff62d --- /dev/null +++ b/tests/galaga.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Galaga - Demons of Death (U) [!].nes", + "Expected ROM SHA1": "DA54C223D79FA59EB95437854B677CF69B5CAC8A", + "Initial State File": "", + "Sequence File": "galaga.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/galaga/anyPercent.test b/tests/galaga/anyPercent.test deleted file mode 100644 index fa768b1..0000000 --- a/tests/galaga/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Galaga - Demons of Death (U) [!].nes", - "Expected ROM SHA1": "DA54C223D79FA59EB95437854B677CF69B5CAC8A", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/galaga/meson.build b/tests/galaga/meson.build deleted file mode 100644 index b5de4c7..0000000 --- a/tests/galaga/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -game = 'galaga' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/ironSword/anyPercent.sol b/tests/ironSword.anyPercent.sol similarity index 100% rename from tests/ironSword/anyPercent.sol rename to tests/ironSword.anyPercent.sol diff --git a/tests/ironSword.anyPercent.test b/tests/ironSword.anyPercent.test new file mode 100644 index 0000000..0ee31a6 --- /dev/null +++ b/tests/ironSword.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Ironsword - Wizards & Warriors II (U) [!].nes", + "Expected ROM SHA1": "97B79E432F62403FB9F877090850C41112A9A168", + "Initial State File": "", + "Sequence File": "ironSword.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/ironSword/anyPercent.test b/tests/ironSword/anyPercent.test deleted file mode 100644 index c72fe69..0000000 --- a/tests/ironSword/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Ironsword - Wizards & Warriors II (U) [!].nes", - "Expected ROM SHA1": "97B79E432F62403FB9F877090850C41112A9A168", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/ironSword/meson.build b/tests/ironSword/meson.build deleted file mode 100644 index 19dea0f..0000000 --- a/tests/ironSword/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -game = 'ironSword' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/meson.build b/tests/meson.build index 25c1253..bc4936e 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,30 +1,59 @@ nomalloc = environment({'MALLOC_PERTURB_': '0'}) bash = find_program('bash') -testCommands = ['../run_test.sh', quickerNESTester.path(), quickNESTester.path() ] +testCommands = ['run_test.sh', quickerNESTester.path(), quickNESTester.path() ] testTimeout = 120 +# Tests for copyrighted game roms (only for local testing or own CI runners) +protectedTestSet = [ + 'arkanoid.warpless.test', + 'arkanoid.warps.test', + 'castlevania1.anyPercent.test', + 'castlevania1.pacifist.test', + 'galaga.anyPercent.test', + 'ironSword.anyPercent.test', + 'metroid.playaround.test', + 'nigelMansell.anyPercent.test', + 'ninjaGaiden.anyPercent.test', + 'ninjaGaiden.pacifist.test', + 'ninjaGaiden2.anyPercent.test', + 'ninjaGaiden2.pacifist.test', + 'novaTheSquirrel.anyPercent.test', + 'princeOfPersia.anyPercent.test', + 'saintSeiyaKanketsuHen.anyPercent.test', + 'saintSeiyaOugonDensetsu.anyPercent.test', + 'saiyuukiWorld.anyPercent.test', + 'saiyuukiWorld.lastHalf.test', + 'solarJetman.anyPercent.test', + 'sprilo.anyPercent.test', + 'superMarioBros.warpless.test', + 'superMarioBros.warps.test', + 'superMarioBros3.warps.test', + 'superOffroad.anyPercent.test', + 'tennis.anyPercent.test', +] + +# Tests for open source free roms (for public cloud testing) +openSourceTestSet = [ + 'novaTheSquirrel.anyPercent.test', + 'sprilo.anyPercent.test', +] + +# Creating test set based on whether copyrighted roms are to be used +testSet = openSourceTestSet if get_option('onlyOpenSource') == false - -subdir('arkanoid') -subdir('castlevania1') -subdir('superOffroad') -subdir('princeOfPersia') -subdir('ninjaGaiden') -subdir('ninjaGaiden2') -subdir('ironSword') -subdir('solarJetman') -subdir('tennis') -subdir('nigelMansell') -subdir('galaga') -subdir('saintSeiyaOugonDensetsu') -subdir('saintSeiyaKanketsuHen') -subdir('superMarioBros') -subdir('superMarioBros3') -subdir('saiyuukiWorld') - + testSet += protectedTestSet endif -# Open source games -subdir('sprilo') -subdir('novaTheSquirrel') \ No newline at end of file +# Adding tests to the suite +foreach testFile : testSet + testSuite = testFile.split('.')[0] + testName = testFile.split('.')[1] + test(testName, + bash, + workdir : meson.current_source_dir(), + timeout: testTimeout, + args : [ testCommands, testFile, '--cycleType', 'Full'], + suite : [ testSuite ]) +endforeach + diff --git a/tests/metroid.playaround.sol b/tests/metroid.playaround.sol new file mode 100644 index 0000000..76b825e --- /dev/null +++ b/tests/metroid.playaround.sol @@ -0,0 +1,1730 @@ +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|....S...| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|....S...| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L....A| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..LR....| +|..|..L.....| +|..|..LR....| +|..|..L.....| +|..|..LR....| +|..|..L.....| +|..|..LR....| +|..|..L.....| +|..|..LR..B.| +|..|..L...B.| +|..|..LR..B.| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|..L.....| +|..|........| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R..B.| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|........| +|..|.D......| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R...A| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R..B.| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|U..R....| +|..|U..R....| +|..|U..R..B.| +|..|U..R....| +|..|U..R....| +|..|U..R....| +|..|U..R....| +|..|U..R....| +|..|U..R....| +|..|U..R....| +|..|U..R....| +|..|U..R....| +|..|U..R....| +|..|U..R..B.| +|..|U..R....| +|..|U..R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R...A| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R..B.| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|U..R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|..L.....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|...R....| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| +|..|........| + diff --git a/tests/metroid.playaround.test b/tests/metroid.playaround.test new file mode 100644 index 0000000..049da14 --- /dev/null +++ b/tests/metroid.playaround.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Metroid (U) (PRG0) [!].nes", + "Expected ROM SHA1": "ECF39EC5A33E6A6F832F03E8FFC61C5D53F4F90B", + "Initial State File": "", + "Sequence File": "metroid.playaround.sol", + "Disable State Blocks": [ "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/nigelMansell/anyPercent.sol b/tests/nigelMansell.anyPercent.sol similarity index 100% rename from tests/nigelMansell/anyPercent.sol rename to tests/nigelMansell.anyPercent.sol diff --git a/tests/nigelMansell.anyPercent.test b/tests/nigelMansell.anyPercent.test new file mode 100644 index 0000000..1bd72ae --- /dev/null +++ b/tests/nigelMansell.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Nigel Mansell's World Championship Challenge (U) [!].nes", + "Expected ROM SHA1": "BBE5CF2DFA0B5422776A530D6F1B617238A8569F", + "Initial State File": "", + "Sequence File": "nigelMansell.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "SPRT", "CTRL" ] +} diff --git a/tests/nigelMansell/anyPercent.test b/tests/nigelMansell/anyPercent.test deleted file mode 100644 index dfdaade..0000000 --- a/tests/nigelMansell/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Nigel Mansell's World Championship Challenge (U) [!].nes", - "Expected ROM SHA1": "BBE5CF2DFA0B5422776A530D6F1B617238A8569F", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/nigelMansell/meson.build b/tests/nigelMansell/meson.build deleted file mode 100644 index c5fb0f0..0000000 --- a/tests/nigelMansell/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -game = 'nigelMansell' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/ninjaGaiden/anyPercent.sol b/tests/ninjaGaiden.anyPercent.sol similarity index 100% rename from tests/ninjaGaiden/anyPercent.sol rename to tests/ninjaGaiden.anyPercent.sol diff --git a/tests/ninjaGaiden.anyPercent.test b/tests/ninjaGaiden.anyPercent.test new file mode 100644 index 0000000..2b84a52 --- /dev/null +++ b/tests/ninjaGaiden.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Ninja Gaiden (U) [!].nes", + "Expected ROM SHA1": "CA513F841D75EFEB33BB8099FB02BEEB39F6BB9C", + "Initial State File": "", + "Sequence File": "ninjaGaiden.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/ninjaGaiden/pacifist.sol b/tests/ninjaGaiden.pacifist.sol similarity index 100% rename from tests/ninjaGaiden/pacifist.sol rename to tests/ninjaGaiden.pacifist.sol diff --git a/tests/ninjaGaiden.pacifist.test b/tests/ninjaGaiden.pacifist.test new file mode 100644 index 0000000..93f0f76 --- /dev/null +++ b/tests/ninjaGaiden.pacifist.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Ninja Gaiden (U) [!].nes", + "Expected ROM SHA1": "CA513F841D75EFEB33BB8099FB02BEEB39F6BB9C", + "Initial State File": "", + "Sequence File": "ninjaGaiden.pacifist.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/ninjaGaiden/anyPercent.test b/tests/ninjaGaiden/anyPercent.test deleted file mode 100644 index 29e4331..0000000 --- a/tests/ninjaGaiden/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Ninja Gaiden (U) [!].nes", - "Expected ROM SHA1": "CA513F841D75EFEB33BB8099FB02BEEB39F6BB9C", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/ninjaGaiden/meson.build b/tests/ninjaGaiden/meson.build deleted file mode 100644 index 1716225..0000000 --- a/tests/ninjaGaiden/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -game = 'ninjaGaiden' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) - -goal = 'pacifist' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/ninjaGaiden/pacifist.test b/tests/ninjaGaiden/pacifist.test deleted file mode 100644 index fceaa97..0000000 --- a/tests/ninjaGaiden/pacifist.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Ninja Gaiden (U) [!].nes", - "Expected ROM SHA1": "CA513F841D75EFEB33BB8099FB02BEEB39F6BB9C", - "Initial State File": "", - "Sequence File": "pacifist.sol" -} diff --git a/tests/ninjaGaiden2/anyPercent.sol b/tests/ninjaGaiden2.anyPercent.sol similarity index 100% rename from tests/ninjaGaiden2/anyPercent.sol rename to tests/ninjaGaiden2.anyPercent.sol diff --git a/tests/ninjaGaiden2.anyPercent.test b/tests/ninjaGaiden2.anyPercent.test new file mode 100644 index 0000000..aee851c --- /dev/null +++ b/tests/ninjaGaiden2.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Ninja Gaiden II - The Dark Sword of Chaos (U) [!].nes", + "Expected ROM SHA1": "B1796660E4A4CEFC72181D4BF4F97999BC048A77", + "Initial State File": "", + "Sequence File": "ninjaGaiden2.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/ninjaGaiden2/pacifist.sol b/tests/ninjaGaiden2.pacifist.sol similarity index 100% rename from tests/ninjaGaiden2/pacifist.sol rename to tests/ninjaGaiden2.pacifist.sol diff --git a/tests/ninjaGaiden2.pacifist.test b/tests/ninjaGaiden2.pacifist.test new file mode 100644 index 0000000..5ca6d89 --- /dev/null +++ b/tests/ninjaGaiden2.pacifist.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Ninja Gaiden II - The Dark Sword of Chaos (U) [!].nes", + "Expected ROM SHA1": "B1796660E4A4CEFC72181D4BF4F97999BC048A77", + "Initial State File": "", + "Sequence File": "ninjaGaiden2.pacifist.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/ninjaGaiden2/anyPercent.test b/tests/ninjaGaiden2/anyPercent.test deleted file mode 100644 index 587249b..0000000 --- a/tests/ninjaGaiden2/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Ninja Gaiden II - The Dark Sword of Chaos (U) [!].nes", - "Expected ROM SHA1": "B1796660E4A4CEFC72181D4BF4F97999BC048A77", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/ninjaGaiden2/meson.build b/tests/ninjaGaiden2/meson.build deleted file mode 100644 index 7108fef..0000000 --- a/tests/ninjaGaiden2/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -game = 'ninjaGaiden2' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) - -goal = 'pacifist' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/ninjaGaiden2/pacifist.test b/tests/ninjaGaiden2/pacifist.test deleted file mode 100644 index dee408d..0000000 --- a/tests/ninjaGaiden2/pacifist.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Ninja Gaiden II - The Dark Sword of Chaos (U) [!].nes", - "Expected ROM SHA1": "B1796660E4A4CEFC72181D4BF4F97999BC048A77", - "Initial State File": "", - "Sequence File": "pacifist.sol" -} diff --git a/tests/novaTheSquirrel/anyPercent.sol b/tests/novaTheSquirrel.anyPercent.sol similarity index 100% rename from tests/novaTheSquirrel/anyPercent.sol rename to tests/novaTheSquirrel.anyPercent.sol diff --git a/tests/novaTheSquirrel.anyPercent.test b/tests/novaTheSquirrel.anyPercent.test new file mode 100644 index 0000000..ebd14e9 --- /dev/null +++ b/tests/novaTheSquirrel.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/nova.nes", + "Expected ROM SHA1": "B6B07EE76492ED475F39167C89B342353F999231", + "Initial State File": "", + "Sequence File": "novaTheSquirrel.anyPercent.sol", + "Disable State Blocks": [ "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/novaTheSquirrel/README.md b/tests/novaTheSquirrel/README.md deleted file mode 100644 index 5e1fe9f..0000000 --- a/tests/novaTheSquirrel/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Nova The Squirrel is a open-source free game. This rom was obtained from -https://github.com/NovaSquirrel/NovaTheSquirrel -https://novasquirrel.itch.io/nova-the-squirrel - -We use the movie https://tasvideos.org/5246M by Cephla distributed under the CC2.0 license - - diff --git a/tests/novaTheSquirrel/anyPercent.test b/tests/novaTheSquirrel/anyPercent.test deleted file mode 100644 index e7085ab..0000000 --- a/tests/novaTheSquirrel/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/nova.nes", - "Expected ROM SHA1": "B6B07EE76492ED475F39167C89B342353F999231", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/novaTheSquirrel/meson.build b/tests/novaTheSquirrel/meson.build deleted file mode 100644 index 48d7cb4..0000000 --- a/tests/novaTheSquirrel/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -game = 'novaTheSquirrel' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/princeOfPersia/anyPercent.sol b/tests/princeOfPersia.anyPercent.sol similarity index 100% rename from tests/princeOfPersia/anyPercent.sol rename to tests/princeOfPersia.anyPercent.sol diff --git a/tests/princeOfPersia.anyPercent.test b/tests/princeOfPersia.anyPercent.test new file mode 100644 index 0000000..b3e10d5 --- /dev/null +++ b/tests/princeOfPersia.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Prince of Persia (U) [!].nes", + "Expected ROM SHA1": "6B58F149F34FA829135619C58700CAAA95B9CDE3", + "Initial State File": "", + "Sequence File": "princeOfPersia.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/princeOfPersia/anyPercent.test b/tests/princeOfPersia/anyPercent.test deleted file mode 100644 index 82d1af0..0000000 --- a/tests/princeOfPersia/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Prince of Persia (U) [!].nes", - "Expected ROM SHA1": "6B58F149F34FA829135619C58700CAAA95B9CDE3", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/princeOfPersia/meson.build b/tests/princeOfPersia/meson.build deleted file mode 100644 index b92a1df..0000000 --- a/tests/princeOfPersia/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -game = 'princeOfPersia' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/run_benchmark.sh b/tests/run_benchmark.sh index 8efc937..5a203c1 100755 --- a/tests/run_benchmark.sh +++ b/tests/run_benchmark.sh @@ -1,27 +1,19 @@ #!/bin/bash # Finding all test scripts -testScriptList=`find . -type f -name *.test` +testScriptList=`find . -type f -name "*.test"` # Iterating over the scripts for script in ${testScriptList}; do - # Getting base folder - folder=`dirname ${script}` - # Getting filename fileName=`basename ${script}` - # Going to folder - pushd ${folder} - # Running script on quickerNES quickerNESTester ${fileName} --cycleType Rerecord # Running script on quickerNES quickNESTester ${fileName} --cycleType Rerecord - # Coming back - popd done diff --git a/tests/saintSeiyaKanketsuHen/anyPercent.sol b/tests/saintSeiyaKanketsuHen.anyPercent.sol similarity index 100% rename from tests/saintSeiyaKanketsuHen/anyPercent.sol rename to tests/saintSeiyaKanketsuHen.anyPercent.sol diff --git a/tests/saintSeiyaKanketsuHen.anyPercent.test b/tests/saintSeiyaKanketsuHen.anyPercent.test new file mode 100644 index 0000000..fe6cdb1 --- /dev/null +++ b/tests/saintSeiyaKanketsuHen.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Saint Seiya - Ougon Densetsu Kanketsu Hen (J) [!].nes", + "Expected ROM SHA1": "F871D9B3DAFDDCDAD5F2ACD71044292E5169064E", + "Initial State File": "", + "Sequence File": "saintSeiyaKanketsuHen.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "SPRT", "CTRL" ] +} diff --git a/tests/saintSeiyaKanketsuHen/anyPercent.test b/tests/saintSeiyaKanketsuHen/anyPercent.test deleted file mode 100644 index 431e6f5..0000000 --- a/tests/saintSeiyaKanketsuHen/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Saint Seiya - Ougon Densetsu Kanketsu Hen (J) [!].nes", - "Expected ROM SHA1": "F871D9B3DAFDDCDAD5F2ACD71044292E5169064E", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/saintSeiyaKanketsuHen/meson.build b/tests/saintSeiyaKanketsuHen/meson.build deleted file mode 100644 index afffb65..0000000 --- a/tests/saintSeiyaKanketsuHen/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -game = 'saintSeiyaKanketsuHen' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/saintSeiyaOugonDensetsu/anyPercent.sol b/tests/saintSeiyaOugonDensetsu.anyPercent.sol similarity index 100% rename from tests/saintSeiyaOugonDensetsu/anyPercent.sol rename to tests/saintSeiyaOugonDensetsu.anyPercent.sol diff --git a/tests/saintSeiyaOugonDensetsu.anyPercent.test b/tests/saintSeiyaOugonDensetsu.anyPercent.test new file mode 100644 index 0000000..b38db7f --- /dev/null +++ b/tests/saintSeiyaOugonDensetsu.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Saint Seiya - Ougon Densetsu (J) [!].nes", + "Expected ROM SHA1": "3F3B499CF50386084E053BCA096AE8E52330CFAE", + "Initial State File": "", + "Sequence File": "saintSeiyaKanketsuHen.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/saintSeiyaOugonDensetsu/anyPercent.test b/tests/saintSeiyaOugonDensetsu/anyPercent.test deleted file mode 100644 index d69b8a7..0000000 --- a/tests/saintSeiyaOugonDensetsu/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Saint Seiya - Ougon Densetsu (J) [!].nes", - "Expected ROM SHA1": "3F3B499CF50386084E053BCA096AE8E52330CFAE", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/saintSeiyaOugonDensetsu/meson.build b/tests/saintSeiyaOugonDensetsu/meson.build deleted file mode 100644 index 148e817..0000000 --- a/tests/saintSeiyaOugonDensetsu/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -game = 'saintSeiyaOugonDensetsu' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/saiyuukiWorld/anyPercent.sol b/tests/saiyuukiWorld.anyPercent.sol similarity index 100% rename from tests/saiyuukiWorld/anyPercent.sol rename to tests/saiyuukiWorld.anyPercent.sol diff --git a/tests/saiyuukiWorld.anyPercent.test b/tests/saiyuukiWorld.anyPercent.test new file mode 100644 index 0000000..35d47ec --- /dev/null +++ b/tests/saiyuukiWorld.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Saiyuuki World (J).nes", + "Expected ROM SHA1": "C2F12D915A4D0B1FFDF8A64AE1092CE6A2D08770", + "Initial State File": "", + "Sequence File": "saiyuukiWorld.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/saiyuukiWorld/lastHalf.sol b/tests/saiyuukiWorld.lastHalf.sol similarity index 100% rename from tests/saiyuukiWorld/lastHalf.sol rename to tests/saiyuukiWorld.lastHalf.sol diff --git a/tests/saiyuukiWorld/lastHalf.state b/tests/saiyuukiWorld.lastHalf.state similarity index 100% rename from tests/saiyuukiWorld/lastHalf.state rename to tests/saiyuukiWorld.lastHalf.state diff --git a/tests/saiyuukiWorld.lastHalf.test b/tests/saiyuukiWorld.lastHalf.test new file mode 100644 index 0000000..5c1d5a8 --- /dev/null +++ b/tests/saiyuukiWorld.lastHalf.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Saiyuuki World (J).nes", + "Expected ROM SHA1": "C2F12D915A4D0B1FFDF8A64AE1092CE6A2D08770", + "Initial State File": "saiyuukiWorld.lastHalf.state", + "Sequence File": "saiyuukiWorld.lastHalf.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/saiyuukiWorld/anyPercent.test b/tests/saiyuukiWorld/anyPercent.test deleted file mode 100644 index 493fd3f..0000000 --- a/tests/saiyuukiWorld/anyPercent.test +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Rom File": "../roms/Saiyuuki World (J).nes", - "Expected ROM SHA1": "C2F12D915A4D0B1FFDF8A64AE1092CE6A2D08770", - "Initial State File": "", - "Sequence File": "anyPercent.sol", - "Credits": "https://tasvideos.org/4422M by aiqiyou & J.Y" -} diff --git a/tests/saiyuukiWorld/lastHalf.test b/tests/saiyuukiWorld/lastHalf.test deleted file mode 100644 index ae3d654..0000000 --- a/tests/saiyuukiWorld/lastHalf.test +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Rom File": "../roms/Saiyuuki World (J).nes", - "Expected ROM SHA1": "C2F12D915A4D0B1FFDF8A64AE1092CE6A2D08770", - "Initial State File": "lastHalf.state", - "Sequence File": "anyPercent.sol", - "Credits": "https://tasvideos.org/4422M by aiqiyou & J.Y" -} diff --git a/tests/saiyuukiWorld/meson.build b/tests/saiyuukiWorld/meson.build deleted file mode 100644 index b582920..0000000 --- a/tests/saiyuukiWorld/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -game = 'saiyuukiWorld' - -bash = find_program('bash') - -goal = 'anyPercent' -test(goal + '-FullCycle', bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) - -goal = 'lastHalf' -test(goal + '-FullCycle', bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/solarJetman/anyPercent.sol b/tests/solarJetman.anyPercent.sol similarity index 100% rename from tests/solarJetman/anyPercent.sol rename to tests/solarJetman.anyPercent.sol diff --git a/tests/solarJetman.anyPercent.test b/tests/solarJetman.anyPercent.test new file mode 100644 index 0000000..7ad8f86 --- /dev/null +++ b/tests/solarJetman.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Solar Jetman - Hunt for the Golden Warpship (U) [!].nes", + "Expected ROM SHA1": "872B91A2F7A2F635061EF43F79E7F7E9F59F5C50", + "Initial State File": "", + "Sequence File": "solarJetman.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/solarJetman/anyPercent.test b/tests/solarJetman/anyPercent.test deleted file mode 100644 index 9d3bae5..0000000 --- a/tests/solarJetman/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Solar Jetman - Hunt for the Golden Warpship (U) [!].nes", - "Expected ROM SHA1": "872B91A2F7A2F635061EF43F79E7F7E9F59F5C50", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/solarJetman/meson.build b/tests/solarJetman/meson.build deleted file mode 100644 index f04eeea..0000000 --- a/tests/solarJetman/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -game = 'solarJetman' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/sprilo/anyPercent.sol b/tests/sprilo.anyPercent.sol similarity index 100% rename from tests/sprilo/anyPercent.sol rename to tests/sprilo.anyPercent.sol diff --git a/tests/sprilo.anyPercent.test b/tests/sprilo.anyPercent.test new file mode 100644 index 0000000..749744f --- /dev/null +++ b/tests/sprilo.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/sprilo.nes", + "Expected ROM SHA1": "6EC09B9B51320A536A786D3D4719432B714C5779", + "Initial State File": "", + "Sequence File": "sprilo.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/sprilo/README.md b/tests/sprilo/README.md deleted file mode 100644 index 3c804a0..0000000 --- a/tests/sprilo/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Sprilo is a open-source free game. This rom was obtained from -https://itch.io/jam/game-off-2017 -https://github.com/cbrwn/gameoff - -We use the movie https://tasvideos.org/3557G by MrTASer distributed under the CC2.0 license - - diff --git a/tests/sprilo/anyPercent.test b/tests/sprilo/anyPercent.test deleted file mode 100644 index c8e3328..0000000 --- a/tests/sprilo/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/sprilo.nes", - "Expected ROM SHA1": "6EC09B9B51320A536A786D3D4719432B714C5779", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/sprilo/meson.build b/tests/sprilo/meson.build deleted file mode 100644 index ce73c57..0000000 --- a/tests/sprilo/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -game = 'sprilo' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/superMarioBros/warpless.sol b/tests/superMarioBros.warpless.sol similarity index 100% rename from tests/superMarioBros/warpless.sol rename to tests/superMarioBros.warpless.sol diff --git a/tests/superMarioBros.warpless.test b/tests/superMarioBros.warpless.test new file mode 100644 index 0000000..e071dd6 --- /dev/null +++ b/tests/superMarioBros.warpless.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Super Mario Bros. (W) [!].nes", + "Expected ROM SHA1": "EA343F4E445A9050D4B4FBAC2C77D0693B1D0922", + "Initial State File": "", + "Sequence File": "superMarioBros.warpless.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/superMarioBros/warps.sol b/tests/superMarioBros.warps.sol similarity index 100% rename from tests/superMarioBros/warps.sol rename to tests/superMarioBros.warps.sol diff --git a/tests/superMarioBros.warps.test b/tests/superMarioBros.warps.test new file mode 100644 index 0000000..6b10290 --- /dev/null +++ b/tests/superMarioBros.warps.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Super Mario Bros. (W) [!].nes", + "Expected ROM SHA1": "EA343F4E445A9050D4B4FBAC2C77D0693B1D0922", + "Initial State File": "", + "Sequence File": "superMarioBros.warps.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/superMarioBros/README.md b/tests/superMarioBros/README.md deleted file mode 100644 index 89c5c38..0000000 --- a/tests/superMarioBros/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Movies used: - -https://tasvideos.org/1715M by HappyLee -https://tasvideos.org/3728M by HappyLee and Mars608 diff --git a/tests/superMarioBros/meson.build b/tests/superMarioBros/meson.build deleted file mode 100644 index bb448ce..0000000 --- a/tests/superMarioBros/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -game = 'superMarioBros' - -goal = 'warps' -test(goal, bash, workdir : meson.current_source_dir(), args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) - -goal = 'warpless' -test(goal, bash, workdir : meson.current_source_dir(), args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/superMarioBros/warpless.test b/tests/superMarioBros/warpless.test deleted file mode 100644 index 0838d00..0000000 --- a/tests/superMarioBros/warpless.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Super Mario Bros. (W) [!].nes", - "Expected ROM SHA1": "EA343F4E445A9050D4B4FBAC2C77D0693B1D0922", - "Initial State File": "", - "Sequence File": "warpless.sol" -} diff --git a/tests/superMarioBros/warps.test b/tests/superMarioBros/warps.test deleted file mode 100644 index d591ad3..0000000 --- a/tests/superMarioBros/warps.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Super Mario Bros. (W) [!].nes", - "Expected ROM SHA1": "EA343F4E445A9050D4B4FBAC2C77D0693B1D0922", - "Initial State File": "", - "Sequence File": "warps.sol" -} diff --git a/tests/superMarioBros3/warps.sol b/tests/superMarioBros3.warps.sol similarity index 100% rename from tests/superMarioBros3/warps.sol rename to tests/superMarioBros3.warps.sol diff --git a/tests/superMarioBros3.warps.test b/tests/superMarioBros3.warps.test new file mode 100644 index 0000000..0cda2de --- /dev/null +++ b/tests/superMarioBros3.warps.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Super Mario Bros. 3 (U) (PRG0) [!].nes", + "Expected ROM SHA1": "A03E7E526E79DF222E048AE22214BCA2BC49C449", + "Initial State File": "", + "Sequence File": "superMarioBros3.warps.sol", + "Disable State Blocks": [ "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/superMarioBros3/meson.build b/tests/superMarioBros3/meson.build deleted file mode 100644 index a7a5e91..0000000 --- a/tests/superMarioBros3/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -game = 'superMarioBros3' - -goal = 'warps' -test(goal, bash, workdir : meson.current_source_dir(), args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/superMarioBros3/warps.test b/tests/superMarioBros3/warps.test deleted file mode 100644 index a242afa..0000000 --- a/tests/superMarioBros3/warps.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Super Mario Bros. 3 (U) (PRG0) [!].nes", - "Expected ROM SHA1": "A03E7E526E79DF222E048AE22214BCA2BC49C449", - "Initial State File": "", - "Sequence File": "warps.sol" -} diff --git a/tests/superOffroad/anyPercent.sol b/tests/superOffroad.anyPercent.sol similarity index 100% rename from tests/superOffroad/anyPercent.sol rename to tests/superOffroad.anyPercent.sol diff --git a/tests/superOffroad.anyPercent.test b/tests/superOffroad.anyPercent.test new file mode 100644 index 0000000..2a31b9c --- /dev/null +++ b/tests/superOffroad.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Ivan 'Ironman' Stewart's Super Off Road (USA).nes", + "Expected ROM SHA1": "57919B685B55EE3ED3AD98FB1D25626B98BE7D39", + "Initial State File": "", + "Sequence File": "superOffroad.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "SPRT", "CTRL" ] +} diff --git a/tests/superOffroad/anyPercent.test b/tests/superOffroad/anyPercent.test deleted file mode 100644 index c69074e..0000000 --- a/tests/superOffroad/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Ivan 'Ironman' Stewart's Super Off Road (USA).nes", - "Expected ROM SHA1": "57919B685B55EE3ED3AD98FB1D25626B98BE7D39", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/superOffroad/meson.build b/tests/superOffroad/meson.build deleted file mode 100644 index 4c99566..0000000 --- a/tests/superOffroad/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -game = 'superOffroad' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file diff --git a/tests/tennis/anyPercent.sol b/tests/tennis.anyPercent.sol similarity index 100% rename from tests/tennis/anyPercent.sol rename to tests/tennis.anyPercent.sol diff --git a/tests/tennis.anyPercent.test b/tests/tennis.anyPercent.test new file mode 100644 index 0000000..2e976e1 --- /dev/null +++ b/tests/tennis.anyPercent.test @@ -0,0 +1,7 @@ +{ + "Rom File": "roms/Tennis (JU) [!].nes", + "Expected ROM SHA1": "80D99C035E6A5AB9718E413EC25CBE094F085962", + "Initial State File": "", + "Sequence File": "tennis.anyPercent.sol", + "Disable State Blocks": [ "SRAM", "CHRR", "NTAB", "SPRT", "CTRL" ] +} diff --git a/tests/tennis/anyPercent.test b/tests/tennis/anyPercent.test deleted file mode 100644 index 8a8816f..0000000 --- a/tests/tennis/anyPercent.test +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Rom File": "../roms/Tennis (JU) [!].nes", - "Expected ROM SHA1": "80D99C035E6A5AB9718E413EC25CBE094F085962", - "Initial State File": "", - "Sequence File": "anyPercent.sol" -} diff --git a/tests/tennis/meson.build b/tests/tennis/meson.build deleted file mode 100644 index 9861adf..0000000 --- a/tests/tennis/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -game = 'tennis' - -goal = 'anyPercent' -test(goal, bash, workdir : meson.current_source_dir(), timeout: testTimeout, args : [ testCommands, goal + '.test', '--cycleType', 'Full'], suite: [ game, goal ] ) \ No newline at end of file