Shop OBEX P1 Docs P2 Docs Learn Events
loading DAT data from SD? — Parallax Forums

loading DAT data from SD?

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2009-06-10 22:17 in Propeller 1
Before I start creating the wheel:

Has anyone done an example of loading DAT date from a file from the SD?
Is this even possible?

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Visit the: The Propeller Pages @ Warranty Void.

Comments

  • RaymanRayman Posts: 14,833
    edited 2009-06-10 00:40
    OBC: I'm not sure what you mean...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • BTXBTX Posts: 674
    edited 2009-06-10 01:19
    That's exactly what I'm thinking.
    I supposse OBC mean, take data out of a SD, to ie draw a bitmap in a driver, using that read data instead this:
    Hbar  long                            
            file "hbar.dat"     '4x1=4
    



    If I could read the hbar.dat from SD, could be great to save in it, a lot of graphics.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-06-10 01:28
    I'm actually going one better...

    Since there seems to be a lot of shrugged shoulders, I'm knee-deep in spin.
    I'm writing an IPCONFIG program for my remote compiler which will allow me
    to change the TCP/IP address data and store it in a file called "ipconfig.cfg"

    My initial tests seem to indicate that I can load this data, then assign the
    variables into the DAT section. (We'll see)

    I've got most of the initial user interface finished, I'll be testing the concept shortly.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • CassLanCassLan Posts: 586
    edited 2009-06-10 01:35
    It shouldn't be a problem at all, I have done that.
    The program just needs the correct amount of DAT space allocated, you can replace the variables anyway you like.
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-06-10 01:42
    Are you guys just swapping out the underlying data *physically* while the code vars are still the same, e.g. pointing to the same place = like a shared memory swap?

    - Howard

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No matter how much you push the envelope, it'll still be stationery.
  • CassLanCassLan Posts: 586
    edited 2009-06-10 01:48
    Hmm the only thing that I can think of that is pesky is converting 1 then 9 then 2 .. into 192..
    You could setup a loop to repeat the same number of times for each place value;
    readbyte HUNDREDSCOLUMN from SD
    repeat HUNDREDSCOLUMN
         Octet := Octet + 100
    readbyte TENSCOLUMN from SD
    repeat TENSCOLUMN
         Octet := Octet+10
    readbyte ONESCOLUMN from SD
    repeat ONESCOLUMN
         Octet := Octet +1
    
    


    Although I'm not familiar with the driver or how the IP info needs to be presented...I've got to fool around with that PropNIC that arrived last week!

    Rick
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-06-10 02:02
    Nah,

    That was the easy part. I simply wrote one character for each number of the
    address, etc. I only needed numbers 0 - 255.

    I'm now dealing with the other side. As feared my DAT statements don't like
    accepting variables. (Still poking at it.)

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-06-10 02:28
    why not just overwrite the variables in hub ??? or am I missing something?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-06-10 02:46
    Never tried it before.. Never needed to.. [noparse]:)[/noparse]

    Yes, I have it working fine.. Too bad you guys won't see it until UPEW. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • CassLanCassLan Posts: 586
    edited 2009-06-10 11:16
    Can't wait!
    And you can edit the ipconfig.cfg with a text editor?....like PrEditor?roll.gif

    See you then!

    Rick
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-06-10 12:27
    CassLan said...
    And you can edit the ipconfig.cfg with a text editor?....like PrEditor?

    Because each digit of the configuration file represents part of the TCP stack
    configuration I wrote a special configuration screen for it.

    BTW, how is your editor coming along? It's been a while since
    we've had an update.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • CassLanCassLan Posts: 586
    edited 2009-06-10 22:17
    OBC said...
    Because each digit of the configuration file represents part of the TCP stack
    configuration I wrote a special configuration screen for it.

    BTW, how is your editor coming along? It's been a while since
    we've had an update.
    Sweet, looking forward to seeing it.

    Yeah, work got very busy...Just installed my first Prop based product this week!

    I will have PrEditor done for the expo though.

    Rick
Sign In or Register to comment.