Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

6502 Processor Emulator

I've created a C++ library that (hopefully) emulates the 6502 (maybe part of the 65C02) processor. I believe it was used in the Commodore, as well as the Nintendo Entertainment System. I've created it as a step toward creating my first emulator, for the NES. However, to put it lightly, the docs I've found suck, so I'm not sure I've implemented every instruction appropriately. To help debug it, I'm creating an application similar to windows' debug that will allow me to essentially program for the 6502 and trace the code. But seeing as how knowing how to program for the 6502 and knowing what each instruction does are essentially the same thing, I must say I don't really know how to program for the 6502.

So, to the point. If anyone has 6502 (and/or 65C02) source code they could donate to my cause, I'd appreciate it. And if you're interested in taking a more active role as an experienced 6502 programmer, I'd appreciate that as well.

If so, contact me by email (anthem.dsl@verizon.net) or ICQ (2063124).

Thanks,
James

«1

Comments

  • melissa_may1melissa_may1 Posts: 937Member
    Hi!

    Interesting project! How do you get this far if you don't know how to program in 6502?

    There are sites that focus on 6502, such as:
    http://www.npsnet.com/danf/cbm/cross-development.html

    They have links to simulators and debuggers there, as well as cross-compilers, which I would assume you need since you don't actually have a 6502 to compile with.

    There's also a bit of info at this site on instruction sets, history, and Commodore and Apple (both of which used 6502) as well as some Nintendo info:

    http://www.geocities.com/SiliconValley/Byte/6508/6502/english/index.htm


    Finally, http://www.6502.org/ is packed with info, links, and message boards geared toward the 6502 fanatic!

    Have fun!

    Melissa


  • anthem2112anthem2112 Posts: 39Member
    : How do you get this far if you don't know how to program in 6502?

    Well, I didn't mean to say I don't know how to programin in 6502. It's just a matter of not knowing exactly what every instruction does.

    Thanks for the info, I'll check it out. I'll post an occasional update on my progress for any who are interested.

  • melissa_may1melissa_may1 Posts: 937Member
    : : How do you get this far if you don't know how to program in 6502?
    :
    By the way, I hope this came across the way I meant it. It wasn't a criticism. In fact, I was amazed that you had done as much as you had to this point, without being experienced in 6502

    :
    : Thanks for the info, I'll check it out. I'll post an occasional update on my progress for any who are interested.
    :

    I'm interested! Let us know how you do!

    Melissa


  • anthem2112anthem2112 Posts: 39Member
    I understood, not to worry.

    Anyhow, at this point I have created a debugging program (similar to Win/dos' debug.exe) for the 6502 emulator I've created. It's not fully featured, but it can assemble, disassemble, do memory dumps and data entry, and trace the code. I may still have a few bugs with the functioning of the individual instructions, but at least the ADC and SBC ops, as well and many others, appear to work correctly. Most importantly, the flow control instructions appear to be functioning.

    Thanks for your interest.

  • YazmoYazmo Posts: 1Member
    : I dont understood, but look very interssting
    it is all about eMulation for PS2 some sort of old stufff
    do you know a good strating point to become a good progammer
    some library tutorial info ect...
    anyway ill read your post often : P
    see you around and GL

    Yazmo




  • melissa_may1melissa_may1 Posts: 937Member
    : I've created a C++ library that (hopefully) emulates the 6502 (maybe part of the 65C02) processor. ...

    Hi James!

    Just wondering how the 6502 emulator project is going...

    Melissa

  • anthem2112anthem2112 Posts: 39Member
    I wish I had good news to report, but unless no news is good news, it's not good. With school and everthing else, I haven't gotten any more work done with it. The 6502 processor emulator is fully functional (as far as I can tell), except for decimal mode arithmetic. I created a debug program for it, sort of a clone of Windows debug, which also works.
  • melissa_may1melissa_may1 Posts: 937Member
    : I wish I had good news to report, but unless no news is good news, it's not good. With school and everthing else, I haven't gotten any more work done with it. The 6502 processor emulator is fully functional (as far as I can tell), except for decimal mode arithmetic. I created a debug program for it, sort of a clone of Windows debug, which also works.
    :
    It sounds like you're doing OK, and keeping priorities straight. It's more important to finish school stuff, though not as much fun.

    I have work that gets in my way too!




    [purple]Melissa[/purple]

  • anthem2112anthem2112 Posts: 39Member
    I wish prioritizing my projects was as cut and dry as prioritizing everything else. I get too much stuff going on at once and leave other things in the dust.
  • BadAttitudeBadAttitude Posts: 14Member
    : I've created a C++ library that (hopefully) emulates the 6502 (maybe part of the 65C02) processor. I believe it was used in the Commodore, as well as the Nintendo Entertainment System. I've created it as a step toward creating my first emulator, for the NES. However, to put it lightly, the docs I've found suck, so I'm not sure I've implemented every instruction appropriately. To help debug it, I'm creating an application similar to windows' debug that will allow me to essentially program for the 6502 and trace the code. But seeing as how knowing how to program for the 6502 and knowing what each instruction does are essentially the same thing, I must say I don't really know how to program for the 6502.
    :
    : So, to the point. If anyone has 6502 (and/or 65C02) source code they could donate to my cause, I'd appreciate it. And if you're interested in taking a more active role as an experienced 6502 programmer, I'd appreciate that as well.
    :
    : If so, contact me by email (anthem.dsl@verizon.net) or ICQ (2063124).
    :
    : Thanks,
    : James
    :
    :

    James, wasn't this the same 6502 that was in Amiga and Apple II?

«1
Sign In or Register to comment.