Operating System

Blitz3D Forums/Blitz3D Programming/Operating System

Nike(Posted 2009) [#1]
Hello, I was thinking of creating a operating system coded in only blitz3d! If anyone would help i would love it! We could merge blitz3D's codes and make it big, add side programs to it like a painting program and do cool stuff! Please post if you will help.


puki(Posted 2009) [#2]
Well, it is kind of difficult to do with Blitz3D - without going external - Blitz3D just doesn't fish that deep.

Painting program is okay to do; I made MS Paint with it.


Nike(Posted 2009) [#3]
But will it be at all possible and I made a painting program too. :)


Gabriel(Posted 2009) [#4]
But will it be at all possible

No. Blitz3D won't run without Windows being present. And if Windows is already present and doing all the work, you haven't really got an operating system.


puki(Posted 2009) [#5]
Considering it will be a long job - many years in the making. I deem the project a non-starter.

Still, how about a nice little PacMan game?


Nike(Posted 2009) [#6]
Ok well thanks for explaning how this wont work. Can a mod delete this forum?


puki(Posted 2009) [#7]
Well, you could at least have a go at making your operating system. Even if Windows (or whatever is on your computer). You can still take control away from Windows via Blitz3D - albeit, not much.


puki(Posted 2009) [#8]
Play around with the File commands:
; Changing part of a file using OpenFile, SeekFile and WriteInt 

; Open/create a file to Write 
fileout = WriteFile("mydata.dat") 

; Write the information to the file 
WriteInt( fileout, 1 ) 
WriteInt( fileout, 2 ) 
WriteInt( fileout, 3 ) 
WriteInt( fileout, 4 ) 
WriteInt( fileout, 5 ) 

; Close the file 
CloseFile( fileout ) 

DisplayFile( "The file as originally written", mydata.dat" ) 
; Open the file and change the Third Integer 

file = OpenFile("mydata.dat") 
SeekFile( file, 8 ) ; Move to the third integer in the file 
WriteInt( file, 9999 ) ; Replace the original value with 9999 
CloseFile( file ) 

DisplayFile( "The file after being midified", "mydata.dat" ) 
WaitKey() 
; **** Function Definitions follow **** 

; Read the file and print it 
Function DisplayFile( Tittle$, Filename$ ) 
Print tittle$ 
filein = ReadFile( Filename$ ) 
While Not Eof( filein ) 
Number = ReadInt( filein ) 
Print Number 
Wend 
CloseFile( filein ) 
Print 
End Function  



Yasha(Posted 2009) [#9]
Not to be a fanboy, but you could make an OS in BlitzMax - if you really wanted to, and with a lot of work. Blitz3D, not so much (although you could create an OS-like environment to run from within Windows, since Turing-completeness demands that all things are possible from within the given starting framework).


Nate the Great(Posted 2009) [#10]
YOU CAN MAKE AN OS WITH BLITZ3D!

you just write a compiler in it for c++ then write the os in that! I know its rediculously complex to write a compiler and then an os on top of that but its possible.


Yasha(Posted 2009) [#11]
Erm... where does Blitz3D come into that plan?

Also, writing a compiler is a trivial task compared to writing an OS.


EDIT: Sorry I misread that as "write a compiler in C++". I see...


Warner(Posted 2009) [#12]
I think the confusion might lie in the term 'OS'. If you want to create a file management program, that copies/deletes/renames/executes files, you can do that in Blitz3D. If you want something that loads/controls drivers/memory etc., it will be quite a task indeed.


BlitzSupport(Posted 2009) [#13]
You could do a replacement desktop... not that Blitz3D is the ideal candidate, but it would be possible!


xlsior(Posted 2009) [#14]
You can't make an operating system, but you can make a graphical shell... you'll still have the windows requirement, though.


Kryzon(Posted 2009) [#15]
Did he just propose to do something more difficult than a MMORPG?

PS: Gabe's right, B3D needs Windows to run, and if you already have an operating system, then...

What would be cool is to develop like a system handler, some blitz app that you would turn on and include in your startup configurations so that it initiates with an interface and gives you some control about something. Kinda like an offline Steam, if you will.

Good luck on yer errands.


AJ00200(Posted 2009) [#16]
Sorry, didn't see this for a while.

Does anyone know how to make an exe run during startup (before loginn (Ive seen it done)).
-----


GfK(Posted 2009) [#17]
Ok well thanks for explaning how this wont work. Can a mod delete this forum?
I'm not sure that one silly idea warrants the removal of an entire forum.


BlitzSupport(Posted 2009) [#18]
@ AJ00200: Assuming Windows XP, the simplest way is to drag a shortcut to your program here:

C:\Documents and Settings\YOUR_USERNAME\Start Menu\Programs\Startup

(C: should be replaced with your boot drive if different.)

@ Gfk, you are a naughty boy and you know it.


xlsior(Posted 2009) [#19]
The only way to run an EXE before login is to run it as a service (and set its startup type to automatic. If the program needs to display a GUI or other visible parts, then it also needs to be specified as "Interactive".

there is no real easy way of doing this -- microsoft has some command line tools hidden somewhere on their website that allow you to run an app as a service, but those will take some googling to find.
there are also some other 3rd party programs like FireDaemon that can do it through a graphical GUI. The downside of that is that there are a lot of antivirus / malware scanners that will automatically delete the firedaemon stuff because over the years there have been quite a few spyware programs that bundled themselves with FireDaemon to get themselves to launch in the background. firedaemon itself is perfectly harmless, but thanks to these hijackings, some antivirus programs will nuke it when found. (e.g. McAfee)


Ked(Posted 2009) [#20]
I'm not sure that one silly idea warrants the removal of an entire forum.

lol!


AJ00200(Posted 2009) [#21]
Thanks.
I'll see what I can find and post it back here.

The Anti-Virus program may be a problem (cant even change IE settings w/o it popping up-and it dosen't protect FireFox, my main browser.)


AJ00200(Posted 2009) [#22]
Services are run through registry keys at startup.

Place a key in the ...\run_once folder, and it will run before login


xlsior(Posted 2009) [#23]
I was under the impression that that key is identical to the ..\run branch (which starts after logging in), except it will only happen once, after which it gets removed by Windows.


_PJ_(Posted 2009) [#24]
I was under the impression that that key is identical to the ..\run branch (which starts after logging in), except it will only happen once, after which it gets removed by Windows.


Yes, because there are 2 versions of these keys, one version per user and another for the "local machine"/"allusers"

As for services, only certain specific ones run prior to login.
Because many of them are related to the user and their priveledges or customisations.

These are given the flag by the Start DWord = 0x000000004
The Key you want to add it under would be:
"HKEY_LOCAL_MACHINE\SYSTEM\*insert HW Profile Control Set Here*\Services\"


_33(Posted 2009) [#25]
I've created a small text shell if that can be of any use.


AJ00200(Posted 2009) [#26]
I'd like to see it.


_33(Posted 2009) [#27]
AJ00200, want me to e-mail it to you?


AJ00200(Posted 2009) [#28]
Sure
aj0020020@...
Dont worry, nobody else can remember it either. LOL


Ked(Posted 2009) [#29]
Your email address can be found in your profile. I'd remove it from the post.


AJ00200(Posted 2009) [#30]
Yes, I know.
Just thought i'd save you a click.


_33(Posted 2009) [#31]
ok e-mail sent


ShadowTurtle(Posted 2009) [#32]
wich license do you use? i want to see the source in the "Code archives".