Sinclair QL (cross) development and emulation questions

Anything QL Software or Programming Related.
spkr
Bent Pin Expansion Port
Posts: 98
Joined: Tue May 04, 2021 6:52 pm

Re: Sinclair QL (cross) development and emulation questions

Post by spkr »

FrancoisLanciault wrote:
tofro wrote:
spkr wrote: If the changes written to the video register are immediate, this would imply that mixed video modes are possible? Like part of the screen using a 512 width and parts of the screen 256 width, assuming one can get the code to execute cycle exact. This is interesting to figure out!
You might want to have a look here (not my page)
I also did my own implementation of a high color image viewer using this technic about 24 years ago. I can send you the source code if you wish. I have two versions, one that smash the system variables to use the second screen and thus would work in supervisor mode only, the other, when use with Minerva, would work without destroying everything and would exit gracefully.
That would be awesome! Would be most appreciated.


FrancoisLanciault
Trump Card
Posts: 167
Joined: Mon Aug 08, 2011 11:08 pm

Re: Sinclair QL (cross) development and emulation questions

Post by FrancoisLanciault »

spkr wrote:
FrancoisLanciault wrote:
tofro wrote:
You might want to have a look here (not my page)
I also did my own implementation of a high color image viewer using this technic about 24 years ago. I can send you the source code if you wish. I have two versions, one that smash the system variables to use the second screen and thus would work in supervisor mode only, the other, when use with Minerva, would work without destroying everything and would exit gracefully.
That would be awesome! Would be most appreciated.
I did some digging in my old floppies and here is what I found. I cannot guaranty that this code is the latest version and that it works, it has been too long...

The first example is the code to be used with a Minerva ROM i.e. with both screen available, the system variable being located outside of the display area. Running the code would start the computer switching between the two screens every 1/50 of a sec. The computer would still fonction normally. You only need to load the 65k picture file at $20000.

Code: Select all

	TTL	{Rainbow} MULTI_COLOR_SCREEN 1.0
	
MT.LPOLL		EQU		$1C

* START OF PROGRAM

			LEA		INT_SERVE,A1
			MOVEQ	#MT.LPOLL,D0
			LEA		INT_LINK,A0
			MOVE.L	A1,4(A0)
			TRAP	#1
			MOVEQ	#0,D0
			RTS
			
INT_LINK		DS.L		2

INT_SERVE	LEA		HERE,A0
			MOVE.B	(A0),98403
			MOVE.B	#128,D0
			EOR.B	DO,(A0)
			RTS
HERE		DC.B		8
			END
			
This one is for a non Minerva 128k system. It was called from basic with some argument in in D1,D2,A1 and A2. I did not found the basic loader, but looking at the code it seems that:

D1: time to display image in 1/50 sec
D2: size of the system variable area
A1: Location in memory to temporarily save the system variables
A2: Location in memory for the 65k images

In this code, COPY ARG1,ARG2,ARG3 is a MACRO that copy ARG3 bytes of data from ARG1 to ARG2. The code does not rely on the video interrupts and instead do a software timer loop.

Code: Select all

			TTL		{RAINBOW} FOR 128K, NO MINERVA
			
			TRAP	#0
			ORI		#$700,SR
			COPY	#$28000,A1,D2			MOVE SYSTEM VARIABLE ELSEWHERE
			COPY	A2,#$20000,65535		COPY IMAGE TO SCREEN(S)
			
START		LEA		HERE,A0
			MOVE.B	(A0),98403
			MOVE.B	#128,D0
			EOR.B	D0,(A0)
			
			MOVE.L	#6364,D3				TIMER FOR ONE FRAME ON MY QL AT THE TIME (60HZ ?)
LOOP		DBEQ	D3,LOOP

			DBEQ	D1,START
			
			COPY	A1,#28000,D2			COPY THE SYSTEM VARIABLE BACK TO ITS LOCATION
			EORI		#2700,SR
			MOVEQ	#0,D0
			RTS
			
HERE		DC.B		8
			END
			
Hope it can help you. Not sure I can explain every line of code, as I said it has been too long, but feel free to ask anyway!

Francois


User avatar
Chain-Q
Chuggy Microdrive
Posts: 62
Joined: Mon Nov 16, 2020 1:10 pm
Location: Berlin, DE, EU
Contact:

Re: Sinclair QL (cross) development and emulation questions

Post by Chain-Q »

M68008 wrote:The debugger is a separate component I wrote as a Windows DLL and the UI uses Win32 API calls. It didn't seem worth porting it as I don't know of anybody other than me using it.
I recently registered Q-emuLator for macOS, I'm working on Free Pascal, and I'd love to have any sort of debugger in it on macOS.


User avatar
M68008
Trump Card
Posts: 223
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: Sinclair QL (cross) development and emulation questions

Post by M68008 »

Chain-Q wrote:
M68008 wrote:The debugger is a separate component I wrote as a Windows DLL and the UI uses Win32 API calls. It didn't seem worth porting it as I don't know of anybody other than me using it.
I recently registered Q-emuLator for macOS, I'm working on Free Pascal, and I'd love to have any sort of debugger in it on macOS.
Have you tried one of the QL debuggers? In the 80s I used the Computer One Monitor and it was pretty good!


Post Reply