View Single Post
Old 16th Dec 2021, 11:45 am   #21
coolsnaz2
Triode
 
Join Date: Aug 2020
Location: Wallington, Greater London, UK.
Posts: 22
Default Re: Yet another MK14 tape interface (ESP32).

Ok this time I used sbasm to produce the code.

Code:
	.CR scmp
	.TF BootLoader3.hex, INT
	;
	; coolsnaz2 (IFM 2021)


COUNT	.EQ 0x75 	;Change to 0xD5 after assembled
LEN	.EQ 0x76	;Change to 0xD6 after assembled
        .OR 0x0880
		
		
BEGIN	JS 2,GBYTE
		LDE
		XPAH 1
		JS 2,GBYTE
		LDE
		XPAL 1
		JS 2,GBYTE
		LDE
		ST LEN(3)
		
START	JS 2,GBYTE
		LDE
		ST @+1(1)
		DLD LEN(3)
		JNZ START
		JS 2,GBYTE
		LDE
		XPAH 3
		JS 2,GBYTE
		LDE
		XPAL 3		
		RET 3


GBYTE	LDI 8		;Loop Bits In Byte
		ST COUNT(3)
LOOP	CSA
		ANI 0x20
		JZ LOOP
		SIO
LOOP2	CSA		
		ANI 0x20
		JZ LOOP2
		DLD COUNT(3)
		JNZ LOOP
		RET 2
This is the new Boot Loader I am using, takes 21 seconds to load using using the standard MK 14 tape interface, I currently load at 0880.

All subsequent loads will use this Loader, Moon Lander takes under 1 second to load.

The M5StickC program has been updated to send load address, file length and execution address. This reduces need to enter these into the MK14. Programs now load to correct address and execute automatically.

I have a slight problem with the assembler, the values for COUNT and LEN need to be changed after the code has been assembled. I think this relates to the assembler not knowing that P3 is set to 0x0023.

Not sure if it's worth updating the load process to accept the .hex files produced by the sbasm.
coolsnaz2 is offline   Reply With Quote