|
|
| version 1.6, 2003/12/13 19:59:41 | version 1.11, 2005/02/09 20:11:35 |
|---|---|
| Line 4 | Line 4 |
| // | // |
| #include "compiler.h" | #include "compiler.h" |
| #if defined(SUPPORT_S98) | |
| #include "dosio.h" | #include "dosio.h" |
| #include "pccore.h" | #include "pccore.h" |
| #include "iocore.h" | #include "iocore.h" |
| Line 15 | Line 18 |
| #define S98LOG_BUFSIZE (32 * 1024) | #define S98LOG_BUFSIZE (32 * 1024) |
| typedef struct { | typedef struct { |
| BYTE magic[3]; | UINT8 magic[3]; |
| UINT8 formatversion; | UINT8 formatversion; |
| BYTE timerinfo[4]; | UINT8 timerinfo[4]; |
| BYTE timerinfo2[4]; | UINT8 timerinfo2[4]; |
| BYTE compressing[4]; | UINT8 compressing[4]; |
| BYTE offset[4]; | UINT8 offset[4]; |
| BYTE dumpdata[4]; | UINT8 dumpdata[4]; |
| BYTE looppoint[4]; | UINT8 looppoint[4]; |
| BYTE headerreserved[0x24]; | UINT8 headerreserved[0x24]; |
| BYTE title[0x40]; | UINT8 title[0x40]; |
| } S98HDR; | } S98HDR; |
| static struct { | static struct { |
| Line 32 static struct { | Line 35 static struct { |
| UINT32 intcount; | UINT32 intcount; |
| SINT32 clock; | SINT32 clock; |
| UINT p; | UINT p; |
| BYTE buf[S98LOG_BUFSIZE]; | UINT8 buf[S98LOG_BUFSIZE]; |
| } s98log; | } s98log; |
| Line 105 void S98_trash(void) { | Line 108 void S98_trash(void) { |
| S98_close(); | S98_close(); |
| } | } |
| BOOL S98_open(const char *filename) { | BRESULT S98_open(const OEMCHAR *filename) { |
| UINT i; | UINT i; |
| S98HDR hdr; | S98HDR hdr; |
| Line 117 BOOL S98_open(const char *filename) { | Line 120 BOOL S98_open(const char *filename) { |
| } | } |
| // 初期化 | // 初期化 |
| s98log.clock = pc.realclock / 1000; | s98log.clock = pccore.realclock / 1000; |
| s98log.p = 0; | s98log.p = 0; |
| // ヘッダの保存 | // ヘッダの保存 |
| Line 130 BOOL S98_open(const char *filename) { | Line 133 BOOL S98_open(const char *filename) { |
| STOREINTELDWORD(hdr.offset, offsetof(S98HDR, title)); | STOREINTELDWORD(hdr.offset, offsetof(S98HDR, title)); |
| STOREINTELDWORD(hdr.dumpdata, sizeof(S98HDR)); | STOREINTELDWORD(hdr.dumpdata, sizeof(S98HDR)); |
| for (i=0; i<sizeof(hdr); i++) { | for (i=0; i<sizeof(hdr); i++) { |
| S98_putc(*(((BYTE *)&hdr) + i)); | S98_putc(*(((UINT8 *)&hdr) + i)); |
| } | } |
| #if 1 | #if 1 |
| Line 140 BOOL S98_open(const char *filename) { | Line 143 BOOL S98_open(const char *filename) { |
| S98_putc(NORMAL2608); | S98_putc(NORMAL2608); |
| S98_putc((REG8)i); | S98_putc((REG8)i); |
| S98_putc(opn.reg[i]); | S98_putc(opn.reg[i]); |
| #if 0 | |
| S98_putc(EXTEND2608); | S98_putc(EXTEND2608); |
| S98_putc((REG8)i); | S98_putc((REG8)i); |
| S98_putc(opn.reg[i+0x100]); | S98_putc(opn.reg[i+0x100]); |
| #endif | |
| } | } |
| } | } |
| // PSG | // PSG |
| for (i=0x00; i<0x0e; i++) { | for (i=0x00; i<0x0e; i++) { |
| S98_putc(NORMAL2608); | S98_putc(NORMAL2608); |
| S98_putc((REG8)i); | S98_putc((REG8)i); |
| S98_putc(((BYTE *)&psg1.reg)[i]); | S98_putc(((UINT8 *)&psg1.reg)[i]); |
| } | } |
| #endif | #endif |
| Line 186 void S98_put(REG8 module, REG8 addr, REG | Line 188 void S98_put(REG8 module, REG8 addr, REG |
| void S98_sync(void) { | void S98_sync(void) { |
| } | } |
| #endif | |