	NAME	bank4(17)
	RSEG	CODE(0)
	RSEG	CSTR(0)
	RSEG	CONST(0)
	RSEG	TEMP(0)
	RSEG	UDATA0(0)
	RSEG	IDATA0(0)
	RSEG	CDATA0(0)
	PUBLIC	ClearList
	PUBLIC	DiskErrMesage
	EXTERN	FN
	PUBLIC	Getnfiles
	PUBLIC	KsaId
	PUBLIC	PT3_Detect
	PUBLIC	SQT_Call_LC191
	PUBLIC	SQT_Call_LC1D1
	PUBLIC	SQT_Call_LC283
	PUBLIC	SQT_Call_LC2A8
	PUBLIC	SQT_Call_LC2D9
	PUBLIC	SQT_Detect
	PUBLIC	SQT_GetChannelInfo
	PUBLIC	SQT_GetInfo
	PUBLIC	SQT_GetRegisters
	PUBLIC	SQT_Init
	PUBLIC	SQT_PatternInterpreter
	PUBLIC	SQT_Play
	PUBLIC	SQT_PreInit
	PUBLIC	SQT_SI
	PUBLIC	SQT_Table
	PUBLIC	STC_Detect
	PUBLIC	STC_GetInfo
	PUBLIC	STC_GetRegisters
	PUBLIC	STC_Init
	PUBLIC	STC_PatternInterpreter
	PUBLIC	STC_Play
	PUBLIC	STP_Detect
	PUBLIC	STP_GetInfo
	PUBLIC	STP_GetRegisters
	PUBLIC	STP_Init
	PUBLIC	STP_PatternInterpreter
	PUBLIC	STP_Play
	PUBLIC	ST_Table
	PUBLIC	Status
	EXTERN	attr_old
	EXTERN	attr_too_old
	EXTERN	ay_sys_getword
	PUBLIC	ay_sys_writeword
	EXTERN	ay_writeay
	EXTERN	bzero1
	EXTERN	clearstring
	PUBLIC	clock
	EXTERN	d2s
	PUBLIC	delay
	PUBLIC	draw_max_len
	EXTERN	gotoxy
	EXTERN	memcmp
	EXTERN	memcpy
	EXTERN	memset
	EXTERN	next
	EXTERN	nfiles
	EXTERN	output
	EXTERN	playing
	EXTERN	printf
	EXTERN	printstring
	EXTERN	rand
	PUBLIC	stc
	PUBLIC	stp
	EXTERN	strcpy
	EXTERN	strlen
	EXTERN	strncmp
	EXTERN	strncpy
	PUBLIC	tiho
	EXTERN	vars
	PUBLIC	waste4
	EXTERN	?CLZ80B_4_06_L00
	EXTERN	?US_MOD_L02
	EXTERN	?SS_MOD_L02
	EXTERN	?S_MUL_L02
	EXTERN	?L_MUL_L03
	EXTERN	?SL_DIV_L03
	EXTERN	?SL_CMP_L03
	EXTERN	?L_INC_L03
	EXTERN	?L_MULASG_L03
	EXTERN	?L_ADDASG_L03
	EXTERN	?S_S_SWITCH_L06
	EXTERN	?BANK_CALL_DIRECT_EXAF_L08
	EXTERN	?BANK_FAST_LEAVE_L08
	RSEG	CODE
; 1.	# include "all.h"
; 2.	
; 3.	
; 4.	
; 5.	
; 6.	
; 7.	
; 8.	
; 9.	////////////////////////////////////////////////////////////////////
; 10.	////////////////////////////////////////////////////////////////////
; 11.	
; 12.	
; 13.	
; 14.	unsigned short ST_Table[96] =
; 15.	{ 0xef8, 0xe10, 0xd60, 0xc80, 0xbd8, 0xb28, 0xa88, 0x9f0, 0x960, 0x8e0, 0x858, 0x7e0, 0x77c, 0x708, 0x6b0, 0x640, 0x5ec, 0x594, 0x544, 0x4f8, 0x4b0, 0x470, 0x42c, 0x3f0, 0x3be, 0x384, 0x358, 0x320, 0x2f6, 0x2ca, 0x2a2, 0x27c, 0x258, 0x238, 0x216, 0x1f8, 0x1df, 0x1c2, 0x1ac, 0x190, 0x17b, 0x165, 0x151, 0x13e, 0x12c, 0x11c, 0x10b, 0xfc, 0xef, 0xe1, 0xd6, 0xc8, 0xbd, 0xb2, 0xa8, 0x9f, 0x96, 0x8e, 0x85, 0x7e, 0x77, 0x70, 0x6b, 0x64, 0x5e, 0x59, 0x54, 0x4f, 0x4b, 0x47, 0x42, 0x3f, 0x3b, 0x38, 0x35, 0x32, 0x2f, 0x2c, 0x2a, 0x27, 0x25, 0x23, 0x21, 0x1f, 0x1d, 0x1c, 0x1a, 0x19, 0x17, 0x16, 0x15, 0x13, 0x12, 0x11, 0x10, 0xf };
; 16.	
; 17.	
; 18.	//Sound tracker PRO player. KSA.
; 19.	
; 20.	typedef struct 
; 21.	{
; 22.	    unsigned char STP_Delay;
; 23.	    unsigned char STP_PositionsPointer0, STP_PositionsPointer1;
; 24.	    unsigned char STP_PatternsPointer0, STP_PatternsPointer1;
; 25.	    unsigned char STP_OrnamentsPointer0, STP_OrnamentsPointer1;
; 26.	    unsigned char STP_SamplesPointer0, STP_SamplesPointer1;
; 27.	    unsigned char STP_Init_Id;
; 28.	} STP_File;
; 29.	
; 30.	typedef struct 
; 31.	{
; 32.	    unsigned short OrnamentPointer, SamplePointer, Address_In_Pattern, Ton;
; 33.	    unsigned char Position_In_Ornament, Loop_Ornament_Position, Ornament_Length, Position_In_Sample, Loop_Sample_Position, Sample_Length, Volume, Number_Of_Notes_To_Skip, Note, Amplitude;
; 34.	    signed short Current_Ton_Sliding;
; 35.	    bool Envelope_Enabled, Enabled;
; 36.	    signed char Glissade, Note_Skip_Counter;
; 37.	}STP_Channel_Parameters;
; 38.	
; 39.	typedef struct 
; 40.	{
; 41.	    unsigned char DelayCounter, CurrentPosition, Transposition;
; 42.	} STP_Parameters;
; 43.	
; 44.	typedef struct 
; 45.	{
; 46.	    STP_Parameters STP;
; 47.	    STP_Channel_Parameters STP_A, STP_B, STP_C;
; 48.	} STP_SongInfo;
; 49.	
; 50.	STP_SongInfo stp;
; 51.	
; 52.	#define STP_A (((STP_SongInfo *)info->data)->STP_A)
; 53.	#define STP_B (((STP_SongInfo *)info->data)->STP_B)
; 54.	#define STP_C (((STP_SongInfo *)info->data)->STP_C)
; 55.	#define STP (((STP_SongInfo *)info->data)->STP)
; 56.	
; 57.	char * KsaId = "KSA SOFTWARE COMPILATION OF ";
; 58.	
; 59.	#define STP_PositionsPointer (header->STP_PositionsPointer0 | (header->STP_PositionsPointer1 << 8))
; 60.	#define STP_OrnamentsPointer (header->STP_OrnamentsPointer0 | (header->STP_OrnamentsPointer1 << 8))
; 61.	#define STP_PatternsPointer (header->STP_PatternsPointer0 | (header->STP_PatternsPointer1 << 8))
; 62.	#define STP_SamplesPointer (header->STP_SamplesPointer0 | (header->STP_SamplesPointer1 << 8))
; 63.	#define STP_Delay (header->STP_Delay)
; 64.	
; 65.	void STP_Init(AYSongInfo * info)
; 66.	{
STP_Init:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 67.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011),HL
; 68.	    STP_File *header = (STP_File *)module;
	LD	(?0011+2),HL
; 69.	    
; 70.	    
; 71.	    ////*
; 72.	    info->data = &stp;
	LD	(IX+4),LOW(stp)
	LD	(IX+5),HIGH(stp)
; 73.	        
; 74.	    memset(&STP_A, 0, sizeof(STP_Channel_Parameters));
	LD	BC,24
	PUSH	BC
	CALL	LWRD ?1180
	POP	AF
; 75.	    memset(&STP_B, 0, sizeof(STP_Channel_Parameters));
	LD	HL,24
	PUSH	HL
	LD	C,H
	LD	B,H
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,27
	ADD	HL,DE
	EX	DE,HL
	CALL	LWRD ?1181
	POP	AF
; 76.	    memset(&STP_C, 0, sizeof(STP_Channel_Parameters));
	LD	HL,24
	PUSH	HL
	LD	C,H
	LD	B,H
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,51
	ADD	HL,DE
	EX	DE,HL
	CALL	LWRD ?1181
	POP	AF
; 77.	
; 78.	    STP.DelayCounter = 1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	(HL),1
; 79.	    STP.Transposition = module[STP_PositionsPointer + 3];
	LD	HL,(?0011+2)
	INC	HL
	LD	A,(HL)
	LD	B,0
	INC	HL
	LD	D,(HL)
	LD	E,B
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	LD	BC,(?0011)
	ADD	HL,BC
	INC	HL
	INC	HL
	INC	HL
	LD	D,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	(HL),D
; 80.	    STP.CurrentPosition = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	(HL),E
; 81.	    STP_A.Address_In_Pattern = ay_sys_getword(&module[STP_PatternsPointer + module[STP_PositionsPointer + 2]]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,7
	ADD	HL,DE
	PUSH	HL
	PUSH	BC
	PUSH	BC
	LD	HL,(?0011+2)
	INC	HL
	LD	C,(HL)
	INC	HL
	LD	H,(HL)
	LD	A,D
	OR	H
	LD	H,A
	LD	L,C
	POP	BC
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,D
	PUSH	BC
	LD	HL,(?0011+2)
	INC	HL
	INC	HL
	INC	HL
	LD	A,(HL)
	LD	HL,4
	LD	BC,(?0011+2)
	ADD	HL,BC
	LD	H,(HL)
	LD	L,A
	LD	A,D
	OR	H
	LD	H,A
	POP	BC
	ADD	HL,BC
	POP	BC
	ADD	HL,BC
	CALL	LWRD ?1184
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 82.	    STP_B.Address_In_Pattern = ay_sys_getword(&module[STP_PatternsPointer + module[STP_PositionsPointer + 2] + 2]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,31
	ADD	HL,BC
	PUSH	HL
	LD	HL,(?0011+2)
	INC	HL
	LD	A,(HL)
	INC	HL
	LD	D,(HL)
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	LD	BC,(?0011)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	E,(HL)
	LD	D,0
	PUSH	DE
	LD	HL,(?0011+2)
	INC	HL
	INC	HL
	INC	HL
	LD	L,(HL)
	LD	H,D
	PUSH	HL
	LD	L,4
	LD	BC,(?0011+2)
	ADD	HL,BC
	LD	B,(HL)
	POP	HL
	LD	E,L
	LD	A,H
	OR	B
	LD	D,A
	EX	DE,HL
	POP	DE
	ADD	HL,DE
	LD	BC,(?0011)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	CALL	LWRD ?1185
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 83.	    STP_C.Address_In_Pattern = ay_sys_getword(&module[STP_PatternsPointer + module[STP_PositionsPointer + 2] + 4]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,55
	ADD	HL,BC
	PUSH	HL
	LD	HL,(?0011+2)
	INC	HL
	LD	A,(HL)
	INC	HL
	LD	D,(HL)
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	LD	BC,(?0011)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	E,(HL)
	LD	D,0
	PUSH	DE
	LD	HL,(?0011+2)
	INC	HL
	INC	HL
	INC	HL
	LD	L,(HL)
	LD	H,D
	PUSH	HL
	LD	L,4
	LD	BC,(?0011+2)
	ADD	HL,BC
	LD	B,(HL)
	POP	HL
	LD	E,L
	LD	A,H
	OR	B
	LD	D,A
	EX	DE,HL
	POP	DE
	ADD	HL,DE
	LD	BC,(?0011)
	ADD	HL,BC
	LD	DE,4
	CALL	LWRD ?1186
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 84.	
; 85.	    STP_A.SamplePointer = ay_sys_getword(&module[STP_SamplesPointer]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,5
	ADD	HL,BC
	PUSH	HL
	LD	HL,7
	LD	BC,(?0011+2)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,8
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	LD	HL,(?0011)
	ADD	HL,BC
	CALL	LWRD ?1184
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 86.	    STP_A.Loop_Sample_Position = module[STP_A.SamplePointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,5
	ADD	HL,BC
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011)
	ADD	HL,BC
	LD	D,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,15
	ADD	HL,BC
	LD	(HL),D
; 87.	    STP_A.SamplePointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,5
	ADD	HL,BC
	INC	(HL)
	INC	HL
	JR	NZ,?0830
	INC	(HL)
?0830:
; 88.	    STP_A.Sample_Length = module[STP_A.SamplePointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011)
	ADD	HL,BC
	LD	D,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,16
	ADD	HL,BC
	LD	(HL),D
; 89.	    STP_A.SamplePointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,5
	ADD	HL,BC
	INC	(HL)
	INC	HL
	JR	NZ,?0831
	INC	(HL)
?0831:
; 90.	    STP_B.SamplePointer = STP_A.SamplePointer;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,29
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,5
	ADD	HL,BC
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 91.	    STP_B.Loop_Sample_Position = STP_A.Loop_Sample_Position;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,15
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,39
	ADD	HL,DE
	LD	(HL),B
; 92.	    STP_B.Sample_Length = STP_A.Sample_Length;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,16
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	DE
	ADD	HL,DE
	LD	(HL),B
; 93.	    STP_C.SamplePointer = STP_A.SamplePointer;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,53
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,5
	ADD	HL,BC
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 94.	    STP_C.Loop_Sample_Position = STP_A.Loop_Sample_Position;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,15
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	E,63
	ADD	HL,DE
	LD	(HL),B
; 95.	    STP_C.Sample_Length = STP_A.Sample_Length;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,16
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	DE
	ADD	HL,DE
	LD	(HL),B
; 96.	
; 97.	    STP_A.OrnamentPointer = ay_sys_getword(&module[STP_OrnamentsPointer]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,5
	LD	BC,(?0011+2)
	ADD	HL,BC
	LD	A,(HL)
	LD	HL,6
	ADD	HL,BC
	LD	B,(HL)
	LD	L,A
	LD	A,D
	OR	B
	LD	H,A
	LD	BC,(?0011)
	ADD	HL,BC
	CALL	LWRD ?1184
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 98.	    STP_A.Loop_Ornament_Position = module[STP_A.OrnamentPointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011)
	ADD	HL,BC
	LD	D,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,12
	ADD	HL,BC
	LD	(HL),D
; 99.	    STP_A.OrnamentPointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0832
	INC	(HL)
?0832:
; 100.	    STP_A.Ornament_Length = module[STP_A.OrnamentPointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011)
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,13
	ADD	HL,DE
	LD	(HL),B
; 101.	    STP_A.OrnamentPointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0833
	INC	(HL)
?0833:
; 102.	    STP_B.OrnamentPointer = STP_A.OrnamentPointer;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,27
	ADD	HL,BC
	PUSH	HL
	LD	C,(IX+4)
	LD	B,(IX+5)
	INC	BC
	INC	BC
	INC	BC
	LD	L,C
	LD	H,B
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 103.	    STP_B.Loop_Ornament_Position = STP_A.Loop_Ornament_Position;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,12
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	E,36
	ADD	HL,DE
	LD	(HL),B
; 104.	    STP_B.Ornament_Length = STP_A.Ornament_Length;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,13
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	DE
	ADD	HL,DE
	LD	(HL),B
; 105.	    STP_C.OrnamentPointer = STP_A.OrnamentPointer;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,51
	ADD	HL,BC
	PUSH	HL
	LD	C,(IX+4)
	LD	B,(IX+5)
	INC	BC
	INC	BC
	INC	BC
	LD	L,C
	LD	H,B
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 106.	    STP_C.Loop_Ornament_Position = STP_A.Loop_Ornament_Position;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,12
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	E,60
	ADD	HL,DE
	LD	(HL),B
; 107.	    STP_C.Ornament_Length = STP_A.Ornament_Length;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,13
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	DE
	ADD	HL,DE
	LD	(HL),B
; 108.	
; 109.	    STP_A.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,23
	ADD	HL,BC
	LD	(HL),B
; 110.	    STP_A.Glissade = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	INC	BC
	ADD	HL,BC
	LD	(HL),B
; 111.	    STP_A.Current_Ton_Sliding = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,21
	ADD	HL,BC
	XOR	A
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 112.	    STP_A.Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,24
	ADD	HL,BC
	LD	(HL),B
; 113.	    STP_A.Number_Of_Notes_To_Skip = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,18
	ADD	HL,BC
	LD	(HL),B
; 114.	    STP_A.Note_Skip_Counter = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,26
	ADD	HL,BC
	LD	(HL),B
; 115.	    STP_A.Volume = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,17
	ADD	HL,BC
	LD	(HL),B
; 116.	    STP_A.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,9
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 117.	
; 118.	    STP_B.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,47
	ADD	HL,BC
	LD	(HL),B
; 119.	    STP_B.Glissade = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	INC	BC
	ADD	HL,BC
	LD	(HL),B
; 120.	    STP_B.Current_Ton_Sliding = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,45
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 121.	    STP_B.Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,48
	ADD	HL,BC
	LD	(HL),B
; 122.	    STP_B.Number_Of_Notes_To_Skip = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,42
	ADD	HL,BC
	LD	(HL),B
; 123.	    STP_B.Note_Skip_Counter = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,50
	ADD	HL,BC
	LD	(HL),B
; 124.	    STP_B.Volume = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,41
	ADD	HL,BC
	LD	(HL),B
; 125.	    STP_B.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,33
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 126.	
; 127.	    STP_C.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,71
	ADD	HL,BC
	LD	(HL),B
; 128.	    STP_C.Glissade = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	INC	BC
	ADD	HL,BC
	LD	(HL),B
; 129.	    STP_C.Current_Ton_Sliding = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,69
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 130.	    STP_C.Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,72
	ADD	HL,BC
	LD	(HL),B
; 131.	    STP_C.Number_Of_Notes_To_Skip = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,66
	ADD	HL,BC
	LD	(HL),B
; 132.	    STP_C.Note_Skip_Counter = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,74
	ADD	HL,BC
	LD	(HL),B
; 133.	    STP_C.Volume = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,65
	ADD	HL,BC
	LD	(HL),B
; 134.	    STP_C.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,57
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 135.	    
; 136.	        info->slow = 0;
	LD	(IX+109),B
; 137.	  //  */
; 138.	}
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1180:
	LD	C,B
	LD	E,(IX+4)
	LD	D,(IX+5)
	INC	DE
	INC	DE
	INC	DE
?1181:
	LD	A,BYTE3 memset
	LD	HL,LWRD memset
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
?1187:
	LD	HL,6
	LD	BC,(?0011+205)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,7
	ADD	HL,BC
	LD	H,(HL)
	LD	C,E
	OR	H
	LD	B,A
	LD	HL,(?0011+225)
	LD	DE,(?0011+203)
	ADD	HL,DE
	LD	A,(HL)
	ADD	A,A
	LD	L,A
	LD	H,0
	ADD	HL,BC
?1186:
	ADD	HL,DE
?1184:
	EX	DE,HL
?1185:
	LD	A,BYTE3 ay_sys_getword
	LD	HL,LWRD ay_sys_getword
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 139.	
; 140.	void STP_GetInfo(AYSongInfo * info)
; 141.	{
STP_GetInfo:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 142.	    unsigned long tm = 0;
	LD	BC,0
	LD	(?0011+4),BC
	LD	(?0011+6),BC
; 143.	    unsigned char a = 1;
	LD	A,1
	LD	(?0011+8),A
; 144.	    unsigned long i, j1;
; 145.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+17),HL
; 146.	    unsigned char stDelay = module[0];
	LD	A,(HL)
	LD	(?0011+19),A
; 147.	    unsigned short stPosPt = ay_sys_getword(&module[1]);
	EX	DE,HL
	INC	DE
	CALL	LWRD ?1185
	LD	(?0011+20),HL
; 148.	    unsigned long stPatPt = ay_sys_getword(&module[3]);
	LD	DE,(?0011+17)
	INC	DE
	INC	DE
	INC	DE
	CALL	LWRD ?1185
	LD	(?0011+22),HL
	LD	(?0011+24),BC
; 149.	
; 150.	    for(i = 0; i < module[stPosPt]; i++)
	LD	BC,0
	LD	L,C
	LD	H,B
?0836:
	LD	(?0011+9),HL
	LD	(?0011+11),BC
?0013:
	LD	HL,(?0011+20)
	LD	BC,(?0011+17)
	ADD	HL,BC
	LD	L,(HL)
	LD	BC,0
	LD	H,C
	PUSH	BC
	PUSH	HL
	AND	A
	LD	HL,(?0011+9)
	POP	BC
	SBC	HL,BC
	LD	HL,(?0011+11)
	POP	BC
	SBC	HL,BC
	JP	NC,?0012
?0014:
; 151.	    {
; 152.	        //if(i == module[stPosPt + 1])
; 153.	          //  info->Loop = tm * stDelay;
; 154.	          
; 155.	        j1 = ay_sys_getword(&module[stPatPt + module[stPosPt + 2 + i * 2]]);
	LD	HL,(?0011+9)
	ADD	HL,HL
	LD	BC,(?0011+20)
	ADD	HL,BC
	LD	BC,(?0011+17)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	E,(HL)
	LD	D,0
	LD	HL,(?0011+22)
	ADD	HL,DE
	ADD	HL,BC
	CALL	LWRD ?1184
?0837:
	LD	(?0011+13),HL
	LD	(?0011+15),BC
?0017:
; 156.	        while(module[j1] != 0)
	LD	BC,(?0011+17)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	Z,?0016
?0018:
; 157.	        {
; 158.	            unsigned char val = module[j1];
	LD	HL,(?0011+13)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+26),A
; 159.	            if((val >= 1 && val <= 0x60) || (val >= 0xd0 && val <= 0xef))
	CP	1
	JR	C,?0022
	LD	B,A
	LD	A,96
	CP	B
	JR	NC,?0026
?0022:
?0021:
	LD	A,(?0011+26)
	CP	208
	JR	C,?0020
	LD	B,A
	LD	A,239
	CP	B
	JR	C,?0020
?0026:
?0025:
?0023:
?0024:
?0019:
; 160.	            {
; 161.	                tm += a;
	LD	HL,?0011+4
	LD	DE,(?0011+8)
	LD	BC,0
	LD	D,C
	CALL	LWRD ?L_ADDASG_L03
	JR	?0034
?0020:
; 162.	            }
; 163.	            else if(val >= 0x80 && val <= 0xbf)
	LD	A,(?0011+26)
	CP	128
	JR	C,?0029
	LD	B,A
	LD	A,191
	CP	B
	JR	C,?0029
?0031:
?0030:
?0028:
; 164.	            {
; 165.	                a = val - 0x7f;
	LD	A,B
	ADD	A,129
	LD	(?0011+8),A
	JR	?0034
?0029:
; 166.	            }
; 167.	            else if((val >= 0xc0 && val <= 0xcf) || val == 0xf0)
	LD	A,(?0011+26)
	CP	192
	JR	C,?0036
	LD	B,A
	LD	A,207
	CP	B
	JR	NC,?0037
?0036:
?0035:
	LD	A,(?0011+26)
	CP	240
	JR	NZ,?0034
?0037:
?0038:
?0033:
; 168.	            {
; 169.	                j1++;
	LD	HL,(?0011+13)
	LD	BC,(?0011+15)
	CALL	LWRD ?L_INC_L03
	LD	(?0011+13),HL
	LD	(?0011+15),BC
?0034:
?0032:
?0027:
; 170.	            }
; 171.	            j1++;
	LD	HL,(?0011+13)
	LD	BC,(?0011+15)
	CALL	LWRD ?L_INC_L03
	JP	LWRD ?0837
; 172.	        }
; 173.	    }
?0016:
	LD	HL,(?0011+9)
	LD	BC,(?0011+11)
	CALL	LWRD ?L_INC_L03
	JP	LWRD ?0836
?0012:
; 174.	    tm *= stDelay;
	LD	HL,?0011+4
	LD	DE,(?0011+19)
	LD	BC,0
	LD	D,C
	CALL	LWRD ?L_MULASG_L03
; 175.	    info->len = tm;
	LD	(IX+99),E
	LD	(IX+100),D
; 176.	    if(!memcmp((void *)&module[10], (void *)KsaId, 28))
	LD	HL,28
	PUSH	HL
	LD	BC,(KsaId)
	LD	L,10
	LD	DE,(?0011+17)
	ADD	HL,DE
	EX	DE,HL
	LD	A,BYTE3 memcmp
	LD	HL,LWRD memcmp
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	AF
	LD	A,L
	OR	H
	JR	NZ,?0040
?0039:
; 177.	        strncpy(info->Name, &module[38], 25);
	LD	HL,25
	PUSH	HL
	LD	L,38
	LD	BC,(?0011+17)
	ADD	HL,BC
	LD	C,L
	LD	B,H
	LD	HL,8
	PUSH	IX
	POP	DE
	ADD	HL,DE
	EX	DE,HL
	LD	A,BYTE3 strncpy
	LD	HL,LWRD strncpy
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	AF
?0040:
; 178.	}
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 179.	
; 180.	void STP_PatternInterpreter(AYSongInfo * info, STP_Channel_Parameters * chan)
; 181.	{
STP_PatternInterpreter:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
; 182.	///*
; 183.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+27),HL
; 184.	    STP_File *header = (STP_File *)module;
	LD	(?0011+29),HL
; 185.	    bool quit = false;
	XOR	A
	LD	(?0011+31),A
?0043:
; 186.	
; 187.	    do
; 188.	    {
; 189.	        unsigned char val = module[chan->Address_In_Pattern];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,(?0011+27)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+32),A
; 190.	        if(val >= 1 && val <= 0x60)
	CP	1
	JR	C,?0045
	LD	B,A
	LD	A,96
	CP	B
	JR	C,?0045
?0047:
?0046:
?0044:
; 191.	        {
; 192.	            chan->Note = val - 1;
	LD	A,B
	ADD	A,255
	LD	(IX+16),A
; 193.	            chan->Position_In_Sample = 0;
	LD	(IX+11),0
; 194.	            chan->Position_In_Ornament = 0;
	LD	(IX+8),0
; 195.	            chan->Current_Ton_Sliding = 0;
	XOR	A
	LD	(IX+18),A
	LD	(IX+19),A
; 196.	            chan->Enabled = true;
	LD	(IX+21),1
; 197.	            quit = true;
	JP	LWRD ?0856
?0045:
; 198.	        }
; 199.	        else if(val >= 0x61 && val <= 0x6f)
	LD	A,(?0011+32)
	CP	97
	JR	C,?0050
	LD	B,A
	LD	A,111
	CP	B
	JR	C,?0050
?0052:
?0051:
?0049:
; 200.	        {
; 201.	            chan->SamplePointer = ay_sys_getword(&module[STP_SamplesPointer + (val - 0x61) * 2]);
	LD	HL,7
	LD	BC,(?0011+29)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	A,D
	LD	HL,8
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	PUSH	HL
	LD	BC,(?0011+32)
	LD	B,D
	LD	HL,65439
	ADD	HL,BC
	ADD	HL,HL
	LD	C,L
	LD	B,H
	POP	HL
	ADD	HL,BC
	LD	BC,(?0011+27)
	ADD	HL,BC
	CALL	LWRD ?1184
	LD	(IX+2),L
	LD	(IX+3),H
; 202.	            chan->Loop_Sample_Position = module[chan->SamplePointer];
	LD	L,(IX+2)
	LD	H,(IX+3)
	LD	BC,(?0011+27)
	ADD	HL,BC
	LD	D,(HL)
	LD	(IX+12),D
; 203.	            chan->SamplePointer++;
	INC	(IX+2)
	JR	NZ,?0848
	INC	(IX+3)
?0848:
; 204.	            chan->Sample_Length = module[chan->SamplePointer];
	LD	L,(IX+2)
	LD	H,(IX+3)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+13),B
; 205.	            chan->SamplePointer++;
	INC	(IX+2)
	JP	NZ,?0085
	INC	(IX+3)
	JP	LWRD ?0085
?0050:
; 206.	        }
; 207.	        else if(val >= 0x70 && val <= 0x7f)
	LD	A,(?0011+32)
	CP	112
	JR	C,?0055
	LD	B,A
	LD	A,127
	CP	B
	JR	C,?0055
?0057:
?0056:
?0054:
; 208.	        {
; 209.	            chan->OrnamentPointer = ay_sys_getword(&module[STP_OrnamentsPointer + (val - 0x70) * 2]);
	LD	HL,5
	LD	BC,(?0011+29)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	A,D
	LD	HL,6
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	PUSH	HL
	LD	BC,(?0011+32)
	LD	B,D
	LD	HL,65424
	ADD	HL,BC
	ADD	HL,HL
	LD	C,L
	LD	B,H
	POP	HL
	ADD	HL,BC
	LD	BC,(?0011+27)
	ADD	HL,BC
	CALL	LWRD ?1184
	PUSH	HL
	PUSH	IX
	POP	HL
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 210.	            chan->Loop_Ornament_Position = module[chan->OrnamentPointer];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0011+27)
	ADD	HL,BC
	LD	D,(HL)
	LD	(IX+9),D
; 211.	            chan->OrnamentPointer++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0850
	INC	(HL)
?0850:
; 212.	            chan->Ornament_Length = module[chan->OrnamentPointer];
	LD	L,(IX+0)
	LD	H,(IX+1)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+10),B
; 213.	            chan->OrnamentPointer++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0851
	INC	(HL)
?0851:
; 214.	            chan->Envelope_Enabled = false;
	LD	(IX+20),0
; 215.	            chan->Glissade = 0;
	LD	(IX+22),0
	JP	LWRD ?0085
?0055:
; 216.	        }
; 217.	        else if(val >= 0x80 && val <= 0xbf)
	LD	A,(?0011+32)
	CP	128
	JR	C,?0060
	LD	B,A
	LD	A,191
	CP	B
	JR	C,?0060
?0062:
?0061:
?0059:
; 218.	        {
; 219.	            chan->Number_Of_Notes_To_Skip = val - 0x80;
	LD	A,B
	ADD	A,128
	LD	(IX+15),A
	JP	LWRD ?0085
?0060:
; 220.	        }
; 221.	        else if(val >= 0xc0 && val <= 0xcf)
	LD	A,(?0011+32)
	CP	192
	JR	C,?0065
	LD	B,A
	LD	A,207
	CP	B
	JR	C,?0065
?0067:
?0066:
?0064:
; 222.	        {
; 223.	            if(val != 0xc0)
	LD	A,B
	CP	192
	JR	Z,?0069
?0068:
; 224.	            {
; 225.	                ay_writeay(AY_ENV_SHAPE, val - 0xc0);
	ADD	A,64
	LD	C,A
	LD	E,13
	CALL	LWRD ?1200
; 226.	                chan->Address_In_Pattern++;
	INC	(IX+4)
	JR	NZ,?0852
	INC	(IX+5)
?0852:
; 227.	                ay_writeay(AY_ENV_FINE, module[chan->Address_In_Pattern]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,(?0011+27)
	CALL	LWRD ?1201
?0069:
; 228.	            }
; 229.	            chan->Envelope_Enabled = true;
	LD	(IX+20),1
; 230.	            chan->Loop_Ornament_Position = 0;
	LD	(IX+9),0
; 231.	            chan->Glissade = 0;
	LD	(IX+22),0
; 232.	            chan->Ornament_Length = 1;
	LD	(IX+10),1
	JR	?0085
?0065:
; 233.	        }
; 234.	        else if(val >= 0xd0 && val <= 0xdf)
	LD	A,(?0011+32)
	CP	208
	JR	C,?0072
	LD	B,A
	LD	A,223
	CP	B
	JR	C,?0072
?0074:
?0073:
?0071:
; 235.	        {
; 236.	            chan->Enabled = false;
	LD	(IX+21),0
; 237.	            quit = true;
	JR	?0856
?0072:
; 238.	        }
; 239.	        else if(val >= 0xe0 && val <= 0xef)
	LD	A,(?0011+32)
	CP	224
	JR	C,?0077
	LD	B,A
	LD	A,239
	CP	B
	JR	C,?0077
?0079:
?0078:
?0076:
; 240.	        {
; 241.	            quit = true;
?0856:
	LD	A,1
	LD	(?0011+31),A
	JR	?0085
?0077:
; 242.	        }
; 243.	        else if(val == 0xf0)
	LD	A,(?0011+32)
	CP	240
	JR	NZ,?0082
?0081:
; 244.	        {
; 245.	            chan->Address_In_Pattern++;
	INC	(IX+4)
	JR	NZ,?0853
	INC	(IX+5)
?0853:
; 246.	            chan->Glissade = module[chan->Address_In_Pattern];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,(?0011+27)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+22),B
	JR	?0085
?0082:
; 247.	        }
; 248.	        else if((unsigned char)val >= 0xf1)
	CP	241
	JR	C,?0085
