Computer Emulators

Moderators: None (Apply to moderate this forum)
Number of threads: 56
Number of posts: 127

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
6502 Processor Emulator Posted by anthem2112 on 16 Oct 2001 at 10:27 PM
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

Report
Re: 6502 Processor Emulator Posted by melissa_may1 on 20 Oct 2001 at 4:42 PM
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


Report
Re: 6502 Processor Emulator Posted by anthem2112 on 20 Oct 2001 at 5:29 PM
: 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.

Report
Re: 6502 Processor Emulator Posted by melissa_may1 on 20 Oct 2001 at 5:37 PM
: : 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


Report
Re: 6502 Processor Emulator Posted by anthem2112 on 20 Oct 2001 at 7:24 PM
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.

Report
Re: 6502 Processor Emulator Posted by Yazmo on 7 Nov 2001 at 1:20 AM
: 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




Report
Re: 6502 Processor Emulator Posted by melissa_may1 on 2 Dec 2001 at 11:47 AM
: 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

Report
Re: 6502 Processor Emulator Posted by anthem2112 on 21 Dec 2001 at 10:07 PM
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.
Report
Re: 6502 Processor Emulator Posted by melissa_may1 on 22 Dec 2001 at 8:10 AM
: 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!




Melissa

Report
Re: 6502 Processor Emulator Posted by anthem2112 on 22 Dec 2001 at 8:27 PM
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.
Report
Re: 6502 Processor Emulator Posted by BadAttitude on 27 Apr 2002 at 4:52 AM
: 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?

Report
Re: 6502 Processor Emulator Posted by anthem2112 on 27 Apr 2002 at 10:13 AM
:
: James, wasn't this the same 6502 that was in Amiga and Apple II?
:

Unfortunately I'm not quite old enough to have lived the glory days of those computers, nor do I know much about them. But certainly it may be the same 6502.

If you (or anyone, for that matter) would like a copy of my emulator/debugger, email me and I'd be happy to oblige. My email address should be given above.

James
Report
Re: 6502 Processor Emulator Posted by blip on 14 Jul 2002 at 7:46 PM
Hi people, here's a good page, the C64 programming one. Find the chapter on machine language programming.

http://www.c64.ch/programming/C64PRG10.txt

Here's some other pages:
http://www.c64.ch/programming/memorymap.asp
http://www.obelisk.demon.co.uk/6502/

I've got a C64 at home (with a 6510 processor), so I could test some code for you (but it's tedious because I must use POKEs in BASIC). E-mail me any code at bthompson67665@yahoo.com

Here's a loader for a game called DEFENDER I hand-disassembled included with the hex dump in the comments, real comments are after pipes:
;Load at address $02A8:
sei ;78
lda $01,zp ;A5 01 | Use zero-page addressing.
and #$FE ;29 FE | Clear bit0.
sta $01,zp ;85 01 | Use zero-page addressing.
lda #08 ;A9 08 | This load the logical file number (file handle).
ldx #08 ;A2 08 | Device #8, the first floppy drive.
ldy #$FF ;A0 FF | Secondary addr on serial bus, $FF if none specified.
jsr $FFBA ;20 BA FF | SETLFS: Set First and Second Logical Address.
lda #03 ;A9 03 | Length of the filename, not zero-based.
ldx #C9 ;A2 C9 | Point Y:X to the file name, at $02C9.
ldy #02 ;A0 02
jsr $FFBD ;20 BD FF | SETNAM: Set Filename
lda #00 ;A9 00 | 0=Load, 1=Verify
jsr $FFD5 ;20 D5 FF | LOAD: Load RAM from device.
jmp $8009 ;Jump to code.
.db "DD*" ;This loads the defender program, this is at address $02C9.

Report
This post has been deleted. Posted by vpvp on 11 Sept 2008 at 6:59 PM
This post has been deleted.
Report
This post has been deleted. Posted by vpvp on 11 Sept 2008 at 7:03 PM
This post has been deleted.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.