Skip to content

Emulating a 6502 processor, written originally for the 3rd semester mini project

License

Notifications You must be signed in to change notification settings

dragon540/6502Emulator

 
 

Repository files navigation

6502Emulator

This software emulates the working of the 6502 microprocessor(although the functioning and reliability is limited as yet). Input can be given to the emulator (currently in form of equivalent opcodes of the program), and instruction level execution can be seen.

This GUI based 6502 emulator was written originally for the mini project requirement of the 3rd semester of our engineering course.

Screenshot of the emulator running a program multiplying 3 and 5

Screenshot of the emulator running this program multiplying 3 and 5, and storing the result in A register

Dependencies

  • Gtk-3.0

Build

Once the project repository and Gtk-3.0(the only external library used) are installed properly, make can be used to generate the executable.

$ cd 6502Emulator
$ make

An executable will be generated at project directory

How To Run?

This emulator, as of now, depends on third party assemblers to convert the 6502 assembly code into equivalent opcodes.

Use a third party assembler like this or this to convert assembly code (example programs are given at asm_ex) into equivalent opcode. Then simply copy the opcode and paste it into the input window of the emulator, and click on the Load button to load the opcode into the memory. Then use one of the two modes of execution to run the program.

There are two modes of execution in the emulator

  1. Step Run - runs the program, executing one instruction with each click.
  2. Continuous Run - executes the whole program on a single click.

Memory Dump button can be used to read the first 512 words of the memory.

Clear button can be used to reset the emulator.

References

Some references which are useful for learning about the 6502 processor and its emulation are :

Original Contributors

About

Emulating a 6502 processor, written originally for the 3rd semester mini project

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.4%
  • Makefile 1.4%
  • Assembly 1.2%
  • CSS 1.0%