?0084:
; 249.	        {
; 250.	            chan->Volume = val - 0xf1;
	ADD	A,15
	LD	(IX+14),A
?0085:
?0083:
?0080:
?0075:
?0070:
?0063:
?0058:
?0053:
?0048:
; 251.	        }
; 252.	        chan->Address_In_Pattern++;
	INC	(IX+4)
	JR	NZ,?0854
	INC	(IX+5)
?0854:
; 253.	    }
; 254.	    while(!quit);
	LD	A,(?0011+31)
	OR	A
	JP	Z,?0043
?0041:
; 255.	    chan->Note_Skip_Counter = chan->Number_Of_Notes_To_Skip;
	LD	B,(IX+15)
	LD	(IX+23),B
; 256.	
; 257.	//*/
; 258.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1201:
	ADD	HL,BC
	LD	C,(HL)
	LD	E,11
?1200:
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 259.	
; 260.	
; 261.	void STP_GetRegisters(AYSongInfo * info, STP_Channel_Parameters * chan, unsigned char * TempMixer)
; 262.	{
STP_GetRegisters:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
	PUSH	DE
	POP	IY
; 263.	///*
; 264.	
; 265.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+33),HL
; 266.	    STP_File *header = (STP_File *)module;
	LD	(?0011+35),HL
; 267.	    unsigned char j, b0, b1;
; 268.	    if(chan->Enabled)
	LD	HL,21
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	Z,?0087
?0086:
; 269.	    {
; 270.	        chan->Current_Ton_Sliding += chan->Glissade;
	LD	C,(IX+22)
	LD	A,C
	RLCA
	SBC	A,A
	LD	B,A
	LD	HL,18
	PUSH	IX
	POP	DE
	ADD	HL,DE
	LD	A,(HL)
	ADD	A,C
	LD	(HL),A
	INC	HL
	LD	A,(HL)
	ADC	A,B
	LD	(HL),A
; 271.	        if(chan->Envelope_Enabled)
	LD	HL,20
	ADD	HL,DE
	LD	A,(HL)
	OR	A
	JR	Z,?0089
?0088:
; 272.	            j = chan->Note + STP.Transposition;
	LD	L,(IY+4)
	LD	H,(IY+5)
	INC	HL
	INC	HL
	LD	A,(HL)
	JR	?0858
; 273.	        else
?0089:
; 274.	            j = chan->Note + STP.Transposition + module[chan->OrnamentPointer + chan->Position_In_Ornament];
	LD	C,(IX+8)
	LD	B,A
	LD	L,(IX+0)
	LD	H,(IX+1)
	ADD	HL,BC
	LD	BC,(?0011+33)
	ADD	HL,BC
	PUSH	HL
	LD	L,(IY+4)
	LD	H,(IY+5)
	INC	HL
	INC	HL
	POP	BC
	LD	A,(BC)
	ADD	A,(HL)
?0858:
	ADD	A,(IX+16)
	LD	(?0011+37),A
?0090:
; 275.	        if(j > 95)
	LD	B,A
	LD	A,95
	CP	B
	JR	NC,?0092
?0091:
; 276.	            j = 95;
	LD	(?0011+37),A
?0092:
; 277.	        b0 = module[chan->SamplePointer + chan->Position_In_Sample * 4];
	LD	L,(IX+11)
	LD	H,0
	ADD	HL,HL
	ADD	HL,HL
	LD	C,(IX+2)
	LD	B,(IX+3)
	ADD	HL,BC
	LD	BC,(?0011+33)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+38),A
; 278.	        b1 = module[chan->SamplePointer + chan->Position_In_Sample * 4 + 1];
	LD	L,(IX+11)
	LD	H,0
	ADD	HL,HL
	ADD	HL,HL
	LD	E,(IX+2)
	LD	D,(IX+3)
	ADD	HL,DE
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	LD	(?0011+39),A
; 279.	        chan->Ton = (ST_Table[j] + chan->Current_Ton_Sliding + ay_sys_getword(&module[chan->SamplePointer + chan->Position_In_Sample * 4 + 2])) & 0xfff;
	LD	L,(IX+11)
	LD	H,0
	ADD	HL,HL
	ADD	HL,HL
	LD	E,(IX+2)
	LD	D,(IX+3)
	ADD	HL,DE
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	CALL	LWRD ?1185
	LD	C,(IX+18)
	LD	B,(IX+19)
	ADD	HL,BC
	PUSH	HL
	LD	HL,(?0011+37)
	LD	H,0
	ADD	HL,HL
	LD	BC,ST_Table
	ADD	HL,BC
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	POP	HL
	ADD	HL,BC
	LD	A,H
	AND	15
	LD	H,A
	LD	(IX+6),L
	LD	(IX+7),H
; 280.	        chan->Amplitude = (b0 & 15) - chan->Volume;
	LD	A,(?0011+38)
	AND	15
	SUB	(IX+14)
	LD	(IX+17),A
; 281.	        if((signed char)(chan->Amplitude) < 0)
	LD	A,(IX+17)
	OR	A
	JP	P,?0094
?0093:
; 282.	            chan->Amplitude = 0;
	LD	(IX+17),0
?0094:
; 283.	        if(((b1 & 1) != 0) && chan->Envelope_Enabled)
	LD	A,(?0011+39)
	BIT	0,A
	JR	Z,?0096
	LD	A,(IX+20)
	OR	A
	JR	Z,?0096
?0098:
?0097:
?0095:
; 284.	            chan->Amplitude = chan->Amplitude | 16;
	SET	4,(IX+17)
?0096:
; 285.	        *TempMixer = ((b0 >> 1) & 0x48) | *TempMixer;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	LD	A,(?0011+38)
	SRL	A
	AND	200
	OR	(HL)
	LD	(HL),A
; 286.	        if((signed char)(b0) >= 0)
	LD	A,(?0011+38)
	OR	A
	JP	M,?0100
?0099:
; 287.	            ay_writeay(AY_NOISE_PERIOD, (b1 >> 1) & 31);
	LD	A,(?0011+39)
	SRL	A
	AND	159
	LD	C,A
	LD	E,6
	CALL	LWRD ?1200
?0100:
; 288.	        chan->Position_In_Ornament++;
	INC	(IX+8)
; 289.	        if(chan->Position_In_Ornament >= chan->Ornament_Length)
	LD	A,(IX+8)
	CP	(IX+10)
	JR	C,?0102
?0101:
; 290.	            chan->Position_In_Ornament = chan->Loop_Ornament_Position;
	LD	B,(IX+9)
	LD	(IX+8),B
?0102:
; 291.	        chan->Position_In_Sample++;
	INC	(IX+11)
; 292.	        if(chan->Position_In_Sample >= chan->Sample_Length)
	LD	A,(IX+11)
	CP	(IX+13)
	JR	C,?0107
?0103:
; 293.	        {
; 294.	            chan->Position_In_Sample = chan->Loop_Sample_Position;
	LD	B,(IX+12)
	LD	(IX+11),B
; 295.	            if((signed char)(chan->Loop_Sample_Position) < 0)
	LD	A,(IX+12)
	OR	A
	JP	P,?0107
?0105:
; 296.	                chan->Enabled = false;
	LD	(IX+21),0
?0106:
?0104:
; 297.	        }
; 298.	    }
; 299.	    else
	JR	?0107
?0087:
; 300.	    {
; 301.	        *TempMixer = *TempMixer | 0x48;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	LD	A,(HL)
	OR	72
	LD	(HL),A
; 302.	        chan->Amplitude = 0;
	LD	(IX+17),0
?0107:
; 303.	    }
; 304.	    *TempMixer = *TempMixer >> 1;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	SRL	(HL)
; 305.	
; 306.	//*/
; 307.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 308.	
; 309.	void STP_Play(AYSongInfo * info)
; 310.	{
STP_Play:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 311.	
; 312.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+40),HL
; 313.	    STP_File *header = (STP_File *)module;
	LD	(?0011+42),HL
