fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
at master 122 lines 4.5 kB view raw
1/***************************************************************************** 2 * pce * 3 *****************************************************************************/ 4 5/***************************************************************************** 6 * File name: src/utils/pfi/main.h * 7 * Created: 2012-01-19 by Hampa Hug <hampa@hampa.ch> * 8 * Copyright: (C) 2012-2025 Hampa Hug <hampa@hampa.ch> * 9 *****************************************************************************/ 10 11/***************************************************************************** 12 * This program is free software. You can redistribute it and / or modify it * 13 * under the terms of the GNU General Public License version 2 as published * 14 * by the Free Software Foundation. * 15 * * 16 * This program is distributed in the hope that it will be useful, but * 17 * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 * Public License for more details. * 20 *****************************************************************************/ 21 22 23#ifndef PFI_MAIN_H 24#define PFI_MAIN_H 1 25 26 27#include <config.h> 28 29#include <drivers/pfi/pfi.h> 30 31 32#define PFI_FOLD_NONE 0 33#define PFI_FOLD_MAXRUN 1 34#define PFI_FOLD_MINDIFF 2 35 36 37typedef int (*pfi_trk_cb) (pfi_img_t *img, pfi_trk_t *trk, 38 unsigned long c, unsigned long h, void *opaque 39); 40 41 42extern const char *arg0; 43 44extern int par_verbose; 45 46extern unsigned long par_pfi_clock; 47 48extern unsigned par_revolution; 49 50extern double par_slack1; 51extern double par_slack2; 52 53extern int par_weak_bits; 54extern unsigned long par_weak_i1; 55extern unsigned long par_weak_i2; 56 57extern int par_decode_clock; 58 59extern unsigned long par_clock_tolerance; 60 61extern unsigned par_fold_mode; 62extern unsigned par_fold_window; 63extern unsigned long par_fold_max; 64 65extern unsigned par_pfi_fold_revolution; 66extern unsigned long par_pfi_fold_window; 67extern unsigned long par_pfi_fold_compare; 68extern int par_pfi_fold_right; 69 70 71int pfi_parse_double (const char *str, double *val); 72int pfi_parse_long (const char *str, long *val); 73int pfi_parse_ulong (const char *str, unsigned long *val); 74int pfi_parse_uint (const char *str, unsigned *val); 75int pfi_parse_bool (const char *str, int *val); 76int pfi_parse_rate (const char *str, unsigned long *val); 77int pfi_parse_time (const char *str, double *val, double def); 78 79int pfi_for_all_tracks (pfi_img_t *img, pfi_trk_cb fct, void *opaque); 80int pfi_parse_range (const char *str, unsigned long *v1, unsigned long *v2, char *all); 81 82 83int pfi_comment_add (pfi_img_t *img, const char *str); 84int pfi_comment_load (pfi_img_t *img, const char *fname); 85int pfi_comment_save (pfi_img_t *img, const char *fname); 86int pfi_comment_set (pfi_img_t *img, const char *str); 87int pfi_comment_show (pfi_img_t *img); 88 89int pfi_delete_tracks (pfi_img_t *img); 90int pfi_double_step (pfi_img_t *img, int even); 91 92int pfi_decode_bits (pfi_img_t *img, const char *type, unsigned long cell, const char *fname); 93int pfi_decode_bits_pbs (pfi_img_t *img, unsigned long rate, const char *fname); 94int pfi_decode (pfi_img_t *img, const char *type, unsigned long rate, const char *fname); 95 96int pfi_encode (pfi_img_t *img, const char *type, const char *fname); 97 98int pfi_export_tracks (pfi_img_t *img, const char *fname); 99int pfi_import_tracks (pfi_img_t *img, const char *fname); 100 101int pfi_fold (pfi_img_t *img); 102 103int pfi_print_info (pfi_img_t *img); 104int pfi_list_tracks (pfi_img_t *img, int verb); 105 106int pfi_decode_text (pfi_img_t *img, const char *fname); 107int pfi_encode_text (pfi_img_t *img, const char *fname); 108 109int pfi_quantize (pfi_img_t *img, unsigned long rate); 110int pfi_revolutions (pfi_img_t *img, const char *str); 111int pfi_slack (pfi_img_t *img, const char *str); 112int pfi_scale_tracks (pfi_img_t *img, double factor); 113int pfi_set_clock (pfi_img_t *img, unsigned long clock); 114int pfi_set_rpm (pfi_img_t *img, double rpm); 115int pfi_set_rpm_mac_490 (pfi_img_t *img); 116int pfi_set_rpm_mac_500 (pfi_img_t *img); 117int pfi_shift_index (pfi_img_t *img, long ofs); 118int pfi_shift_index_us (pfi_img_t *img, long us); 119int pfi_wpcom (pfi_img_t *img); 120 121 122#endif