Heureka!

Juergen Buchmueller pullmoll at t-online.de
Wed Jun 27 15:10:24 PDT 2007


Take a look: http://pullmoll.stop1984.com/alto/alto_swat.png

On Wed, 27 Jun 2007 23:14:04 +0200
Juergen Buchmueller <pullmoll at t-online.de> wrote:

This is wrong:

> 	switch (f1) {
> 	case f1_l_lsh_1: /* <-L LSH 1 */
> 		cy = l >> 15;
> 		shifter |= cy;
> 		break;
> 	case f1_l_rsh_1: /* <-L MRSH 1 */
> 		cy = l & 1;
> 		shifter |= cy << 15;
> 		break;
> 	}

And here's the correct handling. DNS actually stores the inverted,
precomputed carry in the shifter MSB or LSB, and then takes the LSB or MSB
of L for the NEWCARRY. Quite confusing, isn't it?

	switch (f1) {
	case f1_l_lsh_1: /* <-L LSH 1 */
		shifter |= (cy ^ 1);
		cy = l >> 15;
		break;
	case f1_l_rsh_1: /* <-L RSH 1 */
		shifter |= (cy ^ 1) << 15;
		cy = l & 1;
		break;
	}


And this isn't entirely correct:

> Now DNS continues to test IR[12], the no-load bit, and if it is zero sets
> emu_cy = cy and also writes the R register from the shifter.

If IR[12] is 1, DNS _toggles_ the emulator carry. This is because the CARRY
in the schematics is actually the Q' output of the latch.


Now I'm curious to see what SWAT thinks about my AltoII keyboard ;-)


More information about the Altogether-devel mailing list