	NAME	bank2(17)
	RSEG	CODE(0)
	RSEG	CSTR(0)
	RSEG	CONST(0)
	RSEG	TEMP(0)
	RSEG	UDATA0(0)
	PUBLIC	PT1_Detect
	PUBLIC	PT1_GetInfo
	PUBLIC	PT1_GetRegisters
	PUBLIC	PT1_Init
	PUBLIC	PT1_PatternInterpreter
	PUBLIC	PT1_Play
	PUBLIC	PT1_SongInfoV
	PUBLIC	PT2_Detect
	PUBLIC	PT2_Detect0
	PUBLIC	PT2_Detect1
	PUBLIC	PT2_GetInfo
	PUBLIC	PT2_GetRegisters
	PUBLIC	PT2_Init
	PUBLIC	PT2_PatternInterpreter
	PUBLIC	PT2_Play
	PUBLIC	PT2_SongInfoV
	PUBLIC	PT2_Table
	PUBLIC	PT3NoteTable_ASM_34_35
	PUBLIC	PT3NoteTable_ASM_34r
	PUBLIC	PT3NoteTable_PT_33_34r
	PUBLIC	PT3NoteTable_PT_34_35
	PUBLIC	PT3NoteTable_REAL_34_35
	PUBLIC	PT3NoteTable_REAL_34r
	PUBLIC	PT3NoteTable_ST
	PUBLIC	PT3VolumeTable_33_34
	PUBLIC	PT3VolumeTable_35
	PUBLIC	PT3_ChangeRegisters
	PUBLIC	PT3_GetInfo
	PUBLIC	PT3_GetNoteFreq
	PUBLIC	PT3_GetTime
	PUBLIC	PT3_Init
	PUBLIC	PT3_PatternIntterpreter
	PUBLIC	PT3_Play_Chip
	EXTERN	abs
	EXTERN	ay_sys_getword
	EXTERN	ay_sys_writeword
	EXTERN	ay_writeay
	PUBLIC	data0
	EXTERN	memcpy
	EXTERN	memset
	EXTERN	strcpy
	EXTERN	strncpy
	EXTERN	?CLZ80B_4_06_L00
	EXTERN	?UC_DIV_L01
	EXTERN	?SS_DIV_L02
	EXTERN	?S_MUL_L02
	EXTERN	?SL_DIV_L03
	EXTERN	?SL_MOD_L03
	EXTERN	?SL_CMP_L03
	EXTERN	?L_INC_L03
	EXTERN	?L_DEC_L03
	EXTERN	?L_ADDASG_L03
	EXTERN	?C_V_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.	
; 15.	
; 16.	
; 17.	
; 18.	
; 19.	
; 20.	
; 21.	
; 22.	////////////////////////////////////////////////////
; 23.	
; 24.	
; 25.	
; 26.	typedef struct 
; 27.	{
; 28.	    unsigned char PT2_Delay;
; 29.	    unsigned char PT2_NumberOfPositions;
; 30.	    unsigned char PT2_LoopPosition;
; 31.	    unsigned char PT2_SamplesPointers0[64];
; 32.	    unsigned char PT2_OrnamentsPointers0[32];
; 33.	    unsigned char PT2_PatternsPointer0, PT2_PatternsPointer1;
; 34.	    char PT2_MusicName[30];
; 35.	    unsigned char PT2_PositionList[65535 - 131];
; 36.	} PT2_File;
; 37.	
; 38.	typedef struct 
; 39.	{
; 40.	    unsigned char DelayCounter, Delay, CurrentPosition;
; 41.	} PT2_Parameters;
; 42.	
; 43.	
; 44.	typedef struct 
; 45.	{
; 46.	    unsigned int Address_In_Pattern, OrnamentPointer, SamplePointer, Ton;
; 47.	    unsigned char Loop_Ornament_Position, Ornament_Length, Position_In_Ornament, Loop_Sample_Position, Sample_Length, Position_In_Sample, Volume, Number_Of_Notes_To_Skip, Note, Slide_To_Note,Amplitude;
; 48.	    signed char Current_Ton_Sliding, Ton_Delta;
; 49.	    long int GlissType;
; 50.	    bool Envelope_Enabled, Enabled;
; 51.	    signed char Glissade, Addition_To_Noise, Note_Skip_Counter;
; 52.	} PT2_Channel_Parameters;
; 53.	
; 54.	typedef struct 
; 55.	{
; 56.	    PT2_Parameters PT2;
; 57.	    PT2_Channel_Parameters PT2_A, PT2_B, PT2_C;
; 58.	} PT2_SongInfo;
; 59.	
; 60.	
; 61.	#define PT2_A ((PT2_SongInfo *)info->data)->PT2_A
; 62.	#define PT2_B ((PT2_SongInfo *)info->data)->PT2_B
; 63.	#define PT2_C ((PT2_SongInfo *)info->data)->PT2_C
; 64.	#define PT2 ((PT2_SongInfo *)info->data)->PT2
; 65.	
; 66.	#define PT2_SamplesPointers(x) (header->PT2_SamplesPointers0 [(x) * 2] | (header->PT2_SamplesPointers0 [(x) * 2 + 1] << 8))
; 67.	#define PT2_OrnamentsPointers(x) (header->PT2_OrnamentsPointers0 [(x) * 2] | (header->PT2_OrnamentsPointers0 [(x) * 2 + 1] << 8))
; 68.	
; 69.	//#define PT2_OrnamentsPointers(x) (header->PT2_OrnamentsPointers0 [(x) * 2] + (header->PT2_OrnamentsPointers0 [(x) * 2 + 1] * 256))
; 70.	
; 71.	#define PT2_PositionList(x) (header->PT2_PositionList [(x)])
; 72.	#define PT2_PatternsPointer (header->PT2_PatternsPointer0 | (header->PT2_PatternsPointer1 << 8))
; 73.	#define PT2_Delay (header->PT2_Delay)
; 74.	#define PT2_NumberOfPositions (header->PT2_NumberOfPositions)
; 75.	#define PT2_LoopPosition (header->PT2_LoopPosition)
; 76.	
; 77.	PT2_SongInfo PT2_SongInfoV;
; 78.	
; 79.	void PT2_Init(AYSongInfo * info)
; 80.	{
PT2_Init:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 81.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010),HL
; 82.	    PT2_File * header = (PT2_File *)module;
	LD	(?0010+2),HL
; 83.	    
; 84.	    info->data = (void *)& PT2_SongInfoV;
	LD	(IX+4),LOW(PT2_SongInfoV)
	LD	(IX+5),HIGH(PT2_SongInfoV)
; 85.	    
; 86.	        
; 87.	    memset(&PT2_A, 0, sizeof(PT2_Channel_Parameters));
	LD	BC,30
	PUSH	BC
	CALL	LWRD ?1240
	POP	AF
; 88.	    memset(&PT2_B, 0, sizeof(PT2_Channel_Parameters));
	LD	HL,30
	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 ?1241
	POP	AF
; 89.	    memset(&PT2_C, 0, sizeof(PT2_Channel_Parameters));
	LD	HL,30
	PUSH	HL
	LD	C,H
	LD	B,H
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,63
	ADD	HL,DE
	EX	DE,HL
	CALL	LWRD ?1241
	POP	AF
; 90.	    
; 91.	    PT2.DelayCounter = 1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	(HL),1
; 92.	    PT2.Delay = PT2_Delay;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	PUSH	HL
	LD	HL,(?0010+2)
	LD	B,(HL)
	POP	HL
	LD	(HL),B
; 93.	    PT2.CurrentPosition = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	(HL),0
; 94.	
; 95.	    PT2_A.Address_In_Pattern = ay_sys_getword(&module[PT2_PatternsPointer+ PT2_PositionList(0) * 6]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,99
	LD	BC,(?0010+2)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,100
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	LD	HL,131
	LD	DE,(?0010+2)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	LD	E,L
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	ADD	HL,BC
	LD	BC,(?0010)
	CALL	LWRD ?1243
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 96.	    PT2_B.Address_In_Pattern = ay_sys_getword(&module [PT2_PatternsPointer + PT2_PositionList(0) * 6 + 2]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,33
	ADD	HL,BC
	PUSH	HL
	LD	HL,99
	LD	BC,(?0010+2)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,100
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	LD	HL,131
	LD	DE,(?0010+2)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	LD	E,L
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	ADD	HL,BC
	LD	BC,(?0010)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	CALL	LWRD ?1244
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 97.	    PT2_C.Address_In_Pattern = ay_sys_getword(&module [PT2_PatternsPointer + PT2_PositionList(0) * 6 + 4]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,63
	ADD	HL,BC
	PUSH	HL
	LD	HL,99
	LD	BC,(?0010+2)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,100
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	LD	HL,131
	LD	DE,(?0010+2)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	LD	E,L
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	ADD	HL,BC
	LD	BC,(?0010)
	ADD	HL,BC
	LD	DE,4
	ADD	HL,DE
	CALL	LWRD ?1245
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 98.	
; 99.	    PT2_A.OrnamentPointer = PT2_OrnamentsPointers(0);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,5
	ADD	HL,BC
	PUSH	HL
	LD	HL,67
	LD	BC,(?0010+2)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,68
	ADD	HL,BC
	LD	B,(HL)
	LD	C,A
	LD	A,D
	OR	B
	LD	B,A
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 100.	    PT2_A.Ornament_Length = module[PT2_A.OrnamentPointer];
	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,(?0010)
	ADD	HL,BC
	LD	D,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,12
	ADD	HL,BC
	LD	(HL),D
; 101.	    PT2_A.OrnamentPointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,5
	ADD	HL,BC
	INC	(HL)
	INC	HL
	JR	NZ,?0898
	INC	(HL)
?0898:
; 102.	    PT2_A.Loop_Ornament_Position = module[PT2_A.OrnamentPointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0010)
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,11
	ADD	HL,DE
	LD	(HL),B
; 103.	    PT2_A.OrnamentPointer++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,5
	ADD	HL,BC
	INC	(HL)
	INC	HL
	JR	NZ,?0899
	INC	(HL)
?0899:
; 104.	    PT2_A.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,28
	ADD	HL,BC
	LD	(HL),B
; 105.	    PT2_A.Position_In_Sample = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,16
	ADD	HL,BC
	LD	(HL),B
; 106.	    PT2_A.Position_In_Ornament = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,13
	ADD	HL,BC
	LD	(HL),B
; 107.	    PT2_A.Addition_To_Noise = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,31
	ADD	HL,BC
	LD	(HL),B
; 108.	    PT2_A.Glissade = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	DEC	BC
	ADD	HL,BC
	LD	(HL),B
; 109.	    PT2_A.Current_Ton_Sliding=0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,22
	ADD	HL,BC
	LD	(HL),B
; 110.	    PT2_A.GlissType = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	INC	BC
	ADD	HL,BC
	XOR	A
	LD	(HL),A
	INC	HL
	LD	(HL),A
	INC	HL
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 111.	    PT2_A.Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,29
	ADD	HL,BC
	LD	(HL),B
; 112.	    PT2_A.Number_Of_Notes_To_Skip = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,18
	ADD	HL,BC
	LD	(HL),B
; 113.	    PT2_A.Note_Skip_Counter = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,32
	ADD	HL,BC
	LD	(HL),B
; 114.	    PT2_A.Volume = 15;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,17
	ADD	HL,BC
	LD	(HL),15
; 115.	    PT2_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
; 116.	
; 117.	    PT2_B.OrnamentPointer = PT2_A.OrnamentPointer;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,35
	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
; 118.	    PT2_B.Loop_Ornament_Position = PT2_A.Loop_Ornament_Position;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,E
	LD	B,D
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	E,41
	ADD	HL,DE
	LD	(HL),B
; 119.	    PT2_B.Ornament_Length = PT2_A.Ornament_Length;
	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)
	INC	DE
	ADD	HL,DE
	LD	(HL),B
; 120.	    PT2_B.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,58
	ADD	HL,BC
	LD	(HL),B
; 121.	    PT2_B.Position_In_Sample = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,46
	ADD	HL,BC
	LD	(HL),B
; 122.	    PT2_B.Position_In_Ornament = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,43
	ADD	HL,BC
	LD	(HL),B
; 123.	    PT2_B.Addition_To_Noise = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,61
	ADD	HL,BC
	LD	(HL),B
; 124.	    PT2_B.Glissade = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	DEC	BC
	ADD	HL,BC
	LD	(HL),B
; 125.	    PT2_B.Current_Ton_Sliding = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,52
	ADD	HL,BC
	LD	(HL),B
; 126.	    PT2_B.GlissType = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	INC	BC
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
	INC	HL
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 127.	    PT2_B.Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,59
	ADD	HL,BC
	LD	(HL),B
; 128.	    PT2_B.Number_Of_Notes_To_Skip = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,48
	ADD	HL,BC
	LD	(HL),B
; 129.	    PT2_B.Note_Skip_Counter = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,62
	ADD	HL,BC
	LD	(HL),B
; 130.	    PT2_B.Volume = 15;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,47
	ADD	HL,BC
	LD	(HL),15
; 131.	    PT2_B.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,39
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 132.	
; 133.	    PT2_C.OrnamentPointer = PT2_A.OrnamentPointer;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,65
	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
; 134.	    PT2_C.Loop_Ornament_Position = PT2_A.Loop_Ornament_Position;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,11
	ADD	HL,BC
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	E,71
	ADD	HL,DE
	LD	(HL),B
; 135.	    PT2_C.Ornament_Length = PT2_A.Ornament_Length;
	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)
	INC	DE
	ADD	HL,DE
	LD	(HL),B
; 136.	    PT2_C.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,88
	ADD	HL,BC
	LD	(HL),B
; 137.	    PT2_C.Position_In_Sample = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,76
	ADD	HL,BC
	LD	(HL),B
; 138.	    PT2_C.Position_In_Ornament = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,73
	ADD	HL,BC
	LD	(HL),B
; 139.	    PT2_C.Addition_To_Noise = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,91
	ADD	HL,BC
	LD	(HL),B
; 140.	    PT2_C.Glissade = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	DEC	BC
	ADD	HL,BC
	LD	(HL),B
; 141.	    PT2_C.Current_Ton_Sliding = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,82
	ADD	HL,BC
	LD	(HL),B
; 142.	    PT2_C.GlissType = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	BC
	INC	BC
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
	INC	HL
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 143.	    PT2_C.Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,89
	ADD	HL,BC
	LD	(HL),B
; 144.	    PT2_C.Number_Of_Notes_To_Skip = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,78
	ADD	HL,BC
	LD	(HL),B
; 145.	    PT2_C.Note_Skip_Counter = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,92
	ADD	HL,BC
	LD	(HL),B
; 146.	    PT2_C.Volume = 15;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,77
	ADD	HL,BC
	LD	(HL),15
; 147.	    PT2_C.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,69
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 148.	    
; 149.	//    ay_resetay(&info, 0);
; 150.	}
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1240:
	LD	C,B
	LD	E,(IX+4)
	LD	D,(IX+5)
	INC	DE
	INC	DE
	INC	DE
?1241:
	LD	A,BYTE3 memset
	LD	HL,LWRD memset
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
?1246:
	ADD	HL,BC
	LD	BC,4
?1243:
	ADD	HL,BC
?1245:
	EX	DE,HL
?1244:
	LD	A,BYTE3 ay_sys_getword
	LD	HL,LWRD ay_sys_getword
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	EX	DE,HL
	RET
; 151.	
; 152.	unsigned char PT2_Detect0(unsigned char *module, unsigned int length, AYSongInfo * s)
; 153.	{
PT2_Detect0:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
	PUSH	DE
	POP	IY
; 154.	    int j, j1, j2;
; 155.	    long int F_Length;
; 156.	    
; 157.	
; 158.	    
; 159.	    PT2_File * header = (PT2_File *)module;
	LD	(?0010+14),DE
; 160.	    
; 161.	        
; 162.	    //return true;
; 163.	    
; 164.	    
; 165.	    if(length < 132)
	LD	DE,132
	LD	L,C
	LD	H,B
	AND	A
	SBC	HL,DE
	JP	C,?0925
?0011:
; 166.	        return false;
?0012:
; 167.	        
; 168.	     s->err  = 10;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	LD	(HL),10
	INC	HL
	LD	(HL),D
; 169.	        
; 170.	    if(PT2_PatternsPointer> length)
	LD	HL,99
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,100
	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,?0925
?0013:
; 171.	        return false;
?0014:
; 172.	        
; 173.	     s->err  = 20;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	LD	(HL),20
	INC	HL
	LD	(HL),D
; 174.	    
; 175.	    if(module[PT2_PatternsPointer-1] != 255)
	LD	HL,99
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,100
	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,?0925
?0015:
; 176.	        return false;
?0016:
; 177.	    
; 178.	    s->err  = 30;    
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	LD	(HL),30
	INC	HL
	LD	(HL),B
; 179.	        
; 180.	    if(PT2_SamplesPointers(0) != 0)
	LD	HL,(?0010+14)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	HL,4
	LD	DE,(?0010+14)
	ADD	HL,DE
	LD	D,(HL)
	LD	H,C
	LD	A,B
	OR	D
	OR	H
	JP	NZ,?0925
?0017:
; 181.	        return false;
?0018:
; 182.	        
; 183.	    s->err  = 50;    
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	LD	(HL),50
	INC	HL
	LD	(HL),B
; 184.	    
; 185.	    j = 0;
	LD	L,B
	LD	H,B
	LD	(?0010+4),HL
; 186.	    memcpy((char *)&j, (char *)&module[PT2_OrnamentsPointers(0)], 3);
	LD	C,3
	PUSH	BC
	LD	L,67
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,68
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	PUSH	IY
	POP	BC
	ADD	HL,BC
	LD	C,L
	LD	B,H
	LD	DE,?0010+4
	LD	A,BYTE3 memcpy
	LD	HL,LWRD memcpy
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	AF
; 187.	    if(j != 1)
	LD	HL,(?0010+4)
	LD	A,1
	XOR	L
	OR	H
	JP	NZ,?0925
?0019:
; 188.	    {
; 189.	       // memcpy(&s->counter, &module[0x0779], 2); 
; 190.	        return false;
; 191.	    }
?0020:
; 192.	        
; 193.	    //s->err = 90;
; 194.	
; 195.	    j = ay_sys_getword(&module[PT2_PatternsPointer]);
	LD	HL,99
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,100
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	PUSH	IY
	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	(?0010+4),HL
; 196.	    if(j > length)
	LD	C,L
	LD	B,H
	PUSH	IX
	POP	HL
	AND	A
	SBC	HL,BC
	JP	C,?0925
?0021:
; 197.	        return false;
?0022:
; 198.	    if(j - (long int)(PT2_PatternsPointer) <= 0)
	LD	HL,99
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,100
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	E,A
	LD	D,E
	PUSH	DE
	PUSH	HL
	LD	HL,(?0010+4)
	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
	PUSH	HL
	PUSH	DE
	LD	BC,0
	LD	L,C
	LD	H,B
	CALL	LWRD ?SL_CMP_L03
	JP	NC,?0925
?0023:
; 199.	        return false;
?0024:
; 200.	    if(((j - (long int)(PT2_PatternsPointer)) % 6) != 2)
	PUSH	HL
	LD	L,6
	PUSH	HL
	LD	L,99
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,100
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	E,A
	LD	D,E
	PUSH	DE
	PUSH	HL
	LD	HL,(?0010+4)
	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
	LD	C,L
	LD	B,H
	EX	DE,HL
	CALL	LWRD ?SL_MOD_L03
	LD	A,2
	XOR	L
	OR	H
	OR	C
	OR	B
	JP	NZ,?0925
?0025:
; 201.	        return false;
?0026:
; 202.	
; 203.	   // s->err  = 190;
; 204.	
; 205.	
; 206.	    j1 = 0;
	LD	L,A
	LD	H,A
	LD	(?0010+6),HL
; 207.	    j2 = 0;
?0915:
	LD	(?0010+8),HL
?0028:
; 208.	    while(((j2 < 256) && (j2 <= length - 131)) && (header->PT2_PositionList[j2] < 128))
	LD	BC,33024
	LD	A,128
	XOR	H
	LD	H,A
	SBC	HL,BC
	JR	NC,?0027
	LD	HL,65405
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	BC,(?0010+8)
	AND	A
	SBC	HL,BC
	JR	C,?0027
?0031:
?0030:
	LD	L,C
	LD	H,B
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	BC,131
	ADD	HL,BC
	LD	A,(HL)
	CP	128
	JR	NC,?0027
?0033:
?0032:
?0029:
; 209.	    {
; 210.	        if((unsigned long)(j1) < header->PT2_PositionList[j2])
	LD	HL,(?0010+8)
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	BC,131
	ADD	HL,BC
	LD	L,(HL)
	LD	C,B
	LD	H,C
	PUSH	BC
	PUSH	HL
	LD	HL,(?0010+6)
	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,?0035
?0034:
; 211.	            j1 = header->PT2_PositionList[j2];
	LD	HL,(?0010+8)
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	BC,131
	ADD	HL,BC
	LD	C,(HL)
	LD	(?0010+6),BC
?0035:
; 212.	        j2++;
	LD	HL,(?0010+8)
	INC	HL
	JR	?0915
?0027:
; 213.	    }
; 214.	    if(((j - (long int)(PT2_PatternsPointer)) / 6) != j1 + 1)
	LD	HL,(?0010+6)
	INC	HL
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	PUSH	BC
	PUSH	HL
	LD	HL,0
	PUSH	HL
	LD	L,6
	PUSH	HL
	LD	L,99
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,100
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	E,A
	LD	D,E
	PUSH	DE
	PUSH	HL
	LD	HL,(?0010+4)
	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
	LD	C,L
	LD	B,H
	EX	DE,HL
	CALL	LWRD ?SL_DIV_L03
	LD	E,C
	LD	D,B
	POP	BC
	AND	A
	SBC	HL,BC
	POP	BC
	JP	NZ,?0925
	EX	DE,HL
	SBC	HL,BC
	JP	NZ,?0925
?0036:
; 215.	        return false;
?0037:
; 216.	
; 217.	   // s->err  = 290;
; 218.	
; 219.	
; 220.	    j = 15;
	LD	HL,15
?0916:
	LD	(?0010+4),HL
?0039:
; 221.	    while((j > 0) && (PT2_OrnamentsPointers(j) == 0))
	LD	C,L
	LD	B,H
	LD	HL,0
	OR	128
	SBC	HL,BC
	JP	PO,?0914
	XOR	H
?0914:
	JP	P,?0038
	LD	L,C
	LD	H,B
	ADD	HL,HL
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	DE,67
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0010+4)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,68
	ADD	HL,BC
	LD	B,(HL)
	LD	H,E
	LD	A,D
	OR	B
	OR	H
	JR	NZ,?0038
?0042:
?0041:
?0040:
; 222.	        j--;
	LD	HL,(?0010+4)
	DEC	HL
	JR	?0916
?0038:
; 223.	    F_Length = PT2_OrnamentsPointers(j) + module[PT2_OrnamentsPointers(j)] + 2;
	LD	HL,(?0010+4)
	ADD	HL,HL
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	DE,67
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0010+4)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,68
	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,(HL)
	LD	B,D
	PUSH	BC
	LD	HL,(?0010+4)
	ADD	HL,HL
	LD	DE,(?0010+14)
	ADD	HL,DE
	LD	DE,67
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0010+4)
	ADD	HL,HL
	LD	BC,(?0010+14)
	ADD	HL,BC
	LD	BC,68
	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	(?0010+10),HL
	LD	(?0010+12),BC
; 224.	    if(F_Length > (length+256))
	PUSH	BC
	PUSH	HL
	PUSH	IX
	POP	HL
	LD	A,1
	ADD	A,H
	LD	H,A
	LD	C,D
	LD	B,D
	CALL	LWRD ?SL_CMP_L03
	JR	NC,?0044
?0043:
; 225.	    {
; 226.	       //  s->err  =F_Length;
; 227.	        return false;
?0925:
	LD	L,0
; 228.	        }
	JR	?0045
?0044:
; 229.	
; 230.	    PT2_NumberOfPositions = j2;
	LD	HL,(?0010+14)
	INC	HL
	LD	A,(?0010+8)
	LD	(HL),A
; 231.	    return true;
	LD	L,1
; 232.	}
?0045:
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 233.	
; 234.	bool PT2_Detect1(unsigned char *module, unsigned int length, AYSongInfo * s)
; 235.	{
PT2_Detect1:
	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
; 236.	    int j, j1, j2, j3;
; 237.	    long int F_Length;
; 238.	    
; 239.	    
; 240.	   // return false;
; 241.	    
; 242.	    PT2_File *header = (PT2_File *)module;
	LD	(?0010+28),DE
; 243.	    
; 244.	    if(length < 132)
	LD	DE,132
	LD	L,C
	LD	H,B
	AND	A
	SBC	HL,DE
	JP	C,?0963
?0046:
; 245.	        return false;
?0047:
; 246.	    if(PT2_PatternsPointer > length)
	LD	HL,99
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,100
	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,?0963
?0048:
; 247.	        return false;
?0049:
; 248.	    if(module[PT2_PatternsPointer-1] != 255)
	LD	HL,99
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,100
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	PUSH	IX
	POP	BC
	ADD	HL,BC
	DEC	HL
	LD	B,(HL)
	INC	B
	JP	NZ,?0963
?0050:
; 249.	        return false;
?0051:
; 250.	    if(PT2_SamplesPointers(0) != 0)
	LD	HL,(?0010+28)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	HL,4
	LD	DE,(?0010+28)
	ADD	HL,DE
	LD	D,(HL)
	LD	H,C
	LD	A,B
	OR	D
	OR	H
	JP	NZ,?0963
?0052:
; 251.	        return false;
?0053:
; 252.	
; 253.	     
; 254.	
; 255.	    j3 = PT2_SamplesPointers(0);
	LD	HL,(?0010+28)
	INC	HL
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	HL,4
	LD	DE,(?0010+28)
	ADD	HL,DE
	LD	H,(HL)
	LD	E,C
	LD	A,B
	OR	H
	LD	D,A
	LD	(?0010+22),DE
; 256.	    if(PT2_OrnamentsPointers(0) - j3 - 2 > length)
	LD	HL,67
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,68
	ADD	HL,BC
	LD	B,(HL)
	POP	HL
	LD	E,L
	LD	A,H
	OR	B
	LD	D,A
	EX	DE,HL
	LD	BC,(?0010+22)
	SBC	HL,BC
	LD	C,L
	LD	B,H
	DEC	BC
	DEC	BC
	PUSH	IY
	POP	HL
	AND	A
	SBC	HL,BC
	JP	C,?0963
?0054:
; 257.	        return false;
?0055:
; 258.	    
; 259.	     s->err = 400;
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),144
	INC	HL
	LD	(HL),1
; 260.	        
; 261.	    if(PT2_OrnamentsPointers(0)- j3 < 0)
	LD	HL,67
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	A,D
	LD	HL,68
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	LD	BC,(?0010+22)
	SBC	HL,BC
	BIT	7,H
	JP	NZ,?0963
?0056:
; 262.	        return false;
?0057:
; 263.	
; 264.	     s->err = 500;
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),244
	INC	HL
	LD	(HL),1
; 265.	
; 266.	    j = 0;
	LD	L,D
	LD	H,D
	LD	(?0010+16),HL
; 267.	    memcpy((char *)&j, (char *)&module[PT2_OrnamentsPointers(0)], 3);
	LD	BC,3
	PUSH	BC
	LD	L,67
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,68
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	C,L
	LD	B,H
	LD	DE,?0010+16
	LD	A,BYTE3 memcpy
	LD	HL,LWRD memcpy
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	AF
; 268.	    if(j != 1)
	LD	HL,(?0010+16)
	LD	A,1
	XOR	L
	OR	H
	JP	NZ,?0963
?0058:
; 269.	        return false;
?0059:
; 270.	  
; 271.	    s->err = 1000;
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),232
	INC	HL
	LD	(HL),3
; 272.	
; 273.	    j = ay_sys_getword(&module[PT2_PatternsPointer]);
	LD	HL,99
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,100
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	CALL	LWRD ?1242
; 274.	    j -= j3;
; 275.	    if(j > length)
	PUSH	IY
	POP	HL
	AND	A
	SBC	HL,BC
	JP	C,?0963
?0060:
; 276.	        return false;
?0061:
; 277.	    
; 278.	    s->err = 2000; 
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),208
	INC	HL
	LD	(HL),7
; 279.	       
; 280.	    if(j - (long int)(PT2_PatternsPointer) <= 0)
	LD	HL,99
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,100
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	E,A
	LD	D,E
	PUSH	DE
	PUSH	HL
	LD	HL,(?0010+16)
	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
	PUSH	HL
	PUSH	DE
	LD	BC,0
	LD	L,C
	LD	H,B
	CALL	LWRD ?SL_CMP_L03
	JP	NC,?0963
?0062:
; 281.	        return false;
?0063:
; 282.	        
; 283.	    s->err = 3000;
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),184
	INC	HL
	LD	(HL),11
; 284.	        
; 285.	    if(((j - (long int)(PT2_PatternsPointer)) % 6) != 2)
	LD	H,B
	PUSH	BC
	LD	L,6
	PUSH	HL
	LD	L,99
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,100
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	E,A
	LD	D,E
	PUSH	DE
	PUSH	HL
	LD	HL,(?0010+16)
	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
	LD	C,L
	LD	B,H
	EX	DE,HL
	CALL	LWRD ?SL_MOD_L03
	LD	A,2
	XOR	L
	OR	H
	OR	C
	OR	B
	JP	NZ,?0963
?0064:
; 286.	        return false;
?0065:
; 287.	
; 288.	   s->err = 4000;
	EXX
	PUSH	BC
	EXX
	POP	HL
	LD	(HL),160
	INC	HL
	LD	(HL),15
; 289.	
; 290.	    j1 = 0;
	LD	L,A
	LD	H,A
	LD	(?0010+18),HL
; 291.	    j2 = 0;
?0948:
	LD	(?0010+20),HL
?0067:
; 292.	    while(((j2 < 256) && (j2 <= length - 131)) && (header->PT2_PositionList[j2] < 128))
	LD	BC,33024
	LD	A,128
	XOR	H
	LD	H,A
	SBC	HL,BC
	JR	NC,?0066
	LD	HL,65405
	PUSH	IY
	POP	BC
	ADD	HL,BC
	LD	BC,(?0010+20)
	AND	A
	SBC	HL,BC
	JR	C,?0066
?0070:
?0069:
	LD	L,C
	LD	H,B
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	BC,131
	ADD	HL,BC
	LD	A,(HL)
	CP	128
	JR	NC,?0066
?0072:
?0071:
?0068:
; 293.	    {
; 294.	        if((unsigned long)(j1) < header->PT2_PositionList[j2])
	LD	HL,(?0010+20)
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	BC,131
	ADD	HL,BC
	LD	L,(HL)
	LD	C,B
	LD	H,C
	PUSH	BC
	PUSH	HL
	LD	HL,(?0010+18)
	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,?0074
?0073:
; 295.	            j1 = header->PT2_PositionList[j2];
	LD	HL,(?0010+20)
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	BC,131
	ADD	HL,BC
	LD	C,(HL)
	LD	(?0010+18),BC
?0074:
; 296.	        j2++;
	LD	HL,(?0010+20)
	INC	HL
	JR	?0948
?0066:
; 297.	    }
; 298.	    if(((j - (long int)(PT2_PatternsPointer)) / 6) != j1 + 1)
	LD	HL,(?0010+18)
	INC	HL
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	PUSH	BC
	PUSH	HL
	LD	HL,0
	PUSH	HL
	LD	L,6
	PUSH	HL
	LD	L,99
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,100
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	E,A
	LD	D,E
	PUSH	DE
	PUSH	HL
	LD	HL,(?0010+16)
	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
	LD	C,L
	LD	B,H
	EX	DE,HL
	CALL	LWRD ?SL_DIV_L03
	LD	E,C
	LD	D,B
	POP	BC
	AND	A
	SBC	HL,BC
	POP	BC
	JP	NZ,?0963
	EX	DE,HL
	SBC	HL,BC
	JP	NZ,?0963
?0075:
; 299.	        return false;
?0076:
; 300.	
; 301.	     //s->err = 5000;
; 302.	
; 303.	    j = 15;
	LD	HL,15
?0949:
	LD	(?0010+16),HL
?0078:
; 304.	    while((j > 0) && (PT2_OrnamentsPointers(j) == j3))
	LD	C,L
	LD	B,H
	LD	HL,0
	OR	128
	SBC	HL,BC
	JP	PO,?0946
	XOR	H
?0946:
	JP	P,?0077
	LD	L,C
	LD	H,B
	ADD	HL,HL
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	DE,67
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0010+16)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,68
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	LD	BC,(?0010+22)
	SBC	HL,BC
	JR	NZ,?0077
?0081:
?0080:
?0079:
; 305.	        j--;
	LD	HL,(?0010+16)
	DEC	HL
	JR	?0949
?0077:
; 306.	    F_Length = PT2_OrnamentsPointers(j) - j3 + module[PT2_OrnamentsPointers(j) - j3] + 2;
	LD	HL,(?0010+16)
	ADD	HL,HL
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	DE,67
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0010+16)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,68
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	LD	BC,(?0010+22)
	SBC	HL,BC
	PUSH	IX
	POP	DE
	ADD	HL,DE
	LD	E,(HL)
	LD	D,0
	PUSH	DE
	LD	HL,(?0010+16)
	ADD	HL,HL
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	BC,67
	ADD	HL,BC
	LD	C,(HL)
	LD	HL,(?0010+16)
	ADD	HL,HL
	LD	DE,(?0010+28)
	ADD	HL,DE
	LD	DE,68
	ADD	HL,DE
	LD	D,(HL)
	LD	L,C
	LD	A,B
	OR	D
	LD	H,A
	POP	DE
	ADD	HL,DE
	LD	BC,(?0010+22)
	AND	A
	SBC	HL,BC
	INC	HL
	INC	HL
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	LD	(?0010+24),HL
	LD	(?0010+26),BC
; 307.	    if(F_Length > length + 400)
	PUSH	BC
	PUSH	HL
	LD	HL,400
	PUSH	IY
	POP	BC
	ADD	HL,BC
	LD	BC,0
	CALL	LWRD ?SL_CMP_L03
	JR	NC,?0083
?0082:
; 308.	    {
; 309.	        s->err = F_Length;
	LD	HL,(?0010+24)
	PUSH	HL
	EXX
	PUSH	BC
	EXX
	POP	HL
	POP	BC
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 310.	        return false;
?0963:
	LD	L,0
; 311.	    }
	JP	LWRD ?0096
?0083:
; 312.	
; 313.	    PT2_NumberOfPositions = j2;
	LD	HL,(?0010+28)
	INC	HL
	LD	A,(?0010+20)
	LD	(HL),A
; 314.	    for(j = 0; j < 32; j++)
	LD	L,C
	LD	H,B
?0950:
	LD	(?0010+16),HL
?0085:
	LD	BC,32800
	LD	A,B
	XOR	H
	LD	H,A
	SBC	HL,BC
	JR	NC,?0084
?0086:
; 315.	    {
; 316.	        ay_sys_writeword(&header->PT2_SamplesPointers0[j * 2], PT2_SamplesPointers(j) - j3);
	LD	HL,(?0010+16)
	ADD	HL,HL
	LD	BC,(?0010+28)
	ADD	HL,BC
	INC	HL
	INC	HL
	INC	HL
	LD	E,(HL)
	XOR	A
	LD	HL,(?0010+16)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,4
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	LD	BC,(?0010+22)
	SBC	HL,BC
	LD	C,L
	LD	B,H
	LD	HL,(?0010+16)
	ADD	HL,HL
	LD	DE,(?0010+28)
	ADD	HL,DE
	EX	DE,HL
	INC	DE
	INC	DE
	INC	DE
	LD	A,BYTE3 ay_sys_writeword
	LD	HL,LWRD ay_sys_writeword
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	HL,(?0010+16)
	INC	HL
	JR	?0950
?0084:
; 317.	    }
; 318.	    for(j = 0; j < 16; j++)
	LD	HL,0
