Index: loader.c
===================================================================
--- loader.c	(revision 5)
+++ loader.c	(revision 1)
@@ -1,4 +1,2 @@
-
-
 #asm
 (main)test.asm
@@ -80,5 +78,4 @@
 	unsigned int f_cfgh;
 	unsigned int f_cfgl;
-    unsigned int idx;
 
 	int page,select,maxpage;
@@ -98,18 +95,6 @@
 	ret=go_trk255(); 
 	border(1);
+/*	dump16b(1,16,ret); */
 	border(2);
-
-	ret=string(0,0,"Checking Host mode...",21);
-	ret=rd_sec(0); 
-	ret=dump16b(22,0,ret); 
-	
-	if (buf[0]!='H') {
-		string(0,2,"Fatal cannot setup Host mode...",31);
-		while (1==1) ;
-	}
-
-	string(0,1,buf,8);
-	string(8,1,buf+8,12);
-
 	ret=rd_lba(0,0);
 	lbaBeg_l=mk_16(buf[446+9],buf[446+8]); 
@@ -179,15 +164,14 @@
 			
 		for (i=0;i<16;i++) {
-            idx=i<<5;
-			if ((buf[idx]&0xFF)==0x00) {
+			if ((buf[i<<5]&0xFF)==0x00) {
 				dirEnd=1;
 				 break;
 			}
-			if ((buf[idx+11]&0x0F)==0x0F) {
-				longIdx=buf[idx]&0xF;
+			if ((buf[(i<<5)+11]&0x0F)==0x0F) {
+				longIdx=buf[i<<5]&0xF;
 				longOff=(longIdx-1)*13;
 				for (j=0;j<5;j++) {
 					if (longOff+j<17) {
-						k=(idx)+(j<<1)+1;
+						k=(i<<5)+(j<<1)+1;
 						longname[longOff+j]=buf[k];
 					}
@@ -195,5 +179,5 @@
 				for (j=0;j<6;j++) {
 					if (longOff+j+5<17) {
-						k=(idx)+(j<<1)+0xE;
+						k=(i<<5)+(j<<1)+0xE;
 						longname[longOff+j+5]=buf[k];
 					}
@@ -201,5 +185,5 @@
 				for (j=0;j<2;j++) {
 					if (longOff+j+11<17) {
-						k=(idx)+(j<<1)+0x1C;
+						k=(i<<5)+(j<<1)+0x1C;
 						longname[longOff+j+11]=buf[k];
 					}
@@ -208,5 +192,5 @@
 			}
 
-			if ((buf[idx]&0xFF)!=0xE5) {
+			if ((buf[i<<5]&0xFF)!=0xE5) {
 				for (j=0;j<8;j++) {
 					buf2[(nfic<<5)+j]=buf[(i<<5)+j];
@@ -215,5 +199,5 @@
 					buf2[(nfic<<5)+j+8]=buf[(i<<5)+j+8];
 				}	
-				for (j=0;j<14;j++) {
+				for (j=0;j<17;j++) {
 					buf2[(nfic<<5)+11+j]=longname[j];
 				}
@@ -226,11 +210,4 @@
 				buf2[(nfic<<5)+29]=buf[(i<<5)+0x14];
 				buf2[(nfic<<5)+28]=buf[(i<<5)+0x15];
-                
-                
-				/* also copy 3 bytes of size */
-				buf2[(nfic<<5)+27]=buf[(i<<5)+0x1C];
-				buf2[(nfic<<5)+26]=buf[(i<<5)+0x1D];
-				buf2[(nfic<<5)+25]=buf[(i<<5)+0x1E];
-                
 				nfic++;
 				if (nfic>126) {
@@ -268,4 +245,5 @@
 	hi_line(select+4,0xC7);
 
+	irq();
 	while (1) {
 		i=getc();
@@ -318,5 +296,5 @@
 			if (cfgnum==-1) {
 				cls();
-				string(0,2,"fatal missing CFG",17);
+				string(0,2,"Sorry, no HXCSDFE.CFG found. read only..",40);
 				k=getc();
 				cls();
@@ -328,5 +306,5 @@
 			if (f_clusz<2) {
 				cls();
-				string(0,2,"cluster size 1 is unsupported..",33);
+				string(0,2,"Sorry, cluster size 1 is unsupported..",38);
 				k=getc();
 				cls();
@@ -367,5 +345,5 @@
 				string(0,6,"CFG SECTOR1",11);
 				rd_lba(f_tmph,f_tmpl);
-				string(0,7,&buf[0],11);string(12,7,&buf[21],14);
+				string(0,7,&buf[0],11);string(12,7,&buf[21],16);
 
 				for (ii=0;ii<11;ii++) {
@@ -384,5 +362,5 @@
 				buf[19]=0x1E;
 				buf[20]=0x00;										
-				for (ii=0;ii<14;ii++) {
+				for (ii=0;ii<16;ii++) {
 					buf[21+ii]=buf2[(j<<5)+ii+11];
 				}
@@ -396,5 +374,5 @@
 				dump16b(0,24,ret);
 				string(0,8,"WRT SECTOR1",11);
-				string(0,9,&buf[0],11);string(12,9,&buf[21],14);
+				string(0,9,&buf[0],11);string(12,9,&buf[21],16);
 
 				/* just write back sector (LBA is still correct) */
@@ -402,5 +380,5 @@
 				dump16b(0,24,ret);
 				string(0,10,"READ BACK SECTOR1",17);
-				string(0,11,&buf[0],11);string(12,11,&buf[21],14);
+				string(0,11,&buf[0],11);string(12,11,&buf[21],16);
 
 
@@ -419,9 +397,9 @@
 
 				/* fixed size for HFE thomson */
-				buf[17+0x80]=buf2[(j<<5)+27];
-				buf[18+0x80]=buf2[(j<<5)+26];
-				buf[19+0x80]=buf2[(j<<5)+25];
+				buf[17+0x80]=0x00;
+				buf[18+0x80]=0xA4;
+				buf[19+0x80]=0x1E;
 				buf[20+0x80]=0x00;										
-				for (ii=0;ii<14;ii++) {
+				for (ii=0;ii<16;ii++) {
 					buf[21+ii+0x80]=buf2[(j<<5)+ii+11];
 				}
@@ -435,16 +413,15 @@
 				dump16b(0,24,ret);
 
-/*				string(0,13,"Press a key...",14);
+				string(0,13,"Press a key...",14);
 
 				k=getc();
-*/
-				string(0,14,"Leaving host...",15);
+
 				
-				leave_lba();
-				/* also seek just in case... () */
+				/* leave LBA (need 3 times) */
 				go_track(0);
-
-
-				string(0,15,"... REBOOT ...",10);
+				go_track(0);
+				go_track(0);
+
+				string(0,14,"... REBOOT ...",10);
 				/* and reset */
 				{
@@ -479,5 +456,5 @@
 banner()
 {
-	string(0,0,"HxC TO File selector by VitalMotion",37);
+	string(0,0,"HxC TO8 File selector by VitalMotion",38);
 	string(0,2,"Select your File:\0",17);
 	return 0;
@@ -490,5 +467,4 @@
 {
 	int i,j;
-    int idx;
 	int start;
 	int line;
@@ -501,5 +477,4 @@
 	line=0;
 	for (i=start;i<(start+16);i++) {
-        idx=i<<5;
 		if (i>=nfic) {
 			string(1,line+4,"                                       ",39);
@@ -508,12 +483,12 @@
 		}
 
-		string(1,line+4,&buf2[idx],8);
+		string(1,line+4,&buf2[i<<5],8);
 		charxy(9,line+4,'.');
-		string(10,line+4,&buf2[(idx)+8],3);
-
-		string(14,line+4,&buf2[(idx)+11],14);
+		string(10,line+4,&buf2[(i<<5)+8],3);
+
+		string(14,line+4,&buf2[(i<<5)+11],17);
 		
-		dump16b(32,line+4,mk_16(0,buf2[(idx)+25]));
-		dump16b(36,line+4,mk_16(buf2[(idx)+26],buf2[(idx)+27]));
+		dump16b(32,line+4,mk_16(buf2[(i<<5)+28],buf2[(i<<5)+29]));
+		dump16b(36,line+4,mk_16(buf2[(i<<5)+30],buf2[(i<<5)+31]));
 		line++;
 	}
@@ -666,17 +641,4 @@
 {
 #asm
-		LDA	$E000
-		CMPA	#$44 		| for WD floppy (ie TO9)
-		BNE	go_norm
-
-		LDA	#$FF
-		STA	$6051
-		LDA    #127      | try to go -128 tracks...
-		STA    _DKVAL
-		CLR    _DKTRK
-		LDA    #$40
-		JSR    $E004
-		
-go_norm
 		LDA    #$20     | rech piste 0
 		STA    _DKOPC
@@ -722,34 +684,4 @@
 	p[13]=0xA5;
 	p[14]=0x08;
-
-	/* init fields with a read */
-	wt_sec(0);
-	i=rd_sec(1);
-	return i;
-}
-
-leave_lba(v)
-int v;
-{
-	int i;
-	char *p;
-
-	for (i=0x6300;i<0x6500;i++) {
-		p=i;
-		*p=0x00;
-	}
-	i=0x6300;p=i;
-	p[0]='H';
-	p[1]='x';
-	p[2]='C';
-	p[3]='F';
-	p[4]='E';
-	p[5]='D';
-	p[6]='A';
-	p[7]=0;
-
-	p[8]=0x02;
-	p[9]=0x00;
-	p[10]=0x00;
 
 	/* init fields with a read */
@@ -901,8 +833,4 @@
 }
 
-/*
- * Physical read/write in 9sect/512byte
- */
-
 rd_sec(sect) 
 char sect;
@@ -916,19 +844,5 @@
 		PSHS   U,DP
 		LDX    #$6300
-		STX    $604F           | sector buffer
-
-		LDA	$E000
-		CMPA	#$44		| for WD floppy (ie TO9)
-		BNE	rd_TO8
-		CLR	$6051
-		LDA    #$FF
-		STA    $E7D1
-		LDA    #$02
-		STA    _DKOPC
-		JSR    $E004
-		BRA    rd_sect_end
-
-rd_TO8
-		LDA    #$02            | read sector (monitor)
+		STX    $604F           | sector buffer	
 		JSR    $789D
 		JSR    $78A7
@@ -942,9 +856,7 @@
 		PULS   A               | E0EE
 		JSR    $78B9           | motor off
-rd_sect_end
 		PULS   DP,U		
 		LDA    #$00
 		LDB    _DKERR
-
 		TFR    D,X             | return in X		
 #endasm
@@ -964,19 +876,4 @@
 		LDX    #$6300
 		STX    $604F           | sector buffer	
-
-		LDA	$E000
-		CMPA	#$44 		| for WD floppy (ie TO9)
-		BNE	wt_TO8
-		CLR	$6051
-		LDA    #$FF
-		STA    $E7D1
-		LDA    #$08
-		STA    _DKOPC
-		JSR    $E004
-		BRA    wt_sect_end
-
-wt_TO8
-
-		LDA    #$08            | read sector (monitor)
 		JSR    $789D
 		JSR    $78A7
@@ -990,5 +887,4 @@
 		PULS   A               | E0EE
 		JSR    $78B9           | motor off
-wt_sect_end
 		PULS   DP,U		
 		LDA    #$00
@@ -999,4 +895,21 @@
 }
 
+irq()
+{
+{
+#asm
+
+#endasm
+}
+}
+
+noirq()
+{
+{
+#asm
+
+#endasm
+}
+}
 
 getc() 
@@ -1172,74 +1085,4 @@
     PULS U,PC	; retour de fonction compatible mini C                
 
-* MC09 internal functions/lib
-	
-_00001	PSHS	D,X,Y		multiply
-	
-	LDA	,S
-	LDB	3,S
-	MUL
-	STB	4,S
-	
-	LDD	1,S
-	MUL
-	STB	5,S
-	
-	LDA	1,S
-	LDB	3,S
-	MUL
-	ADDA	4,S
-	ADDA	5,S
-	
-	LEAS	6,S
-	RTS
-	
-_00006	CMPX	#0		signed left shift
-	BMI	_06001
- 
-_06000	BEQ	_06009
-	LSLB
-	ROLA
-	LEAX	-1,X
-	BRA	_06000
-	
-_06001	BEQ	_06009
-	ASRA
-	RORB
-	LEAX	1,X
-	BRA	_06001
-	
-_06009	RTS
-_00008	CMPX	#0		sined right shift
-	BMI	_08001
-	
-_08000	BEQ	_08009
-	ASRA
-	RORB
-	LEAX	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$0,$0,$0,$0,$7E,$7E,$7E,$0
-	FCB	$18,$3C,$7E,$18,$7E,$3C,$18,$FF
-	FCB	$10,$38,$7C,$54,$10,$10,$10,$0
-	FCB	$10,$10,$10,$54,$7C,$38,$10,$0
-	FCB	$0,$18,$C,$FE,$C,$18,$0,$0
-	FCB	$0,$30,$60,$FE,$60,$30,$0,$0
-	FCB	$0,$0,$40,$40,$40,$7E,$0,$0
-	FCB	$0,$24,$66,$FF,$66,$24,$0,$0
-	FCB	$0,$10,$38,$7C,$FE,$FE,$0,$0
-	FCB	$0,$FE,$FE,$7C,$38,$10,$0,$0
+* !
+	FCB	$18,$18,$18,$18,$0,$18,$0,$0
+* "
+	FCB	$66,$66,$0,$0,$0,$0,$0,$0
+* #
+	FCB	$0,$24,$7E,$24,$7E,$24,$0,$0
+* $%&
 	FCB	$0,$0,$0,$0,$0,$0,$0,$0
-	FCB	$10,$38,$38,$10,$10,$0,$10,$0
-	FCB	$24,$24,$24,$0,$0,$0,$0,$0
-	FCB	$24,$24,$7E,$24,$7E,$24,$24,$0
-	FCB	$18,$3E,$40,$3C,$2,$7C,$18,$0
-	FCB	$0,$62,$64,$8,$10,$26,$46,$0
-	FCB	$30,$48,$30,$56,$88,$88,$76,$0
-	FCB	$10,$10,$20,$0,$0,$0,$0,$0
-	FCB	$10,$20,$40,$40,$40,$20,$10,$0
-	FCB	$20,$10,$8,$8,$8,$10,$20,$0
-	FCB	$0,$44,$38,$FE,$38,$44,$0,$0
-	FCB	$0,$10,$10,$7C,$10,$10,$0,$0
-	FCB	$0,$0,$0,$0,$0,$10,$10,$20
-	FCB	$0,$0,$0,$7E,$0,$0,$0,$0
-	FCB	$0,$0,$0,$0,$0,$10,$10,$0
-	FCB	$0,$2,$4,$8,$10,$20,$40,$0
-	FCB	$3C,$42,$46,$4A,$52,$62,$3C,$0
-	FCB	$10,$30,$50,$10,$10,$10,$7C,$0
-	FCB	$3C,$42,$2,$C,$30,$42,$7E,$0
-	FCB	$3C,$42,$2,$1C,$2,$42,$3C,$0
-	FCB	$8,$18,$28,$48,$FE,$8,$1C,$0
-	FCB	$7E,$40,$7C,$2,$2,$42,$3C,$0
-	FCB	$1C,$20,$40,$7C,$42,$42,$3C,$0
-	FCB	$7E,$42,$4,$8,$10,$10,$10,$0
-	FCB	$3C,$42,$42,$3C,$42,$42,$3C,$0
-	FCB	$3C,$42,$42,$3E,$2,$4,$38,$0
-	FCB	$0,$10,$10,$0,$0,$10,$10,$0
-	FCB	$0,$10,$10,$0,$0,$10,$10,$20
-	FCB	$8,$10,$20,$40,$20,$10,$8,$0
-	FCB	$0,$0,$7E,$0,$0,$7E,$0,$0
-	FCB	$10,$8,$4,$2,$4,$8,$10,$0
-	FCB	$3C,$42,$2,$4,$8,$0,$8,$0
-	FCB	$3C,$42,$5E,$52,$5E,$40,$3C,$0
-	FCB	$18,$24,$42,$42,$7E,$42,$42,$0
-	FCB	$7C,$22,$22,$3C,$22,$22,$7C,$0
-	FCB	$1C,$22,$40,$40,$40,$22,$1C,$0
-	FCB	$78,$24,$22,$22,$22,$24,$78,$0
-	FCB	$7E,$22,$28,$38,$28,$22,$7E,$0
-	FCB	$7E,$22,$28,$38,$28,$20,$70,$0
-	FCB	$1C,$22,$40,$40,$4E,$22,$1E,$0
-	FCB	$42,$42,$42,$7E,$42,$42,$42,$0
-	FCB	$38,$10,$10,$10,$10,$10,$38,$0
-	FCB	$E,$4,$4,$4,$44,$44,$38,$0
-	FCB	$62,$24,$28,$30,$28,$24,$63,$0
-	FCB	$70,$20,$20,$20,$20,$22,$7E,$0
-	FCB	$63,$55,$49,$41,$41,$41,$41,$0
-	FCB	$62,$52,$4A,$46,$42,$42,$42,$0
-	FCB	$18,$24,$42,$42,$42,$24,$18,$0
-	FCB	$7C,$22,$22,$3C,$20,$20,$70,$0
-	FCB	$3C,$42,$42,$42,$4A,$3C,$3,$0
-	FCB	$7C,$22,$22,$3C,$28,$24,$72,$0
-	FCB	$3C,$42,$40,$3C,$2,$42,$3C,$0
-	FCB	$7F,$49,$8,$8,$8,$8,$1C,$0
-	FCB	$42,$42,$42,$42,$42,$42,$3C,$0
-	FCB	$41,$41,$41,$41,$22,$14,$8,$0
-	FCB	$41,$41,$41,$49,$49,$49,$36,$0
-	FCB	$41,$22,$14,$8,$14,$22,$41,$0
-	FCB	$41,$22,$14,$8,$8,$8,$1C,$0
-	FCB	$7F,$42,$4,$8,$10,$21,$7F,$0
-	FCB	$78,$40,$40,$40,$40,$40,$78,$0
-	FCB	$80,$40,$20,$10,$8,$4,$2,$0
-	FCB	$78,$8,$8,$8,$8,$8,$78,$0
-	FCB	$10,$28,$44,$82,$0,$0,$0,$0
-	FCB	$0,$0,$0,$0,$0,$0,$0,$FF
-	FCB	$10,$10,$8,$0,$0,$0,$0,$0
-	FCB	$0,$0,$3C,$2,$3E,$42,$3F,$0
-	FCB	$60,$20,$20,$2E,$31,$31,$2E,$0
-	FCB	$0,$0,$3C,$42,$40,$42,$3C,$0
-	FCB	$6,$2,$2,$3A,$46,$46,$3B,$0
-	FCB	$0,$0,$3C,$42,$7E,$40,$3C,$0
-	FCB	$C,$12,$10,$38,$10,$10,$38,$0
-	FCB	$0,$0,$3D,$42,$42,$3E,$2,$7C
-	FCB	$60,$20,$2C,$32,$22,$22,$62,$0
-	FCB	$10,$0,$30,$10,$10,$10,$38,$0
-	FCB	$2,$0,$6,$2,$2,$42,$42,$3C
-	FCB	$60,$20,$24,$28,$30,$28,$26,$0
-	FCB	$30,$10,$10,$10,$10,$10,$38,$0
-	FCB	$0,$0,$76,$49,$49,$49,$49,$0
-	FCB	$0,$0,$5C,$62,$42,$42,$42,$0
-	FCB	$0,$0,$3C,$42,$42,$42,$3C,$0
-	FCB	$0,$0,$6C,$32,$32,$2C,$20,$70
-	FCB	$0,$0,$36,$4C,$4C,$34,$4,$E
-	FCB	$0,$0,$6C,$32,$22,$20,$70,$0
-	FCB	$0,$0,$3E,$40,$3C,$2,$7C,$0
-	FCB	$10,$10,$7C,$10,$10,$12,$C,$0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C0,$C0,$C0,$0,$0
+	FCB	$0,$7E,$E0,$7C,$E,$FC,$0,$0
+	FCB	$60,$60,$FE,$60,$60,$3E,$0,$0
+	FCB	$0,$C6,$C6,$C6,$FE,$7E,$0,$0
+	FCB	$0,$C6,$C6,$C6,$7C,$38,$0,$0
+	FCB	$0,$D6,$D6,$D6,$FC,$F8,$0,$0
+	FCB	$0,$C6,$C6,$7C,$C6,$C6,$0,$0
+	FCB	$0,$C6,$C6,$C6,$7E,$6,$6,$7C
+	FCB	$0,$FE,$E,$38,$E0,$FE,$0,$0
+
+* 	
+	FCB	$0,$0,$0,$0,$0,$0,$0,$0
+	
+* |  as a block
+	FCB	$FE,$FE,$FE,$FE,$FE,$FE,$0,$0
+	
+* 	
+	FCB	$0,$0,$0,$0,$0,$0,$0,$0	
+
+	FCB	$00,$60,$F2,$9E,$0C,$00,$0,$0	
+
+* MC09 internal functions/lib
+	
+_00001	PSHS	D,X,Y		multiply
+	
+	LDA	,S
+	LDB	3,S
+	MUL
+	STB	4,S
+	
+	LDD	1,S
+	MUL
+	STB	5,S
+	
+	LDA	1,S
+	LDB	3,S
+	MUL
+	ADDA	4,S
+	ADDA	5,S
+	
+	LEAS	6,S
+	RTS
+	
+_00006	CMPX	#0		signed left shift
+	BMI	_06001
+ 
+_06000	BEQ	_06009
+	LSLB
+	ROLA
+	LEAX	-1,X
+	BRA	_06000
+	
+_06001	BEQ	_06009
+	ASRA
+	RORB
+	LEAX	1,X
+	BRA	_06001
+	
+_06009	RTS
+_00008	CMPX	#0		sined right shift
+	BMI	_08001
+	
+_08000	BEQ	_08009
+	ASRA
+	RORB
+	LEAX	-1,X
+	BRA	_08000
+	
+_08001	BEQ	_08009
+	LSLB
+	ROLA
+	LEAX	1,X
+	BRA	_08001
+	
+_08009	RTS	
+_00009	CMPX	#0		unsined right shift
+	BMI	_09001
+	
+_09000	BEQ	_09009
+	LSRA
+	RORB
+	LEAX	-1,X
+	BRA	_09000
+	
+_09001	BEQ	_09009
+	LSLB
+	ROLA
+	LEAX	1,X
+	BRA	_09001
+	
+_09009	RTS	
 #endasm	
 }
