--- np2/sound/s98.c 2003/11/28 21:06:02 1.4 +++ np2/sound/s98.c 2004/08/15 11:17:58 1.9 @@ -4,6 +4,9 @@ // #include "compiler.h" + +#if defined(SUPPORT_S98) + #include "dosio.h" #include "pccore.h" #include "iocore.h" @@ -16,7 +19,7 @@ typedef struct { BYTE magic[3]; - BYTE formatversion; + UINT8 formatversion; BYTE timerinfo[4]; BYTE timerinfo2[4]; BYTE compressing[4]; @@ -61,7 +64,7 @@ static void S98_flush(void) { } } -static void S98_putc(BYTE data) { +static void S98_putc(REG8 data) { s98log.buf[s98log.p++] = data; if (s98log.p == S98LOG_BUFSIZE) { @@ -83,10 +86,10 @@ static void S98_putint(void) { S98_putc(0xFE); /* SYNC(n) */ s98log.intcount -= 2; while (s98log.intcount > 0x7f) { - S98_putc((BYTE)(0x80 | (s98log.intcount & 0x7f))); + S98_putc((REG8)(0x80 | (s98log.intcount & 0x7f))); s98log.intcount >>= 7; } - S98_putc((BYTE)(s98log.intcount & 0x7f)); + S98_putc((REG8)(s98log.intcount & 0x7f)); } s98log.intcount = 0; } @@ -117,7 +120,7 @@ BOOL S98_open(const char *filename) { } // 初期化 - s98log.clock = pc.realclock / 1000; + s98log.clock = pccore.realclock / 1000; s98log.p = 0; // ヘッダの保存 @@ -130,7 +133,7 @@ BOOL S98_open(const char *filename) { STOREINTELDWORD(hdr.offset, offsetof(S98HDR, title)); STOREINTELDWORD(hdr.dumpdata, sizeof(S98HDR)); for (i=0; i