General Stuff(tm)

Blogs & guides and tales of woo by forum members.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7454
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: General Stuff(tm)

Post by stephen_usher »

rubber_jonnie wrote: Mon Apr 28, 2025 3:21 pm Good luck!!!

Not a very good response form the QL forum it seems :(
Indeed, though one person is trying to be helpful but in a "this is my assembler code" sort of way. *sigh*

I'm *GUESSING* that this is how you write and read bits to/from the IPC, but it's purely a guess:

Code: Select all


;***
;
; ipc_write_bit - Write a bit to the IPC with timeout.
;
; d0.b	-	Bit to be written in bit 0.
; d1.w	-	Timeout in number of retries reading the status bit.
;		(Must be given)
;
; Returned values.
;
; d1.w	-	Zero if timeout error otherwise undefined.
;
;***

ipc_write_bit:
	movem.l	d2-d7/a0-a6,-(SP)

	lea	zx83_w_ipcwreg,a0	; Load the ZX8302 registers into a0 and a1
	lea	zx83_r_cstatus,a1

	rol.b	#1,d0			; Move the data bit to be bit 1
	or.b	#%00001100,d0		; Or it with the rest of the required register content.

	move.b	d0,(a0)			; Write it to the IPC Write register.

ipc_write_bit_loop1:			; Loop around checking the status bit (6)
	move.b	(a1),d3
	btst	#6,d3
	dbeq	d1,ipc_write_bit_loop1	; If it's not set then go around d1.w + 1 times.

	addi.w	#1,d1			; Add 1 to d1. If the loop has completed then this will be -1
					; We need it to be 0 as an error condition.

	movem.l	(SP)+,d2-d7/a0-a6
	rts

;***
;
; ipc_read_bit	- Read a bit from the IPC with timeout.
;
; Parameters
;
; d1.w	-	Timeout in number of retries reading the status register.
;		(Must be given)
; Returns
;
; d0.b	-	Bit returned in bit 0 of the byte.
; d1.w	-	Timed out if 0 otherwise undefined.
;
;***

ipc_read_bit:
	movem.l	d2-d7/a0-a6,-(SP)

	lea	zx83_r_cstatus,a0	; Load the address of the communication status register into a0

ipc_read_bit_loop1:
	move.b	(a0),d2			; Get the contents of the communications status register into d2
	btst	#6,d2			; Is the IPC acknowledge bit set?
	dbeq	d1,ipc_read_bit_loop1	; No? If d1 is > -1 go around again.

	addi.w	#1,d1			; If the timeout failed then d1 will be -1, so add 1.

	andi.b	#%1000000,d2		; Mask off all the bits we're not interested in.
	ror.b	#7,d2			; Move it to bit 0
	move.b	d2,d0			; Copy it to d0

	movem.l	(SP)+,d2-d7/a0-a6
	rts
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7454
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: General Stuff(tm)

Post by stephen_usher »

It seems that to write a bit I have to enclose it in a packet, first send 0, then the data bit and then 1.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7454
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: General Stuff(tm)

Post by stephen_usher »

Nope, that's wrong...

I'm now using Qlay3 emulator as that has IPC emulation... though I've already found a bug in that.

I can get one command working (reset) and another partially (selftest). Not tried any others.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7454
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: General Stuff(tm)

Post by stephen_usher »

Well, the plywood for the RetroFest baseboards is arriving today so the diag ROM is on hold until probably after the event.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
Icky
Site Admin
Site Admin
Posts: 4386
Joined: Sun Sep 03, 2017 10:57 am
Location: UK

Re: General Stuff(tm)

Post by Icky »

stephen_usher wrote: Tue Apr 29, 2025 9:10 am Well, the plywood for the RetroFest baseboards is arriving today so the diag ROM is on hold until probably after the event.
Just looked up RetroFest. I wasn't aware of this event and in my old home town too.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7454
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: General Stuff(tm)

Post by stephen_usher »

This is the first one.

The idea is that it could become an equivalent of VCF for the UK, but this is the beginning.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7454
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: General Stuff(tm)

Post by stephen_usher »

Basic parts of the baseboards built and the "scenic" board has its first coat of primer. I should be able to sand it down and get the second coat on this evening.

494914993_10162510549329000_72132408909497682_n.jpg
494914993_10162510549329000_72132408909497682_n.jpg (347.01 KiB) Viewed 336 times
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7454
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: General Stuff(tm)

Post by stephen_usher »

Sanded down and second coat on.

Tomorrow I can get on with the second board and the end/back boards for the "scenic" board.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7454
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: General Stuff(tm)

Post by stephen_usher »

All the major carpentry has now been done.

I'm now awaiting the delivery of small screws (to fix the back boards on) and the adjustable feet.

Once the backboards are on I can then drill out the holes in the side board on the fiddle yard side for the locating pins, bold holes and hole for the wires to go through. I'll then be at the point where I can fit everything together for the first time. I'll still need to test set up the track, station etc. on the scenic board so as to work out where to cut the hole to allow the track and trains to go through.

Other than fitting handles and casters for transport and painting that will be it for the board construction and I can then turn to the actual railway building.

P.S. Current state of play of the scenic board...

IMG_4352.jpeg
IMG_4352.jpeg (65.98 KiB) Viewed 308 times
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7454
Joined: Mon Nov 13, 2017 7:19 pm
Location: Oxford, UK.
Contact:

Re: General Stuff(tm)

Post by stephen_usher »

By the end of Friday I managed to get the baseboards complete, with transport handles and wheels etc. but just one side (which faces away from the audience) unpainted.

IMG_4355.jpeg
IMG_4355.jpeg (73.1 KiB) Viewed 303 times
IMG_4359.jpeg
IMG_4359.jpeg (55.52 KiB) Viewed 303 times
Unfortunately I was away for the weekend so only got back to working on the project this morning after the last component I needed arrived.

The first job was *THE* most critical one. Laying the track which passes over the joint between the two baseboards, securing the sections of the track which straddle the joint and then use a Dremel to cut the rail after everything is securely fitted so the rails can't move.

IMG_4363.jpeg
IMG_4363.jpeg (53.3 KiB) Viewed 303 times

Once that was done I could concentrate on laying the track on the scenic board, gluing it down with Copydex so that after the exhibition it can be easily removed without damaging the track or the board.

All the sections of track had to have "dropper wires" soldered to them which go through holes to the underside of the board.

IMG_4365.jpeg
IMG_4365.jpeg (49.96 KiB) Viewed 303 times

These wires will then be routed to a distribution block, one for each board, and thence to the controller. The polarity is important so the colour code of "black to the back" is used.

This evening I finished the scenic track and put the station and other items on the board to check clearance. One issue with the island platform means that it's going to have to move back away from the foreground track as coaches clip the platform ramp otherwise. Other than that it's OK. I also started roughing out the fiddle yard board.

IMG_4367.jpeg
IMG_4367.jpeg (55.89 KiB) Viewed 303 times
IMG_4368.jpeg
IMG_4368.jpeg (65.14 KiB) Viewed 303 times

The connectors for the board interconnect should arrive tomorrow. Once I've got the fiddle yard track down I can start doing the wiring underneath, flipping the boards over one at a time. (Of course I'm going to have to take the station etc. off first.)
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
Post Reply

Return to “MEMBER BLOGS”