--- xmil/sound/x1f.c 2004/08/01 05:31:31 1.1 +++ xmil/sound/x1f.c 2008/06/02 20:07:32 1.4 @@ -1,5 +1,6 @@ #include "compiler.h" #include "dosio.h" +#include "iocore.h" #include "sound.h" #include "sndctrl.h" #include "x1f.h" @@ -18,9 +19,6 @@ typedef struct { static _X1F x1f; -extern UINT8 fmop[256]; - - static void writedata(X1F hdl, REG16 value) { UINT8 *ptr; @@ -50,7 +48,7 @@ static void setdata(X1F hdl, REG16 value } -// ---- +/* ---- */ BRESULT x1f_open(const OEMCHAR *filename) { @@ -62,9 +60,13 @@ BRESULT x1f_open(const OEMCHAR *filename if (fh == FILEH_INVALID) { return(FAILURE); } - CopyMemory(buf, fmop, 256); +#if defined(SUPPORT_TURBOZ) || defined(SUPPORT_OPM) + CopyMemory(buf, sndboard.opmdat, 256); +#else + ZeroMemory(buf, 256); +#endif CopyMemory(buf, "X1F", 4); - file_write(fh, fmop, 256); + file_write(fh, buf, 256); x1f.enable = 1; x1f.fh = fh; @@ -87,6 +89,7 @@ void x1f_close(void) { } } +#if defined(SUPPORT_TURBOZ) || defined(SUPPORT_OPM) void x1f_opm(REG8 reg, REG8 dat) { if (x1f.enable) { @@ -95,6 +98,7 @@ void x1f_opm(REG8 reg, REG8 dat) { } } } +#endif void x1f_psg(REG8 reg, REG8 dat) {