Page 2 of 9

Re: Psion ROM cartridges

Posted: Fri Aug 02, 2024 10:43 pm
by janbredenbeek
Very curious about those 'interrupt vectors' at $FFFF3 to $FFFFF... and why are there 13 bytes reserved and not 16?

Miracle used a clever trick to link in the Trump Card ROM. When the 68008 scans for the plug-in ROM at $C000 (after the memory sizing) they paged in their ROM at $C0000 (obscuring the RAM there), so this will be the next ROM to be linked in. When it gets called its initialisation code jumps to the real location at $10000 and pages itself out at $C0000, so there is again RAM there.

BTW, Minerva keeps scanning for ROMs above RAMTOP until it finds a duplicate ROM. So it will be possible to load ROMs on a Q68 in the area above 16MB (which is the maximum supported by Minerva) and get them linked in, without occupying system RAM.

Re: Psion ROM cartridges

Posted: Sat Aug 03, 2024 7:23 am
by Derek_Stewart
janbredenbeek wrote: Fri Aug 02, 2024 10:43 pm Very curious about those 'interrupt vectors' at $FFFF3 to $FFFFF... and why are there 13 bytes reserved and not 16?
More than likely it is an error in the "QL Advaned User Guide", I will look into this, also I Adrian Dickens has never responded to to me about releasing the copyright.

Re: Psion ROM cartridges

Posted: Sat Aug 03, 2024 4:00 pm
by Derek_Stewart
I can not fi d anything about the 13 bytrs at the top of thd QL memory map.

In the QDOS Companion:
QDOS Companion, page 35 wrote:
Level 7 interrupts can normally only be triggered by additional hardware.
However, an early debugging tool has been left in the hardware, so that pressing CTRL ALT 2, 5 or 7 triggers the equivalent interrupt. A level 7 interrupt will usually cause the machine to lock up as it destroys the communication process between the 68008 and the 8049 IPC.
This does not seem relavent, anyone whst the Additional Hardware is?

Re: Psion ROM cartridges

Posted: Sat Aug 03, 2024 9:16 pm
by janbredenbeek
Derek_Stewart wrote: Sat Aug 03, 2024 4:00 pm
QDOS Companion, page 35 wrote:
Level 7 interrupts can normally only be triggered by additional hardware.
However, an early debugging tool has been left in the hardware, so that pressing CTRL ALT 2, 5 or 7 triggers the equivalent interrupt. A level 7 interrupt will usually cause the machine to lock up as it destroys the communication process between the 68008 and the 8049 IPC.
This does not seem relavent, anyone whst the Additional Hardware is?
This would require both the IPL0L and IPL1L pins on the expansion connector to be asserted, resulting in a Level 7 interrupt.
However, the normal way for external hardware to assert an interrupt will be through the EXTINTL pin, which triggers the system interrupt and causes the CPU to execute the External Interrupt linked list.

You might use the L7 interrupt vector to start a debugger to recover from a lock-up using CTRL-ALT-7, but this is not guaranteed to work (it usually causes another lock-up).

Re: Psion ROM cartridges

Posted: Sat Aug 03, 2024 9:49 pm
by Pr0f
The problem with the CTRL ALT 7 combo is it also triggers a reset in the IPC code too - and that's what causes the loss of synch as the QL and the IPC get out of step.

Hermes has some code changes to help with this a little, but due to the 'fragile' nature of the link, it's easily screwed up.

Code: Select all

L05B2:
;
;  This is the CTRL - ALT - ESC - 7   (formerly CTRL - ALT - 7)
;
	call	Reset_state_mc
	mov	r1,a			;sets up a big delay before 'reset'
	mov	a,#0F9H			; IPL 0-2 (5) Low and speaker low
	outl	p2,a
L05B8:
	mov	r0,#000H
L05BA:
	djnz	r0,L05BA
	djnz	r1,L05B8
L05BE:
	call	Reset_state_mc			; we got here from IPC command 0, or fell through from above
	mov	psw,a			; reset the IPC by falling through here ?
