Shop OBEX P1 Docs P2 Docs Learn Events
Announcement - PropGFX Lite Binary Released - Page 7 — Parallax Forums

Announcement - PropGFX Lite Binary Released

123457»

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-08-10 18:07
    Here's my latest refinement to the GUI Slider Control.

    The control may be positioned anywhere on the screen. Multiple controls may also be used.

    Code is attached!

    OBC
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-18 04:23
    I've been doing some experiments with the standard propeller colors as I have noticed that yellows in particular come out very dark on the display.

    There is a demo palette and reds, greens, blues and purple all are fairly correct. However, the brightest yellow is a dark gold color and comparing it with a standard palette, a Luminance of 0.86 is displaying on the screen at a value of about 0.5.

    If we limit the palette to the closest colors to the true propeller palette and then run an image through the Floyd Steinberg transform, then these colors will end up corrected. For instance, if nothing brighter than a dark gold is available, the F-S transform will end up dithering this color with white or a light gray. When displayed on the propeller screen this will have the effect of lightening the color.

    Looking at the pictures, there are two palettes. One of these has values along the top with variable maximum luminance values. These have been tweaked so that that the yellows are darker to more closely match the real palette.

    There is a splash screen and some photos of the two versions. Colors don't come out as bright on a photo compared to a real screen (see the white background), but on the text, the color of the yellow is lighter on one than the other.

    Finally there is a picture of Mario and this looks much closer to the real thing.

    Some vb.net code to create the palette as close as possible to a real propeller palette.
    Private Sub CreateTVPalette(ByVal Palette(,) As Integer)
            ' create the TV palette (minus the super saturated colors)
            Dim i As Integer
            Dim n, S, L, Lmax As Double
            Dim Mycolor As Color
            i = 0 ' counter
            S = 1.0 ' approx value , previously using 0.7 but make it 1.0
            ' see the palette tab for experiments with a better palette with darker yellows
            For x = 0 To 15
                n = (15 - x) - 3.5 ' calculate hue
                If n < 0 Then n += 16 ' rotate around the color wheel
                Select n
                    Case 11.5 : Lmax = 1 ' yellows are much darker than blues looking at the prop palette program
                    Case 10.5 : Lmax = 0.95
                    Case 9.5 : Lmax = 0.9
                    Case 8.5 : Lmax = 0.8
                    Case 7.5 : Lmax = 0.7
                    Case 6.5 : Lmax = 0.6
                    Case 5.5 : Lmax = 0.6
                    Case 4.5 : Lmax = 0.55
                    Case 3.5 : Lmax = 0.5
                    Case 2.5 : Lmax = 0.5
                    Case 1.5 : Lmax = 0.6
                    Case 0.5 : Lmax = 0.8
                    Case 15.5 : Lmax = 0.9
                    Case 14.5 : Lmax = 0.9
                    Case 13.5 : Lmax = 1
                    Case 12.5 : Lmax = 1
                End Select
                'H = n / 16 ' hue
                For y = 5 To 1 Step -1
                    L = Lmax * y / 6 ' luminance 
                    Mycolor = HSL_to_RGB((n / 16), S, L)
                    Palette(i, 0) = Mycolor.R ' red value
                    Palette(i, 1) = Mycolor.G ' green value
                    Palette(i, 2) = Mycolor.B ' blue value
                    Palette(i, 3) = x * 16 + 9 + y ' calculate the propeller byte value
                    i += 1
                Next
            Next
            ' now do the grays
            i = 0
            For x = 80 To 85
                For y = 0 To 2
                    Palette(x, y) = i * 51 ' scale of grays 0 to 255 step 51
                Next
                Palette(x, 3) = i + 2 ' propeller byte value
                i += 1 ' increment counter
            Next
        End Sub
    
    256 x 224 - 11K
    756 x 400 - 44K
    640 x 480 - 37K
    636 x 300 - 28K
    640 x 480 - 55K
    640 x 480 - 44K
  • Very impressive work indeed. Is PropGFX Or PropGFX Lite available in any form still?
  • PublisonPublison Posts: 12,366
    edited 2018-03-27 21:50
    Also tried Way Back Machine. Mostly dead ends. Started in 2012 working forward.
  • AribaAriba Posts: 2,682
    Daviduk wrote: »
    Very impressive work indeed. Is PropGFX Or PropGFX Lite available in any form still?

    You can build that with any Propeller board with a 64kB EEPROM (Quickstart, FLiP). Add the 3 resistors for TV output, and load the binaries into the EEPROM with the Spin files from this post:
    https://forums.parallax.com/discussion/comment/1016014/#Comment_1016014

    The documentation PDF is here:
    https://forums.parallax.com/discussion/comment/993447/#Comment_993447

    Andy
  • Thank you
  • This is just a general enquiry - but could hypothetically PropGFX be used as to process graphics, accessed from a physical area of memory, running as purely a graphics processor alongside another CPU?

    I'm thinking of a situation with a machine similar in structure either a ZX81 or Spectrum, where a specific area of memory is accessed to change the image, rather than accessing by commands.

    I'm not a hardware person myself, but am bouncing ideas for a few things with others.

    Thanks in advance!
  • Propeller as VGA output for the ZX81: http://zx81vga.ws-nbg.de/main.php

    I think the Propeller is memory mapped in there.
  • That is fascinating Yeti, thank you. Have been looking for examples of this.

    It does look like he's using the Propeller as a supplement to the internal Z80, which is similar to what I was looking into.

    I'll have to see if he's done a write-up anywhere.

  • Werner's site is very fascinating - but it looks like he uses his own graphics code rather than PropGFX

    However it has given a few ideas, so was definately worth checking out.
  • yetiyeti Posts: 818
    edited 2018-03-28 22:41
    I pointed to his stuff only because he uses a Propeller attached to the bus of a different processor.
    This was not an answer related to PropGFX.
    May this thread forgive me for this...
Sign In or Register to comment.