From: David Wood (jbevren_at_starbase.globalpc.net)
Date: 2003-02-14 17:31:00
Sorry for replying to the middle of the thread, this reminds me of the TEST bit on the vicIIe. You can detect a vicIIe by reading the raster, setting the test bit for a few cycles, and checking the raster again. Anyone unfamiliar with this may want to check the 60hz trick regarding this bit. It seems while the test bit is set, the vicIIe advances one raster per 1mhz cycle(!). ;) -David On Fri, 14 Feb 2003, Marko [iso-8859-1] Mäkelä wrote: > On Thu, Feb 13, 2003 at 11:52:29PM +0100, Ullrich von Bassewitz wrote: > > I'm currently wondering if there is a really easy and reliable way for a C64 > > program to detect if it is running on a C128 in C64 mode. > > The $d030 register (2 MHz mode selection and test mode selection) has > already been suggested, and the fact that $d500-$d5ff is normally unconnected > on the C128 but mirrored to $d400-$d4ff on the C64. The VDC is at $d600, > and the MMU (invisible in C64 mode) is at $d700. If you'd like to rely on > the mirrored locations, I'd vote for $d700 (which is mirrored to $d400 > on the C64), since someone could have mapped custom hardware at $d500. > > Another thing you could try is the high bit of the on-chip I/O register, > which is connected to the CAPS LOCK key. You could flip the data > direction register bit at $00 to output and then input, and see if its > state is remembered. But beware, it may take some time until the data > written to the bit goes away, depending on the chip temperature. Or > was it only the $01 register that behaves in this way? > > You could also try switching the processor to 2 MHz mode and reading > $d012 or the CIA timer low byte ($dc04?) to see if it really is in 2 MHz > mode. I wouldn't use the test bit, since it corrupts the video signal. > > Marko > > Message was sent through the cbm-hackers mailing list > Message was sent through the cbm-hackers mailing list
Archive generated by hypermail 2.1.6.