Jump to content




What happens when one boots a CC computer?


13 replies to this topic

#1 Lupus590

  • Members
  • 1,962 posts
  • LocationUK

Posted 23 June 2016 - 09:42 PM

So I got curious of what files are run when a ComputerCraft computer is opened, after some digging in the mod zip's lua files, I made this:

Posted Image
http://imgur.com/a/XoTUL

Hopefully, someone will find this useful, or at least interesting.

Edit: redid the image in a proper flowchart program. I still think I've used the syntax wrong. And the forum keeps shrinking my image so that it's not readable.

Edited by Lupus590, 19 September 2016 - 04:00 PM.


#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 23 June 2016 - 09:49 PM

Very interesting, maybe add in things for non-advanced and command computers?

#3 Lupus590

  • Members
  • 1,962 posts
  • LocationUK

Posted 23 June 2016 - 10:21 PM

View PostKingofGamesYami, on 23 June 2016 - 09:49 PM, said:

Very interesting, maybe add in things for non-advanced and command computers?

It'll be just the same, with the path and loaded APIs being different

Edited by Lupus590, 23 June 2016 - 10:24 PM.


#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 24 June 2016 - 12:41 AM

Looks to me like the first disk found with a startup file gets used, but none of the others do. There's no loop around the shell.run() call.

You may also consider adding in rednet.run(), and perhaps noting which settings get loaded and when.

#5 Selim

  • Members
  • 189 posts
  • LocationHiding in Online Storage

Posted 24 June 2016 - 07:29 PM

I just would like to point out the typo in the title. "What heppens when..." -> "What happens when..."

Edited by Selim, 24 June 2016 - 07:30 PM.


#6 PossieTV

  • Members
  • 62 posts

Posted 26 June 2016 - 05:35 AM

Wait, so theoretically, could one change the bios.lua to make regular computers the same as advanced computers? Or is there something in the java code that says that non-advanced computers can't have color.

Edited by PossieTV, 26 June 2016 - 05:36 AM.


#7 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 26 June 2016 - 05:45 AM

bios.lua doesn't decide whether the system is advanced or not; it merely checks.

#8 Lupus590

  • Members
  • 1,962 posts
  • LocationUK

Posted 23 August 2016 - 01:27 PM

OP Edit: redid image, now has more detail and should be clearer on file separation and location

#9 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 24 August 2016 - 02:21 AM

That's much better. Good job! :)

One minor point (which only really matters outside of the boot process) - the shell script only calls rom/startup if it's the "parent shell". The first shell instance launched by multishell / bios.lua (during boot) counts as such and therefore does, and all instances started after that are children of that parent and therefore don't.

#10 Lupus590

  • Members
  • 1,962 posts
  • LocationUK

Posted 24 August 2016 - 02:51 AM

Fixed

Edited by Lupus590, 24 August 2016 - 03:00 AM.


#11 TheRockettek

  • Members
  • 547 posts
  • LocationRem is best girl

Posted 24 August 2016 - 08:05 AM

View PostPossieTV, on 26 June 2016 - 05:35 AM, said:

Wait, so theoretically, could one change the bios.lua to make regular computers the same as advanced computers?

Its like saying irl:

":P i set my wam to 64gb even though i only have 4gb"

(Yo.o)Y tis not possibles


#12 Sewbacca

  • Members
  • 450 posts
  • LocationStar Wars

Posted 19 September 2016 - 03:38 PM

I have three questions:
First:
KingofGamesYami and Lupus590 did such structures seeing similar. WHICH PROGRAM DO YOU USE???
and my second question is:
I thought that the disk startup can be blocked through the .settings data.
Last but not the least:
Runs just the multishell parallel with the rednet and not the normal shell (if it isn't an advanced computer) or apply the text also for the second option?

#13 Lupus590

  • Members
  • 1,962 posts
  • LocationUK

Posted 19 September 2016 - 03:58 PM

View PostSewbacca, on 19 September 2016 - 03:38 PM, said:

I have three questions:
First:
KingofGamesYami and Lupus590 did such structures seeing similar. WHICH PROGRAM DO YOU USE???
and my second question is:
I thought that the disk startup can be blocked through the .settings data.
Last but not the least:
Runs just the multishell parallel with the rednet and not the normal shell (if it isn't an advanced computer) or apply the text also for the second option?


#14 Sewbacca

  • Members
  • 450 posts
  • LocationStar Wars

Posted 27 September 2016 - 09:48 AM

View PostLupus590, on 19 September 2016 - 03:58 PM, said:

View PostSewbacca, on 19 September 2016 - 03:38 PM, said:

I have three questions:
First:
KingofGamesYami and Lupus590 did such structures seeing similar. WHICH PROGRAM DO YOU USE???
and my second question is:
I thought that the disk startup can be blocked through the .settings data.
Last but not the least:
Runs just the multishell parallel with the rednet and not the normal shell (if it isn't an advanced computer) or apply the text also for the second option?
Thank you, also for the program =).
By the way, your diagram is awesome.
Sewbacca





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users