// Files void LoadToVRAM(const char* filename, u16 x, u16 y) { filename; x; y; //subRom.SX = (u16)filename; //subRom.SY = 0; //subRom.DX = x; //subRom.DY = y; //subRom.NX = 0; //subRom.NY = 0; //subRom.CLR = 0; //subRom.ARG = 0; //subRom.CMD = 0; #define EXTROM #0x015F #define BLTVD #0x019D #define SX #0xF562 // X-coordinate of the source #define SY #0xF564 // Y-coordinate of the source #define DX #0xF566 // X-coordinate of the destination #define DY #0xF568 // Y-coordinate of the destination #define NX #0xF56A // number of dots in the X direction #define NY #0xF56C // number of dots in the Y direction #define CDUMMY #0xF56E // dummy (not required to be set) #define ARG #0xF56F // selects the direction and expansion RAM (same as VDP R#45) #define LOGOP #0xF570 // logical operation code (same as the logical operation code of VDP) __asm ;// Init data ld l,4(ix) ld h,5(ix) ld (SX), hl ld l,6(ix) ld h,7(ix) ld (DX), hl ld l,8(ix) ld h,9(ix) ld (DY), hl xor a ld (ARG), a ;// ARG doit toujours être mis à zéro !!! ld (LOGOP), a ;// Idem LOGOP ;// Call BLTVD function di ld hl, #0xF562 ld ix, BLTVD call EXTROM ei __endasm; }
/***************************************************************************/ void write_float(float data) { fwrite( ((char*) &data) + 3, sizeof(char), 1, arch_dest); fwrite( ((char*) &data) + 2, sizeof(char), 1, arch_dest); fwrite( ((char*) &data) + 1, sizeof(char), 1, arch_dest); fwrite( ((char*) &data) , sizeof(char), 1, arch_dest); } /***************************************************************************/ void usage(void) { fprintf(stderr,"\nusage: %s <DATA-File> <HTK-File>\n\ Header: nSamples=number_of_vectors\n\ sampPeriod=50 (arbitrary)\n\ sSize=4*PUNTOS (float, vector dimension)\n\ parmKind=9 (USER)\n\n",prog); exit(1); } int main (int argc, char *argv[]) { int i, j, cont, puntos; char linea[MAX_LINE_LENGTH], *np, *endp; FILE *arch_orig=NULL; // Cabecera long nSamples, sampPeriod; int sampSize, parmKind; prog=argv[0]; if ((argc<2) || (argc>3)) {