Jump to content




[1.4] cable


  • You cannot reply to this topic
41 replies to this topic

#21 Wolvan

  • New Members
  • 384 posts
  • LocationIn the TARDIS

Posted 25 March 2012 - 08:51 PM

View Postgrinchfox, on 25 March 2012 - 08:41 PM, said:

View PostCloudy, on 25 March 2012 - 08:29 PM, said:

Hmm... I don't understand why you have to complicate things. Surely you can just place peripherals next to the cable and it will detect them? Saves messing about.
I think the problem is in indexing peripherals in computer. I dont mind adding UID to monitors and floppys but its kinda compicated to use. So easier way is separate everything by color, its kids game :3
I like the idea with the colors more than the idea with UIDs

#22 OmegaVest

  • Members
  • 436 posts

Posted 26 March 2012 - 02:32 PM

Now see, this is why my tag still says Clueless.

Also, now I can see this as being useful for, say, a program to disable terminals remotely. So, if I was not a fan of this suggestion before, I am definitely now.

#23 Evis

  • New Members
  • 24 posts

Posted 31 March 2012 - 05:30 AM

At the same time if you use user defined UIDs, you can free up colors for something else.

#24 Neowulf

  • Members
  • 33 posts

Posted 31 March 2012 - 09:40 PM

Easy way would be as I stated above. When you initialize the wire connection it creates a list of all the connected peripherals, just use the position on that list as a temporary ID.
As long as the peripheral list creation is consistent, there should be no problems with the ID's not being static.

#25 con2000

  • New Members
  • 28 posts

Posted 01 April 2012 - 12:35 AM

We need dan to see this :o/>

#26 grinchfox

  • New Members
  • 16 posts

Posted 01 April 2012 - 09:19 PM

@Neowulf
Good but if you connect something else it may change list order or something. What if make device create static UID on placing ? It can save stackability and allow you use it without any hurt on changes.

#27 Neowulf

  • Members
  • 33 posts

Posted 02 April 2012 - 03:45 PM

Before plug and play and USB, you had to manually set addresses on any ISA card you installed in your machine so it wouldn't use one already in use. Then you had to give those settings to the driver when it was loaded (in either config.sys or autoexec.bat).
Not having the cable system automatically hot swappable is fine by me, it gives people an interesting coding challenge.

I still remember the settings for our soundblaster 16. Hex: 220, IRQ 5, DMA 1, High DMA 5
I don't know how many games I had to put that into...

#28 Ian-Moone

    The Germ

  • New Members
  • 124 posts
  • LocationLiverpool (no I am not a Scouser Im form Holland)

Posted 02 April 2012 - 04:44 PM

say in robot voice

to...good.of..an..idea...*puts gun in mouth...*pulls trigger...

#29 grinchfox

  • New Members
  • 16 posts

Posted 02 April 2012 - 08:49 PM

@Neowulf
Yes, I remember these good times. So youre talking about things wich was inside PC where all slots is limited and easy accessible. But peripherals is outside and with cable it may be connected in unlimited count so you cant give them IDs by algorythm wich depends on cable placement or something. Also giving them (pseudo)random IDs on their placement (e.x. as chest does) can make some challenge about writing own pnp and device mounting system ;3

#30 ds84182

  • Members
  • 184 posts

Posted 02 May 2012 - 08:40 PM

For colors you could use the color api to get the colors.
Only 16 colors(<-Is it right) per cable.
So the max number of peripherals is 96 (16 Colors for each side)
It would have a seperate function in the peripheral Lib
Functions:
peripheral.isCable(side) returns bool
peripheral.callCable(side, color, function)
peripheral.getTypeCable(side, color)
peripheral.getMethodsCable(side, color)
peripheral.isPresentOnCable(side, color)

#31 Xfel

    Peripheral Designer

  • Members
  • 515 posts

Posted 03 May 2012 - 06:24 AM

I would prefer a more generic version:
peripheral.bind(cableSide,color,virtualside)
will enable you to call all other methods with the default
peripheral.call(virtualside,name,...)
this would also enable a better event management.

alternative would be to use side names like "cableside:colortag", which would not need binding.

Some kind of cable could even be written as a seperate peripheral, it would only need to add a "peripheral" api file which will override the natives as term or turtle do. I made a coding attempt, however I'm not quite shure how to write a network management system.

#32 gigagames

  • Members
  • 55 posts

Posted 27 May 2012 - 11:54 PM

Hii, sry for bad english etc.
but when you add this , why you doint add IDS "as with Redpower" so you can connect mutch monitors etc on 1 cable ...

#33 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 28 May 2012 - 04:57 AM

Why? It requires?

#34 Xfel

    Peripheral Designer

  • Members
  • 515 posts

Posted 28 May 2012 - 05:22 AM

Well, using an id system would be best, but for that dan would have to do the work. The other, color-tagged system could be implemented as a separate peripheral system. I actually got quite far, but I'm stuck with the routing code giving me infinite loops and stuff.

#35 bbqroast

  • Members
  • 124 posts

Posted 28 May 2012 - 06:39 AM

View PostWolvan, on 20 March 2012 - 08:22 AM, said:

View PostDZCreeper, on 20 March 2012 - 05:40 AM, said:

Guys, can't you just decompile to get source code of computercraft?
Yes we could but that isn't really allowed. We would have to get permissions by dan first
Considering Notch hasn't given CC permission to do the same I imagine it's no big deal unless you actually release the modified code. All things considered I think it would be best to ditch the old side system and use IDs instead. For example:
handle = rednet.open(8) - Opens the appliance on port 8 (ports 1-6 are sides, ports 7 and beyond are cabled connections).
rednet.broadcast("Hello", handle)
That way you can run multiple things at once.

#36 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 28 May 2012 - 07:28 AM

View Postbbqroast, on 28 May 2012 - 06:39 AM, said:

Considering Notch hasn't given CC permission to do the same I imagine it's no big deal unless you actually release the modified code.

?? CC mods MC using an API provided by Notch same as any other mod... You can create periph's(mods) for CC with an API provided by Dan.. :)/>

#37 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 28 May 2012 - 05:37 PM

View Postluanub, on 28 May 2012 - 07:28 AM, said:

View Postbbqroast, on 28 May 2012 - 06:39 AM, said:

Considering Notch hasn't given CC permission to do the same I imagine it's no big deal unless you actually release the modified code.

?? CC mods MC using an API provided by Notch same as any other mod... You can create periph's(mods) for CC with an API provided by Dan.. :)/>

The API is not provided by Notch, nor anyone at Mojang.

#38 darkhog

  • New Members
  • 14 posts

Posted 31 May 2012 - 01:14 AM

Or how about using ribbon cables from RP2 that are used for it's computers? Also for IDs, for every component (monitor, drive, etc.) to the GUI would be added field for peripheral ID string, this would be any string that is unique among all peripherals linked to specified computer, then wherever "side" parameter is used, it'll be changed to deviceID, so there will be very little changes to maincode and code of apps, given you give peripherals IDstrings related to their position relative to computer.

For those peripherals that already doesn't have GUI, one will be created with just input field for IDstring and OK button. And for the sake of simplicity, all connected monitors will be changed when one of them is changed (I mean IDstring).

#39 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 03 July 2012 - 01:01 PM

Seems solved!

Look at the ARP 1.7

#40 svennp

  • Members
  • 23 posts
  • LocationFredrikstad

Posted 06 July 2012 - 05:10 PM

View Postxuma202, on 03 July 2012 - 01:01 PM, said:

Seems solved!

Look at the ARP 1.7

YAY! checking it out right now!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users