?0951:
	LD	(?0010+16),HL
?0089:
	LD	BC,32784
	LD	A,B
	XOR	H
	LD	H,A
	SBC	HL,BC
	JR	NC,?0088
?0090:
; 319.	    {
; 320.	        ay_sys_writeword(&header->PT2_OrnamentsPointers0[j * 2], PT2_OrnamentsPointers(j) - j3);
	LD	HL,(?0010+16)
	ADD	HL,HL
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	DE,67
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0010+16)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,68
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	LD	BC,(?0010+22)
	SBC	HL,BC
	LD	C,L
	LD	B,H
	LD	HL,(?0010+16)
	ADD	HL,HL
	LD	DE,(?0010+28)
	ADD	HL,DE
	LD	DE,67
	ADD	HL,DE
	EX	DE,HL
	LD	A,BYTE3 ay_sys_writeword
	LD	HL,LWRD ay_sys_writeword
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	HL,(?0010+16)
	INC	HL
	JR	?0951
?0088:
; 321.	    }
; 322.	    for(j2 = 0; j2 < j1 * 3 + 1; j2++)
	LD	HL,0
?0952:
	LD	(?0010+20),HL
?0093:
	LD	HL,(?0010+18)
	LD	C,L
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	LD	C,L
	LD	B,H
	INC	BC
	LD	HL,(?0010+20)
	OR	128
	SBC	HL,BC
	JP	PO,?0947
	XOR	H
?0947:
	JP	P,?0092
?0094:
; 323.	    {
; 324.	        j = ay_sys_getword(&module[PT2_PatternsPointer+j2 * 2]);
	LD	HL,99
	LD	BC,(?0010+28)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,100
	ADD	HL,BC
	LD	H,(HL)
	LD	C,E
	OR	H
	LD	B,A
	LD	HL,(?0010+20)
	ADD	HL,HL
	ADD	HL,BC
	CALL	LWRD ?1242
; 325.	        j -= j3;
; 326.	        ay_sys_writeword(&module[PT2_PatternsPointer+j2 * 2], j);
	PUSH	BC
	LD	HL,99
	LD	DE,(?0010+28)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,100
	ADD	HL,DE
	LD	D,(HL)
	POP	HL
	LD	C,L
	LD	A,H
	OR	D
	LD	B,A
	LD	HL,(?0010+20)
	ADD	HL,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,(?0010+20)
	INC	HL
	JR	?0952
?0092:
; 327.	    }
; 328.	    return true;
	LD	L,1
; 329.	}
?0096:
	EXX
	POP	BC
	EXX
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1242:
	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	(?0010+16),HL
	LD	HL,?0010+16
	LD	BC,(?0010+22)
	LD	A,(HL)
	SUB	C
	LD	(HL),A
	INC	HL
	LD	A,(HL)
	SBC	A,B
	LD	(HL),A
	LD	BC,(?0010+16)
	RET
; 330.	
; 331.	bool PT2_Detect(unsigned char *module, unsigned int length, AYSongInfo * s)
; 332.	{
PT2_Detect:
	PUSH	IY
	PUSH	IX
	PUSH	DE
	PUSH	BC
	POP	IY
	LD	HL,10
	ADD	HL,SP
	LD	A,(HL)
	LD	IXL,A
	INC	HL
	LD	A,(HL)
	LD	IXH,A
; 333.	    if(!PT2_Detect0(module, length, s))
	PUSH	IX
	LD	A,BYTE3 PT2_Detect0
	LD	HL,LWRD PT2_Detect0
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	AF
	INC	L
	DEC	L
	JR	NZ,?0100
?0097:
; 334.	        if(!PT2_Detect1(module, length, s))
	PUSH	IX
	PUSH	IY
	POP	BC
	LD	HL,2
	ADD	HL,SP
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	LD	A,BYTE3 PT2_Detect1
	LD	HL,LWRD PT2_Detect1
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	AF
	INC	L
	DEC	L
	JR	Z,?0102
?0099:
; 335.	            return false;
?0100:
?0098:
; 336.	            
; 337.	    strcpy(s->player, "Pro Tracker v2");
	LD	BC,?0101
	LD	HL,74
	PUSH	IX
	POP	DE
	ADD	HL,DE
	EX	DE,HL
	LD	A,BYTE3 strcpy
	LD	HL,LWRD strcpy
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 338.	           
; 339.	        s->slow = 1;
	LD	(IX+109),1
; 340.	                   
; 341.	    return true;
	LD	L,1
; 342.	}
?0102:
	POP	AF
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 343.	
; 344.	const unsigned int PT2_Table[96] =
; 345.	{ 0xef8, 0xe10, 0xd60, 0xc80, 0xbd8, 0xb28, 0xa88, 0x9f0, 0x960, 0x8e0, 0x858, 0x7e0, 0x77c, 0x708, 0x6b0, 0x640, 0x5ec, 0x594, 0x544, 0x4f8, 0x4b0, 0x470, 0x42c, 0x3fd, 0x3be, 0x384, 0x358, 
; 346.	 0x320, 0x2f6, 0x2ca, 0x2a2, 0x27c, 0x258, 0x238, 0x216, 0x1f8, 0x1df, 0x1c2, 0x1ac, 0x190, 0x17b, 0x165, 0x151, 0x13e, 0x12c, 0x11c, 0x10a, 0xfc, 0xef, 0xe1, 0xd6, 0xc8, 0xbd, 0xb2, 0xa8, 0x9f,
; 347.	 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,
; 348.	 0x17, 0x16, 0x15, 0x13, 0x12, 0x11, 0x10, 0xf };
; 349.	
; 350.	void PT2_PatternInterpreter(AYSongInfo * info, PT2_Channel_Parameters * chan)
; 351.	{
PT2_PatternInterpreter:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
	PUSH	DE
	POP	IY
; 352.	    unsigned char * module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+30),HL
; 353.	    PT2_File * header = (PT2_File *)module;
	LD	(?0010+32),HL
; 354.	    bool quit, gliss;
; 355.	        unsigned char val;
; 356.	        
; 357.	    quit = false;
	XOR	A
	LD	(?0010+34),A
; 358.	    gliss = false;
	LD	(?0010+35),A
?0105:
; 359.	    
; 360.	        do
; 361.	    {
; 362.	        val = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+30)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+36),A
; 363.	        if(val >= 0xe1)
	CP	225
	JR	C,?0107
?0106:
; 364.	        {
; 365.	            chan->SamplePointer = PT2_SamplesPointers(val - 0xe0);
	LD	C,A
	LD	B,0
	LD	HL,65312
	ADD	HL,BC
	ADD	HL,HL
	LD	BC,(?0010+32)
	ADD	HL,BC
	INC	HL
	INC	HL
	INC	HL
	LD	E,(HL)
	LD	D,0
	PUSH	DE
	LD	L,A
	LD	H,D
	LD	DE,65312
	ADD	HL,DE
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,4
	ADD	HL,BC
	LD	B,(HL)
	POP	DE
	LD	(IX+4),E
	LD	A,D
	OR	B
	LD	(IX+5),A
; 366.	            chan->Sample_Length = module[chan->SamplePointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,(?0010+30)
	ADD	HL,BC
	LD	D,(HL)
	LD	(IX+12),D
; 367.	            chan->SamplePointer++;
	INC	(IX+4)
	JR	NZ,?0979
	INC	(IX+5)
?0979:
; 368.	            chan->Loop_Sample_Position = module[chan->SamplePointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+11),B
; 369.	            chan->SamplePointer++;
	INC	(IX+4)
	JP	NZ,?0159
	INC	(IX+5)
	JP	LWRD ?0159
?0107:
; 370.	        }
; 371.	        else if(val == 0xe0)
	CP	224
	JR	NZ,?0110
?0109:
; 372.	        {
; 373.	            chan->Position_In_Sample = 0;
	LD	(IX+13),0
; 374.	            chan->Position_In_Ornament = 0;
	LD	(IX+10),0
; 375.	            chan->Current_Ton_Sliding = 0;
	LD	(IX+19),0
; 376.	            chan->GlissType = 0;
	XOR	A
	LD	(IX+21),A
	LD	(IX+22),A
	LD	(IX+23),A
	LD	(IX+24),A
; 377.	            chan->Enabled = false;
	LD	(IX+26),A
; 378.	            quit = true;
	JP	LWRD ?0992
?0110:
; 379.	        }
; 380.	        else if(val >= 0x80 && val <= 0xdf)
	CP	128
	JR	C,?0113
	LD	B,A
	LD	A,223
	CP	B
	JR	C,?0113
?0115:
?0114:
?0112:
; 381.	        {
; 382.	            chan->Position_In_Sample = 0;
	LD	(IX+13),0
; 383.	            chan->Position_In_Ornament = 0;
	LD	(IX+10),0
; 384.	            chan->Current_Ton_Sliding = 0;
	LD	(IX+19),0
; 385.	            if(gliss)
	LD	A,(?0010+35)
	OR	A
	LD	A,B
	JR	Z,?0117
?0116:
; 386.	            {
; 387.	                chan->Slide_To_Note = val - 0x80;
	ADD	A,128
	LD	(IX+17),A
; 388.	                if(chan->GlissType == 1)
	LD	A,1
	XOR	(IX+21)
	OR	(IX+22)
	OR	(IX+23)
	OR	(IX+24)
	JR	NZ,?0120
?0118:
; 389.	                    chan->Note = chan->Slide_To_Note;
	LD	B,(IX+17)
	LD	(IX+16),B
?0119:
; 390.	            }
; 391.	            else
	JR	?0120
?0117:
; 392.	            {
; 393.	                chan->Note = val - 0x80;
	ADD	A,128
	LD	(IX+16),A
; 394.	                chan->GlissType = 0;
	XOR	A
	LD	(IX+21),A
	LD	(IX+22),A
	LD	(IX+23),A
	LD	(IX+24),A
?0120:
; 395.	            }
; 396.	            chan->Enabled = true;
	LD	(IX+26),1
; 397.	            quit = true;
	JR	?0992
?0113:
; 398.	        }
; 399.	        else if(val == 0x7f)
	LD	A,(?0010+36)
	INC	A
	JP	PO,?0123
?0122:
; 400.	            chan->Envelope_Enabled = false;
	LD	(IX+25),0
	JP	LWRD ?0159
?0123:
; 401.	        else if(val >= 0x71 && val <= 0x7e)
	LD	A,(?0010+36)
	CP	113
	JR	C,?0126
	LD	B,A
	LD	A,126
	CP	B
	JR	C,?0126
?0128:
?0127:
?0125:
; 402.	        {
; 403.	            chan->Envelope_Enabled = true;
	LD	(IX+25),1
; 404.	            ay_writeay(AY_ENV_SHAPE, val - 0x70);
	LD	A,B
	ADD	A,144
	LD	C,A
	LD	E,13
	CALL	LWRD ?1253
; 405.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0981
	INC	(HL)
?0981:
; 406.	            ay_writeay(AY_ENV_FINE, module[chan->Address_In_Pattern]);
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+30)
	ADD	HL,BC
	LD	C,(HL)
	LD	E,11
	CALL	LWRD ?1253
; 407.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0982
	INC	(HL)
?0982:
; 408.	            ay_writeay(AY_ENV_COARSE, module[chan->Address_In_Pattern]);
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+30)
	ADD	HL,BC
	LD	C,(HL)
	LD	E,12
	CALL	LWRD ?1253
	JP	LWRD ?0159
?0126:
; 409.	        }
; 410.	        else if(val == 0x70)
	LD	A,(?0010+36)
	CP	112
	JR	NZ,?0131
?0130:
; 411.	            quit = true;
?0992:
	LD	A,1
	LD	(?0010+34),A
	JP	LWRD ?0159
?0131:
; 412.	        else if(val >= 0x60 && val <= 0x6f)
	CP	96
	JR	C,?0134
	LD	B,A
	LD	A,111
	CP	B
	JR	C,?0134
?0136:
?0135:
?0133:
; 413.	        {
; 414.	            chan->OrnamentPointer = PT2_OrnamentsPointers(val - 0x60);
	LD	C,B
	LD	B,0
	LD	HL,65440
	ADD	HL,BC
	ADD	HL,HL
	LD	BC,(?0010+32)
	ADD	HL,BC
	LD	DE,67
	ADD	HL,DE
	LD	E,(HL)
	PUSH	DE
	LD	HL,(?0010+36)
	LD	H,D
	LD	DE,65440
	ADD	HL,DE
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,68
	ADD	HL,BC
	LD	B,(HL)
	POP	DE
	LD	(IX+2),E
	LD	A,D
	OR	B
	LD	(IX+3),A
; 415.	            chan->Ornament_Length = module[chan->OrnamentPointer];
	LD	L,(IX+2)
	LD	H,(IX+3)
	LD	BC,(?0010+30)
	ADD	HL,BC
	LD	D,(HL)
	LD	(IX+9),D
; 416.	            chan->OrnamentPointer++;
	INC	(IX+2)
	JR	NZ,?0983
	INC	(IX+3)
?0983:
; 417.	            chan->Loop_Ornament_Position = module[chan->OrnamentPointer];
	LD	L,(IX+2)
	LD	H,(IX+3)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+8),B
; 418.	            chan->OrnamentPointer++;
	INC	(IX+2)
	JR	NZ,?0984
	INC	(IX+3)
?0984:
; 419.	            chan->Position_In_Ornament = 0;
	LD	(IX+10),0
	JP	LWRD ?0159
?0134:
; 420.	        }
; 421.	        else if(val >= 0x20 && val <= 0x5f)
	LD	A,(?0010+36)
	CP	32
	JR	C,?0139
	LD	B,A
	LD	A,95
	CP	B
	JR	C,?0139
?0141:
?0140:
?0138:
; 422.	                            chan->Number_Of_Notes_To_Skip = val - 0x20;
	LD	A,B
	ADD	A,224
	LD	(IX+15),A
	JP	LWRD ?0159
?0139:
; 423.	        else if(val >= 0x10 && val <= 0x1f)
	LD	A,(?0010+36)
	CP	16
	JR	C,?0144
	LD	B,A
	LD	A,31
	CP	B
	JR	C,?0144
?0146:
?0145:
?0143:
; 424.	            chan->Volume = val - 0x10;
	LD	A,B
	ADD	A,240
	LD	(IX+14),A
	JP	LWRD ?0159
?0144:
; 425.	        else if(val == 0xf)
	LD	A,(?0010+36)
	CP	15
	JR	NZ,?0149
?0148:
; 426.	        {
; 427.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0985
	INC	(HL)
?0985:
; 428.	            PT2.Delay = module[chan->Address_In_Pattern];
	LD	L,(IY+4)
	LD	H,(IY+5)
	INC	HL
	PUSH	HL
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+30)
	ADD	HL,BC
	LD	B,(HL)
	POP	HL
	LD	(HL),B
	JP	LWRD ?0159
?0149:
; 429.	        }
; 430.	        else if(val == 0xe)
	CP	14
	JR	NZ,?0152
?0151:
; 431.	        {
; 432.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0986
	INC	(HL)
?0986:
; 433.	            chan->Glissade = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+30)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+27),B
; 434.	            chan->GlissType = 1;
	XOR	A
	LD	(IX+21),1
	JR	?0993
; 435.	            gliss = true;
?0152:
; 436.	        }
; 437.	        else if(val == 0xd)
	CP	13
	JR	NZ,?0155
?0154:
; 438.	        {
; 439.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0987
	INC	(HL)
?0987:
; 440.	            chan->Glissade = abs((signed char)(module[chan->Address_In_Pattern]));
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+30)
	CALL	LWRD ?1255
	LD	(IX+27),L
; 441.	            chan->Address_In_Pattern += 2; //Not use precalculated Ton_Delta
	PUSH	IX
	POP	HL
	LD	A,(HL)
	ADD	A,2
	LD	(HL),A
	JR	NC,?0988
	INC	HL
	INC	(HL)
?0988:
; 442.	            //to avoide error with first note of pattern
; 443.	            chan->GlissType = 2;
	XOR	A
	LD	(IX+21),2
?0993:
	LD	(IX+22),A
	LD	(IX+23),A
	LD	(IX+24),A
; 444.	            gliss = true;
	LD	A,1
	LD	(?0010+35),A
	JR	?0159
?0155:
; 445.	        }
; 446.	        else if(val == 0xc)
	CP	12
	JR	NZ,?0158
?0157:
; 447.	            chan->GlissType = 0;
	XOR	A
	LD	(IX+21),A
	LD	(IX+22),A
	LD	(IX+23),A
	LD	(IX+24),A
; 448.	        else
	JR	?0159
?0158:
; 449.	        {
; 450.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0989
	INC	(HL)
?0989:
; 451.	            chan->Addition_To_Noise = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+30)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+28),B
?0159:
?0156:
?0153:
?0150:
?0147:
?0142:
?0137:
?0132:
?0129:
?0124:
?0121:
?0111:
?0108:
; 452.	        }
; 453.	        chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?0990
	INC	(HL)
?0990:
; 454.	    }
; 455.	    while(!quit);
	LD	A,(?0010+34)
	OR	A
	JP	Z,?0105
?0103:
; 456.	    if(gliss && (chan->GlissType == 2))
	LD	A,(?0010+35)
	OR	A
	JR	Z,?0165
	LD	A,2
	XOR	(IX+21)
	OR	(IX+22)
	OR	(IX+23)
	OR	(IX+24)
	JR	NZ,?0165
?0163:
?0162:
?0160:
; 457.	    {
; 458.	        chan->Ton_Delta = abs(PT2_Table[chan->Slide_To_Note] - PT2_Table[chan->Note]);
	LD	L,(IX+16)
	LD	H,A
	ADD	HL,HL
	LD	BC,PT2_Table
	ADD	HL,BC
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	LD	L,(IX+17)
	LD	H,A
	ADD	HL,HL
	LD	DE,PT2_Table
	ADD	HL,DE
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	AND	A
	SBC	HL,BC
	EX	DE,HL
	CALL	LWRD ?1256
	LD	(IX+20),L
; 459.	        if(chan->Slide_To_Note > chan->Note)
	LD	A,(IX+16)
	CP	(IX+17)
	JR	NC,?0165
?0164:
; 460.	            chan->Glissade = -chan->Glissade;
	LD	A,(IX+27)
	NEG
	LD	(IX+27),A
?0165:
?0161:
; 461.	    }
; 462.	    chan->Note_Skip_Counter = chan->Number_Of_Notes_To_Skip;
	LD	B,(IX+15)
	LD	(IX+29),B
; 463.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1254:
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	E,3
?1253:
	LD	A,BYTE3 ay_writeay
	LD	HL,LWRD ay_writeay
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
?1255:
	ADD	HL,BC
	LD	E,(HL)
	LD	A,E
	RLCA
	SBC	A,A
	LD	D,A
?1256:
	LD	A,BYTE3 abs
	LD	HL,LWRD abs
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 464.	
; 465.	void PT2_GetRegisters(AYSongInfo * info, PT2_Channel_Parameters * chan, unsigned char * TempMixer)
; 466.	{
PT2_GetRegisters:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
; 467.	    unsigned char j, b0, b1;
; 468.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+40),HL
; 469.	    PT2_File *header = (PT2_File *)module;
	LD	(?0010+42),HL
; 470.	        
; 471.	    if(chan->Enabled)
	LD	HL,26
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	Z,?0167
?0166:
; 472.	    {
; 473.	        b0 = module[chan->SamplePointer + chan->Position_In_Sample * 3];
	LD	L,(IX+13)
	LD	C,L
	LD	H,0
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	LD	C,(IX+4)
	LD	B,(IX+5)
	ADD	HL,BC
	LD	BC,(?0010+40)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+38),A
; 474.	        b1 = module[chan->SamplePointer + chan->Position_In_Sample * 3 + 1];
	LD	L,(IX+13)
	LD	E,L
	LD	H,0
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	LD	E,(IX+4)
	LD	D,(IX+5)
	ADD	HL,DE
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	LD	(?0010+39),A
; 475.	        chan->Ton = module[chan->SamplePointer + chan->Position_In_Sample * 3 + 2] + (unsigned short)((b1 & 15) << 8);
	LD	L,(IX+13)
	LD	E,L
	LD	H,0
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	LD	E,(IX+4)
	LD	D,(IX+5)
	ADD	HL,DE
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	L,(HL)
	LD	B,0
	LD	E,B
	AND	15
	LD	D,A
	LD	H,B
	ADD	HL,DE
	LD	(IX+6),L
	LD	(IX+7),H
; 476.	        if((b0 & 4) == 0)
	LD	A,(?0010+38)
	BIT	2,A
	JR	NZ,?0169
?0168:
; 477.	            chan->Ton = -chan->Ton;
	AND	A
	LD	L,B
	LD	H,B
	LD	C,(IX+6)
	LD	B,(IX+7)
	SBC	HL,BC
	LD	(IX+6),L
	LD	(IX+7),H
?0169:
; 478.	        j = chan->Note + module[chan->OrnamentPointer + chan->Position_In_Ornament];
	LD	C,(IX+10)
	LD	B,E
	LD	L,(IX+2)
	LD	H,(IX+3)
	ADD	HL,BC
	LD	BC,(?0010+40)
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,(IX+16)
	LD	(?0010+37),A
; 479.	        if(j > 95)
	LD	B,A
	LD	A,95
	CP	B
	JR	NC,?0171
?0170:
; 480.	            j = 95;
	LD	(?0010+37),A
?0171:
; 481.	        chan->Ton = (chan->Ton + chan->Current_Ton_Sliding + PT2_Table[j]) & 0xfff;
	LD	HL,(?0010+37)
	LD	H,E
	ADD	HL,HL
	LD	BC,PT2_Table
	ADD	HL,BC
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	C,(IX+19)
	LD	A,C
	RLCA
	SBC	A,A
	LD	B,A
	ADD	HL,BC
	LD	C,(IX+6)
	LD	B,(IX+7)
	ADD	HL,BC
	LD	A,H
	AND	15
	LD	H,A
	LD	(IX+6),L
	LD	(IX+7),H
; 482.	        if(chan->GlissType == 2)
	LD	A,2
	XOR	(IX+21)
	OR	(IX+22)
	OR	(IX+23)
	OR	(IX+24)
	JR	NZ,?0175
?0172:
; 483.	        {
; 484.	            chan->Ton_Delta = chan->Ton_Delta - abs(chan->Glissade);
	LD	HL,20
	PUSH	IX
	POP	BC
	ADD	HL,BC
	PUSH	HL
	LD	HL,27
	CALL	LWRD ?1255
	LD	D,L
	POP	HL
	LD	A,(HL)
	SUB	D
	LD	(HL),A
; 485.	            if(chan->Ton_Delta < 0)
	LD	HL,20
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0175
?0174:
; 486.	            {
; 487.	                chan->Note = chan->Slide_To_Note;
	LD	B,(IX+17)
	LD	(IX+16),B
; 488.	                chan->GlissType = 0;
	XOR	A
	LD	(IX+21),A
	LD	(IX+22),A
	LD	(IX+23),A
	LD	(IX+24),A
; 489.	                chan->Current_Ton_Sliding = 0;
	LD	(IX+19),A
?0175:
?0173:
; 490.	            }
; 491.	        }
; 492.	        if(chan->GlissType != 0)
	LD	A,(IX+21)
	OR	(IX+22)
	OR	(IX+23)
	OR	(IX+24)
	JR	Z,?0177
?0176:
; 493.	            chan->Current_Ton_Sliding += chan->Glissade;
	LD	A,(IX+19)
	ADD	A,(IX+27)
	LD	(IX+19),A
?0177:
; 494.	        chan->Amplitude = (chan->Volume * 17 + (unsigned char)(chan->Volume > 7)) * (b1 >> 4) / 256;
	LD	A,7
	CP	(IX+14)
	JR	NC,?0995
	LD	C,1
	JR	?0996
?0995:
	LD	C,0
?0996:
	LD	B,0
	PUSH	BC
	LD	E,(IX+14)
	LD	D,B
	LD	C,17
	CALL	LWRD ?S_MUL_L02
	POP	BC
	LD	L,C
	LD	H,B
	ADD	HL,DE
	LD	C,L
	LD	B,H
	LD	A,(?0010+39)
	RRA
	RRA
	RRA
	RRA
	AND	15
	LD	E,A
	LD	D,0
	CALL	LWRD ?S_MUL_L02
	LD	BC,256
	CALL	LWRD ?SS_DIV_L02
	LD	(IX+18),E
; 495.	        if(chan->Envelope_Enabled)
	LD	A,(IX+25)
	OR	A
	JR	Z,?0179
?0178:
; 496.	            chan->Amplitude = chan->Amplitude | 16;
	SET	4,(IX+18)
?0179:
; 497.	        if((module[chan->SamplePointer + chan->Position_In_Sample * 3] & 1) != 0)
	LD	L,(IX+13)
	LD	H,C
	LD	B,H
	LD	C,L
	ADD	HL,HL
	ADD	HL,BC
	LD	C,(IX+4)
	LD	B,(IX+5)
	ADD	HL,BC
	LD	BC,(?0010+40)
	ADD	HL,BC
	BIT	0,(HL)
	JR	Z,?0181
?0180:
; 498.	            *TempMixer = *TempMixer | 64;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	SET	6,(HL)
; 499.	        else
	JR	?0182
?0181:
; 500.	            ay_writeay(AY_NOISE_PERIOD, ((b0 >> 3) + chan->Addition_To_Noise) & 31);
	LD	A,(?0010+38)
	RRA
	RRA
	RRA
	AND	31
	ADD	A,(IX+28)
	AND	31
	LD	C,A
	LD	E,6
	CALL	LWRD ?1253
?0182:
; 501.	        if((b0 & 2) != 0)
	LD	A,(?0010+38)
	BIT	1,A
	JR	Z,?0184
?0183:
; 502.	            *TempMixer = *TempMixer | 8;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	SET	3,(HL)
?0184:
; 503.	        chan->Position_In_Sample++;
	INC	(IX+13)
; 504.	        if(chan->Position_In_Sample == chan->Sample_Length)
	LD	A,(IX+13)
	CP	(IX+12)
	JR	NZ,?0186
?0185:
; 505.	            chan->Position_In_Sample = chan->Loop_Sample_Position;
	LD	B,(IX+11)
	LD	(IX+13),B
?0186:
; 506.	        chan->Position_In_Ornament++;
	INC	(IX+10)
; 507.	        if(chan->Position_In_Ornament == chan->Ornament_Length)
	LD	A,(IX+10)
	CP	(IX+9)
	JR	NZ,?0189
?0187:
; 508.	            chan->Position_In_Ornament = chan->Loop_Ornament_Position;
	LD	B,(IX+8)
	LD	(IX+10),B
?0188:
; 509.	    }
; 510.	    else
	JR	?0189
?0167:
; 511.	        chan->Amplitude = 0;
	LD	(IX+18),A
?0189:
; 512.	                
; 513.	    *TempMixer = *TempMixer >> 1;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	SRL	(HL)
; 514.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 515.	
; 516.	void PT2_Play(AYSongInfo * info)
; 517.	{
PT2_Play:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 518.	    unsigned char TempMixer;
; 519.	    unsigned char * module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+45),HL
; 520.	    PT2_File * header = (PT2_File *)module;
	LD	(?0010+47),HL
