Shop OBEX P1 Docs P2 Docs Learn Events
Graphic engines, your thoughts. — Parallax Forums

Graphic engines, your thoughts.

Timothy D. SwieterTimothy D. Swieter Posts: 1,613
edited 2008-03-10 04:17 in Propeller 1
I am curious what graphic engines are available.· I am working on a dispaly driver for the uOLED-96-PROP.· The display can do 8 bit color and 16 bit color in a 96x64 pixels.· Right now I was thinking an 8-bit color display would be good, but it takes a lot of memory.· It all depends on the rest of the application.

I can write the dispaly driver driver, but I don't want to write a graphics engine.· In fact I pretty much·have a display driver written adn I need to plug in·a·graphics engine and adjust for the bitmapping.· I was wanting to tie in an existing graphics engines.· Any thoughts from the gurus on the forum for what graphics engine may be best?

For priliminary testing I was using the Parallax graphics driver, but that only allows four colors unless you do the trick with tiles like the TV driver does.· I was hoping to stay clear of that.

Your thoughts and suggestions are appreciated.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter

www.brilldea.com·- check out the uOLED-IOC, an I/O expansion for the uOLED-96-PROP
www.tdswieter.com
One little spark of imagination is all it takes for an idea to explode

Comments

  • AndreLAndreL Posts: 1,004
    edited 2008-03-08 03:22
    The problem is that everything is so optimized, its hard to integrate. The parallax driver is really bizarre the way it accesses memory since it was an after thought. Frankly, I would say write a line draw, bitblit, and maybe a polyfil and call it a night.

    Andre'
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-08 03:38
    It may not be too much problem to use the existing graphics driver. It will need modifying as it is currently setup for 2 bits per pixel rather than 8. It would proabaly be easier than the current driver since you wouldn't have to worry about getting the 2 bit area that you want. You could just get each byte instead of a long.
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-03-08 10:07
    I will read some more about writing my own or modifying the Parallax driver to work.

    What is the opinion on how graphics memory should be organized? Since I have done some work with the Parallax driver I hadn't been exposed to other ways of thinking. I need to browse more in the Hyrda book, I am sure there is more in there I haven't gotten to yet.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter

    www.brilldea.com·- check out the uOLED-IOC, an I/O expansion for the uOLED-96-PROP
    www.tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • BaggersBaggers Posts: 3,019
    edited 2008-03-08 15:06
    it's all down to how you want it, if you want charmap to save ram with sprites, or bitmap for lines and poly's etc? bitmap is usually top left, going right, doing each scanline down to finish at bottom right.

    BTW, uOLED-96 users, is the clock changable? can you put say, a 5Mhz or 6Mhz crystal in instead? to get the prop to run at a better speed?
  • JT CookJT Cook Posts: 487
    edited 2008-03-08 15:13
    Actually I think a TV graphics driver and OLED graphics driver should work the same in theory. The only thing is that instead of bitmapped graphics you would use tile/sprite graphics. And it would really work the same, just have different timing.

    So instead of feeding a rendered raster line to the TV driver, feed that line to the OLED. The rendering COGs will wait for driver to get the correct line, so you don't have to worry about it going too fast.

    I woud suggest looking at my digital screen grab project and look at the source in there.

    http://forums.parallax.com/showthread.php?p=657569
  • BaggersBaggers Posts: 3,019
    edited 2008-03-08 17:19
    Hi JT, that's what I was hinting at, with going charmap with sprites might look good on uOLED-96-prop, and with 16bit palette [noparse]:D[/noparse] now Portable Dragon's lair would be a great thing [noparse]:)[/noparse] lol
  • JT CookJT Cook Posts: 487
    edited 2008-03-08 19:32
    The only problem I have really seen with the OLED boards is that the refresh rate is so slow, which I am guessing is due to the communication protocols. But from what I have seen, I don't even know if you can hit more than 5 fps with anykind of streaming video(I'm talking any kind of video you throw at it be a rendered tile/sprite combo or video). Because of that, I would go with 8bpp using a palette just because you cut your transfer time in half.
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-03-08 23:55
    I don't follow the whole TV discussion becauase I have never gotten into the TV driver to understand its interaction. What I do know is that it is pallette by tile type of setup, which I wanted to avoid because it is still limiting on the colors.

    The uOLED crystal probably could be changed. I briefly did research but ws having trouble and got distracted. The discussion onit so far is that you would probably have to put in a 10MHz. crystal because the smallwer ones are a smaller footprint than thte current 8 MHz. crystal. At 64 MHz. you can still get decent speed.

    As far as screen refresh rate, I will post something later today. I think you can get 30 to 45 frames/second of draw with a asm program that is feeding pixel data to the OLED and does not use the high level commands of the OLED driver. I did a simple demo with spinning stars (similar to the graphics/tv demo) and it looked really good.

    More to come.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter

    www.brilldea.com·- check out the uOLED-IOC, an I/O expansion for the uOLED-96-PROP
    www.tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • JT CookJT Cook Posts: 487
    edited 2008-03-09 03:14
    With the 30-40 fps is that redrawing the whole screen everytime or is that just updating portions of the screen?
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-03-09 12:07
    JT Cook - the 30 - 45 FPS is updating the whole screen.· Here is a link to a video on YouTube.· http://www.youtube.com/watch?v=5a6uVE-V8Gc· I shot this video back in January when I was experimenting with the display.· The program uses double buffered memory.· The Parallax Graphics driver is drawing into the working memory, that is why it is only four colors.· Then, at the end of the program, it copies the memory to the display memory.· There is an ASM program that is constantly clocking out each bit of each pixel (8-bits per pixel) to the display.· The ASM driver here looks at the 2 bit pixel data and then clocks out an 8-bit value.· Remember the OLED is updated in parallel which equals·speed.

    The ASM routine is not using the high level commands for pixel draw or rectangle draw, but simiply stuffing the bits from the Propeller memory into the display driver chip on the OLED.· As you can see there is a good refresh rate.· The top, 2 digit, number on the display is the FPS for drawing to the working memory.· The OLED update rate is similar as you can tell from the motion on the screen.· By the way, this is with the Propeller running at 64 MHz.

    Now my job is to start or to find an 8-bit graphics driver to couple in with my display driver.· My Sunday is coming to close and I did not have as many hours as I would have liked to play with it.· So, this project will have to wait until later this week, more likely next weekend.

    In time I will post the ASM driver code so others can utilize this.

    As a side note, I thought about making another add-on board for the uOLED-96-PROP.· I already made one·that extends the I/O, the next one I thought would be similar, but a little larger and would include buttons.· It could be a portable game platform.· Anyone interested?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter

    www.brilldea.com·- check out the uOLED-IOC, an I/O expansion for the uOLED-96-PROP
    www.tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • BaggersBaggers Posts: 3,019
    edited 2008-03-09 14:36
    Cool, looks fast enough to me [noparse]:)[/noparse]
  • JT CookJT Cook Posts: 487
    edited 2008-03-09 17:52
    Wow, that is cool! I didn't know you could just stream pixel data for video. Then it should be pretty easy to convert graphics drivers that work with TV drivers to work with OLED drivers, just need to change the horizontal resolution and for less scanlines(for vertical resolution).
  • BaggersBaggers Posts: 3,019
    edited 2008-03-09 20:39
    If only the res was 256x192 it would work with all the other games too, with slight modifications.
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-03-10 04:17
    I am pleased with the speed results. A larger screen could be used and the update rate would still be reasonable. The data should be loaded in parallel for best speed performance. After that, the problem is with Propeller memory. You certainly couldn't store a 256x192, 8-bit per pixel image buffer, so you would have to use tables, maps, pointers and such. Not a big problem since that is what the TV driver does now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter

    www.brilldea.com·- check out the uOLED-IOC, an I/O expansion for the uOLED-96-PROP
    www.tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
Sign In or Register to comment.