summaryrefslogtreecommitdiffstats
path: root/apps/plugins/zxbox/tapef_p.h
blob: c677e092032b0cd5353485f2bdf89cca35b2baa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* 
 * Copyright (C) 1996-1998 Szeredi Miklos
 * Email: mszeredi@inf.bme.hu
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version. See the file COPYING. 
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */

#ifndef TAPEF_P_H
#define TAPEF_P_H

typedef unsigned char  byte;
typedef unsigned short dbyte;
typedef unsigned long  qbyte;

#define BYTE(arr, i)  (arr[i])
#define DBYTE(arr, i) (arr[i] + (arr[(i)+1] << 8))

struct tapeinfo {
  int type;
  int tzxminver, tzxmajver;
};

struct seginfo {
  int type;
  int segtype;

  dbyte pulse;
  dbyte num;  
  dbyte sync1p;
  dbyte sync2p;
  dbyte zerop;
  dbyte onep;

  dbyte pause;

  byte  bused;

  long len;
  long ptr;
};

extern struct tapeinfo tf_tpi;
extern struct seginfo  tf_cseg;
extern long tf_segoffs;

extern byte *tf_get_block(int i);

#endif /* TAPEF_P_H */