; 521.	    PT2.DelayCounter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	DEC	(HL)
; 522.	    if(PT2.DelayCounter == 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	XOR	A
	OR	(HL)
	JP	NZ,?0191
?0190:
; 523.	    {
; 524.	        PT2_A.Note_Skip_Counter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,32
	ADD	HL,BC
	DEC	(HL)
; 525.	        if(PT2_A.Note_Skip_Counter < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0193
?0192:
; 526.	        {
; 527.	            if(module[PT2_A.Address_In_Pattern] == 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,(?0010+45)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	NZ,?0195
?0194:
; 528.	            {
; 529.	                PT2.CurrentPosition++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	(HL)
; 530.	                if(PT2.CurrentPosition == PT2_NumberOfPositions)
	LD	HL,(?0010+47)
	INC	HL
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	A,(HL)
	POP	HL
	CP	(HL)
	JR	NZ,?0197
?0196:
; 531.	                    PT2.CurrentPosition = PT2_LoopPosition;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,(?0010+47)
	INC	HL
	INC	HL
	LD	B,(HL)
	POP	HL
	LD	(HL),B
?0197:
; 532.	                PT2_A.Address_In_Pattern = ay_sys_getword(&module[PT2_PatternsPointer+ PT2_PositionList(PT2.CurrentPosition) * 6]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,0
	LD	HL,(?0010+47)
	ADD	HL,BC
	LD	C,131
	ADD	HL,BC
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	PUSH	HL
	LD	HL,99
	LD	BC,(?0010+47)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,100
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	POP	HL
	ADD	HL,BC
	LD	BC,(?0010+45)
	CALL	LWRD ?1243
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 533.	                PT2_B.Address_In_Pattern = ay_sys_getword(&module[PT2_PatternsPointer + PT2_PositionList(PT2.CurrentPosition) * 6 + 2]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,33
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	HL,(?0010+47)
	ADD	HL,BC
	LD	C,131
	ADD	HL,BC
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	PUSH	HL
	LD	HL,99
	LD	BC,(?0010+47)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,100
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	POP	HL
	ADD	HL,BC
	LD	BC,(?0010+45)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	CALL	LWRD ?1244
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 534.	                PT2_C.Address_In_Pattern = ay_sys_getword(&module[PT2_PatternsPointer + PT2_PositionList(PT2.CurrentPosition) * 6 + 4]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,63
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	HL,(?0010+47)
	ADD	HL,BC
	LD	C,131
	ADD	HL,BC
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	PUSH	HL
	LD	HL,99
	LD	BC,(?0010+47)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,100
	ADD	HL,BC
	LD	B,(HL)
	LD	C,A
	LD	A,D
	OR	B
	LD	B,A
	POP	HL
	ADD	HL,BC
	LD	BC,(?0010+45)
	CALL	LWRD ?1246
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
?0195:
; 535.	            }
; 536.	            PT2_PatternInterpreter(info, &PT2_A);
	LD	C,(IX+4)
	LD	B,(IX+5)
	INC	BC
	INC	BC
	INC	BC
	CALL	LWRD ?1248
?0193:
; 537.	        }
; 538.	        PT2_B.Note_Skip_Counter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,62
	ADD	HL,BC
	DEC	(HL)
; 539.	        if(PT2_B.Note_Skip_Counter < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0199
?0198:
; 540.	        PT2_PatternInterpreter(info, &PT2_B);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,33
	CALL	LWRD ?1249
?0199:
; 541.	        PT2_C.Note_Skip_Counter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,92
	ADD	HL,BC
	DEC	(HL)
; 542.	        if(PT2_C.Note_Skip_Counter < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0201
?0200:
; 543.	        PT2_PatternInterpreter(info, &PT2_C);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,63
	CALL	LWRD ?1249
?0201:
; 544.	        PT2.DelayCounter = PT2.Delay;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	B,(HL)
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	(HL),B
?0191:
; 545.	    }
; 546.	
; 547.	    TempMixer = 0;
	XOR	A
	LD	(?0010+44),A
; 548.	    PT2_GetRegisters(info, &PT2_A, &TempMixer);
	LD	HL,?0010+44
	PUSH	HL
	LD	C,(IX+4)
	LD	B,(IX+5)
	INC	BC
	INC	BC
	INC	BC
	CALL	LWRD ?1258
	POP	HL
; 549.	    PT2_GetRegisters(info, &PT2_B, &TempMixer);
	LD	HL,?0010+44
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,33
	CALL	LWRD ?1259
	POP	HL
; 550.	    PT2_GetRegisters(info, &PT2_C, &TempMixer);
	LD	HL,?0010+44
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,63
	CALL	LWRD ?1259
	POP	HL
; 551.	
; 552.	        ///*
; 553.	    ay_writeay(AY_MIXER, TempMixer);
	LD	BC,(?0010+44)
	LD	E,7
	CALL	LWRD ?1253
; 554.	
; 555.	    ay_writeay(AY_CHNL_A_FINE, PT2_A.Ton & 0xff);
	CALL	LWRD ?1252
; 556.	    ay_writeay(AY_CHNL_A_COARSE, (PT2_A.Ton >> 8) & 0xf);
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 557.	    ay_writeay(AY_CHNL_B_FINE, PT2_B.Ton & 0xff);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,39
	ADD	HL,BC
	LD	C,(HL)
	LD	E,2
	CALL	LWRD ?1253
; 558.	    ay_writeay(AY_CHNL_B_COARSE, (PT2_B.Ton >> 8) & 0xf);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,39
	CALL	LWRD ?1254
; 559.	    ay_writeay(AY_CHNL_C_FINE, PT2_C.Ton & 0xff);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,69
	ADD	HL,BC
	LD	C,(HL)
	LD	E,4
	CALL	LWRD ?1253
; 560.	    ay_writeay(AY_CHNL_C_COARSE, (PT2_C.Ton >> 8) & 0xf);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,69
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	E,5
	CALL	LWRD ?1253
; 561.	    ay_writeay(AY_CHNL_A_VOL, PT2_A.Amplitude);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,21
	ADD	HL,BC
	LD	C,(HL)
	LD	E,8
	CALL	LWRD ?1253
; 562.	    ay_writeay(AY_CHNL_B_VOL, PT2_B.Amplitude);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,51
	ADD	HL,BC
	LD	C,(HL)
	LD	E,9
	CALL	LWRD ?1253
; 563.	    ay_writeay(AY_CHNL_C_VOL, PT2_C.Amplitude);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,81
?1237:
	ADD	HL,BC
	LD	C,(HL)
	LD	E,10
	CALL	LWRD ?1253
; 564.	        //*/
; 565.	}
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1249:
	ADD	HL,BC
	LD	C,L
	LD	B,H
?1248:
	PUSH	IX
	POP	DE
	LD	A,BYTE3 PT2_PatternInterpreter
	LD	HL,LWRD PT2_PatternInterpreter
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
?1252:
	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
?1259:
	ADD	HL,BC
	LD	C,L
	LD	B,H
?1258:
	PUSH	IX
	POP	DE
	LD	A,BYTE3 PT2_GetRegisters
	LD	HL,LWRD PT2_GetRegisters
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 566.	
; 567.	void PT2_GetInfo(AYSongInfo * info)
; 568.	{
PT2_GetInfo:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 569.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+49),HL
; 570.	    int a1, a2, a3, a11, a22, a33;
; 571.	    unsigned long int j1, j2, j3;
; 572.	    long i, tm = 0;
	LD	BC,0
	LD	E,C
	LD	D,B
	LD	(?0010+79),DE
	LD	(?0010+81),BC
; 573.	    unsigned char b;
; 574.	    unsigned char ptDelay = module[0];
	LD	A,(HL)
	LD	(?0010+84),A
; 575.	    unsigned char ptNumPos = module[1];
	INC	HL
	LD	A,(HL)
	LD	(?0010+85),A
; 576.	    unsigned int ptLoopPos = module[2];
	INC	HL
	LD	C,(HL)
	LD	B,D
	LD	(?0010+86),BC
; 577.	    unsigned int ptPatPt = ay_sys_getword(&module[99]);
	LD	HL,99
	LD	BC,(?0010+49)
	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	(?0010+88),HL
; 578.	    const unsigned char *ptPosList = (unsigned char *)&module[131];
	LD	HL,131
	LD	BC,(?0010+49)
	ADD	HL,BC
	LD	(?0010+90),HL
; 579.	
; 580.	        
; 581.	    b = ptDelay;
	LD	A,(?0010+84)
	LD	(?0010+83),A
; 582.	    a1 = a2 = a3 = a11 = a22 = a33 = 0;
	LD	HL,0
	LD	(?0010+61),HL
	LD	(?0010+59),HL
	LD	(?0010+57),HL
	LD	(?0010+55),HL
	LD	(?0010+53),HL
	LD	(?0010+51),HL
; 583.	    for(i = 0; i < ptNumPos; i++)
	LD	C,L
	LD	B,H
?1001:
	LD	(?0010+75),HL
	LD	(?0010+77),BC
?0203:
	LD	HL,(?0010+85)
	LD	BC,0
	LD	H,C
	PUSH	BC
	PUSH	HL
	LD	BC,(?0010+77)
	LD	HL,(?0010+75)
	CALL	LWRD ?SL_CMP_L03
	JP	NC,?0202
?0204:
; 584.	    {
; 585.	        if(i == ptLoopPos)
	LD	B,H
	LD	C,L
?0206:
?0207:
; 586.	        {
; 587.	           // info->Loop = tm;
; 588.	        }
; 589.	        j1 = ay_sys_getword(&module[ptPatPt + ptPosList[i] * 6]);
	LD	L,C
	LD	H,B
	LD	BC,(?0010+90)
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	LD	E,L
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	LD	DE,(?0010+88)
	ADD	HL,DE
	LD	BC,(?0010+49)
	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	(?0010+63),HL
	LD	(?0010+65),BC
; 590.	        j2 = ay_sys_getword(&module[ptPatPt + ptPosList[i] * 6 + 2]);
	LD	HL,(?0010+75)
	LD	BC,(?0010+90)
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	LD	E,L
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	LD	DE,(?0010+88)
	ADD	HL,DE
	LD	BC,(?0010+49)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	LD	A,BYTE3 ay_sys_getword
	LD	HL,LWRD ay_sys_getword
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	(?0010+67),HL
	LD	(?0010+69),BC
; 591.	        j3 = ay_sys_getword(&module[ptPatPt + ptPosList[i] * 6 + 4]);
	LD	HL,(?0010+75)
	LD	BC,(?0010+90)
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	LD	C,L
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,(?0010+88)
	ADD	HL,BC
	LD	BC,(?0010+49)
	ADD	HL,BC
	LD	BC,4
	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	(?0010+71),HL
	LD	(?0010+73),BC
?0210:
; 592.	        do
; 593.	        {
; 594.	            a1--;
	LD	HL,(?0010+51)
	DEC	HL
	LD	(?0010+51),HL
; 595.	            if(a1 < 0)
	BIT	7,H
	JP	Z,?0215
?0211:
; 596.	            {
; 597.	                if(module[j1] == 0)
	LD	HL,(?0010+63)
	LD	BC,(?0010+49)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	Z,?0208
?0213:
; 598.	                    break;
?0214:
?0217:
; 599.	                do
; 600.	                {
; 601.	                    unsigned char val = (unsigned char)module[j1];
	LD	HL,(?0010+63)
	LD	BC,(?0010+49)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+92),A
; 602.	                    if(val == 0x70 || (val >= 0x80 && val <= 0xe0))
	CP	112
	JR	Z,?0223
	CP	128
	JR	C,?0219
	LD	B,A
	LD	A,224
	CP	B
	JR	C,?0219
?0223:
?0222:
?0220:
?0221:
?0218:
; 603.	                    {
; 604.	                        a1 = a11;
	LD	HL,(?0010+57)
	LD	(?0010+51),HL
; 605.	                        j1++;
	CALL	LWRD ?1266
; 606.	                        break;
	JR	?0215
?0219:
; 607.	                    }
; 608.	                    else if(val >= 0x71 && val <= 0x7e)
	LD	A,(?0010+92)
	CP	113
	JR	C,?0225
	LD	B,A
	LD	A,126
	CP	B
	JR	C,?0225
?0227:
?0226:
?0224:
; 609.	                    {
; 610.	                        j1 += 2;
	LD	HL,?0010+63
	LD	BC,0
	LD	DE,2
	JR	?1002
?0225:
; 611.	                    }
; 612.	                    else if(val >= 0x20 && val <= 0x5f)
	LD	A,(?0010+92)
	CP	32
	JR	C,?0230
	LD	B,A
	LD	A,95
	CP	B
	JR	C,?0230
?0232:
?0231:
?0229:
; 613.	                    {
; 614.	                        a11 = module[j1] - 0x20;
	LD	HL,(?0010+63)
	LD	BC,(?0010+49)
	ADD	HL,BC
	LD	C,(HL)
	LD	B,0
	LD	HL,65504
	ADD	HL,BC
	LD	(?0010+57),HL
	JR	?0245
?0230:
; 615.	                    }
; 616.	                    else if(val == 0xf)
	LD	A,(?0010+92)
	CP	15
	JR	NZ,?0235
?0234:
; 617.	                    {
; 618.	                        j1++;
	CALL	LWRD ?1266
; 619.	                        b = module[j1];
	LD	BC,(?0010+49)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+83),A
	JR	?0245
?0235:
; 620.	                    }
; 621.	                    else if((val >= 1 && val <= 0xb) || val == 0xe)
	CP	1
	JR	C,?0240
	LD	B,A
	LD	A,11
	CP	B
	JR	NC,?0241
?0240:
?0239:
	LD	A,(?0010+92)
	CP	14
	JR	NZ,?0238
?0241:
?0242:
?0237:
; 622.	                    {
; 623.	                        j1++;
	CALL	LWRD ?1266
	JR	?0245
?0238:
; 624.	                    }
; 625.	                    else if(val == 0xd)
	CP	13
	JR	NZ,?0245
?0244:
; 626.	                    {
; 627.	                        j1 += 3;
	LD	HL,?0010+63
	LD	BC,0
	LD	DE,3
?1002:
	CALL	LWRD ?L_ADDASG_L03
?0245:
?0243:
?0236:
?0233:
?0228:
; 628.	                    }
; 629.	                    j1++;
	CALL	LWRD ?1266
; 630.	                }
; 631.	                while(true);
	JP	LWRD ?0214
?0215:
?0212:
; 632.	            }
; 633.	
; 634.	            a2--;
	LD	HL,(?0010+53)
	DEC	HL
	LD	(?0010+53),HL
; 635.	            if(a2 < 0)
	BIT	7,H
	JP	Z,?0248
?0246:
?0250:
; 636.	            {
; 637.	                do
; 638.	                {
; 639.	                    unsigned char val = (unsigned char)module[j2];
	LD	HL,(?0010+67)
	LD	BC,(?0010+49)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+92),A
; 640.	                    if(val == 0x70 || (val >= 0x80 && val <= 0xe0))
	CP	112
	JR	Z,?0256
	CP	128
	JR	C,?0252
	LD	B,A
	LD	A,224
	CP	B
	JR	C,?0252
?0256:
?0255:
?0253:
?0254:
?0251:
; 641.	                    {
; 642.	                        a2 = a22;
	LD	HL,(?0010+59)
	LD	(?0010+53),HL
; 643.	                        j2++;
	LD	HL,(?0010+67)
	LD	BC,(?0010+69)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+67),HL
	LD	(?0010+69),BC
; 644.	                        break;
	JP	LWRD ?0248
?0252:
; 645.	                    }
; 646.	                    else if(val >= 0x71 && val <= 0x7e)
	LD	A,(?0010+92)
	CP	113
	JR	C,?0258
	LD	B,A
	LD	A,126
	CP	B
	JR	C,?0258
?0260:
?0259:
?0257:
; 647.	                    {
; 648.	                        j2 += 2;
	LD	HL,?0010+67
	LD	BC,0
	LD	DE,2
	JR	?1003
?0258:
; 649.	                    }
; 650.	                    else if(val >= 0x20 && val <= 0x5f)
	LD	A,(?0010+92)
	CP	32
	JR	C,?0263
	LD	B,A
	LD	A,95
	CP	B
	JR	C,?0263
?0265:
?0264:
?0262:
; 651.	                    {
; 652.	                        a22 = module[j2] - 0x20;
	LD	HL,(?0010+67)
	LD	BC,(?0010+49)
	ADD	HL,BC
	LD	C,(HL)
	LD	B,0
	LD	HL,65504
	ADD	HL,BC
	LD	(?0010+59),HL
	JR	?0278
?0263:
; 653.	                    }
; 654.	                    else if(val == 0xf)
	LD	A,(?0010+92)
	CP	15
	JR	NZ,?0268
?0267:
; 655.	                    {
; 656.	                        j2++;
	LD	HL,(?0010+67)
	LD	BC,(?0010+69)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+67),HL
	LD	(?0010+69),BC
; 657.	                        b = module[j2];
	LD	BC,(?0010+49)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+83),A
	JR	?0278
?0268:
; 658.	                    }
; 659.	                    else if((val >= 1 && val <= 0xb) || val == 0xe)
	CP	1
	JR	C,?0273
	LD	B,A
	LD	A,11
	CP	B
	JR	NC,?0274
?0273:
?0272:
	LD	A,(?0010+92)
	CP	14
	JR	NZ,?0271
?0274:
?0275:
?0270:
; 660.	                    {
; 661.	                        j2++;
	LD	HL,(?0010+67)
	LD	BC,(?0010+69)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+67),HL
	LD	(?0010+69),BC
	JR	?0278
?0271:
; 662.	                    }
; 663.	                    else if(val == 0xd)
	CP	13
	JR	NZ,?0278
?0277:
; 664.	                    {
; 665.	                        j2 += 3;
	LD	HL,?0010+67
	LD	BC,0
	LD	DE,3
?1003:
	CALL	LWRD ?L_ADDASG_L03
?0278:
?0276:
?0269:
?0266:
?0261:
; 666.	                    }
; 667.	                    j2++;
	LD	HL,(?0010+67)
	LD	BC,(?0010+69)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+67),HL
	LD	(?0010+69),BC
; 668.	                }
; 669.	                while(true);
	JP	LWRD ?0246
?0248:
?0247:
; 670.	            }
; 671.	            a3--;
	LD	HL,(?0010+55)
	DEC	HL
	LD	(?0010+55),HL
; 672.	            if(a3 < 0)
	BIT	7,H
	JP	Z,?0281
?0279:
?0283:
; 673.	            {
; 674.	                do
; 675.	                {
; 676.	                    unsigned char val = (unsigned char)module[j3];
	LD	HL,(?0010+71)
	LD	BC,(?0010+49)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+92),A
; 677.	                    if(val == 0x70 || (val >= 0x80 && val <= 0xe0))
	CP	112
	JR	Z,?0289
	CP	128
	JR	C,?0285
	LD	B,A
	LD	A,224
	CP	B
	JR	C,?0285
?0289:
?0288:
?0286:
?0287:
?0284:
; 678.	                    {
; 679.	                        a3 = a33;
	LD	HL,(?0010+61)
	LD	(?0010+55),HL
; 680.	                        j3++;
	LD	HL,(?0010+71)
	LD	BC,(?0010+73)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+71),HL
	LD	(?0010+73),BC
; 681.	                        break;
	JP	LWRD ?0281
?0285:
; 682.	                    }
; 683.	                    else if(val >= 0x71 && val <= 0x7e)
	LD	A,(?0010+92)
	CP	113
	JR	C,?0291
	LD	B,A
	LD	A,126
	CP	B
	JR	C,?0291
?0293:
?0292:
?0290:
; 684.	                    {
; 685.	                        j3 += 2;
	LD	HL,?0010+71
	LD	BC,0
	LD	DE,2
	JR	?1004
?0291:
; 686.	                    }
; 687.	                    else if(val >= 0x20 && val <= 0x5f)
	LD	A,(?0010+92)
	CP	32
	JR	C,?0296
	LD	B,A
	LD	A,95
	CP	B
	JR	C,?0296
?0298:
?0297:
?0295:
; 688.	                    {
; 689.	                        a33 = module[j3] - 0x20;
	LD	HL,(?0010+71)
	LD	BC,(?0010+49)
	ADD	HL,BC
	LD	C,(HL)
	LD	B,0
	LD	HL,65504
	ADD	HL,BC
	LD	(?0010+61),HL
	JR	?0311
?0296:
; 690.	                    }
; 691.	                    else if(val == 0xf)
	LD	A,(?0010+92)
	CP	15
	JR	NZ,?0301
?0300:
; 692.	                    {
; 693.	                        j3++;
	LD	HL,(?0010+71)
	LD	BC,(?0010+73)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+71),HL
	LD	(?0010+73),BC
; 694.	                        b = module[j3];
	LD	BC,(?0010+49)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+83),A
	JR	?0311
?0301:
; 695.	                    }
; 696.	                    else if((val >= 1 && val <= 0xb) || val == 0xe)
	CP	1
	JR	C,?0306
	LD	B,A
	LD	A,11
	CP	B
	JR	NC,?0307
?0306:
?0305:
	LD	A,(?0010+92)
	CP	14
	JR	NZ,?0304
?0307:
?0308:
?0303:
; 697.	                    {
; 698.	                        j3++;
	LD	HL,(?0010+71)
	LD	BC,(?0010+73)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+71),HL
	LD	(?0010+73),BC
	JR	?0311
?0304:
; 699.	                    }
; 700.	                    else if(val == 0xd)
	CP	13
	JR	NZ,?0311
?0310:
; 701.	                    {
; 702.	                        j3 += 3;
	LD	HL,?0010+71
	LD	BC,0
	LD	DE,3
?1004:
	CALL	LWRD ?L_ADDASG_L03
?0311:
?0309:
?0302:
?0299:
?0294:
; 703.	                    }
; 704.	                    j3++;
	LD	HL,(?0010+71)
	LD	BC,(?0010+73)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+71),HL
	LD	(?0010+73),BC
; 705.	                }
; 706.	                while(true);
	JP	LWRD ?0279
?0281:
?0280:
; 707.	            }
; 708.	            tm += b;
	LD	HL,?0010+79
	LD	DE,(?0010+83)
	LD	BC,0
	LD	D,C
	CALL	LWRD ?L_ADDASG_L03
; 709.	        }
; 710.	        while(true);
	JP	LWRD ?0210
?0208:
	LD	HL,(?0010+75)
	LD	BC,(?0010+77)
	CALL	LWRD ?L_INC_L03
	JP	LWRD ?1001
?0202:
; 711.	    }
; 712.	        
; 713.	    info->len = tm;
	LD	HL,(?0010+79)
	LD	(IX+99),L
	LD	(IX+100),H
; 714.	    strncpy(info->Name, &module[101], 30);
	LD	HL,30
	PUSH	HL
	LD	L,101
	LD	BC,(?0010+49)
	ADD	HL,BC
?1238:
	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
; 715.	    info->Autor[0]=0;
	LD	(IX+41),0
; 716.	}
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1266:
	LD	HL,(?0010+63)
	LD	BC,(?0010+65)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+63),HL
	LD	(?0010+65),BC
	RET
; 717.	
; 718.	
; 719.	
; 720.	
; 721.	
; 722.	
; 723.	//======================== PT1 =============================
; 724.	
; 725.	typedef struct
; 726.	{
; 727.	    unsigned char PT1_Delay;
; 728.	    unsigned char PT1_NumberOfPositions;
; 729.	    unsigned char PT1_LoopPosition;
; 730.	    unsigned char PT1_SamplesPointers0[32]; //word
; 731.	    unsigned char PT1_OrnamentsPointers0[32]; //word
; 732.	    unsigned char PT1_PatternsPointer0, PT1_PatternsPointer1;
; 733.	    signed char PT1_MusicName[30];
; 734.	    unsigned char PT1_PositionList[65536 - 99];
; 735.	} PT1_File;
; 736.	
; 737.	#define PT1_SamplesPointers(x) (header->PT1_SamplesPointers0 [(x) * 2] | (header->PT1_SamplesPointers0 [(x) * 2 + 1] << 8))
; 738.	#define PT1_OrnamentsPointers(x) (header->PT1_OrnamentsPointers0 [(x) * 2] | (header->PT1_OrnamentsPointers0 [(x) * 2 + 1] << 8))
; 739.	#define PT1_PatternsPointer (header->PT1_PatternsPointer0 | (header->PT1_PatternsPointer1 << 8))
; 740.	
; 741.	typedef struct 
; 742.	{
; 743.	    unsigned int Address_In_Pattern, OrnamentPointer, SamplePointer, Ton;
; 744.	    unsigned char Number_Of_Notes_To_Skip, Volume, Loop_Sample_Position, Position_In_Sample, Sample_Length, Amplitude, Note;
; 745.	    signed char Note_Skip_Counter;
; 746.	    bool Envelope_Enabled, Enabled;
; 747.	} PT1_Channel_Parameters;
; 748.	
; 749.	typedef struct 
; 750.	{
; 751.	    unsigned char Delay, DelayCounter, CurrentPosition;
; 752.	} PT1_Parameters;
; 753.	
; 754.	typedef struct 
; 755.	{
; 756.	    PT1_Parameters PT1;
; 757.	    PT1_Channel_Parameters PT1_A, PT1_B, PT1_C;
; 758.	} PT1_SongInfo;
; 759.	
; 760.	PT1_SongInfo PT1_SongInfoV;
; 761.	
; 762.	#define PT1_A ((PT1_SongInfo *)info->data)->PT1_A
; 763.	#define PT1_B ((PT1_SongInfo *)info->data)->PT1_B
; 764.	#define PT1_C ((PT1_SongInfo *)info->data)->PT1_C
; 765.	#define PT1 ((PT1_SongInfo *)info->data)->PT1
; 766.	
; 767.	void PT1_Init(AYSongInfo * info)
; 768.	{
PT1_Init:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 769.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+93),HL
; 770.	    
; 771.	    PT1_File *header = (PT1_File *)module;
	LD	(?0010+95),HL
; 772.	    
; 773.	    info->data = (void *)& PT1_SongInfoV;
	LD	(IX+4),LOW(PT1_SongInfoV)
	LD	(IX+5),HIGH(PT1_SongInfoV)
; 774.	    
; 775.	    
; 776.	    memset(&PT1_A, 0, sizeof(PT1_Channel_Parameters));
	LD	BC,18
	PUSH	BC
	CALL	LWRD ?1240
	POP	AF
; 777.	    memset(&PT1_B, 0, sizeof(PT1_Channel_Parameters));
	LD	HL,18
	PUSH	HL
	LD	C,H
	LD	B,H
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,21
	ADD	HL,DE
	EX	DE,HL
	CALL	LWRD ?1241
	POP	AF
; 778.	    memset(&PT1_C, 0, sizeof(PT1_Channel_Parameters));
	LD	HL,18
	PUSH	HL
	LD	C,H
	LD	B,H
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	DE,39
	ADD	HL,DE
	EX	DE,HL
	CALL	LWRD ?1241
	POP	AF
; 779.	
; 780.	    PT1.DelayCounter = 1;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	(HL),1
; 781.	    PT1.Delay = header->PT1_Delay;
	LD	L,(IX+4)
	LD	H,(IX+5)
	PUSH	HL
	LD	HL,(?0010+95)
	LD	B,(HL)
	POP	HL
	LD	(HL),B
; 782.	    PT1.CurrentPosition = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	(HL),0
; 783.	    PT1_A.Address_In_Pattern = ay_sys_getword(&module[PT1_PatternsPointer + header->PT1_PositionList[0] * 6]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,67
	LD	BC,(?0010+95)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,68
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	LD	HL,99
	LD	DE,(?0010+95)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	LD	E,L
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	ADD	HL,BC
	LD	BC,(?0010+93)
	CALL	LWRD ?1243
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 784.	    PT1_B.Address_In_Pattern = ay_sys_getword(&module[PT1_PatternsPointer + header->PT1_PositionList[0] * 6 + 2]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,21
	ADD	HL,BC
	PUSH	HL
	LD	HL,67
	LD	BC,(?0010+95)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,68
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	LD	HL,99
	LD	DE,(?0010+95)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	LD	E,L
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	ADD	HL,BC
	LD	BC,(?0010+93)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	CALL	LWRD ?1244
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 785.	    PT1_C.Address_In_Pattern = ay_sys_getword(&module[PT1_PatternsPointer + header->PT1_PositionList[0] * 6 + 4]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,39
	ADD	HL,BC
	PUSH	HL
	LD	HL,67
	LD	BC,(?0010+95)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,68
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	LD	HL,99
	LD	DE,(?0010+95)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	LD	E,L
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	ADD	HL,BC
	LD	BC,(?0010+93)
	CALL	LWRD ?1246
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 786.	
; 787.	    PT1_A.OrnamentPointer = PT1_OrnamentsPointers(0);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,5
	ADD	HL,BC
	PUSH	HL
	LD	HL,35
	LD	BC,(?0010+95)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,36
	ADD	HL,BC
	LD	B,(HL)
	LD	C,A
	LD	A,D
	OR	B
	LD	B,A
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 788.	    PT1_A.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,19
	ADD	HL,BC
	LD	(HL),B
; 789.	    PT1_A.Position_In_Sample = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,14
	ADD	HL,BC
	LD	(HL),B
; 790.	    PT1_A.Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,20
	ADD	HL,BC
	LD	(HL),B
; 791.	    PT1_A.Number_Of_Notes_To_Skip = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,11
	ADD	HL,BC
	LD	(HL),B
; 792.	    PT1_A.Note_Skip_Counter = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,18
	ADD	HL,BC
	LD	(HL),B
; 793.	    PT1_A.Volume = 15;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,12
	ADD	HL,BC
	LD	(HL),15
; 794.	    PT1_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
; 795.	
; 796.	    PT1_B.OrnamentPointer = PT1_A.OrnamentPointer;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,23
	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
; 797.	    PT1_B.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,37
	ADD	HL,BC
	LD	(HL),B
; 798.	    PT1_B.Position_In_Sample = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,32
	ADD	HL,BC
	LD	(HL),B
; 799.	    PT1_B.Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,38
	ADD	HL,BC
	LD	(HL),B
; 800.	    PT1_B.Number_Of_Notes_To_Skip = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,29
	ADD	HL,BC
	LD	(HL),B
; 801.	    PT1_B.Note_Skip_Counter = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,36
	ADD	HL,BC
	LD	(HL),B
; 802.	    PT1_B.Volume = 15;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,30
	ADD	HL,BC
	LD	(HL),15
; 803.	    PT1_B.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,27
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 804.	
; 805.	    PT1_C.OrnamentPointer = PT1_A.OrnamentPointer;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,41
	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
; 806.	    PT1_C.Envelope_Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,55
	ADD	HL,BC
	LD	(HL),B
; 807.	    PT1_C.Position_In_Sample = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,50
	ADD	HL,BC
	LD	(HL),B
; 808.	    PT1_C.Enabled = false;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,56
	ADD	HL,BC
	LD	(HL),B
; 809.	    PT1_C.Number_Of_Notes_To_Skip = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,47
	ADD	HL,BC
	LD	(HL),B
; 810.	    PT1_C.Note_Skip_Counter = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,54
	ADD	HL,BC
	LD	(HL),B
; 811.	    PT1_C.Volume = 15;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,48
	ADD	HL,BC
	LD	(HL),15
; 812.	    PT1_C.Ton = 0;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,45
	ADD	HL,BC
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 813.	
; 814.	        info->slow = 1;
?1239:
	LD	(IX+109),1
; 815.	
; 816.	//    ay_resetay(&info, 0);
; 817.	}
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 818.	
; 819.	void PT1_PatternInterpreter(AYSongInfo * info, PT1_Channel_Parameters * chan)
; 820.	{
PT1_PatternInterpreter:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
	PUSH	DE
	POP	IY
; 821.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+97),HL
; 822.	    PT1_File *header = (PT1_File *)module;
	LD	(?0010+99),HL
; 823.	    bool quit = false;
	XOR	A
	LD	(?0010+101),A
?0314:
; 824.	    do
; 825.	    {
; 826.	        unsigned char val = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+97)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+102),A
; 827.	        if(val <= 0x5f)
	LD	B,A
	LD	A,95
	CP	B
	JR	C,?0316
?0315:
; 828.	        {
; 829.	            chan->Note = val;
	LD	(IX+14),B
; 830.	            chan->Enabled = true;
	LD	(IX+17),1
; 831.	            chan->Position_In_Sample = 0;
	LD	(IX+11),0
; 832.	            quit = true;
	JP	LWRD ?1018
?0316:
; 833.	        }
; 834.	        else if(val >= 0x60 && val <= 0x6f)
	LD	A,B
	CP	96
	JR	C,?0319
	LD	B,A
	LD	A,111
	CP	B
	JR	C,?0319
?0321:
?0320:
?0318:
; 835.	        {
; 836.	            chan->SamplePointer = PT1_SamplesPointers(val - 0x60);
	LD	C,B
	LD	B,0
	LD	HL,65440
	ADD	HL,BC
	ADD	HL,HL
	LD	BC,(?0010+99)
	ADD	HL,BC
	INC	HL
	INC	HL
	INC	HL
	LD	E,(HL)
	LD	D,0
	PUSH	DE
	LD	HL,(?0010+102)
	LD	H,D
	LD	DE,65440
	ADD	HL,DE
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,4
	ADD	HL,BC
	LD	B,(HL)
	POP	DE
	LD	(IX+4),E
	LD	A,D
	OR	B
	LD	(IX+5),A
; 837.	            chan->Sample_Length = module[chan->SamplePointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,(?0010+97)
	ADD	HL,BC
	LD	D,(HL)
	LD	(IX+12),D
; 838.	            chan->SamplePointer++;
	INC	(IX+4)
	JR	NZ,?1012
	INC	(IX+5)
?1012:
; 839.	            chan->Loop_Sample_Position = module[chan->SamplePointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+10),B
; 840.	            chan->SamplePointer++;
	INC	(IX+4)
	JP	NZ,?0351
	INC	(IX+5)
	JP	LWRD ?0351
?0319:
; 841.	        }
; 842.	        else if(val >= 0x70 && val <= 0x7f)
	LD	A,B
	CP	112
	JR	C,?0324
	LD	B,A
	LD	A,127
	CP	B
	JR	C,?0324
?0326:
?0325:
?0323:
; 843.	            chan->OrnamentPointer = PT1_OrnamentsPointers(val - 0x70);
	LD	C,B
	LD	B,0
	LD	HL,65424
	ADD	HL,BC
	ADD	HL,HL
	LD	BC,(?0010+99)
	ADD	HL,BC
	LD	DE,35
	ADD	HL,DE
	LD	E,(HL)
	PUSH	DE
	LD	HL,(?0010+102)
	LD	H,D
	LD	DE,65424
	ADD	HL,DE
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,36
	ADD	HL,BC
	LD	B,(HL)
	POP	DE
	LD	(IX+2),E
	LD	A,D
	OR	B
	LD	(IX+3),A
	JP	LWRD ?0351
?0324:
; 844.	        else if(val == 0x80)
	LD	A,B
	DEC	A
	JP	PO,?0329
?0328:
; 845.	        {
; 846.	            chan->Enabled = false;
	LD	(IX+17),0
; 847.	            quit = true;
	JR	?1018
?0329:
; 848.	        }
; 849.	        else if(val == 0x81)
	LD	A,(?0010+102)
	CP	129
	JR	NZ,?0332
?0331:
; 850.	            chan->Envelope_Enabled = false;
	LD	(IX+16),0
	JP	LWRD ?0351
?0332:
; 851.	        else if(val >= 0x82 && val <= 0x8f)
	CP	130
	JR	C,?0335
	LD	B,A
	LD	A,143
	CP	B
	JR	C,?0335
?0337:
?0336:
?0334:
; 852.	        {
; 853.	            chan->Envelope_Enabled = true;
	LD	(IX+16),1
; 854.	            ay_writeay(AY_ENV_SHAPE, val - 0x81);
	LD	A,B
	ADD	A,127
	LD	C,A
	LD	E,13
	CALL	LWRD ?1253
; 855.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1014
	INC	(HL)
?1014:
; 856.	            ay_writeay(AY_ENV_FINE, module[chan->Address_In_Pattern]);
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+97)
	ADD	HL,BC
	LD	C,(HL)
	LD	E,11
	CALL	LWRD ?1253
; 857.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1015
	INC	(HL)
?1015:
; 858.	            ay_writeay(AY_ENV_COARSE, module[chan->Address_In_Pattern]);
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+97)
	ADD	HL,BC
	LD	C,(HL)
	LD	E,12
	CALL	LWRD ?1253
	JR	?0351
?0335:
; 859.	        }
; 860.	        else if(val == 0x90)
	LD	A,(?0010+102)
	CP	144
	JR	NZ,?0340
?0339:
; 861.	            quit = true;
?1018:
	LD	A,1
	LD	(?0010+101),A
	JR	?0351
?0340:
; 862.	        else if(val >= 0x91 && val <= 0xa0)
	CP	145
	JR	C,?0343
	LD	B,A
	LD	A,160
	CP	B
	JR	C,?0343
?0345:
?0344:
?0342:
; 863.	            PT1.Delay = val - 0x91;
	LD	L,(IY+4)
	LD	H,(IY+5)
	LD	A,B
	ADD	A,111
	LD	(HL),A
	JR	?0351
?0343:
; 864.	        else if(val >= 0xa1 && val <= 0xb0)
	LD	A,(?0010+102)
	CP	161
	JR	C,?0348
	LD	B,A
	LD	A,176
	CP	B
	JR	C,?0348
?0350:
?0349:
?0347:
; 865.	            chan->Volume = val - 0xa1;
	LD	A,B
	ADD	A,95
	LD	(IX+9),A
; 866.	        else
	JR	?0351
?0348:
; 867.	            chan->Number_Of_Notes_To_Skip = val - 0xb1;
	LD	A,(?0010+102)
	ADD	A,79
	LD	(IX+8),A
?0351:
?0346:
?0341:
?0338:
?0333:
?0330:
?0327:
?0322:
?0317:
; 868.	        chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1016
	INC	(HL)
?1016:
; 869.	    }
; 870.	    while(!quit);
	LD	A,(?0010+101)
	OR	A
	JP	Z,?0314
?0312:
; 871.	    chan->Note_Skip_Counter = chan->Number_Of_Notes_To_Skip;
	LD	B,(IX+8)
	LD	(IX+15),B
; 872.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 873.	
; 874.	void PT1_GetRegisters(AYSongInfo * info, PT1_Channel_Parameters * chan, unsigned char * TempMixer)
; 875.	{
PT1_GetRegisters:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
; 876.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+103),HL
; 877.	    unsigned char j, b;
; 878.	    if(chan->Enabled)
	LD	HL,17
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	Z,?0353
?0352:
; 879.	    {
; 880.	        j = chan->Note + module[chan->OrnamentPointer + chan->Position_In_Sample];
	LD	C,(IX+11)
	LD	B,0
	LD	L,(IX+2)
	LD	H,(IX+3)
	ADD	HL,BC
	LD	BC,(?0010+103)
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,(IX+14)
	LD	(?0010+105),A
; 881.	        if(j > 95)
	LD	B,A
	LD	A,95
	CP	B
	JR	NC,?0355
?0354:
; 882.	            j = 95;
	LD	(?0010+105),A
?0355:
; 883.	        b = module[chan->SamplePointer + chan->Position_In_Sample * 3];
	LD	L,(IX+11)
	LD	C,L
	LD	H,0
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	LD	C,(IX+4)
	LD	B,(IX+5)
	ADD	HL,BC
	LD	BC,(?0010+103)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+106),A
; 884.	        chan->Ton = ((((unsigned short)(b)) << 4) & 0xf00) + module[chan->SamplePointer + chan->Position_In_Sample * 3 + 2];
	LD	L,(IX+11)
	LD	E,L
	LD	H,0
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	LD	E,(IX+4)
	LD	D,(IX+5)
	ADD	HL,DE
	ADD	HL,BC
	INC	HL
	INC	HL
	LD	E,(HL)
	LD	D,0
	LD	H,D
	LD	L,A
	ADD	HL,HL
	ADD	HL,HL
	ADD	HL,HL
	ADD	HL,HL
	LD	A,L
	AND	15
	LD	L,A
	ADD	HL,DE
	LD	(IX+6),L
	LD	(IX+7),H
; 885.	        chan->Amplitude = (chan->Volume * 17 + (chan->Volume > 7 ? 1 : 0)) * (b & 15) / 256;
	LD	A,7
	CP	(IX+9)
	LD	L,D
	LD	H,D
	JR	NC,?0358
	INC	HL
?0358:
	LD	C,(IX+9)
	LD	B,D
	LD	E,17
	CALL	LWRD ?S_MUL_L02
	ADD	HL,DE
	LD	C,L
	LD	B,H
	LD	A,(?0010+106)
	AND	15
	LD	E,A
	LD	D,0
	CALL	LWRD ?S_MUL_L02
	LD	BC,256
	CALL	LWRD ?SS_DIV_L02
	LD	(IX+13),E
; 886.	        b = module[chan->SamplePointer + chan->Position_In_Sample * 3 + 1];
	LD	L,(IX+11)
	LD	H,C
	LD	B,H
	LD	C,L
	ADD	HL,HL
	ADD	HL,BC
	LD	C,(IX+4)
	LD	B,(IX+5)
	ADD	HL,BC
	LD	BC,(?0010+103)
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	LD	(?0010+106),A
; 887.	        if((b & 32) == 0)
	BIT	5,A
	JR	NZ,?0360
?0359:
; 888.	            chan->Ton = -chan->Ton;
	AND	A
	LD	HL,0
	LD	C,(IX+6)
	LD	B,(IX+7)
	SBC	HL,BC
	LD	(IX+6),L
	LD	(IX+7),H
?0360:
; 889.	        chan->Ton = (chan->Ton + PT2_Table[j] + (j == 46 ? 1 : 0)) & 0xfff;
	LD	HL,(?0010+105)
	LD	H,0
	ADD	HL,HL
	LD	BC,PT2_Table
	ADD	HL,BC
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	A,(?0010+105)
	CP	46
	LD	DE,0
	JR	NZ,?0363
	INC	DE
?0363:
	ADD	HL,DE
	LD	C,(IX+6)
	LD	B,(IX+7)
	ADD	HL,BC
	LD	A,H
	AND	15
	LD	H,A
	LD	(IX+6),L
	LD	(IX+7),H
; 890.	        if(chan->Envelope_Enabled)
	LD	A,(IX+16)
	OR	A
	JR	Z,?0365
?0364:
; 891.	            chan->Amplitude |= 16;
	SET	4,(IX+13)
?0365:
; 892.	        if((signed char)b < 0)
	LD	A,(?0010+106)
	OR	A
	JP	P,?0367
?0366:
; 893.	            *TempMixer = *TempMixer | 64;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	SET	6,(HL)
; 894.	        else
	JR	?0368
?0367:
; 895.	            ay_writeay(AY_NOISE_PERIOD, b & 31);
	AND	31
	LD	C,A
	LD	E,6
	CALL	LWRD ?1253
?0368:
; 896.	        if((b & 64) != 0)
	LD	A,(?0010+106)
	BIT	6,A
	JR	Z,?0370
?0369:
; 897.	            *TempMixer = *TempMixer | 8;
	LD	HL,8
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	SET	3,(HL)
?0370:
; 898.	        chan->Position_In_Sample++;
	INC	(IX+11)
; 899.	        if(chan->Position_In_Sample == chan->Sample_Length)
	LD	A,(IX+11)
	CP	(IX+12)
	JR	NZ,?0373
?0371:
; 900.	            chan->Position_In_Sample = chan->Loop_Sample_Position;
	LD	B,(IX+10)
	LD	(IX+11),B
