RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » General Instrument CTS256A-AL2 vs. Microchip CTS256AL2
Re: DAISY256 works [message #10724 is a reply to message #10723] Mon, 22 April 2024 15:10 Go to previous messageGo to previous message
lynchaj is currently offline  lynchaj
Messages: 1080
Registered: June 2016
Senior Member
Hi Jay
Thankfully, we have the disassembled CTS256 source code which can be found her: https://github.com/GmEsoft/CTS256A-AL2/blob/main/CTS256A.ASM

Looking over the code, I think this is the region which determines input mode (serial or parallel) and then configures the serial port based various parameters.

We'll update the values in SCT1TB and T3DATB to account for the faster UART cycle clock and burn a new firmware boot EPROM.

Also, it looks like TI changed the serial port register locations from TMS7xx1 to TMS7xCx2 so they'll need to be updated too.

Maybe other things but most of the functionality should be unchanged. Just dropping in the TMS70C02 it boots using the legacy CTS256 firmware and gets as far as saying "O-K" so most of it seems to be fine. Although the serial ports are screwed up.

START	MOV	%>3A,B
	LDSP			; Init stack pointer 3B-XX
	MOVD	%>2000,R45	; R45 := $2000
	MOVP	%>AA,P0		; P0 = IOCNT0 := 1010 1010
				; 	Full Expansion;
				;	Clear INT1, INT2 and INT3 flags
	MOVP	%>0A,P16	; P16 = IOCNT1 := 0000 1010
				;	Clear INT4 and INT5 flags
	MOVP	P4,B		; Read P4 = APORT
	AND	%>07,B		; Get Serial mode
	CMP	%>00,B		; Is it Parallel mode ?
				; useful ?
	; Jump if yes
	JZ	PARALL		; Start in parallel mode
	AND	%>7F,R10	; Clear R10.7, indicating serial mode
	MOVP	P4,A		; Read P4 = APORT
	AND	%>08,A		; Get Selectable Serial Config flag
	CMP	%>00,A		; Is it set ?
				; useful ?
	; Jump if not
	JZ	SER7N2		; Serial fixed 7N2 config
	LDA	@>1000		; Read serial config from $1000
	MOVP	A,P17		; Init P17 = SMODE with seria config
	JMP	SERSEL		; Serial selectable config

SER7N2	MOVP	%>CB,P17	; P17 = SMODE := Fixed Serial 7N2 config
SERSEL	MOVP	%>15,P17	; P17 = SCTL0 := OOO1 O1O1
				; Reset error flags; enable RX & TX
	; A := value for SCTL1 (prescaler)
	LDA	@SCT1TB(B)	; Table of values for SCTL1
	PUSH	A
	; A := value for T3DATA (timer3 reload)
	LDA	@T3DATB(B)	; Table of timer3 reload values T3DATA
	POP	B
	MOVP	B,P21		; set SCTL1
	MOVP	A,P20		; set T3DATA
	ORP	%>01,P16	; enable T4
	; proceed with RAM setup
	JMP	INIRAM		; Init RAM config

	; Table of values for SCTL1
SCT1TB	BYTE	>FF,>40,>43,>40,>43,>40,>40,>40

	; Table of timer3 reload values T3DATA
T3DATB	BYTE	>FF,>20,>57,>07,>C2,>0F,>81,>03

[Updated on: Mon, 22 April 2024 15:21]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dave Runkle's front panel for the SBC6120-RBC
Next Topic: Resurrecting EaZy80, a forgotten glue-less 22MHz Z80 SBC.


Current Time: Fri Sep 26 18:20:12 PDT 2025

Total time taken to generate the page: 0.50112 seconds