; 314.	    unsigned char TempMixer;
; 315.	    STP.DelayCounter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	DEC	(HL)
; 316.	    if(STP.DelayCounter == 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	XOR	A
	OR	(HL)
	JP	NZ,?0119
?0108:
; 317.	    {
; 318.	        STP.DelayCounter = STP_Delay;
	LD	L,(IX+4)
	LD	H,(IX+5)
	PUSH	HL
	LD	HL,(?0011+42)
	LD	B,(HL)
	POP	HL
	LD	(HL),B
; 319.	        STP_A.Note_Skip_Counter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,26
	ADD	HL,BC
	DEC	(HL)
; 320.	        if(STP_A.Note_Skip_Counter < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0111
?0110:
; 321.	        {
; 322.	            if(module[STP_A.Address_In_Pattern] == 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,7
	ADD	HL,BC
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+40)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	NZ,?0113
?0112:
; 323.	            {
; 324.	                STP.CurrentPosition++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	(HL)
; 325.	                if(STP.CurrentPosition == module[STP_PositionsPointer])
	LD	HL,(?0011+42)
	INC	HL
	LD	C,(HL)
	LD	B,A
	INC	HL
	LD	D,(HL)
	LD	E,B
	LD	L,C
	LD	A,B
	OR	D
	LD	H,A
	LD	BC,(?0011+40)
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	A,(HL)
	POP	HL
	CP	(HL)
	JR	NZ,?0115
?0114:
; 326.	                    STP.CurrentPosition = module[STP_PositionsPointer + 1];
	LD	HL,(?0011+42)
	INC	HL
	LD	A,(HL)
	LD	B,E
	INC	HL
	LD	D,(HL)
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	LD	BC,(?0011+40)
	ADD	HL,BC
	INC	HL
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	(HL),B
?0115:
; 327.	                STP_A.Address_In_Pattern = ay_sys_getword(&module[STP_PatternsPointer + module[STP_PositionsPointer + 2 + STP.CurrentPosition * 2]]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,7
	ADD	HL,BC
	PUSH	HL
	LD	HL,(?0011+42)
	INC	HL
	LD	A,(HL)
	INC	HL
	LD	D,(HL)
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	POP	HL
	ADD	HL,BC
	LD	BC,(?0011+40)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	E,(HL)
	LD	D,0
	PUSH	DE
	LD	HL,(?0011+42)
	INC	HL
	INC	HL
	INC	HL
	LD	L,(HL)
	LD	H,D
	PUSH	HL
	LD	L,4
	LD	BC,(?0011+42)
	ADD	HL,BC
	LD	B,(HL)
	POP	HL
	LD	E,L
	LD	A,H
	OR	B
	LD	D,A
	EX	DE,HL
	POP	DE
	ADD	HL,DE
	LD	BC,(?0011+40)
	ADD	HL,BC
	CALL	LWRD ?1184
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 328.	                STP_B.Address_In_Pattern = ay_sys_getword(&module[STP_PatternsPointer + module[STP_PositionsPointer + 2 + STP.CurrentPosition * 2] + 2]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,31
	ADD	HL,BC
	PUSH	HL
	LD	HL,(?0011+42)
	INC	HL
	LD	A,(HL)
	INC	HL
	LD	D,(HL)
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	POP	HL
	ADD	HL,BC
	LD	BC,(?0011+40)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	E,(HL)
	LD	D,0
	PUSH	DE
	LD	HL,(?0011+42)
	INC	HL
	INC	HL
	INC	HL
	LD	L,(HL)
	LD	H,D
	PUSH	HL
	LD	L,4
	LD	BC,(?0011+42)
	ADD	HL,BC
	LD	B,(HL)
	POP	HL
	LD	E,L
	LD	A,H
	OR	B
	LD	D,A
	EX	DE,HL
	POP	DE
	ADD	HL,DE
	LD	BC,(?0011+40)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	CALL	LWRD ?1185
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 329.	                STP_C.Address_In_Pattern = ay_sys_getword(&module[STP_PatternsPointer + module[STP_PositionsPointer + 2 + STP.CurrentPosition * 2] + 4]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,55
	ADD	HL,BC
	PUSH	HL
	LD	HL,(?0011+42)
	INC	HL
	LD	A,(HL)
	INC	HL
	LD	D,(HL)
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	POP	HL
	ADD	HL,BC
	LD	BC,(?0011+40)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	E,(HL)
	LD	D,0
	PUSH	DE
	LD	HL,(?0011+42)
	INC	HL
	INC	HL
	INC	HL
	LD	L,(HL)
	LD	H,D
	PUSH	HL
	LD	L,4
	LD	BC,(?0011+42)
	ADD	HL,BC
	LD	B,(HL)
	POP	HL
	LD	E,L
	LD	A,H
	OR	B
	LD	D,A
	EX	DE,HL
	POP	DE
	ADD	HL,DE
	LD	BC,(?0011+40)
	ADD	HL,BC
	LD	DE,4
	CALL	LWRD ?1186
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 330.	                STP.Transposition = module[STP_PositionsPointer + 3 + STP.CurrentPosition * 2];
	LD	HL,(?0011+42)
	INC	HL
	LD	A,(HL)
	LD	B,0
	INC	HL
	LD	D,(HL)
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	POP	HL
	ADD	HL,BC
	LD	BC,(?0011+40)
	ADD	HL,BC
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	(HL),B
?0113:
; 331.	            }
; 332.	            STP_PatternInterpreter(info, &STP_A);
	LD	C,(IX+4)
	LD	B,(IX+5)
	INC	BC
	INC	BC
	INC	BC
	CALL	LWRD ?1203
?0111:
; 333.	        }
; 334.	        STP_B.Note_Skip_Counter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,50
	ADD	HL,BC
	DEC	(HL)
; 335.	        if(STP_B.Note_Skip_Counter < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0117
?0116:
; 336.	            STP_PatternInterpreter(info, &STP_B);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,27
	CALL	LWRD ?1204
?0117:
; 337.	        STP_C.Note_Skip_Counter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,74
	ADD	HL,BC
	DEC	(HL)
; 338.	        if(STP_C.Note_Skip_Counter < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0119
?0118:
; 339.	            STP_PatternInterpreter(info, &STP_C);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,51
	CALL	LWRD ?1204
?0119:
?0109:
; 340.	    }
; 341.	
; 342.	    TempMixer = 0;
	XOR	A
	LD	(?0011+44),A
; 343.	    STP_GetRegisters(info, &STP_A, &TempMixer);
	LD	HL,?0011+44
	PUSH	HL
	LD	C,(IX+4)
	LD	B,(IX+5)
	INC	BC
	INC	BC
	INC	BC
	CALL	LWRD ?1207
	POP	HL
; 344.	    STP_GetRegisters(info, &STP_B, &TempMixer);
	LD	HL,?0011+44
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,27
	CALL	LWRD ?1208
	POP	HL
; 345.	    STP_GetRegisters(info, &STP_C, &TempMixer);
	LD	HL,?0011+44
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,51
	CALL	LWRD ?1208
	POP	HL
; 346.	
; 347.	    ay_writeay(AY_MIXER, TempMixer);
	LD	BC,(?0011+44)
	LD	E,7
	CALL	LWRD ?1200
; 348.	
; 349.	    ay_writeay(AY_CHNL_A_FINE, STP_A.Ton & 0xff);
	CALL	LWRD ?1188
; 350.	    ay_writeay(AY_CHNL_A_COARSE, (STP_A.Ton >> 8) & 0xf);
	CALL	LWRD ?1190
; 351.	    ay_writeay(AY_CHNL_B_FINE, STP_B.Ton & 0xff);
	LD	C,(HL)
	LD	E,2
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	CALL	LWRD ?1190
; 352.	    ay_writeay(AY_CHNL_B_COARSE, (STP_B.Ton >> 8) & 0xf);
	INC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	E,3
	CALL	LWRD ?1195
; 353.	    ay_writeay(AY_CHNL_C_FINE, STP_C.Ton & 0xff);
	ADD	HL,BC
	LD	C,(HL)
	LD	E,4
	CALL	LWRD ?1195
; 354.	    ay_writeay(AY_CHNL_C_COARSE, (STP_C.Ton >> 8) & 0xf);
	CALL	LWRD ?1189
; 355.	    ay_writeay(AY_CHNL_A_VOL, STP_A.Amplitude);
	CALL	LWRD ?1197
; 356.	    ay_writeay(AY_CHNL_B_VOL, STP_B.Amplitude);
	LD	BC,44
	CALL	LWRD ?1198
; 357.	    ay_writeay(AY_CHNL_C_VOL, STP_C.Amplitude);
	LD	BC,68
?1175:
	ADD	HL,BC
	LD	C,(HL)
	LD	E,10
	CALL	LWRD ?1200
; 358.	
; 359.	}
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1188:
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,9
	ADD	HL,BC
	LD	C,(HL)
	LD	E,B
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,9
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	E,1
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	RET
?1189:
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	E,5
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,20
	ADD	HL,BC
	LD	C,(HL)
	LD	E,8
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	RET
?1190:
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,33
	ADD	HL,BC
	RET
?1191:
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,24
	ADD	HL,BC
	RET
?1192:
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,39
	ADD	HL,BC
	RET
?1193:
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,15
	ADD	HL,BC
	RET
?1194:
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,49
	ADD	HL,BC
	RET
?1195:
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,57
	RET
?1196:
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,83
	RET
?1198:
	ADD	HL,BC
	LD	C,(HL)
	LD	E,9
?1199:
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
?1197:
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	L,(IX+4)
	LD	H,(IX+5)
	RET
?1204:
	ADD	HL,BC
	LD	C,L
	LD	B,H
?1203:
	PUSH	IX
	POP	DE
	LD	A,BYTE3 STP_PatternInterpreter
	LD	HL,LWRD STP_PatternInterpreter
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
?1208:
	ADD	HL,BC
	LD	C,L
	LD	B,H
?1207:
	PUSH	IX
	POP	DE
	LD	A,BYTE3 STP_GetRegisters
	LD	HL,LWRD STP_GetRegisters
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 360.	
; 361.	
; 362.	bool STP_Detect(unsigned char *module, unsigned int length, AYSongInfo * s)
; 363.	{
STP_Detect:
	PUSH	IY
	PUSH	IX
	PUSH	DE
	POP	IX
	PUSH	BC
	POP	IY
; 364.	    STP_File *header = (STP_File *)module;
	LD	(?0011+45),DE
; 365.	    int j, j1, j2, j3;
; 366.	    long F_Length; long F_Address;
; 367.	    
; 368.	   
; 369.	    if(length < 10)
	LD	DE,10
	LD	L,C
	LD	H,B
	AND	A
	SBC	HL,DE
	JP	C,?0156
?0120:
; 370.	        return false;
?0121:
; 371.	    if(STP_PositionsPointer> length)
	LD	HL,(?0011+45)
	INC	HL
	LD	C,(HL)
	LD	B,D
	LD	E,B
	INC	HL
	LD	D,(HL)
	LD	A,B
	OR	D
	LD	B,A
	PUSH	IY
	POP	HL
	SBC	HL,BC
	JP	C,?0156
?0122:
; 372.	        return false;
?0123:
; 373.	    if(STP_PatternsPointer> length)
	LD	HL,(?0011+45)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	A,E
	LD	HL,4
	LD	DE,(?0011+45)
	ADD	HL,DE
	LD	D,(HL)
	OR	D
	LD	B,A
	PUSH	IY
	POP	HL
	SBC	HL,BC
	JP	C,?0156
?0124:
; 374.	        return false;
?0125:
; 375.	    if(STP_OrnamentsPointer> length)
	LD	HL,5
	LD	BC,(?0011+45)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	A,D
	LD	HL,6
	ADD	HL,BC
	LD	B,(HL)
	LD	C,E
	OR	B
	LD	B,A
	PUSH	IY
	POP	HL
	SBC	HL,BC
	JP	C,?0156
?0126:
; 376.	        return false;
?0127:
; 377.	    if(STP_SamplesPointer> length)
	LD	HL,7
	LD	BC,(?0011+45)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,8
	ADD	HL,BC
	LD	B,(HL)
	LD	C,E
	LD	A,D
	OR	B
	LD	B,A
	PUSH	IY
	POP	HL
	SBC	HL,BC
	JP	C,?0156
?0128:
; 378.	        return false;
?0129:
; 379.	    if((STP_SamplesPointer- STP_OrnamentsPointer) != 0x20)
	LD	HL,5
	LD	BC,(?0011+45)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,6
	ADD	HL,BC
	LD	H,(HL)
	LD	C,E
	LD	A,D
	OR	H
	LD	B,A
	PUSH	BC
	LD	HL,7
	LD	DE,(?0011+45)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,8
	ADD	HL,DE
	LD	D,(HL)
	LD	E,0
	POP	HL
	LD	A,H
	OR	D
	LD	H,A
	POP	BC
	SBC	HL,BC
	LD	A,32
	XOR	L
	OR	H
	JP	NZ,?0156
?0130:
; 380.	    return false;
?0131:
; 381.	    if((int)(STP_OrnamentsPointer - STP_PatternsPointer) <= 0)
	LD	HL,(?0011+45)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	A,E
	LD	HL,4
	LD	DE,(?0011+45)
	ADD	HL,DE
	LD	H,(HL)
	LD	E,C
	OR	H
	LD	D,A
	PUSH	DE
	LD	HL,5
	LD	BC,(?0011+45)
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,6
	ADD	HL,BC
	LD	B,(HL)
	POP	HL
	LD	E,L
	LD	A,H
	OR	B
	LD	D,A
	EX	DE,HL
	POP	DE
	SBC	HL,DE
	LD	C,L
	LD	B,H
	LD	HL,0
	OR	128
	SBC	HL,BC
	JP	PO,?0875
	XOR	H
?0875:
	JP	P,?0156
?0132:
; 382.	    return false;
?0133:
; 383.	    if(((STP_OrnamentsPointer - STP_PatternsPointer) % 6) != 0)
	LD	HL,(?0011+45)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	XOR	A
	LD	HL,4
	LD	DE,(?0011+45)
	ADD	HL,DE
	LD	H,(HL)
	LD	E,C
	OR	H
	LD	D,A
	PUSH	DE
	LD	HL,5
	LD	BC,(?0011+45)
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,6
	ADD	HL,BC
	LD	B,(HL)
	POP	HL
	LD	E,L
	LD	A,H
	OR	B
	LD	D,A
	EX	DE,HL
	POP	DE
	SBC	HL,DE
	EX	DE,HL
	LD	BC,6
	CALL	LWRD ?SS_MOD_L02
	LD	A,E
	OR	D
	JP	NZ,?0156
?0134:
; 384.	    return false;
?0135:
; 385.	    if((module[STP_PositionsPointer] * 2 + 2 + STP_PositionsPointer - STP_PatternsPointer) != 0)
	LD	HL,(?0011+45)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	HL,4
	LD	DE,(?0011+45)
	ADD	HL,DE
	LD	H,(HL)
	LD	E,C
	LD	A,B
	OR	H
	LD	D,A
	PUSH	DE
	LD	HL,(?0011+45)
	INC	HL
	LD	E,(HL)
	INC	HL
	LD	H,(HL)
	LD	A,B
	OR	H
	LD	D,A
	PUSH	IX
	POP	HL
	ADD	HL,DE
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	PUSH	HL
	LD	HL,(?0011+45)
	INC	HL
	LD	C,(HL)
	INC	HL
	LD	D,(HL)
	LD	A,B
	OR	D
	LD	B,A
	POP	HL
	ADD	HL,BC
	POP	DE
	AND	A
	SBC	HL,DE
	INC	HL
	INC	HL
	LD	A,L
	OR	H
	JP	NZ,?0156
?0136:
; 386.	    return false;
?0137:
; 387.	    F_Length = STP_SamplesPointer + 30;
	LD	HL,7
	LD	BC,(?0011+45)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,A
	LD	HL,8
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	LD	BC,30
	ADD	HL,BC
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	LD	(?0011+55),HL
	LD	(?0011+57),BC
; 388.	    if(F_Length> 65535)
	PUSH	BC
	PUSH	HL
	LD	C,D
	LD	B,D
	LD	HL,65535
	CALL	LWRD ?SL_CMP_L03
	JP	C,?0156
?0138:
; 389.	    return false;
?0139:
; 390.	    if(F_Length> length + 1)
	LD	HL,(?0011+57)
	PUSH	HL
	LD	HL,(?0011+55)
	PUSH	HL
	PUSH	IY
	POP	HL
	INC	HL
	CALL	LWRD ?SL_CMP_L03
	JP	C,?0156
?0140:
; 391.	    return false;
?0141:
; 392.	
; 393.	    j2 = 0;
	LD	L,C
	LD	H,B
	LD	(?0011+51),HL
; 394.	    j3 = header->STP_Init_Id;
	LD	L,9
	LD	BC,(?0011+45)
	ADD	HL,BC
	LD	C,(HL)
	LD	B,D
	LD	(?0011+53),BC
; 395.	    if(j3 == 0)
	LD	A,C
	OR	A
	JP	NZ,?0149
?0142:
; 396.	    {
; 397.	        j2 = ay_sys_getword(&module[STP_PatternsPointer]);
	LD	HL,(?0011+45)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	HL,4
	LD	DE,(?0011+45)
	ADD	HL,DE
	LD	D,(HL)
	LD	L,C
	LD	A,B
	OR	D
	LD	H,A
	PUSH	IX
	POP	BC
	ADD	HL,BC
	CALL	LWRD ?1184
	LD	(?0011+51),HL
; 398.	        
; 399.	        
; 400.	        if(!strncmp((char *)(&module [10]), (char *)(KsaId), (size_t)(strlen(KsaId))))
	LD	DE,(KsaId)
	LD	A,BYTE3 strlen
	LD	HL,LWRD strlen
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	PUSH	HL
	LD	BC,(KsaId)
	LD	HL,10
	PUSH	IX
	POP	DE
	ADD	HL,DE
	EX	DE,HL
	LD	A,BYTE3 strncmp
	LD	HL,LWRD strncmp
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	AF
	LD	A,L
	OR	H
	LD	HL,?0011+51
	LD	A,(HL)
	JR	NZ,?0145
?0144:
; 401.	        j2 -= 0xa + 53;
	SUB	63
	JR	?0877
; 402.	        else
?0145:
; 403.	        j2 -= 0xa;
	SUB	10
?0877:
	LD	(HL),A
	INC	HL
	LD	A,(HL)
	SBC	A,0
	LD	(HL),A
?0146:
; 404.	      
; 405.	        
; 406.	        if(j2 < 0)
	LD	HL,(?0011+51)
	BIT	7,H
	JP	NZ,?0156
?0147:
; 407.	        return false;
?0148:
; 408.	         F_Address = j2;
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	LD	(?0011+59),HL
	LD	(?0011+61),BC
; 409.	        j3 = (F_Length - STP_PatternsPointer) / 2;
	LD	HL,0
	PUSH	HL
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,(?0011+45)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	XOR	A
	LD	HL,4
	LD	DE,(?0011+45)
	ADD	HL,DE
	LD	D,(HL)
	OR	D
	LD	B,A
	RLCA
	SBC	A,A
	LD	E,A
	LD	D,E
	LD	HL,(?0011+55)
	AND	A
	SBC	HL,BC
	LD	C,L
	LD	B,H
	LD	HL,(?0011+57)
	SBC	HL,DE
	PUSH	HL
	LD	L,C
	LD	H,B
	POP	BC
	CALL	LWRD ?SL_DIV_L03
	LD	(?0011+53),HL
; 410.	        for(j1 = 0; j1 < j3; j1++)
	LD	HL,0
?0878:
	LD	(?0011+49),HL
?0150:
	LD	BC,(?0011+53)
	OR	128
	SBC	HL,BC
	JP	PO,?0876
	XOR	H
?0876:
	JP	P,?0149
?0151:
; 411.	        {
; 412.	            j = ay_sys_getword(&module[STP_PatternsPointer + j1 * 2]);
	LD	HL,(?0011+45)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	XOR	A
	LD	HL,4
	LD	DE,(?0011+45)
	ADD	HL,DE
	LD	H,(HL)
	LD	E,C
	OR	H
	LD	D,A
	LD	HL,(?0011+49)
	ADD	HL,HL
	ADD	HL,DE
	PUSH	IX
	POP	BC
	ADD	HL,BC
	CALL	LWRD ?1184
	LD	(?0011+47),HL
; 413.	            j -= j2;
	LD	HL,?0011+47
	LD	BC,(?0011+51)
	LD	A,(HL)
	SUB	C
	LD	(HL),A
	INC	HL
	LD	A,(HL)
	SBC	A,B
	LD	(HL),A
; 414.	            ay_sys_writeword(&module[STP_PatternsPointer + j1 * 2], j);
	LD	BC,(?0011+47)
	PUSH	BC
	LD	HL,(?0011+45)
	INC	HL
	INC	HL
	INC	HL
	LD	E,(HL)
	XOR	A
	LD	HL,4
	LD	BC,(?0011+45)
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	PUSH	HL
	LD	HL,(?0011+49)
	ADD	HL,HL
	LD	C,L
	LD	B,H
	POP	HL
	ADD	HL,BC
	PUSH	IX
	POP	BC
	ADD	HL,BC
	EX	DE,HL
	LD	A,BYTE3 ay_sys_writeword
	LD	HL,LWRD ay_sys_writeword
	POP	BC
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	HL,(?0011+49)
	INC	HL
	JR	?0878
; 415.	        }
; 416.	    }
?0149:
?0143:
; 417.	
; 418.	    j = ay_sys_getword(&module[STP_OrnamentsPointer]);
	LD	HL,5
	LD	BC,(?0011+45)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,6
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	PUSH	IX
	POP	BC
	ADD	HL,BC
	CALL	LWRD ?1184
	LD	(?0011+47),HL
; 419.	    j--;
	DEC	HL
	LD	(?0011+47),HL
; 420.	    if((unsigned long)(j) <= (unsigned long)(length - 1))
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	PUSH	BC
	PUSH	HL
	LD	HL,65535
	PUSH	IY
	POP	BC
	ADD	HL,BC
	LD	DE,0
	AND	A
	POP	BC
	SBC	HL,BC
	EX	DE,HL
	POP	BC
	SBC	HL,BC
	JR	C,?0156
?0153:
; 421.	    {
; 422.	        j = ay_sys_getword(&module [j]);
	LD	HL,(?0011+47)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	CALL	LWRD ?1184
	LD	(?0011+47),HL
; 423.	        if(j == 0)
	LD	A,L
	OR	H
	JR	NZ,?0156
?0155:
; 424.	        {
; 425.	            header->STP_Init_Id = j3;
	LD	HL,9
	LD	BC,(?0011+45)
	ADD	HL,BC
	LD	A,(?0011+53)
	LD	(HL),A
; 426.	            strcpy(s->player, "Sound Tracker Pro");
	LD	BC,?0157
	LD	HL,8
	ADD	HL,SP
	CALL	LWRD ?1210
; 427.	            return true;
	LD	L,1
; 428.	        }
	JR	?0158
?0156:
?0154:
; 429.	    }
; 430.	
; 431.	    /*for(j1 = 0; j1 < j3; j1++)
; 432.	    {
; 433.	        j = ay_sys_getword(&module[STP_PatternsPointer + j1 * 2]);
; 434.	        j += j2;
; 435.	        ay_sys_writeword(&module[STP_PatternsPointer + j1 * 2], j);
; 436.	    }*/
; 437.	
; 438.	    return false;
	LD	L,0
; 439.	}
?0158:
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1210:
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	LD	HL,74
	ADD	HL,DE
	EX	DE,HL
	LD	A,BYTE3 strcpy
	LD	HL,LWRD strcpy
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 440.	
; 441.	
; 442.	
; 443.	
; 444.	
; 445.	
; 446.	typedef struct 
; 447.	{
; 448.	    unsigned char ST_Delay;
; 449.	    unsigned char ST_PositionsPointer0, ST_PositionsPointer1;
; 450.	    unsigned char ST_OrnamentsPointer0, ST_OrnamentsPointer1;
; 451.	    unsigned char ST_PatternsPointer0, ST_PatternsPointer1;
; 452.	    signed char ST_Name[18];
; 453.	    unsigned char ST_Size0, ST_Size1;
; 454.	} STC_File;
; 455.	
; 456.	typedef struct 
; 457.	{
; 458.	    unsigned short Address_In_Pattern, SamplePointer, OrnamentPointer, Ton;
; 459.	    unsigned char Amplitude, Note, Position_In_Sample, Number_Of_Notes_To_Skip;
; 460.	    signed char Sample_Tik_Counter, Note_Skip_Counter;
; 461.	    bool Envelope_Enabled;
; 462.	} STC_Channel_Parameters;
; 463.	
; 464.	typedef struct 
; 465.	{
; 466.	    unsigned char DelayCounter, Transposition, CurrentPosition;
; 467.	} STC_Parameters;
; 468.	
; 469.	typedef struct 
; 470.	{
; 471.	    STC_Parameters STC;
; 472.	    STC_Channel_Parameters STC_A, STC_B, STC_C;
; 473.	} STC_SongInfo;
; 474.	
; 475.	STC_SongInfo stc;
; 476.	
; 477.	#define STC_A ((STC_SongInfo *)info->data)->STC_A
; 478.	#define STC_B ((STC_SongInfo *)info->data)->STC_B
; 479.	#define STC_C ((STC_SongInfo *)info->data)->STC_C
; 480.	#define STC ((STC_SongInfo *)info->data)->STC
; 481.	
; 482.	#define ST_PositionsPointer (header->ST_PositionsPointer0 | (header->ST_PositionsPointer1 << 8))
; 483.	#define ST_OrnamentsPointer (header->ST_OrnamentsPointer0 | (header->ST_OrnamentsPointer1 << 8))
; 484.	#define ST_PatternsPointer (header->ST_PatternsPointer0 | (header->ST_PatternsPointer1 << 8))
; 485.	#define ST_Size (header->ST_Size0 | (header->ST_Size1 << 8))
; 486.	#define ST_Delay (header->ST_Delay)
; 487.	
; 488.	void STC_Init(AYSongInfo * info)
; 489.	{
STC_Init:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 490.	    unsigned long i;
; 491.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+67),HL
; 492.	    STC_File *header = (STC_File *)module;
	LD	(?0011+69),HL
; 493.	    
; 494.	    info->data = &stc;
	LD	(IX+4),LOW(stc)
	LD	(IX+5),HIGH(stc)
; 495.	    
; 496.	    
; 497.	    memset(&STC_A, 0, sizeof(STC_Channel_Parameters));
	LD	BC,15
	PUSH	BC
	CALL	LWRD ?1180
	POP	AF
; 498.	    memset(&STC_B, 0, sizeof(STC_Channel_Parameters));
	LD	HL,15
	PUSH	HL
	LD	C,H
	LD	B,H
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,18
	ADD	HL,DE
	EX	DE,HL
	CALL	LWRD ?1181
	POP	AF
; 499.	    memset(&STC_C, 0, sizeof(STC_Channel_Parameters));
	LD	HL,15
	PUSH	HL
	LD	C,H
	LD	B,H
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,33
	ADD	HL,DE
	EX	DE,HL
	CALL	LWRD ?1181
	POP	AF
; 500.	
; 501.	    STC.CurrentPosition = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	(HL),0
; 502.	    STC.Transposition = module[ST_PositionsPointer + 2];
	LD	HL,(?0011+69)
	INC	HL
	LD	A,(HL)
	LD	B,0
	INC	HL
	LD	D,(HL)
	LD	E,B
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	LD	BC,(?0011+67)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	(HL),B
; 503.	    STC.DelayCounter = 1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	(HL),1
; 504.	
; 505.	    i = 0;
	LD	C,E
	LD	L,C
	LD	B,E
	LD	H,B
?0892:
	LD	(?0011+63),HL
	LD	(?0011+65),BC
?0160:
; 506.	    while(module[ST_PatternsPointer + 7 * i] != module[ST_PositionsPointer + 1])
	LD	HL,(?0011+69)
	INC	HL
	LD	A,(HL)
	LD	B,0
	INC	HL
	LD	D,(HL)
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	LD	BC,(?0011+67)
	ADD	HL,BC
	INC	HL
	PUSH	HL
	PUSH	BC
	LD	HL,5
	LD	DE,(?0011+69)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,6
	ADD	HL,DE
	LD	D,(HL)
	POP	HL
	LD	C,L
	LD	A,H
	OR	D
	LD	B,A
	PUSH	BC
	CALL	LWRD ?1213
	POP	BC
	LD	L,C
	LD	H,B
	ADD	HL,DE
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	POP	HL
	CP	(HL)
	JR	Z,?0159
?0161:
; 507.	        i++;
	LD	HL,(?0011+63)
	LD	BC,(?0011+65)
	CALL	LWRD ?L_INC_L03
	JR	?0892
?0159:
; 508.	    STC_A.Address_In_Pattern = ay_sys_getword(&module[ST_PatternsPointer + 7 * i + 1]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,5
	LD	BC,(?0011+69)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,6
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	PUSH	BC
	CALL	LWRD ?1213
	POP	BC
	LD	L,C
	LD	H,B
	ADD	HL,DE
	LD	BC,(?0011+67)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	CALL	LWRD ?1185
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 509.	    STC_B.Address_In_Pattern = ay_sys_getword(&module[ST_PatternsPointer + 7 * i + 3]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,18
	ADD	HL,BC
	PUSH	HL
	LD	HL,5
	LD	BC,(?0011+69)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,6
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	PUSH	BC
	CALL	LWRD ?1213
	POP	BC
	LD	L,C
	LD	H,B
	ADD	HL,DE
	LD	BC,(?0011+67)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	INC	DE
	CALL	LWRD ?1185
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 510.	    STC_C.Address_In_Pattern = ay_sys_getword(&module[ST_PatternsPointer + 7 * i + 5]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,33
	ADD	HL,BC
	PUSH	HL
	LD	HL,5
	LD	BC,(?0011+69)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,6
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	PUSH	BC
	CALL	LWRD ?1213
	POP	BC
	LD	L,C
	LD	H,B
	ADD	HL,DE
	LD	BC,(?0011+67)
	ADD	HL,BC
	LD	BC,5
	ADD	HL,BC
	CALL	LWRD ?1184
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 511.	
; 512.	    STC_A.Note_Skip_Counter = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,16
	ADD	HL,BC
	LD	(HL),B
; 513.	    STC_A.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	(HL),B
; 514.	    STC_A.Number_Of_Notes_To_Skip = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,14
	ADD	HL,BC
	LD	(HL),B
; 515.	    STC_A.Sample_Tik_Counter = -1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	(HL),255
; 516.	    STC_A.Position_In_Sample = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	DEC	BC
	DEC	BC
	ADD	HL,BC
	LD	(HL),B
; 517.	    STC_A.OrnamentPointer = ST_OrnamentsPointer + 1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,7
	ADD	HL,BC
	PUSH	HL
	LD	HL,(?0011+69)
	INC	HL
	INC	HL
	INC	HL
	LD	A,(HL)
	LD	HL,4
	LD	DE,(?0011+69)
	ADD	HL,DE
	LD	H,(HL)
	LD	E,A
	LD	A,B
	OR	H
	LD	D,A
	INC	DE
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 518.	    STC_A.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,9
	ADD	HL,BC
	XOR	A
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 519.	
; 520.	    STC_B.Note_Skip_Counter = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,31
	ADD	HL,BC
	LD	(HL),B
; 521.	    STC_B.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	(HL),B
; 522.	    STC_B.Number_Of_Notes_To_Skip = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,29
	ADD	HL,BC
	LD	(HL),B
; 523.	    STC_B.Sample_Tik_Counter = -1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	(HL),255
; 524.	    STC_B.Position_In_Sample = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	DEC	BC
	DEC	BC
	ADD	HL,BC
	LD	(HL),B
; 525.	    STC_B.OrnamentPointer = ST_OrnamentsPointer + 1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,22
	ADD	HL,BC
	PUSH	HL
	LD	HL,(?0011+69)
	INC	HL
	INC	HL
	INC	HL
	LD	A,(HL)
	LD	HL,4
	LD	DE,(?0011+69)
	ADD	HL,DE
	LD	H,(HL)
	LD	E,A
	LD	A,B
	OR	H
	LD	D,A
	INC	DE
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 526.	    STC_B.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,24
	ADD	HL,BC
	XOR	A
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 527.	
; 528.	    STC_C.Note_Skip_Counter = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,46
	ADD	HL,BC
	LD	(HL),B
; 529.	    STC_C.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	(HL),B
; 530.	    STC_C.Number_Of_Notes_To_Skip = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,44
	ADD	HL,BC
	LD	(HL),B
; 531.	    STC_C.Sample_Tik_Counter = -1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	(HL),255
; 532.	    STC_C.Position_In_Sample = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	DEC	BC
	DEC	BC
	ADD	HL,BC
	LD	(HL),B
; 533.	    STC_C.OrnamentPointer = ST_OrnamentsPointer + 1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,37
	ADD	HL,BC
	PUSH	HL
	LD	HL,(?0011+69)
	INC	HL
	INC	HL
	INC	HL
	LD	A,(HL)
	LD	HL,4
	LD	DE,(?0011+69)
	ADD	HL,DE
	LD	D,(HL)
	LD	C,A
	LD	A,B
	OR	D
	LD	B,A
	INC	BC
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 534.	    STC_C.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,39
	ADD	HL,BC
	XOR	A
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 535.	}
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1213:
	LD	DE,(?0011+63)
	LD	BC,7
	JP	LWRD ?S_MUL_L02
; 536.	
; 537.	void STC_GetInfo(AYSongInfo *info)
; 538.	{
STC_GetInfo:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 539.	    unsigned long len;
; 540.	    unsigned long tm = 0;
	LD	BC,0
	LD	(?0011+75),BC
	LD	(?0011+77),BC
; 541.	    signed long j, j1, j2, i;
; 542.	    unsigned char *st_name;
; 543.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+97),HL
; 544.	    STC_File *header = (STC_File *)module;
	LD	(?0011+99),HL
; 545.	    unsigned char stDelay = module[0];
	LD	A,(HL)
	LD	(?0011+101),A
; 546.	    unsigned short stPosPt = ay_sys_getword(&module[1]);
	EX	DE,HL
	INC	DE
	CALL	LWRD ?1185
	LD	(?0011+102),HL
; 547.	    unsigned short stPatPt = ay_sys_getword(&module[5]);
	LD	HL,5
	LD	BC,(?0011+97)
	ADD	HL,BC
	CALL	LWRD ?1184
	LD	(?0011+104),HL
; 548.	    unsigned char a;
; 549.	
; 550.	    j = -1;
	LD	BC,65535
	LD	(?0011+79),BC
	LD	(?0011+81),BC
?0164:
; 551.	    do
; 552.	    {
; 553.	        j++;
	LD	HL,(?0011+79)
	LD	BC,(?0011+81)
	CALL	LWRD ?L_INC_L03
	LD	(?0011+79),HL
	LD	(?0011+81),BC
; 554.	        j2 = stPosPt + j * 2 + 1;
	ADD	HL,HL
	RL	C
	RL	B
	PUSH	BC
	PUSH	HL
	LD	HL,(?0011+102)
	LD	DE,0
	POP	BC
	ADD	HL,BC
	EX	DE,HL
	POP	BC
	ADC	HL,BC
	PUSH	HL
	PUSH	DE
	LD	HL,1
	POP	BC
	ADD	HL,BC
	EX	DE,HL
	LD	HL,0
	POP	BC
	ADC	HL,BC
	LD	C,L
	LD	B,H
	EX	DE,HL
	LD	(?0011+87),HL
	LD	(?0011+89),BC
; 555.	        j2 = module[j2];
	LD	BC,(?0011+97)
	ADD	HL,BC
	LD	L,(HL)
	LD	BC,0
	LD	H,C
	LD	(?0011+87),HL
	LD	(?0011+89),BC
; 556.	        i = -1;
	DEC	BC
	LD	(?0011+91),BC
	LD	(?0011+93),BC
?0167:
; 557.	        do
; 558.	        {
; 559.	            i++;
	LD	HL,(?0011+91)
	LD	BC,(?0011+93)
	CALL	LWRD ?L_INC_L03
	LD	(?0011+91),HL
	LD	(?0011+93),BC
; 560.	            j1 = stPatPt + 7 * i;
	LD	HL,0
	PUSH	HL
	LD	L,7
	PUSH	HL
	LD	HL,(?0011+91)
	CALL	LWRD ?L_MUL_L03
	PUSH	BC
	PUSH	HL
	LD	HL,(?0011+104)
	LD	DE,0
	POP	BC
	ADD	HL,BC
	EX	DE,HL
	POP	BC
	ADC	HL,BC
	LD	C,L
	LD	B,H
	EX	DE,HL
	LD	(?0011+83),HL
	LD	(?0011+85),BC
; 561.	        }
; 562.	        while(module[j1] != j2);
	LD	BC,(?0011+97)
	ADD	HL,BC
	LD	L,(HL)
	LD	DE,0
	LD	H,E
	LD	BC,(?0011+87)
	AND	A
	SBC	HL,BC
	JR	NZ,?0167
	EX	DE,HL
	LD	BC,(?0011+89)
	SBC	HL,BC
	JR	NZ,?0167
?0165:
; 563.	        j1 = ay_sys_getword(&module[j1 + 1]);
	LD	HL,(?0011+83)
	LD	BC,(?0011+97)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	CALL	LWRD ?1185
	LD	(?0011+83),HL
	LD	(?0011+85),BC
; 564.	        a = 1;
	LD	A,1
	LD	(?0011+106),A
?0169:
; 565.	        while(module[j1] != 255)
	LD	BC,(?0011+97)
	ADD	HL,BC
	LD	B,(HL)
	INC	B
	JR	Z,?0168
?0170:
; 566.	        {
; 567.	            unsigned char val = module[j1];
	LD	HL,(?0011+83)
	LD	BC,(?0011+97)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+107),A
; 568.	            if((val <= 0x5f) || (val == 0x80) || (val == 0x81))
	LD	B,A
	LD	A,95
	CP	B
	JR	NC,?0173
	LD	A,B
	DEC	A
	JP	PE,?0173
	LD	A,(?0011+107)
	CP	129
	JR	NZ,?0172
?0173:
?0174:
?0171:
; 569.	            {
; 570.	                tm += a;
	LD	HL,?0011+75
	LD	DE,(?0011+106)
	LD	BC,0
	LD	D,C
	CALL	LWRD ?L_ADDASG_L03
	JR	?0182
?0172:
; 571.	            }
; 572.	            else if(val >= 0xa1 && val <= 0xe0)
	CP	161
	JR	C,?0177
	LD	B,A
	LD	A,224
	CP	B
	JR	C,?0177
?0179:
?0178:
?0176:
; 573.	            {
; 574.	                a = val - 0xa0;
	LD	A,B
	ADD	A,96
	LD	(?0011+106),A
	JR	?0182
?0177:
; 575.	            }
; 576.	            else if(val >= 0x83 && val <= 0x8e)
	LD	A,(?0011+107)
	CP	131
	JR	C,?0182
	LD	B,A
	LD	A,142
	CP	B
	JR	C,?0182
?0184:
?0183:
?0181:
; 577.	            {
; 578.	                j1++;
	LD	HL,(?0011+83)
	LD	BC,(?0011+85)
	CALL	LWRD ?L_INC_L03
	LD	(?0011+83),HL
	LD	(?0011+85),BC
?0182:
?0180:
?0175:
; 579.	            }
; 580.	            j1++;
	LD	HL,(?0011+83)
	LD	BC,(?0011+85)
	CALL	LWRD ?L_INC_L03
	LD	(?0011+83),HL
	LD	(?0011+85),BC
; 581.	        }
; 582.	    }
	JR	?0169
?0168:
; 583.	    while(j != module[stPosPt]);
	LD	HL,(?0011+102)
	LD	BC,(?0011+97)
	ADD	HL,BC
	LD	L,(HL)
	LD	DE,0
	LD	H,E
	LD	BC,(?0011+79)
	AND	A
	SBC	HL,BC
	JP	NZ,?0164
	EX	DE,HL
	LD	BC,(?0011+81)
	SBC	HL,BC
	JP	NZ,?0164
?0162:
; 584.	    tm *= stDelay;
	LD	HL,?0011+75
	LD	DE,(?0011+101)
	LD	BC,0
	LD	D,C
	CALL	LWRD ?L_MULASG_L03
; 585.	    info->len = tm;
	LD	(IX+99),E
	LD	(IX+100),D
; 586.	
; 587.	    st_name = (unsigned char *)header->ST_Name;
	LD	HL,7
	LD	BC,(?0011+99)
	ADD	HL,BC
	LD	(?0011+95),HL
; 588.	
; 589.	    //if(!memcmp(st_name, "SONG BY ST COMPILE", 18) || !memcmp(st_name, "SONG BY MB COMPILE", 18) || !memcmp(st_name, "SONG BY ST-COMPILE", 18) || !memcmp(st_name, "SOUND TRACKER v1.1", 18) || !memcmp(st_name, "S.T.FULL EDITION ", 17) || !memcmp(st_name, "SOUND TRACKER v1.3", 18)*/)
; 590.	      //  return;
; 591.	                
; 592.	        for (len=0; len<=32; len++)
	LD	BC,0
	LD	L,C
	LD	H,B
?0894:
	LD	(?0011+71),HL
	LD	(?0011+73),BC
?0186:
	AND	A
	LD	HL,32
	LD	BC,(?0011+71)
	SBC	HL,BC
	LD	HL,0
	LD	BC,(?0011+73)
	SBC	HL,BC
	JR	C,?0185
?0187:
; 593.	                if((st_name[len] < 32) || (st_name[len] > 127))
	LD	HL,(?0011+71)
	LD	BC,(?0011+95)
	ADD	HL,BC
	LD	A,(HL)
	CP	32
	JR	C,?0185
	LD	HL,(?0011+71)
	ADD	HL,BC
	LD	A,127
	CP	(HL)
	JR	C,?0185
?0191:
?0192:
?0189:
; 594.	                         break;
?0190:
	LD	HL,(?0011+71)
	LD	BC,(?0011+73)
	CALL	LWRD ?L_INC_L03
	JR	?0894
?0185:
; 595.	        
; 596.	    strncpy(info->Name, st_name, len);
	LD	HL,(?0011+71)
	PUSH	HL
	LD	BC,(?0011+95)
	LD	HL,8
	PUSH	IX
	POP	DE
	ADD	HL,DE
	EX	DE,HL
	LD	A,BYTE3 strncpy
	LD	HL,LWRD strncpy
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	AF
; 597.	}
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 598.	
; 599.	void STC_PatternInterpreter(AYSongInfo * info, STC_Channel_Parameters * chan)
; 600.	{
STC_PatternInterpreter:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
; 601.	    unsigned short k;
; 602.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+110),HL
; 603.	    STC_File *header = (STC_File *)module;
	LD	(?0011+112),HL
?0194:
; 604.	    while(true)
?0195:
; 605.	    {
; 606.	        unsigned char val = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0011+110)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+114),A
; 607.	        if(val <= 0x5f)
	LD	B,A
	LD	A,95
	CP	B
	JR	C,?0197
?0196:
; 608.	        {
; 609.	            chan->Note = val;
	LD	(IX+9),B
; 610.	            chan->Sample_Tik_Counter = 32;
	LD	(IX+12),32
; 611.	            chan->Position_In_Sample = 0;
	LD	(IX+10),0
; 612.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JP	NZ,?0193
	JP	LWRD ?0921
; 613.	            break;
?0197:
; 614.	        }
; 615.	        else if(val >= 0x60 && val <= 0x6f)
	LD	A,B
	CP	96
	JR	C,?0199
	LD	B,A
	LD	A,111
	CP	B
	JR	C,?0199
?0201:
?0200:
?0198:
; 616.	        {
; 617.	            k = 0;
	LD	HL,0
?0914:
	LD	(?0011+108),HL
?0203:
; 618.	            while(module[0x1b + 0x63 * k] != (val - 0x60))
	LD	BC,99
	EX	DE,HL
	CALL	LWRD ?S_MUL_L02
	LD	HL,(?0011+110)
	ADD	HL,DE
	LD	C,27
	ADD	HL,BC
	LD	C,(HL)
	LD	DE,(?0011+114)
	LD	D,B
	LD	HL,65440
	ADD	HL,DE
	AND	A
	SBC	HL,BC
	JR	Z,?0202
?0204:
; 619.	                k++;
	LD	HL,(?0011+108)
	INC	HL
	JR	?0914
?0202:
; 620.	            chan->SamplePointer = 0x1c + 0x63 * k;
	LD	C,99
	LD	DE,(?0011+108)
	CALL	LWRD ?S_MUL_L02
	LD	HL,28
	ADD	HL,DE
	LD	(IX+2),L
	LD	(IX+3),H
	JP	LWRD ?0231
?0199:
; 621.	        }
; 622.	        else if(val >= 0x70 && val <= 0x7f)
	LD	A,B
	CP	112
	JR	C,?0207
	LD	B,A
	LD	A,127
	CP	B
	JR	C,?0207
?0209:
?0208:
?0206:
; 623.	        {
; 624.	            k = 0;
	LD	HL,0
?0915:
	LD	(?0011+108),HL
?0211:
; 625.	            while(module[ST_OrnamentsPointer + 0x21 * k] != (val - 0x70))
	LD	HL,(?0011+112)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,0
	LD	A,B
	LD	HL,4
	LD	DE,(?0011+112)
	ADD	HL,DE
	LD	D,(HL)
	LD	L,C
	OR	D
	LD	H,A
	LD	C,33
	LD	DE,(?0011+108)
	CALL	LWRD ?S_MUL_L02
	ADD	HL,DE
	LD	BC,(?0011+110)
	ADD	HL,BC
	LD	C,(HL)
	LD	B,0
	LD	DE,(?0011+114)
	LD	D,B
	LD	HL,65424
	ADD	HL,DE
	AND	A
	SBC	HL,BC
	JR	Z,?0220
?0212:
; 626.	                k++;
	LD	HL,(?0011+108)
	INC	HL
	JR	?0915
?0210:
; 627.	            chan->OrnamentPointer = ST_OrnamentsPointer + 0x21 * k + 1;
; 628.	            chan->Envelope_Enabled = false;
?0207:
; 629.	        }
; 630.	        else if(val == 0x80)
	LD	A,B
	DEC	A
	JP	PO,?0215
?0214:
; 631.	        {
; 632.	            chan->Sample_Tik_Counter = -1;
	LD	(IX+12),255
; 633.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JP	NZ,?0193
	JR	?0921
; 634.	            break;
?0215:
; 635.	        }
; 636.	        else if(val == 0x81)
	LD	A,(?0011+114)
	CP	129
	JR	NZ,?0217
?0216:
; 637.	        {
; 638.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JP	NZ,?0193
?0921:
	INC	(HL)
; 639.	            break;
	JR	?0193
?0217:
; 640.	        }
; 641.	        else if(val == 0x82)
	CP	130
	JR	NZ,?0219
?0218:
; 642.	        {
; 643.	            k = 0;
	LD	HL,0
?0916:
?0221:
; 644.	            while(module[ST_OrnamentsPointer + 0x21 * k] != 0)
	CALL	LWRD ?1211
	JR	Z,?0220
?0222:
; 645.	                k++;
	LD	HL,(?0011+108)
	INC	HL
	JR	?0916
?0220:
; 646.	            chan->OrnamentPointer = ST_OrnamentsPointer + 0x21 * k + 1;
	LD	HL,(?0011+112)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,0
	LD	A,B
	CALL	LWRD ?1212
; 647.	            chan->Envelope_Enabled = false;
	LD	(IX+14),B
	JR	?0231
?0219:
; 648.	        }
; 649.	        else if(val >= 0x83 && val <= 0x8e)
	CP	131
	JR	C,?0225
	LD	B,A
	LD	A,142
	CP	B
	JR	C,?0225
?0227:
?0226:
?0224:
; 650.	        {
; 651.	            ay_writeay(AY_ENV_SHAPE, val - 0x80);
	LD	A,B
	ADD	A,128
	LD	C,A
	LD	E,13
	CALL	LWRD ?1200
; 652.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0912
	INC	(HL)
?0912:
; 653.	            ay_writeay(AY_ENV_FINE, module[chan->Address_In_Pattern]);
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0011+110)
	CALL	LWRD ?1201
; 654.	            chan->Envelope_Enabled = true;
	LD	(IX+14),1
; 655.	            k = 0;
	LD	HL,0
?0917:
?0229:
; 656.	            while(module[ST_OrnamentsPointer + 0x21 * k] != 0)
	CALL	LWRD ?1211
	JR	Z,?0228
?0230:
; 657.	                k++;
	LD	HL,(?0011+108)
	INC	HL
	JR	?0917
?0228:
; 658.	            chan->OrnamentPointer = ST_OrnamentsPointer + 0x21 * k + 1;
	LD	HL,(?0011+112)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,A
	CALL	LWRD ?1212
; 659.	        }
; 660.	        else
	JR	?0231
?0225:
; 661.	            chan->Number_Of_Notes_To_Skip = val - 0xa1;
	LD	A,(?0011+114)
	ADD	A,95
	LD	(IX+11),A
?0231:
?0223:
?0213:
?0205:
; 662.	        chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JP	NZ,?0194
	INC	(HL)
	JP	LWRD ?0194
?0193:
; 663.	    }
; 664.	    chan->Note_Skip_Counter = chan->Number_Of_Notes_To_Skip;
	LD	B,(IX+11)
	LD	(IX+13),B
; 665.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1211:
	LD	(?0011+108),HL
	LD	HL,(?0011+112)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,0
	LD	A,B
	LD	HL,4
	LD	DE,(?0011+112)
	ADD	HL,DE
	LD	D,(HL)
	LD	L,C
	OR	D
	LD	H,A
	LD	C,33
	LD	DE,(?0011+108)
	CALL	LWRD ?S_MUL_L02
	ADD	HL,DE
	LD	BC,(?0011+110)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	RET
?1212:
	LD	HL,4
	LD	DE,(?0011+112)
	ADD	HL,DE
	LD	D,(HL)
	LD	L,C
	OR	D
	LD	H,A
	LD	C,33
	LD	DE,(?0011+108)
	CALL	LWRD ?S_MUL_L02
	ADD	HL,DE
	INC	HL
	LD	(IX+4),L
	LD	(IX+5),H
	RET
; 666.	
; 667.	void STC_GetRegisters(AYSongInfo * info, STC_Channel_Parameters * chan, unsigned char * TempMixer)
; 668.	{
STC_GetRegisters:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
	PUSH	DE
	POP	IY
; 669.	    unsigned short i;
; 670.	    unsigned char j;
; 671.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+118),HL
; 672.	    STC_File *header = (STC_File *)module;
	LD	(?0011+120),HL
; 673.	    if(chan->Sample_Tik_Counter >= 0)
	LD	HL,12
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	M,?0238
?0232:
; 674.	    {
; 675.	        chan->Sample_Tik_Counter--;
	DEC	(IX+12)
; 676.	        chan->Position_In_Sample = (chan->Position_In_Sample + 1) & 0x1f;
	LD	B,(IX+10)
	INC	B
	LD	A,B
	AND	31
	LD	(IX+10),A
; 677.	        if(chan->Sample_Tik_Counter == 0)
	LD	A,(IX+12)
	OR	A
	JR	NZ,?0238
?0234:
; 678.	        {
; 679.	            if(module[chan->SamplePointer + 0x60] != 0)
	LD	L,(IX+2)
	LD	H,(IX+3)
	LD	BC,(?0011+118)
	ADD	HL,BC
	LD	BC,96
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	Z,?0237
?0236:
; 680.	            {
; 681.	                chan->Position_In_Sample = module[chan->SamplePointer + 0x60] & 0x1f;
	LD	L,(IX+2)
	LD	H,(IX+3)
	LD	BC,(?0011+118)
	ADD	HL,BC
	LD	DE,96
	ADD	HL,DE
	LD	A,(HL)
	AND	31
	LD	(IX+10),A
; 682.	                chan->Sample_Tik_Counter = module[chan->SamplePointer + 0x61] + 1;
	LD	L,(IX+2)
	LD	H,(IX+3)
	ADD	HL,BC
	LD	BC,97
	ADD	HL,BC
	LD	B,(HL)
	INC	B
	LD	(IX+12),B
; 683.	            }
; 684.	            else
	JR	?0238
?0237:
; 685.	                chan->Sample_Tik_Counter = -1;
	LD	(IX+12),255
?0238:
?0235:
?0233:
; 686.	        }
; 687.	    }
; 688.	    if(chan->Sample_Tik_Counter >= 0)
	LD	A,(IX+12)
	OR	A
	JP	M,?0240
?0239:
; 689.	    {
; 690.	        i = ((chan->Position_In_Sample - 1) & 0x1f) * 3 + chan->SamplePointer;
	LD	C,(IX+10)
	DEC	C
	LD	A,C
	AND	31
	LD	C,A
	LD	L,C
	LD	B,0
	LD	H,B
	ADD	HL,HL
	ADD	HL,BC
	LD	C,(IX+2)
	LD	B,(IX+3)
	ADD	HL,BC
	LD	(?0011+115),HL
; 691.	        if((module[i + 1] & 0x80) != 0)
	LD	BC,(?0011+118)
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	OR	A
	JP	P,?0242
?0241:
; 692.	            *TempMixer = *TempMixer | 64;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	SET	6,(HL)
; 693.	        else
	JR	?0243
?0242:
; 694.	            ay_writeay(AY_NOISE_PERIOD, module[i + 1] & 0x1f);
	LD	HL,(?0011+115)
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	AND	31
	LD	C,A
	LD	E,6
	CALL	LWRD ?1200
?0243:
; 695.	        if((module[i + 1] & 0x40) != 0)
	LD	HL,(?0011+115)
	LD	BC,(?0011+118)
	ADD	HL,BC
	INC	HL
	BIT	6,(HL)
	JR	Z,?0245
?0244:
; 696.	            *TempMixer = *TempMixer | 8;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	SET	3,(HL)
?0245:
; 697.	        chan->Amplitude = module[i] & 15;
	LD	HL,(?0011+115)
	ADD	HL,BC
	LD	A,(HL)
	AND	15
	LD	(IX+8),A
; 698.	        j = chan->Note + module[chan->OrnamentPointer + ((chan->Position_In_Sample - 1) & 0x1f)] + STC.Transposition;
	LD	L,(IY+4)
	LD	H,(IY+5)
	INC	HL
	PUSH	HL
	LD	E,(IX+10)
	DEC	E
	LD	A,E
	AND	31
	LD	E,A
	LD	D,0
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,DE
	ADD	HL,BC
	POP	BC
	LD	A,(BC)
	ADD	A,(HL)
	ADD	A,(IX+9)
	LD	(?0011+117),A
; 699.	        if(j > 95)
	LD	B,A
	LD	A,95
	CP	B
	JR	NC,?0247
?0246:
; 700.	            j = 95;
	LD	(?0011+117),A
?0247:
; 701.	        if((module[i + 1] & 0x20) != 0)
	LD	HL,(?0011+115)
	LD	BC,(?0011+118)
	ADD	HL,BC
	INC	HL
	BIT	5,(HL)
	LD	HL,(?0011+115)
	ADD	HL,BC
	LD	A,(HL)
	JR	Z,?0249
?0248:
; 702.	            chan->Ton = (ST_Table[j] + module[i + 2] + (((unsigned short)(module[i] & 0xf0)) << 4)) & 0xFFF;
	AND	240
	LD	L,A
	LD	H,D
	ADD	HL,HL
	ADD	HL,HL
	ADD	HL,HL
	ADD	HL,HL
	PUSH	HL
	LD	HL,(?0011+115)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,D
	POP	HL
	ADD	HL,BC
	PUSH	HL
	LD	HL,(?0011+117)
	LD	H,B
	ADD	HL,HL
	LD	BC,ST_Table
	ADD	HL,BC
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	POP	HL
	ADD	HL,BC
	JR	?0923
; 703.	        else
?0249:
; 704.	            chan->Ton = (ST_Table[j] - module[i + 2] - (((unsigned short)(module[i] & 0xf0)) << 4)) & 0xFFF;
	AND	240
	LD	L,A
	LD	H,D
	ADD	HL,HL
	ADD	HL,HL
	ADD	HL,HL
	ADD	HL,HL
	EX	DE,HL
	PUSH	DE
	LD	HL,(?0011+115)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,0
	LD	HL,(?0011+117)
	LD	H,B
	ADD	HL,HL
	LD	DE,ST_Table
	ADD	HL,DE
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	AND	A
	SBC	HL,BC
	POP	DE
	AND	A
	SBC	HL,DE
?0923:
	LD	A,H
	AND	15
	LD	H,A
	LD	(IX+6),L
	LD	(IX+7),H
?0250:
; 705.	        if(chan->Envelope_Enabled)
	LD	A,(IX+14)
	OR	A
	JR	Z,?0253
?0251:
; 706.	            chan->Amplitude = chan->Amplitude | 16;
	SET	4,(IX+8)
?0252:
; 707.	    }
; 708.	    else
	JR	?0253
?0240:
; 709.	        chan->Amplitude = 0;
	LD	(IX+8),0
?0253:
; 710.	
; 711.	    *TempMixer = *TempMixer >> 1;
	JP	LWRD ?0107
; 712.	}
; 713.	
; 714.	void STC_Play(AYSongInfo * info)
; 715.	{
STC_Play:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 716.	    unsigned char TempMixer;
; 717.	    unsigned short i;
; 718.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+125),HL
; 719.	    STC_File *header = (STC_File *)module;
	LD	(?0011+127),HL
; 720.	
; 721.	    STC.DelayCounter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	DEC	(HL)
; 722.	    if(STC.DelayCounter == 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	XOR	A
	OR	(HL)
	JP	NZ,?0269
?0254:
; 723.	    {
; 724.	        STC.DelayCounter = ST_Delay;
	LD	L,(IX+4)
	LD	H,(IX+5)
	PUSH	HL
	LD	HL,(?0011+127)
	LD	B,(HL)
	POP	HL
	LD	(HL),B
; 725.	        STC_A.Note_Skip_Counter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,16
	ADD	HL,BC
	DEC	(HL)
; 726.	        if(STC_A.Note_Skip_Counter < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0257
?0256:
; 727.	        {
; 728.	            if(module[STC_A.Address_In_Pattern] == 255)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+125)
	ADD	HL,BC
	LD	B,(HL)
	INC	B
	JP	NZ,?0259
?0258:
; 729.	            {
; 730.	                if(STC.CurrentPosition == module[ST_PositionsPointer])
	LD	HL,(?0011+127)
	INC	HL
	LD	A,(HL)
	INC	HL
	LD	D,(HL)
	LD	E,B
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	LD	BC,(?0011+125)
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	A,(HL)
	POP	HL
	CP	(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	JR	NZ,?0261
?0260:
; 731.	                    STC.CurrentPosition = 0;
	LD	(HL),E
; 732.	                else
	JR	?0262
?0261:
; 733.	                    STC.CurrentPosition++;
	INC	(HL)
?0262:
; 734.	                STC.Transposition = module[ST_PositionsPointer + 2 + STC.CurrentPosition * 2];
	LD	HL,(?0011+127)
	INC	HL
	LD	A,(HL)
	LD	B,E
	INC	HL
	LD	D,(HL)
	LD	E,B
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	POP	HL
	ADD	HL,BC
	LD	BC,(?0011+125)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	(HL),B
; 735.	                i = 0;
	LD	L,E
	LD	H,E
?0925:
	LD	(?0011+123),HL
?0264:
; 736.	                while(module[ST_PatternsPointer + 7 * i] != module[ST_PositionsPointer + 1 + STC.CurrentPosition * 2])
	LD	HL,(?0011+127)
	INC	HL
	LD	A,(HL)
	LD	B,0
	INC	HL
	LD	D,(HL)
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	POP	HL
	ADD	HL,BC
	LD	BC,(?0011+125)
	ADD	HL,BC
	INC	HL
	PUSH	HL
	PUSH	BC
	LD	HL,5
	LD	DE,(?0011+127)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,6
	ADD	HL,DE
	LD	D,(HL)
	POP	HL
	LD	C,L
	LD	A,H
	OR	D
	LD	B,A
	PUSH	BC
	LD	DE,7
	LD	BC,(?0011+123)
	CALL	LWRD ?S_MUL_L02
	POP	BC
	LD	L,C
	LD	H,B
	ADD	HL,DE
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	POP	HL
	CP	(HL)
	JR	Z,?0263
?0265:
; 737.	                    i++;
	LD	HL,(?0011+123)
	INC	HL
	JR	?0925
?0263:
; 738.	                STC_A.Address_In_Pattern = ay_sys_getword(&module[ST_PatternsPointer + 7 * i + 1]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,5
	LD	BC,(?0011+127)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,6
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	PUSH	BC
	LD	E,7
	LD	BC,(?0011+123)
	CALL	LWRD ?S_MUL_L02
	POP	BC
	LD	L,C
	LD	H,B
	ADD	HL,DE
	LD	BC,(?0011+125)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	CALL	LWRD ?1185
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 739.	                STC_B.Address_In_Pattern = ay_sys_getword(&module[ST_PatternsPointer + 7 * i + 3]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,18
	ADD	HL,BC
	PUSH	HL
	LD	HL,5
	LD	BC,(?0011+127)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,6
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	PUSH	BC
	LD	E,7
	LD	BC,(?0011+123)
	CALL	LWRD ?S_MUL_L02
	POP	BC
	LD	L,C
	LD	H,B
	ADD	HL,DE
	LD	BC,(?0011+125)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	INC	DE
	CALL	LWRD ?1185
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 740.	                STC_C.Address_In_Pattern = ay_sys_getword(&module[ST_PatternsPointer + 7 * i + 5]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,33
	ADD	HL,BC
	PUSH	HL
	LD	HL,5
	LD	BC,(?0011+127)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,6
	ADD	HL,BC
	LD	B,(HL)
	LD	L,A
	LD	A,D
	OR	B
	LD	H,A
	LD	BC,7
	LD	DE,(?0011+123)
	CALL	LWRD ?S_MUL_L02
	ADD	HL,DE
	LD	BC,(?0011+125)
	ADD	HL,BC
	LD	BC,5
	ADD	HL,BC
	CALL	LWRD ?1184
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
?0259:
; 741.	            }
; 742.	            STC_PatternInterpreter(info, &STC_A);
	LD	C,(IX+4)
	LD	B,(IX+5)
	INC	BC
	INC	BC
	INC	BC
	PUSH	IX
	POP	DE
	LD	A,BYTE3 STC_PatternInterpreter
	LD	HL,LWRD STC_PatternInterpreter
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
?0257:
; 743.	        }
; 744.	
; 745.	        STC_B.Note_Skip_Counter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,31
	ADD	HL,BC
	DEC	(HL)
; 746.	        if(STC_B.Note_Skip_Counter < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0267
?0266:
; 747.	            STC_PatternInterpreter(info, &STC_B);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,18
	ADD	HL,BC
	LD	C,L
	LD	B,H
	PUSH	IX
	POP	DE
	LD	A,BYTE3 STC_PatternInterpreter
	LD	HL,LWRD STC_PatternInterpreter
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
?0267:
; 748.	        STC_C.Note_Skip_Counter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,46
	ADD	HL,BC
	DEC	(HL)
; 749.	        if(STC_C.Note_Skip_Counter < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0269
?0268:
; 750.	            STC_PatternInterpreter(info, &STC_C);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,33
	ADD	HL,BC
	LD	C,L
	LD	B,H
	PUSH	IX
	POP	DE
	LD	A,BYTE3 STC_PatternInterpreter
	LD	HL,LWRD STC_PatternInterpreter
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
?0269:
?0255:
; 751.	    }
; 752.	
; 753.	    TempMixer = 0;
	XOR	A
	LD	(?0011+122),A
; 754.	    STC_GetRegisters(info, &STC_A, &TempMixer);
	LD	HL,?0011+122
	PUSH	HL
	LD	C,(IX+4)
	LD	B,(IX+5)
	INC	BC
	INC	BC
	INC	BC
	PUSH	IX
	POP	DE
	LD	A,BYTE3 STC_GetRegisters
	LD	HL,LWRD STC_GetRegisters
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
; 755.	    STC_GetRegisters(info, &STC_B, &TempMixer);
	LD	HL,?0011+122
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,18
	ADD	HL,BC
	LD	C,L
	LD	B,H
	PUSH	IX
	POP	DE
	LD	A,BYTE3 STC_GetRegisters
	LD	HL,LWRD STC_GetRegisters
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
; 756.	    STC_GetRegisters(info, &STC_C, &TempMixer);
	LD	HL,?0011+122
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,33
	ADD	HL,BC
	LD	C,L
	LD	B,H
	PUSH	IX
	POP	DE
	LD	A,BYTE3 STC_GetRegisters
	LD	HL,LWRD STC_GetRegisters
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
; 757.	
; 758.	    ay_writeay(AY_MIXER, TempMixer);
	LD	BC,(?0011+122)
	LD	E,7
	CALL	LWRD ?1200
; 759.	
; 760.	    ay_writeay(AY_CHNL_A_FINE, STC_A.Ton & 0xff);
	CALL	LWRD ?1188
; 761.	    ay_writeay(AY_CHNL_A_COARSE, (STC_A.Ton >> 8) & 0xf);
	CALL	LWRD ?1191
; 762.	    ay_writeay(AY_CHNL_B_FINE, STC_B.Ton & 0xff);
	LD	C,(HL)
	LD	E,2
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	CALL	LWRD ?1191
; 763.	    ay_writeay(AY_CHNL_B_COARSE, (STC_B.Ton >> 8) & 0xf);
	INC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	E,3
	CALL	LWRD ?1192
; 764.	    ay_writeay(AY_CHNL_C_FINE, STC_C.Ton & 0xff);
	LD	C,(HL)
	LD	E,4
	CALL	LWRD ?1192
; 765.	    ay_writeay(AY_CHNL_C_COARSE, (STC_C.Ton >> 8) & 0xf);
	INC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	E,5
	CALL	LWRD ?1199
; 766.	    ay_writeay(AY_CHNL_A_VOL, STC_A.Amplitude);
	LD	BC,11
	ADD	HL,BC
	LD	C,(HL)
	LD	E,8
	CALL	LWRD ?1199
; 767.	    ay_writeay(AY_CHNL_B_VOL, STC_B.Amplitude);
	LD	BC,26
	CALL	LWRD ?1198
; 768.	    ay_writeay(AY_CHNL_C_VOL, STC_C.Amplitude);
	LD	BC,41
	JP	LWRD ?1175
; 769.	}
; 770.	
; 771.	
; 772.	bool STC_Detect(unsigned char *module, unsigned int length, AYSongInfo * s)
; 773.	{
STC_Detect:
	PUSH	IY
	PUSH	IX
	PUSH	DE
	POP	IX
	PUSH	BC
	POP	IY
; 774.	    STC_File *header = (STC_File *)module;
	LD	(?0011+129),DE
; 775.	    
; 776.	    //INT
; 777.	    int j, j1, j2;
; 778.	    
; 779.	    
; 780.	    if(length < 6)
	LD	DE,6
	LD	L,C
	LD	H,B
	AND	A
	SBC	HL,DE
	JP	C,?0961
?0270:
; 781.	        return false;
?0271:
; 782.	    if(ST_PositionsPointer> length)
	LD	HL,(?0011+129)
	INC	HL
	LD	C,(HL)
	LD	B,D
	LD	E,B
	INC	HL
	LD	D,(HL)
	LD	A,B
	OR	D
	LD	B,A
	PUSH	IY
	POP	HL
	SBC	HL,BC
	JP	C,?0961
?0272:
; 783.	        return false;
?0273:
; 784.	    if((int)(ST_PatternsPointer- ST_OrnamentsPointer) <= 0)
	LD	HL,(?0011+129)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	A,E
	LD	HL,4
	LD	DE,(?0011+129)
	ADD	HL,DE
	LD	H,(HL)
	LD	E,C
	OR	H
	LD	D,A
	PUSH	DE
	LD	HL,5
	LD	BC,(?0011+129)
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,6
	ADD	HL,BC
	LD	B,(HL)
	POP	HL
	LD	E,L
	LD	A,H
	OR	B
	LD	D,A
	EX	DE,HL
	POP	DE
	SBC	HL,DE
	LD	C,L
	LD	B,H
	LD	HL,0
	OR	128
	SBC	HL,BC
	JP	PO,?0944
	XOR	H
?0944:
	JP	P,?0961
?0274:
; 785.	    return false;
?0275:
; 786.	    if(((ST_PatternsPointer - ST_OrnamentsPointer) % 0x21) != 0)
	LD	HL,(?0011+129)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	XOR	A
	LD	HL,4
	LD	DE,(?0011+129)
	ADD	HL,DE
	LD	H,(HL)
	LD	E,C
	OR	H
	LD	D,A
	PUSH	DE
	LD	HL,5
	LD	BC,(?0011+129)
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,6
	ADD	HL,BC
	LD	B,(HL)
	POP	HL
	LD	E,L
	LD	A,H
	OR	B
	LD	D,A
	EX	DE,HL
	POP	DE
	SBC	HL,DE
	EX	DE,HL
	LD	BC,33
	CALL	LWRD ?SS_MOD_L02
	LD	A,E
	OR	D
	JP	NZ,?0961
?0276:
; 787.	    return false;
?0277:
; 788.	    if((int)(ST_PositionsPointer - ST_OrnamentsPointer) >= 0)
	LD	HL,(?0011+129)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	HL,4
	LD	DE,(?0011+129)
	ADD	HL,DE
	LD	H,(HL)
	LD	E,C
	LD	A,B
	OR	H
	LD	D,A
	PUSH	DE
	LD	HL,(?0011+129)
	INC	HL
	LD	E,(HL)
	INC	HL
	LD	H,(HL)
	LD	A,B
	OR	H
	LD	D,A
	EX	DE,HL
	POP	DE
	SBC	HL,DE
	BIT	7,H
	JP	Z,?0961
?0278:
; 789.	    return false;
?0279:
; 790.	    if((module[ST_PositionsPointer] * 2 + 3 + ST_PositionsPointer - ST_OrnamentsPointer) != 0)
	LD	HL,(?0011+129)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	HL,4
	LD	DE,(?0011+129)
	ADD	HL,DE
	LD	H,(HL)
	LD	E,C
	LD	A,B
	OR	H
	LD	D,A
	PUSH	DE
	LD	HL,(?0011+129)
	INC	HL
	LD	E,(HL)
	INC	HL
	LD	H,(HL)
	LD	A,B
	OR	H
	LD	D,A
	PUSH	IX
	POP	HL
	ADD	HL,DE
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	PUSH	HL
	LD	HL,(?0011+129)
	INC	HL
	LD	C,(HL)
	INC	HL
	LD	D,(HL)
	LD	A,B
	OR	D
	LD	B,A
	POP	HL
	ADD	HL,BC
	POP	DE
	AND	A
	SBC	HL,DE
	INC	HL
	INC	HL
	INC	HL
	LD	A,L
	OR	H
	JP	NZ,?0961
?0280:
; 791.	    return false;
?0281:
; 792.	
; 793.	    j = ST_OrnamentsPointer + 0x21;
	LD	HL,(?0011+129)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,A
	LD	HL,4
	LD	DE,(?0011+129)
	ADD	HL,DE
	LD	D,(HL)
	LD	E,B
	LD	L,C
	LD	A,B
	OR	D
	LD	H,A
	LD	C,33
	ADD	HL,BC
	LD	(?0011+131),HL
; 794.	    if(j> 65535)
	EX	DE,HL
	LD	A,D
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	PUSH	BC
	PUSH	DE
	LD	C,L
	LD	B,L
	LD	HL,65535
	CALL	LWRD ?SL_CMP_L03
	JP	C,?0961
?0282:
; 795.	    return false;
?0283:
; 796.	    if(j> length)
	LD	C,E
	LD	B,D
	PUSH	IY
	POP	HL
	SBC	HL,BC
	JP	C,?0961
?0284:
; 797.	    return false;
; 798.	    do
?0285:
?0288:
; 799.	    {
; 800.	        j--;
	LD	L,C
	LD	H,B
	DEC	HL
	LD	(?0011+131),HL
; 801.	        if(module[j] != 0)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	NZ,?0961
?0289:
; 802.	        return false;;
?0290:
; 803.	    }
; 804.	    while(j != ST_OrnamentsPointer);
	LD	HL,(?0011+129)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	HL,4
	LD	DE,(?0011+129)
	ADD	HL,DE
	LD	D,(HL)
	LD	L,C
	OR	D
	LD	H,A
	LD	BC,(?0011+131)
	SBC	HL,BC
	JR	NZ,?0285
?0286:
; 805.	
; 806.	    j = ST_PatternsPointer;
	LD	HL,5
	LD	BC,(?0011+129)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	A,D
	LD	HL,6
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	LD	(?0011+131),HL
; 807.	    if(j> length)
	LD	C,L
	LD	B,H
	PUSH	IY
	POP	HL
	SBC	HL,BC
	JP	C,?0961
?0291:
; 808.	    return false;
?0292:
; 809.	    j1 = 0;
	LD	L,D
	LD	H,D
	LD	(?0011+133),HL
; 810.	    j2 = 0;
	LD	(?0011+135),HL
?0294:
; 811.	    while((j + 6 <= length) && (j + 6 < 65536) && (module[j] != 255))
	LD	HL,6
	LD	BC,(?0011+131)
	ADD	HL,BC
	LD	C,L
	LD	B,H
	PUSH	IY
	POP	HL
	AND	A
	SBC	HL,BC
	JR	C,?0293
	LD	HL,1
	PUSH	HL
	DEC	HL
	PUSH	HL
	LD	L,6
	LD	BC,(?0011+131)
	ADD	HL,BC
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	CALL	LWRD ?SL_CMP_L03
	JR	NC,?0293
	LD	HL,(?0011+131)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	B,(HL)
	INC	B
	JR	Z,?0293
?0297:
?0296:
?0295:
; 812.	    {
; 813.	        j++;
	LD	HL,(?0011+131)
	INC	HL
; 814.	        j2 = ay_sys_getword(&module[j]);
	CALL	LWRD ?1182
; 815.	        if(j1 < j2)
	JP	PO,?0945
	XOR	H
?0945:
	JP	P,?0299
?0298:
; 816.	        j1 = j2;
	LD	(?0011+133),BC
?0299:
; 817.	        j += 2;
; 818.	        j2 = ay_sys_getword(&module[j]);
	CALL	LWRD ?1183
; 819.	        if(j1 < j2)
	JP	PO,?0946
	XOR	H
?0946:
	JP	P,?0301
?0300:
; 820.	        j1 = j2;
	LD	(?0011+133),BC
?0301:
; 821.	        j += 2;
; 822.	        j2 = ay_sys_getword(&module[j]);
	CALL	LWRD ?1183
; 823.	        if(j1 < j2)
	JP	PO,?0947
	XOR	H
?0947:
	JP	P,?0303
?0302:
; 824.	        j1 = j2;
	LD	(?0011+133),BC
?0303:
; 825.	        j += 2;
	LD	HL,2
	LD	BC,(?0011+131)
	ADD	HL,BC
	LD	(?0011+131),HL
	JR	?0294
?0293:
; 826.	    }
; 827.	    if(module[j] != 255)
	LD	HL,(?0011+131)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	B,(HL)
	INC	B
	JP	NZ,?0961
?0304:
; 828.	    return false;
?0305:
; 829.	    if(j1> length)
	LD	BC,(?0011+133)
	PUSH	IY
	POP	HL
	AND	A
	SBC	HL,BC
	JR	C,?0961
?0306:
; 830.	    return false;
?0307:
; 831.	    if(module[j1 - 1] != 255)
	LD	L,C
	LD	H,B
	PUSH	IX
	POP	BC
	ADD	HL,BC
	DEC	HL
	LD	B,(HL)
	INC	B
	JR	NZ,?0961
?0308:
; 832.	    return false;
; 833.	    do
?0309:
?0312:
; 834.	    {
; 835.	        if((module[j1] >= 0x83) && (module[j1] <= 0x8e))
	LD	HL,(?0011+133)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	CP	131
	JR	C,?0314
	LD	HL,(?0011+133)
	ADD	HL,BC
	LD	A,142
	CP	(HL)
	JR	C,?0314
?0316:
?0315:
?0313:
; 836.	        j1++;
	LD	HL,(?0011+133)
	INC	HL
	LD	(?0011+133),HL
?0314:
; 837.	        j1++;
	LD	HL,(?0011+133)
	INC	HL
	LD	(?0011+133),HL
; 838.	    }
; 839.	    while((j1 <= 65535) && (j1 < length) && (module[j1] != 255));
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	PUSH	BC
	PUSH	HL
	LD	BC,0
	LD	HL,65535
	CALL	LWRD ?SL_CMP_L03
	JR	C,?0310
	PUSH	IY
	POP	BC
	LD	HL,(?0011+133)
	SBC	HL,BC
	JR	NC,?0310
	LD	HL,(?0011+133)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	B,(HL)
	INC	B
	JR	NZ,?0309
?0310:
; 840.	    if(j1> 65535)
	LD	HL,(?0011+133)
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	PUSH	BC
	PUSH	HL
	LD	BC,0
	LD	HL,65535
	CALL	LWRD ?SL_CMP_L03
	JR	C,?0961
?0319:
; 841.	    return false;
?0320:
; 842.	    if(j1> length)
	LD	BC,(?0011+133)
	PUSH	IY
	POP	HL
	SBC	HL,BC
	JR	NC,?0322
?0321:
; 843.	    return false;
?0961:
	LD	L,0
	JR	?0324
?0322:
; 844.	
; 845.	    strcpy(s->player, "Sound Tracker");
	LD	BC,?0323
	LD	HL,8
	ADD	HL,SP
	CALL	LWRD ?1210
; 846.	
; 847.	    return true;
	LD	L,1
; 848.	}
?0324:
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1183:
	LD	HL,2
	LD	BC,(?0011+131)
	ADD	HL,BC
?1182:
	LD	(?0011+131),HL
	PUSH	IX
	POP	BC
	ADD	HL,BC
	EX	DE,HL
	LD	A,BYTE3 ay_sys_getword
	LD	HL,LWRD ay_sys_getword
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	(?0011+135),HL
	LD	C,L
	LD	B,H
	LD	HL,(?0011+133)
	OR	128
	SBC	HL,BC
	RET
; 849.	
; 850.	
; 851.	
; 852.	
; 853.	
; 854.	/////////////////////////////////////////////////////
; 855.	//////////////////////////////////////////////////////
; 856.	
; 857.	
; 858.	
; 859.	
; 860.	
; 861.	/* This player module was ported from:
; 862.	 AY-3-8910/12 Emulator
; 863.	 Version 3.0 for Windows 95
; 864.	 Author Sergey Vladimirovich Bulba
; 865.	 (c)1999-2004 S.V.Bulba
; 866.	 */
; 867.	
; 868.	const unsigned short SQT_Table[] =
; 869.	{ 0xd5d, 0xc9c, 0xbe7, 0xb3c, 0xa9b, 0xa02, 0x973, 0x8eb, 0x86b, 0x7f2, 0x780, 0x714, 0x6ae, 0x64e, 0x5f4, 0x59e, 0x54f, 0x501, 0x4b9, 0x475, 0x435, 0x3f9, 0x3c0, 0x38a, 0x357, 0x327, 0x2fa, 0x2cf, 0x2a7, 0x281, 0x25d, 0x23b, 0x21b, 0x1fc, 0x1e0, 0x1c5, 0x1ac, 0x194, 0x17d, 0x168, 0x153, 0x140, 0x12e, 0x11d, 0x10d, 0xfe, 0xf0, 0xe2, 0xd6, 0xca, 0xbe, 0xb4, 0xaa, 0xa0, 0x97, 0x8f, 0x87, 0x7f, 0x78, 0x71, 0x6b, 0x65, 0x5f, 0x5a, 0x55, 0x50, 0x4c, 0x47, 0x43, 0x40, 0x3c, 0x39, 0x35, 0x32, 0x30, 0x2d, 0x2a, 0x28, 0x26, 0x24, 0x22, 0x20, 0x1e, 0x1c, 0x1b, 0x19, 0x18, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0xf, 0xe };
; 870.	
; 871.	typedef struct 
; 872.	{
; 873.	    unsigned char SQT_Size0, SQT_Size1;
; 874.	    unsigned char SQT_SamplesPointer0, SQT_SamplesPointer1;
; 875.	    unsigned char SQT_OrnamentsPointer0, SQT_OrnamentsPointer1;
; 876.	    unsigned char SQT_PatternsPointer0, SQT_PatternsPointer1;
; 877.	    unsigned char SQT_PositionsPointer0, SQT_PositionsPointer1;
; 878.	    unsigned char SQT_LoopPointer0, SQT_LoopPointer1;
; 879.	} SQT_File;
; 880.	
; 881.	#define SQT_Size0 (unsigned int)(header->SQT_Size0 | (header->SQT_Size0 << 8))
; 882.	#define SQT_SamplesPointer (unsigned int)(header->SQT_SamplesPointer0 | (header->SQT_SamplesPointer1 << 8))
; 883.	#define SQT_OrnamentsPointer (unsigned int)(header->SQT_OrnamentsPointer0 | (header->SQT_OrnamentsPointer1 << 8))
; 884.	#define SQT_PatternsPointer (unsigned int)(header->SQT_PatternsPointer0 | (header->SQT_PatternsPointer1 << 8))
; 885.	#define SQT_PositionsPointer (unsigned int)(header->SQT_PositionsPointer0 | (header->SQT_PositionsPointer1 << 8))
; 886.	#define SQT_LoopPointer (unsigned int)(header->SQT_LoopPointer0 | (header->SQT_LoopPointer1 << 8))
; 887.	
; 888.	#define MAKE_PWORD(x) (unsigned short *)(x)
; 889.	
; 890.	typedef struct 
; 891.	{
; 892.	    unsigned short Address_In_Pattern, SamplePointer, Point_In_Sample, OrnamentPointer, Point_In_Ornament, Ton, ix27;
; 893.	    unsigned char Volume, Amplitude, Note, ix21;
; 894.	    short Ton_Slide_Step, Current_Ton_Sliding;
; 895.	    char Sample_Tik_Counter, Ornament_Tik_Counter, Transposit;
; 896.	    bool Enabled, Envelope_Enabled, Ornament_Enabled, Gliss, MixNoise, MixTon, b4ix0, b6ix0, b7ix0;
; 897.	} SQT_Channel_Parameters;
; 898.	
; 899.	typedef struct 
; 900.	{
; 901.	    unsigned char Delay, DelayCounter, Lines_Counter;
; 902.	    unsigned short Positions_Pointer;
; 903.	}SQT_Parameters;
; 904.	
; 905.	typedef struct 
; 906.	{
; 907.	    SQT_Parameters SQT;
; 908.	    SQT_Channel_Parameters SQT_A, SQT_B, SQT_C;
; 909.	} SQT_SongInfo;
; 910.	
; 911.	#define SQT_A ((SQT_SongInfo *)info->data)->SQT_A
; 912.	#define SQT_B ((SQT_SongInfo *)info->data)->SQT_B
; 913.	#define SQT_C ((SQT_SongInfo *)info->data)->SQT_C
; 914.	#define SQT ((SQT_SongInfo *)info->data)->SQT
; 915.	
; 916.	bool SQT_PreInit(char * info)
; 917.	{
SQT_PreInit:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 918.	    unsigned char *module = info;
	LD	(?0011+137),DE
; 919.	    SQT_File *header = (SQT_File *)module;
	LD	(?0011+139),IX
; 920.	    long i, i1, i2;
; 921.	    unsigned long j2;
; 922.	    unsigned short *pwrd;
; 923.	    
; 924.	    
; 925.	    i = (unsigned int)SQT_SamplesPointer - 10;
	LD	L,(IX+2)
	LD	B,0
	LD	E,B
	LD	D,(IX+3)
	LD	A,B
	OR	D
	LD	H,A
	LD	BC,65526
	ADD	HL,BC
	LD	C,E
	LD	B,E
	LD	(?0011+141),HL
	LD	(?0011+143),BC
; 926.	    
; 927.	    if(i < 0)
	BIT	7,B
	JP	NZ,?0969
?0325:
; 928.	    {
; 929.	      //  s->len = 21;
; 930.	        return false;
; 931.	     }
?0326:
; 932.	        
; 933.	    i1 = 0;
	LD	L,C
	LD	H,B
	LD	(?0011+145),HL
	LD	(?0011+147),BC
; 934.	    i2 = (unsigned int)SQT_PositionsPointer - i;
	LD	L,8
	LD	BC,(?0011+139)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	A,D
	LD	HL,9
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	LD	E,D
	LD	BC,(?0011+141)
	SBC	HL,BC
	EX	DE,HL
	LD	BC,(?0011+143)
	SBC	HL,BC
	LD	C,L
	LD	B,H
	EX	DE,HL
	LD	(?0011+149),HL
	LD	(?0011+151),BC
; 935.	    
; 936.	    if(i2 < 0)
	BIT	7,B
	JP	NZ,?0969
?0327:
; 937.	    {
; 938.	   //   s->len = i=2;
; 939.	        return false;
; 940.	    }
?0328:
?0330:
; 941.	    
; 942.	    while(module[i2] != 0)
	LD	HL,(?0011+149)
	LD	BC,(?0011+137)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	Z,?0329
?0331:
; 943.	    {
; 944.	        if(i2 > (65536 - 8))
	LD	HL,(?0011+151)
	PUSH	HL
	LD	HL,(?0011+149)
	PUSH	HL
	LD	BC,0
	LD	HL,65528
	CALL	LWRD ?SL_CMP_L03
	JP	C,?0969
?0332:
; 945.	        {
; 946.	       //   s->len = 23;
; 947.	            return false;
; 948.	         }
?0333:
; 949.	            
; 950.	        if(i1 < (module[i2] & 0x7f))
	LD	HL,(?0011+149)
	LD	BC,(?0011+137)
	ADD	HL,BC
	LD	B,(HL)
	RES	7,B
	LD	L,B
	LD	BC,0
	LD	H,C
	PUSH	BC
	PUSH	HL
	CALL	LWRD ?1209
	JR	NC,?0335
?0334:
; 951.	            i1 = module[i2] & 0x7f;
	LD	HL,(?0011+149)
	LD	BC,(?0011+137)
	ADD	HL,BC
	LD	B,(HL)
	RES	7,B
	LD	L,B
	LD	BC,0
	LD	H,C
	LD	(?0011+145),HL
	LD	(?0011+147),BC
?0335:
; 952.	        i2 += 2;
	LD	HL,?0011+149
	LD	BC,0
	LD	DE,2
	CALL	LWRD ?L_ADDASG_L03
; 953.	        if(i1 < (module[i2] & 0x7f))
	LD	HL,(?0011+137)
	ADD	HL,DE
	LD	B,(HL)
	RES	7,B
	LD	L,B
	LD	BC,0
	LD	H,C
	PUSH	BC
	PUSH	HL
	CALL	LWRD ?1209
	JR	NC,?0337
?0336:
; 954.	            i1 = module[i2] & 0x7f;
	LD	HL,(?0011+149)
	LD	BC,(?0011+137)
	ADD	HL,BC
	LD	B,(HL)
	RES	7,B
	LD	L,B
	LD	BC,0
	LD	H,C
	LD	(?0011+145),HL
	LD	(?0011+147),BC
?0337:
; 955.	        i2 += 2;
	LD	HL,?0011+149
	LD	BC,0
	LD	DE,2
	CALL	LWRD ?L_ADDASG_L03
; 956.	        if(i1 < (module[i2] & 0x7f))
	LD	HL,(?0011+137)
	ADD	HL,DE
	LD	B,(HL)
	RES	7,B
	LD	L,B
	LD	BC,0
	LD	H,C
	PUSH	BC
	PUSH	HL
	CALL	LWRD ?1209
	JR	NC,?0339
?0338:
; 957.	            i1 = module[i2] & 0x7f;
	LD	HL,(?0011+149)
	LD	BC,(?0011+137)
	ADD	HL,BC
	LD	B,(HL)
	RES	7,B
	LD	L,B
	LD	BC,0
	LD	H,C
	LD	(?0011+145),HL
	LD	(?0011+147),BC
?0339:
; 958.	        i2 += 3;
	LD	HL,?0011+149
	LD	BC,0
	LD	DE,3
	CALL	LWRD ?L_ADDASG_L03
	JP	LWRD ?0328
?0329:
; 959.	    }
; 960.	    j2 = (unsigned long)(&module[65535]);
	LD	HL,65535
	ADD	HL,BC
	LD	C,A
	LD	B,A
	LD	(?0011+153),HL
	LD	(?0011+155),BC
; 961.	    pwrd = MAKE_PWORD(&header->SQT_SamplesPointer0);
	LD	HL,(?0011+139)
	INC	HL
	INC	HL
	LD	(?0011+157),HL
; 962.	    i1 = (SQT_PatternsPointer - i + i1 * 2) / 2;
	LD	L,C
	LD	H,B
	PUSH	BC
	INC	HL
	INC	HL
	PUSH	HL
	LD	L,6
	LD	BC,(?0011+139)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,A
	LD	HL,7
	ADD	HL,BC
	LD	B,(HL)
	LD	C,D
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	LD	B,C
	PUSH	BC
	PUSH	HL
	LD	BC,(?0011+147)
	LD	HL,(?0011+145)
	ADD	HL,HL
	RL	C
	RL	B
	LD	E,C
	LD	D,B
	POP	BC
	ADD	HL,BC
	EX	DE,HL
	POP	BC
	ADC	HL,BC
	EX	DE,HL
	AND	A
	LD	BC,(?0011+141)
	SBC	HL,BC
	EX	DE,HL
	LD	BC,(?0011+143)
	SBC	HL,BC
	LD	C,L
	LD	B,H
	EX	DE,HL
	CALL	LWRD ?SL_DIV_L03
	LD	(?0011+145),HL
	LD	(?0011+147),BC
; 963.	
; 964.	    if(i1 < 1)
	LD	DE,0
	PUSH	DE
	INC	DE
	PUSH	DE
	CALL	LWRD ?SL_CMP_L03
	JR	NC,?0341
?0340:
; 965.	    {
; 966.	    //  s->len = 24;
; 967.	        return false;
?0969:
	LD	L,0
; 968.	     }
	JR	?0346
?0341:
; 969.	      
; 970.	        
; 971.	    for(i2 = 1; i2 <= i1; i2++)
	LD	C,D
	LD	B,D
	EX	DE,HL
?0966:
	LD	(?0011+149),HL
	LD	(?0011+151),BC
?0343:
	PUSH	BC
	PUSH	HL
	CALL	LWRD ?1209
	JR	C,?0342
?0344:
; 972.	    {
; 973.	    /*
; 974.	        if((unsigned long)(pwrd) >= j2)
; 975.	        {
; 976.	          s->len = 25;
; 977.	            return false;
; 978.	        }    
; 979.	    
; 980.	        if(*pwrd < i)
; 981.	        {
; 982.	          s->len = 26;
; 983.	            return false;
; 984.	        }   
; 985.	      */
; 986.	            
; 987.	        *pwrd -= i;
	LD	BC,(?0011+141)
	LD	HL,(?0011+157)
	LD	A,(HL)
	SUB	C
	LD	(HL),A
	INC	HL
	LD	A,(HL)
	SBC	A,B
	LD	(HL),A
; 988.	        pwrd++;
	INC	HL
	LD	(?0011+157),HL
	LD	HL,(?0011+149)
	LD	BC,(?0011+151)
	CALL	LWRD ?L_INC_L03
	JR	?0966
?0342:
; 989.	    }
; 990.	    
; 991.	    
; 992.	    return true;
	LD	L,1
; 993.	}
?0346:
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1209:
	LD	BC,(?0011+147)
	LD	HL,(?0011+145)
	JP	LWRD ?SL_CMP_L03
; 994.	
; 995.	SQT_SongInfo SQT_SI;
; 996.	
; 997.	void SQT_Init(AYSongInfo * info)
; 998.	{
SQT_Init:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 999.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+159),HL
; 1000.	    SQT_File *header = (SQT_File *)module;
	LD	(?0011+161),HL
; 1001.	
; 1002.	    if(!SQT_PreInit(info->module))
	LD	E,(IX+2)
	LD	D,(IX+3)
	LD	A,BYTE3 SQT_PreInit
	LD	HL,LWRD SQT_PreInit
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	INC	L
	DEC	L
	JP	Z,?0349
?0347:
?0348:
; 1003.	        return;
; 1004.	
; 1005.	   
; 1006.	    info->data = &SQT_SI;
	LD	(IX+4),LOW(SQT_SI)
	LD	(IX+5),HIGH(SQT_SI)
; 1007.	 
; 1008.	    SQT_A.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,15
	ADD	HL,BC
	XOR	A
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 1009.	    SQT_A.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,31
	ADD	HL,BC
	LD	(HL),B
; 1010.	    SQT_A.Ornament_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	(HL),B
; 1011.	    SQT_A.Gliss = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	(HL),B
; 1012.	    SQT_A.Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,30
	ADD	HL,BC
	LD	(HL),B
; 1013.	
; 1014.	    SQT_B.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,49
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 1015.	    SQT_B.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,65
	ADD	HL,BC
	LD	(HL),B
; 1016.	    SQT_B.Ornament_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	(HL),B
; 1017.	    SQT_B.Gliss = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	(HL),B
; 1018.	    SQT_B.Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,64
	ADD	HL,BC
	LD	(HL),B
; 1019.	
; 1020.	    SQT_C.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,83
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 1021.	    SQT_C.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,99
	ADD	HL,BC
	LD	(HL),B
; 1022.	    SQT_C.Ornament_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	(HL),B
; 1023.	    SQT_C.Gliss = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	(HL),B
; 1024.	    SQT_C.Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,98
	ADD	HL,BC
	LD	(HL),B
; 1025.	
; 1026.	    SQT.DelayCounter = 1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	(HL),1
; 1027.	    SQT.Delay = 1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	(HL),1
; 1028.	    SQT.Lines_Counter = 1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	(HL),1
; 1029.	    SQT.Positions_Pointer = SQT_PositionsPointer;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,8
	LD	BC,(?0011+161)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,A
	LD	HL,9
	ADD	HL,BC
	LD	B,(HL)
	LD	C,E
	LD	A,D
	OR	B
	LD	B,A
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1030.	
; 1031.	    //ay_resetay(&info, 0);
; 1032.	        
; 1033.	        info->slow = 0;
	LD	(IX+109),D
; 1034.	}
?0349:
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 1035.	
; 1036.	void SQT_Call_LC1D1(AYSongInfo * info, SQT_Channel_Parameters * chan, unsigned short * Ptr, unsigned char a)
; 1037.	{
SQT_Call_LC1D1:
	PUSH	IY
	PUSH	IX
	EXX
	PUSH	BC
	EXX
	PUSH	DE
	POP	IX
	PUSH	BC
	POP	IY
	LD	HL,10
	ADD	HL,SP
	PUSH	HL
	EXX
	POP	HL
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	EXX
; 1038.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+163),HL
; 1039.	    ((*Ptr))++;
	EXX
	PUSH	BC
	EXX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0980
	INC	(HL)
?0980:
; 1040.	    if(chan->b6ix0)
	LD	HL,32
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	Z,?0351
?0350:
; 1041.	    {
; 1042.	        chan->Address_In_Pattern = (unsigned short)(((*Ptr)) + 1);
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	INC	HL
	PUSH	HL
	PUSH	IY
	POP	HL
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1043.	        chan->b6ix0 = false;
	LD	(IY+32),0
?0351:
; 1044.	    }
; 1045.	    switch(a - 1)
	LD	HL,12
	ADD	HL,SP
	LD	E,(HL)
	LD	D,0
	DEC	DE
	CALL	LWRD ?S_S_SWITCH_L06
	DEFW	0
	DEFW	8
	DEFW	?0377
	DEFW	?0353
	DEFW	?0356
	DEFW	?0359
	DEFW	?0362
	DEFW	?0365
	DEFW	?0370
	DEFW	?0375
	DEFW	?0376
?0353:
; 1046.	    {
; 1047.	        case 0:
; 1048.	            if(chan->b4ix0)
	LD	A,(IY+31)
	OR	A
	JP	Z,?0352
?0354:
; 1049.	                chan->Volume = module[((*Ptr))] & 15;
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+163)
	ADD	HL,BC
	LD	A,(HL)
	JR	?0981
?0355:
; 1050.	            break;
?0356:
; 1051.	        case 1:
; 1052.	            if(chan->b4ix0)
	LD	A,(IY+31)
	OR	A
	JP	Z,?0352
?0357:
; 1053.	                chan->Volume = (chan->Volume + module[((*Ptr))]) & 15;
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+163)
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,(IY+14)
?0981:
	AND	15
	LD	(IY+14),A
?0358:
; 1054.	            break;
	JP	LWRD ?0352
?0359:
; 1055.	        case 2:
; 1056.	            if(chan->b4ix0)
	LD	A,(IY+31)
	OR	A
	JP	Z,?0352
?0360:
; 1057.	            {
; 1058.	                SQT_A.Volume = module[((*Ptr))];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,19
	ADD	HL,BC
	PUSH	HL
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+163)
	ADD	HL,BC
	LD	D,(HL)
	POP	HL
	LD	(HL),D
; 1059.	                SQT_B.Volume = module[((*Ptr))];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,53
	ADD	HL,DE
	PUSH	HL
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	ADD	HL,BC
	LD	D,(HL)
	POP	HL
	LD	(HL),D
; 1060.	                SQT_C.Volume = module[((*Ptr))];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,87
	ADD	HL,DE
	PUSH	HL
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	ADD	HL,BC
	LD	B,(HL)
	POP	HL
	JP	LWRD ?0983
?0361:
; 1061.	            }
; 1062.	            break;
?0362:
; 1063.	        case 3:
; 1064.	            if(chan->b4ix0)
	LD	A,(IY+31)
	OR	A
	JP	Z,?0352
?0363:
; 1065.	            {
; 1066.	                SQT_A.Volume = (SQT_A.Volume + module[((*Ptr))]) & 15;
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+163)
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,19
	ADD	HL,DE
	POP	DE
	LD	A,(DE)
	ADD	A,(HL)
	AND	15
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,19
	ADD	HL,DE
	LD	(HL),A
; 1067.	                SQT_B.Volume = (SQT_B.Volume + module[((*Ptr))]) & 15;
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,53
	ADD	HL,DE
	POP	DE
	LD	A,(DE)
	ADD	A,(HL)
	AND	15
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,53
	ADD	HL,DE
	LD	(HL),A
; 1068.	                SQT_C.Volume = (SQT_C.Volume + module[((*Ptr))]) & 15;
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,87
	ADD	HL,BC
	POP	BC
	LD	A,(BC)
	ADD	A,(HL)
	AND	15
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,87
	ADD	HL,BC
	LD	(HL),A
?0364:
; 1069.	            }
; 1070.	            break;
	JP	LWRD ?0352
?0365:
; 1071.	        case 4:
; 1072.	            if(chan->b4ix0)
	LD	A,(IY+31)
	OR	A
	JP	Z,?0352
?0366:
; 1073.	            {
; 1074.	                SQT.DelayCounter = module[((*Ptr))] & 31;
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+163)
	ADD	HL,BC
	LD	A,(HL)
	AND	31
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	(HL),A
; 1075.	                if(SQT.DelayCounter == 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	A,(HL)
	OR	A
	JR	NZ,?0374
?0368:
; 1076.	                    SQT.DelayCounter = 32;
	JR	?0985
?0369:
; 1077.	                SQT.Delay = SQT.DelayCounter;
?0367:
; 1078.	            }
; 1079.	            break;
?0370:
; 1080.	        case 5:
; 1081.	            if(chan->b4ix0)
	LD	A,(IY+31)
	OR	A
	JP	Z,?0352
?0371:
; 1082.	            {
; 1083.	                SQT.DelayCounter = (SQT.DelayCounter + module[((*Ptr))]) & 31;
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+163)
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	POP	BC
	LD	A,(BC)
	ADD	A,(HL)
	AND	31
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	(HL),A
; 1084.	                if(SQT.DelayCounter == 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	A,(HL)
	OR	A
	JR	NZ,?0374
?0373:
; 1085.	                    SQT.DelayCounter = 32;
?0985:
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	(HL),32
?0374:
; 1086.	                SQT.Delay = SQT.DelayCounter;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
?0983:
	LD	(HL),B
?0372:
; 1087.	            }
; 1088.	            break;
	JR	?0352
?0375:
; 1089.	        case 6:
; 1090.	            chan->Current_Ton_Sliding = 0;
	XOR	A
	LD	(IY+20),A
	LD	(IY+21),A
; 1091.	            chan->Gliss = true;
	LD	(IY+28),1
; 1092.	            chan->Ton_Slide_Step = -module[((*Ptr))];
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+163)
	ADD	HL,BC
	LD	C,(HL)
	LD	B,A
	LD	L,B
	AND	A
	LD	H,B
	SBC	HL,BC
	LD	(IY+18),L
	LD	(IY+19),H
; 1093.	            break;
	JR	?0352
?0376:
; 1094.	        case 7:
; 1095.	            chan->Current_Ton_Sliding = 0;
	XOR	A
	LD	(IY+20),A
	LD	(IY+21),A
; 1096.	            chan->Gliss = true;
	LD	(IY+28),1
; 1097.	            chan->Ton_Slide_Step = module[((*Ptr))];
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+163)
	ADD	HL,BC
	LD	C,(HL)
	LD	(IY+18),C
	LD	(IY+19),A
; 1098.	            break;
	JR	?0352
?0377:
; 1099.	        default:
; 1100.	            chan->Envelope_Enabled = true;
	LD	(IY+26),1
; 1101.	            ay_writeay(AY_ENV_SHAPE, (a - 1) & 15);
	LD	A,(HL)
	ADD	A,255
	AND	15
	LD	C,A
	LD	E,13
	CALL	LWRD ?1200
; 1102.	            ay_writeay(AY_ENV_FINE, module[((*Ptr))]);
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+163)
	CALL	LWRD ?1201
; 1103.	            break;
?0352:
; 1104.	    }
; 1105.	}
	EXX
	POP	BC
	EXX
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 1106.	
; 1107.	void SQT_Call_LC2A8(AYSongInfo * info, SQT_Channel_Parameters * chan, unsigned char a)
; 1108.	{
SQT_Call_LC2A8:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
; 1109.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+165),HL
; 1110.	    SQT_File *header = (SQT_File *)module;
	LD	(?0011+167),HL
