emulate

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

  1. matthewd997
    OP

    matthewd997 GBAtemp Regular

    Member
    135
    1
    Jan 27, 2008
    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

    Sinkhead yay p1ngpong.

    Former Staff
    3,692
    0
    Nov 22, 2006
    Across the pond
    You need to start small, make a version of Pong or something, don't be too ambitious.
     
  3. Grimalkin

    Grimalkin Waaaaaaaah!

    Member
    1,173
    2
    Jun 9, 2006
    Canada
    A programming language.
     
  4. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,071
    8,783
    Nov 21, 2005
    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

    matthewd997 GBAtemp Regular

    Member
    135
    1
    Jan 27, 2008
    ok, but if i wanted to do a basic thing like what sinkhead said then what programming language would be best
     
  6. JPH

    JPH Banned

    Banned
    6,892
    11
    Jul 11, 2006
    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

    Grimalkin Waaaaaaaah!

    Member
    1,173
    2
    Jun 9, 2006
    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

    pottageb GBAtemp Regular

    Member
    174
    0
    Aug 27, 2006
    Can you make games for DS in visual basic?

    Ben
     
  9. hankchill

    hankchill I Pwn n00bs.

    Member
    2,344
    41
    Nov 5, 2005
    Canada
    Outer Space
    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

    techforumz GBAtemp Regular

    Member
    183
    0
    Jan 28, 2008
    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

    matthewd997 GBAtemp Regular

    Member
    135
    1
    Jan 27, 2008
    ok, I'll start of by trying to make a simple game (havn't decided what yet)
     
  12. techforumz

    techforumz GBAtemp Regular

    Member
    183
    0
    Jan 28, 2008
    United States
    Try doing a simple game like Pong.
     
  13. hankchill

    hankchill I Pwn n00bs.

    Member
    2,344
    41
    Nov 5, 2005
    Canada
    Outer Space
    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

    techforumz GBAtemp Regular

    Member
    183
    0
    Jan 28, 2008
    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

    TrolleyDave Philosolosophising

    Former Staff
    7,762
    230
    Jan 1, 2007
    Wales, UK
    http://www.isotton.com/devel/docs/lcpp/
     
  16. techforumz

    techforumz GBAtemp Regular

    Member
    183
    0
    Jan 28, 2008
    United States
    Thanks Trolleydave. I will give this one a try.
     
  17. Regiiko

    Regiiko GBAtemp Fan

    Member
    326
    0
    Apr 19, 2007
    Örebro
    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

    techforumz GBAtemp Regular

    Member
    183
    0
    Jan 28, 2008
    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

    matthewd997 GBAtemp Regular

    Member
    135
    1
    Jan 27, 2008
    ok, I just finished learning the programming language called BASIC - is this enough to make simple DS programs?
     
  20. raulpica

    raulpica With your drill, thrust to the sky!

    Supervisor
    11,008
    7,246
    Oct 23, 2007
    Italy
    PowerLevel: 9001
    No, you at least need C and a little of ASM.