void showMenuDownload(BYTE showMask) { if(showMask & SHOWMENU_STATICTEXT) { (void) Clear_home(); (void) Cconws("\33p[Floppy image download, Jookie 2014-18]\33q\r\n"); } if(showMask & SHOWMENU_SEARCHSTRING) { showSearchString(); } if(showMask & SHOWMENU_RESULTS_ALL) { showPageNumber(); } showResults(showMask); if(showMask & SHOWMENU_STATICTEXT) { Goto_pos(0, 19); (void) Cconws("\33pA..Z\33q - search, \33p(shift) arrows\33q - move\r\n"); if(status.doWeHaveStorage) { // with storage (void) Cconws("\33pF1, F2, F3\33q - insert into slot 1, 2, 3\r\n"); (void) Cconws("\33pF4\33q - download, \33pF5\33q - refresh list,\r\n"); } else { // without storage (void) Cconws(" \r\n"); (void) Cconws(" \33pF5\33q - refresh list,\r\n"); } (void) Cconws("\33pF8\33q - setup screen, \33pF10\33q - quit\r\n"); } }
void handleImagesDownload(void) // OBSOLETE { if(destDir.isSet == 0) { // destination dir not set? selectDestinationDir(); if(destDir.isSet == 0) { // destination dir still not set? (void) Clear_home(); (void) Cconws("You have to select destination dir!\r\nPress any key to continue.\n\r"); getKey(); return; } } BYTE res; (void) Clear_home(); (void) Cconws("Downloading selected images...\r\n"); while(1) { commandShort[4] = FDD_CMD_SEARCH_DOWNLOAD; commandShort[5] = 0; sectorCount = 1; // read 1 sector res = Supexec(ce_acsiReadCommand); if(res == FDD_DN_WORKING) { // if downloading (void) Cconws(pBfr); // write out status string (void) Cconws("\n\r"); } else if(res == FDD_DN_NOTHING_MORE) { // if nothing more to download (void) Cconws("All selected images downloaded.\r\nPress any key to continue.\n\r"); getKey(); break; } else if(res == FDD_DN_DONE) { // if this image finished downloading downloadImage(10); // store this downloaded image (void) Cconws("\n\r\n\r"); } sleep(1); // wait a second } }
int main(void) { Clear_home(); initBuffer(); rBuf = readBuffer; wBuf = writeBuffer; (void) Cconws("STiNG test...\r\n"); BYTE found = Supexec (find_STiNG); if(!found) { sleep(3); return 0; } getServerIp(); WORD whichTests = 0; while(whichTests == 0) { showMenu(); char req = Cnecin(); if(req >= 'A' && req <= 'Z') req += 32; // to upper case if(req == 'q') break; // quit switch(req) { case 'a': // all tests whichTests = 0xffff; break; case 's': whichTests = 0x8000; break; case '0': case '1': case '2': case '3': whichTests = 1 << (req - '0'); } } if(whichTests & 1) doTest00(); if(whichTests & 2) doTest01(); if(whichTests & 4) doTest02(); if(whichTests & 8) doTest03(); if(whichTests & 0x8000) doSpeedTest(); if(whichTests != 0) writeBufferToFile(); deinitBuffer(); sleep(3); return 0; }
void main(void) { int i; Super(0); /* passage en SUPERVISEUR */ Clear_home(); while (''=='') { for (i=0; i<=3; i++) { Goto_pos(i,1); printf("Joy (%d) Position =>%u Tire => %u \n",i+1,position(i),feu(i)); } } Super(1); /* retour en UTILISATEUR */ }
BYTE searchInit(void) { commandShort[4] = FDD_CMD_SEARCH_INIT; commandShort[5] = 0; sectorCount = 1; // read 1 sector BYTE res; (void) Clear_home(); (void) Cconws("Initializing... Press ESC to stop.\n\r\n\r"); while(1) { res = Supexec(ce_acsiReadCommand); if(res == FDD_DN_LIST) { (void) Cconws("Downloading list of floppy images...\n\r"); } else if(res == FDD_ERROR) { (void) Cconws("Failed to initialize! Press any key.\n\r"); Cnecin(); return 0; } else if(res == FDD_OK) { (void) Cconws("Done.\n\r"); return 1; } else { (void) Cconws("CosmosEx device communication problem!\n\r"); } WORD val = Cconis(); // see if there is some char waiting if(val != 0) { // char waiting? BYTE key = getKey(); if(key == KEY_ESC) { (void) Cconws("Init terminated by user. Press any key.\n\r"); Cnecin(); return 0; } } sleep(1); } }