// // Simple program that touches all the existing cores to help ensure // that everything builds cleanly. // // Compile with: // // g++ --std=c++14 -I../../src buildall.cpp ../../src/ymfm_misc.cpp ../../src/ymfm_opl.cpp ../../src/ymfm_opm.cpp ../../src/ymfm_opn.cpp ../../src/ymfm_opq.cpp ../../src/ymfm_opz.cpp ../../src/ymfm_adpcm.cpp ../../src/ymfm_pcm.cpp ../../src/ymfm_ssg.cpp -o buildall.exe // // or: // // clang --std=c++14 -I../../src buildall.cpp ../../src/ymfm_misc.cpp ../../src/ymfm_opl.cpp ../../src/ymfm_opm.cpp ../../src/ymfm_opn.cpp ../../src/ymfm_opq.cpp ../../src/ymfm_opz.cpp ../../src/ymfm_adpcm.cpp ../../src/ymfm_pcm.cpp ../../src/ymfm_ssg.cpp -o buildall.exe // // or: // // cl -I..\..\src buildall.cpp ..\..\src\ymfm_misc.cpp ..\..\src\ymfm_opl.cpp ..\..\src\ymfm_opm.cpp ..\..\src\ymfm_opn.cpp ..\..\src\ymfm_opq.cpp ..\..\src\ymfm_opz.cpp ..\..\src\ymfm_adpcm.cpp ..\..\src\ymfm_pcm.cpp ..\..\src\ymfm_ssg.cpp /Od /Zi /std:c++14 /EHsc // #include #include "ymfm_misc.h" #include "ymfm_opl.h" #include "ymfm_opm.h" #include "ymfm_opn.h" #include "ymfm_opq.h" #include "ymfm_opz.h" //------------------------------------------------- // main - program entry point //------------------------------------------------- template class chip_wrapper : public ymfm::ymfm_interface { public: chip_wrapper() : m_chip(*this) { // reset m_chip.reset(); // save/restore std::vector buffer; { ymfm::ymfm_saved_state saver(buffer, true); m_chip.save_restore(saver); } { ymfm::ymfm_saved_state restorer(buffer, false); m_chip.save_restore(restorer); } // dummy read/write m_chip.read(0); m_chip.write(0, 0); // generate typename ChipType::output_data output[20]; m_chip.generate(&output[0], ymfm::array_size(output)); } private: ChipType m_chip; }; //------------------------------------------------- // main - program entry point //------------------------------------------------- int main(int argc, char *argv[]) { // just keep adding chip variants here as they are implemented // ymfm_misc.h: chip_wrapper test2149; // ymfm_opl.h: chip_wrapper test3526; chip_wrapper test8950; chip_wrapper test3812; chip_wrapper test262; chip_wrapper test289b; chip_wrapper test278b; chip_wrapper test2413; chip_wrapper test2423; chip_wrapper test281; chip_wrapper test1001; // ymfm_opm.h: chip_wrapper test2151; chip_wrapper test2164; // ymfm_opn.h: chip_wrapper test2203; chip_wrapper test2608; chip_wrapper test288; chip_wrapper test2610; chip_wrapper test2610b; chip_wrapper test2612; chip_wrapper test3438; chip_wrapper test276; // ymfm_opq.h: chip_wrapper test3806; chip_wrapper test3533; // ymfm_opz.h: chip_wrapper test2414; printf("Done\n"); return 0; }