emulate

Discussion in 'NDS - Emulation and Homebrew' started by matthewd997, Mar 9, 2008.

Mar 9, 2008

emulate by matthewd997 at 9:45 AM (2,855 Views / 0 Likes) 25 replies

  1. matthewd997
    OP

    Member matthewd997 GBAtemp Regular

    Joined:
    Jan 27, 2008
    Messages:
    135
    Country:
    United Kingdom
    please don't take the p*ss outa me again just answer the question,

    what do i need to know to start codin emulators for the NDS, i thought that if i make some of my own I'll learn more ND stop askin noobish questions,

    so what do i need to know?
     


  2. Sinkhead

    Former Staff Sinkhead yay p1ngpong.

    Joined:
    Nov 22, 2006
    Messages:
    3,692
    Location:
    Across the pond
    Country:
    United Kingdom
    You need to start small, make a version of Pong or something, don't be too ambitious.
     
  3. Grimalkin

    Member Grimalkin Waaaaaaaah!

    Joined:
    Jun 9, 2006
    Messages:
    1,173
    Country:
    Canada
    A programming language.
     
  4. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,727
    Country:
    United Kingdom
    What sinkhead says is true: emulators are one of the hardest things to code, especially on a low power system.
    To do it well you will need to know both systems very well or at worst the processors they use. I.E. for a megadrive/genesis emulator for the DS these two documents would have to make complete sense (more or less: you could probably ignore some of the more interesting card reading stuff):
    http://nocash.emubase.de/gbatek.htm
    http://www.romhacking.net/?category=&P...itle=&desc=

    While it is possible to write in a high level language any that are are usually slow, incomplete or have sections rewritten to speed them up: you will likely have to learn ASM for both systems.
     
  5. matthewd997
    OP

    Member matthewd997 GBAtemp Regular

    Joined:
    Jan 27, 2008
    Messages:
    135
    Country:
    United Kingdom
    ok, but if i wanted to do a basic thing like what sinkhead said then what programming language would be best
     
  6. JPH

    Banned JPH Banned

    Joined:
    Jul 11, 2006
    Messages:
    6,892
    Country:
    United States
    I guess try to learn C (That's a link to the Wiki page).

    You should go to your local book store and pick up some programming books...
     
  7. Grimalkin

    Member Grimalkin Waaaaaaaah!

    Joined:
    Jun 9, 2006
    Messages:
    1,173
    Country:
    Canada
    C/C++ and a little bit of ASM.

    Here's a link to a lot of basic programming guides for the DS:

    http://forum.gbadev.org/viewtopic.php?t=8353

    Credit to whoever posted those.
     
  8. pottageb

    Member pottageb GBAtemp Regular

    Joined:
    Aug 27, 2006
    Messages:
    174
    Country:
    United Kingdom
    Can you make games for DS in visual basic?

    Ben
     
  9. hankchill

    Member hankchill I Pwn n00bs.

    Joined:
    Nov 5, 2005
    Messages:
    2,344
    Location:
    Outer Space
    Country:
    Canada
    No.

    And for the original poster; You talk like you've never coded a thing in your life, but you need to understand, you can't just walk in here saying 'I want to code a DS emulator! What do I do?'. To write an emulator is very difficult, as the job of an emulator is the "emulate" a specific piece of hardware, which means understand very thoroughly exactly how that hardware works at a very low level.

    As Sinkhead said, start with a simple version of Pong. If you've never coded before, even that may be too ambitious. Make a very simple text editor, or a simple address book, or something. You can't just start with writing an emulator [​IMG]
     
  10. techforumz

    Member techforumz GBAtemp Regular

    Joined:
    Jan 28, 2008
    Messages:
    183
    Country:
    United States
    I've looked at all the possible specimens for my own (failed) project, and the NES was by far the easiest. But, it's best if you start with a hello world, then a sprite, then controls, then sound, then a game, then an NES emulator, then an [you console's name here] emulator. I've programmed *some*, but not enough to count for anything.

    EDIT: Almost forgot. Skip the MMCs for now, you'll go insane, trust me.

    Oh, and about the 'very simple text editor' I think I wrote the simplest one on the face of the planet, in assembly. It compiled in nasm to exactly 8 bytes, LOL. I didn't even know it was possible for a file to be less then 4KB! Not that it was my original idea or anything, I'm sure it's been done a million times, but I've never SEEN anything that runs, be so small.
     
  11. matthewd997
    OP

    Member matthewd997 GBAtemp Regular

    Joined:
    Jan 27, 2008
    Messages:
    135
    Country:
    United Kingdom
    ok, I'll start of by trying to make a simple game (havn't decided what yet)
     
  12. techforumz

    Member techforumz GBAtemp Regular

    Joined:
    Jan 28, 2008
    Messages:
    183
    Country:
    United States
    Try doing a simple game like Pong.
     
  13. hankchill

    Member hankchill I Pwn n00bs.

    Joined:
    Nov 5, 2005
    Messages:
    2,344
    Location:
    Outer Space
    Country:
    Canada
    And don't forget to do it 1 step at a time.

    1) create the paddle
    2) add movement left or right (or up or down), and be sure to set the boundaries on how far it can go
    3) then create the ball. Don't bother adding any kind of physics to it, just have it bounce around (so when it hits a wall, instead of moving in that direction +1, it'll go -1)
    4) When the ball hits your paddle, just make the acceleration value *-1

    Voila. Very simple pong [​IMG]

    Here, I did this for you:



    be sure you click in the window above to be able to use the arrows. Note I also added in a basic acceleration function in there too.
     
  14. techforumz

    Member techforumz GBAtemp Regular

    Joined:
    Jan 28, 2008
    Messages:
    183
    Country:
    United States
    Ok, I'm familiar to programming and very literate in the area of computer design, but for the life of me I CANNOT program in C. Is there any very very simple guide that is written for noobz like myself? I am familiar with BASIC and bash, if it helps any.

    Oh, and I'm not trying to hijack this thread, but I'm sure that matthewd997 wouldn't mind a C lesson either.
     
  15. TrolleyDave

    Former Staff TrolleyDave Philosolosophising

    Joined:
    Jan 1, 2007
    Messages:
    7,762
    Location:
    Wales, UK
    Country:
    United Kingdom
    http://www.isotton.com/devel/docs/lcpp/
     
  16. techforumz

    Member techforumz GBAtemp Regular

    Joined:
    Jan 28, 2008
    Messages:
    183
    Country:
    United States
    Thanks Trolleydave. I will give this one a try.
     
  17. Regiiko

    Member Regiiko GBAtemp Fan

    Joined:
    Apr 19, 2007
    Messages:
    326
    Location:
    Örebro
    Country:
    Sweden
    Do we really have to feed this mentally challenged troll with information that will potentially lead to his eventual demise because he can't find the compiler or whatever?
     
  18. techforumz

    Member techforumz GBAtemp Regular

    Joined:
    Jan 28, 2008
    Messages:
    183
    Country:
    United States
    Success! I wrote my very first program in CPP. (No I didn't copy from the document.) Very simple command-line only, but it is does work:

     
  19. matthewd997
    OP

    Member matthewd997 GBAtemp Regular

    Joined:
    Jan 27, 2008
    Messages:
    135
    Country:
    United Kingdom
    ok, I just finished learning the programming language called BASIC - is this enough to make simple DS programs?
     
  20. raulpica

    Supervisor raulpica With your drill, thrust to the sky!

    Joined:
    Oct 23, 2007
    Messages:
    10,668
    Location:
    _____________ PowerLevel: 9001
    Country:
    Italy
    No, you at least need C and a little of ASM.
     

Share This Page