; 1111.	    chan->Envelope_Enabled = false;
	LD	HL,26
	ADD	HL,BC
	LD	(HL),0
; 1112.	    chan->Ornament_Enabled = false;
	LD	HL,27
	ADD	HL,BC
	LD	(HL),0
; 1113.	    chan->Gliss = false;
	LD	HL,28
	ADD	HL,BC
	LD	(HL),0
; 1114.	    chan->Enabled = true;
	LD	HL,25
	ADD	HL,BC
	LD	(HL),1
; 1115.	    chan->SamplePointer = ay_sys_getword(&module[a * 2 + SQT_SamplesPointer]);
	LD	L,C
	LD	H,B
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,(?0011+167)
	INC	HL
	INC	HL
	LD	A,(HL)
	LD	B,0
	INC	HL
	LD	D,(HL)
	LD	L,A
	LD	A,B
	OR	D
	LD	H,A
	PUSH	HL
	LD	HL,12
	ADD	HL,SP
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	POP	HL
	ADD	HL,BC
	LD	BC,(?0011+165)
	ADD	HL,BC
	CALL	LWRD ?1184
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1116.	    chan->Point_In_Sample = chan->SamplePointer + 2;
	LD	L,(IX+2)
	LD	H,(IX+3)
	INC	HL
	INC	HL
	LD	(IX+4),L
	LD	(IX+5),H