;
INIT_Start:
;
;
;000E: 8A 01   ORL  P2,#01     p2.0=H,RXDin&TXDin
;0010: 9A FD   ANL  P2,#FD     p2.1=L,speaker
;0012: 8A 04   ORL  P2,#04     p2.2=H,ipl0-2
;0014: 8A 08   ORL  P2,#08     p2.3=H,ipl1
;0016: 8A 10   ORL  P2,#10     p2.4=H,CTSout
;0018: 8A 20   ORL  P2,#20     p2.5=H,DTRout
;001A: 8A 40   ORL  P2,#40     p2.6=H,??
;001C: 8A 80   ORL  P2,#80     p2.7=H,comdata
; - set P2 to FD which equates to the above command block from original IPC code!!
;
; interrupts are off when we start here, so let's set P2 port up, clear some memory, set initial regs and wait for commands
;
	mov	a,#0FDH
	outl	p2,a
	strt	t			; not sure why we start the timer here - but it will be a long time before first interrupt
	mov	r0,#05FH		; starting at this location in RAM
	clr	a			; clear A
L05C8:
	mov	@r0,a			; push A to RAM to
	djnz	r0,L05C8		; clear down memory
	mov	r1,#010H		; set R1 to 10H
	mov	r7,#007H		; for a count of 7
L05CF:
	mov	a,r1			; load from 0510H
	movp	a,@a
	mov	@r1,a			; into RAM location 10H
	inc	r1			; and repeat for the remaining 6 locations
	djnz	r7,L05CF
L05D5:
;
;     r3 flags are set to suggest data is available in buffers - this gets fixed after keyboard scan happens
;
	in	a,p2			; check COMDATA
	cpl	a			; invert for bit jump test
	jb7	L05D5			; Loop around and wait for a IPC Command
	mov	r3,#033H		; We got IPC comms so setup and go read it. 
	jmp	Scan_KBD		; via keyboard scan
	

Re: Psion ROM cartridges

Posted: Sat Aug 03, 2024 10:53 pm
by bwinkel67
Wicksy wrote: Thu Aug 01, 2024 8:09 am Am interested how they would have achieved getting an individual Psion file of around 60k, when only 16k ROM is on offer.
Reading QL Wiki on Toolkit 2, it seems it uses a small amount of RAM as a ROM cartridge. That leads me to believe that would be the solution Psion would go with, albeit using a lot more RAM. Am happy to be corrected on this assumption.
If it were about just launching one of the Exchange programs from ROM, you could maybe store a smashed version in 16K ROM, which would allow it to be as big as 32K. I've used smash'ed programs before (i.e. self-extracting executables) on the QL and it works pretty well and the overhead isn't too big. That's still much smaller than what the Exchange programs are, plus you'd have to have a different ROM plug-in for each of the four programs. I suppose they could maybe offload the less used features onto microdrives and create a leaner version to get closer to the 32Kish limit.

Could they have somehow bank switched using a larger ROM/EPROM along with a smaller running RAM program to get this work? Unfortunately I don't know enough about the ROM/RAM layout of the QL to better understand how all that works.

Re: Psion ROM cartridges

Posted: Sat Aug 03, 2024 11:33 pm
by Pr0f
It would have been possible to use something like the method used by ROMDisq - which offered upto 8Mb of storage accessible through the ROM port on the QL.

The other possibility is to have the Psion programs in a plug in cartidge in the slot on the side - as an Expansion device - ROM boards have been offered before (Eprom / GST) and that could also have offered RAM expansion too.

Re: Psion ROM cartridges

Posted: Sun Aug 04, 2024 12:33 am
by bwinkel67
Pr0f wrote: Sat Aug 03, 2024 11:33 pm It would have been possible to use something like the method used by ROMDisq - which offered upto 8Mb of storage accessible through the ROM port on the QL.
Ah, that's right, forgot about ROMDisq, which came out in the late 90s.
Pr0f wrote: Sat Aug 03, 2024 11:33 pm The other possibility is to have the Psion programs in a plug in cartidge in the slot on the side - as an Expansion device - ROM boards have been offered before (Eprom / GST) and that could also have offered RAM expansion too.
That would have been my less preferred way, but likely could have preserved more RAM if no new one was added.

Re: Psion ROM cartridges

Posted: Mon Aug 05, 2024 1:58 pm
by Wicksy
Thankyou to everyone who replied, it seems then the expansion bus is the answer.

Re: Psion ROM cartridges

Posted: Mon Aug 05, 2024 10:17 pm
by Derek_Stewart
Wicksy wrote: Mon Aug 05, 2024 1:58 pm
On the clones, the Q68 with 96k is only going to fit one package. I don't know what the pc emulators can do, other than Qemulator which is too small for the task.

How would you produce a ROM image from one of the Psion 4, as it's not the same as getting your system rom is it?
I do not understand this part, can you explain what you going to with thd Q68?