//#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
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