asm game

This is a discussion on asm game within the Game Programming forums, part of the General Programming Boards category; I want to make a game on my laptop by accessing the hardware directly using asm. I want begin with ...

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    127

    asm game

    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.

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    What platform?

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    127
    HP Pavilion dv6000
    Accessing hardware directly so OS isn't important, but I run windows vista or linux(ubuntu) depending on my mood...

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    And you think asm doesn't produce binary code for the OS because why?

  5. #5
    Registered User
    Join Date
    Jun 2008
    Posts
    127
    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?

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    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.

  7. #7
    Registered User
    Join Date
    Jun 2008
    Posts
    127
    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.

  8. #8
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    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.

  9. #9
    Registered User
    Join Date
    Jun 2008
    Posts
    127
    A VM wouldn't handle that?

  10. #10
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Well, yes, but every VM I've ever seen is running an OS.

  11. #11
    Registered User
    Join Date
    Jun 2008
    Posts
    127
    Lost...
    I thought the point of a VM was to hide an operating system?

  12. #12
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    The point of a VM is to run a different operating system.

  13. #13
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    Why not just use a simpler programming language that is platform independent, and just build one for windows, and one for linux?

  14. #14
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    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.

  15. #15
    Ex scientia vera
    Join Date
    Sep 2007
    Posts
    478
    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."

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-07-2010, 11:08 PM
  2. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 02:46 PM
  3. 2D RPG Online Game Project. 30% Complete. To be released and marketed.
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 10-28-2006, 12:48 AM
  4. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM
  5. My graphics library
    By stupid_mutt in forum C Programming
    Replies: 3
    Last Post: 11-26-2001, 05:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21