I want to make a game on my laptop by accessing the hardware directly using asm. I want begin with just a hello world kinda thing. The problem is, I don't know where to start. Any help?
I want to make a game on my laptop by accessing the hardware directly using asm. I want begin with just a hello world kinda thing. The problem is, I don't know where to start. Any help?
Last edited by herWter; 10-19-2008 at 06:05 PM.
What platform?
HP Pavilion dv6000
Accessing hardware directly so OS isn't important, but I run windows vista or linux(ubuntu) depending on my mood...
And you think asm doesn't produce binary code for the OS because why?
Because I'm very new to asm and programming. I'm especially new to accessing hardware directly, so cut me some slack. But that kind of raised a question for me. Which parts of the program would be OS specific if not the graphics part?
Well, Ubuntu isn't going to run something if it's not in ELF format, I wouldn't think. The MS version would have to have code to link in the DLL runtimes.
I wasn't planning on having it run through an operating system. Most likely running through a vitual machine.
edit::I'm not sure if this is the best thing to do, or if this is even possible, so PLEASE correct me if im wrong.
Last edited by herWter; 10-19-2008 at 06:46 PM.
No OS, eh? You won't have much of a file system without that. How were you planning to load your instructions into memory? I doubt you have a front panel you can toggle your program into.
A VM wouldn't handle that?
Well, yes, but every VM I've ever seen is running an OS.
Lost...
I thought the point of a VM was to hide an operating system?
The point of a VM is to run a different operating system.
Why not just use a simpler programming language that is platform independent, and just build one for windows, and one for linux?
I wrote some code that runs in Xen that "boots directly" into the "application code". You can do that, for sure. You just need to know how to "trick" the OS into loading your image, and how to generate an image in the first place.
In Xen, this consists of "replacing" hvmloader with your own basic guest code. [This assumes you have a processor that supports HVM (Hardware Support for Virtulization - AMD-V or Intel VT). Normally, the OS load-process starts with "hvmloader" loading the BIOS, but if you want to run your own OS, you just replace the hvmloader with your own file and it will start to execute "your code" directly. Of course, you will have to write quite a bit of software to build a simple guest that does anything "interesting".
Edit: You can of course also produce a "bootable disk image", in the same way you would normally produce a bootable disk - for example, I produced memtest86 test images from the makefile, and in another project I took the basics of that and modified it to produce a different binary.
--
Mats
Last edited by matsp; 10-20-2008 at 02:50 AM.
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
What you want to do is look at sites like osdever.net, which will teach you to code a primitive boot sector as well as a primitive kernel. From there, you will have direct access to the hardware, and, for example, the screen buffer.
"What's up, Doc?"
"'Up' is a relative concept. It has no intrinsic value."