Announcement

Collapse
No announcement yet.

typo for txt_Wrap Page 31 Diablo16 Serial Environment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Peter Kenyon
    replied
    Fair enough Mark, tho I could argue a case for having the numbers in the table, and leave as undocumented (except for forum posts or faq perhaps) but doable

    Leave a comment:


  • ESPsupport
    replied
    As I said earlier, you are the first to ask.

    Implementing in SPE is the easiest part, as well as the manual, there is around a dozen libraries to update and enhance, not to mention Serial commander. It really is quite an amount or work required, we have lots of more important things in the 'to do' list.

    Remember you can also call functions that access these functions, not to mention that these functions can be compounded into useful 'macro fucntions'

    snd_Freq() is not currently documented, not sure how it got the values it currently has. Yes, it is very noisy, so a series resistor, or pot, is called for.

    Leave a comment:


  • Peter Kenyon
    replied
    Thanks Mark,
    One small question, why don't you chaps at 4ds just implement as much in the table as is useful, since it only involves adding an entry to a table and adding some stuff to the document,
    The functions I have found useful are
    gfx_RoundRect
    gfx_Gradiant,
    gfx_RoundGradient
    gfx_FillPattern

    oh there is an entry mistake for snd_Freq in funcargs table, I changed it to 3 and it works, tho its not very useful unless you are very deaf

    Leave a comment:


  • ESPsupport
    replied
    Ooops, Here's the missing code.
    Code:
    #platform "uLCD-35DT"
    
    #inherit "4DGL_16bitColours.fnc"
    
    func main()
        var i, j ;
        i := gfx_RoundRect ;
        j := ABS(i) ;
        print("cmd     ", [HEX4] i, "\n0 relative Line ", j / 16, "\n0 relative Col(0rel) ", j % 16) ;          // ("x1", "y1", "x2", "y2", "rad", "color");
    
        repeat                      // maybe replace
        forever                     // this as well
    
    endfunc

    Leave a comment:


  • Peter Kenyon
    replied
    I cant get gfx_Gradient to do anything BUT I discovered gfx_FillPattern which is very useful for graying out a screen when showing a popup, the fun continues

    Leave a comment:


  • Peter Kenyon
    replied
    Even more progress, I added print(gfx_Gradient) in my spe and lo and behold a magic number appeared, we move on

    Leave a comment:


  • Peter Kenyon
    replied
    WOW I managed to get round rect to work OK, now all I need is to find the magic numbers for the other commands I want

    Leave a comment:


  • Peter Kenyon
    replied
    mmm having a bit of bother here, you say run the code below, what code are you referring to?
    I cant find out the index of the functions I want to add in the table but I have sussed that for example
    F_gfx_TriangleFilled is -167 so at position 167 (a7) there is an 8 corresponding to the args +1. (Also from your note round rect is ff53)
    btw the functions I would add are the round rect and gradient, so wouldn't be too much work for you guys and I'm sure they would be appreciated.
    Last edited by Peter Kenyon; 13th February 2016, 10:05 PM.

    Leave a comment:


  • ESPsupport
    replied
    Yep, you could do it that way as well

    Leave a comment:


  • Peter Kenyon
    replied
    OK Ill give it a go, I suppose I could also write a file with commands on the sd card and call the file execute technique

    Leave a comment:


  • ESPsupport
    replied
    OK
    1. Run the code below replacing 'gfx_RoundRect' with the name of the function you are after (not you can only do functions with word/integer args) and note the values
    2. Note the number of parameters for the function and whether it has a return value (you can get this in Workshop using Ctrl-Space, or using the manual)
    3. Get a copy of the source to SPE by loading SPE and copying the program placed in C:\Users\your userid\AppData\Local\Temp called temp4D.4dg, or adding to your existing customised SPE
    4. Find the 'funcArgs' array (about line 35) and change the '255' in the line and column returned above to one higher than the number of arguments (eg for roundrec 6+1 = 7)
    5. If there is a return value change the equivalent '0' in 'funcRet' to 1.
    6. Build and load the new SPE (make sure Destination is Flash in the project tab)
    7. Test the new function, I use Terminal and 'Send Hex', eg enter ff5300100010004000400003f81f to test roundRect.

    Leave a comment:


  • Peter Kenyon
    replied
    Not worried about SerialCommander I have everything I need in python , but round rect would be nice, I think everybody today wants the windows metro look rather than the 3d win 95 look

    Leave a comment:


  • ESPsupport
    replied
    Hmm, you are the first to ask... in just over 2 years... So I guess it is not a high priority.

    I can show you how to do it yourself, at least for some 'simple' commands of which rounded rectangle would be one.

    That wont get it in Serial commander, though

    Leave a comment:


  • Peter Kenyon
    replied
    ok thanks for the suggestion, but its not too bad, I am using a subset and I test each function as I go along, I also use the serial commander thingie to check everything is ok.
    ​While were on the subject is it likely more functionality will be exposed over the serial link, eg roundrects etc etc

    Leave a comment:


  • ESPsupport
    replied
    Right, Surely one of the files in that folder can be used?

    A quick google gives me http://code.activestate.com/recipes/...?in=user-97991

    Which suggests all you need to do is remove the ';' off the end of the line to use the Delphi constants here

    C:\Users\Public\Documents\4D Labs\Diablo Serial\Pascal\Include\Diablo_Const4DSerial.INC

    Leave a comment:

Working...
X