token_initer::token_initer() { init_ascii(); init_latin1(); init_special_chars(); init_strings(); default_token_info.set(TOKEN_OTHER); }
//set : |= ou juste = ? void terminal_init() { //Already done in InitSPI() //rFIO0DIR |= (1<<16); //Set cs pin for terminal as output //__end(); int i; wr(J1_RESET, 1); // HALT coprocessor __wstart(RAM_SPR); // Hide all sprites for (i = 0; i < 512; i++) { xhide(); } __end(); //release Select Pin fill(RAM_PIC, 0, 1024 * 10); // Zero all character RAM fill(RAM_SPRPAL, 0, 2048); // Sprite palletes black fill(RAM_SPRIMG, 0, 64 * 256); // Clear all sprite data fill(VOICES, 0, 256); // Silence fill(PALETTE16A, 0, 128); // Black 16-, 4-palletes and COMM wr16(SCROLL_X, 0); wr16(SCROLL_Y, 0); wr(JK_MODE, 0); wr(SPR_DISABLE, 0); wr(SPR_PAGE, 0); wr(IOMODE, 0); wr16(BG_COLOR, 0); wr16(SAMPLE_L, 0); wr16(SAMPLE_R, 0); wr16(SCREENSHOT_Y, 0); wr(MODULATOR, 64); init_ascii(); }
void args_handle(config *cfg, int argc, char **argv) { int fl; while ((fl = getopt(argc, argv, "Acd:fhl:m:rsSx")) != -1) { switch (fl) { case 'A': /* no axis */ cfg->axis = false; break; case 'c': /* use colorblind-safe default colors */ cfg->colorblind = true; break; case 'd': /* dimensions */ parse_dims(cfg, optarg); break; case 'f': /* flip x/y */ cfg->flip_xy = true; break; case 'h': /* help */ usage(NULL); break; case 'l': /* log */ if (strchr(optarg, 'x')) { cfg->log_x = true; } if (strchr(optarg, 'y')) { cfg->log_y = true; } if (strchr(optarg, 'c')) { cfg->log_count = true; } break; case 'm': /* mode */ switch (optarg[0]) { case 'c': cfg->mode = MODE_COUNT; break; case 'd': cfg->mode = MODE_DOT; break; case 'l': cfg->mode = MODE_LINE; break; default: usage("Bad argument to -m: must be 'count', 'dot', or 'line'."); } break; case 'r': /* linear regression */ cfg->regression = true; break; case 's': /* SVG */ cfg->plot_type = PLOT_SVG; break; case 'S': /* disable stream mode */ cfg->stream_mode = false; break; case 'x': /* col 0 is X value */ cfg->x_column = true; break; case '?': default: usage(NULL); } } argc -= (optind - 1); argv += (optind - 1); if (argc > 1) { cfg->in_path = argv[1]; if (0 != strcmp("-", cfg->in_path)) { cfg->in = fopen(cfg->in_path, "r"); if (cfg->in == NULL) { err(1, "fopen"); } } } if (cfg->plot_type == PLOT_SVG) { init_svg(cfg); } else { init_ascii(cfg); } }