Shop OBEX P1 Docs P2 Docs Learn Events
The WireWorld Computer — Parallax Forums

The WireWorld Computer

BaggersBaggers Posts: 3,019
edited 2013-05-25 18:46 in Propeller 2
Hi All,

Here is a VGA 800x600 8bit display driver,

It also has a "Game Of Life" style engine in it, with a design that I came across a few years back on the net, at http://www.quinapalus.com/wi-index.html

This also shows writing to the display and reading from the display, whilst displaying an 800x600 image :D

And this is only running at 60Mhz, with one cog for VGA and one for SDRAM and one for my wireworld engine.

WiredComputer.zip

Edit: removed the -com6 from s.bat

Enjoy, and let me know what you think! :)
«134567

Comments

  • SapiehaSapieha Posts: 2,964
    edited 2013-04-18 07:44
    Hi Baggers

    It give me that error

    len=00096436
    newlen=00096000
    error: hardware lost
    Found propeller version 32 on COM9
    Loading 'JB_TO_SDRAM_32BIT_TV.obj' at 0x00000e80
    ..
    Opening Comport COM9
    Writing to comport
    len=00096000
    newlen=00096000
    Writing to comport
    PressAnyKey
    ................................................................................
    ................................................................................
    ................................................................................
    ................................................................................
    ................................................................................
    ................................................................................
    ................................................................................
    .........................................
    error: hardware lost
    Found propeller version 32 on COM9
    Loading 'WiredComputer.obj' at 0x00000e80
    ..

    Baggers wrote: »
    Hi All,

    Here is a VGA 800x600 8bit display driver,

    It also has a "Game Of Life" style engine in it, with a design that I came across a few years back on the net, at http://www.quinapalus.com/wi-index.html

    This also shows writing to the display and reading from the display, whilst displaying an 800x600 image :D

    And this is only running at 60Mhz, with one cog for VGA and one for SDRAM and one for my wireworld engine.

    Attachment not found.

    Enjoy, and let me know what you think! :)
  • David BetzDavid Betz Posts: 14,516
    edited 2013-04-18 08:24
    Baggers wrote: »
    Hi All,

    Here is a VGA 800x600 8bit display driver,

    It also has a "Game Of Life" style engine in it, with a design that I came across a few years back on the net, at http://www.quinapalus.com/wi-index.html

    This also shows writing to the display and reading from the display, whilst displaying an 800x600 image :D

    And this is only running at 60Mhz, with one cog for VGA and one for SDRAM and one for my wireworld engine.

    Attachment not found.

    Enjoy, and let me know what you think! :)
    This sounds very cool! I guess I'm going to have to break down and reprogram my DE2-115 with the configuration file that supports the SDRAM.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-18 08:25
    Ah, yes, can you edit s.bat it has a -com6 in there that shouldn't be in the second line.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-18 08:34
    David Betz wrote: »
    This sounds very cool! I guess I'm going to have to break down and reprogram my DE2-115 with the configuration file that supports the SDRAM.

    Yes David, that's a great idea, then I can ask you nicely if you could add SDRAM loading into P2Load :D pretty please with bells on ;)
    If you want a hand I'll send you the source for mine, and talk you through it, but it's pretty easy, especially with Chip's SDRAM drivers!
  • Heater.Heater. Posts: 21,230
    edited 2013-04-18 08:38
    WireWorld is amazing.

    Sadly the zip linked to above gives me:
    Invalid Attachment specified. If you followed a valid link, please notify the administrator
    And the demo on the WireWorld pages is in Java which ain't going to run here.

    Any video anywhere?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-04-18 08:51
    Baggers wrote: »
    Yes David, that's a great idea, then I can ask you nicely if you could add SDRAM loading into P2Load :D pretty please with bells on ;)
    If you want a hand I'll send you the source for mine, and talk you through it, but it's pretty easy, especially with Chip's SDRAM drivers!
    Sure, I'd be willing to add SDRAM loading. Are you using Chip's standard SDRAM driver? Since SDRAM requires refresh, it will be necessary for p2load to load and start the SDRAM driver and leave it running for the program to use. I don't think it will be possible for the program to use different SDRAM driver code than is used by the loader, right? Or will the SDRAM hold its contents long enough to launch another SDRAM driver after the load is complete?
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-18 09:01
    I edited them.

    It load but don't show anything

    Baggers wrote: »
    Ah, yes, can you edit s.bat it has a -com6 in there that shouldn't be in the second line.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-18 09:08
    Heater, try it again, you may have got it as I was updating it.

    David, Yeah, it's using Chip's standard SDRAM driver, and yes, it keeps the contents long enough to reload new programs etc, so should be fine.
    What I do is P2Load my TO_SDRAM obj that has a display to show SDRAM and also chips SDRAM driver, and serial comms, then leaves that active, until you p2load and run your new obj. :)
  • cgraceycgracey Posts: 14,151
    edited 2013-04-18 09:11
    I got the com port adjusted, but it doesn't seem to work. At first, I get an image on my TV, then after hitting a key I get a delay and a few top and bottom lines appearing on my VGA display. That's it.
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-18 09:13
    Hi Baggers

    You write "Here is a VGA 800x600 8bit display driver,"

    But inside zip BMP are for "ww1024x600.bin"

    Maybe that is problem --- I use real 800x600 LCD


    Baggers wrote: »
    Hi All,

    Here is a VGA 800x600 8bit display driver,

    It also has a "Game Of Life" style engine in it, with a design that I came across a few years back on the net, at http://www.quinapalus.com/wi-index.html

    This also shows writing to the display and reading from the display, whilst displaying an 800x600 image :D

    And this is only running at 60Mhz, with one cog for VGA and one for SDRAM and one for my wireworld engine.

    Attachment not found.
    Edit: removed the -com6 from s.bat

    Enjoy, and let me know what you think! :)
  • BaggersBaggers Posts: 3,019
    edited 2013-04-18 09:33
    Sapieha, the image is 1024x600, the driver is 800x600, but I use 1024 bytes for easier SDRAM bank addressing :)

    Chip, After I've eaten, I'll download the zip and check again here make sure nothing has gone amiss.
  • SapiehaSapieha Posts: 2,964
    edited 2013-04-18 09:40
    Hi

    Exactly same as me

    cgracey wrote: »
    I got the com port adjusted, but it doesn't seem to work. At first, I get an image on my TV, then after hitting a key I get a delay and a few top and bottom lines appearing on my VGA display. That's it.
  • AribaAriba Posts: 2,690
    edited 2013-04-18 10:26
    David Betz wrote: »
    Sure, I'd be willing to add SDRAM loading. Are you using Chip's standard SDRAM driver? Since SDRAM requires refresh, it will be necessary for p2load to load and start the SDRAM driver and leave it running for the program to use. I don't think it will be possible for the program to use different SDRAM driver code than is used by the loader, right? Or will the SDRAM hold its contents long enough to launch another SDRAM driver after the load is complete?

    The datasheet says you need to do 8192 refreshs every 64ms, but my expirience is that the SDRAM holds the data over several minutes without refreshing. Then you can see some single bits changing on the screen.

    Andy
  • jazzedjazzed Posts: 11,803
    edited 2013-04-18 10:41
    Ariba wrote: »
    The datasheet says you need to do 8192 refreshs every 64ms, but my expirience is that the SDRAM holds the data over several minutes without refreshing. Then you can see some single bits changing on the screen.

    Andy

    Counting on SDRAM to hold a data for very long without refresh seems tenuous. Not a good idea for a program at least.

    Fortunately we already have a loader methodology for such things using a separate COG. Is the current methodology a problem?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-04-18 10:44
    jazzed wrote: »
    Counting on SDRAM to hold a data for very long without refresh seems tenuous. Not a good idea for a program at least.

    Fortunately we already have a loader methodology for such things using a separate COG. Is the current methodology a problem?
    It's not a problem as long as the application being loaded inherits the SDRAM driver from the loader when it starts. I was thinking about the case where the application might want to use its own driver to handle SDRAM different from the one the loader uses.
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2013-04-18 10:51
    I believe on the FPGA boards the refresh is being handled by the board and not the fpga logic that is the P2 in our case. I think the current driver will need to be updated for the real P2 in order to do the refreshing signals, right Chip?
  • jazzedjazzed Posts: 11,803
    edited 2013-04-18 10:59
    David Betz wrote: »
    ... I was thinking about the case where the application might want to use its own driver to handle SDRAM different from the one the loader uses.

    Need a way to gracefully stop the other COG refresh. Something will have to force the clock and other signals off before killing the old COG. The newly started driver should probably do that - it would need to know which COG to stop if any.

    Thanks Roy. Guess I haven't paid enough attention.
  • AribaAriba Posts: 2,690
    edited 2013-04-18 11:09
    jazzed wrote: »
    Counting on SDRAM to hold a data for very long without refresh seems tenuous. Not a good idea for a program at least.

    Fortunately we already have a loader methodology for such things using a separate COG. Is the current methodology a problem?

    If you have a DE0-Nano with only one cog, then it is a problem.
    I would like to see the SDRAM write handled in the same cog that receives the serial data. I have made subroutines that can write a single Quad and can change that easy to one word.
    Mabe we can just set the SDRAM to self-refresh after writing the data?

    Andy
  • jazzedjazzed Posts: 11,803
    edited 2013-04-18 11:35
    Ariba wrote: »
    If you have a DE0-Nano with only one cog, then it is a problem.
    I would like to see the SDRAM write handled in the same cog that receives the serial data. I have made subroutines that can write a single Quad and can change that easy to one word.
    Mabe we can just set the SDRAM to self-refresh after writing the data?

    Andy

    Yah, that's true. I'm not sure a one COG device could be supported longer term though.

    Does the DE0-Nano image also provide refresh in the FPGA?

    Self-refresh is a power-down mode that is not meant to replace normal refresh AFAIK (a reference would be useful if I'm wrong).


    @Baggers, I'm looking forward to running your demo.
  • AribaAriba Posts: 2,690
    edited 2013-04-18 11:58
    jazzed wrote: »
    Yah, that's true. I'm not sure a one COG device could be supported longer term though.

    Does the DE0-Nano image also provide refresh in the FPGA?

    Self-refresh is a power-down mode that is not meant to replace normal refresh AFAIK (a reference would be useful if I'm wrong).
    The Nano provides the same interface to the SDRAM as the DE2. But all the SDRAM demos so far work with more than one cog and are not usable on the DE0. The main reason is Chips driver which need a separate cog. So I had to do my own driver concept.

    But loading data into the SDRAM with P2LOAD should not be a problem with a single cog.
    Yes Self-Refresh is a powerdown mode but that is the idea: After uploading a file with P2Load set the RAM to self-refresh until you upload another file or a new code with PNUT. The question is: will this work after a Reset, or need we a pullup on the SDRAM CS pin for that?

    Andy
  • BaggersBaggers Posts: 3,019
    edited 2013-04-18 12:14
    Hi all again,

    I've sorted the issue you were having with a black screen, I had changed the palette to work with the Prop2's internal 8bit mode, thus having to change the colours, I've fixed it with the new P2 palette, and have updated the first post :) and tested it, by re-downloading it and running the runme.bat ;)
  • nutsonnutson Posts: 242
    edited 2013-04-18 12:22
    Runs fine now, Baggers. Nice, reminds me of of guy that made an FPGA model of the 6502 micro just from fotographs of the die.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-18 12:31
    Thanks nutson :) yeah, it does a little doesn't it!

    Once we get the full Prop2, I'll speed it up, and maybe ( SDRAM allowing ) add more cogs
  • jazzedjazzed Posts: 11,803
    edited 2013-04-18 12:38
    Ariba wrote: »
    Yes Self-Refresh is a powerdown mode but that is the idea: After uploading a file with P2Load set the RAM to self-refresh until you upload another file or a new code with PNUT. The question is: will this work after a Reset, or need we a pullup on the SDRAM CS pin for that?

    Andy

    Nice idea. Guess it depends on the default state of the programmed pull-ups after cogstop. Chip?
  • BaggersBaggers Posts: 3,019
    edited 2013-04-18 13:16
    Did you see it working jazzed?
  • jazzedjazzed Posts: 11,803
    edited 2013-04-18 13:29
    Baggers wrote: »
    Did you see it working jazzed?
    Sorry, not yet. I'm away from my Propeller lab at the moment.
  • BaggersBaggers Posts: 3,019
    edited 2013-04-18 14:06
    no worries, enjoy when you get the chance :)
  • David BetzDavid Betz Posts: 14,516
    edited 2013-04-18 14:40
    ummmm... is there a Mac version of P2Prep? Or is source code available so I can build it myself?
  • BaggersBaggers Posts: 3,019
    edited 2013-04-18 14:58
    Just put it in the P2Prep thread
  • David BetzDavid Betz Posts: 14,516
    edited 2013-04-18 15:00
    Baggers wrote: »
    Just put it in the P2Prep thread
    Thanks! Looks like it will require a bit of conversion to run on the Mac or Linux to convert the Windows file API calls to stdio. Doesn't look like a big job though.
Sign In or Register to comment.