?0372:
; 901.	    }
; 902.	    else
	JR	?0373
?0353:
; 903.	        chan->Amplitude = 0;
	LD	(IX+13),A
?0373:
; 904.	    *TempMixer = *TempMixer >> 1;
	JP	LWRD ?0189
; 905.	
; 906.	}
; 907.	
; 908.	void PT1_Play(AYSongInfo * info)
; 909.	{
PT1_Play:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 910.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+107),HL
; 911.	    PT1_File *header = (PT1_File *)module;
	LD	(?0010+109),HL
; 912.	    unsigned char TempMixer;
; 913.	    PT1.DelayCounter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	DEC	(HL)
; 914.	    if(PT1.DelayCounter == 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	LD	A,(HL)
	OR	A
	JP	NZ,?0375
?0374:
; 915.	    {
; 916.	        PT1_A.Note_Skip_Counter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,18
	ADD	HL,BC
	DEC	(HL)
; 917.	        if(PT1_A.Note_Skip_Counter < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0377
?0376:
; 918.	        {
; 919.	            if(module[PT1_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,(?0010+107)
	ADD	HL,BC
	LD	B,(HL)
	INC	B
	JP	NZ,?0379
?0378:
; 920.	            {
; 921.	                PT1.CurrentPosition++;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	(HL)
; 922.	                if(PT1.CurrentPosition == header->PT1_NumberOfPositions)
	LD	HL,(?0010+109)
	INC	HL
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	A,(HL)
	POP	HL
	CP	(HL)
	JR	NZ,?0381
?0380:
; 923.	                    PT1.CurrentPosition = header->PT1_LoopPosition;
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	PUSH	HL
	LD	HL,(?0010+109)
	INC	HL
	INC	HL
	LD	B,(HL)
	POP	HL
	LD	(HL),B
?0381:
; 924.	                PT1_A.Address_In_Pattern = ay_sys_getword(&module[PT1_PatternsPointer + header->PT1_PositionList[PT1.CurrentPosition] * 6]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	INC	HL
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	B,0
	LD	HL,(?0010+109)
	ADD	HL,BC
	LD	C,99
	ADD	HL,BC
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	PUSH	HL
	LD	HL,67
	LD	BC,(?0010+109)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,68
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	POP	HL
	ADD	HL,BC
	LD	BC,(?0010+107)
	CALL	LWRD ?1243
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 925.	                PT1_B.Address_In_Pattern = ay_sys_getword(&module[PT1_PatternsPointer + header->PT1_PositionList[PT1.CurrentPosition] * 6 + 2]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,21
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	HL,(?0010+109)
	ADD	HL,BC
	LD	C,99
	ADD	HL,BC
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	PUSH	HL
	LD	HL,67
	LD	BC,(?0010+109)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,68
	ADD	HL,BC
	LD	H,(HL)
	LD	C,A
	LD	A,D
	OR	H
	LD	B,A
	POP	HL
	ADD	HL,BC
	LD	BC,(?0010+107)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	CALL	LWRD ?1244
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 926.	                PT1_C.Address_In_Pattern = ay_sys_getword(&module[PT1_PatternsPointer + header->PT1_PositionList[PT1.CurrentPosition] * 6 + 4]);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,39
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	INC	HL
	INC	HL
	LD	C,(HL)
	LD	HL,(?0010+109)
	ADD	HL,BC
	LD	C,99
	ADD	HL,BC
	LD	L,(HL)
	LD	H,B
	ADD	HL,HL
	LD	C,L
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	PUSH	HL
	LD	HL,67
	LD	BC,(?0010+109)
	ADD	HL,BC
	LD	A,(HL)
	LD	D,0
	LD	HL,68
	ADD	HL,BC
	LD	B,(HL)
	LD	C,A
	LD	A,D
	OR	B
	LD	B,A
	POP	HL
	ADD	HL,BC
	LD	BC,(?0010+107)
	CALL	LWRD ?1246
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
?0379:
; 927.	            }
; 928.	            PT1_PatternInterpreter(info, &PT1_A);
	LD	C,(IX+4)
	LD	B,(IX+5)
	INC	BC
	INC	BC
	INC	BC
	CALL	LWRD ?1250
?0377:
; 929.	        }
; 930.	        PT1_B.Note_Skip_Counter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,36
	ADD	HL,BC
	DEC	(HL)
; 931.	        if(PT1_B.Note_Skip_Counter < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0383
?0382:
; 932.	            PT1_PatternInterpreter(info, &PT1_B);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,21
	CALL	LWRD ?1251
?0383:
; 933.	        PT1_C.Note_Skip_Counter--;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,54
	ADD	HL,BC
	DEC	(HL)
; 934.	        if(PT1_C.Note_Skip_Counter < 0)
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	P,?0385
?0384:
; 935.	            PT1_PatternInterpreter(info, &PT1_C);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	C,39
	CALL	LWRD ?1251
?0385:
; 936.	        PT1.DelayCounter = PT1.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
?0375:
; 937.	    }
; 938.	    TempMixer = 0;
	XOR	A
	LD	(?0010+111),A
; 939.	    PT1_GetRegisters(info, &PT1_A, &TempMixer);
	LD	HL,?0010+111
	PUSH	HL
	LD	C,(IX+4)
	LD	B,(IX+5)
	INC	BC
	INC	BC
	INC	BC
	PUSH	IX
	POP	DE
	LD	A,BYTE3 PT1_GetRegisters
	LD	HL,LWRD PT1_GetRegisters
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
; 940.	    PT1_GetRegisters(info, &PT1_B, &TempMixer);
	LD	HL,?0010+111
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,21
	ADD	HL,BC
	LD	C,L
	LD	B,H
	PUSH	IX
	POP	DE
	LD	A,BYTE3 PT1_GetRegisters
	LD	HL,LWRD PT1_GetRegisters
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
; 941.	    PT1_GetRegisters(info, &PT1_C, &TempMixer);
	LD	HL,?0010+111
	PUSH	HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,39
	ADD	HL,BC
	LD	C,L
	LD	B,H
	PUSH	IX
	POP	DE
	LD	A,BYTE3 PT1_GetRegisters
	LD	HL,LWRD PT1_GetRegisters
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	HL
; 942.	
; 943.	    ay_writeay(AY_MIXER, TempMixer);
	LD	BC,(?0010+111)
	LD	E,7
	CALL	LWRD ?1253
; 944.	
; 945.	    ay_writeay(AY_CHNL_A_FINE, PT1_A.Ton & 0xff);
	CALL	LWRD ?1252
; 946.	    ay_writeay(AY_CHNL_A_COARSE, (PT1_A.Ton >> 8) & 0xf);
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 947.	    ay_writeay(AY_CHNL_B_FINE, PT1_B.Ton & 0xff);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,27
	ADD	HL,BC
	LD	C,(HL)
	LD	E,2
	CALL	LWRD ?1253
; 948.	    ay_writeay(AY_CHNL_B_COARSE, (PT1_B.Ton >> 8) & 0xf);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,27
	CALL	LWRD ?1254
; 949.	    ay_writeay(AY_CHNL_C_FINE, PT1_C.Ton & 0xff);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,45
	ADD	HL,BC
	LD	C,(HL)
	LD	E,4
	CALL	LWRD ?1253
; 950.	    ay_writeay(AY_CHNL_C_COARSE, (PT1_C.Ton >> 8) & 0xf);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,45
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	E,5
	CALL	LWRD ?1253
; 951.	    ay_writeay(AY_CHNL_A_VOL, PT1_A.Amplitude);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,16
	ADD	HL,BC
	LD	C,(HL)
	LD	E,8
	CALL	LWRD ?1253
; 952.	    ay_writeay(AY_CHNL_B_VOL, PT1_B.Amplitude);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,34
	ADD	HL,BC
	LD	C,(HL)
	LD	E,9
	CALL	LWRD ?1253
; 953.	    ay_writeay(AY_CHNL_C_VOL, PT1_C.Amplitude);
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,52
	JP	LWRD ?1237
?1251:
	ADD	HL,BC
	LD	C,L
	LD	B,H
?1250:
	PUSH	IX
	POP	DE
	LD	A,BYTE3 PT1_PatternInterpreter
	LD	HL,LWRD PT1_PatternInterpreter
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 954.	}
; 955.	
; 956.	void PT1_GetInfo(AYSongInfo * info)
; 957.	{
PT1_GetInfo:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 958.	    unsigned char * module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+112),HL
; 959.	    PT1_File *header = (PT1_File *)module;
	LD	(?0010+114),HL
; 960.	    short a1, a2, a3, a11, a22, a33;
; 961.	    unsigned long j1, j2, j3;
; 962.	    long i, tm = 0;
	LD	BC,0
	LD	(?0010+144),BC
	LD	(?0010+146),BC
; 963.	    unsigned char b;
; 964.	    unsigned char *ptr;
; 965.	    
; 966.	    
; 967.	    b = header->PT1_Delay;
	LD	A,(HL)
	LD	(?0010+148),A
; 968.	    a1 = a2 = a3 = a11 = a22 = a33 = 0;
	LD	L,C
	LD	H,C
	LD	(?0010+126),HL
	LD	(?0010+124),HL
	LD	(?0010+122),HL
	LD	(?0010+120),HL
	LD	(?0010+118),HL
	LD	(?0010+116),HL
; 969.	    for(i = 0; i < header->PT1_NumberOfPositions; i++)
	LD	C,L
	LD	B,H
?1024:
	LD	(?0010+140),HL
	LD	(?0010+142),BC
?0387:
	LD	HL,(?0010+114)
	INC	HL
	LD	L,(HL)
	LD	BC,0
	LD	H,C
	PUSH	BC
	PUSH	HL
	LD	BC,(?0010+142)
	LD	HL,(?0010+140)
	CALL	LWRD ?SL_CMP_L03
	JP	NC,?0386
?0388:
; 970.	    {
; 971.	        j1 = ay_sys_getword(&module[PT1_PatternsPointer + header->PT1_PositionList[i] * 6]);
	LD	HL,67
	LD	BC,(?0010+114)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,68
	ADD	HL,BC
	LD	H,(HL)
	LD	C,E
	OR	H
	LD	B,A
	LD	HL,(?0010+140)
	LD	DE,(?0010+114)
	ADD	HL,DE
	LD	DE,99
	ADD	HL,DE
	LD	L,(HL)
	LD	H,D
	ADD	HL,HL
	LD	E,L
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	ADD	HL,BC
	LD	BC,(?0010+112)
	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	(?0010+128),HL
	LD	(?0010+130),BC
; 972.	        j2 = ay_sys_getword(&module[PT1_PatternsPointer + header->PT1_PositionList[i] * 6 + 2]);
	LD	HL,67
	LD	BC,(?0010+114)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,68
	ADD	HL,BC
	LD	H,(HL)
	LD	C,E
	OR	H
	LD	B,A
	LD	HL,(?0010+140)
	LD	DE,(?0010+114)
	ADD	HL,DE
	LD	DE,99
	ADD	HL,DE
	LD	L,(HL)
	LD	H,D
	ADD	HL,HL
	LD	E,L
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	ADD	HL,BC
	LD	BC,(?0010+112)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	LD	A,BYTE3 ay_sys_getword
	LD	HL,LWRD ay_sys_getword
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	(?0010+132),HL
	LD	(?0010+134),BC
; 973.	        j3 = ay_sys_getword(&module[PT1_PatternsPointer + header->PT1_PositionList[i] * 6 + 4]);
	LD	HL,67
	LD	BC,(?0010+114)
	ADD	HL,BC
	LD	E,(HL)
	XOR	A
	LD	HL,68
	ADD	HL,BC
	LD	H,(HL)
	LD	C,E
	OR	H
	LD	B,A
	LD	HL,(?0010+140)
	LD	DE,(?0010+114)
	ADD	HL,DE
	LD	DE,99
	ADD	HL,DE
	LD	L,(HL)
	LD	H,D
	ADD	HL,HL
	LD	E,L
	LD	D,H
	ADD	HL,HL
	ADD	HL,DE
	ADD	HL,BC
	LD	BC,(?0010+112)
	ADD	HL,BC
	LD	BC,4
	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	(?0010+136),HL
	LD	(?0010+138),BC
?0391:
; 974.	        while(true)
?0392:
; 975.	        {
; 976.	            a1--;
	LD	HL,(?0010+116)
	DEC	HL
	LD	(?0010+116),HL
; 977.	            if(a1 < 0)
	BIT	7,H
	JP	Z,?0397
?0393:
; 978.	            {
; 979.	
; 980.	                if(module[j1] == 255)
	LD	HL,(?0010+128)
	LD	BC,(?0010+112)
	ADD	HL,BC
	LD	B,(HL)
	INC	B
	JP	Z,?0390
?0395:
; 981.	                    break;
?0396:
?0398:
; 982.	                while(true)
?0399:
; 983.	                {
; 984.	                    unsigned char val = module[j1];
	LD	HL,(?0010+128)
	LD	BC,(?0010+112)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+151),A
; 985.	                    if(val == 0x80 || val == 0x90 || val <= 0x5f)
	DEC	A
	JP	PE,?0402
	LD	A,(?0010+151)
	CP	144
	JR	Z,?0402
	LD	B,A
	LD	A,95
	CP	B
	JR	C,?0401
?0402:
?0403:
?0400:
; 986.	                    {
; 987.	                        a1 = a11;
	LD	HL,(?0010+122)
	LD	(?0010+116),HL
; 988.	                        j1++;
	LD	HL,(?0010+128)
	LD	BC,(?0010+130)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+128),HL
	LD	(?0010+130),BC
; 989.	                        break;
	JR	?0397
?0401:
; 990.	                    }
; 991.	                    if(val >= 0x82 && val <= 0x8f)
	LD	A,B
	CP	130
	JR	C,?0405
	LD	B,A
	LD	A,143
	CP	B
	JR	C,?0405
?0407:
?0406:
?0404:
; 992.	                    {
; 993.	                        j1 += 2;
	LD	HL,?0010+128
	LD	BC,0
	LD	DE,2
	CALL	LWRD ?L_ADDASG_L03
?0405:
; 994.	                    }
; 995.	                    if(val >= 0xb1 && val <= 0xfe)
	LD	A,(?0010+151)
	CP	177
	JR	C,?0409
	LD	B,A
	LD	A,254
	CP	B
	JR	C,?0409
?0411:
?0410:
?0408:
; 996.	                    {
; 997.	                        a11 = val - 0xb1;
	LD	C,B
	LD	B,0
	LD	HL,65359
	ADD	HL,BC
	LD	(?0010+122),HL
?0409:
; 998.	                    }
; 999.	                    if(val >= 0x91 && val <= 0xa0)
	LD	A,(?0010+151)
	CP	145
	JR	C,?0413
	LD	B,A
	LD	A,160
	CP	B
	JR	C,?0413
?0415:
?0414:
?0412:
; 1000.	                    {
; 1001.	                        b = val - 0x91;
	LD	A,B
	ADD	A,111
	LD	(?0010+148),A
?0413:
; 1002.	                    }
; 1003.	                    j1++;
	LD	HL,(?0010+128)
	LD	BC,(?0010+130)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+128),HL
	LD	(?0010+130),BC
; 1004.	                }
; 1005.	            }
	JP	LWRD ?0396
?0397:
?0394:
; 1006.	            a2--;
	LD	HL,(?0010+118)
	DEC	HL
	LD	(?0010+118),HL
; 1007.	            if(a2 < 0)
	BIT	7,H
	JP	Z,?0418
?0416:
?0419:
; 1008.	            {
; 1009.	
; 1010.	                while(true)
?0420:
; 1011.	                {
; 1012.	                    unsigned char val = module[j2];
	LD	HL,(?0010+132)
	LD	BC,(?0010+112)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+151),A
; 1013.	                    if(val == 0x80 || val == 0x90 || val <= 0x5f)
	DEC	A
	JP	PE,?0423
	LD	A,(?0010+151)
	CP	144
	JR	Z,?0423
	LD	B,A
	LD	A,95
	CP	B
	JR	C,?0422
?0423:
?0424:
?0421:
; 1014.	                    {
; 1015.	                        a2 = a22;
	LD	HL,(?0010+124)
	LD	(?0010+118),HL
; 1016.	                        j2++;
	LD	HL,(?0010+132)
	LD	BC,(?0010+134)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+132),HL
	LD	(?0010+134),BC
; 1017.	                        break;
	JR	?0418
?0422:
; 1018.	                    }
; 1019.	                    if(val >= 0x82 && val <= 0x8f)
	LD	A,B
	CP	130
	JR	C,?0426
	LD	B,A
	LD	A,143
	CP	B
	JR	C,?0426
?0428:
?0427:
?0425:
; 1020.	                    {
; 1021.	                        j2 += 2;
	LD	HL,?0010+132
	LD	BC,0
	LD	DE,2
	CALL	LWRD ?L_ADDASG_L03
?0426:
; 1022.	                    }
; 1023.	                    if(val >= 0xb1 && val <= 0xfe)
	LD	A,(?0010+151)
	CP	177
	JR	C,?0430
	LD	B,A
	LD	A,254
	CP	B
	JR	C,?0430
?0432:
?0431:
?0429:
; 1024.	                    {
; 1025.	                        a22 = val - 0xb1;
	LD	C,B
	LD	B,0
	LD	HL,65359
	ADD	HL,BC
	LD	(?0010+124),HL
?0430:
; 1026.	                    }
; 1027.	                    if(val >= 0x91 && val <= 0xa0)
	LD	A,(?0010+151)
	CP	145
	JR	C,?0434
	LD	B,A
	LD	A,160
	CP	B
	JR	C,?0434
?0436:
?0435:
?0433:
; 1028.	                    {
; 1029.	                        b = val - 0x91;
	LD	A,B
	ADD	A,111
	LD	(?0010+148),A
?0434:
; 1030.	                    }
; 1031.	                    j2++;
	LD	HL,(?0010+132)
	LD	BC,(?0010+134)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+132),HL
	LD	(?0010+134),BC
; 1032.	                }
; 1033.	            }
	JP	LWRD ?0416
?0418:
?0417:
; 1034.	            a3--;
	LD	HL,(?0010+120)
	DEC	HL
	LD	(?0010+120),HL
; 1035.	            if(a3 < 0)
	BIT	7,H
	JP	Z,?0439
?0437:
?0440:
; 1036.	            {
; 1037.	
; 1038.	                while(true)
?0441:
; 1039.	                {
; 1040.	                    unsigned char val = module[j3];
	LD	HL,(?0010+136)
	LD	BC,(?0010+112)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+151),A
; 1041.	                    if(val == 0x80 || val == 0x90 || val <= 0x5f)
	DEC	A
	JP	PE,?0444
	LD	A,(?0010+151)
	CP	144
	JR	Z,?0444
	LD	B,A
	LD	A,95
	CP	B
	JR	C,?0443
?0444:
?0445:
?0442:
; 1042.	                    {
; 1043.	                        a3 = a33;
	LD	HL,(?0010+126)
	LD	(?0010+120),HL
; 1044.	                        j3++;
	LD	HL,(?0010+136)
	LD	BC,(?0010+138)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+136),HL
	LD	(?0010+138),BC
; 1045.	                        break;
	JR	?0439
?0443:
; 1046.	                    }
; 1047.	                    if(val >= 0x82 && val <= 0x8f)
	LD	A,B
	CP	130
	JR	C,?0447
	LD	B,A
	LD	A,143
	CP	B
	JR	C,?0447
?0449:
?0448:
?0446:
; 1048.	                    {
; 1049.	                        j3 += 2;
	LD	HL,?0010+136
	LD	BC,0
	LD	DE,2
	CALL	LWRD ?L_ADDASG_L03
?0447:
; 1050.	                    }
; 1051.	                    if(val >= 0xb1 && val <= 0xfe)
	LD	A,(?0010+151)
	CP	177
	JR	C,?0451
	LD	B,A
	LD	A,254
	CP	B
	JR	C,?0451
?0453:
?0452:
?0450:
; 1052.	                    {
; 1053.	                        a33 = val - 0xb1;
	LD	C,B
	LD	B,0
	LD	HL,65359
	ADD	HL,BC
	LD	(?0010+126),HL
?0451:
; 1054.	                    }
; 1055.	                    if(val >= 0x91 && val <= 0xa0)
	LD	A,(?0010+151)
	CP	145
	JR	C,?0455
	LD	B,A
	LD	A,160
	CP	B
	JR	C,?0455
?0457:
?0456:
?0454:
; 1056.	                    {
; 1057.	                        b = val - 0x91;
	LD	A,B
	ADD	A,111
	LD	(?0010+148),A
?0455:
; 1058.	                    }
; 1059.	                    j3++;
	LD	HL,(?0010+136)
	LD	BC,(?0010+138)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+136),HL
	LD	(?0010+138),BC
; 1060.	                }
; 1061.	            }
	JP	LWRD ?0437
?0439:
?0438:
; 1062.	            tm += b;
	LD	HL,?0010+144
	LD	DE,(?0010+148)
	LD	BC,0
	LD	D,C
	CALL	LWRD ?L_ADDASG_L03
; 1063.	        }
; 1064.	    }
	JP	LWRD ?0391
?0390:
	LD	HL,(?0010+140)
	LD	BC,(?0010+142)
	CALL	LWRD ?L_INC_L03
	JP	LWRD ?1024
?0386:
; 1065.	    
; 1066.	    info->len = tm;
	LD	HL,(?0010+144)
	LD	(IX+99),L
	LD	(IX+100),H
; 1067.	    ptr = module + 69;
	LD	HL,69
	LD	BC,(?0010+112)
	ADD	HL,BC
	LD	(?0010+149),HL
; 1068.	    strncpy(info->Name, ptr, 30);
	LD	BC,30
	PUSH	BC
	JP	LWRD ?1238
; 1069.	    info->Autor[0]=0;
; 1070.	}
; 1071.	
; 1072.	
; 1073.	
; 1074.	bool PT1_Detect(unsigned char * module, unsigned int length, AYSongInfo * s)
; 1075.	{
PT1_Detect:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
	PUSH	DE
	POP	IY
; 1076.	    long j, j1, j2;
; 1077.	    long F_Length;
; 1078.	    
; 1079.	    PT1_File *header = (PT1_File *)module;
	LD	(?0010+168),DE
; 1080.	    if(length < 0x66)
	LD	DE,102
	LD	L,C
	LD	H,B
	AND	A
	SBC	HL,DE
	JP	C,?1045
?0458:
; 1081.	        return false;
?0459:
; 1082.	    if(PT1_PatternsPointer >= length)
	LD	HL,67
	LD	BC,(?0010+168)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,68
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	PUSH	IX
	POP	BC
	SBC	HL,BC
	JP	NC,?1045
?0460:
; 1083.	        return false;
?0461:
; 1084.	
; 1085.	    j = 0;
	LD	C,D
	LD	L,C
	LD	B,D
	LD	H,B
	LD	(?0010+152),HL
	LD	(?0010+154),BC
; 1086.	    j1 = 65535;
	DEC	HL
	LD	(?0010+156),HL
	LD	(?0010+158),BC
; 1087.	    for(j2 = 0; j2 <= 15; j2++)
	INC	HL
?1046:
	LD	(?0010+160),HL
	LD	(?0010+162),BC
?0463:
	PUSH	BC
	PUSH	HL
	LD	C,D
	LD	B,D
	LD	HL,15
	CALL	LWRD ?SL_CMP_L03
	JP	C,?0462
?0464:
; 1088.	    {
; 1089.	        if(j < PT1_SamplesPointers(j2))
	LD	HL,(?0010+160)
	ADD	HL,HL
	LD	BC,(?0010+168)
	ADD	HL,BC
	INC	HL
	INC	HL
	INC	HL
	LD	E,(HL)
	LD	HL,(?0010+160)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,4
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	PUSH	BC
	PUSH	HL
	LD	BC,(?0010+154)
	LD	HL,(?0010+152)
	CALL	LWRD ?SL_CMP_L03
	JR	NC,?0467
?0466:
; 1090.	            j = PT1_SamplesPointers(j2);
	LD	HL,(?0010+160)
	ADD	HL,HL
	LD	BC,(?0010+168)
	ADD	HL,BC
	INC	HL
	INC	HL
	INC	HL
	LD	E,(HL)
	LD	HL,(?0010+160)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,4
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	LD	(?0010+152),HL
	LD	(?0010+154),BC
?0467:
; 1091.	        if((PT1_OrnamentsPointers(j2) != 0) && (j1 > PT1_OrnamentsPointers(j2)))
	LD	HL,(?0010+160)
	ADD	HL,HL
	LD	BC,(?0010+168)
	ADD	HL,BC
	LD	E,35
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0010+160)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,36
	ADD	HL,BC
	LD	B,(HL)
	LD	H,E
	LD	A,D
	OR	B
	OR	H
	JR	Z,?0469
	LD	HL,(?0010+158)
	PUSH	HL
	LD	HL,(?0010+156)
	PUSH	HL
	LD	HL,(?0010+160)
	ADD	HL,HL
	LD	BC,(?0010+168)
	ADD	HL,BC
	LD	E,35
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0010+160)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,36
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	CALL	LWRD ?SL_CMP_L03
	JR	NC,?0469
?0471:
?0470:
?0468:
; 1092.	            j1 = PT1_OrnamentsPointers(j2);
	LD	HL,(?0010+160)
	ADD	HL,HL
	LD	BC,(?0010+168)
	ADD	HL,BC
	LD	E,35
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0010+160)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,36
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	LD	(?0010+156),HL
	LD	(?0010+158),BC
?0469:
	LD	HL,(?0010+160)
	LD	BC,(?0010+162)
	CALL	LWRD ?L_INC_L03
	JP	LWRD ?1046
?0462:
; 1093.	    }
; 1094.	
; 1095.	    if(j1 < 0x67)
	LD	H,B
	PUSH	BC
	LD	L,103
	PUSH	HL
	LD	BC,(?0010+158)
	LD	HL,(?0010+156)
	CALL	LWRD ?SL_CMP_L03
	JP	C,?1045
?0472:
; 1096.	        return false;
?0473:
; 1097.	    if(j < 0x67)
	LD	L,D
	LD	H,D
	PUSH	HL
	LD	L,103
	PUSH	HL
	LD	BC,(?0010+154)
	LD	HL,(?0010+152)
	CALL	LWRD ?SL_CMP_L03
	JP	C,?1045
?0474:
; 1098.	        return false;
?0475:
; 1099.	    if(j > 65534)
	PUSH	BC
	PUSH	HL
	LD	C,D
	LD	B,D
	LD	HL,65534
	CALL	LWRD ?SL_CMP_L03
	JP	C,?1045
?0476:
; 1100.	        return false;
?0477:
; 1101.	    if(j > length)
	LD	HL,(?0010+154)
	PUSH	HL
	LD	HL,(?0010+152)
	PUSH	HL
	PUSH	IX
	POP	HL
	CALL	LWRD ?SL_CMP_L03
	JP	C,?1045
?0478:
; 1102.	        return false;
?0479:
; 1103.	    if((j + module[j] * 3 + 2) != j1)
	LD	HL,(?0010+152)
	PUSH	IY
	POP	BC
	ADD	HL,BC
	LD	L,(HL)
	LD	C,L
	LD	H,D
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	PUSH	BC
	PUSH	HL
	LD	HL,(?0010+152)
	POP	BC
	ADD	HL,BC
	EX	DE,HL
	LD	HL,(?0010+154)
	POP	BC
	ADC	HL,BC
	PUSH	HL
	PUSH	DE
	LD	HL,2
	POP	BC
	ADD	HL,BC
	EX	DE,HL
	LD	HL,0
	POP	BC
	ADC	HL,BC
	EX	DE,HL
	LD	BC,(?0010+156)
	AND	A
	SBC	HL,BC
	JP	NZ,?1045
	EX	DE,HL
	LD	BC,(?0010+158)
	SBC	HL,BC
	JP	NZ,?1045
?0480:
; 1104.	        return false;
?0481:
; 1105.	
; 1106.	    j = 0;
	LD	C,L
	LD	B,H
	LD	(?0010+152),HL
	LD	(?0010+154),BC
; 1107.	    for(j2 = 0; j2 <= 15; j2++)
?1047:
	LD	(?0010+160),HL
	LD	(?0010+162),BC
?0483:
	PUSH	BC
	PUSH	HL
	LD	BC,0
	LD	HL,15
	CALL	LWRD ?SL_CMP_L03
	JR	C,?0482
?0484:
; 1108.	        if(j < PT1_OrnamentsPointers(j2))
	LD	HL,(?0010+160)
	ADD	HL,HL
	LD	BC,(?0010+168)
	ADD	HL,BC
	LD	DE,35
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0010+160)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,36
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	PUSH	BC
	PUSH	HL
	LD	BC,(?0010+154)
	LD	HL,(?0010+152)
	CALL	LWRD ?SL_CMP_L03
	JR	NC,?0487
?0486:
; 1109.	            j = PT1_OrnamentsPointers(j2);
	LD	HL,(?0010+160)
	ADD	HL,HL
	LD	BC,(?0010+168)
	ADD	HL,BC
	LD	E,35
	ADD	HL,DE
	LD	E,(HL)
	LD	HL,(?0010+160)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,36
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	LD	(?0010+152),HL
	LD	(?0010+154),BC
?0487:
	LD	HL,(?0010+160)
	LD	BC,(?0010+162)
	CALL	LWRD ?L_INC_L03
	JR	?1047
?0482:
; 1110.	    if(j < 0x67)
	LD	H,B
	PUSH	BC
	LD	L,103
	PUSH	HL
	LD	BC,(?0010+154)
	LD	HL,(?0010+152)
	CALL	LWRD ?SL_CMP_L03
	JP	C,?1045
?0488:
; 1111.	        return false;
?0489:
; 1112.	    F_Length = j + 64;
	LD	HL,0
	PUSH	HL
	LD	L,64
	PUSH	HL
	LD	HL,(?0010+152)
	POP	BC
	ADD	HL,BC
	EX	DE,HL
	LD	HL,(?0010+154)
	POP	BC
	ADC	HL,BC
	LD	C,L
	LD	B,H
	EX	DE,HL
	LD	(?0010+164),HL
	LD	(?0010+166),BC
; 1113.	    if(F_Length > 65536)
	PUSH	BC
	PUSH	HL
	LD	BC,1
	LD	L,B
	LD	H,B
	CALL	LWRD ?SL_CMP_L03
	JP	C,?1045
?0490:
; 1114.	        return false;
?0491:
; 1115.	    if(F_Length > length + 1)
	LD	HL,(?0010+166)
	PUSH	HL
	LD	HL,(?0010+164)
	PUSH	HL
	PUSH	IX
	POP	HL
	INC	HL
	DEC	BC
	CALL	LWRD ?SL_CMP_L03
	JR	C,?1045
?0492:
; 1116.	        return false;
?0493:
; 1117.	
; 1118.	    j = 0x63;
	LD	HL,99
?1048:
	LD	(?0010+152),HL
	LD	(?0010+154),BC
?0495:
; 1119.	    while((j <= PT1_PatternsPointer) && (module[j] != 255))
	PUSH	BC
	PUSH	HL
	LD	HL,67
	LD	BC,(?0010+168)
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	A,D
	LD	HL,68
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	CALL	LWRD ?SL_CMP_L03
	JR	C,?0494
	LD	HL,(?0010+152)
	PUSH	IY
	POP	BC
	ADD	HL,BC
	LD	B,(HL)
	INC	B
	JR	Z,?0494
?0498:
?0497:
?0496:
; 1120.	        j++;
	LD	HL,(?0010+152)
	LD	BC,(?0010+154)
	CALL	LWRD ?L_INC_L03
	JR	?1048
?0494:
; 1121.	    if(j + 1 != PT1_PatternsPointer)
	LD	HL,67
	LD	BC,(?0010+168)
	ADD	HL,BC
	LD	E,(HL)
	LD	HL,68
	ADD	HL,BC
	LD	B,(HL)
	LD	L,E
	LD	A,D
	OR	B
	LD	H,A
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	PUSH	BC
	PUSH	HL
	LD	L,D
	LD	H,D
	PUSH	HL
	INC	HL
	PUSH	HL
	LD	HL,(?0010+152)
	POP	BC
	ADD	HL,BC
	EX	DE,HL
	LD	HL,(?0010+154)
	POP	BC
	ADC	HL,BC
	EX	DE,HL
	POP	BC
	AND	A
	SBC	HL,BC
	POP	BC
	JR	NZ,?1045
	EX	DE,HL
	SBC	HL,BC
	JR	Z,?0500
?1045:
?0499:
; 1122.	        return false;
	LD	L,0
	JR	?0502
?0500:
; 1123.	
; 1124.	    header->PT1_NumberOfPositions = j - 0x63;
	LD	HL,(?0010+168)
	INC	HL
	LD	A,(?0010+152)
	ADD	A,157
	LD	(HL),A
; 1125.	    
; 1126.	    strcpy(s->player, "ProTracker1");
	LD	BC,?0501
	LD	HL,8
	ADD	HL,SP
	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
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 1127.	    
; 1128.	    return true;
	LD	L,1
