No announcement yet.

Wanted: Hercules Graphics Library

  • Filter
  • Time
  • Show
Clear All
new posts

  • Wanted: Hercules Graphics Library

    Since PB 3.5 does no longer support Hercules adapters, are the corresponding
    libraries available separately? I know these systems are obsolete now, but I
    happen to have an older PC with a Hercules adapter which is still in use
    (mainly to test programs for compatibility with older systems). I found that
    in PB 3.5 not even page switching in Text mode is supported (SCREEN 0,,7,0
    caused an "Illegal Function call" on the Hercules system).
    As this is not intended for programs for distribution, I am not interested in
    buying an additional product, but perhaps there is a way to make the libraries
    available which provided Hercules support for former versions of PowerBasic?

    Hans Ruegg

  • #2
    I don't know if any libraries are still available for the
    Hercules adaptor. If you can't find any, you may want to try
    the various functions of interrupt &h10 to switch to different
    video modes.

    There are no atheists in a fox hole or the morning of a math test.
    If my flag offends you, I'll help you pack.


    • #3

      There is a 3rd party product called PB 3 Toolkit that has support for the Hercules adapter. You can find more info on it at:

      Or, as Mel already suggested you may want to check out the video interrupt and "roll your own" routines.

      Tony Jones
      PowerBASIC Staff


      • #4
        Thank you for the hints... although I am not sure if I want to buy
        an entire toolkit just for testing programs on my Hercules. Probably
        I will have to program the basic routines by myself. But I found that
        Hercules stores graphics in a rather strange way in memory: the first
        line of pixels is at the beginning of the video segment, the second at
        offset &H2000, the third at offset &H4000, the fourth at &H600, and
        the fifth line is back at offset 90. So programming this could be a
        little awkward.
        (Sorry for bothering you with details about this old system...!)

        Hans Ruegg



        • #5
          You are not "bothering" anybody with details. It's the details
          are are always the resolution to any problem.

          Depending on what app you are writing, I don't see where
          Hercules stores its graphics matters. The program and/or O/S
          should automatically adapt and display your graphics accurately.

          Wouldn't hurt a thing in the world to write a small test program
          using interrupt 10h and see what shakes loose.


          There are no atheists in a fox hole or the morning of a math test.
          If my flag offends you, I'll help you pack.


          • #6
            OK, so I will go on with some more details The only
            Interrupt 10h functions I could use with the Hercules are 0Ch
            (Write one graphics pixel) and 0Dh (Read one graphics pixel).
            Programming graphics drawing them pixel by pixel using these
            functions would be very slow. - I found some advanced functions
            related to a TSR called "Hercules GRAFIX" (including drawing
            rectangles, circles, etc), but I do not have any idea where to
            get that program. Unless I find it, I would still have to write
            the images directly into memory for reasonable speed. (The system
            in mention works with a 80286 processor at 13 MHz.)

            Hans Ruegg.


            • #7
              The Hercules goes well back into the early days of IBM-type PCs.
              For technical and political reasons, it does not include BIOS
              support. As it emulates an MDA monochrome display adapter, you
              can use its MDA-style text handling through normal methods. If
              you want access to anything fancier, it's up to you to program
              the hardware directly, or obtain the appropriate routines from
              someone who has already done this work.

              It should be possible to find documentation and examples of the
              required techniques with a little searching of the Web. Be aware
              that you will need to use at least a little assembly language if
              you plan to write your own Hercules routines.

              The only libraries I know of that support Hercules graphics are
              commercial products. I believe Information Management Systems has
              several such products ( ). If you're aiming at fancy
              graphics, I'd see if Fastgraph will do the job ( ).

              Tom Hanlin
              PowerBASIC Staff