Skip to content

Vulcalien/6502-emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

6502 Emulator

Some time ago, I decided to create a CPU emulator in order to better understand how these work.

This emulator is built as a C library.

Using the library

  1. Include the emulator header
#include "6502_emulator.h"
  1. Initialize the library
cpu_library_init();
  1. Create and set the CPU's IO functions
cpu_read_byte = read_byte;
cpu_write_byte = write_byte;
  1. Reset the CPU
cpu_reset();
  1. Make the CPU run
while(1) {
    cpu_clock();
}

Resources

  • This website contains information about architecture, registers, instructions and addressing modes.
  • I also used some of the information present in this book to make sure that the emulator behaves correctly.

Releases

No releases published

Packages

No packages published