Is there a way to access DHR on the Apple 2 from Applesoft Basic












3















When using Applesoft Basic on the Apple 2 with an 80 column card, is there a way to create DHR graphics using only POKE?



I have found a number of solutions using third party extensions such as Beagle Graphics, but I really want to implement it myself. I've searched my Nibble magazine collection, and basic books, but have been unable to find any detailed information.



Wikipedia:




Double High-Resolution The composition
of the Double Hi-Res screen is very
complicated. In addition to the 64:1
interleaving, the pixels in the
individual rows are stored in an
unusual way: each pixel was half its
usual width and each byte of pixels
alternated between the first and
second bank of 64KB memory. Where
three consecutive on pixels were
white, six were now required in double
high-resolution. Effectively, all
pixel patterns used to make color in
Lo-Res graphics blocks could be
reproduced in Double Hi-Res graphics.
The ProDOS implementation of its RAM
disk made access to the Double Hi-Res
screen easier by making the first 8 KB
file saved to /RAM store its data at
0x012000 to 0x013fff by design. Also,
a second page was possible, and a
second file (or a larger first file)
would store its data at 0x014000 to
0x015fff. However, access via the
ProDOS file system was slow and not
well suited to page-flipping animation
in Double Hi-Res, beyond the memory
requirements.




Wikipedia says that DHR uses 64:1 interlacing, but gives no reference to the implementation. Additionally Wikipedia says you can use the /RAM disk to access, but again gives no reference to the implementation.



I am working an small program that plots a simple version of Connet's Circle Pattern. Speed isn't really as important as resolution.










