Page 233 of 284

Re: General Stuff(tm)

Posted: 28 Apr 2025 17:00
by stephen_usher
rubber_jonnie wrote: 28 Apr 2025 15:21 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

Re: General Stuff(tm)

Posted: 28 Apr 2025 17:35
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.

Re: General Stuff(tm)

Posted: 28 Apr 2025 23:42
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.

Re: General Stuff(tm)

Posted: 29 Apr 2025 09:10
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.

Re: General Stuff(tm)

Posted: 29 Apr 2025 09:28
by Icky
stephen_usher wrote: 29 Apr 2025 09:10 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.

Re: General Stuff(tm)

Posted: 29 Apr 2025 11:57
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.

Re: General Stuff(tm)

Posted: 29 Apr 2025 18:41
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

Re: General Stuff(tm)

Posted: 29 Apr 2025 20:12
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.

Re: General Stuff(tm)

Posted: 01 May 2025 12:56
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

Re: General Stuff(tm)

Posted: 06 May 2025 20:08
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_4359.jpeg
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

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

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_4368.jpeg

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.)