; 1117.	    chan->Sample_Tik_Counter = 32;
	LD	(IX+22),32
; 1118.	    chan->MixNoise = true;
	LD	(IX+29),1
; 1119.	    chan->MixTon = true;
	LD	(IX+30),1
; 1120.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 1121.	
; 1122.	void SQT_Call_LC2D9(AYSongInfo * info, SQT_Channel_Parameters * chan, unsigned char a)
; 1123.	{
SQT_Call_LC2D9:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
; 1124.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+169),HL
; 1125.	    SQT_File *header = (SQT_File *)module;
	LD	(?0011+171),HL
; 1126.	    chan->OrnamentPointer = ay_sys_getword(&module[a * 2 + SQT_OrnamentsPointer]);
	LD	HL,6
	ADD	HL,BC
	PUSH	HL
	LD	HL,4
	LD	DE,(?0011+171)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,5
	ADD	HL,DE
	LD	D,(HL)
	LD	E,0
	POP	HL
	LD	C,L
	LD	A,H
	OR	D
	LD	B,A
	LD	HL,10
	ADD	HL,SP
	LD	L,(HL)
	LD	H,E
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,(?0011+169)
	ADD	HL,BC
	CALL	LWRD ?1184
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1127.	    chan->Point_In_Ornament = chan->OrnamentPointer + 2;
	LD	L,(IX+6)
	LD	H,(IX+7)
	INC	HL
	INC	HL
	LD	(IX+8),L
	LD	(IX+9),H
; 1128.	    chan->Ornament_Tik_Counter = 32;
	LD	(IX+23),32
; 1129.	    chan->Ornament_Enabled = true;
	LD	(IX+27),1
; 1130.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 1131.	
; 1132.	void SQT_Call_LC283(AYSongInfo * info, SQT_Channel_Parameters * chan, unsigned short * Ptr)
; 1133.	{
SQT_Call_LC283:
	PUSH	IY
	PUSH	IX
	EXX
	PUSH	BC
	EXX
	PUSH	DE
	POP	IX
	PUSH	BC
	EXX
	POP	BC
	EXX
	LD	HL,10
	ADD	HL,SP
	LD	A,(HL)
	LD	IYL,A
	INC	HL
	LD	A,(HL)
	LD	IYH,A
; 1134.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+173),HL
; 1135.	    unsigned char val = module[(*Ptr)];
	LD	C,(IY+0)
	LD	B,(IY+1)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+175),A
; 1136.	    if(val <= 0x7f)
	LD	B,A
	LD	A,127
	CP	B
	LD	A,B
	JP	NC,?0991
?0378:
; 1137.	    {
; 1138.	        SQT_Call_LC1D1(info, chan, Ptr, val);
?0379:
; 1139.	    }
; 1140.	    else if(val >= 0x80)
	CP	128
	JP	C,?0392
?0381:
; 1141.	    {
; 1142.	        if(((val >> 1) & 31) != 0)
	SRL	A
	AND	31
	JR	Z,?0384
?0383:
; 1143.	            SQT_Call_LC2A8(info, chan, (val >> 1) & 31);
	LD	A,B
	SRL	A
	AND	159
	LD	C,A
	PUSH	BC
	EXX
	PUSH	BC
	EXX
	POP	BC
	PUSH	IX
	POP	DE
	LD	A,BYTE3 SQT_Call_LC2A8
	LD	HL,LWRD SQT_Call_LC2A8
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
?0384:
; 1144.	        if((val & 64) != 0)
	LD	A,(?0011+175)
	BIT	6,A
	JR	Z,?0392
?0385:
; 1145.	        {
; 1146.	            int Temp = module[(*Ptr) + 1] >> 4;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+173)
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	RRA
	RRA
	RRA
	RRA
	AND	15
	LD	C,A
	LD	B,0
	LD	(?0011+176),BC
; 1147.	            if((val & 1) != 0)
	LD	A,(?0011+175)
	BIT	0,A
	JR	Z,?0388
?0387:
; 1148.	                Temp = Temp | 16;
	LD	HL,?0011+176
	SET	4,(HL)
?0388:
; 1149.	            if(Temp != 0)
	LD	HL,(?0011+176)
	LD	A,L
	OR	H
	JR	Z,?0390
?0389:
; 1150.	                SQT_Call_LC2D9(info, chan, Temp);
	LD	A,(?0011+176)
	LD	C,A
	PUSH	BC
	EXX
	PUSH	BC
	EXX
	POP	BC
	PUSH	IX
	POP	DE
	LD	A,BYTE3 SQT_Call_LC2D9
	LD	HL,LWRD SQT_Call_LC2D9
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
?0390:
; 1151.	            (*Ptr)++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0989
	INC	(HL)
?0989:
; 1152.	            if((module[(*Ptr)] & 15) != 0)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+173)
	ADD	HL,BC
	LD	A,(HL)
	AND	15
	JR	Z,?0392
?0391:
; 1153.	                SQT_Call_LC1D1(info, chan, Ptr, module[(*Ptr)] & 15);
	LD	L,(IY+0)
	LD	H,(IY+1)
	ADD	HL,BC
	LD	A,(HL)
	AND	15
?0991:
	LD	C,A
	PUSH	BC
	PUSH	IY
	EXX
	PUSH	BC
	EXX
	POP	BC
	PUSH	IX
	POP	DE
	LD	A,BYTE3 SQT_Call_LC1D1
	LD	HL,LWRD SQT_Call_LC1D1
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
	POP	HL
?0392:
?0386:
?0382:
?0380:
; 1154.	        }
; 1155.	    }
; 1156.	    (*Ptr)++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0990
	INC	(HL)
?0990:
; 1157.	}
	JP	LWRD ?0352
; 1158.	
; 1159.	void SQT_Call_LC191(AYSongInfo * info, SQT_Channel_Parameters * chan, unsigned short * Ptr)
; 1160.	{
SQT_Call_LC191:
	PUSH	IY
	PUSH	IX
	EXX
	PUSH	BC
	EXX
	PUSH	BC
	POP	IX
	PUSH	DE
	EXX
	POP	BC
	EXX
	LD	HL,10
	ADD	HL,SP
	LD	A,(HL)
	LD	IYL,A
	INC	HL
	LD	A,(HL)
	LD	IYH,A
; 1161.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+178),HL
; 1162.	    (*Ptr) = chan->ix27;
	LD	HL,12
	ADD	HL,BC
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	PUSH	HL
	PUSH	IY
	POP	DE
	EX	DE,HL
	POP	DE
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1163.	    chan->b6ix0 = false;
	LD	HL,32
	ADD	HL,BC
	LD	(HL),0
; 1164.	    if(module[(*Ptr)] <= 0x7f)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+178)
	ADD	HL,BC
	LD	A,127
	CP	(HL)
	JR	C,?0394
?0393:
; 1165.	    {
; 1166.	        (*Ptr)++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0994
	INC	(HL)
?0994:
; 1167.	        SQT_Call_LC283(info, chan, Ptr);
	PUSH	IY
	PUSH	IX
	POP	BC
	EXX
	PUSH	BC
	EXX
	POP	DE
	LD	A,BYTE3 SQT_Call_LC283
	LD	HL,LWRD SQT_Call_LC283
	JR	?0995
?0394:
; 1168.	    }
; 1169.	    else if(module[(*Ptr)] >= 0x80)
	LD	L,(IY+0)
	LD	H,(IY+1)
	ADD	HL,BC
	LD	A,(HL)
	CP	128
	JR	C,?0397
?0396:
; 1170.	    {
; 1171.	        SQT_Call_LC2A8(info, chan, module[(*Ptr)] & 31);
	LD	L,(IY+0)
	LD	H,(IY+1)
	ADD	HL,BC
	LD	A,(HL)
	AND	31
	LD	C,A
	PUSH	BC
	PUSH	IX
	POP	BC
	EXX
	PUSH	BC
	EXX
	POP	DE
	LD	A,BYTE3 SQT_Call_LC2A8
	LD	HL,LWRD SQT_Call_LC2A8
?0995:
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
?0397:
?0395:
; 1172.	    }
; 1173.	
; 1174.	}
	JP	LWRD ?0352
; 1175.	
; 1176.	void SQT_PatternInterpreter(AYSongInfo * info, SQT_Channel_Parameters * chan)
; 1177.	{
SQT_PatternInterpreter:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
	PUSH	DE
	POP	IY
; 1178.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+180),HL
; 1179.	    unsigned short Ptr = 0;
	LD	HL,0
	LD	(?0011+182),HL
; 1180.	    unsigned char val;
; 1181.	    
; 1182.	    if(chan->ix21 != 0)
	LD	L,17
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	Z,?0399
?0398:
; 1183.	    {
; 1184.	        chan->ix21--;
	DEC	(IX+17)
; 1185.	        if(chan->b7ix0)
	LD	A,(IX+33)
	OR	A
	JP	Z,?0402
?0400:
; 1186.	            SQT_Call_LC191(info, chan, &Ptr);
	JP	LWRD ?0433
?0401:
; 1187.	        return;
; 1188.	    }
?0399:
; 1189.	    Ptr = chan->Address_In_Pattern;
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	(?0011+182),HL
; 1190.	    chan->b6ix0 = true;
	LD	(IX+32),1
; 1191.	    chan->b7ix0 = false;
	LD	(IX+33),A
?0403:
; 1192.	    while(true)
?0404:
; 1193.	    {
; 1194.	        val = module[Ptr];
	LD	HL,(?0011+182)
	LD	BC,(?0011+180)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+184),A
; 1195.	        if(val <= 0x5f)
	LD	B,A
	LD	A,95
	CP	B
	JR	C,?0406
?0405:
; 1196.	        {
; 1197.	            chan->Note = module[Ptr];
	LD	HL,(?0011+182)
	LD	BC,(?0011+180)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+16),B
; 1198.	            chan->ix27 = Ptr;
	LD	HL,(?0011+182)
	LD	(IX+12),L
	LD	(IX+13),H
; 1199.	            Ptr++;
	LD	HL,(?0011+182)
	INC	HL
	LD	(?0011+182),HL
; 1200.	            SQT_Call_LC283(info, chan, &Ptr);
	LD	HL,?0011+182
	PUSH	HL
	PUSH	IX
	POP	BC
	PUSH	IY
	POP	DE
	LD	A,BYTE3 SQT_Call_LC283
	LD	HL,LWRD SQT_Call_LC283
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
; 1201.	            if(chan->b6ix0)
	LD	A,(IX+32)
	OR	A
	JP	Z,?0402
?0407:
; 1202.	                chan->Address_In_Pattern = Ptr;
	LD	HL,(?0011+182)
	JR	?1018
?0408:
; 1203.	            break;
?0406:
; 1204.	        }
; 1205.	        else if(val >= 0x60 && val <= 0x6e)
	LD	A,B
	CP	96
	JR	C,?0410
	LD	B,A
	LD	A,110
	CP	B
	JR	C,?0410
?0412:
?0411:
?0409:
; 1206.	        {
; 1207.	            SQT_Call_LC1D1(info, chan, &Ptr, module[Ptr] - 0x60);
	LD	HL,(?0011+182)
	LD	BC,(?0011+180)
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,160
	JR	?1020
; 1208.	            break;
?0410:
; 1209.	        }
; 1210.	        else if(val >= 0x6f && val <= 0x7f)
	LD	A,B
	CP	111
	JR	C,?0414
	LD	B,A
	LD	A,127
	CP	B
	JR	C,?0414
?0416:
?0415:
?0413:
; 1211.	        {
; 1212.	            chan->MixNoise = false;
	LD	(IX+29),0
; 1213.	            chan->MixTon = false;
	LD	(IX+30),0
; 1214.	            chan->Enabled = false;
	LD	(IX+25),0
; 1215.	            if(val != 0x6f)
	LD	A,B
	CP	111
	LD	HL,(?0011+182)
	JR	Z,?0418
?0417:
; 1216.	                SQT_Call_LC1D1(info, chan, &Ptr, module[Ptr] - 0x6f);
	LD	BC,(?0011+180)
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,145
?1020:
	LD	C,A
	PUSH	BC
	LD	HL,?0011+182
	PUSH	HL
	PUSH	IX
	POP	BC
	PUSH	IY
	POP	DE
	LD	A,BYTE3 SQT_Call_LC1D1
	LD	HL,LWRD SQT_Call_LC1D1
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
	JP	LWRD ?1013
; 1217.	            else
?0418:
; 1218.	                chan->Address_In_Pattern = Ptr + 1;
	INC	HL
?1018:
	PUSH	HL
	PUSH	IX
	POP	HL
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
?0419:
; 1219.	            break;
	JP	LWRD ?0402
?0414:
; 1220.	        }
; 1221.	        else if(val >= 0x80 && val <= 0xbf)
	LD	A,B
	CP	128
	JR	C,?0421
	LD	B,A
	LD	A,191
	CP	B
	JR	C,?0421
?0423:
?0422:
?0420:
; 1222.	        {
; 1223.	            chan->Address_In_Pattern = Ptr + 1;
	LD	HL,(?0011+182)
	INC	HL
	PUSH	HL
	PUSH	IX
	POP	HL
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1224.	            if(val <= 0x9f)
	LD	A,(?0011+184)
	LD	B,A
	LD	A,159
	CP	B
	LD	A,B
	JR	C,?0425
?0424:
; 1225.	            {
; 1226.	                if((val & 16) == 0)
	BIT	4,A
	JR	NZ,?0427
?0426:
; 1227.	                    chan->Note += val & 15;
	AND	15
	ADD	A,(IX+16)
	LD	(IX+16),A
; 1228.	                else
	JR	?0433
?0427:
; 1229.	                    chan->Note -= val & 15;
	LD	HL,16
	PUSH	IX
	POP	BC
	ADD	HL,BC
	AND	15
	LD	B,A
	LD	A,(HL)
	SUB	B
	LD	(HL),A
?0428:
; 1230.	            }
; 1231.	            else
	JR	?0433
?0425:
; 1232.	            {
; 1233.	                chan->ix21 = val & 15;
	AND	15
	LD	(IX+17),A
; 1234.	                if((val & 16) == 0)
	LD	A,B
	BIT	4,A
	JR	Z,?0402
?0430:
; 1235.	                    break;
?0431:
; 1236.	                if(chan->ix21 != 0)
	LD	A,(IX+17)
	OR	A
	JR	Z,?0433
?0432:
; 1237.	                    chan->b7ix0 = true;
	LD	(IX+33),1
?0433:
?0429:
; 1238.	            }
; 1239.	            SQT_Call_LC191(info, chan, &Ptr);
	LD	HL,?0011+182
	PUSH	HL
	PUSH	IX
	POP	BC
	PUSH	IY
	POP	DE
	LD	A,BYTE3 SQT_Call_LC191
	LD	HL,LWRD SQT_Call_LC191
	JR	?1015
; 1240.	            break;
?0421:
; 1241.	        }
; 1242.	        else if(val >= 0xc0)
	LD	A,B
	CP	192
	JP	C,?0403
?0434:
; 1243.	        {
; 1244.	            chan->Address_In_Pattern = Ptr + 1;
	LD	HL,(?0011+182)
	INC	HL
	PUSH	HL
	PUSH	IX
	POP	HL
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1245.	            chan->ix27 = Ptr;
	LD	HL,(?0011+182)
	LD	(IX+12),L
	LD	(IX+13),H
; 1246.	            SQT_Call_LC2A8(info, chan, val & 31);
	AND	31
	LD	C,A
	PUSH	BC
	PUSH	IX
	POP	BC
	PUSH	IY
	POP	DE
	LD	A,BYTE3 SQT_Call_LC2A8
	LD	HL,LWRD SQT_Call_LC2A8
?1015:
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
?1013:
	POP	HL
; 1247.	            break;
?0435:
; 1248.	        }
; 1249.	    }
; 1250.	}
?0402:
?0436:
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 1251.	
; 1252.	void SQT_GetRegisters(AYSongInfo * info, SQT_Channel_Parameters * chan, unsigned char * TempMixer)
; 1253.	{
SQT_GetRegisters:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
; 1254.	    unsigned char noise;
; 1255.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+186),HL
; 1256.	    unsigned char j, b0, b1;
; 1257.	    (*TempMixer) = (*TempMixer) << 1;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	SLA	(HL)
; 1258.	    if(chan->Enabled)
	LD	HL,25
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	Z,?0438
?0437:
; 1259.	    {
; 1260.	        b0 = module[chan->Point_In_Sample];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,(?0011+186)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+189),A
; 1261.	        chan->Amplitude = b0 & 15;
	AND	15
	LD	(IX+15),A
; 1262.	        if(chan->Amplitude != 0)
	LD	A,(IX+15)
	OR	A
	JR	Z,?0440
?0439:
; 1263.	        {
; 1264.	            chan->Amplitude -= chan->Volume;
	LD	HL,15
	PUSH	IX
	POP	BC
	ADD	HL,BC
	PUSH	HL
	LD	HL,14
	ADD	HL,BC
	LD	D,(HL)
	POP	HL
	LD	A,(HL)
	SUB	D
	LD	(HL),A
; 1265.	            if((signed char)(chan->Amplitude) < 0)
	LD	HL,15
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0445
?0441:
; 1266.	                chan->Amplitude = 0;
	LD	(IX+15),0
?0442:
	JR	?0445
?0440:
; 1267.	        }
; 1268.	        else if(chan->Envelope_Enabled)
	LD	A,(IX+26)
	OR	A
	JR	Z,?0445
?0444:
; 1269.	            chan->Amplitude = 16;
	LD	(IX+15),16
?0445:
?0443:
; 1270.	        b1 = module[chan->Point_In_Sample + 1];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,(?0011+186)
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	LD	(?0011+190),A
; 1271.	        if((b1 & 32) != 0)
	BIT	5,A
	JR	Z,?0447
?0446:
; 1272.	        {
; 1273.	            (*TempMixer) |= 8;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	SET	3,(HL)
; 1274.	            noise = (b0 & 0xf0) >> 3;
	LD	A,(?0011+189)
	AND	240
	RRA
	RRA
	RRA
	AND	31
	LD	(?0011+185),A
; 1275.	            if((signed char)(b1) < 0)
	LD	A,(?0011+190)
	OR	A
	JP	P,?0449
?0448:
; 1276.	                noise++;
	LD	HL,?0011+185
	INC	(HL)
?0449:
; 1277.	            ay_writeay(AY_NOISE_PERIOD, noise);
	LD	BC,(?0011+185)
	LD	E,6
	CALL	LWRD ?1200
?0447:
; 1278.	        }
; 1279.	        if((b1 & 64) != 0)
	LD	A,(?0011+190)
	BIT	6,A
	JR	Z,?0451
?0450:
; 1280.	        {
; 1281.	            (*TempMixer) |= 1;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	SET	0,(HL)
?0451:
; 1282.	        }
; 1283.	        j = chan->Note;
	LD	A,(IX+16)
	LD	(?0011+188),A
; 1284.	        if(chan->Ornament_Enabled)
	LD	A,(IX+27)
	OR	A
	JR	Z,?1033
?0452:
; 1285.	        {
; 1286.	            j += module[chan->Point_In_Ornament];
	LD	L,(IX+8)
	LD	H,(IX+9)
	LD	BC,(?0011+186)
	ADD	HL,BC
	LD	A,(?0011+188)
	ADD	A,(HL)
	LD	(?0011+188),A
; 1287.	            chan->Ornament_Tik_Counter--;
	DEC	(IX+23)
; 1288.	            if(chan->Ornament_Tik_Counter == 0)
	LD	A,(IX+23)
	OR	A
	JR	NZ,?0455
?0454:
; 1289.	            {
; 1290.	                if(module[chan->OrnamentPointer] != 32)
	LD	L,(IX+6)
	LD	H,(IX+7)
	ADD	HL,BC
	LD	A,(HL)
	CP	32
	JR	Z,?0457
?0456:
; 1291.	                {
; 1292.	                    chan->Ornament_Tik_Counter = module[chan->OrnamentPointer + 1];
	LD	L,(IX+6)
	LD	H,(IX+7)
	ADD	HL,BC
	INC	HL
	LD	D,(HL)
	LD	(IX+23),D
; 1293.	                    chan->Point_In_Ornament = chan->OrnamentPointer + 2 + module[chan->OrnamentPointer];
	LD	L,(IX+6)
	LD	H,(IX+7)
	JR	?1035
; 1294.	                }
; 1295.	                else
?0457:
; 1296.	                {
; 1297.	                    chan->Ornament_Tik_Counter = module[chan->SamplePointer + 1];
	LD	L,(IX+2)
	LD	H,(IX+3)
	ADD	HL,BC
	INC	HL
	LD	D,(HL)
	LD	(IX+23),D
; 1298.	                    chan->Point_In_Ornament = chan->OrnamentPointer + 2 + module[chan->SamplePointer];
	LD	L,(IX+2)
	LD	H,(IX+3)
?1035:
	ADD	HL,BC
	LD	C,(HL)
	LD	B,0
	LD	L,(IX+6)
	LD	H,(IX+7)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	(IX+8),L
	LD	(IX+9),H
?0458:
; 1299.	                }
; 1300.	            }
; 1301.	            else
	JR	?1033
?0455:
; 1302.	                chan->Point_In_Ornament++;
	INC	(IX+8)
	JR	NZ,?1033
	INC	(IX+9)
?1033:
?0459:
?0453:
; 1303.	        }
; 1304.	        j += chan->Transposit;
	LD	A,(?0011+188)
	ADD	A,(IX+24)
	LD	(?0011+188),A
