Page 1 of 1

WIP: Vermont Microsystems Image Manager 1024

Posted: Tue 26 Feb, 2019 1:03 am
by JohnElliott
This is very much not ready for prime time - I'm posting what I've written so far just in case I get hit by a meteorite or something.

It's a patch implementing not quite enough of the Vermont Microsystems Image Manager 1024 to run Windows 1.03 in 256-colour mode. It's inclined to hang from time to time (usually when blitting from screen to memory) and since I haven't implemented filled polygons the calculator buttons are all wrong. But here it is anyway.

Image

Re: WIP: Vermont Microsystems Image Manager 1024

Posted: Thu 28 Feb, 2019 9:50 pm
by JohnElliott
OK, I think this is about as good as it gets, at least as far as running Windows 1 in 256 colours is concerned.

Image

What the patch gives you isn't anything like a complete IM1024, or even a complete PGC. But it does seem to cover those features used by IM1024.DRV, which was my aim in writing it.

Implementing all the functions not used by IM1024.DRV is left as an exercise for the interested reader :)

Re: WIP: Vermont Microsystems Image Manager 1024

Posted: Fri 01 Mar, 2019 7:33 pm
by JohnElliott
... Actually, the above patch may not be so final, because some of the graphics in Micrografx In*a*Vision don't render properly. Back to the coding mill for me...

Re: WIP: Vermont Microsystems Image Manager 1024

Posted: Fri 01 Mar, 2019 10:17 pm
by JohnElliott
This version of the patch seems to sort out the issues I was experiencing with In*a*Vision - mainly to do with bugs and overflows in the polygon fill.

Image

Re: WIP: Vermont Microsystems Image Manager 1024

Posted: Sun 03 Mar, 2019 11:49 pm
by JohnElliott
Updated again to fix bits of Write:
  • TDEFIN was losing sync on non-square fonts, because I had 'rows' and 'columns'' round the wrong way
  • TSIZE was not implemented
  • There's a variant of the text draw command that Write uses when drawing page numbers. For now I've aliased it to the normal one, so the text will at least render.

Re: WIP: Vermont Microsystems Image Manager 1024

Posted: Tue 19 Mar, 2019 2:02 am
by JohnElliott
This patch (on top of the previous v4 patch) fixes character rendering when VMILO.FON is used as the system font.

It was a bit awkward to make because it also depends on the changes to the font loader in my PC200 / PPC512 patches. I've replicated enough of those changes in this patch to get the result to compile, but if you're trying to apply both patchsets you'll run into conflicts.

I haven't uploaded the font (im1024font.bin) though my understanding is that it should be out of copyright by now, since it's (c) 1986 and font copyright in the UK lasts 25 years.

Image

ETA: Here's how to generate the font ROM with psftools-1.0.12:

Code: Select all

fon2fnts vmilo.fon
fnt2psf Terminal_12.fnt | psf2raw > im1024font.bin

Re: WIP: Vermont Microsystems Image Manager 1024

Posted: Mon 15 Apr, 2019 7:15 pm
by SarahWalker
Couple of questions about the IM1024 FIFO. Are you sure it's not just writing into the ordinary PGC FIFO at C6000 rather than being a separate thing?

Also I'm guessing that if the drivers aren't checking for FIFO full, then it's entirely possible that the write will just stall the CPU until there is room. It may be more elegant to wait for the pgc_thread to read something rather than increasing the FIFO size every time the CPU gets ahead; that's what the Voodoo code is currently doing.

Re: WIP: Vermont Microsystems Image Manager 1024

Posted: Mon 15 Apr, 2019 9:36 pm
by JohnElliott
It's entirely possible that the processor gets stalled either when the FIFO is written, or when the driver asks how many bytes are in it - though without real hardware or documentation I can't be sure. And if it does stall when the FIFO is full, it may be implemented using the same 256-byte area of memory as a normal PGC. The algorithm used to write is rather different, though, always sending commands to C6000 rather than using the write pointer at [C6300], and checking [C6331] for the FIFO status.

The actual write code in IM1024.DRV is like this:

Code: Select all


;
; SI -> command to write
; CX =  bytes to write
; ES =  C600
;
X40D9:	mov	cs:W3F96,0	;Bytes to write
	call	X4101		;Get number of bytes that can be written
	cmp	ax,cx		;Room for the entire command?
	jnc	X40EE
	xchg	ax,cx		;No, write only what there's space for
	sub	ax,cx		;
	mov	cs:W3F96,ax	;Bytes outstanding
X40EE:	xor	di,di		;Write the command at C600:0000
	rep	movsb
	mov	cx,cs:W3F96	;Any bytes left?
	or	cx,cx
	jnz	X40D9
;
; ...
;
X4101:	push	di
	mov	di, 331h
	mov	al, es:[di]	;Get FIFO status from C600:0331
	not	al
	xor	ah, ah		;AX = free space in FIFO
	pop	di
	retn


Re: WIP: Vermont Microsystems Image Manager 1024

Posted: Tue 23 Apr, 2019 7:45 pm
by SarahWalker
Merged at rev 1223. I also added some sane pixel clocks.