Path: news.uiowa.edu!chi-news.cic.net!feeder.chicago.cic.net!arclight.uoregon.edu!news.uoregon.edu!cie-2.uoregon.edu!nparker From: nparker@cie-2.uoregon.edu (Neil Parker) Newsgroups: comp.sys.apple2.programmer Subject: Re: Enhanced IIe question Date: 12 Mar 1997 07:42:46 GMT Organization: University of Oregon Campus Information Exchange Lines: 58 Message-ID: <5g5mpm$ncu@pith.uoregon.edu> References: <3324DA31.4407@hutchnet.hk> NNTP-Posting-Host: cie-2.uoregon.edu NNTP-Posting-User: nparker In article <3324DA31.4407@hutchnet.hk> ivanc@hutchnet.hk writes: >Is there a way to check whether my apple IIe is enhanced or not through >programming code? Yes. You need look at the ID bytes in the ROM. PEEK(64448) returns 234 on an unenhanced IIe, and 224 on an enhanced IIe. This is actually part of a longer test, which goes something like this: If PEEK(64435) = 56, then you're on an original Apple II. If PEEK(64435) = 234, then you're on an Apple II+ (or III in emulation mode). If PEEK(64435) = 6, then you're on a IIe, IIc, or IIGS. In this case... If PEEK(64448) = 234, then you're on an unenhanced IIe. If PEEK(64448) = 224, then you're on an enhanced IIe or IIGS. If PEEK(64448) = 0, then you're on a IIc. In this case... PEEK(64447) is the IIc version byte. The values 255, 0, 3, and 4 indicate (respectively) the first four IIC versions. The value 5 indicates a IIc+. Distinguishing between an enhanced IIe and a IIGS requires machine language: SEC JSR $FE1F BCC IIGS NOTGS ... Note that the IIe enhancement kit consists of three parts--the enhanced ROM, the 65C02 processor, and the Mousetext character generator. These parts are usually installed together, but some people don't upgrade all three chips (usually because they use one of the handful of older programs that's illegible on a Mousetext-equipped machine). So it may be useful to test for the enhancement components separately. The above test tells you whether or not you're using an enhanced ROM. Distinguishing between the (unenhanced) 6502 and the (enhanced) 65C02 is possible with a little machine language: LDA #$99 CLC SED ADC #1 CLD BEQ ENHANCED This works by checking for a hardware bug in the original 6502...when adding in decimal mode, it sets the zero flag before it decimal-adjusts the result. As far as I know, there's no way to for a program to test whether or not the Mousetext character generator is installed. - Neil Parker -- Neil Parker, nparker@{cie-2,cie}.uoregon.edu, http://cie-2.uoregon.edu/~nparker "I was going to be a neo-deconstructivist but Mom wouldn't let me." -- Calvin and Hobbes, 7/13/1995 Unsolicited commercial e-mail to my address will be discarded unread.