; 1305.	        if(j > 0x5f)
	LD	B,A
	LD	A,95
	CP	B
	JR	NC,?0461
?0460:
; 1306.	            j = 0x5f;
	LD	(?0011+188),A
?0461:
; 1307.	        if((b1 & 16) == 0)
	LD	A,(?0011+190)
	BIT	4,A
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,(?0011+186)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,0
	JR	NZ,?0463
?0462:
; 1308.	            chan->Ton = SQT_Table[j] - (((unsigned short)(b1 & 15) << 8) + module[chan->Point_In_Sample + 2]);
	AND	15
	LD	D,A
	LD	E,B
	LD	L,C
	LD	H,B
	ADD	HL,DE
	LD	C,L
	LD	B,H
	LD	HL,(?0011+188)
	LD	H,E
	ADD	HL,HL
	LD	DE,SQT_Table
	ADD	HL,DE
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	AND	A
	SBC	HL,BC
	JR	?1036
; 1309.	        else
?0463:
; 1310.	            chan->Ton = SQT_Table[j] + (((unsigned short)(b1 & 15) << 8) + module[chan->Point_In_Sample + 2]);
	AND	15
	LD	D,A
	LD	E,B
	LD	L,C
	LD	H,B
	ADD	HL,DE
	PUSH	HL
	LD	HL,(?0011+188)
	LD	H,B
	ADD	HL,HL
	LD	BC,SQT_Table
	ADD	HL,BC
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	POP	HL
	ADD	HL,BC
?1036:
	LD	(IX+10),L
	LD	(IX+11),H
?0464:
; 1311.	        chan->Sample_Tik_Counter--;
	DEC	(IX+22)
; 1312.	        if(chan->Sample_Tik_Counter == 0)
	LD	A,(IX+22)
	OR	A
	JR	NZ,?0466
?0465:
; 1313.	        {
; 1314.	            chan->Sample_Tik_Counter = module[chan->SamplePointer + 1];
	LD	L,(IX+2)
	LD	H,(IX+3)
	LD	BC,(?0011+186)
	ADD	HL,BC
	INC	HL
	LD	D,(HL)
	LD	(IX+22),D
; 1315.	            if(module[chan->SamplePointer] == 32)
	LD	L,(IX+2)
	LD	H,(IX+3)
	ADD	HL,BC
	LD	A,(HL)
	CP	32
	JR	NZ,?0468
?0467:
; 1316.	            {
; 1317.	                chan->Enabled = false;
	LD	(IX+25),0
; 1318.	                chan->Ornament_Enabled = false;
	LD	(IX+27),0
?0468:
; 1319.	            }
; 1320.	            chan->Point_In_Sample = chan->SamplePointer + 2 + module[chan->SamplePointer] * 3;
	LD	L,(IX+2)
	LD	H,(IX+3)
	ADD	HL,BC
	LD	L,(HL)
	LD	C,L
	LD	H,0
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	LD	C,(IX+2)
	LD	B,(IX+3)
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	(IX+4),L
	LD	(IX+5),H
; 1321.	        }
; 1322.	        else
	JR	?1034
?0466:
; 1323.	            chan->Point_In_Sample += 3;
	LD	HL,4
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,3
	LD	(HL),A
	JR	NC,?1034
	INC	HL
	INC	(HL)
?1034:
?0469:
; 1324.	        if(chan->Gliss)
	LD	A,(IX+28)
	OR	A
	JR	Z,?0471
?0470:
; 1325.	        {
; 1326.	            chan->Ton += chan->Current_Ton_Sliding;
	LD	HL,10
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,(IX+20)
	LD	(HL),A
	INC	HL
	LD	A,(HL)
	ADC	A,(IX+21)
	LD	(HL),A
; 1327.	            chan->Current_Ton_Sliding += chan->Ton_Slide_Step;
	LD	HL,18
	ADD	HL,BC
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	LD	HL,20
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,E
	LD	(HL),A
	INC	HL
	LD	A,(HL)
	ADC	A,D
	LD	(HL),A
?0471:
; 1328.	        }
; 1329.	        chan->Ton = chan->Ton & 0xfff;
	LD	A,(IX+11)
	AND	15
	LD	(IX+11),A
; 1330.	    }
; 1331.	    else
	JR	?0472
?0438:
; 1332.	        chan->Amplitude = 0;
	LD	(IX+15),A
?0472:
; 1333.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 1334.	
; 1335.	void SQT_Play(AYSongInfo * info)
; 1336.	{
SQT_Play:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 1337.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+191),HL
; 1338.	    SQT_File *header = (SQT_File *)module;
	LD	(?0011+193),HL
