Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!news2.ais.net!jamie!ais.net!logbridge.uoregon.edu!news.uoregon.edu!!nparker From: nparker@inferno.uoregon.edu (Neil Parker) Newsgroups: comp.sys.apple2 Subject: Re: How to load DHR graphics from BASIC? Date: 19 Jul 1998 08:55:09 GMT Organization: Chaos Lines: 47 Message-ID: <6osc9d$7fn$1@pith.uoregon.edu> References: <1998071903190900.XAA21642@ladder01.news.aol.com> NNTP-Posting-Host: ssil.uoregon.edu X-Trace: pith.uoregon.edu 900838509 7671 nparker 128.223.108.115 X-Complaints-To: usenet@news.uoregon.edu Originator: nparker@ Xref: news1.icaen comp.sys.apple2:136974 In article <1998071903190900.XAA21642@ladder01.news.aol.com>, Supertimer wrote: >How do you do it? Examples please... Thanks! Something like this: 5 REM This requires a 128K machine! It will CRASH an original II or II+! 10 D$ = CHR$ (4) 20 POKE 768,56: POKE 769,76: POKE 770,17: POKE 771,195: REM SEC; JMP $C311 30 PRINT D$"PR#3": PRINT CHR$ (12): REM DHR requires 80 cols 40 PRINT D$"BLOAD PIC,T8,A8192,L8192": REM Load aux bank half 50 POKE 60,0: POKE 61,32: POKE 62,255: POKE 63,63: POKE 66,0: POKE 67,32: REM Set up for auxmove 60 CALL 768: REM Move data to aux bank 70 PRINT D$"BLOAD PIC,T8,A8192,L8192,B8192": REM Load main bank half 80 POKE 49246,0: POKE 49239,0: POKE 49234,0: POKE 49232,0: REM Show it! This loads a standard Apple II DHR picture (see File Type Notes for file type 8) under ProDOS. In this file format, the aux bank half of the picture comes first, followed by the main bank half. Other formats may put the main bank half first (e.g. Dazzle Draw), or may keep the two halves in separate files (e.g. Beagle Graphics). In any case, the technique is the same: load aux bank half, move it to the aux bank, load main bank half. It may occur to you to simplify this process a little by enabling the DHR screen first, switching in the aux bank with POKE 49237,0, and BLOADing directly into the aux bank. This is *not* recommended, because when the aux bank is switched in, the "screen holes" are switched out. Several very important pieces of information are kept in the "screen holes," including DOS 3.3's record of what track it most recently read from the disk, and information vital to the proper functioning of interrupts (this is especially dangerous on a IIc or IIGS--if an interrupt comes through while the "screen holes" are switched out, the system could crash). You can probably get away with it under ProDOS (which doesn't keep the track number in the "screen holes") if no interrupts are active, but it's definitely riding the ragged edge. - Neil Parker P.S. The above BASIC stuff was composed here in my UNIX editor, and has not actually been tried out on an Apple II. Use with appropriate caution. -- Neil Parker, nparker@inferno.uoregon.edu, nparker@axis.llx.com, http://axis.llx.com/~nparker/ (Note new addresses and home page!) Unsolicited commerical e-mail is not welcome, and will be discarded unread.