; 1129.	}
?0502:
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 1130.	
; 1131.	
; 1132.	
; 1133.	
; 1134.	
; 1135.	
; 1136.	
; 1137.	
; 1138.	
; 1139.	
; 1140.	
; 1141.	
; 1142.	
; 1143.	//////
; 1144.	
; 1145.	
; 1146.	
; 1147.	
; 1148.	
; 1149.	
; 1150.	/////////////////////////////////////////////////////
; 1151.	//////////////////////////////////////////////////////
; 1152.	
; 1153.	
; 1154.	
; 1155.	
; 1156.	//Table #0 of Pro Tracker 3.3x - 3.4r
; 1157.	const unsigned short PT3NoteTable_PT_33_34r[] =
; 1158.	{ 0x0C21, 0x0B73, 0x0ACE, 0x0A33, 0x09A0, 0x0916, 0x0893, 0x0818, 0x07A4, 0x0736, 0x06CE, 0x066D, 0x0610, 0x05B9, 0x0567, 0x0519, 0x04D0, 0x048B, 0x0449, 0x040C, 0x03D2, 0x039B, 0x0367, 0x0336, 0x0308, 0x02DC, 0x02B3, 0x028C, 0x0268, 0x0245, 0x0224, 0x0206, 0x01E9, 0x01CD, 0x01B3, 0x019B, 0x0184, 0x016E, 0x0159, 0x0146, 0x0134, 0x0122, 0x0112, 0x0103, 0x00F4, 0x00E6, 0x00D9, 0x00CD, 0x00C2, 0x00B7, 0x00AC, 0x00A3, 0x009A, 0x0091, 0x0089, 0x0081, 0x007A, 0x0073, 0x006C, 0x0066, 0x0061, 0x005B, 0x0056, 0x0051, 0x004D, 0x0048, 0x0044, 0x0040, 0x003D, 0x0039, 0x0036, 0x0033, 0x0030, 0x002D, 0x002B, 0x0028, 0x0026, 0x0024, 0x0022, 0x0020, 0x001E, 0x001C, 0x001B, 0x0019, 0x0018, 0x0016, 0x0015, 0x0014, 0x0013, 0x0012, 0x0011, 0x0010, 0x000F, 0x000E, 0x000D, 0x000C };
; 1159.	
; 1160.	//{Table #0 of Pro Tracker 3.4x - 3.5x}
; 1161.	const unsigned short PT3NoteTable_PT_34_35[] =
; 1162.	{ 0x0C22, 0x0B73, 0x0ACF, 0x0A33, 0x09A1, 0x0917, 0x0894, 0x0819, 0x07A4, 0x0737, 0x06CF, 0x066D, 0x0611, 0x05BA, 0x0567, 0x051A, 0x04D0, 0x048B, 0x044A, 0x040C, 0x03D2, 0x039B, 0x0367, 0x0337, 0x0308, 0x02DD, 0x02B4, 0x028D, 0x0268, 0x0246, 0x0225, 0x0206, 0x01E9, 0x01CE, 0x01B4, 0x019B, 0x0184, 0x016E, 0x015A, 0x0146, 0x0134, 0x0123, 0x0112, 0x0103, 0x00F5, 0x00E7, 0x00DA, 0x00CE, 0x00C2, 0x00B7, 0x00AD, 0x00A3, 0x009A, 0x0091, 0x0089, 0x0082, 0x007A, 0x0073, 0x006D, 0x0067, 0x0061, 0x005C, 0x0056, 0x0052, 0x004D, 0x0049, 0x0045, 0x0041, 0x003D, 0x003A, 0x0036, 0x0033, 0x0031, 0x002E, 0x002B, 0x0029, 0x0027, 0x0024, 0x0022, 0x0020, 0x001F, 0x001D, 0x001B, 0x001A, 0x0018, 0x0017, 0x0016, 0x0014, 0x0013, 0x0012, 0x0011, 0x0010, 0x000F, 0x000E, 0x000D, 0x000C };
; 1163.	
; 1164.	//{Table #1 of Pro Tracker 3.3x - 3.5x)}
; 1165.	const unsigned short PT3NoteTable_ST[] =
; 1166.	{ 0x0EF8, 0x0E10, 0x0D60, 0x0C80, 0x0BD8, 0x0B28, 0x0A88, 0x09F0, 0x0960, 0x08E0, 0x0858, 0x07E0, 0x077C, 0x0708, 0x06B0, 0x0640, 0x05EC, 0x0594, 0x0544, 0x04F8, 0x04B0, 0x0470, 0x042C, 0x03FD, 0x03BE, 0x0384, 0x0358, 0x0320, 0x02F6, 0x02CA, 0x02A2, 0x027C, 0x0258, 0x0238, 0x0216, 0x01F8, 0x01DF, 0x01C2, 0x01AC, 0x0190, 0x017B, 0x0165, 0x0151, 0x013E, 0x012C, 0x011C, 0x010A, 0x00FC, 0x00EF, 0x00E1, 0x00D6, 0x00C8, 0x00BD, 0x00B2, 0x00A8, 0x009F, 0x0096, 0x008E, 0x0085, 0x007E, 0x0077, 0x0070, 0x006B, 0x0064, 0x005E, 0x0059, 0x0054, 0x004F, 0x004B, 0x0047, 0x0042, 0x003F, 0x003B, 0x0038, 0x0035, 0x0032, 0x002F, 0x002C, 0x002A, 0x0027, 0x0025, 0x0023, 0x0021, 0x001F, 0x001D, 0x001C, 0x001A, 0x0019, 0x0017, 0x0016, 0x0015, 0x0013, 0x0012, 0x0011, 0x0010, 0x000F };
; 1167.	
; 1168.	//{Table #2 of Pro Tracker 3.4r}
; 1169.	const unsigned short PT3NoteTable_ASM_34r[] =
; 1170.	{ 0x0D3E, 0x0C80, 0x0BCC, 0x0B22, 0x0A82, 0x09EC, 0x095C, 0x08D6, 0x0858, 0x07E0, 0x076E, 0x0704, 0x069F, 0x0640, 0x05E6, 0x0591, 0x0541, 0x04F6, 0x04AE, 0x046B, 0x042C, 0x03F0, 0x03B7, 0x0382, 0x034F, 0x0320, 0x02F3, 0x02C8, 0x02A1, 0x027B, 0x0257, 0x0236, 0x0216, 0x01F8, 0x01DC, 0x01C1, 0x01A8, 0x0190, 0x0179, 0x0164, 0x0150, 0x013D, 0x012C, 0x011B, 0x010B, 0x00FC, 0x00EE, 0x00E0, 0x00D4, 0x00C8, 0x00BD, 0x00B2, 0x00A8, 0x009F, 0x0096, 0x008D, 0x0085, 0x007E, 0x0077, 0x0070, 0x006A, 0x0064, 0x005E, 0x0059, 0x0054, 0x0050, 0x004B, 0x0047, 0x0043, 0x003F, 0x003C, 0x0038, 0x0035, 0x0032, 0x002F, 0x002D, 0x002A, 0x0028, 0x0026, 0x0024, 0x0022, 0x0020, 0x001E, 0x001D, 0x001B, 0x001A, 0x0019, 0x0018, 0x0015, 0x0014, 0x0013, 0x0012, 0x0011, 0x0010, 0x000F, 0x000E };
; 1171.	
; 1172.	//{Table #2 of Pro Tracker 3.4x - 3.5x}
; 1173.	const unsigned short PT3NoteTable_ASM_34_35[] =
; 1174.	{ 0x0D10, 0x0C55, 0x0BA4, 0x0AFC, 0x0A5F, 0x09CA, 0x093D, 0x08B8, 0x083B, 0x07C5, 0x0755, 0x06EC, 0x0688, 0x062A, 0x05D2, 0x057E, 0x052F, 0x04E5, 0x049E, 0x045C, 0x041D, 0x03E2, 0x03AB, 0x0376, 0x0344, 0x0315, 0x02E9, 0x02BF, 0x0298, 0x0272, 0x024F, 0x022E, 0x020F, 0x01F1, 0x01D5, 0x01BB, 0x01A2, 0x018B, 0x0174, 0x0160, 0x014C, 0x0139, 0x0128, 0x0117, 0x0107, 0x00F9, 0x00EB, 0x00DD, 0x00D1, 0x00C5, 0x00BA, 0x00B0, 0x00A6, 0x009D, 0x0094, 0x008C, 0x0084, 0x007C, 0x0075, 0x006F, 0x0069, 0x0063, 0x005D, 0x0058, 0x0053, 0x004E, 0x004A, 0x0046, 0x0042, 0x003E, 0x003B, 0x0037, 0x0034, 0x0031, 0x002F, 0x002C, 0x0029, 0x0027, 0x0025, 0x0023, 0x0021, 0x001F, 0x001D, 0x001C, 0x001A, 0x0019, 0x0017, 0x0016, 0x0015, 0x0014, 0x0012, 0x0011, 0x0010, 0x000F, 0x000E, 0x000D };
; 1175.	
; 1176.	//{Table #3 of Pro Tracker 3.4r}
; 1177.	const unsigned short PT3NoteTable_REAL_34r[] =
; 1178.	{ 0x0CDA, 0x0C22, 0x0B73, 0x0ACF, 0x0A33, 0x09A1, 0x0917, 0x0894, 0x0819, 0x07A4, 0x0737, 0x06CF, 0x066D, 0x0611, 0x05BA, 0x0567, 0x051A, 0x04D0, 0x048B, 0x044A, 0x040C, 0x03D2, 0x039B, 0x0367, 0x0337, 0x0308, 0x02DD, 0x02B4, 0x028D, 0x0268, 0x0246, 0x0225, 0x0206, 0x01E9, 0x01CE, 0x01B4, 0x019B, 0x0184, 0x016E, 0x015A, 0x0146, 0x0134, 0x0123, 0x0113, 0x0103, 0x00F5, 0x00E7, 0x00DA, 0x00CE, 0x00C2, 0x00B7, 0x00AD, 0x00A3, 0x009A, 0x0091, 0x0089, 0x0082, 0x007A, 0x0073, 0x006D, 0x0067, 0x0061, 0x005C, 0x0056, 0x0052, 0x004D, 0x0049, 0x0045, 0x0041, 0x003D, 0x003A, 0x0036, 0x0033, 0x0031, 0x002E, 0x002B, 0x0029, 0x0027, 0x0024, 0x0022, 0x0020, 0x001F, 0x001D, 0x001B, 0x001A, 0x0018, 0x0017, 0x0016, 0x0014, 0x0013, 0x0012, 0x0011, 0x0010, 0x000F, 0x000E, 0x000D };
; 1179.	
; 1180.	//{Table #3 of Pro Tracker 3.4x - 3.5x}
; 1181.	const unsigned short PT3NoteTable_REAL_34_35[] =
; 1182.	{ 0x0CDA, 0x0C22, 0x0B73, 0x0ACF, 0x0A33, 0x09A1, 0x0917, 0x0894, 0x0819, 0x07A4, 0x0737, 0x06CF, 0x066D, 0x0611, 0x05BA, 0x0567, 0x051A, 0x04D0, 0x048B, 0x044A, 0x040C, 0x03D2, 0x039B, 0x0367, 0x0337, 0x0308, 0x02DD, 0x02B4, 0x028D, 0x0268, 0x0246, 0x0225, 0x0206, 0x01E9, 0x01CE, 0x01B4, 0x019B, 0x0184, 0x016E, 0x015A, 0x0146, 0x0134, 0x0123, 0x0112, 0x0103, 0x00F5, 0x00E7, 0x00DA, 0x00CE, 0x00C2, 0x00B7, 0x00AD, 0x00A3, 0x009A, 0x0091, 0x0089, 0x0082, 0x007A, 0x0073, 0x006D, 0x0067, 0x0061, 0x005C, 0x0056, 0x0052, 0x004D, 0x0049, 0x0045, 0x0041, 0x003D, 0x003A, 0x0036, 0x0033, 0x0031, 0x002E, 0x002B, 0x0029, 0x0027, 0x0024, 0x0022, 0x0020, 0x001F, 0x001D, 0x001B, 0x001A, 0x0018, 0x0017, 0x0016, 0x0014, 0x0013, 0x0012, 0x0011, 0x0010, 0x000F, 0x000E, 0x000D };
; 1183.	
; 1184.	//{Volume table of Pro Tracker 3.3x - 3.4x}
; 1185.	const unsigned char PT3VolumeTable_33_34[16][16] =
; 1186.	{
; 1187.	{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
; 1188.	{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
; 1189.	{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02 },
; 1190.	{ 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03 },
; 1191.	{ 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04 },
; 1192.	{ 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05 },
; 1193.	{ 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06 },
; 1194.	{ 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07 },
; 1195.	{ 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07, 0x08 },
; 1196.	{ 0x00, 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09 },
; 1197.	{ 0x00, 0x00, 0x01, 0x02, 0x02, 0x03, 0x04, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x0A },
; 1198.	{ 0x00, 0x00, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x09, 0x09, 0x0A, 0x0B },
; 1199.	{ 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x05, 0x06, 0x07, 0x08, 0x08, 0x09, 0x0A, 0x0B, 0x0C },
; 1200.	{ 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D },
; 1201.	{ 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E },
; 1202.	{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F } };
; 1203.	
; 1204.	//{Volume table of Pro Tracker 3.5x}
; 1205.	const unsigned char PT3VolumeTable_35[16][16] =
; 1206.	{
; 1207.	{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
; 1208.	{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
; 1209.	{ 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02 },
; 1210.	{ 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03 },
; 1211.	{ 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04 },
; 1212.	{ 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05 },
; 1213.	{ 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06 },
; 1214.	{ 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07 },
; 1215.	{ 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x06, 0x07, 0x07, 0x08 },
; 1216.	{ 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x04, 0x04, 0x05, 0x05, 0x06, 0x07, 0x07, 0x08, 0x08, 0x09 },
; 1217.	{ 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x05, 0x06, 0x07, 0x07, 0x08, 0x09, 0x09, 0x0A },
; 1218.	{ 0x00, 0x01, 0x01, 0x02, 0x03, 0x04, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08, 0x09, 0x0A, 0x0A, 0x0B },
; 1219.	{ 0x00, 0x01, 0x02, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0A, 0x0B, 0x0C },
; 1220.	{ 0x00, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0A, 0x0B, 0x0C, 0x0D },
; 1221.	{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E },
; 1222.	{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F } };
; 1223.	
; 1224.	
; 1225.	
; 1226.	typedef struct 
; 1227.	{
; 1228.	    unsigned short Address_In_Pattern, OrnamentPointer, SamplePointer, Ton;
; 1229.	    unsigned char Loop_Ornament_Position, Ornament_Length, Position_In_Ornament, Loop_Sample_Position, Sample_Length, Position_In_Sample, Volume, Number_Of_Notes_To_Skip, Note, Slide_To_Note, Amplitude;
; 1230.	    bool Envelope_Enabled, Enabled, SimpleGliss;
; 1231.	    short Current_Amplitude_Sliding, Current_Noise_Sliding, Current_Envelope_Sliding, Ton_Slide_Count, Current_OnOff, OnOff_Delay, OffOn_Delay, Ton_Slide_Delay, Current_Ton_Sliding, Ton_Accumulator, Ton_Slide_Step, Ton_Delta;
; 1232.	    signed char Note_Skip_Counter;
; 1233.	} PT3_Channel_Parameters;
; 1234.	
; 1235.	typedef struct 
; 1236.	{
; 1237.	    unsigned char Env_Base_lo;
; 1238.	    unsigned char Env_Base_hi;
; 1239.	    short Cur_Env_Slide, Env_Slide_Add;
; 1240.	    signed char Cur_Env_Delay, Env_Delay;
; 1241.	    unsigned char Noise_Base, Delay, AddToNoise, DelayCounter, CurrentPosition;
; 1242.	    long Version;
; 1243.	} PT3_Parameters;
; 1244.	
; 1245.	typedef struct 
; 1246.	{
; 1247.	    PT3_Parameters PT3;
; 1248.	    PT3_Channel_Parameters PT3_A, PT3_B, PT3_C;
; 1249.	} PT3_SongInfo;
; 1250.	
; 1251.	#define PT3_A ((PT3_SongInfo *)data)->PT3_A
; 1252.	#define PT3_B ((PT3_SongInfo *)data)->PT3_B
; 1253.	#define PT3_C ((PT3_SongInfo *)data)->PT3_C
; 1254.	#define PT3 ((PT3_SongInfo *)data)->PT3
; 1255.	
; 1256.	#define GET_COMMON_VARS unsigned char *module; PT3_File *header; void *data; module = info->module; header = (PT3_File *)info->module; data = info->data;   
; 1257.	
; 1258.	
; 1259.	
; 1260.	
; 1261.	
; 1262.	PT3_SongInfo data0;
; 1263.	
; 1264.	void PT3_Init(AYSongInfo * info)
; 1265.	{
PT3_Init:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 1266.	    //unsigned char *ptr;
; 1267.	    long version;
; 1268.	    long i;
; 1269.	    unsigned char b;
; 1270.	    unsigned long y;
; 1271.	    void *data;
; 1272.	    unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+185),HL
; 1273.	    PT3_File *header = (PT3_File *)module;
	LD	(?0010+187),HL
; 1274.	    
; 1275.	    
; 1276.	    info->data =  &data0;
	LD	(IX+4),LOW(data0)
	LD	(IX+5),HIGH(data0)
; 1277.	    
; 1278.	    memset(info->data, 0, sizeof(PT3_SongInfo));
	LD	BC,158
	PUSH	BC
	LD	C,B
	LD	E,(IX+4)
	LD	D,(IX+5)
	CALL	LWRD ?1241
	POP	AF
; 1279.	
; 1280.	    version = 6;
	LD	BC,0
	LD	HL,6
	LD	(?0010+170),HL
	LD	(?0010+172),BC
; 1281.	
; 1282.	    if((header->PT3_MusicName[13] >= '0') && (header->PT3_MusicName[13] <= '9'))
	LD	L,13
	LD	BC,(?0010+187)
	ADD	HL,BC
	LD	A,(HL)
	XOR	128
	CP	176
	JR	C,?0504
	LD	HL,13
	LD	BC,(?0010+187)
	ADD	HL,BC
	LD	A,57
	SUB	(HL)
	JP	PO,?1065
	XOR	128
?1065:
	JP	M,?0504
?0506:
?0505:
?0503:
; 1283.	    {
; 1284.	        version = header->PT3_MusicName[13] - 0x30;
	LD	HL,13
	LD	BC,(?0010+187)
	ADD	HL,BC
	LD	C,(HL)
	LD	A,C
	RLCA
	SBC	A,A
	LD	B,A
	LD	HL,65488
	ADD	HL,BC
	LD	A,H
	RLCA
	SBC	A,A
	LD	C,A
	LD	B,C
	LD	(?0010+170),HL
	LD	(?0010+172),BC
?0504:
; 1285.	    }
; 1286.	    
; 1287.	   // ptr = PT3_FindSig(module + 0x63, info->Length - 0x63);
; 1288.	    
; 1289.	    data = info->data;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	(?0010+183),HL
; 1290.	    module = info->module;
	LD	L,(IX+2)
	LD	H,(IX+3)
	LD	(?0010+185),HL
; 1291.	
; 1292.	    for(y = 0; y < 2; y++)
	LD	BC,0
	LD	L,C
	LD	H,B
?1070:
	LD	(?0010+179),HL
	LD	(?0010+181),BC
?0508:
	AND	A
	LD	BC,2
	SBC	HL,BC
	LD	HL,(?0010+181)
	DEC	BC
	DEC	BC
	SBC	HL,BC
	JP	NC,?0507
?0509:
; 1293.	    {
; 1294.	        i = header->PT3_PositionList[0];
	LD	HL,201
	LD	BC,(?0010+187)
	ADD	HL,BC
	LD	L,(HL)
	LD	BC,0
	LD	H,C
	LD	(?0010+174),HL
	LD	(?0010+176),BC
; 1295.	        b = header->PT3_MusicName[0x62];
	LD	L,98
	LD	BC,(?0010+187)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+178),A
; 1296.	        if(b != 0x20)
	CP	32
	JR	Z,?0512
?0511:
; 1297.	        {
; 1298.	            i = b * 3 - 3 - i;
	LD	L,A
	LD	C,L
	LD	H,0
	LD	B,H
	ADD	HL,HL
	ADD	HL,BC
	LD	A,H
	RLCA
	SBC	A,A
	LD	E,A
	LD	D,E
	AND	A
	LD	BC,(?0010+174)
	SBC	HL,BC
	EX	DE,HL
	LD	BC,(?0010+176)
	SBC	HL,BC
	PUSH	HL
	PUSH	DE
	LD	HL,65533
	POP	BC
	ADD	HL,BC
	EX	DE,HL
	LD	HL,65535
	POP	BC
	ADC	HL,BC
	LD	C,L
	LD	B,H
	EX	DE,HL
	LD	(?0010+174),HL
	LD	(?0010+176),BC
?0512:
; 1299.	        }
; 1300.	        PT3.Version = version;
	LD	HL,13
	LD	BC,(?0010+183)
	ADD	HL,BC
	LD	BC,(?0010+172)
	LD	DE,(?0010+170)
	LD	(HL),E
	INC	HL
	LD	(HL),D
	INC	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1301.	        PT3.DelayCounter = 1;
	LD	HL,11
	LD	BC,(?0010+183)
	ADD	HL,BC
	LD	(HL),1
; 1302.	        PT3.Delay = header->PT3_Delay;
	LD	HL,100
	LD	DE,(?0010+187)
	ADD	HL,DE
	LD	H,(HL)
	PUSH	HL
	LD	HL,9
	ADD	HL,BC
	POP	AF
	LD	(HL),A
; 1303.	        PT3_A.Address_In_Pattern = ay_sys_getword(&module[PT3_PatternsPointer + i * 2]);
	LD	HL,17
	ADD	HL,BC
	PUSH	HL
	LD	HL,103
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,104
	ADD	HL,DE
	LD	H,(HL)
	EX	DE,HL
	POP	HL
	LD	C,L
	LD	A,H
	OR	D
	LD	B,A
	LD	HL,(?0010+174)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,(?0010+185)
	CALL	LWRD ?1243
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1304.	        PT3_B.Address_In_Pattern = ay_sys_getword(&module[PT3_PatternsPointer + i * 2 + 2]);
	LD	HL,64
	LD	BC,(?0010+183)
	ADD	HL,BC
	PUSH	HL
	LD	HL,103
	LD	DE,(?0010+187)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,104
	ADD	HL,DE
	LD	H,(HL)
	EX	DE,HL
	POP	HL
	LD	C,L
	LD	A,H
	OR	D
	LD	B,A
	LD	HL,(?0010+174)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,(?0010+185)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	CALL	LWRD ?1244
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1305.	        PT3_C.Address_In_Pattern = ay_sys_getword(&module[PT3_PatternsPointer + i * 2 + 4]);
	LD	HL,111
	LD	BC,(?0010+183)
	ADD	HL,BC
	PUSH	HL
	LD	HL,103
	LD	DE,(?0010+187)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,104
	ADD	HL,DE
	LD	H,(HL)
	EX	DE,HL
	POP	HL
	LD	C,L
	LD	A,H
	OR	D
	LD	B,A
	LD	HL,(?0010+174)
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,(?0010+185)
	ADD	HL,BC
	LD	DE,4
	ADD	HL,DE
	CALL	LWRD ?1245
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1306.	
; 1307.	        PT3_A.OrnamentPointer = PT3_OrnamentsPointers(0);
	LD	HL,19
	LD	BC,(?0010+183)
	ADD	HL,BC
	PUSH	HL
	LD	HL,169
	LD	DE,(?0010+187)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,170
	ADD	HL,DE
	LD	H,(HL)
	EX	DE,HL
	POP	HL
	LD	C,L
	LD	A,H
	OR	D
	LD	B,A
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1308.	        PT3_A.Loop_Ornament_Position = module[PT3_A.OrnamentPointer];
	LD	HL,19
	LD	BC,(?0010+183)
	ADD	HL,BC
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	LD	DE,(?0010+185)
	ADD	HL,DE
	LD	H,(HL)
	PUSH	HL
	LD	HL,25
	ADD	HL,BC
	POP	AF
	LD	(HL),A
; 1309.	        PT3_A.OrnamentPointer++;
	LD	HL,19
	ADD	HL,BC
	INC	(HL)
	INC	HL
	JR	NZ,?1066
	INC	(HL)
?1066:
; 1310.	        PT3_A.Ornament_Length = module[PT3_A.OrnamentPointer];
	LD	HL,19
	ADD	HL,BC
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	ADD	HL,DE
	LD	H,(HL)
	PUSH	HL
	LD	HL,26
	ADD	HL,BC
	POP	AF
	LD	(HL),A
; 1311.	        PT3_A.OrnamentPointer++;
	LD	HL,19
	ADD	HL,BC
	INC	(HL)
	INC	HL
	JR	NZ,?1067
	INC	(HL)
?1067:
; 1312.	        PT3_A.SamplePointer = PT3_SamplesPointers(1);
	LD	HL,21
	ADD	HL,BC
	PUSH	HL
	LD	HL,107
	LD	DE,(?0010+187)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,108
	ADD	HL,DE
	LD	H,(HL)
	EX	DE,HL
	POP	HL
	LD	C,L
	LD	A,H
	OR	D
	LD	B,A
	POP	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
; 1313.	        PT3_A.Loop_Sample_Position = module[PT3_A.SamplePointer];
	LD	HL,21
	LD	BC,(?0010+183)
	ADD	HL,BC
	LD	D,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,D
	LD	DE,(?0010+185)
	ADD	HL,DE
	LD	H,(HL)
	PUSH	HL
	LD	HL,28
	ADD	HL,BC
	POP	AF
	LD	(HL),A
; 1314.	        PT3_A.SamplePointer++;
	LD	HL,21
	ADD	HL,BC
	INC	(HL)
	INC	HL
	JR	NZ,?1068
	INC	(HL)
?1068:
; 1315.	        PT3_A.Sample_Length = module[PT3_A.SamplePointer];
	LD	HL,21
	ADD	HL,BC
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	ADD	HL,DE
	LD	H,(HL)
	PUSH	HL
	LD	HL,29
	ADD	HL,BC
	POP	AF
	LD	(HL),A
; 1316.	        PT3_A.SamplePointer++;
	LD	HL,21
	ADD	HL,BC
	INC	(HL)
	INC	HL
	JR	NZ,?1069
	INC	(HL)
?1069:
; 1317.	        PT3_A.Volume = 15;
	LD	HL,31
	ADD	HL,BC
	LD	(HL),15
; 1318.	        PT3_A.Note_Skip_Counter = 1;
	LD	HL,63
	ADD	HL,BC
	LD	(HL),1
; 1319.	
; 1320.	        PT3_B.OrnamentPointer = PT3_A.OrnamentPointer;
	LD	HL,66
	ADD	HL,BC
	PUSH	HL
	LD	HL,19
	ADD	HL,BC
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1321.	        PT3_B.Loop_Ornament_Position = PT3_A.Loop_Ornament_Position;
	LD	HL,25
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,72
	ADD	HL,BC
	LD	(HL),D
; 1322.	        PT3_B.Ornament_Length = PT3_A.Ornament_Length;
	LD	HL,26
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,73
	ADD	HL,BC
	LD	(HL),D
; 1323.	        PT3_B.SamplePointer = PT3_A.SamplePointer;
	LD	HL,68
	ADD	HL,BC
	PUSH	HL
	LD	HL,21
	ADD	HL,BC
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1324.	        PT3_B.Loop_Sample_Position = PT3_A.Loop_Sample_Position;
	LD	HL,28
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,75
	ADD	HL,BC
	LD	(HL),D
; 1325.	        PT3_B.Sample_Length = PT3_A.Sample_Length;
	LD	HL,29
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,76
	ADD	HL,BC
	LD	(HL),D
; 1326.	        PT3_B.Volume = 15;
	LD	HL,78
	ADD	HL,BC
	LD	(HL),15
; 1327.	        PT3_B.Note_Skip_Counter = 1;
	LD	HL,110
	ADD	HL,BC
	LD	(HL),1
; 1328.	
; 1329.	        PT3_C.OrnamentPointer = PT3_A.OrnamentPointer;
	LD	HL,113
	ADD	HL,BC
	PUSH	HL
	LD	HL,19
	ADD	HL,BC
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1330.	        PT3_C.Loop_Ornament_Position = PT3_A.Loop_Ornament_Position;
	LD	HL,25
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,119
	ADD	HL,BC
	LD	(HL),D
; 1331.	        PT3_C.Ornament_Length = PT3_A.Ornament_Length;
	LD	HL,26
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,120
	ADD	HL,BC
	LD	(HL),D
; 1332.	        PT3_C.SamplePointer = PT3_A.SamplePointer;
	LD	HL,115
	ADD	HL,BC
	PUSH	HL
	LD	HL,21
	ADD	HL,BC
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1333.	        PT3_C.Loop_Sample_Position = PT3_A.Loop_Sample_Position;
	LD	HL,28
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,122
	ADD	HL,BC
	LD	(HL),D
; 1334.	        PT3_C.Sample_Length = PT3_A.Sample_Length;
	LD	HL,29
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,123
	ADD	HL,BC
	LD	(HL),D
; 1335.	        PT3_C.Volume = 15;
	LD	HL,125
	ADD	HL,BC
	LD	(HL),15
; 1336.	        PT3_C.Note_Skip_Counter = 1;
	LD	HL,157
	ADD	HL,BC
	LD	(HL),1
; 1337.	
; 1338.	        data = info->data;
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	(?0010+183),HL
; 1339.	        module = info->module;
	LD	L,(IX+2)
	LD	H,(IX+3)
	LD	(?0010+185),HL
; 1340.	        header = (PT3_File *)module;
	LD	(?0010+187),HL
	LD	HL,(?0010+179)
	LD	BC,(?0010+181)
	CALL	LWRD ?L_INC_L03
	JP	LWRD ?1070
?0507:
; 1341.	    }
; 1342.	
; 1343.	        info->slow = 1;
	JP	LWRD ?1239
; 1344.	}
; 1345.	
; 1346.	int PT3_GetNoteFreq(AYSongInfo * info, unsigned char j)
; 1347.	{
PT3_GetNoteFreq:
	PUSH	IY
	PUSH	IX
	LD	IX,0
	ADD	IX,SP
	PUSH	BC
	PUSH	DE
	POP	IY
; 1348.	
; 1349.	    GET_COMMON_VARS;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+189),HL
	LD	L,(IY+2)
	LD	H,(IY+3)
	LD	(?0010+191),HL
	LD	E,(IY+4)
	LD	D,(IY+5)
	LD	(?0010+193),DE
; 1350.	        
; 1351.	         
; 1352.	    switch(header->PT3_TonTableId)
	LD	DE,99
	ADD	HL,DE
	LD	A,(HL)
	CP	0
	JR	NZ,?0517
?0514:
; 1353.	    {
; 1354.	        case 0:
; 1355.	            if(PT3.Version <= 3)
	LD	HL,13
	LD	BC,(?0010+193)
	ADD	HL,BC
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	PUSH	DE
	PUSH	BC
	LD	BC,0
	LD	HL,3
	CALL	LWRD ?SL_CMP_L03
	LD	L,(IX-2)
	JR	C,?0516
?0515:
; 1356.	                return PT3NoteTable_PT_33_34r[j];
	ADD	HL,HL
	LD	BC,PT3NoteTable_PT_33_34r
	JR	?1071
; 1357.	            else
?0516:
; 1358.	                return PT3NoteTable_PT_34_35[j];
	ADD	HL,HL
	LD	BC,PT3NoteTable_PT_34_35
	JR	?1071
; 1359.	        case 1:
?0517:
	CP	1
	JR	NZ,?0518
; 1360.	            return PT3NoteTable_ST[j];
	LD	L,C
	LD	H,D
	ADD	HL,HL
	LD	BC,PT3NoteTable_ST
	JR	?1071
; 1361.	        case 2:
?0518:
	CP	2
	LD	HL,13
	LD	BC,(?0010+193)
	ADD	HL,BC
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	PUSH	DE
	PUSH	BC
	LD	BC,0
	LD	HL,3
	JR	NZ,?0521
; 1362.	            if(PT3.Version <= 3)
	CALL	LWRD ?SL_CMP_L03
	LD	L,(IX-2)
	JR	C,?0520
?0519:
; 1363.	                return PT3NoteTable_ASM_34r[j];
	ADD	HL,HL
	LD	BC,PT3NoteTable_ASM_34r
	JR	?1071
; 1364.	            else
?0520:
; 1365.	                return PT3NoteTable_ASM_34_35[j];
	ADD	HL,HL
	LD	BC,PT3NoteTable_ASM_34_35
	JR	?1071
; 1366.	        default:
?0521:
; 1367.	            if(PT3.Version <= 3)
	CALL	LWRD ?SL_CMP_L03
	LD	L,(IX-2)
	JR	C,?0523
?0522:
; 1368.	                return PT3NoteTable_REAL_34r[j];
	ADD	HL,HL
	LD	BC,PT3NoteTable_REAL_34r
	JR	?1071
; 1369.	            else
?0523:
; 1370.	                return PT3NoteTable_REAL_34_35[j];
	ADD	HL,HL
	LD	BC,PT3NoteTable_REAL_34_35
?1071:
	ADD	HL,BC
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
; 1371.	    }
?0524:
	LD	SP,IX
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
?0513:
; 1372.	        
; 1373.	}
; 1374.	
; 1375.	void PT3_PatternIntterpreter(AYSongInfo * info, PT3_Channel_Parameters * chan)
; 1376.	{
PT3_PatternIntterpreter:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
	PUSH	DE
	POP	IY
; 1377.	    bool quit;
; 1378.	    unsigned char flag9, flag8, flag5, flag4, flag3, flag2, flag1;
; 1379.	    unsigned char counter;
; 1380.	    int prnote, prsliding;
; 1381.	
; 1382.	    GET_COMMON_VARS;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+208),HL
	LD	L,(IY+2)
	LD	H,(IY+3)
	LD	(?0010+210),HL
	LD	L,(IY+4)
	LD	H,(IY+5)
	LD	(?0010+212),HL
; 1383.	  
; 1384.	    prnote = chan->Note;
	LD	HL,16
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	(?0010+204),DE
; 1385.	    prsliding = chan->Current_Ton_Sliding;
	LD	HL,38
	ADD	HL,BC
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	(?0010+206),HL
; 1386.	    quit = false;
	XOR	A
	LD	(?0010+195),A
; 1387.	    counter = 0;
	LD	(?0010+203),A
; 1388.	    flag9 = flag8 = flag5 = flag4 = flag3 = flag2 = flag1 = 0;
	LD	(?0010+202),A
	LD	(?0010+201),A
	LD	(?0010+200),A
	LD	(?0010+199),A
	LD	(?0010+198),A
	LD	(?0010+197),A
	LD	(?0010+196),A
?0527:
; 1389.	    do
; 1390.	    {
; 1391.	        unsigned char val = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+214),A
; 1392.	        if(val >= 0xf0)
	CP	240
	JP	C,?0529
?0528:
; 1393.	        {
; 1394.	            chan->OrnamentPointer = PT3_OrnamentsPointers((val - 0xf0));
	LD	C,A
	LD	B,0
	LD	HL,65296
	ADD	HL,BC
	ADD	HL,HL
	LD	BC,(?0010+210)
	ADD	HL,BC
	LD	DE,169
	ADD	HL,DE
	LD	E,(HL)
	PUSH	DE
	LD	L,A
	LD	H,D
	LD	DE,65296
	ADD	HL,DE
	ADD	HL,HL
	ADD	HL,BC
	LD	DE,170
	ADD	HL,DE
	LD	D,(HL)
	EX	DE,HL
	POP	DE
	LD	(IX+2),E
	LD	A,D
	OR	H
	LD	(IX+3),A
; 1395.	            chan->Loop_Ornament_Position = module[chan->OrnamentPointer];
	LD	L,(IX+2)
	LD	H,(IX+3)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	D,(HL)
	LD	(IX+8),D
; 1396.	            chan->OrnamentPointer++;
	INC	(IX+2)
	JR	NZ,?1134
	INC	(IX+3)
?1134:
; 1397.	            chan->Ornament_Length = module[chan->OrnamentPointer];
	LD	L,(IX+2)
	LD	H,(IX+3)
	ADD	HL,BC
	LD	D,(HL)
	LD	(IX+9),D
; 1398.	            chan->OrnamentPointer++;
	INC	(IX+2)
	JR	NZ,?1135
	INC	(IX+3)
?1135:
; 1399.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1136
	INC	(HL)
?1136:
; 1400.	            chan->SamplePointer = PT3_SamplesPointers((module [chan->Address_In_Pattern] / 2));
	LD	L,(IX+0)
	LD	H,(IX+1)
	CALL	LWRD ?1267
	PUSH	DE
	PUSH	BC
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	DE,(?0010+208)
	ADD	HL,DE
	LD	A,(HL)
	LD	B,2
	CALL	LWRD ?UC_DIV_L01
	LD	L,A
	LD	H,0
	ADD	HL,HL
	POP	BC
	ADD	HL,BC
	LD	BC,106
	ADD	HL,BC
	LD	B,(HL)
	POP	DE
	LD	(IX+4),E
	LD	A,D
	OR	B
	LD	(IX+5),A
; 1401.	            chan->Loop_Sample_Position = module[chan->SamplePointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	D,(HL)
	LD	(IX+11),D
; 1402.	            chan->SamplePointer++;
	INC	(IX+4)
	JR	NZ,?1137
	INC	(IX+5)
?1137:
; 1403.	            chan->Sample_Length = module[chan->SamplePointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+12),B
; 1404.	            chan->SamplePointer++;
	INC	(IX+4)
	JP	NZ,?1164
	INC	(IX+5)
; 1405.	            chan->Envelope_Enabled = false;
	JP	LWRD ?1164
; 1406.	            chan->Position_In_Ornament = 0;
?0529:
; 1407.	        }
; 1408.	        else if(val >= 0xd1 && val <= 0xef)
	CP	209
	JR	C,?0532
	LD	B,A
	LD	A,239
	CP	B
	JR	C,?0532
?0534:
?0533:
?0531:
; 1409.	        {
; 1410.	            chan->SamplePointer = PT3_SamplesPointers((val - 0xd0));
	LD	C,B
	LD	B,0
	LD	HL,65328
	ADD	HL,BC
	ADD	HL,HL
	LD	BC,(?0010+210)
	ADD	HL,BC
	LD	DE,105
	ADD	HL,DE
	LD	E,(HL)
	PUSH	DE
	LD	HL,(?0010+214)
	LD	H,D
	LD	DE,65328
	ADD	HL,DE
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,106
	ADD	HL,BC
	LD	B,(HL)
	POP	DE
	LD	(IX+4),E
	LD	A,D
	OR	B
	LD	(IX+5),A
; 1411.	            chan->Loop_Sample_Position = module[chan->SamplePointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	D,(HL)
	LD	(IX+11),D
; 1412.	            chan->SamplePointer++;
	INC	(IX+4)
	JR	NZ,?1139
	INC	(IX+5)
?1139:
; 1413.	            chan->Sample_Length = module[chan->SamplePointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+12),B
; 1414.	            chan->SamplePointer++;
	INC	(IX+4)
	JP	NZ,?0600
	INC	(IX+5)
	JP	LWRD ?0600
?0532:
; 1415.	        }
; 1416.	        else if(val == 0xd0)
	LD	A,(?0010+214)
	CP	208
	JP	Z,?1166
?0536:
; 1417.	        {
; 1418.	            quit = true;
?0537:
; 1419.	        }
; 1420.	        else if(val >= 0xc1 && val <= 0xcf)
	CP	193
	JR	C,?0540
	LD	B,A
	LD	A,207
	CP	B
	JR	C,?0540
?0542:
?0541:
?0539:
; 1421.	        {
; 1422.	            chan->Volume = val - 0xc0;
	LD	A,B
	ADD	A,64
	LD	(IX+14),A
	JP	LWRD ?0600
?0540:
; 1423.	        }
; 1424.	        else if(val == 0xc0)
	LD	A,(?0010+214)
	CP	192
	JR	NZ,?0545
?0544:
; 1425.	        {
; 1426.	            chan->Position_In_Sample = 0;
	LD	(IX+13),0
; 1427.	            chan->Current_Amplitude_Sliding = 0;
	XOR	A
	LD	(IX+22),A
	LD	(IX+23),A
; 1428.	            chan->Current_Noise_Sliding = 0;
	LD	(IX+24),A
	LD	(IX+25),A
; 1429.	            chan->Current_Envelope_Sliding = 0;
	LD	(IX+26),A
	LD	(IX+27),A
; 1430.	            chan->Position_In_Ornament = 0;
	LD	(IX+10),A
; 1431.	            chan->Ton_Slide_Count = 0;
	LD	(IX+28),A
	LD	(IX+29),A
; 1432.	            chan->Current_Ton_Sliding = 0;
	LD	(IX+38),A
	LD	(IX+39),A
; 1433.	            chan->Ton_Accumulator = 0;
	LD	(IX+40),A
	LD	(IX+41),A
; 1434.	            chan->Current_OnOff = 0;
	LD	(IX+30),A
	LD	(IX+31),A
; 1435.	            chan->Enabled = false;
	LD	(IX+20),A
; 1436.	            quit = true;
	JP	LWRD ?1166
?0545:
; 1437.	        }
; 1438.	        else if(val >= 0xb2 && val <= 0xbf)
	CP	178
	JR	C,?0548
	LD	B,A
	LD	A,191
	CP	B
	JR	C,?0548
?0550:
?0549:
?0547:
; 1439.	        {
; 1440.	            chan->Envelope_Enabled = true;
	LD	(IX+19),1
; 1441.	            ay_writeay(AY_ENV_SHAPE, val - 0xb1);
	LD	A,B
	ADD	A,79
	LD	C,A
	LD	E,13
	CALL	LWRD ?1253
; 1442.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1141
	INC	(HL)
?1141:
; 1443.	            PT3.Env_Base_hi = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,(?0010+212)
	INC	HL
	LD	(HL),D
; 1444.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1142
	INC	(HL)
?1142:
; 1445.	            PT3.Env_Base_lo = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	ADD	HL,BC
	LD	B,(HL)
	LD	HL,(?0010+212)
	LD	(HL),B
; 1446.	            chan->Position_In_Ornament = 0;
	LD	(IX+10),0
; 1447.	            PT3.Cur_Env_Slide = 0;
	INC	HL
	INC	HL
	XOR	A
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 1448.	            PT3.Cur_Env_Delay = 0;
	LD	HL,6
	LD	BC,(?0010+212)
	ADD	HL,BC
	JP	LWRD ?1169
?0548:
; 1449.	        }
; 1450.	        else if(val == 0xb1)
	LD	A,(?0010+214)
	CP	177
	JR	NZ,?0553
?0552:
; 1451.	        {
; 1452.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1143
	INC	(HL)
?1143:
; 1453.	            chan->Number_Of_Notes_To_Skip = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+15),B
	JP	LWRD ?0600
?0553:
; 1454.	        }
; 1455.	        else if(val == 0xb0)
	CP	176
	JR	NZ,?0556
?0555:
; 1456.	        {
; 1457.	            chan->Envelope_Enabled = false;
?1164:
	LD	(IX+19),0
; 1458.	            chan->Position_In_Ornament = 0;
	JP	LWRD ?1150
?0556:
; 1459.	        }
; 1460.	        else if(val >= 0x50 && val <= 0xaf)
	CP	80
	JR	C,?0559
	LD	B,A
	LD	A,175
	CP	B
	JR	C,?0559
?0561:
?0560:
?0558:
; 1461.	        {
; 1462.	            chan->Note = val - 0x50;
	LD	A,B
	ADD	A,176
	LD	(IX+16),A
; 1463.	            chan->Position_In_Sample = 0;
	LD	(IX+13),0
; 1464.	            chan->Current_Amplitude_Sliding = 0;
	XOR	A
	LD	(IX+22),A
	LD	(IX+23),A
; 1465.	            chan->Current_Noise_Sliding = 0;
	LD	(IX+24),A
	LD	(IX+25),A
; 1466.	            chan->Current_Envelope_Sliding = 0;
	LD	(IX+26),A
	LD	(IX+27),A
; 1467.	            chan->Position_In_Ornament = 0;
	LD	(IX+10),A
; 1468.	            chan->Ton_Slide_Count = 0;
	LD	(IX+28),A
	LD	(IX+29),A
; 1469.	            chan->Current_Ton_Sliding = 0;
	LD	(IX+38),A
	LD	(IX+39),A
; 1470.	            chan->Ton_Accumulator = 0;
	LD	(IX+40),A
	LD	(IX+41),A
; 1471.	            chan->Current_OnOff = 0;
	LD	(IX+30),A
	LD	(IX+31),A
; 1472.	            chan->Enabled = true;
	LD	(IX+20),1
; 1473.	            quit = true;
?1166:
	LD	A,1
	LD	(?0010+195),A
	JP	LWRD ?0600
?0559:
; 1474.	        }
; 1475.	        else if(val >= 0x40 && val <= 0x4f)
	LD	A,(?0010+214)
	CP	64
	JR	C,?0564
	LD	B,A
	LD	A,79
	CP	B
	JR	C,?0564
?0566:
?0565:
?0563:
; 1476.	        {
; 1477.	            chan->OrnamentPointer = PT3_OrnamentsPointers((val - 0x40));
	LD	C,B
	LD	B,0
	LD	HL,65472
	ADD	HL,BC
	ADD	HL,HL
	LD	BC,(?0010+210)
	ADD	HL,BC
	LD	DE,169
	ADD	HL,DE
	LD	E,(HL)
	PUSH	DE
	LD	HL,(?0010+214)
	LD	H,D
	LD	DE,65472
	ADD	HL,DE
	ADD	HL,HL
	ADD	HL,BC
	LD	BC,170
	ADD	HL,BC
	LD	B,(HL)
	POP	DE
	LD	(IX+2),E
	LD	A,D
	OR	B
	LD	(IX+3),A
; 1478.	            chan->Loop_Ornament_Position = module[chan->OrnamentPointer];
	LD	L,(IX+2)
	LD	H,(IX+3)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	D,(HL)
	LD	(IX+8),D
; 1479.	            chan->OrnamentPointer++;
	INC	(IX+2)
	JR	NZ,?1144
	INC	(IX+3)
?1144:
; 1480.	            chan->Ornament_Length = module[chan->OrnamentPointer];
	LD	L,(IX+2)
	LD	H,(IX+3)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+9),B
; 1481.	            chan->OrnamentPointer++;
	INC	(IX+2)
	JP	NZ,?1150
	INC	(IX+3)
; 1482.	            chan->Position_In_Ornament = 0;
	JP	LWRD ?1150
?0564:
; 1483.	        }
; 1484.	        else if(val >= 0x20 && val <= 0x3f)
	LD	A,(?0010+214)
	CP	32
	JR	C,?0569
	LD	B,A
	LD	A,63
	CP	B
	JR	C,?0569
?0571:
?0570:
?0568:
; 1485.	        {
; 1486.	            PT3.Noise_Base = val - 0x20;
	LD	HL,8
	LD	BC,(?0010+212)
	ADD	HL,BC
	LD	A,(?0010+214)
	ADD	A,224
?1169:
	LD	(HL),A
	JP	LWRD ?0600
?0569:
; 1487.	        }
; 1488.	        else if(val >= 0x10 && val <= 0x1f)
	LD	A,(?0010+214)
	CP	16
	JP	C,?0574
	LD	B,A
	LD	A,31
	CP	B
	JP	C,?0574
?0576:
?0575:
?0573:
; 1489.	        {
; 1490.	            if(val == 0x10)
	LD	A,B
	CP	16
	JR	NZ,?0578
?0577:
; 1491.	                chan->Envelope_Enabled = false;
	LD	(IX+19),0
; 1492.	            else
	JR	?0579
?0578:
; 1493.	            {
; 1494.	                ay_writeay(AY_ENV_SHAPE, val - 0x10);
	ADD	A,240
	LD	C,A
	LD	E,13
	CALL	LWRD ?1253
; 1495.	                chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1146
	INC	(HL)
?1146:
; 1496.	                PT3.Env_Base_hi = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,(?0010+212)
	INC	HL
	LD	(HL),D
; 1497.	                chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1147
	INC	(HL)
?1147:
; 1498.	                PT3.Env_Base_lo = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	ADD	HL,BC
	LD	B,(HL)
	LD	HL,(?0010+212)
	LD	(HL),B
; 1499.	                chan->Envelope_Enabled = true;
	LD	(IX+19),1
; 1500.	                PT3.Cur_Env_Slide = 0;
	INC	HL
	INC	HL
	XOR	A
	LD	(HL),A
	INC	HL
	LD	(HL),A
; 1501.	                PT3.Cur_Env_Delay = 0;
	LD	HL,6
	LD	BC,(?0010+212)
	ADD	HL,BC
	LD	(HL),A
?0579:
; 1502.	            }
; 1503.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1148
	INC	(HL)
?1148:
; 1504.	            chan->SamplePointer = PT3_SamplesPointers((module [chan->Address_In_Pattern] / 2));
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	CALL	LWRD ?1267
	PUSH	DE
	PUSH	BC
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	DE,(?0010+208)
	ADD	HL,DE
	LD	A,(HL)
	LD	B,2
	CALL	LWRD ?UC_DIV_L01
	LD	L,A
	LD	H,0
	ADD	HL,HL
	POP	BC
	ADD	HL,BC
	LD	BC,106
	ADD	HL,BC
	LD	B,(HL)
	POP	DE
	LD	(IX+4),E
	LD	A,D
	OR	B
	LD	(IX+5),A
; 1505.	            chan->Loop_Sample_Position = module[chan->SamplePointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	D,(HL)
	LD	(IX+11),D
; 1506.	            chan->SamplePointer++;
	INC	(IX+4)
	JR	NZ,?1149
	INC	(IX+5)
?1149:
; 1507.	            chan->Sample_Length = module[chan->SamplePointer];
	LD	L,(IX+4)
	LD	H,(IX+5)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+12),B
; 1508.	            chan->SamplePointer++;
	INC	(IX+4)
	JR	NZ,?1150
	INC	(IX+5)
?1150:
; 1509.	            chan->Position_In_Ornament = 0;
	LD	(IX+10),0
	JR	?0600
?0574:
; 1510.	        }
; 1511.	        else if(val == 0x9)
	LD	A,(?0010+214)
	CP	9
	JR	NZ,?0582
?0581:
; 1512.	        {
; 1513.	            counter++;
	LD	HL,?0010+203
	INC	(HL)
; 1514.	            flag9 = counter;
	LD	A,(?0010+203)
	LD	(?0010+196),A
	JR	?0600
?0582:
; 1515.	        }
; 1516.	        else if(val == 0x8)
	CP	8
	JR	NZ,?0585
?0584:
; 1517.	        {
; 1518.	            counter++;
	LD	HL,?0010+203
	INC	(HL)
; 1519.	            flag8 = counter;
	LD	A,(?0010+203)
	LD	(?0010+197),A
	JR	?0600
?0585:
; 1520.	        }
; 1521.	        else if(val == 0x5)
	CP	5
	JR	NZ,?0588
?0587:
; 1522.	        {
; 1523.	            counter++;
	LD	HL,?0010+203
	INC	(HL)
; 1524.	            flag5 = counter;
	LD	A,(?0010+203)
	LD	(?0010+198),A
	JR	?0600
?0588:
; 1525.	        }
; 1526.	        else if(val == 0x4)
	CP	4
	JR	NZ,?0591
?0590:
; 1527.	        {
; 1528.	            counter++;
	LD	HL,?0010+203
	INC	(HL)
; 1529.	            flag4 = counter;
	LD	A,(?0010+203)
	LD	(?0010+199),A
	JR	?0600
?0591:
; 1530.	        }
; 1531.	        else if(val == 0x3)
	CP	3
	JR	NZ,?0594
?0593:
; 1532.	        {
; 1533.	            counter++;
	LD	HL,?0010+203
	INC	(HL)
; 1534.	            flag3 = counter;
	LD	A,(?0010+203)
	LD	(?0010+200),A
	JR	?0600
?0594:
; 1535.	        }
; 1536.	        else if(val == 0x2)
	DEC	A
	DEC	A
	JR	NZ,?0597
?0596:
; 1537.	        {
; 1538.	            counter++;
	LD	HL,?0010+203
	INC	(HL)
; 1539.	            flag2 = counter;
	LD	A,(?0010+203)
	LD	(?0010+201),A
	JR	?0600
?0597:
; 1540.	        }
; 1541.	        else if(val == 0x1)
	LD	A,(?0010+214)
	DEC	A
	JR	NZ,?0600
?0599:
; 1542.	        {
; 1543.	            counter++;
	LD	HL,?0010+203
	INC	(HL)
; 1544.	            flag1 = counter;
	LD	A,(?0010+203)
	LD	(?0010+202),A
?0600:
?0598:
?0595:
?0592:
?0589:
?0586:
?0583:
?0580:
?0572:
?0567:
?0562:
?0557:
?0554:
?0551:
?0546:
?0543:
?0538:
?0535:
?0530:
; 1545.	        }
; 1546.	        chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1151
	INC	(HL)
?1151:
; 1547.	    }
; 1548.	    while(!quit);
	LD	A,(?0010+195)
	OR	A
	JP	Z,?0527
