Web-based 6502 emulator

Let's talk about anything related to the 6502 microprocessor.
Post Reply
PaulJohnstone

Web-based 6502 emulator

Post by PaulJohnstone »

Hi all,

I have just completed writing a web-based 6502 emulator in PHP/JavaScript to teach never-assembled-before persons the basics of assembly. Whilst I have deliberately excluded some opcodes, addressing modes and features (beyond the scope of an educational/training tool for the more learned), it successfully executes the largest majority of 6502/65c02 programs I have encountered on the web.

What I was wondering was if anybody had written a program/a set of programs/a test suite that incorporates most of the 6502's abilities, and produces a standard output, so that one could use it to check whether a 6502 implementation works without err.

I haven't yet found anything like it on the web, but thought some people with interests in 6502 resources other than the Internet might know of something.

My web-based emulator is easily usable and configurable by beginners and pro's alike. It's efficient and helpful - and is open source. I will be publishing it as soon as it has been fully tested in terms of 6502 operational compliance and technical specification adhesion, and cross-browser compatibility.

I'll post the URL when I have, it would be nice to hear some feedback from more professional 6502 users.

Kindest thanks,
Paul
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

6502 instruction test program

Post by GARTHWILSON »

I believe this man can help you:
Ruud Groetjes (I believe he's Dutch)
ruud.baltissen@abp.nl
http://ruud.c64.org

Now he is designing a 32-bit 6502, but he has previously written a program to test the operation of all the older 6502's instructions.

Garth
PaulJohnstone

Thanks Garth

Post by PaulJohnstone »

Hi Garth,

Thanks for your URL - much appreciated.

With regards to the 32-bit 6502, I also considered that whilst writing my emulator but decided to keep it to spec without letting my inspiration and interest run away with me and end up writing an emulator for a non-existent CPU :)

However, I have already decided to write a advanced version when I have fully tested what I have.

Fortunately the entire thing can be configured with just a few variables in a PHP script, so can easily duplicate a 32, 64, 128-bit and onwards CPU.

I also want the advanced version to support all the addressing modes, as well as interrupts and a few of the other things I have deliberately excluded.

Anyway, thanks again for the URL.

Paul
mysterd604
Posts: 1
Joined: 24 Oct 2002

Emulation in General

Post by mysterd604 »

Hi,

I'm interested in doing some emulation/simulation, and I suppose the 6502 is a good place to start ... it seems relatively simple (compared to other chips) and if I manage to get a good emulator for that chip, I might be able to do something with it. Plus it'd be cool to write an emulator.

Anyway, where should I start? Obviously I need to acquaint myself with 6502 assembly ... do you have a link for your emulator yet, so that I could learn on it?

Once I get that down, where would I be able to get myself an opcode listing and some ideas on technique? I remember I had a bunch of links a while ago, but then acadamia decided to interrupt my otherwise unhurried life =) and the links dissapeared.

TIA,
Don Lavelle

(P.S. - I know there are other emulators out there. People don't seem to like it when I ask for advice on re-inventing the wheel, but I'm sure you will all be able to appreciate how fun such re-invention is. =) )
User avatar
Mike Naberezny
Site Admin
Posts: 296
Joined: 30 Aug 2002
Location: Northern California
Contact:

Post by Mike Naberezny »

Don,

You can find a list of emulators/simulators at:
http://www.6502.org/crossdev/emu/index.htm

There is an opcode list at:
http://www.6502.org/tutorials/6502opcodes.htm

More information about the 6502 and 65C02:
http://www.6502.org/datasheets/datasheets.htm

These links and more:
http://www.6502.org

Best Regards,
Mike
usotsuki
Posts: 70
Joined: 23 Dec 2002

Post by usotsuki »

I modified Marat Fayzullin's http://fms.komkon.org M6502 emulator to support the 65C02 (it took some tweaks by others, but it works quite well, even with Turbo C++ 1.01).

http://sourceforge.net/projects/dapple

Look for "M65C02 1.4". I don't use it in my own emulator anymore, but it's useful for anyone looking to emulate a system.

-uso.
Post Reply