How to write my own virtual machine like VirtualBox? [closed] - c

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I would like to write virtual machine. Ideally I want to write program, which will be run(emulate) windows 7(from .iso) and show it in window on Windows 7 parent. But I can't understand how to do it. I understand how to emulate cpu, for example, just write wrapper(interface) which will be provide real cpu resources(http://www.codeproject.com/Articles/43176/How-to-create-your-own-virtual-machine), but what next? how to run OS, which will be use this abstraction interface of cpu. Bios starts OS, should I emulate bios? how to do it? From what should I start? Please, describe me the basic steps to implement my task.
Thank you very much!

I'm sure years and years of work go into these type of programs. However, to get a taste of emulating CPU and coding it yourself, have a look at nand2tetris.
It starts by looking at the logic and arithmetic first, slowly working your way towards program control, high-level language and making a operating system.
Hope this helps!
(BTW it provides all materials and software for free!)

Related

How do i create an interface for C Game [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I just created the "Hangman game" using C language, i used GCC to compile it and worked in the terminal.
Let's say that i started with C a week ago, and this is the only programming language i know (Html & CSS arn't programming languages even if i know them). I'm a complete beginner so.
My question is, from the code source i have, how can i create an interface, an app that i'd start on windows (instead of linux terminal), with "buttons" or something like that ?
If i can't do this from the code source, what wold u recommend ?
What would be the software i should use instead of visual studio code to write code (because i guess i'll need a specific software if i want an interface or if i want to compile it in order to ceate a windows app ?)
I'm not english native so i may did some languages mistakes, sorry in advance.
Let me know if i can be more precise and explain something using other words.
There are numerous libraries and frameworks which can provide a GUI for your games.
Qt
Dear IMGUI
libsdl with widgets
and many more, depending on your requirements
Related posts:
https://gamedev.stackexchange.com/questions/1086/what-c-gui-library-can-you-suggest
Game GUI framework
http://samirsinha.com/choosing-a-gui-framework/
It's probably best to study existing games and how they are designed, what libraries people use, and so on, before embarking on building your own from scratch.
Also try reading some of the resources in the GameDev Stack Exchange.

Redirect messages directed at the GPU [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Is there anything as low level as that on any Linux distribution? My overall goal is to redirect the message (instruction) meant for the GPU.
That means I would have to be able to program a driver between the CPU and the GPU which redirects any message to where I'd like (like a packet sniffer, but for GPU instructions and one that would stop the info there).
Is there any native Linux support for this kind of thing? Where do I start and what OS is most recommended for this kind of access?
You would need to modify the GPU driver. There you can insert logging or whatever other redirection you have in mind. Since many graphics drivers on Linux are open-source, this should be possible for many graphics cards. But take note that it won't be portable--you'll need to write some separate code for each major variant of GPU you want to support.
If you have something more specific, like that you're trying to capture OpenGL commands, that might make things easier.

C - What should scripts do in programs [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
If I want to create a game in C with SDL for example, is there a reason of why I should use a scripting language like Lua with it (since alot of commercial games uses a scripting language)? I have heard that scripting languages often are faster to write and easier to read, but what should they do? (graphics? ai? input? etc).
They should interact with the various "programming primitives" that the native code implements. That is, the native code should only do enough to allow the scripts to function within the game (although "function" can sometimes mean speed-wise).
If that sounds cyclical... it is. There's no complete way to define at the beginning of development what responsibilities the native code will have as the project progresses.

arm or mips core to implement in fpga [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am trying to implement a risc processor core in fpga. Is it a good idea to do such a project. I am confused whether to implement an arm core or mips core. Please tell me which would be a better option consider that i am a starter in this field.
Yes such a project would be pretty cool and you would learn a lot. That being said I believe you should build smaller things first. As for ARM vs. MIPS, the complexity is equivalent, but I would pick ARM cause it's actually the most popular processor architecture in the world right now, so the knowledge you would gain would be highly practical.
I recommend starting with a book called "CODE". It will teach you all the basics in a very clear way. Once you read that you should be able to build logic gates, full adders and even a simple generic purpose computer, all using nothing but relays and wires.
Once you've done those smaller projects then try something larger with transistors, protoboards or FGPA. One very interesting computer you could build is the IAS, also called the Von Neumann machine, which is the base for all modern computers (yet is very simple and elegant).

Java J2SE Code Compatibility in any OS [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am in a confusion now. I am developing a java project in windows platform. but now, the problem is how can I get to know if my all codings (Java J2SE) will work in any OS? In my codings there are varies parts like serial port programming, smslib, RXTX lib, database connections (ODBC and JDBC). Can any one offer my some ideas or any solution for this?
Thank you very much.
Your code should work as long as you are not using any OS native APIs. Im afraid you might be doing so as you have mentioned your code uses things like serial port programmin, RXTX lib etc. If NOT then you are good to enjoy the Java 'write one and run anywhere' feature.

Resources