?0525:
?0602:
; 1549.	
; 1550.	    while(counter > 0)
	LD	A,(?0010+203)
	OR	A
	JP	Z,?0601
?0603:
; 1551.	    {
; 1552.	        if(counter == flag1)
	LD	A,(?0010+202)
	LD	B,A
	LD	A,(?0010+203)
	CP	B
	JP	NZ,?0605
?0604:
; 1553.	        {
; 1554.	            chan->Ton_Slide_Delay = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	E,(HL)
	LD	(IX+36),E
	LD	(IX+37),0
; 1555.	            chan->Ton_Slide_Count = chan->Ton_Slide_Delay;
	LD	L,(IX+36)
	LD	H,(IX+37)
	LD	(IX+28),L
	LD	(IX+29),H
; 1556.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1152
	INC	(HL)
?1152:
; 1557.	            chan->Ton_Slide_Step = ay_sys_getword(&module[chan->Address_In_Pattern]);
	LD	L,(IX+0)
	LD	H,(IX+1)
	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	(IX+42),L
	LD	(IX+43),H
; 1558.	            chan->Address_In_Pattern += 2;
	PUSH	IX
	POP	HL
	LD	A,(HL)
	ADD	A,2
	LD	(HL),A
	JR	NC,?1153
	INC	HL
	INC	(HL)
?1153:
; 1559.	            chan->SimpleGliss = true;
	LD	(IX+21),1
; 1560.	            chan->Current_OnOff = 0;
	XOR	A
	LD	(IX+30),A
	LD	(IX+31),A
; 1561.	            if((chan->Ton_Slide_Count == 0) && (PT3.Version >= 7))
	LD	A,(IX+28)
	OR	(IX+29)
	JP	NZ,?1163
	LD	L,A
	LD	H,A
	PUSH	HL
	LD	L,7
	PUSH	HL
	LD	L,13
	LD	BC,(?0010+212)
	ADD	HL,BC
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	INC	HL
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	EX	DE,HL
	CALL	LWRD ?SL_CMP_L03
	JP	C,?1163
?0609:
?0608:
?0606:
; 1562.	                chan->Ton_Slide_Count++;
	INC	(IX+28)
	JP	NZ,?1163
	INC	(IX+29)
?0607:
	JP	LWRD ?1163
?0605:
; 1563.	        }
; 1564.	        else if(counter == flag2)
	LD	A,(?0010+201)
	LD	B,A
	LD	A,(?0010+203)
	CP	B
	JP	NZ,?0612
?0611:
; 1565.	        {
; 1566.	            chan->SimpleGliss = false;
	LD	(IX+21),0
; 1567.	            chan->Current_OnOff = 0;
	XOR	A
	LD	(IX+30),A
	LD	(IX+31),A
; 1568.	            chan->Ton_Slide_Delay = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	E,(HL)
	LD	(IX+36),E
	LD	(IX+37),A
; 1569.	            chan->Ton_Slide_Count = chan->Ton_Slide_Delay;
	LD	L,(IX+36)
	LD	H,(IX+37)
	LD	(IX+28),L
	LD	(IX+29),H
; 1570.	            chan->Address_In_Pattern += 3;
	PUSH	IX
	POP	HL
	LD	A,(HL)
	ADD	A,3
	LD	(HL),A
	JR	NC,?1155
	INC	HL
	INC	(HL)
?1155:
; 1571.	            chan->Ton_Slide_Step = abs((short)(ay_sys_getword(&module[chan->Address_In_Pattern])));
	LD	L,(IX+0)
	LD	H,(IX+1)
	CALL	LWRD ?1243
	CALL	LWRD ?1256
	LD	(IX+42),L
	LD	(IX+43),H
; 1572.	            chan->Address_In_Pattern += 2;
	PUSH	IX
	POP	HL
	LD	A,(HL)
	ADD	A,2
	LD	(HL),A
	JR	NC,?1156
	INC	HL
	INC	(HL)
?1156:
; 1573.	            chan->Ton_Delta = PT3_GetNoteFreq(info, chan->Note) - PT3_GetNoteFreq(info, prnote);
	LD	BC,(?0010+204)
	PUSH	IY
	POP	DE
	LD	A,BYTE3 PT3_GetNoteFreq
	LD	HL,LWRD PT3_GetNoteFreq
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	PUSH	HL
	LD	C,(IX+16)
	PUSH	IY
	POP	DE
	LD	A,BYTE3 PT3_GetNoteFreq
	LD	HL,LWRD PT3_GetNoteFreq
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	POP	BC
	AND	A
	SBC	HL,BC
	LD	(IX+44),L
	LD	(IX+45),H
; 1574.	            chan->Slide_To_Note = chan->Note;
	LD	B,(IX+16)
	LD	(IX+17),B
; 1575.	            chan->Note = prnote;
	LD	A,(?0010+204)
	LD	(IX+16),A
; 1576.	            if(PT3.Version >= 6)
	LD	HL,0
	PUSH	HL
	LD	L,6
	PUSH	HL
	LD	L,13
	LD	BC,(?0010+212)
	ADD	HL,BC
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	INC	HL
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	EX	DE,HL
	CALL	LWRD ?SL_CMP_L03
	JR	C,?0614
?0613:
; 1577.	                chan->Current_Ton_Sliding = prsliding;
	LD	HL,(?0010+206)
	LD	(IX+38),L
	LD	(IX+39),H
?0614:
; 1578.	            if((chan->Ton_Delta - chan->Current_Ton_Sliding) < 0)
	LD	C,(IX+38)
	LD	B,(IX+39)
	LD	L,(IX+44)
	LD	H,(IX+45)
	AND	A
	SBC	HL,BC
	BIT	7,H
	JP	Z,?1163
?0615:
; 1579.	                chan->Ton_Slide_Step = -chan->Ton_Slide_Step;
	AND	A
	LD	HL,0
	LD	C,(IX+42)
	LD	B,(IX+43)
	SBC	HL,BC
	LD	(IX+42),L
	LD	(IX+43),H
?0616:
	JP	LWRD ?1163
?0612:
; 1580.	        }
; 1581.	        else if(counter == flag3)
	LD	A,(?0010+200)
	LD	B,A
	LD	A,(?0010+203)
	CP	B
	JR	NZ,?0619
?0618:
; 1582.	        {
; 1583.	            chan->Position_In_Sample = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+13),B
; 1584.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JP	NZ,?1163
	JP	LWRD ?1170
?0619:
; 1585.	        }
; 1586.	        else if(counter == flag4)
	LD	A,(?0010+199)
	LD	B,A
	LD	A,(?0010+203)
	CP	B
	JR	NZ,?0622
?0621:
; 1587.	        {
; 1588.	            chan->Position_In_Ornament = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+10),B
; 1589.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JP	NZ,?1163
	JP	LWRD ?1170
?0622:
; 1590.	        }
; 1591.	        else if(counter == flag5)
	LD	A,(?0010+198)
	LD	B,A
	LD	A,(?0010+203)
	CP	B
	JR	NZ,?0625
?0624:
; 1592.	        {
; 1593.	            chan->OnOff_Delay = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	E,(HL)
	LD	(IX+32),E
	LD	D,0
	LD	(IX+33),D
; 1594.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1159
	INC	(HL)
?1159:
; 1595.	            chan->OffOn_Delay = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	ADD	HL,BC
	LD	C,(HL)
	LD	(IX+34),C
	LD	(IX+35),D
; 1596.	            chan->Current_OnOff = chan->OnOff_Delay;
	LD	L,(IX+32)
	LD	H,(IX+33)
	LD	(IX+30),L
	LD	(IX+31),H
; 1597.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1160
	INC	(HL)
?1160:
; 1598.	            chan->Ton_Slide_Count = 0;
	XOR	A
	LD	(IX+28),A
	LD	(IX+29),A
; 1599.	            chan->Current_Ton_Sliding = 0;
	LD	(IX+38),A
	LD	(IX+39),A
	JR	?1163
?0625:
; 1600.	        }
; 1601.	        else if(counter == flag8)
	LD	A,(?0010+197)
	LD	B,A
	LD	A,(?0010+203)
	CP	B
	JR	NZ,?0628
?0627:
; 1602.	        {
; 1603.	            PT3.Env_Delay = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,7
	LD	BC,(?0010+212)
	ADD	HL,BC
	LD	(HL),D
; 1604.	            PT3.Cur_Env_Delay = PT3.Env_Delay;
	LD	HL,7
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,6
	ADD	HL,BC
	LD	(HL),D
; 1605.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1161
	INC	(HL)
?1161:
; 1606.	            PT3.Env_Slide_Add = ay_sys_getword(&module[chan->Address_In_Pattern]);
	LD	HL,4
	ADD	HL,BC
	PUSH	HL
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	CALL	LWRD ?1243
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1607.	            chan->Address_In_Pattern += 2;
	PUSH	IX
	POP	HL
	LD	A,(HL)
	ADD	A,2
	LD	(HL),A
	JR	NC,?1163
	INC	HL
	JR	?1170
?0628:
; 1608.	        }
; 1609.	        else if(counter == flag9)
	LD	A,(?0010+196)
	LD	B,A
	LD	A,(?0010+203)
	CP	B
	JR	NZ,?1163
?0630:
; 1610.	        {
; 1611.	            PT3.Delay = module[chan->Address_In_Pattern];
	LD	L,(IX+0)
	LD	H,(IX+1)
	LD	BC,(?0010+208)
	ADD	HL,BC
	LD	B,(HL)
	LD	HL,9
	LD	DE,(?0010+212)
	ADD	HL,DE
	LD	(HL),B
; 1612.	            chan->Address_In_Pattern++;
	PUSH	IX
	POP	HL
	INC	(HL)
	INC	HL
	JR	NZ,?1163
?1170:
	INC	(HL)
?1163:
?0631:
?0629:
?0626:
?0623:
?0620:
?0617:
?0610:
; 1613.	        }
; 1614.	        counter--;
	LD	HL,?0010+203
	DEC	(HL)
	JP	LWRD ?0525
?0601:
; 1615.	    }
; 1616.	    chan->Note_Skip_Counter = chan->Number_Of_Notes_To_Skip;
	LD	B,(IX+15)
	LD	(IX+46),B
; 1617.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1267:
	ADD	HL,BC
	LD	A,(HL)
	LD	B,2
	CALL	LWRD ?UC_DIV_L01
	LD	L,A
	LD	H,0
	ADD	HL,HL
	LD	BC,(?0010+210)
	ADD	HL,BC
	LD	DE,105
	ADD	HL,DE
	LD	E,(HL)
	RET
; 1618.	
; 1619.	void PT3_ChangeRegisters(AYSongInfo * info, PT3_Channel_Parameters * chan, char * AddToEnv, unsigned char * TempMixer)
; 1620.	{
PT3_ChangeRegisters:
	PUSH	IY
	PUSH	IX
	PUSH	BC
	POP	IX
	PUSH	DE
	POP	IY
; 1621.	    unsigned char j, b1, b0;
; 1622.	    unsigned short w;
; 1623.	  
; 1624.	    GET_COMMON_VARS;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+220),HL
	LD	L,(IY+2)
	LD	H,(IY+3)
	LD	(?0010+222),HL
	LD	L,(IY+4)
	LD	H,(IY+5)
	LD	(?0010+224),HL
; 1625.	  
; 1626.	    if(chan->Enabled)
	LD	HL,20
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	Z,?0633
?0632:
; 1627.	    {
; 1628.	        chan->Ton = ay_sys_getword(&module[chan->SamplePointer + chan->Position_In_Sample * 4 + 2]);
	LD	L,(IX+13)
	LD	H,0
	ADD	HL,HL
	ADD	HL,HL
	LD	C,(IX+4)
	LD	B,(IX+5)
	ADD	HL,BC
	LD	BC,(?0010+220)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	LD	A,BYTE3 ay_sys_getword
	LD	HL,LWRD ay_sys_getword
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	(IX+6),L
	LD	(IX+7),H
; 1629.	        chan->Ton += chan->Ton_Accumulator;
	LD	HL,6
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,(IX+40)
	LD	(HL),A
	INC	HL
	LD	A,(HL)
	ADC	A,(IX+41)
	LD	(HL),A
; 1630.	        b0 = module[chan->SamplePointer + chan->Position_In_Sample * 4];
	LD	HL,13
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	ADD	HL,HL
	PUSH	HL
	LD	HL,4
	ADD	HL,BC
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	POP	HL
	ADD	HL,DE
	LD	DE,(?0010+220)
	ADD	HL,DE
	LD	A,(HL)
	LD	(?0010+217),A
; 1631.	        b1 = module[chan->SamplePointer + chan->Position_In_Sample * 4 + 1];
	LD	HL,13
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	ADD	HL,HL
	PUSH	HL
	LD	HL,4
	ADD	HL,BC
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	POP	HL
	ADD	HL,BC
	ADD	HL,DE
	INC	HL
	LD	A,(HL)
	LD	(?0010+216),A
; 1632.	        if((b1 & 0x40) != 0)
	BIT	6,A
	JR	Z,?0635
?0634:
; 1633.	        {
; 1634.	            chan->Ton_Accumulator = chan->Ton;
	LD	L,(IX+6)
	LD	H,(IX+7)
	LD	(IX+40),L
	LD	(IX+41),H
?0635:
; 1635.	        }
; 1636.	        j = chan->Note + module[chan->OrnamentPointer + chan->Position_In_Ornament];
	LD	C,(IX+10)
	LD	B,0
	LD	L,(IX+2)
	LD	H,(IX+3)
	ADD	HL,BC
	LD	C,E
	LD	B,D
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,(IX+16)
	LD	(?0010+215),A
; 1637.	        if((signed char)(j) < 0)
	JP	P,?0637
?0636:
; 1638.	            j = 0;
	XOR	A
	JR	?1192
?0637:
; 1639.	        else if(j > 95)
	LD	B,A
	LD	A,95
	CP	B
	JR	NC,?0640
?0639:
; 1640.	            j = 95;
?1192:
	LD	(?0010+215),A
?0640:
?0638:
; 1641.	        w = PT3_GetNoteFreq(info, j);
	LD	BC,(?0010+215)
	PUSH	IY
	POP	DE
	LD	A,BYTE3 PT3_GetNoteFreq
	LD	HL,LWRD PT3_GetNoteFreq
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	(?0010+218),HL
; 1642.	        chan->Ton = (chan->Ton + chan->Current_Ton_Sliding + w) & 0xfff;
	PUSH	HL
	LD	L,(IX+38)
	LD	H,(IX+39)
	LD	C,(IX+6)
	LD	B,(IX+7)
	ADD	HL,BC
	LD	C,L
	LD	B,H
	POP	HL
	ADD	HL,BC
	LD	A,H
	AND	15
	LD	H,A
	LD	(IX+6),L
	LD	(IX+7),H
; 1643.	        if(chan->Ton_Slide_Count > 0)
	LD	C,(IX+28)
	LD	B,(IX+29)
	LD	HL,0
	OR	128
	SBC	HL,BC
	JP	PO,?1186
	XOR	H
?1186:
	JP	P,?0648
?0641:
; 1644.	        {
; 1645.	            chan->Ton_Slide_Count--;
	LD	L,(IX+28)
	LD	H,(IX+29)
	DEC	HL
	LD	(IX+28),L
	LD	(IX+29),H
; 1646.	            if(chan->Ton_Slide_Count == 0)
	LD	A,(IX+28)
	OR	(IX+29)
	JR	NZ,?0648
?0643:
; 1647.	            {
; 1648.	                chan->Current_Ton_Sliding += chan->Ton_Slide_Step;
	LD	HL,38
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	ADD	A,(IX+42)
	LD	(HL),A
	INC	HL
	LD	A,(HL)
	ADC	A,(IX+43)
	LD	(HL),A
; 1649.	                chan->Ton_Slide_Count = chan->Ton_Slide_Delay;
	LD	HL,28
	ADD	HL,BC
	PUSH	HL
	LD	HL,36
	ADD	HL,BC
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1650.	                if(!chan->SimpleGliss)
	LD	HL,21
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0648
?0645:
; 1651.	                {
; 1652.	                    if(((chan->Ton_Slide_Step < 0) && (chan->Current_Ton_Sliding <= chan->Ton_Delta)) || ((chan->Ton_Slide_Step >= 0) && (chan->Current_Ton_Sliding >= chan->Ton_Delta)))
	BIT	7,(IX+43)
	JR	Z,?0650
	LD	C,(IX+38)
	LD	B,(IX+39)
	LD	L,(IX+44)
	LD	H,(IX+45)
	OR	128
	SBC	HL,BC
	JP	PO,?1187
	XOR	H
?1187:
	JP	P,?0654
?0650:
?0649:
	BIT	7,(IX+43)
	JR	NZ,?0648
	LD	C,(IX+44)
	LD	B,(IX+45)
	LD	L,(IX+38)
	LD	H,(IX+39)
	OR	128
	SBC	HL,BC
	JP	PO,?1188
	XOR	H
?1188:
	JP	M,?0648
?0654:
?0653:
?0651:
?0652:
?0647:
; 1653.	                    {
; 1654.	                        chan->Note = chan->Slide_To_Note;
	LD	B,(IX+17)
	LD	(IX+16),B
; 1655.	                        chan->Ton_Slide_Count = 0;
	XOR	A
	LD	(IX+28),A
	LD	(IX+29),A
; 1656.	                        chan->Current_Ton_Sliding = 0;
	LD	(IX+38),A
	LD	(IX+39),A
?0648:
?0646:
?0644:
?0642:
; 1657.	                    }
; 1658.	                }
; 1659.	            }
; 1660.	        }
; 1661.	        chan->Amplitude = b1 & 0xf;
	LD	A,(?0010+216)
	AND	15
	LD	(IX+18),A
; 1662.	        if((b0 & 0x80) != 0)
	LD	A,(?0010+217)
	OR	A
	JP	P,?0663
?0655:
; 1663.	        {
; 1664.	            if((b0 & 0x40) != 0)
	BIT	6,A
	JR	Z,?0658
?0657:
; 1665.	            {
; 1666.	                if(chan->Current_Amplitude_Sliding < 15)
	LD	L,(IX+22)
	LD	H,(IX+23)
	LD	BC,32783
	LD	A,B
	XOR	H
	LD	H,A
	SBC	HL,BC
	JR	NC,?0663
?0659:
; 1667.	                    chan->Current_Amplitude_Sliding++;
	INC	(IX+22)
	JR	NZ,?0663
	INC	(IX+23)
?0660:
	JR	?0663
?0658:
; 1668.	            }
; 1669.	            else if(chan->Current_Amplitude_Sliding > -15)
	LD	C,(IX+22)
	LD	B,(IX+23)
	LD	HL,65521
	OR	128
	SBC	HL,BC
	JP	PO,?1190
	XOR	H
?1190:
	JP	P,?0663
?0662:
; 1670.	            {
; 1671.	                chan->Current_Amplitude_Sliding--;
	LD	L,(IX+22)
	LD	H,(IX+23)
	DEC	HL
	LD	(IX+22),L
	LD	(IX+23),H
?0663:
?0661:
?0656:
; 1672.	            }
; 1673.	        }
; 1674.	        chan->Amplitude += chan->Current_Amplitude_Sliding;
	LD	A,(IX+18)
	ADD	A,(IX+22)
	LD	(IX+18),A
; 1675.	        if((signed char)(chan->Amplitude) < 0)
	LD	A,(IX+18)
	OR	A
	JP	P,?0665
?0664:
; 1676.	            chan->Amplitude = 0;
	LD	(IX+18),0
	JR	?0668
?0665:
; 1677.	        else if(chan->Amplitude > 15)
	LD	A,15
	CP	(IX+18)
	JR	NC,?0668
?0667:
; 1678.	            chan->Amplitude = 15;
	LD	(IX+18),A
?0668:
?0666:
; 1679.	        if(PT3.Version <= 4)
	LD	HL,13
	LD	BC,(?0010+224)
	ADD	HL,BC
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	INC	HL
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	PUSH	DE
	PUSH	BC
	LD	BC,0
	LD	HL,4
	CALL	LWRD ?SL_CMP_L03
	LD	L,(IX+14)
	JR	C,?0670
?0669:
; 1680.	            chan->Amplitude = PT3VolumeTable_33_34[chan->Volume][chan->Amplitude];
	ADD	HL,HL
	ADD	HL,HL
	ADD	HL,HL
	ADD	HL,HL
	LD	C,(IX+18)
	ADD	HL,BC
	LD	BC,PT3VolumeTable_33_34
	JR	?1193
; 1681.	        else
?0670:
; 1682.	            chan->Amplitude = PT3VolumeTable_35[chan->Volume][chan->Amplitude];
	ADD	HL,HL
	ADD	HL,HL
	ADD	HL,HL
	ADD	HL,HL
	LD	C,(IX+18)
	ADD	HL,BC
	LD	BC,PT3VolumeTable_35
?1193:
	ADD	HL,BC
	LD	B,(HL)
	LD	(IX+18),B
?0671:
; 1683.	        if(((b0 & 1) == 0) && chan->Envelope_Enabled)
	LD	A,(?0010+217)
	BIT	0,A
	JR	NZ,?0673
	LD	A,(IX+19)
	OR	A
	JR	Z,?0673
?0675:
?0674:
?0672:
; 1684.	            chan->Amplitude = chan->Amplitude | 16;
	SET	4,(IX+18)
?0673:
; 1685.	        if((b1 & 0x80) != 0)
	LD	A,(?0010+216)
	OR	A
	LD	A,(?0010+217)
	JP	P,?0677
?0676:
; 1686.	        {
; 1687.	            if((b0 & 0x20) != 0)
	BIT	5,A
	JR	Z,?0679
?0678:
; 1688.	                j = ((b0 >> 1) | 0xf0) + chan->Current_Envelope_Sliding;
	SRL	A
	OR	240
	JR	?1194
; 1689.	            else
?0679:
; 1690.	                j = ((b0 >> 1) & 0xf) + chan->Current_Envelope_Sliding;
	SRL	A
	AND	143
?1194:
	ADD	A,(IX+26)
	LD	(?0010+215),A
?0680:
; 1691.	            if((b1 & 0x20) != 0)
	LD	A,(?0010+216)
	BIT	5,A
	JR	Z,?0685
?0681:
; 1692.	                chan->Current_Envelope_Sliding = j;
	LD	BC,(?0010+215)
	LD	B,0
	LD	(IX+26),C
	LD	(IX+27),B
?0682:
; 1693.	            AddToEnv += j;
; 1694.	        }
; 1695.	        else
	JR	?0685
?0677:
; 1696.	        {
; 1697.	            PT3.AddToNoise = (b0 >> 1) + chan->Current_Noise_Sliding;
	SRL	A
	ADD	A,(IX+24)
	LD	HL,10
	LD	BC,(?0010+224)
	ADD	HL,BC
	LD	(HL),A
; 1698.	            if((b1 & 0x20) != 0)
	LD	A,(?0010+216)
	BIT	5,A
	JR	Z,?0685
?0684:
; 1699.	                chan->Current_Noise_Sliding = PT3.AddToNoise;
	LD	HL,10
	LD	BC,(?0010+224)
	ADD	HL,BC
	LD	C,(HL)
	LD	(IX+24),C
	LD	(IX+25),0
?0685:
?0683:
; 1700.	        }
; 1701.	        *TempMixer = ((b1 >> 1) & 0x48) | *TempMixer;
	LD	HL,10
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	LD	A,(?0010+216)
	SRL	A
	AND	200
	OR	(HL)
	LD	(HL),A
; 1702.	        chan->Position_In_Sample++;
	INC	(IX+13)
; 1703.	        if(chan->Position_In_Sample >= chan->Sample_Length)
	LD	A,(IX+13)
	CP	(IX+12)
	JR	C,?0687
?0686:
; 1704.	            chan->Position_In_Sample = chan->Loop_Sample_Position;
	LD	B,(IX+11)
	LD	(IX+13),B
?0687:
; 1705.	        chan->Position_In_Ornament++;
	INC	(IX+10)
; 1706.	        if(chan->Position_In_Ornament >= chan->Ornament_Length)
	LD	A,(IX+10)
	CP	(IX+9)
	JR	C,?0690
?0688:
; 1707.	            chan->Position_In_Ornament = chan->Loop_Ornament_Position;
	LD	B,(IX+8)
	LD	(IX+10),B
?0689:
; 1708.	    }
; 1709.	    else
	JR	?0690
