forked from NEO-SPECTRUMAN/SpecEmu
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Tapes.inc
118 lines (87 loc) · 3.32 KB
/
Tapes.inc
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
; WAVHEADERSIZE defined in DirectSound.asm
; only required here for soundless build
IFNDEF WANTSOUND
WAVHEADERSIZE equ 44
ENDIF
; tape type definitions:
RESETENUM 0
ENUM Type_NONE, Type_TAP, Type_TZX, Type_WAV, Type_CSW, Type_PZX
SPECIAL_PAUSE_BLOCK equ 0FEh
.data?
align 16
CSW_Load_Handle DWORD ? ; CSW object handle from csw.dll for reading CSW files
CSW_Save_Handle DWORD ? ; CSW object handle from csw.dll for writing CSW files
BlockData DWORD ?
BytePtr DWORD ?
ByteCount DWORD ?
LastDataBlockPauseLocation DWORD ?
TapeDataBlockCnt DWORD ?
FirstTAPBlockPtr DWORD ?
SaveTapeTStates DWORD ?
SaveTapePulsePeriod DWORD ?
_tapfilesize DWORD ?
TZXCallBlockPtr DWORD ?
TZXAvail DWORD ?
TZXJump DWORD ?
Tape_Pause_ms DWORD ?
TZXCurrBlock WORD ?
TapeTStates WORD ?
TZXCountDown WORD ?
TZXPause WORD ?
TZXWantPause WORD ?
TZXLoopCounter WORD ?
TZXLoopBlockNum WORD ?
LengthPilotTone WORD ?
LengthPilotPulse WORD ?
LengthSyncFPulse WORD ?
LengthSyncSPulse WORD ?
; these two need to remain together in this order (see MainBitLoop)
LengthZeroBitPulse WORD ?
LengthOneBitPulse WORD ?
TZXNumCalls WORD ?
TZXCallReturn WORD ?
UsedBitsLastByte BYTE ?
TAPEByte BYTE ?
TAPENumBits BYTE ?
EarBit BYTE ?
EarXor BYTE ? ; default: 0. xor 64 on "tapeinvert" command in debug command parser
EdgeTrigger BYTE ?
EdgeTriggerAck BYTE ?
; now defined in Z80Core.asm
;LoadTapeType BYTE ?
;SaveTapeType BYTE ?
TapeExtBuffer BYTE 8 dup (?)
tape_last_edges_rate BYTE ?
tape_last_edges_offset BYTE ?
tape_last_edges_buffer BYTE 15 dup (?)
.data
SaveCSWFileVersion dd 2 ; default is to save CSW files as version 2
SaveCSWSampleRate dd 44100 ; default CSW sample rate
CSWHEADER STRUCT
IDString BYTE 23 dup(?) ; ID string + $1A
Major BYTE ?
Minor BYTE ?
SampleRate WORD ?
CompressionType BYTE ?
Polarity BYTE ?
Reserved BYTE 3 dup(?)
CSWHEADER ENDS
TPZX STRUCT
BlockData DWORD ?
BlockSize DWORD ?
Count DWORD ?
Duration DWORD ?
Duration1 DWORD ?
Pause DWORD ?
PulseSequence DWORD ?
PulseCount DWORD ?
DataStream DWORD ?
NumDataStreamBits DWORD ?
Data_s0 DWORD ?
Data_s1 DWORD ?
TailPulse WORD ?
Data_p0 BYTE ?
Data_p1 BYTE ?
BitNumber BYTE ?
TPZX ENDS
.code