; 1339.	    unsigned char TempMixer;
; 1340.	
; 1341.	    
; 1342.	    // return;
; 1343.	
; 1344.	    if(--SQT.DelayCounter == 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	DEC	(HL)
	LD	B,(HL)
	INC	B
	DEC	B
	JP	NZ,?0474
?0473:
; 1345.	    {
; 1346.	        SQT.DelayCounter = SQT.Delay;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	B,(HL)
	POP	HL
	LD	(HL),B
; 1347.	        if(--SQT.Lines_Counter == 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	DEC	(HL)
	LD	B,(HL)
	INC	B
	DEC	B
	JP	NZ,?1055
?0475:
; 1348.	        {
; 1349.	            if(module[SQT.Positions_Pointer] == 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0478
?0477:
; 1350.	                SQT.Positions_Pointer = SQT_LoopPointer;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,10
	LD	BC,(?0011+193)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,A
	LD	HL,11
	ADD	HL,BC
	LD	B,(HL)
	LD	C,E
	LD	A,D
	OR	B
	LD	B,A
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
?0478:
; 1351.	            if((signed char)(module[SQT.Positions_Pointer]) < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,104
	ADD	HL,BC
	JP	P,?0480
?0479:
; 1352.	                SQT_C.b4ix0 = true;
	LD	(HL),1
; 1353.	            else
	JR	?0481
?0480:
; 1354.	                SQT_C.b4ix0 = false;
	LD	(HL),B
?0481:
; 1355.	            SQT_C.Address_In_Pattern = ay_sys_getword(&module[(unsigned char)(module[SQT.Positions_Pointer] * 2) + SQT_PatternsPointer]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,73
	ADD	HL,BC
	PUSH	HL
	LD	HL,6
	LD	BC,(?0011+193)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,7
	ADD	HL,BC
	LD	B,(HL)
	LD	L,A
	LD	A,D
	OR	B
	LD	H,A
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,A
	LD	E,A
	POP	HL
	ADD	HL,DE
	ADD	HL,BC
	CALL	LWRD ?1184
	EX	DE,HL
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1356.	            SQT.Lines_Counter = module[SQT_C.Address_In_Pattern];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,73
	ADD	HL,BC
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	D,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	(HL),D
; 1357.	            SQT_C.Address_In_Pattern++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,73
	ADD	HL,DE
	INC	(HL)
	INC	HL
	JR	NZ,?1048
	INC	(HL)
?1048:
; 1358.	            SQT.Positions_Pointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1049
	INC	(HL)
?1049:
; 1359.	            SQT_C.Volume = module[SQT.Positions_Pointer] & 15;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	ADD	HL,BC
	LD	A,(HL)
	AND	15
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,87
	ADD	HL,DE
	LD	(HL),A
; 1360.	            if((module[SQT.Positions_Pointer] >> 4) < 9)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	ADD	HL,BC
	LD	A,(HL)
	RRA
	RRA
	RRA
	RRA
	AND	15
	CP	9
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	JR	NC,?0483
?0482:
; 1361.	                SQT_C.Transposit = module[SQT.Positions_Pointer] >> 4;
	ADD	HL,BC
	LD	A,(HL)
	RRA
	RRA
	RRA
	RRA
	AND	15
	JR	?1056
; 1362.	            else
?0483:
; 1363.	                SQT_C.Transposit = -((module[SQT.Positions_Pointer] >> 4) - 9) - 1;
	ADD	HL,BC
	LD	A,(HL)
	RRA
	RRA
	RRA
	RRA
	AND	15
	ADD	A,247
	CPL
?1056:
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,97
	ADD	HL,BC
	LD	(HL),A
?0484:
; 1364.	            SQT.Positions_Pointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1050
	INC	(HL)
?1050:
; 1365.	            SQT_C.ix21 = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,90
	ADD	HL,BC
	LD	(HL),B
; 1366.	
; 1367.	            if(module[SQT.Positions_Pointer] == 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0486
?0485:
; 1368.	                SQT.Positions_Pointer = SQT_LoopPointer;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,10
	LD	BC,(?0011+193)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,A
	LD	HL,11
	ADD	HL,BC
	LD	B,(HL)
	LD	C,E
	LD	A,D
	OR	B
	LD	B,A
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
?0486:
; 1369.	            if((signed char)(module[SQT.Positions_Pointer]) < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,70
	ADD	HL,BC
	JP	P,?0488
?0487:
; 1370.	                SQT_B.b4ix0 = true;
	LD	(HL),1
; 1371.	            else
	JR	?0489
?0488:
; 1372.	                SQT_B.b4ix0 = false;
	LD	(HL),B
?0489:
; 1373.	            SQT_B.Address_In_Pattern = ay_sys_getword(&module[(unsigned char)(module[SQT.Positions_Pointer] * 2) + SQT_PatternsPointer]) + 1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,39
	ADD	HL,BC
	PUSH	HL
	LD	HL,6
	LD	BC,(?0011+193)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,7
	ADD	HL,BC
	LD	B,(HL)
	LD	L,A
	LD	A,D
	OR	B
	LD	H,A
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,A
	LD	E,A
	POP	HL
	ADD	HL,DE
	ADD	HL,BC
	CALL	LWRD ?1184
	EX	DE,HL
	INC	DE
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1374.	            SQT.Positions_Pointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1051
	INC	(HL)
?1051:
; 1375.	            SQT_B.Volume = module[SQT.Positions_Pointer] & 15;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	A,(HL)
	AND	15
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,53
	ADD	HL,DE
	LD	(HL),A
; 1376.	            if((module[SQT.Positions_Pointer] >> 4) < 9)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	ADD	HL,BC
	LD	A,(HL)
	RRA
	RRA
	RRA
	RRA
	AND	15
	CP	9
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	JR	NC,?0491
?0490:
; 1377.	                SQT_B.Transposit = module[SQT.Positions_Pointer] >> 4;
	ADD	HL,BC
	LD	A,(HL)
	RRA
	RRA
	RRA
	RRA
	AND	15
	JR	?1057
; 1378.	            else
?0491:
; 1379.	                SQT_B.Transposit = -((module[SQT.Positions_Pointer] >> 4) - 9) - 1;
	ADD	HL,BC
	LD	A,(HL)
	RRA
	RRA
	RRA
	RRA
	AND	15
	ADD	A,247
	CPL
?1057:
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,63
	ADD	HL,BC
	LD	(HL),A
?0492:
; 1380.	            SQT.Positions_Pointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1052
	INC	(HL)
?1052:
; 1381.	            SQT_B.ix21 = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,56
	ADD	HL,BC
	LD	(HL),B
; 1382.	
; 1383.	            if(module[SQT.Positions_Pointer] == 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0494
?0493:
; 1384.	                SQT.Positions_Pointer = SQT_LoopPointer;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,10
	LD	BC,(?0011+193)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,A
	LD	HL,11
	ADD	HL,BC
	LD	B,(HL)
	LD	C,E
	LD	A,D
	OR	B
	LD	B,A
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
?0494:
; 1385.	            if((signed char)(module[SQT.Positions_Pointer]) < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,36
	ADD	HL,BC
	JP	P,?0496
?0495:
; 1386.	                SQT_A.b4ix0 = true;
	LD	(HL),1
; 1387.	            else
	JR	?0497
?0496:
; 1388.	                SQT_A.b4ix0 = false;
	LD	(HL),B
?0497:
; 1389.	            SQT_A.Address_In_Pattern = ay_sys_getword(&module[(unsigned char)(module[SQT.Positions_Pointer] * 2) + SQT_PatternsPointer]) + 1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,5
	ADD	HL,BC
	PUSH	HL
	LD	HL,6
	LD	BC,(?0011+193)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,7
	ADD	HL,BC
	LD	B,(HL)
	LD	L,A
	LD	A,D
	OR	B
	LD	H,A
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,A
	LD	E,A
	POP	HL
	ADD	HL,DE
	ADD	HL,BC
	CALL	LWRD ?1184
	EX	DE,HL
	INC	DE
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1390.	            SQT.Positions_Pointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1053
	INC	(HL)
?1053:
; 1391.	            SQT_A.Volume = module[SQT.Positions_Pointer] & 15;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	A,(HL)
	AND	15
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,19
	ADD	HL,DE
	LD	(HL),A
; 1392.	            if((module[SQT.Positions_Pointer] >> 4) < 9)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	ADD	HL,BC
	LD	A,(HL)
	RRA
	RRA
	RRA
	RRA
	AND	15
	CP	9
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	JR	NC,?0499
?0498:
; 1393.	                SQT_A.Transposit = module[SQT.Positions_Pointer] >> 4;
	ADD	HL,BC
	LD	A,(HL)
	RRA
	RRA
	RRA
	RRA
	AND	15
	JR	?1058
; 1394.	            else
?0499:
; 1395.	                SQT_A.Transposit = -((module[SQT.Positions_Pointer] >> 4) - 9) - 1;
	ADD	HL,BC
	LD	A,(HL)
	RRA
	RRA
	RRA
	RRA
	AND	15
	ADD	A,247
	CPL
?1058:
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,29
	ADD	HL,BC
	LD	(HL),A
?0500:
; 1396.	            SQT.Positions_Pointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1054
	INC	(HL)
?1054:
; 1397.	            SQT_A.ix21 = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,22
	ADD	HL,BC
	LD	(HL),B
; 1398.	
; 1399.	            SQT.Delay = module[SQT.Positions_Pointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0011+191)
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	(HL),B
; 1400.	            SQT.DelayCounter = SQT.Delay;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	B,(HL)
	POP	HL
	LD	(HL),B
; 1401.	            SQT.Positions_Pointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1055
	INC	(HL)
?1055:
?0476:
; 1402.	        }
; 1403.	        SQT_PatternInterpreter(info, &SQT_C);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,73
	CALL	LWRD ?1202
; 1404.	        SQT_PatternInterpreter(info, &SQT_B);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,39
	CALL	LWRD ?1202
; 1405.	        SQT_PatternInterpreter(info, &SQT_A);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,5
	CALL	LWRD ?1202
?0474:
; 1406.	    }
; 1407.	
; 1408.	    TempMixer = 0;
	XOR	A
	LD	(?0011+195),A
; 1409.	    SQT_GetRegisters(info, &SQT_C, &TempMixer);
	LD	HL,?0011+195
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,73
	CALL	LWRD ?1205
	POP	HL
; 1410.	    SQT_GetRegisters(info, &SQT_B, &TempMixer);
	LD	HL,?0011+195
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,39
	CALL	LWRD ?1205
	POP	HL
; 1411.	    SQT_GetRegisters(info, &SQT_A, &TempMixer);
	LD	HL,?0011+195
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,5
	CALL	LWRD ?1205
	POP	HL
; 1412.	    TempMixer = (-(TempMixer + 1)) & 0x3f;
	LD	A,(?0011+195)
	LD	B,A
	LD	A,255
	SUB	B
	AND	63
	LD	(?0011+195),A
; 1413.	
; 1414.	    if(!SQT_A.MixNoise)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,34
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0502
?0501:
; 1415.	        TempMixer |= 8;
	LD	HL,?0011+195
	SET	3,(HL)
?0502:
; 1416.	    if(!SQT_A.MixTon)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0504
?0503:
; 1417.	        TempMixer |= 1;
	LD	HL,?0011+195
	SET	0,(HL)
?0504:
; 1418.	
; 1419.	    if(!SQT_B.MixNoise)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,68
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0506
?0505:
; 1420.	        TempMixer |= 16;
	LD	HL,?0011+195
	SET	4,(HL)
?0506:
; 1421.	    if(!SQT_B.MixTon)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0508
?0507:
; 1422.	        TempMixer |= 2;
	LD	HL,?0011+195
	SET	1,(HL)
?0508:
; 1423.	
; 1424.	    if(!SQT_C.MixNoise)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,102
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0510
?0509:
; 1425.	        TempMixer |= 32;
	LD	HL,?0011+195
	SET	5,(HL)
?0510:
; 1426.	    if(!SQT_C.MixTon)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0512
?0511:
; 1427.	        TempMixer |= 4;
	LD	HL,?0011+195
	SET	2,(HL)
?0512:
; 1428.	
; 1429.	    ay_writeay(AY_MIXER, TempMixer);
	LD	BC,(?0011+195)
	LD	E,7
	CALL	LWRD ?1193
; 1430.	    ay_writeay(AY_CHNL_A_FINE, SQT_A.Ton & 0xff);
	LD	C,(HL)
	LD	E,B
	CALL	LWRD ?1193
; 1431.	    ay_writeay(AY_CHNL_A_COARSE, (SQT_A.Ton >> 8) & 0xf);
	INC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	E,1
	CALL	LWRD ?1194
; 1432.	    ay_writeay(AY_CHNL_B_FINE, SQT_B.Ton & 0xff);
	LD	C,(HL)
	LD	E,2
	CALL	LWRD ?1194
; 1433.	    ay_writeay(AY_CHNL_B_COARSE, (SQT_B.Ton >> 8) & 0xf);
	INC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	E,3
	CALL	LWRD ?1196
; 1434.	    ay_writeay(AY_CHNL_C_FINE, SQT_C.Ton & 0xff);
	ADD	HL,BC
	LD	C,(HL)
	LD	E,4
	CALL	LWRD ?1196
; 1435.	    ay_writeay(AY_CHNL_C_COARSE, (SQT_C.Ton >> 8) & 0xf);
	CALL	LWRD ?1189
; 1436.	    ay_writeay(AY_CHNL_A_VOL, SQT_A.Amplitude);
	CALL	LWRD ?1197
; 1437.	    ay_writeay(AY_CHNL_B_VOL, SQT_B.Amplitude);
	LD	BC,54
	CALL	LWRD ?1198
; 1438.	    ay_writeay(AY_CHNL_C_VOL, SQT_C.Amplitude);
	LD	BC,88
	JP	LWRD ?1175
?1202:
	ADD	HL,BC
	LD	C,L
	LD	B,H
	PUSH	IX
	POP	DE
	LD	A,BYTE3 SQT_PatternInterpreter
	LD	HL,LWRD SQT_PatternInterpreter
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
?1205:
	ADD	HL,BC
	LD	C,L
	LD	B,H
	PUSH	IX
	POP	DE
	LD	A,BYTE3 SQT_GetRegisters
	LD	HL,LWRD SQT_GetRegisters
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 1439.	}
; 1440.	
; 1441.	
; 1442.	
; 1443.	
; 1444.	void SQT_GetChannelInfo(AYSongInfo * info, unsigned char * new_b,  char * new_a1, unsigned short * new_j1, unsigned short * new_cptr, bool * new_f71, bool * new_f61, bool * new_f41, unsigned short * new_j22, unsigned char chnl_num)
; 1445.	{
SQT_GetChannelInfo:
	PUSH	IY
	EXX
	PUSH	BC
	PUSH	DE
	EXX
	PUSH	IX
	LD	IX,0
	ADD	IX,SP
	PUSH	DE
	PUSH	BC
	EXX
	POP	BC
	LD	E,(IX+22)
	LD	D,(IX+23)
	EXX
	LD	L,(IX+16)
	LD	H,(IX+17)
	PUSH	HL
	POP	IY
; 1446.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+196),HL
; 1447.	    unsigned char va1, va2, va3, va4;
; 1448.	   
; 1449.	    char a = 0;
	XOR	A
	LD	(?0011+202),A
; 1450.	    
; 1451.	   
; 1452.	    //gotoxy (5, 5);
; 1453.	   
; 1454.	    if(*new_a1 != 0)
	LD	L,(IX+12)
	LD	H,(IX+13)
	OR	(HL)
	JP	Z,?0514
?0513:
; 1455.	    {
; 1456.	        (*new_a1) --;
	DEC	(HL)
; 1457.	        
; 1458.	        //printf ("01");
; 1459.	        
; 1460.	        if(*new_f71)
	LD	L,(IX+18)
	LD	H,(IX+19)
	XOR	A
	OR	(HL)
	JP	Z,?0557
?0515:
; 1461.	        {
; 1462.	            *new_cptr = *new_j22;
	LD	L,(IX+24)
	LD	H,(IX+25)
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	PUSH	HL
	PUSH	IY
	POP	HL
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1463.	            *new_f61 = false;
	LD	L,(IX+20)
	LD	H,(IX+21)
	LD	(HL),0
; 1464.	            if(module[*new_cptr] <= 0x7f)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,127
	CP	(HL)
	JP	C,?0557
?0517:
; 1465.	            {
; 1466.	                (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1059
	INC	(HL)
?1059:
; 1467.	                va1 = module[*new_cptr];
	LD	L,(IY+0)
	LD	H,(IY+1)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+198),A
; 1468.	                if(va1 <= 0x7f)
	LD	B,A
	LD	A,127
	CP	B
	JP	C,?0520
?0519:
; 1469.	                {
; 1470.	                    (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1060
	INC	(HL)
?1060:
; 1471.	                    if(*new_f61)
	LD	L,(IX+20)
	LD	H,(IX+21)
	XOR	A
	OR	(HL)
	JR	Z,?0522
?0521:
; 1472.	                        *new_j1 = *new_cptr + 1;
	LD	L,(IY+0)
	LD	H,(IY+1)
	INC	HL
	PUSH	HL
	LD	L,(IX+14)
	LD	H,(IX+15)
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
?0522:
; 1473.	                    switch(module[*new_cptr - 1] - 1)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	DEC	HL
	LD	C,(HL)
	LD	B,0
	DEC	BC
	LD	A,4
	XOR	C
	OR	B
	JR	NZ,?0529
?0524:
; 1474.	                    {
; 1475.	                        case 4:
; 1476.	                            if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JP	Z,?0557
?0525:
; 1477.	                            {
; 1478.	                                *new_b = module[*new_cptr] & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	AND	31
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),A
; 1479.	                                if(*new_b == 0)
	XOR	A
	OR	(HL)
	JP	NZ,?0557
?0527:
; 1480.	                                    *new_b = 32;
	JP	LWRD ?1092
?0528:
?0526:
; 1481.	                            }
; 1482.	                            break;
?0529:
	LD	A,5
	XOR	C
	OR	B
	JP	NZ,?0557
; 1483.	                        case 5:
; 1484.	                            if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JP	Z,?0557
?0530:
; 1485.	                            {
; 1486.	                                *new_b = (*new_b + module[*new_cptr]) & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	PUSH	HL
	EXX
	PUSH	BC
	EXX
	POP	HL
	POP	BC
	LD	A,(BC)
	ADD	A,(HL)
	AND	31
	LD	(HL),A
; 1487.	                                if(*new_b == 0)
	XOR	A
	OR	(HL)
	JP	NZ,?0557
?0532:
; 1488.	                                    *new_b = 32;
	JP	LWRD ?1092
?0533:
?0531:
; 1489.	                            }
; 1490.	                            break;
?0534:
; 1491.	                        default:
; 1492.	                            break;
?0523:
?0520:
; 1493.	                    }
; 1494.	                }
; 1495.	                else if(va1 >= 0x80)
	LD	A,B
	CP	128
	JP	C,?0557
?0536:
; 1496.	                {
; 1497.	                    if((va1 & 64) != 0)
	BIT	6,A
	JP	Z,?0557
?0538:
; 1498.	                    {
; 1499.	                        (*new_cptr)++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1061
	INC	(HL)
?1061:
; 1500.	                        if((module[*new_cptr] & 15) != 0)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	AND	15
	JP	Z,?0557
?0540:
; 1501.	                        {
; 1502.	                            (*new_cptr)++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1062
	INC	(HL)
?1062:
; 1503.	                            if(*new_f61)
	LD	L,(IX+20)
	LD	H,(IX+21)
	XOR	A
	OR	(HL)
	JR	Z,?0543
?0542:
; 1504.	                                *new_j1 = *new_cptr + 1;
	LD	L,(IY+0)
	LD	H,(IY+1)
	INC	HL
	PUSH	HL
	LD	L,(IX+14)
	LD	H,(IX+15)
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
?0543:
; 1505.	                            switch((module[*new_cptr - 1] & 15) - 1)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	DEC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	B,0
	DEC	BC
	LD	A,4
	XOR	C
	OR	B
	JR	NZ,?0550
?0545:
; 1506.	                            {
; 1507.	                                case 4:
; 1508.	                                    if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JP	Z,?0557
?0546:
; 1509.	                                    {
; 1510.	                                        *new_b = module[*new_cptr] & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	AND	31
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),A
; 1511.	                                        if(*new_b == 0)
	XOR	A
	OR	(HL)
	JP	NZ,?0557
?0548:
; 1512.	                                            *new_b = 32;
	JP	LWRD ?1092
?0549:
?0547:
; 1513.	                                    }
; 1514.	                                    break;
?0550:
	LD	A,5
	XOR	C
	OR	B
	JP	NZ,?0557
; 1515.	                                case 5:
; 1516.	                                    if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JP	Z,?0557
?0551:
; 1517.	                                    {
; 1518.	                                        *new_b = (*new_b + module[*new_cptr]) & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	PUSH	HL
	EXX
	PUSH	BC
	EXX
	POP	HL
	POP	BC
	LD	A,(BC)
	ADD	A,(HL)
	AND	31
	LD	(HL),A
; 1519.	                                        if(*new_b == 0)
	XOR	A
	OR	(HL)
	JP	NZ,?0557
?0553:
; 1520.	                                            *new_b = 32;
	JP	LWRD ?1092
?0554:
?0552:
; 1521.	                                    }
; 1522.	                                    break;
?0555:
; 1523.	                                default:
; 1524.	                                    break;
?0544:
?0541:
?0539:
?0537:
?0535:
?0518:
?0516:
; 1525.	                            }
; 1526.	                        }
; 1527.	                    }
; 1528.	                }
; 1529.	            }
; 1530.	        }
; 1531.	    }
; 1532.	    else
?0514:
; 1533.	    {
; 1534.	     //printf ("02");
; 1535.	    
; 1536.	        *new_cptr = *new_j1;
	LD	L,(IX+14)
	LD	H,(IX+15)
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	PUSH	HL
	PUSH	IY
	POP	HL
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1537.	        *new_f61 = true;
	LD	L,(IX+20)
	LD	H,(IX+21)
	LD	(HL),1
; 1538.	        *new_f71 = false;
	LD	L,(IX+18)
	LD	H,(IX+19)
	LD	(HL),A
?0558:
; 1539.	        while(true)
?0559:
; 1540.	        {
; 1541.	            va2 = module[*new_cptr];
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+199),A
; 1542.	            
; 1543.	           // gotoxy (20, 5);
; 1544.	            //printf ("%05d %02x %d  ", *new_cptr, va2, a++);
; 1545.	            
; 1546.	            if(va2 <= 0x5f)
	LD	B,A
	LD	A,95
	CP	B
	JP	C,?0561
?0560:
; 1547.	            {
; 1548.	                *new_j22 = *new_cptr;
	LD	L,(IY+0)
	LD	H,(IY+1)
	PUSH	HL
	LD	L,(IX+24)
	LD	H,(IX+25)
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1549.	                (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1063
	INC	(HL)
?1063:
; 1550.	                                
; 1551.	                
; 1552.	                va3 = module[*new_cptr];
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+200),A
; 1553.	                if(va3 <= 0x7f)
	LD	B,A
	LD	A,127
	CP	B
	JP	C,?0563
?0562:
; 1554.	                {
; 1555.	                    (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1064
	INC	(HL)
?1064:
; 1556.	                    if(*new_f61)
	LD	L,(IX+20)
	LD	H,(IX+21)
	XOR	A
	OR	(HL)
	JR	Z,?0565
?0564:
; 1557.	                    {
; 1558.	                        *new_j1 = *new_cptr + 1;
	LD	L,(IY+0)
	LD	H,(IY+1)
	INC	HL
	PUSH	HL
	LD	L,(IX+14)
	LD	H,(IX+15)
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1559.	                        *new_f61 = false;
	LD	L,(IX+20)
	LD	H,(IX+21)
	LD	(HL),0
?0565:
; 1560.	                    }
; 1561.	                    switch(module[*new_cptr - 1] - 1)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	DEC	HL
	LD	C,(HL)
	LD	B,0
	DEC	BC
	LD	A,4
	XOR	C
	OR	B
	JR	NZ,?0572
?0567:
; 1562.	                    {
; 1563.	                        case 4:
; 1564.	                            if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JP	Z,?0597
?0568:
; 1565.	                            {
; 1566.	                                *new_b = module[*new_cptr] & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	AND	31
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),A
; 1567.	                                if(*new_b == 0)
	XOR	A
	OR	(HL)
	JP	NZ,?0597
?0570:
; 1568.	                                    *new_b = 32;
	JP	LWRD ?1075
?0571:
?0569:
; 1569.	                            }
; 1570.	                            break;
?0572:
	LD	A,5
	XOR	C
	OR	B
	JP	NZ,?0597
; 1571.	                        case 5:
; 1572.	                            if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JP	Z,?0597
?0573:
; 1573.	                            {
; 1574.	                                *new_b = (*new_b + module[*new_cptr]) & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	PUSH	HL
	EXX
	PUSH	BC
	EXX
	POP	HL
	POP	BC
	LD	A,(BC)
	ADD	A,(HL)
	AND	31
	LD	(HL),A
; 1575.	                                if(*new_b == 0)
	XOR	A
	OR	(HL)
	JP	NZ,?0597
?0575:
; 1576.	                                    *new_b = 32;
	JP	LWRD ?1075
?0576:
?0574:
; 1577.	                            }
; 1578.	                            break;
?0577:
; 1579.	                        default:
; 1580.	                            break;
?0566:
?0563:
; 1581.	                    }
; 1582.	                }
; 1583.	                else if(va3 >= 0x80)
	LD	A,B
	CP	128
	JP	C,?0597
?0579:
; 1584.	                {
; 1585.	                    // printf ("03");
; 1586.	                
; 1587.	                    if((module[*new_cptr] & 64) != 0)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	BIT	6,(HL)
	JP	Z,?0597
?0581:
; 1588.	                    {
; 1589.	                        (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1065
	INC	(HL)
?1065:
; 1590.	                        if((module[*new_cptr] & 15) != 0)
	LD	L,(IY+0)
	LD	H,(IY+1)
	ADD	HL,BC
	LD	A,(HL)
	AND	15
	JP	Z,?0597
?0583:
; 1591.	                        {
; 1592.	                            (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1066
	INC	(HL)
?1066:
; 1593.	                            if(*new_f61)
	LD	L,(IX+20)
	LD	H,(IX+21)
	XOR	A
	OR	(HL)
	JR	Z,?0586
?0585:
; 1594.	                            {
; 1595.	                                *new_j1 = *new_cptr + 1;
	LD	L,(IY+0)
	LD	H,(IY+1)
	INC	HL
	PUSH	HL
	LD	L,(IX+14)
	LD	H,(IX+15)
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1596.	                                *new_f61 = false;
	LD	L,(IX+20)
	LD	H,(IX+21)
	LD	(HL),0
?0586:
; 1597.	                            }
; 1598.	                            switch((module[*new_cptr - 1] & 15) - 1)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	DEC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	B,0
	DEC	BC
	LD	A,4
	XOR	C
	OR	B
	JR	NZ,?0593
?0588:
; 1599.	                            {
; 1600.	                                case 4:
; 1601.	                                    if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JR	Z,?0597
?0589:
; 1602.	                                    {
; 1603.	                                        *new_b = module[*new_cptr] & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	AND	31
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),A
; 1604.	                                        if(*new_b == 0)
	XOR	A
	OR	(HL)
	JR	NZ,?0597
?0591:
; 1605.	                                            *new_b = 32;
	JR	?1075
?0592:
?0590:
; 1606.	                                    }
; 1607.	                                    break;
?0593:
	LD	A,5
	XOR	C
	OR	B
	JR	NZ,?0597
; 1608.	                                case 5:
; 1609.	                                    if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JR	Z,?0597
?0594:
; 1610.	                                    {
; 1611.	                                        *new_b = (*new_b + module[*new_cptr]) & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	PUSH	HL
	EXX
	PUSH	BC
	EXX
	POP	HL
	POP	BC
	LD	A,(BC)
	ADD	A,(HL)
	AND	31
	LD	(HL),A
; 1612.	                                        if(*new_b == 0)
	XOR	A
	OR	(HL)
	JR	NZ,?0597
?0596:
; 1613.	                                            *new_b = 32;
?1075:
	LD	(HL),32
?0597:
?0595:
; 1614.	                                    }
; 1615.	                                    break;
?0598:
; 1616.	                                default:
; 1617.	                                    break;
?0587:
?0584:
?0582:
?0580:
?0578:
; 1618.	                            }
; 1619.	
; 1620.	                        }
; 1621.	                    }
; 1622.	                }
; 1623.	                (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1067
	INC	(HL)
?1067:
; 1624.	                if(*new_f61)
	LD	L,(IX+20)
	LD	H,(IX+21)
	XOR	A
	OR	(HL)
	JP	Z,?0557
?0599:
; 1625.	                    *new_j1 = *new_cptr;
	LD	L,(IY+0)
	LD	H,(IY+1)
	JP	LWRD ?1093
?0600:
; 1626.	                break;
?0561:
; 1627.	            }
; 1628.	            else if(va2 >= 0x60 && va2 <= 0x6e)
	LD	A,B
	CP	96
	JP	C,?0602
	LD	B,A
	LD	A,110
	CP	B
	JP	C,?0602
?0604:
?0603:
?0601:
; 1629.	            {
; 1630.	               // printf ("04");
; 1631.	            
; 1632.	                (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1068
	INC	(HL)
?1068:
; 1633.	                if(*new_f61)
	LD	L,(IX+20)
	LD	H,(IX+21)
	XOR	A
	OR	(HL)
	JR	Z,?0606
?0605:
; 1634.	                    *new_j1 = *new_cptr + 1;
	LD	L,(IY+0)
	LD	H,(IY+1)
	INC	HL
	PUSH	HL
	LD	L,(IX+14)
	LD	H,(IX+15)
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
?0606:
; 1635.	                switch(module[*new_cptr - 1] - 0x60 - 1)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	DEC	HL
	LD	C,(HL)
	LD	B,0
	LD	HL,65439
	ADD	HL,BC
	LD	C,L
	LD	B,H
	LD	A,4
	XOR	C
	OR	B
	JR	NZ,?0613
?0608:
; 1636.	                {
; 1637.	                    case 4:
; 1638.	                        if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JP	Z,?0557
?0609:
; 1639.	                        {
; 1640.	                            *new_b = module[*new_cptr] & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	AND	31
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),A
; 1641.	                            if(*new_b == 0)
	XOR	A
	OR	(HL)
	JP	NZ,?0557
?0611:
; 1642.	                                *new_b = 32;
	JP	LWRD ?1092
?0612:
?0610:
; 1643.	                        }
; 1644.	                        break;
?0613:
	LD	A,5
	XOR	C
	OR	B
	JP	NZ,?0557
; 1645.	                    case 5:
; 1646.	                        if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JP	Z,?0557
?0614:
; 1647.	                        {
; 1648.	                            *new_b = (*new_b + module[*new_cptr]) & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	PUSH	HL
	EXX
	PUSH	BC
	EXX
	POP	HL
	POP	BC
	LD	A,(BC)
	ADD	A,(HL)
	AND	31
	LD	(HL),A
; 1649.	                            if(*new_b == 0)
	XOR	A
	OR	(HL)
	JP	NZ,?0557
?0616:
; 1650.	                                *new_b = 32;
	JP	LWRD ?1092
?0617:
?0615:
; 1651.	                        }
; 1652.	                        break;
?0618:
; 1653.	                    default:
; 1654.	                        break;
?0607:
; 1655.	                }
; 1656.	                break;
?0602:
; 1657.	            }
; 1658.	            else if(va2 >= 0x6f && va2 <= 0x7f)
	LD	A,B
	CP	111
	JP	C,?0620
	LD	B,A
	LD	A,127
	CP	B
	JP	C,?0620
?0622:
?0621:
?0619:
; 1659.	            {
; 1660.	                // printf ("05");
; 1661.	            
; 1662.	                if(module[*new_cptr] != 0x6f)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	CP	111
	JP	Z,?0624
?0623:
; 1663.	                {
; 1664.	                    (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1069
	INC	(HL)
?1069:
; 1665.	                    if(*new_f61)
	LD	L,(IX+20)
	LD	H,(IX+21)
	XOR	A
	OR	(HL)
	JR	Z,?0626
?0625:
; 1666.	                        *new_j1 = *new_cptr + 1;
	LD	L,(IY+0)
	LD	H,(IY+1)
	INC	HL
	PUSH	HL
	LD	L,(IX+14)
	LD	H,(IX+15)
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
?0626:
; 1667.	                    switch(module[*new_cptr - 1] - 0x6f - 1)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	DEC	HL
	LD	C,(HL)
	LD	B,0
	LD	HL,65424
	ADD	HL,BC
	LD	C,L
	LD	B,H
	LD	A,4
	XOR	C
	OR	B
	JR	NZ,?0633
?0628:
; 1668.	                    {
; 1669.	                        case 4:
; 1670.	                            if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JP	Z,?0557
?0629:
; 1671.	                            {
; 1672.	                                *new_b = module[*new_cptr] & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	AND	31
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),A
; 1673.	                                if(*new_b == 0)
	XOR	A
	OR	(HL)
	JP	NZ,?0557
?0631:
; 1674.	                                    *new_b = 32;
	JP	LWRD ?1092
?0632:
?0630:
; 1675.	                            }
; 1676.	                            break;
?0633:
	LD	A,5
	XOR	C
	OR	B
	JP	NZ,?0557
; 1677.	                        case 5:
; 1678.	                            if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JP	Z,?0557
?0634:
; 1679.	                            {
; 1680.	                                *new_b = (*new_b + module[*new_cptr]) & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	PUSH	HL
	EXX
	PUSH	BC
	EXX
	POP	HL
	POP	BC
	LD	A,(BC)
	ADD	A,(HL)
	AND	31
	LD	(HL),A
; 1681.	                                if(*new_b == 0)
	XOR	A
	OR	(HL)
	JP	NZ,?0557
?0636:
; 1682.	                                    *new_b = 32;
	JP	LWRD ?1092
?0637:
?0635:
; 1683.	                            }
; 1684.	                            break;
?0638:
; 1685.	                        default:
; 1686.	                            break;
?0627:
; 1687.	                    }
; 1688.	                }
; 1689.	                else
?0624:
; 1690.	                    *new_j1 = *new_cptr + 1;
	LD	L,(IY+0)
	LD	H,(IY+1)
	INC	HL
?1093:
	PUSH	HL
	LD	L,(IX+14)
	LD	H,(IX+15)
	JP	LWRD ?1079
?0639:
; 1691.	                break;
?0620:
; 1692.	            }
; 1693.	            else if(va2 >= 0x80 && va2 <= 0xbf)
	LD	A,B
	CP	128
	JP	C,?0641
	LD	B,A
	LD	A,191
	CP	B
	JP	C,?0641
?0643:
?0642:
?0640:
; 1694.	            {
; 1695.	                 //printf ("06");
; 1696.	            
; 1697.	                *new_j1 = *new_cptr + 1;
	LD	L,(IY+0)
	LD	H,(IY+1)
	INC	HL
	PUSH	HL
	LD	L,(IX+14)
	LD	H,(IX+15)
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1698.	                if(chnl_num == 1)
	LD	B,(IX+26)
	DEC	B
	JR	NZ,?0645
?0644:
; 1699.	                {
; 1700.	                    if(va2 >= 0xa0)
	LD	A,(?0011+199)
	CP	160
	JR	C,?0662
?0646:
; 1701.	                    {
; 1702.	                        *new_a1 = module[*new_cptr] & 15;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	AND	15
	LD	L,(IX+12)
	LD	H,(IX+13)
	LD	(HL),A
; 1703.	                        if((module[*new_cptr] & 16) == 0)
	LD	L,(IY+0)
	LD	H,(IY+1)
	ADD	HL,BC
	BIT	4,(HL)
	JP	Z,?0557
?0648:
; 1704.	                            break;
?0649:
; 1705.	                        if(*new_a1 != 0)
	LD	L,(IX+12)
	LD	H,(IX+13)
	XOR	A
	OR	(HL)
	JR	Z,?0662
?0650:
; 1706.	                            *new_f71 = true;
	JR	?1078
?0651:
?0647:
?0645:
; 1707.	                    }
; 1708.	                }
; 1709.	                else if(chnl_num == 2 || chnl_num == 3)
	LD	B,(IX+26)
	DEC	B
	DEC	B
	JR	Z,?0655
	LD	A,(IX+26)
	CP	3
	JR	NZ,?0662
?0655:
?0656:
?0653:
; 1710.	                {
; 1711.	                   // printf ("07");
; 1712.	                
; 1713.	                    if(va2 > 0x9f)
	LD	A,(?0011+199)
	LD	B,A
	LD	A,159
	CP	B
	JR	NC,?0662
?0657:
; 1714.	                    {
; 1715.	                        *new_a1 = module[*new_cptr] & 15;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	AND	15
	LD	L,(IX+12)
	LD	H,(IX+13)
	LD	(HL),A
; 1716.	                        if((module[*new_cptr] & 16) == 0)
	LD	L,(IY+0)
	LD	H,(IY+1)
	ADD	HL,BC
	BIT	4,(HL)
	JP	Z,?0557
?0659:
; 1717.	                            break;
?0660:
; 1718.	                        if(*new_a1 != 0)
	LD	L,(IX+12)
	LD	H,(IX+13)
	XOR	A
	OR	(HL)
	JR	Z,?0662
?0661:
; 1719.	                            *new_f71 = true;
?1078:
	LD	L,(IX+18)
	LD	H,(IX+19)
	LD	(HL),1
?0662:
?0658:
?0654:
?0652:
; 1720.	                    }
; 1721.	                }
; 1722.	                *new_cptr = *new_j22;
	LD	L,(IX+24)
	LD	H,(IX+25)
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	PUSH	HL
	PUSH	IY
	POP	HL
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1723.	                *new_f61 = false;
	LD	L,(IX+20)
	LD	H,(IX+21)
	LD	(HL),0
; 1724.	                if(module[*new_cptr] <= 0x7f)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,127
	CP	(HL)
	JP	C,?0557
?0663:
; 1725.	                {
; 1726.	                    (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1070
	INC	(HL)
?1070:
; 1727.	                    va4 = module[*new_cptr];
	LD	L,(IY+0)
	LD	H,(IY+1)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+201),A
; 1728.	                    if(va4 <= 0x7f)
	LD	B,A
	LD	A,127
	CP	B
	JP	C,?0666
?0665:
; 1729.	                    {
; 1730.	                        (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1071
	INC	(HL)
?1071:
; 1731.	                        if(*new_f61)
	LD	L,(IX+20)
	LD	H,(IX+21)
	XOR	A
	OR	(HL)
	JR	Z,?0668
?0667:
; 1732.	                            *new_j1 = *new_cptr + 1;
	LD	L,(IY+0)
	LD	H,(IY+1)
	INC	HL
	PUSH	HL
	LD	L,(IX+14)
	LD	H,(IX+15)
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
?0668:
; 1733.	                        switch(module[*new_cptr - 1] - 1)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	DEC	HL
	LD	C,(HL)
	LD	B,0
	DEC	BC
	LD	A,4
	XOR	C
	OR	B
	JR	NZ,?0675
?0670:
; 1734.	                        {
; 1735.	                            case 4:
; 1736.	                                if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JP	Z,?0557
?0671:
; 1737.	                                {
; 1738.	                                    *new_b = module[*new_cptr] & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	AND	31
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),A
; 1739.	                                    if(*new_b == 0)
	XOR	A
	OR	(HL)
	JP	NZ,?0557
?0673:
; 1740.	                                        *new_b = 32;
	JP	LWRD ?1092
?0674:
?0672:
; 1741.	                                }
; 1742.	                                break;
?0675:
	LD	A,5
	XOR	C
	OR	B
	JP	NZ,?0557
; 1743.	                            case 5:
; 1744.	                                if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JP	Z,?0557
?0676:
; 1745.	                                {
; 1746.	                                    *new_b = (*new_b + module[*new_cptr]) & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	PUSH	HL
	EXX
	PUSH	BC
	EXX
	POP	HL
	POP	BC
	LD	A,(BC)
	ADD	A,(HL)
	AND	31
	LD	(HL),A
; 1747.	                                    if(*new_b == 0)
	XOR	A
	OR	(HL)
	JP	NZ,?0557
?0678:
; 1748.	                                        *new_b = 32;
	JP	LWRD ?1092
?0679:
?0677:
; 1749.	                                }
; 1750.	                                break;
?0680:
; 1751.	                            default:
; 1752.	                                break;
?0669:
?0666:
; 1753.	                        }
; 1754.	                    }
; 1755.	                    else if(va4 >= 0x80)
	LD	A,B
	CP	128
	JP	C,?0557
?0682:
; 1756.	                    {
; 1757.	                        // printf ("08");
; 1758.	                    
; 1759.	                        if((module[*new_cptr] & 64) != 0)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	BIT	6,(HL)
	JP	Z,?0557
?0684:
; 1760.	                        {
; 1761.	                            (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1072
	INC	(HL)
?1072:
; 1762.	                            if((module[*new_cptr] & 15) != 0)
	LD	L,(IY+0)
	LD	H,(IY+1)
	ADD	HL,BC
	LD	A,(HL)
	AND	15
	JP	Z,?0557
?0686:
; 1763.	                            {
; 1764.	                                (*new_cptr) ++;
	PUSH	IY
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1073
	INC	(HL)
?1073:
; 1765.	                                if(*new_f61)
	LD	L,(IX+20)
	LD	H,(IX+21)
	XOR	A
	OR	(HL)
	JR	Z,?0689
?0688:
; 1766.	                                    *new_j1 = *new_cptr + 1;
	LD	L,(IY+0)
	LD	H,(IY+1)
	INC	HL
	PUSH	HL
	LD	L,(IX+14)
	LD	H,(IX+15)
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
?0689:
; 1767.	                                switch((module[*new_cptr - 1] & 15) - 1)
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	DEC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	B,0
	DEC	BC
	LD	A,4
	XOR	C
	OR	B
	JR	NZ,?0696
?0691:
; 1768.	                                {
; 1769.	                                    case 4:
; 1770.	                                        if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JR	Z,?0557
?0692:
; 1771.	                                        {
; 1772.	                                            *new_b = module[*new_cptr] & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	LD	A,(HL)
	AND	31
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),A
; 1773.	                                            if(*new_b == 0)
	XOR	A
	OR	(HL)
	JR	NZ,?0557
?0694:
; 1774.	                                                *new_b = 32;
	JR	?1092
?0695:
?0693:
; 1775.	                                        }
; 1776.	                                        break;
?0696:
	LD	A,5
	XOR	C
	OR	B
	JR	NZ,?0557
; 1777.	                                    case 5:
; 1778.	                                        if(*new_f41)
	EXX
	PUSH	DE
	EXX
	POP	HL
	OR	(HL)
	JR	Z,?0557
?0697:
; 1779.	                                        {
; 1780.	                                            *new_b = (*new_b + module[*new_cptr]) & 31;
	LD	L,(IY+0)
	LD	H,(IY+1)
	LD	BC,(?0011+196)
	ADD	HL,BC
	PUSH	HL
	EXX
	PUSH	BC
	EXX
	POP	HL
	POP	BC
	LD	A,(BC)
	ADD	A,(HL)
	AND	31
	LD	(HL),A
; 1781.	                                            if(*new_b == 0)
	XOR	A
	OR	(HL)
	JR	NZ,?0557
?0699:
; 1782.	                                                *new_b = 32;
?1092:
	LD	(HL),32
?0700:
?0698:
; 1783.	                                        }
; 1784.	                                        break;
	JR	?0557
?0701:
; 1785.	                                    default:
; 1786.	                                        break;
?0690:
?0687:
?0685:
?0683:
?0681:
?0664:
; 1787.	                                }
; 1788.	
; 1789.	                            }
; 1790.	                        }
; 1791.	                    }
; 1792.	
; 1793.	                }
; 1794.	                break;
?0641:
; 1795.	            }
; 1796.	            else if(va2 >= 0xc0)
	LD	A,B
	CP	192
	JP	C,?0558
?0702:
; 1797.	            {
; 1798.	                 //printf ("09");
; 1799.	            
; 1800.	                *new_j1 = *new_cptr + 1;
	LD	L,(IY+0)
	LD	H,(IY+1)
	INC	HL
	PUSH	HL
	LD	L,(IX+14)
	LD	H,(IX+15)
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1801.	                *new_j22 = *new_cptr;
	LD	L,(IY+0)
	LD	H,(IY+1)
	PUSH	HL
	LD	L,(IX+24)
	LD	H,(IX+25)
?1079:
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1802.	                break;
?0703:
; 1803.	            }
; 1804.	        }
; 1805.	    }
?0557:
?0556:
; 1806.	}
	LD	SP,IX
	POP	IX
	EXX
	POP	DE
	POP	BC
	EXX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 1807.	
; 1808.	
; 1809.	
; 1810.	
; 1811.	
; 1812.	void SQT_GetInfo(AYSongInfo * info)
; 1813.	{
SQT_GetInfo:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 1814.	  
; 1815.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0011+203),HL
; 1816.	    
; 1817.	    SQT_File *header = (SQT_File *)module;
	LD	(?0011+205),HL
; 1818.	    unsigned char b;
; 1819.	    unsigned long tm = 0;
	LD	BC,0
	LD	L,C
	LD	H,B
	LD	(?0011+208),HL
	LD	(?0011+210),BC
; 1820.	    long i;
; 1821.	    char a1, a2, a3;
; 1822.	    unsigned short j1, j2, j3;
; 1823.	    unsigned short pptr, cptr;
; 1824.	    bool f71, f72, f73, f61, f62, f63, f41, f42, f43, flg;
; 1825.	    unsigned short j11, j22, j33;
; 1826.	    unsigned char limit;
; 1827.	    
; 1828.	    
; 1829.	    f71 = f72 = f73 = f61 = f62 = f63 = f41 = f42 = f43 = flg = false;
	XOR	A
	LD	(?0011+238),A
	LD	(?0011+237),A
	LD	(?0011+236),A
	LD	(?0011+235),A
	LD	(?0011+234),A
	LD	(?0011+233),A
	LD	(?0011+232),A
	LD	(?0011+231),A
	LD	(?0011+230),A
	LD	(?0011+229),A
; 1830.	    j11 = j22 = j33 = 0;
	LD	(?0011+243),HL
	LD	(?0011+241),HL
	LD	(?0011+239),HL
; 1831.	    
; 1832.	    if(!SQT_PreInit(info->module))
	LD	E,(IX+2)
	LD	D,(IX+3)
	LD	A,BYTE3 SQT_PreInit
	LD	HL,LWRD SQT_PreInit
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	INC	L
	DEC	L
	JR	NZ,?0705
?0704:
; 1833.	    {
; 1834.	        info->len = 0;
	XOR	A
	LD	(IX+99),A
	LD	(IX+100),A
; 1835.	        return;
; 1836.	    }
	JP	LWRD ?0722
?0705:
; 1837.	
; 1838.	    pptr = SQT_PositionsPointer;
	LD	HL,8
	LD	BC,(?0011+205)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,9
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	LD	(?0011+225),HL
?0707:
; 1839.	    while(module[pptr] != 0)
	LD	HL,(?0011+225)
	LD	BC,(?0011+203)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	Z,?0706
?0708:
; 1840.	    {
; 1841.	        //if(pptr == SQT_LoopPointer)
; 1842.	        //    info->Loop = tm;
; 1843.	            
; 1844.	        f41 = (module[pptr] & 128) ? true : false;
	LD	HL,(?0011+225)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0710
	LD	A,1
	JR	?0711
?0710:
	XOR	A
?0711:
	LD	(?0011+235),A
; 1845.	        j1 = ay_sys_getword(&module[(unsigned char)(module[pptr] * 2) + SQT_PatternsPointer]);
	CALL	LWRD ?1187
	LD	(?0011+219),HL
; 1846.	        j1++;
	INC	HL
	LD	(?0011+219),HL
; 1847.	        pptr += 2;
	LD	HL,2
	LD	BC,(?0011+225)
	ADD	HL,BC
	LD	(?0011+225),HL
; 1848.	        f42 = (module[pptr] & 128) ? true : false;
	LD	BC,(?0011+203)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0713
	LD	A,1
	JR	?0714
?0713:
	XOR	A
?0714:
	LD	(?0011+236),A
; 1849.	        j2 = ay_sys_getword(&module[(unsigned char)(module[pptr] * 2) + SQT_PatternsPointer]);
	CALL	LWRD ?1187
	LD	(?0011+221),HL
; 1850.	        j2++;
	INC	HL
	LD	(?0011+221),HL
; 1851.	        pptr += 2;
	LD	HL,2
	LD	BC,(?0011+225)
	ADD	HL,BC
	LD	(?0011+225),HL
; 1852.	        f43 = (module[pptr] & 128) ? true : false;
	LD	BC,(?0011+203)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0716
	LD	A,1
	JR	?0717
?0716:
	XOR	A
?0717:
	LD	(?0011+237),A
; 1853.	        j3 = ay_sys_getword(&module[(unsigned char)(module[pptr] * 2) + SQT_PatternsPointer]);
	LD	HL,6
	LD	BC,(?0011+205)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	A,D
	LD	HL,7
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	PUSH	HL
	LD	HL,(?0011+225)
	LD	BC,(?0011+203)
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,A
	LD	E,A
	POP	HL
	ADD	HL,DE
	ADD	HL,BC
	CALL	LWRD ?1184
	LD	(?0011+223),HL
; 1854.	        j3++;
	INC	HL
	LD	(?0011+223),HL
; 1855.	        pptr += 2;
	LD	HL,2
	LD	BC,(?0011+225)
	ADD	HL,BC
	LD	(?0011+225),HL
; 1856.	        b = module[pptr];
	LD	BC,(?0011+203)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0011+207),A
; 1857.	        pptr++;
	LD	HL,(?0011+225)
	INC	HL
	LD	(?0011+225),HL
; 1858.	        a1 = a2 = a3 = 0;
	XOR	A
	LD	(?0011+218),A
	LD	(?0011+217),A
	LD	(?0011+216),A
; 1859.	        limit = module[j1 - 1];
	LD	HL,(?0011+219)
	ADD	HL,BC
	DEC	HL
	LD	A,(HL)
	LD	(?0011+245),A
; 1860.	        for(i = 0; i < limit; i++)
	LD	BC,0
	LD	L,C
	LD	H,B
?1095:
	LD	(?0011+212),HL
	LD	(?0011+214),BC
?0719:
	LD	HL,(?0011+245)
	LD	BC,0
	LD	H,C
	PUSH	BC
	PUSH	HL
	LD	BC,(?0011+214)
	LD	HL,(?0011+212)
	CALL	LWRD ?SL_CMP_L03
	JP	NC,?0707
?0720:
; 1861.	        {
; 1862.	            //gotoxy(5, 5);
; 1863.	           // printf ("2                       ");
; 1864.	            SQT_GetChannelInfo(info, &b, &a1, &j1, &cptr, &f71, &f61, &f41, &j11, 1);
	LD	C,1
	PUSH	BC
	LD	HL,?0011+239
	PUSH	HL
	LD	HL,?0011+235
	PUSH	HL
	LD	HL,?0011+232
	PUSH	HL
	LD	HL,?0011+229
	PUSH	HL
	LD	HL,?0011+227
	PUSH	HL
	LD	HL,?0011+219
	PUSH	HL
	LD	HL,?0011+216
	PUSH	HL
	CALL	LWRD ?1206
	LD	HL,16
	ADD	HL,SP
	LD	SP,HL
; 1865.	            
; 1866.	            //gotoxy(5, 5);
; 1867.	            //printf ("3                       ");          
; 1868.	            SQT_GetChannelInfo(info, &b, &a2, &j2, &cptr, &f72, &f62, &f42, &j22, 2);
	LD	C,2
	PUSH	BC
	LD	HL,?0011+241
	PUSH	HL
	LD	HL,?0011+236
	PUSH	HL
	LD	HL,?0011+233
	PUSH	HL
	LD	HL,?0011+230
	PUSH	HL
	LD	HL,?0011+227
	PUSH	HL
	LD	HL,?0011+221
	PUSH	HL
	LD	HL,?0011+217
	PUSH	HL
	CALL	LWRD ?1206
	LD	HL,16
	ADD	HL,SP
	LD	SP,HL
; 1869.	            
; 1870.	            //gotoxy(5, 5);
; 1871.	            //printf ("4                       ");
; 1872.	            SQT_GetChannelInfo(info, &b, &a3, &j3, &cptr, &f73, &f63, &f43, &j33, 3);
	LD	C,3
	PUSH	BC
	LD	HL,?0011+243
	PUSH	HL
	LD	HL,?0011+237
	PUSH	HL
	LD	HL,?0011+234
	PUSH	HL
	LD	HL,?0011+231
	PUSH	HL
	LD	HL,?0011+227
	PUSH	HL
	LD	HL,?0011+223
	PUSH	HL
	LD	HL,?0011+218
	PUSH	HL
	CALL	LWRD ?1206
	LD	HL,16
	ADD	HL,SP
	LD	SP,HL
; 1873.	            
; 1874.	            
; 1875.	          
; 1876.	            tm += b;
	LD	HL,?0011+208
	LD	DE,(?0011+207)
	LD	BC,0
	LD	D,C
	CALL	LWRD ?L_ADDASG_L03
	LD	HL,(?0011+212)
	LD	BC,(?0011+214)
	CALL	LWRD ?L_INC_L03
	JP	LWRD ?1095
; 1877.	            
; 1878.	            //gotoxy(0, 5);
; 1879.	            //printf("%d                              ", tm);
; 1880.	        }
; 1881.	    }
?0718:
?0706:
; 1882.	    
; 1883.	    info->len = tm;
	LD	HL,(?0011+208)
	LD	(IX+99),L
	LD	(IX+100),H
; 1884.	    
; 1885.	    FN(info); 
	PUSH	IX
	POP	DE
	LD	A,BYTE3 FN
	LD	HL,LWRD FN
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 1886.	}
?0722:
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1206:
	LD	BC,?0011+207
	PUSH	IX
	POP	DE
	LD	A,BYTE3 SQT_GetChannelInfo
	LD	HL,LWRD SQT_GetChannelInfo
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 1887.	
; 1888.	
; 1889.	bool SQT_Detect(unsigned char *module, unsigned int length, AYSongInfo * s)
; 1890.	{
SQT_Detect:
	PUSH	IY
	PUSH	IX
	PUSH	DE
	POP	IX
	PUSH	BC
	POP	IY
; 1891.	    int j, j1, j2, j3;
; 1892.	    SQT_File *header = (SQT_File *)module;
	LD	(?0011+254),DE
; 1893.	    unsigned short *pwrd;
; 1894.	    long F_Length;
; 1895.	    
; 1896.	    int PD_rv;
; 1897.	    
; 1898.	    
; 1899.	    //return false;
; 1900.	    
; 1901.	    if(length < 17)
	LD	DE,17
	LD	L,C
	LD	H,B
	AND	A
	SBC	HL,DE
	JP	C,?1129
?0723:
; 1902.	    {
; 1903.	     // s->len = 1;
; 1904.	        return false;
; 1905.	        }
?0724:
; 1906.	        
; 1907.	    if((unsigned int)SQT_SamplesPointer < 10)
	LD	HL,(?0011+254)
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,D
	LD	A,B
	INC	HL
	LD	D,(HL)
	LD	L,C
	OR	D
	LD	H,A
	LD	C,10
	SBC	HL,BC
	JP	C,?1129
?0725:
; 1908.	    {
; 1909.	    //s->len = 2;
; 1910.	        return false;
; 1911.	    }
?0726:
; 1912.	    
; 1913.	    if(SQT_OrnamentsPointer <= SQT_SamplesPointer)
	LD	HL,4
	LD	BC,(?0011+254)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	A,D
	LD	HL,5
	ADD	HL,BC
	LD	H,(HL)
	LD	C,E
	OR	H
	LD	B,A
	PUSH	BC
	LD	HL,(?0011+254)
	INC	HL
	INC	HL
	LD	C,(HL)
	INC	HL
	LD	H,(HL)
	LD	A,D
	OR	H
	LD	H,A
	LD	L,C
	POP	BC
	SBC	HL,BC
	JP	NC,?1129
?0727:
; 1914.	   {
; 1915.	 //  s->len = 3;
; 1916.	        return false;
; 1917.	    }
?0728:
; 1918.	    
; 1919.	    if(SQT_PatternsPointer < SQT_OrnamentsPointer)
	LD	HL,4
	LD	BC,(?0011+254)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,5
	ADD	HL,BC
	LD	H,(HL)
	LD	C,E
	LD	A,D
	OR	H
	LD	B,A
	PUSH	BC
	LD	HL,6
	LD	DE,(?0011+254)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,7
	ADD	HL,DE
	LD	D,(HL)
	POP	HL
	LD	A,H
	OR	D
	LD	H,A
	POP	BC
	SBC	HL,BC
	JP	C,?1129
?0729:
; 1920.	 {
; 1921.	// s->len = 4;
; 1922.	        return false;
; 1923.	  }
?0730:
; 1924.	    
; 1925.	    if(SQT_PositionsPointer <= SQT_PatternsPointer)
	LD	HL,8
	LD	BC,(?0011+254)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,9
	ADD	HL,BC
	LD	H,(HL)
	LD	C,E
	OR	H
	LD	B,A
	PUSH	BC
	LD	HL,6
	LD	DE,(?0011+254)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,7
	ADD	HL,DE
	LD	D,(HL)
	POP	HL
	LD	A,H
	OR	D
	LD	H,A
	POP	BC
	SBC	HL,BC
	JP	NC,?1129
?0731:
; 1926.	    {
; 1927.	   // s->len = 5;
; 1928.	        return false;
; 1929.	    }
?0732:
; 1930.	    
; 1931.	    if(SQT_LoopPointer < SQT_PositionsPointer)
	LD	HL,8
	LD	BC,(?0011+254)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,9
	ADD	HL,BC
	LD	H,(HL)
	LD	C,E
	OR	H
	LD	B,A
	PUSH	BC
	LD	HL,10
	LD	DE,(?0011+254)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,11
	ADD	HL,DE
	LD	D,(HL)
	LD	E,0
	POP	HL
	LD	A,H
	OR	D
	LD	H,A
	POP	BC
	SBC	HL,BC
	JP	C,?1129
?0733:
; 1932.	     {
; 1933.	    // s->len = 6;
; 1934.	        return false;
; 1935.	}
?0734:
; 1936.	
; 1937.	    j = SQT_SamplesPointer - 10;
	LD	HL,(?0011+254)
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	A,E
	INC	HL
	LD	D,(HL)
	LD	L,C
	OR	D
	LD	H,A
	LD	BC,65526
	ADD	HL,BC
	LD	(?0011+246),HL
; 1938.	    if(SQT_LoopPointer - j >= length)
	LD	HL,10
	LD	BC,(?0011+254)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	A,D
	LD	HL,11
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	LD	BC,(?0011+246)
	SBC	HL,BC
	PUSH	IY
	POP	BC
	AND	A
	SBC	HL,BC
	JP	NC,?1129
?0735:
; 1939.	 {
; 1940.	 //s->len = 7;
; 1941.	        return false;
; 1942.	}
?0736:
; 1943.	
; 1944.	    j1 = SQT_PositionsPointer - j;
	LD	HL,8
	LD	BC,(?0011+254)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,9
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	LD	BC,(?0011+246)
	SBC	HL,BC
	LD	(?0011+248),HL
; 1945.	    if(module[j1] == 0)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	Z,?1129
?0737:
; 1946.	 {
; 1947.	// s->len = 8;
; 1948.	        return false;
; 1949.	 }
?0738:
; 1950.	 
; 1951.	    j2 = 0;
	LD	L,D
	LD	H,D
	LD	(?0011+250),HL
?0740:
; 1952.	    while(module[j1] != 0)
	LD	HL,(?0011+248)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	Z,?0739
?0741:
; 1953.	    {
; 1954.	        if(j1 + 7 >= length)
	LD	HL,7
	LD	BC,(?0011+248)
	ADD	HL,BC
	PUSH	IY
	POP	BC
	AND	A
	SBC	HL,BC
	JP	NC,?1129
?0742:
; 1955.	        {
; 1956.	        //s->len = 9;
; 1957.	            return false;
; 1958.	         }   
?0743:
; 1959.	  
; 1960.	        if(j2 < (module[j1] & 0x7f))
	LD	HL,(?0011+248)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	B,(HL)
	RES	7,B
	LD	C,B
	LD	B,0
	LD	HL,(?0011+250)
	OR	128
	SBC	HL,BC
	JP	PO,?1113
	XOR	H
?1113:
	JP	P,?0745
?0744:
; 1961.	            j2 = module[j1] & 0x7f;
	LD	HL,(?0011+248)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	B,(HL)
	RES	7,B
	LD	C,B
	LD	B,0
	LD	(?0011+250),BC
?0745:
; 1962.	        j1 += 2;
	LD	HL,2
	LD	BC,(?0011+248)
	ADD	HL,BC
	LD	(?0011+248),HL
; 1963.	        if(j2 < (module[j1] & 0x7f))
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	B,(HL)
	RES	7,B
	LD	C,B
	LD	B,0
	LD	HL,(?0011+250)
	OR	128
	SBC	HL,BC
	JP	PO,?1114
	XOR	H
?1114:
	JP	P,?0747
?0746:
; 1964.	            j2 = module[j1] & 0x7f;
	LD	HL,(?0011+248)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	B,(HL)
	RES	7,B
	LD	C,B
	LD	B,0
	LD	(?0011+250),BC
?0747:
; 1965.	        j1 += 2;
	LD	HL,2
	LD	BC,(?0011+248)
	ADD	HL,BC
	LD	(?0011+248),HL
; 1966.	        if(j2 < (module[j1] & 0x7f))
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	B,(HL)
	RES	7,B
	LD	C,B
	LD	B,0
	LD	HL,(?0011+250)
	OR	128
	SBC	HL,BC
	JP	PO,?1115
	XOR	H
?1115:
	JP	P,?0749
?0748:
; 1967.	            j2 = module[j1] & 0x7f;
	LD	HL,(?0011+248)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	B,(HL)
	RES	7,B
	LD	C,B
	LD	B,0
	LD	(?0011+250),BC
?0749:
; 1968.	        j1 += 3;
	LD	HL,3
	LD	BC,(?0011+248)
	ADD	HL,BC
	LD	(?0011+248),HL
	JP	LWRD ?0740
?0739:
; 1969.	    }
; 1970.	
; 1971.	    pwrd = (unsigned short *)&module[SQT_SamplesPointer - j + 2];
	LD	HL,(?0011+254)
	INC	HL
	INC	HL
	LD	C,(HL)
	INC	HL
	LD	D,(HL)
	LD	L,C
	OR	D
	LD	H,A
	LD	BC,(?0011+246)
	SBC	HL,BC
	PUSH	IX
	POP	BC
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	(?0011+256),HL
; 1972.	    if(*pwrd - SQT_PatternsPointer - 2 != j2 * 2)
	LD	HL,6
	LD	BC,(?0011+254)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,7
	ADD	HL,BC
	LD	B,(HL)
	LD	C,E
	OR	B
	LD	B,A
	LD	HL,(?0011+256)
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	SBC	HL,BC
	LD	BC,65534
	ADD	HL,BC
	PUSH	HL
	LD	HL,(?0011+250)
	ADD	HL,HL
	LD	C,L
	LD	B,H
	POP	HL
	AND	A
	SBC	HL,BC
	JP	NZ,?1129
?0750:
; 1973.	    {
; 1974.	   // s->len = 10;
; 1975.	        return false;
; 1976.	        }
?0751:
; 1977.	
; 1978.	    F_Length = j1 + 7;
	LD	HL,7
	LD	BC,(?0011+248)
	ADD	HL,BC
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	LD	(?0011+258),HL
	LD	(?0011+260),BC
; 1979.	    pwrd = (unsigned short *)&module[12];
	LD	HL,12
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	(?0011+256),HL
; 1980.	    j2 = *pwrd;
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	(?0011+250),HL
; 1981.	    for(j1 = 1; j1 <= (SQT_OrnamentsPointer- SQT_SamplesPointer) / 2; j1++)
	LD	HL,1
?1116:
	LD	(?0011+248),HL
?0753:
	LD	HL,(?0011+254)
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,0
	LD	A,B
	INC	HL
	LD	D,(HL)
	LD	L,C
	OR	D
	LD	H,A
	PUSH	HL
	LD	HL,4
	LD	DE,(?0011+254)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,B
	PUSH	HL
	LD	L,5
	ADD	HL,DE
	LD	D,(HL)
	POP	HL
	LD	A,H
	OR	D
	LD	H,A
	POP	BC
	SBC	HL,BC
	SRL	H
	RR	L
	LD	BC,(?0011+248)
	AND	A
	SBC	HL,BC
	JR	C,?0752
?0754:
; 1982.	    {
; 1983.	        pwrd++;
	LD	HL,(?0011+256)
	INC	HL
	INC	HL
	LD	(?0011+256),HL
; 1984.	        j3 = *pwrd;
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	(?0011+252),HL
; 1985.	        if( j3 - j2 != 0x62 )
	LD	BC,(?0011+250)
	SBC	HL,BC
	LD	A,98
	XOR	L
	OR	H
	JP	NZ,?1129
?0756:
; 1986.	        {
; 1987.	        //s->len = 11;
; 1988.	        return false;
; 1989.	        }
?0757:
; 1990.	        
; 1991.	        j2 = j3;
	LD	HL,(?0011+252)
	LD	(?0011+250),HL
	LD	HL,(?0011+248)
	INC	HL
	JR	?1116
?0752:
; 1992.	    }
; 1993.	
; 1994.	    for(j1 = 1; j1 <= (SQT_PatternsPointer - SQT_OrnamentsPointer) / 2; j1++)
	LD	HL,1
?1117:
	LD	(?0011+248),HL
?0759:
	LD	HL,4
	LD	BC,(?0011+254)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,5
	ADD	HL,BC
	LD	H,(HL)
	LD	C,E
	OR	H
	LD	B,A
	PUSH	BC
	LD	HL,6
	LD	DE,(?0011+254)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,7
	ADD	HL,DE
	LD	D,(HL)
	POP	HL
	LD	A,H
	OR	D
	LD	H,A
	POP	BC
	SBC	HL,BC
	SRL	H
	RR	L
	LD	BC,(?0011+248)
	AND	A
	SBC	HL,BC
	JR	C,?0758
?0760:
; 1995.	    {
; 1996.	        pwrd++;
	LD	HL,(?0011+256)
	INC	HL
	INC	HL
	LD	(?0011+256),HL
; 1997.	        j3 = *pwrd;
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	(?0011+252),HL
; 1998.	        if( j3 - j2 != 0x22) 
	LD	BC,(?0011+250)
	SBC	HL,BC
	LD	A,34
	XOR	L
	OR	H
	JR	NZ,?1129
?0762:
; 1999.	        {
; 2000.	        //s->len = 12;
; 2001.	        return false;
; 2002.	        }
?0763:
; 2003.	        j2 = j3;
	LD	HL,(?0011+252)
	LD	(?0011+250),HL
	LD	HL,(?0011+248)
	INC	HL
	JR	?1117
?0758:
; 2004.	    }
; 2005.	
; 2006.	    PD_rv = SQT_PreInit(module);
	PUSH	IX
	POP	DE
	LD	A,BYTE3 SQT_PreInit
	LD	HL,LWRD SQT_PreInit
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	H,0
	LD	(?0011+262),HL
; 2007.	    
; 2008.	    if (!PD_rv)
	LD	A,L
	OR	A
	JR	NZ,?0765
?0764:
; 2009.	      return 0;
?1129:
	LD	L,0
	JR	?0767
?0765:
; 2010.	
; 2011.	    strcpy (s->player, "SQ Tracker");
	LD	BC,?0766
	LD	L,8
	ADD	HL,SP
	CALL	LWRD ?1210
; 2012.	
; 2013.	    return  1;
	LD	L,1
; 2014.	}
?0767:
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 2015.	
; 2016.	
; 2017.	
; 2018.	
; 2019.	
; 2020.	
; 2021.	
; 2022.	
; 2023.	
; 2024.	//////
; 2025.	
; 2026.	
; 2027.	
; 2028.	bool PT3_Detect(unsigned char *module, unsigned int length,AYSongInfo * s)
; 2029.	{
PT3_Detect:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
	PUSH	DE
	POP	IY
; 2030.	    long F_Length;
; 2031.	    int j, j1, j2;
; 2032.	    PT3_File *header = (PT3_File *)module;
	LD	(?0011+274),DE
; 2033.	    
; 2034.	    
; 2035.	   // return true;
; 2036.	    
; 2037.	    if(length < 202)
	LD	DE,202
	LD	L,C
	LD	H,B
	AND	A
	SBC	HL,DE
	JP	C,?1153
?0768:
; 2038.	    {
; 2039.	       // s->err = 1;
; 2040.	        return false;
; 2041.	    }
?0769:
; 2042.	    
; 2043.	    if(PT3_PatternsPointer> length)
	LD	HL,103
	LD	BC,(?0011+274)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,104
	ADD	HL,BC
	LD	B,(HL)
	LD	C,E
	LD	A,D
	OR	B
	LD	B,A
	PUSH	IX
	POP	HL
	SBC	HL,BC
	JP	C,?1153
?0770:
; 2044.	    {
; 2045.	       //s->err = 2;
; 2046.	       return false;
; 2047.	    }
?0771:
; 2048.	    
; 2049.	    
; 2050.	    if(module[PT3_PatternsPointer - 1] != 255)
	LD	HL,103
	LD	BC,(?0011+274)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,104
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	PUSH	IY
	POP	BC
	ADD	HL,BC
	DEC	HL
	LD	B,(HL)
	INC	B
	JP	NZ,?1153
?0772:
; 2051.	    {
; 2052.	       // s->err = 3;
; 2053.	        return false;
; 2054.	    }
?0773:
; 2055.	        
; 2056.	        
; 2057.	    if(PT3_OrnamentsPointers(0) + 2 > length)
	LD	HL,169
	LD	BC,(?0011+274)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,170
	ADD	HL,BC
	LD	B,(HL)
	LD	C,E
	LD	A,D
	OR	B
	LD	B,A
	INC	BC
	INC	BC
	PUSH	IX
	POP	HL
	SBC	HL,BC
	JP	C,?1153
?0774:
; 2058.	    {
; 2059.	       // s->err = 4;
; 2060.	        return false;
; 2061.	     }
?0775:
; 2062.	
; 2063.	   // return true;
; 2064.	
; 2065.	    j = 0;
	LD	L,D
	LD	H,D
	LD	(?0011+268),HL
; 2066.	    memcpy(&j, &module[PT3_OrnamentsPointers(0)], 3);
	LD	BC,3
	PUSH	BC
	LD	L,169
	LD	BC,(?0011+274)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,170
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	PUSH	IY
	POP	BC
	ADD	HL,BC
	LD	C,L
	LD	B,H
	LD	DE,?0011+268
	LD	A,BYTE3 memcpy
	LD	HL,LWRD memcpy
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	AF
; 2067.	    if(j != 256)
	LD	HL,(?0011+268)
	LD	A,1
	XOR	H
	OR	L
	JP	NZ,?1153
?0776:
; 2068.	    {
; 2069.	       // s->err = 5;
; 2070.	        return false;
; 2071.	    }
?0777:
; 2072.	
; 2073.	    j = ay_sys_getword(&module[PT3_PatternsPointer]);
	LD	HL,103
	LD	BC,(?0011+274)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,104
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	PUSH	IY
	POP	BC
	ADD	HL,BC
	CALL	LWRD ?1184
	LD	(?0011+268),HL
; 2074.	    if(j > length)
	LD	C,L
	LD	B,H
	PUSH	IX
	POP	HL
	AND	A
	SBC	HL,BC
	JP	C,?1153
?0778:
; 2075.	    {
; 2076.	        //s->err = 5;
; 2077.	        return false;
; 2078.	    }
?0779:
; 2079.	    
; 2080.	    if(j - (int)(PT3_PatternsPointer) <= 0)
	LD	HL,103
	LD	BC,(?0011+274)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	A,D
	LD	HL,104
	ADD	HL,BC
	LD	B,(HL)
	LD	C,E
	OR	B
	LD	B,A
	LD	HL,(?0011+268)
	SBC	HL,BC
	LD	C,L
	LD	B,H
	LD	L,D
	LD	H,D
	OR	128
	SBC	HL,BC
	JP	PO,?1142
	XOR	H
?1142:
	JP	P,?1153
?0780:
; 2081.	    {
; 2082.	       // s->err = 6;
; 2083.	        return false;
; 2084.	    }
?0781:
; 2085.	    
; 2086.	    /*if(((j - (int)(PT3_PatternsPointer)) % 6) != 0)
; 2087.	     return false;*/
; 2088.	
; 2089.	    j1 = 0;
	LD	L,D
	LD	H,D
	LD	(?0011+270),HL
; 2090.	    j2 = 0;
?1144:
	LD	(?0011+272),HL
?0783:
; 2091.	    while((j2 < 256) && (j2 <= length - 201) && (header->PT3_PositionList[j2] != 255))
	LD	BC,33024
	LD	A,128
	XOR	H
	LD	H,A
	SBC	HL,BC
	JR	NC,?0782
	LD	HL,65335
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	BC,(?0011+272)
	AND	A
	SBC	HL,BC
	JR	C,?0782
	LD	L,C
	LD	H,B
	LD	BC,(?0011+274)
	ADD	HL,BC
	LD	BC,201
	ADD	HL,BC
	LD	B,(HL)
	INC	B
	JR	Z,?0782
?0786:
?0785:
?0784:
; 2092.	    {
; 2093.	        if((unsigned long)(j1) < header->PT3_PositionList[j2])
	LD	HL,(?0011+272)
	LD	BC,(?0011+274)
	ADD	HL,BC
	LD	BC,201
	ADD	HL,BC
	LD	L,(HL)
	LD	C,B
	LD	H,C
	PUSH	BC
	PUSH	HL
	LD	HL,(?0011+270)
	LD	A,H
	RLCA
	SBC	A,A
	LD	E,A
	LD	D,E
	AND	A
	POP	BC
	SBC	HL,BC
	EX	DE,HL
	POP	BC
	SBC	HL,BC
	JR	NC,?0788
?0787:
; 2094.	            j1 = header->PT3_PositionList[j2];
	LD	HL,(?0011+272)
	LD	BC,(?0011+274)
	ADD	HL,BC
	LD	BC,201
	ADD	HL,BC
	LD	C,(HL)
	LD	(?0011+270),BC
?0788:
; 2095.	        if((j1 % 3) != 0)
	LD	BC,3
	LD	DE,(?0011+270)
	CALL	LWRD ?SS_MOD_L02
	LD	A,E
	OR	D
	JP	NZ,?1153
?0789:
; 2096.	        {
; 2097.	            //s->err = 7;
; 2098.	            return false;
; 2099.	        }    
?0790:
; 2100.	        j2++;
	LD	HL,(?0011+272)
	INC	HL
	JR	?1144
?0782:
; 2101.	    }
; 2102.	    
; 2103.	    //if(((j - (int)(PT3_PatternsPointer)) / 6) != ((j1 / 3) + 1))
; 2104.	    //{
; 2105.	    //    s->err = 8;
; 2106.	    //    return false;
; 2107.	    //}
; 2108.	
; 2109.	    j = 15;
	LD	HL,15
?1145:
	LD	(?0011+268),HL
?0792:
; 2110.	    while((j > 0) && (PT3_OrnamentsPointers(j) == 0))
	LD	C,L
	LD	B,H
	LD	HL,0
	OR	128
	SBC	HL,BC
	JP	PO,?1143
	XOR	H
?1143:
	JP	P,?0791
	LD	L,C
	LD	H,B
	ADD	HL,HL
	LD	BC,(?0011+274)
	ADD	HL,BC
	LD	DE,169
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0011+268)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,170
	ADD	HL,BC
	LD	B,(HL)
	LD	H,E
	LD	A,D
	OR	B
	OR	H
	JR	NZ,?0791
?0795:
?0794:
?0793:
; 2111.	        j--;
	LD	HL,(?0011+268)
	DEC	HL
	JR	?1145
?0791:
; 2112.	
; 2113.	    F_Length = PT3_OrnamentsPointers(j) + module[PT3_OrnamentsPointers(j) + 1] + 2;
	LD	HL,(?0011+268)
	ADD	HL,HL
	LD	BC,(?0011+274)
	ADD	HL,BC
	LD	DE,169
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0011+268)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,170
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	PUSH	IY
	POP	BC
	ADD	HL,BC
	INC	HL
	LD	C,(HL)
	LD	B,D
	PUSH	BC
	LD	HL,(?0011+268)
	ADD	HL,HL
	LD	DE,(?0011+274)
	ADD	HL,DE
	LD	DE,169
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0011+268)
	ADD	HL,HL
	LD	BC,(?0011+274)
	ADD	HL,BC
	LD	BC,170
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	POP	BC
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	LD	(?0011+264),HL
	LD	(?0011+266),BC
; 2114.	    
; 2115.	    if(F_Length > length + 1)
	PUSH	BC
	PUSH	HL
	PUSH	IX
	POP	HL
	INC	HL
	LD	C,D
	LD	B,D
	CALL	LWRD ?SL_CMP_L03
	JR	NC,?0797
?0796:
; 2116.	    {
; 2117.	        //s->err = 9;
; 2118.	        return false;
?1153:
	LD	L,0
; 2119.	    }
	JR	?0799
?0797:
; 2120.	
; 2121.	    //header->PT3_NumberOfPositions = j2;
; 2122.	    
; 2123.	    strcpy(s->player, "Pro Tracker v3");
	LD	BC,?0798
	LD	HL,8
	ADD	HL,SP
	CALL	LWRD ?1210
; 2124.	    
; 2125.	    return true;
	LD	L,1
; 2126.	}
?0799:
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 2127.	
; 2128.	
; 2129.	
; 2130.	void Status(char * s, int code1, int code2, int good)
; 2131.	{ 
Status:
	PUSH	BC
	PUSH	DE
; 2132.	        if (good)
	LD	HL,10
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	OR	(HL)
	JR	Z,?0801
?0800:
; 2133.	                attr_old(4*32, 32, BLUE*8+WHITE);
	LD	C,15
	JR	?1155
; 2134.	        else
?0801:
; 2135.	                attr_old(4*32, 32, RED*8+YELLOW+64+128); 
	LD	C,214
?1155:
	PUSH	BC
	LD	BC,32
	LD	DE,128
	LD	A,BYTE3 attr_old
	LD	HL,LWRD attr_old
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
?0802:
; 2136.	      
; 2137.	    clearstring(4);
	LD	E,4
	LD	A,BYTE3 clearstring
	LD	HL,LWRD clearstring
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 2138.	
; 2139.	        gotoxy(0, 4);
	LD	C,4
	LD	E,0
	LD	A,BYTE3 gotoxy
	LD	HL,LWRD gotoxy
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 2140.	        printf (s, code1, code2);
	LD	HL,8
	ADD	HL,SP
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	PUSH	BC
	LD	HL,4
	ADD	HL,SP
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	PUSH	BC
	DEC	HL
	DEC	HL
	DEC	HL
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	PUSH	BC
	LD	A,BYTE3 printf
	LD	HL,LWRD printf
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	AF
	POP	AF
	POP	AF
; 2141.	}
	POP	HL
	POP	HL
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 2142.	
; 2143.	
; 2144.	
; 2145.	void ClearList(void)
; 2146.	{        
ClearList:
	PUSH	BC
	PUSH	DE
; 2147.	        clearstring(7);
	LD	E,7
	LD	A,BYTE3 clearstring
	LD	HL,LWRD clearstring
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 2148.	        attr_old(32*7, 32, CYAN+64);
	LD	C,69
	PUSH	BC
	LD	BC,32
	LD	DE,224
	LD	A,BYTE3 attr_old
	LD	HL,LWRD attr_old
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
; 2149.	        bzero1 (); 
	LD	A,BYTE3 bzero1
	LD	HL,LWRD bzero1
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 2150.	                attr_too_old();   
	LD	A,BYTE3 attr_too_old
	LD	HL,LWRD attr_too_old
?1179:
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 2151.	}
	POP	DE
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 2152.	
; 2153.	void ay_sys_writeword(unsigned char *p, unsigned int val)
; 2154.	{
ay_sys_writeword:
	PUSH	IY
	PUSH	IX
	PUSH	DE
	POP	IX
	PUSH	BC
	POP	IY
; 2155.	    *p = (unsigned char)(val & 0xff);
	EX	DE,HL
	LD	(HL),C
; 2156.	    *(p + 1) = (unsigned char)((val >> 8) & 0xff);
	PUSH	IY
	POP	HL
	LD	(IX+1),H
; 2157.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 2158.	
; 2159.	
; 2160.	
; 2161.	void tiho (void)
; 2162.	{
tiho:
	PUSH	BC
	PUSH	DE
; 2163.	        output(0xFFFD, 8); output(0xBFFD, 0);  
	LD	C,8
	CALL	LWRD ?1214
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 2164.	        output(0xFFFD, 9); output(0xBFFD, 0);  
	LD	C,9
	CALL	LWRD ?1214
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 2165.	        output(0xFFFD, 10); output(0xBFFD, 0);              
	LD	C,10
	CALL	LWRD ?1214
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 2166.	}
	POP	DE
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1214:
	LD	DE,65533
	LD	A,BYTE3 output
	LD	HL,LWRD output
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	C,0
	LD	DE,49149
	LD	A,BYTE3 output
	LD	HL,LWRD output
	RET
; 2167.	
; 2168.	
; 2169.	
; 2170.	void DiskErrMesage(char m, int m1)
; 2171.	{
DiskErrMesage:
	PUSH	BC
	PUSH	DE
; 2172.	        
; 2173.	    switch (m)
	LD	A,E
	CP	1
	JR	NZ,?0806
?0804:
; 2174.	    {
; 2175.	    case 1:
; 2176.	        Status("No disk!", 0,0,0);
	LD	HL,0
	PUSH	HL
	PUSH	HL
	LD	C,L
	LD	B,H
	LD	DE,?0805
	JR	?1164
; 2177.	        break;
?0806:
	CP	4
	JR	NZ,?0808
; 2178.	  
; 2179.	     case 4:
; 2180.	          Status( "Sector SRC error!", 0, 0, 0);
	LD	HL,0
	PUSH	HL
	PUSH	HL
	LD	C,L
	LD	B,H
	LD	DE,?0807
	JR	?1164
; 2181.	        break;
?0808:
	CP	5
	JR	NZ,?0810
; 2182.	       
; 2183.	     case 5:
; 2184.	            Status("Disk reading error!", 0, 0, 0);
	LD	HL,0
	PUSH	HL
	PUSH	HL
	LD	C,L
	LD	B,H
	LD	DE,?0809
	JR	?1164
; 2185.	          break;
?0810:
	CP	6
	LD	HL,0
	PUSH	HL
	PUSH	HL
	LD	C,L
	LD	B,H
	JR	NZ,?0812
; 2186.	                        
; 2187.	     case 6:
; 2188.	                    Status("Unknown file format!", 0, 0, 0);
	LD	DE,?0811
	JR	?1164
; 2189.	                        break;
?0812:
; 2190.	                        
; 2191.	                default:
; 2192.	                        Status("Unknown disk!", 0, 0, 0);
	LD	DE,?0813
?1164:
	LD	A,BYTE3 Status
	LD	HL,LWRD Status
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
	POP	HL
?0803:
; 2193.	   }    
; 2194.	     
; 2195.	 
; 2196.	}
	POP	HL
	POP	HL
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 2197.	
; 2198.	
; 2199.	void delay (unsigned int arg)
; 2200.	{
delay:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 2201.	        unsigned short i;
; 2202.	
; 2203.	        for (i=0; i<arg; i++)
	LD	HL,0
?1173:
	LD	(?0011+276),HL
?0815:
	PUSH	IX
	POP	BC
	AND	A
	SBC	HL,BC
	JR	NC,?0814
?0816:
	LD	HL,(?0011+276)
	INC	HL
	JR	?1173
; 2204.	                ;
; 2205.	
; 2206.	}
?0814:
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 2207.	
; 2208.	void clock (void)
; 2209.	{
clock:
	PUSH	BC
	PUSH	DE
	LD	HL,?0820
	INC	(HL)
; 2210.	        static unsigned char h=0, m=0, ssss=0;
; 2211.	
; 2212.	
; 2213.	        ssss++;
; 2214.	
; 2215.	        if (ssss > 59)
	LD	A,(?0820)
	LD	B,A
	LD	A,59
	CP	B
	JR	NC,?0824
?0821:
; 2216.	        {
; 2217.	                ssss = 0;
	XOR	A
	LD	(?0820),A
; 2218.	                m++;
	LD	HL,?0819
	INC	(HL)
; 2219.	
; 2220.	                if (m>59)
	LD	A,(?0819)
	LD	B,A
	LD	A,59
	CP	B
	JR	NC,?0824
?0823:
; 2221.	                {
; 2222.	                        m=0;
	XOR	A
	LD	(?0819),A
; 2223.	                        h++;
	LD	HL,?0818
	INC	(HL)
?0824:
?0822:
; 2224.	                }
; 2225.	        }
; 2226.	
; 2227.	        
; 2228.	        printstring(24, d2s(h));
	LD	DE,(?0818)
	LD	A,BYTE3 d2s
	LD	HL,LWRD d2s
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	C,L
	LD	B,H
	LD	DE,24
	LD	A,BYTE3 printstring
	LD	HL,LWRD printstring
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 2229.	        printstring(27, d2s(m));
	LD	DE,(?0819)
	LD	A,BYTE3 d2s
	LD	HL,LWRD d2s
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	C,L
	LD	B,H
	LD	DE,27
	LD	A,BYTE3 printstring
	LD	HL,LWRD printstring
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 2230.	        printstring(30, d2s(ssss));      
	LD	DE,(?0820)
	LD	A,BYTE3 d2s
	LD	HL,LWRD d2s
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	C,L
	LD	B,H
	LD	DE,30
	LD	A,BYTE3 printstring
	LD	HL,LWRD printstring
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 2231.	        
; 2232.	}
	POP	DE
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 2233.	
; 2234.	void draw_max_len(char ml)
; 2235.	{
draw_max_len:
	PUSH	BC
	PUSH	DE
; 2236.	        gotoxy (21, 5);
	LD	C,5
	LD	E,21
	LD	A,BYTE3 gotoxy
	LD	HL,LWRD gotoxy
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 2237.	        printf ("m_dur=%02dmin", ml);
	LD	HL,0
	ADD	HL,SP
	LD	C,(HL)
	LD	B,0
	PUSH	BC
	LD	HL,?0825
	PUSH	HL
	LD	A,BYTE3 printf
	LD	HL,LWRD printf
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	AF
	POP	AF
; 2238.	}
	POP	HL
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 2239.	
; 2240.	extern unsigned int nfiles;
; 2241.	extern int playing;
; 2242.	extern vars_t vars;
; 2243.	
; 2244.	void Getnfiles(void)
; 2245.	{
Getnfiles:
	PUSH	BC
	PUSH	DE
; 2246.	        vars.depth =0;
	XOR	A
	LD	(vars+6),A
; 2247.	        playing = rand() % (nfiles);
	LD	A,BYTE3 rand
	LD	HL,LWRD rand
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	EX	DE,HL
	LD	BC,(nfiles)
	CALL	LWRD ?US_MOD_L02
	LD	(playing),DE
; 2248.	        next();
	LD	A,BYTE3 next
	LD	HL,LWRD next
	JP	LWRD ?1179
; 2249.	}
; 2250.	
; 2251.	
; 2252.	void waste4(void)
; 2253.	{
waste4:
; 2254.	        int EE;
; 2255.	        
; 2256.	        EE++; EE++; EE++; EE++; EE++; EE++; EE++; EE++; EE++; EE++; EE++; EE++; EE++; EE++; EE++; 
	LD	HL,(?0011+278)
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
	INC	HL
	LD	(?0011+278),HL
; 2257.	}
	JP	LWRD ?BANK_FAST_LEAVE_L08
	RSEG	CSTR
?0010:
	DEFB	'KSA SOFTWARE COMPILATION OF '
	DEFB	0
?0157:
	DEFB	'Sound Tracker Pro'
	DEFB	0
?0323:
	DEFB	'Sound Tracker'
	DEFB	0
?0766:
	DEFB	'SQ Tracker'
	DEFB	0
?0798:
	DEFB	'Pro Tracker v3'
	DEFB	0
?0805:
	DEFB	'No disk!'
	DEFB	0
?0807:
	DEFB	'Sector SRC error!'
	DEFB	0
?0809:
	DEFB	'Disk reading error!'
	DEFB	0
?0811:
	DEFB	'Unknown file format!'
	DEFB	0
?0813:
	DEFB	'Unknown disk!'
	DEFB	0
?0825:
	DEFB	'm_dur=%02dmin'
	DEFB	0
	RSEG	CONST
SQT_Table:
	DEFW	3421
	DEFW	3228
	DEFW	3047
	DEFW	2876
	DEFW	2715
	DEFW	2562
	DEFW	2419
	DEFW	2283
	DEFW	2155
	DEFW	2034
	DEFW	1920
	DEFW	1812
	DEFW	1710
	DEFW	1614
	DEFW	1524
	DEFW	1438
	DEFW	1359
	DEFW	1281
	DEFW	1209
	DEFW	1141
	DEFW	1077
	DEFW	1017
	DEFW	960
	DEFW	906
	DEFW	855
	DEFW	807
	DEFW	762
	DEFW	719
	DEFW	679
	DEFW	641
	DEFW	605
	DEFW	571
	DEFW	539
	DEFW	508
	DEFW	480
	DEFW	453
	DEFW	428
	DEFW	404
	DEFW	381
	DEFW	360
	DEFW	339
	DEFW	320
	DEFW	302
	DEFW	285
	DEFW	269
	DEFW	254
	DEFW	240
	DEFW	226
	DEFW	214
	DEFW	202
	DEFW	190
	DEFW	180
	DEFW	170
	DEFW	160
	DEFW	151
	DEFW	143
	DEFW	135
	DEFW	127
	DEFW	120
	DEFW	113
	DEFW	107
	DEFW	101
	DEFW	95
	DEFW	90
	DEFW	85
	DEFW	80
	DEFW	76
	DEFW	71
	DEFW	67
	DEFW	64
	DEFW	60
	DEFW	57
	DEFW	53
	DEFW	50
	DEFW	48
	DEFW	45
	DEFW	42
	DEFW	40
	DEFW	38
	DEFW	36
	DEFW	34
	DEFW	32
	DEFW	30
	DEFW	28
	DEFW	27
	DEFW	25
	DEFW	24
	DEFW	22
	DEFW	21
	DEFW	20
	DEFW	19
	DEFW	18
	DEFW	17
	DEFW	16
	DEFW	15
	DEFW	14
	RSEG	TEMP
?0011:
	DEFS	280
	RSEG	UDATA0
stp:
	DEFS	75
stc:
	DEFS	48
SQT_SI:
	DEFS	107
	RSEG	IDATA0
ST_Table:
	DEFS	192
KsaId:
	DEFS	2
?0818:
	DEFS	1
?0819:
	DEFS	1
?0820:
	DEFS	1
	RSEG	CDATA0
	DEFW	3832
	DEFW	3600
	DEFW	3424
	DEFW	3200
	DEFW	3032
	DEFW	2856
	DEFW	2696
	DEFW	2544
	DEFW	2400
	DEFW	2272
	DEFW	2136
	DEFW	2016
	DEFW	1916
	DEFW	1800
	DEFW	1712
	DEFW	1600
	DEFW	1516
	DEFW	1428
	DEFW	1348
	DEFW	1272
	DEFW	1200
	DEFW	1136
	DEFW	1068
	DEFW	1008
	DEFW	958
	DEFW	900
	DEFW	856
	DEFW	800
	DEFW	758
	DEFW	714
	DEFW	674
	DEFW	636
	DEFW	600
	DEFW	568
	DEFW	534
	DEFW	504
	DEFW	479
	DEFW	450
	DEFW	428
	DEFW	400
	DEFW	379
	DEFW	357
	DEFW	337
	DEFW	318
	DEFW	300
	DEFW	284
	DEFW	267
	DEFW	252
	DEFW	239
	DEFW	225
	DEFW	214
	DEFW	200
	DEFW	189
	DEFW	178
	DEFW	168
	DEFW	159
	DEFW	150
	DEFW	142
	DEFW	133
	DEFW	126
	DEFW	119
	DEFW	112
	DEFW	107
	DEFW	100
	DEFW	94
	DEFW	89
	DEFW	84
	DEFW	79
	DEFW	75
	DEFW	71
	DEFW	66
	DEFW	63
	DEFW	59
	DEFW	56
	DEFW	53
	DEFW	50
	DEFW	47
	DEFW	44
	DEFW	42
	DEFW	39
	DEFW	37
	DEFW	35
	DEFW	33
	DEFW	31
	DEFW	29
	DEFW	28
	DEFW	26
	DEFW	25
	DEFW	23
	DEFW	22
	DEFW	21
	DEFW	19
	DEFW	18
	DEFW	17
	DEFW	16
	DEFW	15
	DEFW	?0010
	DEFB	0
	DEFB	0
	DEFB	0
	END