?0633:
; 1710.	        chan->Amplitude = 0;
	LD	(IX+18),A
?0690:
; 1711.	    *TempMixer = *TempMixer >> 1;
	LD	HL,10
	ADD	HL,SP
	LD	A,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,A
	SRL	(HL)
; 1712.	    if(chan->Current_OnOff > 0)
	LD	C,(IX+30)
	LD	B,(IX+31)
	LD	HL,0
	OR	128
	SBC	HL,BC
	JP	PO,?1191
	XOR	H
?1191:
	JP	P,?0697
?0691:
; 1713.	    {
; 1714.	        chan->Current_OnOff--;
	LD	L,(IX+30)
	LD	H,(IX+31)
	DEC	HL
	LD	(IX+30),L
	LD	(IX+31),H
; 1715.	        if(chan->Current_OnOff == 0)
	LD	A,(IX+30)
	OR	(IX+31)
	JR	NZ,?0697
?0693:
; 1716.	        {
; 1717.	            chan->Enabled = !chan->Enabled;
	LD	A,(IX+20)
	OR	A
	JR	NZ,?1174
	LD	A,1
	JR	?1175
?1174:
	XOR	A
?1175:
	LD	(IX+20),A
; 1718.	            if(chan->Enabled)
	LD	A,(IX+20)
	OR	A
	JR	Z,?0696
?0695:
; 1719.	                chan->Current_OnOff = chan->OnOff_Delay;
	LD	L,(IX+32)
	LD	H,(IX+33)
	JR	?1195
; 1720.	            else
?0696:
; 1721.	                chan->Current_OnOff = chan->OffOn_Delay;
	LD	L,(IX+34)
	LD	H,(IX+35)
?1195:
	LD	(IX+30),L
	LD	(IX+31),H
?0697:
?0694:
?0692:
; 1722.	        }
; 1723.	    }
; 1724.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
; 1725.	
; 1726.	void PT3_Play_Chip(AYSongInfo * info)
; 1727.	{
PT3_Play_Chip:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 1728.	    unsigned char TempMixer;
; 1729.	    char AddToEnv;
; 1730.	    unsigned short cur_env;
; 1731.	
; 1732.	    GET_COMMON_VARS;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+230),HL
	LD	L,(IX+2)
	LD	H,(IX+3)
	LD	(?0010+232),HL
	LD	L,(IX+4)
	LD	H,(IX+5)
	LD	(?0010+234),HL
; 1733.	 
; 1734.	    PT3.DelayCounter--;
	LD	BC,11
	ADD	HL,BC
	DEC	(HL)
; 1735.	    if (PT3.DelayCounter == 0)
	LD	L,C
	LD	H,B
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	NZ,?0699
?0698:
; 1736.	    {
; 1737.	        PT3_A.Note_Skip_Counter--;
	LD	HL,63
	LD	BC,(?0010+234)
	ADD	HL,BC
	DEC	(HL)
; 1738.	        if(PT3_A.Note_Skip_Counter == 0)
	LD	HL,63
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	NZ,?0701
?0700:
; 1739.	        {
; 1740.	            if(module[PT3_A.Address_In_Pattern] == 0)
	LD	HL,17
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	B,(HL)
	INC	HL
	LD	H,(HL)
	LD	L,B
	LD	BC,(?0010+230)
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	NZ,?0703
?0702:
; 1741.	            {
; 1742.	                PT3.CurrentPosition++;
	LD	HL,12
	LD	BC,(?0010+234)
	ADD	HL,BC
	INC	(HL)
; 1743.	                if(PT3.CurrentPosition == header->PT3_NumberOfPositions)
	LD	HL,101
	LD	DE,(?0010+232)
	ADD	HL,DE
	PUSH	HL
	LD	HL,12
	ADD	HL,BC
	LD	A,(HL)
	POP	HL
	CP	(HL)
	JR	NZ,?0705
?0704:
; 1744.	                    PT3.CurrentPosition = header->PT3_LoopPosition;
	LD	HL,102
	LD	BC,(?0010+232)
	ADD	HL,BC
	LD	B,(HL)
	LD	HL,12
	LD	DE,(?0010+234)
	ADD	HL,DE
	LD	(HL),B
?0705:
; 1745.	                PT3_A.Address_In_Pattern = ay_sys_getword(&module[PT3_PatternsPointer + header->PT3_PositionList[PT3.CurrentPosition] * 2]);
	LD	HL,17
	LD	BC,(?0010+234)
	ADD	HL,BC
	PUSH	HL
	LD	HL,12
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	HL,(?0010+232)
	ADD	HL,DE
	LD	E,201
	ADD	HL,DE
	LD	L,(HL)
	LD	H,D
	ADD	HL,HL
	PUSH	HL
	LD	HL,103
	LD	DE,(?0010+232)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,104
	ADD	HL,DE
	LD	B,(HL)
	POP	HL
	LD	E,L
	LD	A,H
	OR	B
	LD	D,A
	POP	HL
	ADD	HL,DE
	LD	BC,(?0010+230)
	CALL	LWRD ?1243
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1746.	                PT3_B.Address_In_Pattern = ay_sys_getword(&module[PT3_PatternsPointer + header->PT3_PositionList[PT3.CurrentPosition] * 2 + 2]);
	LD	HL,64
	LD	BC,(?0010+234)
	ADD	HL,BC
	PUSH	HL
	LD	HL,12
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	HL,(?0010+232)
	ADD	HL,DE
	LD	E,201
	ADD	HL,DE
	LD	L,(HL)
	LD	H,D
	ADD	HL,HL
	PUSH	HL
	LD	HL,103
	LD	DE,(?0010+232)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,104
	ADD	HL,DE
	LD	B,(HL)
	POP	HL
	LD	E,L
	LD	A,H
	OR	B
	LD	D,A
	POP	HL
	ADD	HL,DE
	LD	BC,(?0010+230)
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	CALL	LWRD ?1244
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1747.	                PT3_C.Address_In_Pattern = ay_sys_getword(&module[PT3_PatternsPointer + header->PT3_PositionList[PT3.CurrentPosition] * 2 + 4]);
	LD	HL,111
	LD	BC,(?0010+234)
	ADD	HL,BC
	PUSH	HL
	LD	HL,12
	ADD	HL,BC
	LD	E,(HL)
	LD	D,0
	LD	HL,(?0010+232)
	ADD	HL,DE
	LD	E,201
	ADD	HL,DE
	LD	L,(HL)
	LD	H,D
	ADD	HL,HL
	PUSH	HL
	LD	HL,103
	LD	DE,(?0010+232)
	ADD	HL,DE
	LD	L,(HL)
	LD	H,0
	PUSH	HL
	LD	L,104
	ADD	HL,DE
	LD	D,(HL)
	POP	HL
	LD	C,L
	LD	A,H
	OR	D
	LD	B,A
	POP	HL
	ADD	HL,BC
	LD	BC,(?0010+230)
	CALL	LWRD ?1246
	POP	HL
	LD	(HL),E
	INC	HL
	LD	(HL),D
; 1748.	                PT3.Noise_Base = 0;
	LD	HL,8
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	(HL),0
?0703:
; 1749.	            }
; 1750.	            PT3_PatternIntterpreter(info, &PT3_A);
	LD	HL,17
	CALL	LWRD ?1247
?0701:
; 1751.	        }
; 1752.	        PT3_B.Note_Skip_Counter--;
	LD	HL,110
	LD	BC,(?0010+234)
	ADD	HL,BC
	DEC	(HL)
; 1753.	        if(PT3_B.Note_Skip_Counter == 0)
	LD	HL,110
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0707
?0706:
; 1754.	            PT3_PatternIntterpreter(info, &PT3_B);
	LD	HL,64
	CALL	LWRD ?1247
?0707:
; 1755.	        PT3_C.Note_Skip_Counter--;
	LD	HL,157
	LD	BC,(?0010+234)
	ADD	HL,BC
	DEC	(HL)
; 1756.	        if(PT3_C.Note_Skip_Counter == 0)
	LD	HL,157
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0709
?0708:
; 1757.	            PT3_PatternIntterpreter(info, &PT3_C);
	LD	HL,111
	CALL	LWRD ?1247
?0709:
; 1758.	        PT3.DelayCounter = PT3.Delay;
	LD	HL,9
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,11
	ADD	HL,BC
	LD	(HL),D
?0699:
; 1759.	    }
; 1760.	
; 1761.	    AddToEnv = 0;
	XOR	A
	LD	(?0010+227),A
; 1762.	    TempMixer = 0;
	LD	(?0010+226),A
; 1763.	    PT3_ChangeRegisters(info, &PT3_A, &AddToEnv, &TempMixer);
	LD	HL,?0010+226
	PUSH	HL
	LD	HL,?0010+227
	PUSH	HL
	LD	HL,17
	CALL	LWRD ?1257
	POP	HL
	POP	HL
; 1764.	    PT3_ChangeRegisters(info, &PT3_B, &AddToEnv, &TempMixer);
	LD	HL,?0010+226
	PUSH	HL
	LD	HL,?0010+227
	PUSH	HL
	LD	HL,64
	CALL	LWRD ?1257
	POP	HL
	POP	HL
; 1765.	    PT3_ChangeRegisters(info, &PT3_C, &AddToEnv, &TempMixer);
	LD	HL,?0010+226
	PUSH	HL
	LD	HL,?0010+227
	PUSH	HL
	LD	HL,111
	CALL	LWRD ?1257
	POP	HL
	POP	HL
; 1766.	
; 1767.	    ay_writeay(AY_MIXER, TempMixer);
	LD	BC,(?0010+226)
	LD	E,7
	CALL	LWRD ?1253
; 1768.	
; 1769.	    ay_writeay(AY_CHNL_A_FINE, PT3_A.Ton & 0xff);
	LD	HL,23
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	C,(HL)
	LD	E,0
	CALL	LWRD ?1253
; 1770.	    ay_writeay(AY_CHNL_A_COARSE, (PT3_A.Ton >> 8) & 0xf);
	LD	HL,23
	LD	BC,(?0010+234)
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	E,1
	CALL	LWRD ?1253
; 1771.	    ay_writeay(AY_CHNL_B_FINE, PT3_B.Ton & 0xff);
	LD	HL,70
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	C,(HL)
	LD	E,2
	CALL	LWRD ?1253
; 1772.	    ay_writeay(AY_CHNL_B_COARSE, (PT3_B.Ton >> 8) & 0xf);
	LD	HL,70
	LD	BC,(?0010+234)
	CALL	LWRD ?1254
; 1773.	    ay_writeay(AY_CHNL_C_FINE, PT3_C.Ton & 0xff);
	LD	HL,117
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	C,(HL)
	LD	E,4
	CALL	LWRD ?1253
; 1774.	    ay_writeay(AY_CHNL_C_COARSE, (PT3_C.Ton >> 8) & 0xf);
	LD	HL,117
	LD	BC,(?0010+234)
	ADD	HL,BC
	INC	HL
	LD	A,(HL)
	AND	15
	LD	C,A
	LD	E,5
	CALL	LWRD ?1253
; 1775.	    ay_writeay(AY_CHNL_A_VOL, PT3_A.Amplitude);
	LD	HL,35
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	C,(HL)
	LD	E,8
	CALL	LWRD ?1253
; 1776.	    ay_writeay(AY_CHNL_B_VOL, PT3_B.Amplitude);
	LD	HL,82
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	C,(HL)
	LD	E,9
	CALL	LWRD ?1253
; 1777.	    ay_writeay(AY_CHNL_C_VOL, PT3_C.Amplitude);
	LD	HL,129
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	C,(HL)
	LD	E,10
	CALL	LWRD ?1253
; 1778.	
; 1779.	    ay_writeay(AY_NOISE_PERIOD, (PT3.Noise_Base + PT3.AddToNoise) & 31);
	LD	HL,10
	LD	BC,(?0010+234)
	ADD	HL,BC
	PUSH	HL
	LD	HL,8
	ADD	HL,BC
	POP	DE
	LD	A,(DE)
	ADD	A,(HL)
	AND	31
	LD	C,A
	LD	E,6
	CALL	LWRD ?1253
; 1780.	    cur_env = ay_sys_getword(&PT3.Env_Base_lo) + AddToEnv + PT3.Cur_Env_Slide;
	LD	DE,(?0010+234)
	LD	A,BYTE3 ay_sys_getword
	LD	HL,LWRD ay_sys_getword
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	PUSH	HL
	LD	BC,(?0010+234)
	INC	BC
	INC	BC
	LD	L,C
	LD	H,B
	LD	C,(HL)
	INC	HL
	LD	B,(HL)
	POP	HL
	ADD	HL,BC
	LD	BC,(?0010+227)
	LD	B,0
	ADD	HL,BC
	LD	(?0010+228),HL
; 1781.	    ay_writeay(AY_ENV_FINE, cur_env & 0xff);
	LD	C,L
	LD	E,11
	CALL	LWRD ?1253
; 1782.	    ay_writeay(AY_ENV_COARSE, (cur_env >> 8) & 0xff);
	LD	HL,(?0010+228)
	LD	C,H
	LD	E,12
	CALL	LWRD ?1253
; 1783.	
; 1784.	    if(PT3.Cur_Env_Delay > 0)
	LD	HL,6
	LD	BC,(?0010+234)
	ADD	HL,BC
	XOR	A
	SUB	(HL)
	JP	PO,?1197
	XOR	128
?1197:
	JP	P,?0713
?0710:
; 1785.	    {
; 1786.	        PT3.Cur_Env_Delay--;
	LD	HL,6
	LD	BC,(?0010+234)
	ADD	HL,BC
	DEC	(HL)
; 1787.	        if(PT3.Cur_Env_Delay == 0)
	LD	HL,6
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JR	NZ,?0713
?0712:
; 1788.	        {
; 1789.	            PT3.Cur_Env_Delay = PT3.Env_Delay;
	LD	HL,7
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	D,(HL)
	LD	HL,6
	ADD	HL,BC
	LD	(HL),D
; 1790.	            PT3.Cur_Env_Slide += PT3.Env_Slide_Add;
	LD	HL,4
	ADD	HL,BC
	LD	E,(HL)
	INC	HL
	LD	D,(HL)
	LD	L,C
	LD	H,B
	INC	HL
	INC	HL
	LD	A,(HL)
	ADD	A,E
	LD	(HL),A
	INC	HL
	LD	A,(HL)
	ADC	A,D
	LD	(HL),A
?0713:
?0711:
; 1791.	        }
; 1792.	    }
; 1793.	}
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1247:
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	C,L
	LD	B,H
	PUSH	IX
	POP	DE
	LD	A,BYTE3 PT3_PatternIntterpreter
	LD	HL,LWRD PT3_PatternIntterpreter
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
?1257:
	LD	BC,(?0010+234)
	ADD	HL,BC
	LD	C,L
	LD	B,H
	PUSH	IX
	POP	DE
	LD	A,BYTE3 PT3_ChangeRegisters
	LD	HL,LWRD PT3_ChangeRegisters
	JP	LWRD ?BANK_CALL_DIRECT_EXAF_L08
; 1794.	
; 1795.	
; 1796.	
; 1797.	unsigned long PT3_GetTime(unsigned char *module, unsigned long * Loop)
; 1798.	{
PT3_GetTime:
	PUSH	IY
	PUSH	IX
	PUSH	DE
	POP	IX
	PUSH	BC
	POP	IY
; 1799.	    char a1, a2, a3, a11, a22, a33;
; 1800.	    unsigned long j1, j2, j3;
; 1801.	    long c1, c2, c3, c4, c5, c8;
; 1802.	    long i, j, tm = 0;
	LD	BC,0
	LD	L,C
	LD	H,B
	LD	(?0010+286),HL
	LD	(?0010+288),BC
; 1803.	    unsigned char b;
; 1804.	    PT3_File *header = (PT3_File *)module;
	LD	(?0010+291),DE
; 1805.	    unsigned char ptDelay = header->PT3_Delay;
	LD	A,(IX+100)
	LD	(?0010+293),A
; 1806.	    unsigned char ptNumPos = header->PT3_NumberOfPositions;
	LD	A,(IX+101)
	LD	(?0010+294),A
; 1807.	    unsigned short ptLoopPos = header->PT3_LoopPosition;
	LD	C,(IX+102)
	LD	B,H
	LD	(?0010+295),BC
; 1808.	    unsigned short ptPatPt = PT3_PatternsPointer;
	LD	L,(IX+103)
	LD	D,(IX+104)
	LD	E,B
	LD	A,B
	OR	D
	LD	H,A
	LD	(?0010+297),HL
; 1809.	    const unsigned char *ptPosList = (unsigned char *)&header->PT3_PositionList[0];
	LD	HL,201
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	(?0010+299),HL
; 1810.	
; 1811.	    b = ptDelay;
	LD	A,(?0010+293)
	LD	(?0010+290),A
; 1812.	    a11 = a22 = a33 = 1;
	LD	A,1
	LD	(?0010+241),A
	LD	(?0010+240),A
	LD	(?0010+239),A
; 1813.	    for(i = 0; i < ptNumPos; i++)
	LD	C,E
	LD	L,C
	LD	B,E
	LD	H,B
?1223:
	LD	(?0010+278),HL
	LD	(?0010+280),BC
?0715:
	LD	HL,(?0010+294)
	LD	BC,0
	LD	H,C
	PUSH	BC
	PUSH	HL
	LD	BC,(?0010+280)
	LD	HL,(?0010+278)
	CALL	LWRD ?SL_CMP_L03
	JP	NC,?0714
?0716:
; 1814.	    {
; 1815.	        if(i == ptLoopPos)
	LD	HL,(?0010+295)
	LD	DE,0
	LD	BC,(?0010+278)
	AND	A
	SBC	HL,BC
	JR	NZ,?0719
	EX	DE,HL
	LD	BC,(?0010+280)
	SBC	HL,BC
	JR	NZ,?0719
?0718:
; 1816.	        {
; 1817.	            *Loop = tm;
	LD	BC,(?0010+288)
	LD	HL,(?0010+286)
	PUSH	HL
	PUSH	IY
	POP	DE
	EX	DE,HL
	POP	DE
	LD	(HL),E
	INC	HL
	LD	(HL),D
	INC	HL
	LD	(HL),C
	INC	HL
	LD	(HL),B
?0719:
; 1818.	        }
; 1819.	        j1 = ay_sys_getword(&module[ptPatPt + ptPosList[i] * 2]);
	LD	HL,(?0010+278)
	LD	BC,(?0010+299)
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	LD	DE,(?0010+297)
	ADD	HL,DE
	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	(?0010+242),HL
	LD	(?0010+244),BC
; 1820.	        j2 = ay_sys_getword(&module[ptPatPt + ptPosList[i] * 2 + 2]);
	LD	HL,(?0010+278)
	LD	BC,(?0010+299)
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	LD	DE,(?0010+297)
	ADD	HL,DE
	PUSH	IX
	POP	BC
	ADD	HL,BC
	EX	DE,HL
	INC	DE
	INC	DE
	LD	A,BYTE3 ay_sys_getword
	LD	HL,LWRD ay_sys_getword
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	(?0010+246),HL
	LD	(?0010+248),BC
; 1821.	        j3 = ay_sys_getword(&module[ptPatPt + ptPosList[i] * 2 + 4]);
	LD	HL,(?0010+278)
	LD	BC,(?0010+299)
	ADD	HL,BC
	LD	L,(HL)
	LD	H,0
	ADD	HL,HL
	LD	BC,(?0010+297)
	ADD	HL,BC
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	BC,4
	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	(?0010+250),HL
	LD	(?0010+252),BC
; 1822.	        a1 = a2 = a3 = 1;
	LD	A,1
	LD	(?0010+238),A
	LD	(?0010+237),A
	LD	(?0010+236),A
?0722:
; 1823.	        do
; 1824.	        {
; 1825.	            a1--;
	LD	HL,?0010+236
	DEC	(HL)
; 1826.	            if(a1 == 0)
	LD	A,(?0010+236)
	OR	A
	JP	NZ,?0763
?0723:
; 1827.	            {
; 1828.	                if(module[j1] == 0)
	LD	HL,(?0010+242)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	OR	A
	JP	Z,?0720
?0725:
; 1829.	                    break;
?0726:
; 1830.	                j = c1 = c2 = c3 = c4 = c5 = c8 = 0;
	LD	BC,0
	LD	L,C
	LD	H,B
	LD	(?0010+274),HL
	LD	(?0010+276),BC
	LD	(?0010+270),HL
	LD	(?0010+272),BC
	LD	(?0010+266),HL
	LD	(?0010+268),BC
	LD	(?0010+262),HL
	LD	(?0010+264),BC
	LD	(?0010+258),HL
	LD	(?0010+260),BC
	LD	(?0010+254),HL
	LD	(?0010+256),BC
	LD	(?0010+282),HL
	LD	(?0010+284),BC
?0729:
; 1831.	                do
; 1832.	                {
; 1833.	                    unsigned char val = module[j1];
	LD	HL,(?0010+242)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+301),A
; 1834.	                    if(val == 0xd0 || val == 0xc0 || (val >= 0x50 && val <= 0xaf))
	CP	208
	JR	Z,?0735
	CP	192
	JR	Z,?0735
	CP	80
	JR	C,?0731
	LD	B,A
	LD	A,175
	CP	B
	JR	C,?0731
?0735:
?0734:
?0732:
?0733:
?0730:
; 1835.	                    {
; 1836.	                        a1 = a11;
	LD	A,(?0010+239)
	LD	(?0010+236),A
; 1837.	                        j1++;
	LD	HL,(?0010+242)
	LD	BC,(?0010+244)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+242),HL
	LD	(?0010+244),BC
; 1838.	                        break;
	JP	LWRD ?0727
?0731:
; 1839.	                    }
; 1840.	                    else if(val == 0x10 || val >= 0xf0)
	LD	A,(?0010+301)
	CP	16
	JR	Z,?0738
	CP	240
	JR	C,?0737
?0738:
?0739:
?0736:
; 1841.	                    {
; 1842.	                        j1++;
	LD	HL,(?0010+242)
	LD	BC,(?0010+244)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+242),HL
	LD	(?0010+244),BC
	JP	LWRD ?0754
?0737:
; 1843.	                    }
; 1844.	                    else if(val >= 0xb2 && val <= 0xbf)
	CP	178
	JR	C,?0742
	LD	B,A
	LD	A,191
	CP	B
	JR	C,?0742
?0744:
?0743:
?0741:
; 1845.	                    {
; 1846.	                        j1 += 2;
	LD	HL,?0010+242
	LD	BC,0
	LD	DE,2
	JR	?1224
?0742:
; 1847.	                    }
; 1848.	                    else if(val == 0xb1)
	LD	A,(?0010+301)
	CP	177
	JR	NZ,?0747
?0746:
; 1849.	                    {
; 1850.	                        j1++;
	LD	HL,(?0010+242)
	LD	BC,(?0010+244)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+242),HL
	LD	(?0010+244),BC
; 1851.	                        a11 = module[j1];
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+239),A
	JR	?0754
?0747:
; 1852.	                    }
; 1853.	                    else if(val >= 0x11 && val <= 0x1f)
	CP	17
	JR	C,?0750
	LD	B,A
	LD	A,31
	CP	B
	JR	C,?0750
?0752:
?0751:
?0749:
; 1854.	                    {
; 1855.	                        j1 += 3;
	LD	HL,?0010+242
	LD	BC,0
	LD	DE,3
?1224:
	CALL	LWRD ?L_ADDASG_L03
; 1856.	                    }
; 1857.	                    else
	JR	?0754
?0750:
; 1858.	                    {
; 1859.	                        switch(val)
	LD	DE,(?0010+301)
	CALL	LWRD ?C_V_SWITCH_L06
	DEFW	7
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	8
	DEFB	9
	DEFW	?0754
	DEFW	?0761
	DEFW	?0760
	DEFW	?0759
	DEFW	?0758
	DEFW	?0757
	DEFW	?0756
	DEFW	?0755
?0755:
; 1860.	                        {
; 1861.	                            case 1:
; 1862.	                                j++;
	CALL	LWRD ?1260
; 1863.	                                c1 = j;
; 1864.	                                break;
	JR	?0754
?0756:
; 1865.	                            case 2:
; 1866.	                                j++;
	CALL	LWRD ?1261
; 1867.	                                c2 = j;
; 1868.	                                break;
	JR	?0754
?0757:
; 1869.	                            case 3:
; 1870.	                                j++;
	CALL	LWRD ?1262
; 1871.	                                c3 = j;
; 1872.	                                break;
	JR	?0754
?0758:
; 1873.	                            case 4:
; 1874.	                                j++;
	CALL	LWRD ?1263
; 1875.	                                c4 = j;
; 1876.	                                break;
	JR	?0754
?0759:
; 1877.	                            case 5:
; 1878.	                                j++;
	CALL	LWRD ?1264
; 1879.	                                c5 = j;
; 1880.	                                break;
	JR	?0754
?0760:
; 1881.	                            case 8:
; 1882.	                                j++;
	CALL	LWRD ?1265
; 1883.	                                c8 = j;
; 1884.	                                break;
	JR	?0754
?0761:
; 1885.	                            case 9:
; 1886.	                                j++;
	LD	HL,(?0010+282)
	LD	BC,(?0010+284)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+282),HL
	LD	(?0010+284),BC
; 1887.	                                break;
?0762:
; 1888.	                            default:
; 1889.	                                break;
?0754:
?0753:
?0748:
?0745:
?0740:
; 1890.	                        }
; 1891.	                    }
; 1892.	                    j1++;
	LD	HL,(?0010+242)
	LD	BC,(?0010+244)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+242),HL
	LD	(?0010+244),BC
; 1893.	                }
; 1894.	                while(true);
	JP	LWRD ?0729
?0727:
?0764:
; 1895.	
; 1896.	                while(j > 0)
	LD	HL,(?0010+284)
	PUSH	HL
	LD	HL,(?0010+282)
	PUSH	HL
	LD	BC,0
	LD	L,C
	LD	H,B
	CALL	LWRD ?SL_CMP_L03
	JP	NC,?0763
?0765:
; 1897.	                {
; 1898.	                    if(j == c1 || j == c8)
	LD	HL,(?0010+282)
	LD	BC,(?0010+254)
	AND	A
	SBC	HL,BC
	JR	NZ,?1217
	LD	HL,(?0010+284)
	LD	BC,(?0010+256)
	SBC	HL,BC
	JR	Z,?0768
?1217:
	LD	HL,(?0010+282)
	LD	BC,(?0010+274)
	AND	A
	SBC	HL,BC
	JR	NZ,?0767
	LD	HL,(?0010+284)
	LD	BC,(?0010+276)
	SBC	HL,BC
	JR	NZ,?0767
?0768:
?0769:
?0766:
; 1899.	                    {
; 1900.	                        j1 += 3;
	LD	HL,?0010+242
	LD	BC,0
	LD	DE,3
	JR	?1227
?0767:
; 1901.	                    }
; 1902.	                    else if(j == c2)
	LD	HL,(?0010+282)
	LD	BC,(?0010+258)
	AND	A
	SBC	HL,BC
	JR	NZ,?0772
	LD	HL,(?0010+284)
	LD	BC,(?0010+260)
	SBC	HL,BC
	JR	NZ,?0772
?0771:
; 1903.	                    {
; 1904.	                        j1 += 5;
	LD	HL,?0010+242
	LD	BC,0
	LD	DE,5
	JR	?1227
?0772:
; 1905.	                    }
; 1906.	                    else if(j == c3 || j == c4)
	LD	HL,(?0010+282)
	LD	BC,(?0010+262)
	AND	A
	SBC	HL,BC
	JR	NZ,?1218
	LD	HL,(?0010+284)
	LD	BC,(?0010+264)
	SBC	HL,BC
	JR	Z,?1225
?1218:
	LD	HL,(?0010+282)
	LD	BC,(?0010+266)
	AND	A
	SBC	HL,BC
	JR	NZ,?0775
	LD	HL,(?0010+284)
	LD	BC,(?0010+268)
	SBC	HL,BC
	JR	Z,?1225
?0776:
?0777:
?0774:
; 1907.	                    {
; 1908.	                        j1++;
?0775:
; 1909.	                    }
; 1910.	                    else if(j == c5)
	LD	HL,(?0010+282)
	LD	BC,(?0010+270)
	AND	A
	SBC	HL,BC
	JR	NZ,?0780
	LD	HL,(?0010+284)
	LD	BC,(?0010+272)
	SBC	HL,BC
	JR	NZ,?0780
?0779:
; 1911.	                    {
; 1912.	                        j1 += 2;
	LD	HL,?0010+242
	LD	BC,0
	LD	DE,2
?1227:
	CALL	LWRD ?L_ADDASG_L03
; 1913.	                    }
; 1914.	                    else
	JR	?0781
?0780:
; 1915.	                    {
; 1916.	                        b = module[j1];
	LD	HL,(?0010+242)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+290),A
; 1917.	                        j1++;
?1225:
	LD	HL,(?0010+242)
	LD	BC,(?0010+244)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+242),HL
	LD	(?0010+244),BC
?0781:
?0778:
?0773:
?0770:
; 1918.	                    }
; 1919.	                    j--;
	LD	HL,(?0010+282)
	LD	BC,(?0010+284)
	CALL	LWRD ?L_DEC_L03
	LD	(?0010+282),HL
	LD	(?0010+284),BC
; 1920.	                }
; 1921.	            }
	JP	LWRD ?0727
?0763:
?0724:
; 1922.	            a2--;
	LD	HL,?0010+237
	DEC	(HL)
; 1923.	            if(a2 == 0)
	LD	A,(?0010+237)
	OR	A
	JP	NZ,?0820
?0782:
; 1924.	            {
; 1925.	                j = c1 = c2 = c3 = c4 = c5 = c8 = 0;
	LD	C,A
	LD	L,C
	LD	B,A
	LD	H,B
	LD	(?0010+274),HL
	LD	(?0010+276),BC
	LD	(?0010+270),HL
	LD	(?0010+272),BC
	LD	(?0010+266),HL
	LD	(?0010+268),BC
	LD	(?0010+262),HL
	LD	(?0010+264),BC
	LD	(?0010+258),HL
	LD	(?0010+260),BC
	LD	(?0010+254),HL
	LD	(?0010+256),BC
	LD	(?0010+282),HL
	LD	(?0010+284),BC
?0786:
; 1926.	                do
; 1927.	                {
; 1928.	                    unsigned char val = module[j2];
	LD	HL,(?0010+246)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+301),A
; 1929.	                    if(val == 0xd0 || val == 0xc0 || (val >= 0x50 && val <= 0xaf))
	CP	208
	JR	Z,?0792
	CP	192
	JR	Z,?0792
	CP	80
	JR	C,?0788
	LD	B,A
	LD	A,175
	CP	B
	JR	C,?0788
?0792:
?0791:
?0789:
?0790:
?0787:
; 1930.	                    {
; 1931.	                        a2 = a22;
	LD	A,(?0010+240)
	LD	(?0010+237),A
; 1932.	                        j2++;
	LD	HL,(?0010+246)
	LD	BC,(?0010+248)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+246),HL
	LD	(?0010+248),BC
; 1933.	                        break;
	JP	LWRD ?0784
?0788:
; 1934.	                    }
; 1935.	                    else if(val == 0x10 || val >= 0xf0)
	LD	A,(?0010+301)
	CP	16
	JR	Z,?0795
	CP	240
	JR	C,?0794
?0795:
?0796:
?0793:
; 1936.	                    {
; 1937.	                        j2++;
	LD	HL,(?0010+246)
	LD	BC,(?0010+248)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+246),HL
	LD	(?0010+248),BC
	JP	LWRD ?0811
?0794:
; 1938.	                    }
; 1939.	                    else if(val >= 0xb2 && val <= 0xbf)
	CP	178
	JR	C,?0799
	LD	B,A
	LD	A,191
	CP	B
	JR	C,?0799
