--- /dev/null
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program. If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+/*\r
+ * soundtest\r
+ */\r
+\r
+#include "src/lib/vgmsnd/vgmSnd.h"\r
+#include "src/lib/16_snd.h"\r
+//#include "src/lib/doslib/adlib.h"\r
+#include "src/lib/16_in.h"\r
+\r
+void OPL2_Write(UINT8 reg, UINT8 data);\r
+UINT8 OPL2_ReadStatus(void);\r
+\r
+void OPL2_Write(UINT8 reg, UINT8 data)\r
+{\r
+ //ym3812_w(0, 0, reg);\r
+ //ym3812_w(0, 1, data);\r
+ opl2out((word)reg, (word)data);\r
+ return;\r
+}\r
+\r
+UINT8 OPL2_ReadStatus(void)\r
+{\r
+ return(inp(ADLIB_FM_ADDRESS));\r
+ //return ym3812_r(0, 0);\r
+}\r
+\r
+void\r
+main(int argc, char *argv[])\r
+{\r
+ global_game_variables_t gvar;\r
+ VGM_FILE pee[9];\r
+ player_t player[MaxPlayers];\r
+ char *bakapee;\r
+\r
+ bakapee = malloc(64);\r
+ if(argv[1]) bakapee = argv[1];\r
+ else bakapee = "data/adlib.vgm";\r
+ printf("%x\n", OpenVGMFile(bakapee, &pee[0]));\r
+ IN_Startup();\r
+ IN_Default(0,&player,ctrl_Joystick);\r
+ InitEngine();\r
+ PlayMusic(&pee[0]);\r
+ while(!IN_KeyDown(sc_Escape))\r
+ //while(!kbhit())\r
+ {\r
+ IN_ReadControl(0,&player);\r
+ UpdateSoundEngine();\r
+ }\r
+ StopMusic();\r
+ FreeVGMFile(&pee[0]);\r
+ IN_Shutdown();\r
+ DeinitEngine();\r
+}\r