Clay wrote:
>Hmmmm. One thing I didn't try-- complement the data word. Better
>give that a shot... ;-)
You know, as soon as I wrote that I knew that was the fix... Tried it at
home over lunch and it works. This is a the snippet from main.c in Al's
source with my changes (and addition of warp and photon support):
-------
case STARTREK:
case TACSCAN:
case ZEKTOR:
if(outRegF8 & 1){ // if we're reading the switches (0xff)
c = 0;
if(start1) c |= 0x01;
if(start2) c |= 0x02;
if(fire) c |= 0x04; // CNC 10-14-97
if(thrust) c |= 0x08; // CNC 10-14-97
if(warp) c |= 0x20; // CNC 10-14-97
if(photon) c |= 0x10; // CNC 10-14-97
return(c);
}
else {
// if we're reading the spinner (0xfe)
if(left) { spinner+=10; dir = 0; } // CNC 10-23-97
if(right){ spinner+=10; dir = 1; } // CNC 10-23-97
return((~spinner << 1) | dir); // CNC 10-23-97
}
-----
I'm adding 10 to the spinner count just because it seems like a good
"playable" value for Star Trek and Tac/Scan, dunno about Zektor. I'd
suspect it's alright.
I don't have a great explanation why that works. The only thing I can
think of is that there's an inverting buffer somewhere that's changing the
output from the 74LS393 on the single player control interface. My
schematic says it's using a 74ls244, but maybe they're populated with
74ls240's?
Anyway, this works.
-Clay
Clayton N. Cowgill Engineering Manager
_______________________________________________________________________
/\ Diamond Multimedia Systems, Inc. clay@supra.com
\/ Communications Division http://www.supra.com/
Received on Thu Oct 23 14:22:24 1997
This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:32:38 EDT