?0801:
?0800:
?0798:
; 1940.	                    {
; 1941.	                        j2 += 2;
	LD	HL,?0010+246
	LD	BC,0
	LD	DE,2
	JR	?1228
?0799:
; 1942.	                    }
; 1943.	                    else if(val == 0xb1)
	LD	A,(?0010+301)
	CP	177
	JR	NZ,?0804
?0803:
; 1944.	                    {
; 1945.	                        j2++;
	LD	HL,(?0010+246)
	LD	BC,(?0010+248)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+246),HL
	LD	(?0010+248),BC
; 1946.	                        a22 = module[j2];
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+240),A
	JR	?0811
?0804:
; 1947.	                    }
; 1948.	                    else if(val >= 0x11 && val <= 0x1f)
	CP	17
	JR	C,?0807
	LD	B,A
	LD	A,31
	CP	B
	JR	C,?0807
?0809:
?0808:
?0806:
; 1949.	                    {
; 1950.	                        j2 += 3;
	LD	HL,?0010+246
	LD	BC,0
	LD	DE,3
?1228:
	CALL	LWRD ?L_ADDASG_L03
; 1951.	                    }
; 1952.	                    else
	JR	?0811
?0807:
; 1953.	                    {
; 1954.	                        switch(val)
	LD	DE,(?0010+301)
	CALL	LWRD ?C_V_SWITCH_L06
	DEFW	7
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	8
	DEFB	9
	DEFW	?0811
	DEFW	?0818
	DEFW	?0817
	DEFW	?0816
	DEFW	?0815
	DEFW	?0814
	DEFW	?0813
	DEFW	?0812
?0812:
; 1955.	                        {
; 1956.	                            case 1:
; 1957.	                                j++;
	CALL	LWRD ?1260
; 1958.	                                c1 = j;
; 1959.	                                break;
	JR	?0811
?0813:
; 1960.	                            case 2:
; 1961.	                                j++;
	CALL	LWRD ?1261
; 1962.	                                c2 = j;
; 1963.	                                break;
	JR	?0811
?0814:
; 1964.	                            case 3:
; 1965.	                                j++;
	CALL	LWRD ?1262
; 1966.	                                c3 = j;
; 1967.	                                break;
	JR	?0811
?0815:
; 1968.	                            case 4:
; 1969.	                                j++;
	CALL	LWRD ?1263
; 1970.	                                c4 = j;
; 1971.	                                break;
	JR	?0811
?0816:
; 1972.	                            case 5:
; 1973.	                                j++;
	CALL	LWRD ?1264
; 1974.	                                c5 = j;
; 1975.	                                break;
	JR	?0811
?0817:
; 1976.	                            case 8:
; 1977.	                                j++;
	CALL	LWRD ?1265
; 1978.	                                c8 = j;
; 1979.	                                break;
	JR	?0811
?0818:
; 1980.	                            case 9:
; 1981.	                                j++;
	LD	HL,(?0010+282)
	LD	BC,(?0010+284)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+282),HL
	LD	(?0010+284),BC
; 1982.	                                break;
?0819:
; 1983.	                            default:
; 1984.	                                break;
?0811:
?0810:
?0805:
?0802:
?0797:
; 1985.	                        }
; 1986.	                    }
; 1987.	                    j2++;
	LD	HL,(?0010+246)
	LD	BC,(?0010+248)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+246),HL
	LD	(?0010+248),BC
; 1988.	                }
; 1989.	                while(true);
	JP	LWRD ?0786
?0784:
?0821:
; 1990.	                while(j > 0)
	LD	HL,(?0010+284)
	PUSH	HL
	LD	HL,(?0010+282)
	PUSH	HL
	LD	BC,0
	LD	L,C
	LD	H,B
	CALL	LWRD ?SL_CMP_L03
	JP	NC,?0820
?0822:
; 1991.	                {
; 1992.	                    if(j == c1 || j == c8)
	LD	HL,(?0010+282)
	LD	BC,(?0010+254)
	AND	A
	SBC	HL,BC
	JR	NZ,?1219
	LD	HL,(?0010+284)
	LD	BC,(?0010+256)
	SBC	HL,BC
	JR	Z,?0825
?1219:
	LD	HL,(?0010+282)
	LD	BC,(?0010+274)
	AND	A
	SBC	HL,BC
	JR	NZ,?0824
	LD	HL,(?0010+284)
	LD	BC,(?0010+276)
	SBC	HL,BC
	JR	NZ,?0824
?0825:
?0826:
?0823:
; 1993.	                    {
; 1994.	                        j2 += 3;
	LD	HL,?0010+246
	LD	BC,0
	LD	DE,3
	JR	?1231
?0824:
; 1995.	                    }
; 1996.	                    else if(j == c2)
	LD	HL,(?0010+282)
	LD	BC,(?0010+258)
	AND	A
	SBC	HL,BC
	JR	NZ,?0829
	LD	HL,(?0010+284)
	LD	BC,(?0010+260)
	SBC	HL,BC
	JR	NZ,?0829
?0828:
; 1997.	                    {
; 1998.	                        j2 += 5;
	LD	HL,?0010+246
	LD	BC,0
	LD	DE,5
	JR	?1231
?0829:
; 1999.	                    }
; 2000.	                    else if(j == c3 || j == c4)
	LD	HL,(?0010+282)
	LD	BC,(?0010+262)
	AND	A
	SBC	HL,BC
	JR	NZ,?1220
	LD	HL,(?0010+284)
	LD	BC,(?0010+264)
	SBC	HL,BC
	JR	Z,?1229
?1220:
	LD	HL,(?0010+282)
	LD	BC,(?0010+266)
	AND	A
	SBC	HL,BC
	JR	NZ,?0832
	LD	HL,(?0010+284)
	LD	BC,(?0010+268)
	SBC	HL,BC
	JR	Z,?1229
?0833:
?0834:
?0831:
; 2001.	                    {
; 2002.	                        j2++;
?0832:
; 2003.	                    }
; 2004.	                    else if(j == c5)
	LD	HL,(?0010+282)
	LD	BC,(?0010+270)
	AND	A
	SBC	HL,BC
	JR	NZ,?0837
	LD	HL,(?0010+284)
	LD	BC,(?0010+272)
	SBC	HL,BC
	JR	NZ,?0837
?0836:
; 2005.	                    {
; 2006.	                        j2 += 2;
	LD	HL,?0010+246
	LD	BC,0
	LD	DE,2
?1231:
	CALL	LWRD ?L_ADDASG_L03
; 2007.	                    }
; 2008.	                    else
	JR	?0838
?0837:
; 2009.	                    {
; 2010.	                        b = module[j2];
	LD	HL,(?0010+246)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+290),A
; 2011.	                        j2++;
?1229:
	LD	HL,(?0010+246)
	LD	BC,(?0010+248)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+246),HL
	LD	(?0010+248),BC
?0838:
?0835:
?0830:
?0827:
; 2012.	                    }
; 2013.	                    j--;
	LD	HL,(?0010+282)
	LD	BC,(?0010+284)
	CALL	LWRD ?L_DEC_L03
	LD	(?0010+282),HL
	LD	(?0010+284),BC
; 2014.	                }
; 2015.	            }
	JP	LWRD ?0784
?0820:
?0783:
; 2016.	            a3--;
	LD	HL,?0010+238
	DEC	(HL)
; 2017.	            if(a3 == 0)
	LD	A,(?0010+238)
	OR	A
	JP	NZ,?0877
?0839:
; 2018.	            {
; 2019.	                j = c1 = c2 = c3 = c4 = c5 = c8 = 0;
	LD	C,A
	LD	L,C
	LD	B,A
	LD	H,B
	LD	(?0010+274),HL
	LD	(?0010+276),BC
	LD	(?0010+270),HL
	LD	(?0010+272),BC
	LD	(?0010+266),HL
	LD	(?0010+268),BC
	LD	(?0010+262),HL
	LD	(?0010+264),BC
	LD	(?0010+258),HL
	LD	(?0010+260),BC
	LD	(?0010+254),HL
	LD	(?0010+256),BC
	LD	(?0010+282),HL
	LD	(?0010+284),BC
?0843:
; 2020.	                do
; 2021.	                {
; 2022.	                    unsigned char val = module[j3];
	LD	HL,(?0010+250)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+301),A
; 2023.	                    if(val == 0xd0 || val == 0xc0 || (val >= 0x50 && val <= 0xaf))
	CP	208
	JR	Z,?0849
	CP	192
	JR	Z,?0849
	CP	80
	JR	C,?0845
	LD	B,A
	LD	A,175
	CP	B
	JR	C,?0845
?0849:
?0848:
?0846:
?0847:
?0844:
; 2024.	                    {
; 2025.	                        a3 = a33;
	LD	A,(?0010+241)
	LD	(?0010+238),A
; 2026.	                        j3++;
	LD	HL,(?0010+250)
	LD	BC,(?0010+252)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+250),HL
	LD	(?0010+252),BC
; 2027.	                        break;
	JP	LWRD ?0841
?0845:
; 2028.	                    }
; 2029.	                    else if(val == 0x10 || val >= 0xf0)
	LD	A,(?0010+301)
	CP	16
	JR	Z,?0852
	CP	240
	JR	C,?0851
?0852:
?0853:
?0850:
; 2030.	                    {
; 2031.	                        j3++;
	LD	HL,(?0010+250)
	LD	BC,(?0010+252)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+250),HL
	LD	(?0010+252),BC
	JP	LWRD ?0868
?0851:
; 2032.	                    }
; 2033.	                    else if(val >= 0xb2 && val <= 0xbf)
	CP	178
	JR	C,?0856
	LD	B,A
	LD	A,191
	CP	B
	JR	C,?0856
?0858:
?0857:
?0855:
; 2034.	                    {
; 2035.	                        j3 += 2;
	LD	HL,?0010+250
	LD	BC,0
	LD	DE,2
	JR	?1232
?0856:
; 2036.	                    }
; 2037.	                    else if(val == 0xb1)
	LD	A,(?0010+301)
	CP	177
	JR	NZ,?0861
?0860:
; 2038.	                    {
; 2039.	                        j3++;
	LD	HL,(?0010+250)
	LD	BC,(?0010+252)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+250),HL
	LD	(?0010+252),BC
; 2040.	                        a33 = module[j3];
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+241),A
	JR	?0868
?0861:
; 2041.	                    }
; 2042.	                    else if(val >= 0x11 && val <= 0x1f)
	CP	17
	JR	C,?0864
	LD	B,A
	LD	A,31
	CP	B
	JR	C,?0864
?0866:
?0865:
?0863:
; 2043.	                    {
; 2044.	                        j3 += 3;
	LD	HL,?0010+250
	LD	BC,0
	LD	DE,3
?1232:
	CALL	LWRD ?L_ADDASG_L03
; 2045.	                    }
; 2046.	                    else
	JR	?0868
?0864:
; 2047.	                    {
; 2048.	                        switch(val)
	LD	DE,(?0010+301)
	CALL	LWRD ?C_V_SWITCH_L06
	DEFW	7
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	8
	DEFB	9
	DEFW	?0868
	DEFW	?0875
	DEFW	?0874
	DEFW	?0873
	DEFW	?0872
	DEFW	?0871
	DEFW	?0870
	DEFW	?0869
?0869:
; 2049.	                        {
; 2050.	                            case 1:
; 2051.	                                j++;
	CALL	LWRD ?1260
; 2052.	                                c1 = j;
; 2053.	                                break;
	JR	?0868
?0870:
; 2054.	                            case 2:
; 2055.	                                j++;
	CALL	LWRD ?1261
; 2056.	                                c2 = j;
; 2057.	                                break;
	JR	?0868
?0871:
; 2058.	                            case 3:
; 2059.	                                j++;
	CALL	LWRD ?1262
; 2060.	                                c3 = j;
; 2061.	                                break;
	JR	?0868
?0872:
; 2062.	                            case 4:
; 2063.	                                j++;
	CALL	LWRD ?1263
; 2064.	                                c4 = j;
; 2065.	                                break;
	JR	?0868
?0873:
; 2066.	                            case 5:
; 2067.	                                j++;
	CALL	LWRD ?1264
; 2068.	                                c5 = j;
; 2069.	                                break;
	JR	?0868
?0874:
; 2070.	                            case 8:
; 2071.	                                j++;
	CALL	LWRD ?1265
; 2072.	                                c8 = j;
; 2073.	                                break;
	JR	?0868
?0875:
; 2074.	                            case 9:
; 2075.	                                j++;
	LD	HL,(?0010+282)
	LD	BC,(?0010+284)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+282),HL
	LD	(?0010+284),BC
; 2076.	                                break;
?0876:
; 2077.	                            default:
; 2078.	                                break;
?0868:
?0867:
?0862:
?0859:
?0854:
; 2079.	                        }
; 2080.	                    }
; 2081.	                    j3++;
	LD	HL,(?0010+250)
	LD	BC,(?0010+252)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+250),HL
	LD	(?0010+252),BC
; 2082.	                }
; 2083.	                while(true);
	JP	LWRD ?0843
?0841:
?0878:
; 2084.	                while(j > 0)
	LD	HL,(?0010+284)
	PUSH	HL
	LD	HL,(?0010+282)
	PUSH	HL
	LD	BC,0
	LD	L,C
	LD	H,B
	CALL	LWRD ?SL_CMP_L03
	JP	NC,?0877
?0879:
; 2085.	                {
; 2086.	                    if(j == c1 || j == c8)
	LD	HL,(?0010+282)
	LD	BC,(?0010+254)
	AND	A
	SBC	HL,BC
	JR	NZ,?1221
	LD	HL,(?0010+284)
	LD	BC,(?0010+256)
	SBC	HL,BC
	JR	Z,?0882
?1221:
	LD	HL,(?0010+282)
	LD	BC,(?0010+274)
	AND	A
	SBC	HL,BC
	JR	NZ,?0881
	LD	HL,(?0010+284)
	LD	BC,(?0010+276)
	SBC	HL,BC
	JR	NZ,?0881
?0882:
?0883:
?0880:
; 2087.	                    {
; 2088.	                        j3 += 3;
	LD	HL,?0010+250
	LD	BC,0
	LD	DE,3
	JR	?1235
?0881:
; 2089.	                    }
; 2090.	                    else if(j == c2)
	LD	HL,(?0010+282)
	LD	BC,(?0010+258)
	AND	A
	SBC	HL,BC
	JR	NZ,?0886
	LD	HL,(?0010+284)
	LD	BC,(?0010+260)
	SBC	HL,BC
	JR	NZ,?0886
?0885:
; 2091.	                    {
; 2092.	                        j3 += 5;
	LD	HL,?0010+250
	LD	BC,0
	LD	DE,5
	JR	?1235
?0886:
; 2093.	                    }
; 2094.	                    else if(j == c3 || j == c4)
	LD	HL,(?0010+282)
	LD	BC,(?0010+262)
	AND	A
	SBC	HL,BC
	JR	NZ,?1222
	LD	HL,(?0010+284)
	LD	BC,(?0010+264)
	SBC	HL,BC
	JR	Z,?1233
?1222:
	LD	HL,(?0010+282)
	LD	BC,(?0010+266)
	AND	A
	SBC	HL,BC
	JR	NZ,?0889
	LD	HL,(?0010+284)
	LD	BC,(?0010+268)
	SBC	HL,BC
	JR	Z,?1233
?0890:
?0891:
?0888:
; 2095.	                    {
; 2096.	                        j3++;
?0889:
; 2097.	                    }
; 2098.	                    else if(j == c5)
	LD	HL,(?0010+282)
	LD	BC,(?0010+270)
	AND	A
	SBC	HL,BC
	JR	NZ,?0894
	LD	HL,(?0010+284)
	LD	BC,(?0010+272)
	SBC	HL,BC
	JR	NZ,?0894
?0893:
; 2099.	                    {
; 2100.	                        j3 += 2;
	LD	HL,?0010+250
	LD	BC,0
	LD	DE,2
?1235:
	CALL	LWRD ?L_ADDASG_L03
; 2101.	                    }
; 2102.	                    else
	JR	?0895
?0894:
; 2103.	                    {
; 2104.	                        b = module[j3];
	LD	HL,(?0010+250)
	PUSH	IX
	POP	BC
	ADD	HL,BC
	LD	A,(HL)
	LD	(?0010+290),A
; 2105.	                        j3++;
?1233:
	LD	HL,(?0010+250)
	LD	BC,(?0010+252)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+250),HL
	LD	(?0010+252),BC
?0895:
?0892:
?0887:
?0884:
; 2106.	                    }
; 2107.	                    j--;
	LD	HL,(?0010+282)
	LD	BC,(?0010+284)
	CALL	LWRD ?L_DEC_L03
	LD	(?0010+282),HL
	LD	(?0010+284),BC
; 2108.	                }
; 2109.	            }
	JP	LWRD ?0841
?0877:
?0840:
; 2110.	            tm += b;
	LD	HL,?0010+286
	LD	DE,(?0010+290)
	LD	BC,0
	LD	D,C
	CALL	LWRD ?L_ADDASG_L03
; 2111.	        }
; 2112.	        while(true);
	JP	LWRD ?0722
?0720:
	LD	HL,(?0010+278)
	LD	BC,(?0010+280)
	CALL	LWRD ?L_INC_L03
	JP	LWRD ?1223
?0714:
; 2113.	
; 2114.	    }
; 2115.	    return tm;
	LD	BC,(?0010+288)
	LD	HL,(?0010+286)
; 2116.	}
	POP	IX
	POP	IY
	JP	LWRD ?BANK_FAST_LEAVE_L08
?1260:
	LD	HL,(?0010+282)
	LD	BC,(?0010+284)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+282),HL
	LD	(?0010+284),BC
	LD	(?0010+254),HL
	LD	(?0010+256),BC
	RET
?1261:
	LD	HL,(?0010+282)
	LD	BC,(?0010+284)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+282),HL
	LD	(?0010+284),BC
	LD	(?0010+258),HL
	LD	(?0010+260),BC
	RET
?1262:
	LD	HL,(?0010+282)
	LD	BC,(?0010+284)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+282),HL
	LD	(?0010+284),BC
	LD	(?0010+262),HL
	LD	(?0010+264),BC
	RET
?1263:
	LD	HL,(?0010+282)
	LD	BC,(?0010+284)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+282),HL
	LD	(?0010+284),BC
	LD	(?0010+266),HL
	LD	(?0010+268),BC
	RET
?1264:
	LD	HL,(?0010+282)
	LD	BC,(?0010+284)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+282),HL
	LD	(?0010+284),BC
	LD	(?0010+270),HL
	LD	(?0010+272),BC
	RET
?1265:
	LD	HL,(?0010+282)
	LD	BC,(?0010+284)
	CALL	LWRD ?L_INC_L03
	LD	(?0010+282),HL
	LD	(?0010+284),BC
	LD	(?0010+274),HL
	LD	(?0010+276),BC
	RET
; 2117.	
; 2118.	
; 2119.	
; 2120.	
; 2121.	
; 2122.	
; 2123.	
; 2124.	void PT3_GetInfo(AYSongInfo * info)
; 2125.	{
PT3_GetInfo:
	PUSH	BC
	PUSH	IX
	PUSH	DE
	POP	IX
; 2126.	        unsigned char *module = info->module;
	INC	DE
	INC	DE
	LD	A,(DE)
	LD	L,A
	INC	DE
	LD	A,(DE)
	LD	H,A
	LD	(?0010+302),HL
; 2127.	        unsigned long loop = 0;
	LD	BC,0
	LD	(?0010+304),BC
	LD	(?0010+306),BC
; 2128.	
; 2129.	
; 2130.	        unsigned long length = PT3_GetTime(module, &loop);
	LD	BC,?0010+304
	EX	DE,HL
	LD	A,BYTE3 PT3_GetTime
	LD	HL,LWRD PT3_GetTime
	CALL	LWRD ?BANK_CALL_DIRECT_EXAF_L08
	LD	(?0010+308),HL
	LD	(?0010+310),BC
; 2131.	
; 2132.	        info->len = length;
	LD	(IX+99),L
	LD	(IX+100),H
; 2133.	
; 2134.	        strncpy(info->Name, &module[0x1e], 32);
	LD	HL,32
	PUSH	HL
	DEC	HL
	DEC	HL
	LD	BC,(?0010+302)
	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
; 2135.	        strncpy(info->Autor, &module[0x42], 32);
	LD	HL,32
	PUSH	HL
	LD	L,66
	LD	BC,(?0010+302)
	ADD	HL,BC
	LD	C,L
	LD	B,H
	LD	HL,41
	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
; 2136.	}
	POP	IX
	POP	BC
	JP	LWRD ?BANK_FAST_LEAVE_L08
	RSEG	CSTR
?0101:
	DEFB	'Pro Tracker v2'
	DEFB	0
?0501:
	DEFB	'ProTracker1'
	DEFB	0
	RSEG	CONST
PT2_Table:
	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	1021
	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	266
	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
PT3NoteTable_PT_33_34r:
	DEFW	3105
	DEFW	2931
	DEFW	2766
	DEFW	2611
	DEFW	2464
	DEFW	2326
	DEFW	2195
	DEFW	2072
	DEFW	1956
	DEFW	1846
	DEFW	1742
	DEFW	1645
	DEFW	1552
	DEFW	1465
	DEFW	1383
	DEFW	1305
	DEFW	1232
	DEFW	1163
	DEFW	1097
	DEFW	1036
	DEFW	978
	DEFW	923
	DEFW	871
	DEFW	822
	DEFW	776
	DEFW	732
	DEFW	691
	DEFW	652
	DEFW	616
	DEFW	581
	DEFW	548
	DEFW	518
	DEFW	489
	DEFW	461
	DEFW	435
	DEFW	411
	DEFW	388
	DEFW	366
	DEFW	345
	DEFW	326
	DEFW	308
	DEFW	290
	DEFW	274
	DEFW	259
	DEFW	244
	DEFW	230
	DEFW	217
	DEFW	205
	DEFW	194
	DEFW	183
	DEFW	172
	DEFW	163
	DEFW	154
	DEFW	145
	DEFW	137
	DEFW	129
	DEFW	122
	DEFW	115
	DEFW	108
	DEFW	102
	DEFW	97
	DEFW	91
	DEFW	86
	DEFW	81
	DEFW	77
	DEFW	72
	DEFW	68
	DEFW	64
	DEFW	61
	DEFW	57
	DEFW	54
	DEFW	51
	DEFW	48
	DEFW	45
	DEFW	43
	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
	DEFW	13
	DEFW	12
PT3NoteTable_PT_34_35:
	DEFW	3106
	DEFW	2931
	DEFW	2767
	DEFW	2611
	DEFW	2465
	DEFW	2327
	DEFW	2196
	DEFW	2073
	DEFW	1956
	DEFW	1847
	DEFW	1743
	DEFW	1645
	DEFW	1553
	DEFW	1466
	DEFW	1383
	DEFW	1306
	DEFW	1232
	DEFW	1163
	DEFW	1098
	DEFW	1036
	DEFW	978
	DEFW	923
	DEFW	871
	DEFW	823
	DEFW	776
	DEFW	733
	DEFW	692
	DEFW	653
	DEFW	616
	DEFW	582
	DEFW	549
	DEFW	518
	DEFW	489
	DEFW	462
	DEFW	436
	DEFW	411
	DEFW	388
	DEFW	366
	DEFW	346
	DEFW	326
	DEFW	308
	DEFW	291
	DEFW	274
	DEFW	259
	DEFW	245
	DEFW	231
	DEFW	218
	DEFW	206
	DEFW	194
	DEFW	183
	DEFW	173
	DEFW	163
	DEFW	154
	DEFW	145
	DEFW	137
	DEFW	130
	DEFW	122
	DEFW	115
	DEFW	109
	DEFW	103
	DEFW	97
	DEFW	92
	DEFW	86
	DEFW	82
	DEFW	77
	DEFW	73
	DEFW	69
	DEFW	65
	DEFW	61
	DEFW	58
	DEFW	54
	DEFW	51
	DEFW	49
	DEFW	46
	DEFW	43
	DEFW	41
	DEFW	39
	DEFW	36
	DEFW	34
	DEFW	32
	DEFW	31
	DEFW	29
	DEFW	27
	DEFW	26
	DEFW	24
	DEFW	23
	DEFW	22
	DEFW	20
	DEFW	19
	DEFW	18
	DEFW	17
	DEFW	16
	DEFW	15
	DEFW	14
	DEFW	13
	DEFW	12
PT3NoteTable_ST:
	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	1021
	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	266
	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
PT3NoteTable_ASM_34r:
	DEFW	3390
	DEFW	3200
	DEFW	3020
	DEFW	2850
	DEFW	2690
	DEFW	2540
	DEFW	2396
	DEFW	2262
	DEFW	2136
	DEFW	2016
	DEFW	1902
	DEFW	1796
	DEFW	1695
	DEFW	1600
	DEFW	1510
	DEFW	1425
	DEFW	1345
	DEFW	1270
	DEFW	1198
	DEFW	1131
	DEFW	1068
	DEFW	1008
	DEFW	951
	DEFW	898
	DEFW	847
	DEFW	800
	DEFW	755
	DEFW	712
	DEFW	673
	DEFW	635
	DEFW	599
	DEFW	566
	DEFW	534
	DEFW	504
	DEFW	476
	DEFW	449
	DEFW	424
	DEFW	400
	DEFW	377
	DEFW	356
	DEFW	336
	DEFW	317
	DEFW	300
	DEFW	283
	DEFW	267
	DEFW	252
	DEFW	238
	DEFW	224
	DEFW	212
	DEFW	200
	DEFW	189
	DEFW	178
	DEFW	168
	DEFW	159
	DEFW	150
	DEFW	141
	DEFW	133
	DEFW	126
	DEFW	119
	DEFW	112
	DEFW	106
	DEFW	100
	DEFW	94
	DEFW	89
	DEFW	84
	DEFW	80
	DEFW	75
	DEFW	71
	DEFW	67
	DEFW	63
	DEFW	60
	DEFW	56
	DEFW	53
	DEFW	50
	DEFW	47
	DEFW	45
	DEFW	42
	DEFW	40
	DEFW	38
	DEFW	36
	DEFW	34
	DEFW	32
	DEFW	30
	DEFW	29
	DEFW	27
	DEFW	26
	DEFW	25
	DEFW	24
	DEFW	21
	DEFW	20
	DEFW	19
	DEFW	18
	DEFW	17
	DEFW	16
	DEFW	15
	DEFW	14
PT3NoteTable_ASM_34_35:
	DEFW	3344
	DEFW	3157
	DEFW	2980
	DEFW	2812
	DEFW	2655
	DEFW	2506
	DEFW	2365
	DEFW	2232
	DEFW	2107
	DEFW	1989
	DEFW	1877
	DEFW	1772
	DEFW	1672
	DEFW	1578
	DEFW	1490
	DEFW	1406
	DEFW	1327
	DEFW	1253
	DEFW	1182
	DEFW	1116
	DEFW	1053
	DEFW	994
	DEFW	939
	DEFW	886
	DEFW	836
	DEFW	789
	DEFW	745
	DEFW	703
	DEFW	664
	DEFW	626
	DEFW	591
	DEFW	558
	DEFW	527
	DEFW	497
	DEFW	469
	DEFW	443
	DEFW	418
	DEFW	395
	DEFW	372
	DEFW	352
	DEFW	332
	DEFW	313
	DEFW	296
	DEFW	279
	DEFW	263
	DEFW	249
	DEFW	235
	DEFW	221
	DEFW	209
	DEFW	197
	DEFW	186
	DEFW	176
	DEFW	166
	DEFW	157
	DEFW	148
	DEFW	140
	DEFW	132
	DEFW	124
	DEFW	117
	DEFW	111
	DEFW	105
	DEFW	99
	DEFW	93
	DEFW	88
	DEFW	83
	DEFW	78
	DEFW	74
	DEFW	70
	DEFW	66
	DEFW	62
	DEFW	59
	DEFW	55
	DEFW	52
	DEFW	49
	DEFW	47
	DEFW	44
	DEFW	41
	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	20
	DEFW	18
	DEFW	17
	DEFW	16
	DEFW	15
	DEFW	14
	DEFW	13
PT3NoteTable_REAL_34r:
	DEFW	3290
	DEFW	3106
	DEFW	2931
	DEFW	2767
	DEFW	2611
	DEFW	2465
	DEFW	2327
	DEFW	2196
	DEFW	2073
	DEFW	1956
	DEFW	1847
	DEFW	1743
	DEFW	1645
	DEFW	1553
	DEFW	1466
	DEFW	1383
	DEFW	1306
	DEFW	1232
	DEFW	1163
	DEFW	1098
	DEFW	1036
	DEFW	978
	DEFW	923
	DEFW	871
	DEFW	823
	DEFW	776
	DEFW	733
	DEFW	692
	DEFW	653
	DEFW	616
	DEFW	582
	DEFW	549
	DEFW	518
	DEFW	489
	DEFW	462
	DEFW	436
	DEFW	411
	DEFW	388
	DEFW	366
	DEFW	346
	DEFW	326
	DEFW	308
	DEFW	291
	DEFW	275
	DEFW	259
	DEFW	245
	DEFW	231
	DEFW	218
	DEFW	206
	DEFW	194
	DEFW	183
	DEFW	173
	DEFW	163
	DEFW	154
	DEFW	145
	DEFW	137
	DEFW	130
	DEFW	122
	DEFW	115
	DEFW	109
	DEFW	103
	DEFW	97
	DEFW	92
	DEFW	86
	DEFW	82
	DEFW	77
	DEFW	73
	DEFW	69
	DEFW	65
	DEFW	61
	DEFW	58
	DEFW	54
	DEFW	51
	DEFW	49
	DEFW	46
	DEFW	43
	DEFW	41
	DEFW	39
	DEFW	36
	DEFW	34
	DEFW	32
	DEFW	31
	DEFW	29
	DEFW	27
	DEFW	26
	DEFW	24
	DEFW	23
	DEFW	22
	DEFW	20
	DEFW	19
	DEFW	18
	DEFW	17
	DEFW	16
	DEFW	15
	DEFW	14
	DEFW	13
PT3NoteTable_REAL_34_35:
	DEFW	3290
	DEFW	3106
	DEFW	2931
	DEFW	2767
	DEFW	2611
	DEFW	2465
	DEFW	2327
	DEFW	2196
	DEFW	2073
	DEFW	1956
	DEFW	1847
	DEFW	1743
	DEFW	1645
	DEFW	1553
	DEFW	1466
	DEFW	1383
	DEFW	1306
	DEFW	1232
	DEFW	1163
	DEFW	1098
	DEFW	1036
	DEFW	978
	DEFW	923
	DEFW	871
	DEFW	823
	DEFW	776
	DEFW	733
	DEFW	692
	DEFW	653
	DEFW	616
	DEFW	582
	DEFW	549
	DEFW	518
	DEFW	489
	DEFW	462
	DEFW	436
	DEFW	411
	DEFW	388
	DEFW	366
	DEFW	346
	DEFW	326
	DEFW	308
	DEFW	291
	DEFW	274
	DEFW	259
	DEFW	245
	DEFW	231
	DEFW	218
	DEFW	206
	DEFW	194
	DEFW	183
	DEFW	173
	DEFW	163
	DEFW	154
	DEFW	145
	DEFW	137
	DEFW	130
	DEFW	122
	DEFW	115
	DEFW	109
	DEFW	103
	DEFW	97
	DEFW	92
	DEFW	86
	DEFW	82
	DEFW	77
	DEFW	73
	DEFW	69
	DEFW	65
	DEFW	61
	DEFW	58
	DEFW	54
	DEFW	51
	DEFW	49
	DEFW	46
	DEFW	43
	DEFW	41
	DEFW	39
	DEFW	36
	DEFW	34
	DEFW	32
	DEFW	31
	DEFW	29
	DEFW	27
	DEFW	26
	DEFW	24
	DEFW	23
	DEFW	22
	DEFW	20
	DEFW	19
	DEFW	18
	DEFW	17
	DEFW	16
	DEFW	15
	DEFW	14
	DEFW	13
PT3VolumeTable_33_34:
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	3
	DEFB	3
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	4
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	4
	DEFB	5
	DEFB	5
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	5
	DEFB	5
	DEFB	6
	DEFB	6
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	5
	DEFB	5
	DEFB	6
	DEFB	6
	DEFB	7
	DEFB	7
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	5
	DEFB	6
	DEFB	6
	DEFB	7
	DEFB	7
	DEFB	8
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	5
	DEFB	6
	DEFB	6
	DEFB	7
	DEFB	8
	DEFB	8
	DEFB	9
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	5
	DEFB	6
	DEFB	6
	DEFB	7
	DEFB	8
	DEFB	8
	DEFB	9
	DEFB	10
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	6
	DEFB	6
	DEFB	7
	DEFB	8
	DEFB	9
	DEFB	9
	DEFB	10
	DEFB	11
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	5
	DEFB	6
	DEFB	7
	DEFB	8
	DEFB	8
	DEFB	9
	DEFB	10
	DEFB	11
	DEFB	12
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	6
	DEFB	7
	DEFB	7
	DEFB	8
	DEFB	9
	DEFB	10
	DEFB	11
	DEFB	12
	DEFB	13
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	6
	DEFB	7
	DEFB	8
	DEFB	9
	DEFB	10
	DEFB	11
	DEFB	12
	DEFB	13
	DEFB	14
	DEFB	0
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	6
	DEFB	7
	DEFB	8
	DEFB	9
	DEFB	10
	DEFB	11
	DEFB	12
	DEFB	13
	DEFB	14
	DEFB	15
PT3VolumeTable_35:
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	0
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	3
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	4
	DEFB	5
	DEFB	5
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	4
	DEFB	5
	DEFB	5
	DEFB	6
	DEFB	6
	DEFB	0
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	5
	DEFB	5
	DEFB	6
	DEFB	6
	DEFB	7
	DEFB	7
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	5
	DEFB	5
	DEFB	6
	DEFB	6
	DEFB	7
	DEFB	7
	DEFB	8
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	5
	DEFB	5
	DEFB	6
	DEFB	7
	DEFB	7
	DEFB	8
	DEFB	8
	DEFB	9
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	5
	DEFB	6
	DEFB	7
	DEFB	7
	DEFB	8
	DEFB	9
	DEFB	9
	DEFB	10
	DEFB	0
	DEFB	1
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	4
	DEFB	5
	DEFB	6
	DEFB	7
	DEFB	7
	DEFB	8
	DEFB	9
	DEFB	10
	DEFB	10
	DEFB	11
	DEFB	0
	DEFB	1
	DEFB	2
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	6
	DEFB	6
	DEFB	7
	DEFB	8
	DEFB	9
	DEFB	10
	DEFB	10
	DEFB	11
	DEFB	12
	DEFB	0
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	6
	DEFB	7
	DEFB	8
	DEFB	9
	DEFB	10
	DEFB	10
	DEFB	11
	DEFB	12
	DEFB	13
	DEFB	0
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	6
	DEFB	7
	DEFB	7
	DEFB	8
	DEFB	9
	DEFB	10
	DEFB	11
	DEFB	12
	DEFB	13
	DEFB	14
	DEFB	0
	DEFB	1
	DEFB	2
	DEFB	3
	DEFB	4
	DEFB	5
	DEFB	6
	DEFB	7
	DEFB	8
	DEFB	9
	DEFB	10
	DEFB	11
	DEFB	12
	DEFB	13
	DEFB	14
	DEFB	15
	RSEG	TEMP
?0010:
	DEFS	312
	RSEG	UDATA0
PT2_SongInfoV:
	DEFS	93
PT1_SongInfoV:
	DEFS	57
data0:
	DEFS	158
	END
