3d ascii engine !

Started by
26 comments, last by NexusOrganicus 21 years, 5 months ago
Hi (off and on topic)
Cwizard !
What should i say now ?
I am not really good in programming thats true
i don´t wanna create a opsystem like windows
I wanna do fun stuff /
I am not saying that i have to do these things but i want to, so i will do them !by time
I just wanna learn how things work and try it for myself
i know that i takes a lot of time to create, for example a 3d engine or an operating system or what ever . But when you always tell the people that i takes years and years they never start doing these things ! They hang around and play with their compiler and stop at a point .Then everythings gone.
And asking questiond is the best way to learn !.
When you never ask how something works you will never get an answer.
It was very good to start that discussion about 3d because now i know that there is more to do then to create an array .!
Took my math-books searched in the internet (lineare algebra)
(matrizes) and so on .
Dont expect that i write a 3d render engine tomorrow
Don´t worry to much about the time !.

For me its a way to learn this stuff .
Maybe its stupid but its my way to get near these things.
And it really helps when people send you links or some example how they did it , how they went through all this .
Where to start and how to start and so on .
It would help me if you sent me some examples of that amiga op sytem you´r talking about that would be better than just talking about how long it would take to .........

dont take everything too serios ...( i am just a beginner and still dreaming) and i am thankfull for any information .


_________________**thanks for your reply**__________________
NexO


_______D___
Advertisement
Nexus, I think it''s great your asking questions, and I agree that one should always try to point to the right direction. My last response, about the OS, was perhaps a bit too discuraging, as it did sound like you didn''t like your current OS, and wanted to make a new one.

The Amiga OS? I hope you know about the Amiga computer, and the Amiga OS was, of course, its Operating System. It is/was a simple, bare-bone, OS as well as it was great and revolutionary at the time. The reason I used it as an example had to do with that it was a OS made for a specific piece of hardware, in contrast to Windows or UNIX, which must be able run on and handle every piece of hardware and combinations thereof, that exists on the PC market. I cannot give you any source, as it is copyrighted and not publicly available; although, it is quite easy to disassemble and decipher as most of it is written in assembly.

I shall try to point out some major parts of an OS:

  • Must be able to detect, configure and control the hardware in the computer.
  • Although not really part of the actual OS, it must have a File System.
  • A complete API which the OS itself as well as Applications can use to control the computer and access all of the OS''s functionality.
That the basics, then for a more advanced system, more stuff is needed:

  • GUI (and/or Shell) with a graphics API for programs to use to display stuff.
  • Virtual Machine Model. That is, to provade each process (program) with its own "virtual machine" of memory and hardware. This includes virtual memory, multi-tasking, paged memory etc.
  • Security Model, with users/groups with various privaleges.
  • list goes on and on and on and ...
Huch
That sounds really hard !
_________________________
I think i should start with my 3d enging and read some books about matrices and so on ...........
The OP has to wait i think .
You are right when you say it takes years ....
But what about Dos ---
you only have the autoexec.bat config.sys and the command.com
right ? 3 Files to start a pc ( ups forgot the dos folder )
but if i reduce the possibility´s of my op it would be easier
to programm.___Just like an old game console.
Do they use assembly because of the speed ?

Cwizard thanks for your advice ,

Nexo
________________________________________________________________
_______D___
NexusO,

A simple operating system consists of three main parts.

Firstly, it provides a task scheduler to control which process is actually running in a given timeslice.

Secondly a memory manager is present to allocate memory to programs and ensure that no program can access memory it isn''t supposed to.

Thirdly, a support structure for applications is provided, so that they can perform functions like drawing to the screen. These system calls could be a dynamically linked library, an interrupt intercept routine, or something else.

However, you can get even more simple; DOS was originally just the third part of the above; it just set up a lot of interrupt handlers.

Talisman is at the level of DOS currently, in terms of features and complexity.

HTH,
I.

www.coldcity.com
code, pics, life
[size="2"]www.coldcity.com code, art, life
I would recommend that you start your journey with something other than an OS . It is pretty hard, as you must start from the bare bones. For example, consider how your OS code is going to be executed. In normal case, it''s the OS that execute your executable, but in this case your code is the OS, and it can''t execute itself before it has been executed.

And you must code the first part of the OS in assembly, as there is probably no compiler out there that can compile for your custom OS. You will probably need to make your own compiler and/or extension to another compiler, if you want to code in C/C++ for your OS. Another option, is to emulate DOS or Windows programs, so you can make them in MS VC++ or similar.

It''s not those 3 files that make up dos (I think). Those are configuration and extension files, and not the core of DOS.

For fun, while I''m ranting here, I''ll try to explain some basics of the Amiga OS (which is the only OS I know inside-out).

On the Amiga, all the OS code resides in a 256 kB, 512 kB, or 1 MB ROM, located on the motherboard. This is only the core, not extensions and graphics etc. The content of the ROM is mapped into the end of the linear address space (the byte at address 0xFFFFFFFF is the last of the ROM). When the computer is powered up, a special chip initializes the processor and sets the program counter (the address of next instruction to execute) to an address in the ROM, which is the computer initialization code.

The initialization code will scan the hardware to determine and configure the computer model, processor model, memory banks, disk and hard drives, expansion boards, etc. It will then make the API ready. (All OSes are really a gigantic hierarchial and complex structure, plus the code to control this structure.) The Amiga OS are divided into several "libraries" (comparable to DLLs), where the main one is called Exec. Each library has a "base address" which points to a structure with a lot of interesting info about the library and system it''s concerned with. On "the other side" of the base address there is usually a huge "jump/function table" with jump instructions to the functions of that part of the API. So, the init code, will load Exec Library''s base structure into main memory, and store the address to the base in address location 0x00000004. So, an application will be able to get the "exec base" by reading that hard coded address, and from it be able to access all API functions of the Exec Library, which includes functions for opening every other library; Dos, Intuition, Graphics, Serial, Expansion, etc.

That did probably not make any sense to anyone not familiar with Amiga coding, but it could serve as a hint of a general idea of an OS, and I don''t have time to write any more .

A last note. I think it would be a great experiance for every coder, to try to make an OS. If you do, you will discover a great deal of thing you didn''t know you didn''t know, and hopefully learn much.
I thank you for all that information ,
When i hang aroud here in the forum , i really get depressed,
because then i know that i know nothing about programming at all .
________

It´s not so easy but i will hold on
thanks for all your replys
NO
_______D___
CWizard, nice overview. I miss my Amiga days....

NexusO: Hang in there man. You''ll get there



www.coldcity.com
code, pics, life
[size="2"]www.coldcity.com code, art, life
If you are going to write a ASCII 3D engine from scratch, you''re going to need to become a MASTER at vector/matrix math.

I attempted to make a 3d engine a long time ago, in 320x200x256 DOS, and got as far as drawing a rotating 3d wireframe cube before I gave up.

I still can''t think about writing texture-mapping without screaming...


You have the added fun of shading using ASCII!


:/



NexusOrganicus.GoodLuckHaveFun();

This topic is closed to new replies.

Advertisement