Double Hires Subroutines Written by Allen Watson III From an Article in "Apple Orchard" magazine January 1984. Assembled by Rick Fincher using the ORCA/M assembler by Hayden Software. NOTE: These routines are for the Apple //e with 128K, Apple //c, Laser 128 or other Apple //e compatibles with 128K. Your extended 80 col card must have the jumper installed that connects pin 50 and 55 of the Auxiliary Slot of the Apple IIe. The Apple Extended 80 col card comes with the jumper connected, I have a Titan Technologies Neptune board that has the jumper pins but the jumper is not installed. All you have to do is wrap a piece of wire around the two posts so that there is a good connection. Also Titan technologies will send you the jumper (a small clip that fits over the two pins) free of charge if you have one of their cards. Before you buy an extended memory card be sure that there is a jumper on it. ANOTHER NOTE: Your Apple IIe must have a revision B motherboard to use the double hires graphics. To see if yours does, open it up and look for the part number of the mother board along the back edge- it should be 820-0064-B. If your number ends in "A" you have a revision A board that you can have replaced free of charge by your Apple dealer. All you have to do is state that you have a need for the new board, which of course you do if you want to do double Hires graphics! It seems that the IIe had already entered production before Apple discovered that Double Hires was possible, so some of the earlier IIe machines have the old board. The jumper connects the annunciator to a circuit that forces the machine out of the interleaving mode so that regular hires graphics are possible with the 80 col card turned on. There weren't any soft switches left for this so Apple used the anunciator to do this via the jumper on the extra memory card. WARNING: DON'T USE AN EXTENDED 80 COL CARD WITH THE JUMPER INSTALLED ON A REVISION A BOARD, YOUR COMPUTER WON'T WORK IF YOU DO. LOCATION: These routines were assembled at $6000 (Hex) and don't work when moved unless they are re-assembled at a new location. A listing of the assembler file was uploaded to make this possible (see Machine Language below). You can set LOMEM to 25660 to move your program variables above the routines to give you a little more room. HOW TO USE: To use the subroutines save the file on this board in the General download section called DHIRES.BIN2 as a binary file and then use the FROM.BINARY or BLU to unpack it. It will create a file called DHIRES.SUBS on your disk. BRUN this file from Basic to prepare to use the double hires commands, or, if you are using the routines from a Basic program, have your program BRUN this file. Two Basic programs that use these routines and this doc file will also be created. Now we are ready to go. TO USE THE ROUTINES FROM THE KEYBOARD OR APPLESOFT: Use the following ampersand(&) commands. 1. &DG This initializes the double hires display. 2. &PEN This sets the line width to 1 for either black or white drawing with 560 dot horizontal resolution. If you try to draw in color in this mode you get bizarre effects. 3. &BRUSH This sets the the line width to 4 for 16 color drawing. 4. &HUE = c This set the drawing color where c is a number from 0 to 15 representing the 16 LoRes colors. A number of 128 or greater sets reverse drawing. 5. &BKGND This sets the entire background to whatever color has been selected by the &HUE= command. 6. &DOT AT x,y This draws a dot of the current color and line width at the x,y position where x is between 0 and 559 and y is between 0 and 191. 7. &LINE TO x,y This draws a line from either the last dot plotted or the end of the last line drawn to the x,y position where x and y are within the limits mentioned above. RESOLUTION: Colored lines are actually four dots wide so their resolution is no greater than in the regular hires mode, but you have 16 colors to choose from and no interference effects from mixing colors. The &PEN command lets you draw with true 560x192 resolution in black or white. To get the best effects you can draw outlines in black or white and then fill an area with color (See the demo programs). UNDESIRABLE EFFECTS: Colored dots and lines can be drawn at any coordinate in the 560x192 range but if you draw a colored dot past an x coordinate of 556 (Four dots from the right of the screen) it will overlap to the extreme left of the screen on the same scan line. This is because colored dots are actually 4 dots wide and drawing past 556 does not give enough room for the four dots to be drawn without wraping around to the other side of the screen. This does not occur when using & PEN and a color of 0 or 15 (Black or white). ERRORS: Attempts to draw outside the 560x192 range, i.e. x between 0 and 559 and y between 0 and 191, will cause a syntax error and a beep, just like with regular hires. So will a misspelling of the Ampersand commands, although they are pretty tolerant of spaces between words of mult-word commands. PROGRAMS USING DOUBLE HIRES: I have also uploaded two demo programs that were also in Apple Orchard. One is called DHIRES.CUBE and the other DHIRES.COLORS. The first is a stack of 3-D cubes drawn in all of the 16 colors. The second is is a color wheel that shows all 16 colors in swatches in order with the dark colors in the outer ring, the medium colors in the middle ring (these are the regular hires colors) and the light colors in the center ring. MACHINE LANGUAGE: If you wish to use these routines from assembly language either see a copy of the magazine article or contact me on the NCSU Apple Users Group BBS (919-783-9010) and I will be happy to send you a list of the entry points for each function. I have also uploaded a copy of the assembler text listing. The original magazine listing used the Apple EDASM but I have ORCA/M so I made the necessary changes. The ORCA/M listing is what is on the board, but I'll send you a copy of the EDASM listing if you want it or will help you convert it if I can.