]> 4ch.mooo.com Git - 16.git/commitdiff
OH SHIT IT WORKS!!!
authorsparky4 <sparky4@cock.li>
Sat, 12 Sep 2015 17:56:36 +0000 (12:56 -0500)
committersparky4 <sparky4@cock.li>
Sat, 12 Sep 2015 17:56:36 +0000 (12:56 -0500)
modified:   data/0.vgm
renamed:    data/0.vgm -> data/1.vgm
modified:   src/vgmtest.c
modified:   vgmtest.exe

data/0.vgm
data/1.vgm [new file with mode: 0755]
src/vgmtest.c
vgmtest.exe

index 652c8b4f5845dcc5bcb64c03793777658effc2d5..fb4ee0ccfe7d55b2a0e2d715d0b46cc960977d1d 100755 (executable)
Binary files a/data/0.vgm and b/data/0.vgm differ
diff --git a/data/1.vgm b/data/1.vgm
new file mode 100755 (executable)
index 0000000..652c8b4
Binary files /dev/null and b/data/1.vgm differ
index 18374d332278542c339ff279fa62dd757904f5ba..f1893ca69332bbe7cb740e4faf9640ce4f37bb36 100755 (executable)
 //#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
+void OPL2_Write(byte reg, byte data);\r
+byte OPL2_ReadStatus(void);\r
 \r
-void OPL2_Write(UINT8 reg, UINT8 data)\r
+void OPL2_Write(byte reg, byte data)\r
 {\r
        //ym3812_w(0, 0, reg);\r
        //ym3812_w(0, 1, data);\r
        opl2out(reg, data);\r
-       //adlib_write((word) reg,(byte)data);\r
        return;\r
 }\r
 \r
-UINT8 OPL2_ReadStatus(void)\r
+byte OPL2_ReadStatus(void)\r
 {\r
        return(inp(ADLIB_FM_ADDRESS));\r
-       //return (UINT8)adlib_read(0);\r
        //return ym3812_r(0, 0);\r
 }\r
 \r
@@ -53,26 +51,25 @@ main(int argc, char *argv[])
        global_game_variables_t gvar;\r
        VGM_FILE pee[9];\r
        player_t player[MaxPlayers];\r
+       char *bakapee;\r
 \r
-       //opl2out(0x105, 0x00);\r
-       /*if(!init_adlib())\r
-       {\r
-               printf("Cannot init library\n");\r
-               exit(-5);\r
-       }*/\r
-       printf("%x\n", OpenVGMFile("data/0.vgm", &pee[0]));\r
+       bakapee = malloc(64);\r
+       if(argv[1]) bakapee = argv[1];\r
+       else bakapee = "data/0.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(!getch())\r
        {\r
                IN_ReadControl(0,&player);\r
                UpdateSoundEngine();\r
        }\r
        StopMusic();\r
        FreeVGMFile(&pee[0]);\r
+       //IN_Shutdown();\r
        DeinitEngine();\r
-       //shutdown_adlib();\r
        IN_Shutdown();\r
 }\r
index cec5f8c7d7746591ea3c87edc4ae00c17efb80a9..4638ff72f245e687dc194f49abbd82e103d4ff31 100755 (executable)
Binary files a/vgmtest.exe and b/vgmtest.exe differ