share|improve this question





























    3















    When using Applesoft Basic on the Apple 2 with an 80 column card, is there a way to create DHR graphics using only POKE?



    I have found a number of solutions using third party extensions such as Beagle Graphics, but I really want to implement it myself. I've searched my Nibble magazine collection, and basic books, but have been unable to find any detailed information.



    Wikipedia:




    Double High-Resolution The composition
    of the Double Hi-Res screen is very
    complicated. In addition to the 64:1
    interleaving, the pixels in the
    individual rows are stored in an
    unusual way: each pixel was half its
    usual width and each byte of pixels
    alternated between the first and
    second bank of 64KB memory. Where
    three consecutive on pixels were
    white, six were now required in double
    high-resolution. Effectively, all
    pixel patterns used to make color in
    Lo-Res graphics blocks could be
    reproduced in Double Hi-Res graphics.
    The ProDOS implementation of its RAM
    disk made access to the Double Hi-Res
    screen easier by making the first 8 KB
    file saved to /RAM store its data at
    0x012000 to 0x013fff by design. Also,
    a second page was possible, and a
    second file (or a larger first file)
    would store its data at 0x014000 to
    0x015fff. However, access via the
    ProDOS file system was slow and not
    well suited to page-flipping animation
    in Double Hi-Res, beyond the memory
    requirements.




    Wikipedia says that DHR uses 64:1 interlacing, but gives no reference to the implementation. Additionally Wikipedia says you can use the /RAM disk to access, but again gives no reference to the implementation.



    I am working an small program that plots a simple version of Connet's Circle Pattern. Speed isn't really as important as resolution.










    share|improve this question



























      3












      3








      3


      1






      When using Applesoft Basic on the Apple 2 with an 80 column card, is there a way to create DHR graphics using only POKE?



      I have found a number of solutions using third party extensions such as Beagle Graphics, but I really want to implement it myself. I've searched my Nibble magazine collection, and basic books, but have been unable to find any detailed information.



      Wikipedia:




      Double High-Resolution The composition
      of the Double Hi-Res screen is very
      complicated. In addition to the 64:1
      interleaving, the pixels in the
      individual rows are stored in an
      unusual way: each pixel was half its
      usual width and each byte of pixels
      alternated between the first and
      second bank of 64KB memory. Where
      three consecutive on pixels were
      white, six were now required in double
      high-resolution. Effectively, all
      pixel patterns used to make color in
      Lo-Res graphics blocks could be
      reproduced in Double Hi-Res graphics.
      The ProDOS implementation of its RAM
      disk made access to the Double Hi-Res
      screen easier by making the first 8 KB
      file saved to /RAM store its data at
      0x012000 to 0x013fff by design. Also,
      a second page was possible, and a
      second file (or a larger first file)
      would store its data at 0x014000 to
      0x015fff. However, access via the
      ProDOS file system was slow and not
      well suited to page-flipping animation
      in Double Hi-Res, beyond the memory
      requirements.




      Wikipedia says that DHR uses 64:1 interlacing, but gives no reference to the implementation. Additionally Wikipedia says you can use the /RAM disk to access, but again gives no reference to the implementation.



      I am working an small program that plots a simple version of Connet's Circle Pattern. Speed isn't really as important as resolution.










      share|improve this question
















      When using Applesoft Basic on the Apple 2 with an 80 column card, is there a way to create DHR graphics using only POKE?



      I have found a number of solutions using third party extensions such as Beagle Graphics, but I really want to implement it myself. I've searched my Nibble magazine collection, and basic books, but have been unable to find any detailed information.



      Wikipedia:




      Double High-Resolution The composition
      of the Double Hi-Res screen is very
      complicated. In addition to the 64:1
      interleaving, the pixels in the
      individual rows are stored in an
      unusual way: each pixel was half its
      usual width and each byte of pixels
      alternated between the first and
      second bank of 64KB memory. Where
      three consecutive on pixels were
      white, six were now required in double
      high-resolution. Effectively, all
      pixel patterns used to make color in
      Lo-Res graphics blocks could be
      reproduced in Double Hi-Res graphics.
      The ProDOS implementation of its RAM
      disk made access to the Double Hi-Res
      screen easier by making the first 8 KB
      file saved to /RAM store its data at
      0x012000 to 0x013fff by design. Also,
      a second page was possible, and a
      second file (or a larger first file)
      would store its data at 0x014000 to
      0x015fff. However, access via the
      ProDOS file system was slow and not
      well suited to page-flipping animation
      in Double Hi-Res, beyond the memory
      requirements.




      Wikipedia says that DHR uses 64:1 interlacing, but gives no reference to the implementation. Additionally Wikipedia says you can use the /RAM disk to access, but again gives no reference to the implementation.



      I am working an small program that plots a simple version of Connet's Circle Pattern. Speed isn't really as important as resolution.







      graphics basic retro-computing






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 23 '18 at 20:16









      Polluks

      11019




      11019










      asked Aug 2 '10 at 17:06









      Wayne ArthurtonWayne Arthurton

      488422




      488422
























          1 Answer
          1






          active

          oldest

          votes


















          3














          A member of the comp.sys.apple2.programmer answered my question at: http://groups.google.com/group/comp.sys.apple2.programmer/browse_thread/thread/b0e8ec8911b8723b/78cd953bca521d8f



          Basically you map in the Auxiliary memory from the 80 column card. Then plot on the HR screen and poke to the DHR memory location for the pixel you are trying to light/darken.



          The best full example routine is:



            5 HGR : POKE 49237,0 : CALL 62450 : REM clear hires then hires.aux 
          6 POKE 49246,0 : PG = 49236
          7 SVN = 7 : HCOLOR= SVN : P5 = .5
          9 GOTO 100
          10 X2 = X * 4 : CL = CO : TMP = 8 : FOR I = 3 TO 0 STEP -1 : BIT = CL >= TMP:
          CL = CL - BIT * TMP : TMP = TMP * P5
          20 X1 = X + I: HCOLOR= SVN * BIT
          30 XX = INT (X1 / SVN): H = XX * P5: POKE PG + (H= INT (H)),0
          40 XX = INT (( INT (H) + (( X1 / SVN) - XX)) * SVN + P5)
          50 HPLOT XX,Y: POKE PG, 0: NEXT : RETURN
          100 FOR CO = 0 TO 15 : C8 = CO * 8
          110 FOR X = C8 TO C8 + SVN: FOR Y = 0 TO 10 : GOSUB 10 : NEXT : NEXT
          120 NEXT
          130 REM color is 0 to 15
          140 REM X coordinate is from 0 to 139
          150 REM Y coordinate is from 0 to 191





          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f3390066%2fis-there-a-way-to-access-dhr-on-the-apple-2-from-applesoft-basic%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            A member of the comp.sys.apple2.programmer answered my question at: http://groups.google.com/group/comp.sys.apple2.programmer/browse_thread/thread/b0e8ec8911b8723b/78cd953bca521d8f



            Basically you map in the Auxiliary memory from the 80 column card. Then plot on the HR screen and poke to the DHR memory location for the pixel you are trying to light/darken.



            The best full example routine is:



              5 HGR : POKE 49237,0 : CALL 62450 : REM clear hires then hires.aux 
            6 POKE 49246,0 : PG = 49236
            7 SVN = 7 : HCOLOR= SVN : P5 = .5
            9 GOTO 100
            10 X2 = X * 4 : CL = CO : TMP = 8 : FOR I = 3 TO 0 STEP -1 : BIT = CL >= TMP:
            CL = CL - BIT * TMP : TMP = TMP * P5
            20 X1 = X + I: HCOLOR= SVN * BIT
            30 XX = INT (X1 / SVN): H = XX * P5: POKE PG + (H= INT (H)),0
            40 XX = INT (( INT (H) + (( X1 / SVN) - XX)) * SVN + P5)
            50 HPLOT XX,Y: POKE PG, 0: NEXT : RETURN
            100 FOR CO = 0 TO 15 : C8 = CO * 8
            110 FOR X = C8 TO C8 + SVN: FOR Y = 0 TO 10 : GOSUB 10 : NEXT : NEXT
            120 NEXT
            130 REM color is 0 to 15
            140 REM X coordinate is from 0 to 139
            150 REM Y coordinate is from 0 to 191





            share|improve this answer




























              3














              A member of the comp.sys.apple2.programmer answered my question at: http://groups.google.com/group/comp.sys.apple2.programmer/browse_thread/thread/b0e8ec8911b8723b/78cd953bca521d8f



              Basically you map in the Auxiliary memory from the 80 column card. Then plot on the HR screen and poke to the DHR memory location for the pixel you are trying to light/darken.



              The best full example routine is:



                5 HGR : POKE 49237,0 : CALL 62450 : REM clear hires then hires.aux 
              6 POKE 49246,0 : PG = 49236
              7 SVN = 7 : HCOLOR= SVN : P5 = .5
              9 GOTO 100
              10 X2 = X * 4 : CL = CO : TMP = 8 : FOR I = 3 TO 0 STEP -1 : BIT = CL >= TMP:
              CL = CL - BIT * TMP : TMP = TMP * P5
              20 X1 = X + I: HCOLOR= SVN * BIT
              30 XX = INT (X1 / SVN): H = XX * P5: POKE PG + (H= INT (H)),0
              40 XX = INT (( INT (H) + (( X1 / SVN) - XX)) * SVN + P5)
              50 HPLOT XX,Y: POKE PG, 0: NEXT : RETURN
              100 FOR CO = 0 TO 15 : C8 = CO * 8
              110 FOR X = C8 TO C8 + SVN: FOR Y = 0 TO 10 : GOSUB 10 : NEXT : NEXT
              120 NEXT
              130 REM color is 0 to 15
              140 REM X coordinate is from 0 to 139
              150 REM Y coordinate is from 0 to 191





              share|improve this answer


























                3












                3








                3







                A member of the comp.sys.apple2.programmer answered my question at: http://groups.google.com/group/comp.sys.apple2.programmer/browse_thread/thread/b0e8ec8911b8723b/78cd953bca521d8f



                Basically you map in the Auxiliary memory from the 80 column card. Then plot on the HR screen and poke to the DHR memory location for the pixel you are trying to light/darken.



                The best full example routine is:



                  5 HGR : POKE 49237,0 : CALL 62450 : REM clear hires then hires.aux 
                6 POKE 49246,0 : PG = 49236
                7 SVN = 7 : HCOLOR= SVN : P5 = .5
                9 GOTO 100
                10 X2 = X * 4 : CL = CO : TMP = 8 : FOR I = 3 TO 0 STEP -1 : BIT = CL >= TMP:
                CL = CL - BIT * TMP : TMP = TMP * P5
                20 X1 = X + I: HCOLOR= SVN * BIT
                30 XX = INT (X1 / SVN): H = XX * P5: POKE PG + (H= INT (H)),0
                40 XX = INT (( INT (H) + (( X1 / SVN) - XX)) * SVN + P5)
                50 HPLOT XX,Y: POKE PG, 0: NEXT : RETURN
                100 FOR CO = 0 TO 15 : C8 = CO * 8
                110 FOR X = C8 TO C8 + SVN: FOR Y = 0 TO 10 : GOSUB 10 : NEXT : NEXT
                120 NEXT
                130 REM color is 0 to 15
                140 REM X coordinate is from 0 to 139
                150 REM Y coordinate is from 0 to 191





                share|improve this answer













                A member of the comp.sys.apple2.programmer answered my question at: http://groups.google.com/group/comp.sys.apple2.programmer/browse_thread/thread/b0e8ec8911b8723b/78cd953bca521d8f



                Basically you map in the Auxiliary memory from the 80 column card. Then plot on the HR screen and poke to the DHR memory location for the pixel you are trying to light/darken.



                The best full example routine is:



                  5 HGR : POKE 49237,0 : CALL 62450 : REM clear hires then hires.aux 
                6 POKE 49246,0 : PG = 49236
                7 SVN = 7 : HCOLOR= SVN : P5 = .5
                9 GOTO 100
                10 X2 = X * 4 : CL = CO : TMP = 8 : FOR I = 3 TO 0 STEP -1 : BIT = CL >= TMP:
                CL = CL - BIT * TMP : TMP = TMP * P5
                20 X1 = X + I: HCOLOR= SVN * BIT
                30 XX = INT (X1 / SVN): H = XX * P5: POKE PG + (H= INT (H)),0
                40 XX = INT (( INT (H) + (( X1 / SVN) - XX)) * SVN + P5)
                50 HPLOT XX,Y: POKE PG, 0: NEXT : RETURN
                100 FOR CO = 0 TO 15 : C8 = CO * 8
                110 FOR X = C8 TO C8 + SVN: FOR Y = 0 TO 10 : GOSUB 10 : NEXT : NEXT
                120 NEXT
                130 REM color is 0 to 15
                140 REM X coordinate is from 0 to 139
                150 REM Y coordinate is from 0 to 191






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 24 '10 at 19:41









                Wayne ArthurtonWayne Arthurton

                488422




                488422
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f3390066%2fis-there-a-way-to-access-dhr-on-the-apple-2-from-applesoft-basic%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Wiesbaden

                    Marschland

                    Dieringhausen