+ Reply to Thread
Page 3 of 15 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 145

Thread: !!!OLD!!! ZCPU Documentation

  1. #21
    That furred thing Black Phoenix's Avatar
    Join Date
    Feb 2007
    Location
    Kyiv, Ukraine
    Posts
    3,565

    Default

    Code:
    *code*
    Having problems with this, still kindof new at it... Could anyone tell me whats wrong with it?

    Basicaly, when port 0 has the value of 1, it's supposed to jump to label z, Which is then supposed to keep port 1 at value 1, but go on like a for loop timer until ecx is greater than 100 (timer), but while it is less than 100 it will keep port 2 at 1, and port3 at 0 and turn both to 0 when it's greater. Apon being greater, it will jump to linetwo and start a similar timer loop but with different port2 and 3 values.

    I hope this wasn't too confusing... And I realize my code is probably way off.[/b]
    After you jump to linetwo your program ends execution, there is no jump back to main loop, probably that is the problem?
    I'm a wire-crazy person with a tail.

    Take a daily journey into my brain

    D2K5

  2. #22
    Expressionism 2.0 Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,573

    Default

    Very nice indeed, very intuitive editor too!

    Well anyway, I noticed the command that waits for input... would it be possible to have a similar one that syncs output with the other components (I'm guessing it would be to stop until next Think())? As it is now the other components cannot read fast enough and they have no output that tell when they are done either (or perhaps they will do either in the future?). A wait function would be nice too, although I'm guessing it could be problematic to implement.

    A branch instruction and everything that goes with it would be a welcome addition too, should be fairly simple to do.

    Btw, I also noticed that it doesn't like negative values "-1.0" becomes invalid label or something like that. (ENT:ValidNumber)

    Very nice addition and very good work!

    (Btw, you probably already know this, but you could speed up the execution pretty much by trying to remove all those consequtive IFs, either by having a "divide and conquer" strategy for them or doing some smart stuff with meta-tables (switch does not exist in Lua i believe), this would effectively change them from O(n) to O(logn) or even O(1) which is a very good difference as there is so little logic in each... perhaps it would be possible to turn all opcodes into functions instead, making extensions very easy, and everything O(1)... well just my five cents)

    (EDIT: ah damn, this was meant to be in the original thread and not the documentation)

  3. #23
    Wirererer XeonXT's Avatar
    Join Date
    Mar 2007
    Posts
    199

    Default

    Again, what's this GPU you speak of?

    Sounds mucho awesome, would love to have some juicy details
    "As far as I can remember, Garry has always had this pissy, elitist attitude towards others. "I'm better than you all." That's his philosophy. And that's why he's hated. If he had been nice and respectful in the first place, he wouldn't have a bunch of pissed-off enemies biting at his ass every chance they get."

  4. #24
    Wire Noob Seraphis's Avatar
    Join Date
    Mar 2007
    Posts
    24

    Default

    After you jump to linetwo your program ends execution, there is no jump back to main loop, probably that is the problem?[/b]

    Well, no... because line is a timer that also is moving something along it's X-axis... The thing isn't even moving... so that part of the code shouldn't matter

  5. #25
    That furred thing Black Phoenix's Avatar
    Join Date
    Feb 2007
    Location
    Kyiv, Ukraine
    Posts
    3,565

    Default

    Very nice indeed, very intuitive editor too!

    Well anyway, I noticed the command that waits for input... would it be possible to have a similar one that syncs output with the other components (I'm guessing it would be to stop until next Think())? As it is now the other components cannot read fast enough and they have no output that tell when they are done either (or perhaps they will do either in the future?). A wait function would be nice too, although I'm guessing it could be problematic to implement.

    A branch instruction and everything that goes with it would be a welcome addition too, should be fairly simple to do.

    Btw, I also noticed that it doesn't like negative values "-1.0" becomes invalid label or something like that. (ENT:ValidNumber)

    Very nice addition and very good work!

    (Btw, you probably already know this, but you could speed up the execution pretty much by trying to remove all those consequtive IFs, either by having a "divide and conquer" strategy for them or doing some smart stuff with meta-tables (switch does not exist in Lua i believe), this would effectively change them from O(n) to O(logn) or even O(1) which is a very good difference as there is so little logic in each... perhaps it would be possible to turn all opcodes into functions instead, making extensions very easy, and everything O(1)... well just my five cents)

    (EDIT: ah damn, this was meant to be in the original thread and not the documentation)[/b]
    It does not take much time to execute that, you won't need speeds that high.
    I will fix -1.0 in next release.

    To sync outputs you can attach timer to some port, enable timer via power button, and then just use halt 7; (it will pause right for the time needed to process wire data)
    I'm a wire-crazy person with a tail.

    Take a daily journey into my brain

    D2K5

  6. #26
    Wire Amateur Zekian's Avatar
    Join Date
    Mar 2007
    Location
    A box made of white plastic
    Posts
    48

    Default

    How dose the 'and' opcode work? I am slightly confused

  7. #27
    Wirererer XeonXT's Avatar
    Join Date
    Mar 2007
    Posts
    199

    Default

    <div class='quotetop'>QUOTE(XeonXT)</div>
    Again, what&#39;s this GPU you speak of?[/b]
    "As far as I can remember, Garry has always had this pissy, elitist attitude towards others. "I&#39;m better than you all." That&#39;s his philosophy. And that&#39;s why he&#39;s hated. If he had been nice and respectful in the first place, he wouldn&#39;t have a bunch of pissed-off enemies biting at his ass every chance they get."

  8. #28
    That furred thing Black Phoenix's Avatar
    Join Date
    Feb 2007
    Location
    Kyiv, Ukraine
    Posts
    3,565

    Default

    Experimental programmable screen
    I'm a wire-crazy person with a tail.

    Take a daily journey into my brain

    D2K5

  9. #29
    Wire Amateur Zekian's Avatar
    Join Date
    Mar 2007
    Location
    A box made of white plastic
    Posts
    48

    Default

    How dose the &#39;and&#39; opcode work? I am slightly confused

  10. #30
    That furred thing Black Phoenix's Avatar
    Join Date
    Feb 2007
    Location
    Kyiv, Ukraine
    Posts
    3,565

    Default

    Right now its logical, i.e. IF (A > 0) AND (B > 0) THEN A = 1 ELSE A = 0
    I'm a wire-crazy person with a tail.

    Take a daily journey into my brain

    D2K5

+ Reply to Thread
Page 3 of 15 FirstFirst 1234513 ... LastLast

LinkBacks (?)

  1. 02-26-2010, 01:41 AM
  2. 01-27-2010, 06:21 PM
  3. 01-27-2010, 03:18 PM

Similar Threads

  1. !!!OLD!!! Documentation of hi-speed devices
    By Black Phoenix in forum CPU, GPU, and Hi-speed Discussion & Help
    Replies: 98
    Last Post: 02-10-2011, 07:41 PM
  2. !!!OLD!!! ZGPU Documentation
    By Black Phoenix in forum CPU, GPU, and Hi-speed Discussion & Help
    Replies: 38
    Last Post: 11-29-2010, 04:54 PM
  3. Expression Gate Documentation
    By Syranide in forum Finished contraptions
    Replies: 398
    Last Post: 01-21-2010, 10:27 PM
  4. Moongate Documentation
    By BlackNecro in forum Wiremod Addons & Coding
    Replies: 24
    Last Post: 04-22-2009, 01:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots