Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

navdhakar/6502cpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

this is 6502 cpu emulator, that can run assembly programs,

base emulator was picked from here: https://github.com/bzotto/MCS6502

this repo contains memory implementation, programs loading functionality for this cpu.

6502 CPU specs:

  • registers: a, x, y, sp, pc, p, sp

  • memory: 64 KB [(0x0000-0x00FF)-zero page, (0x0100-0x01FF)-stack memory, (0x0200-0xFFF9)-this is where we store code and data, (0xFFFA-0xFFFF)-various],

  • cycle: we can control the cycle rate.

  • instuction-set: https://www.masswerk.at/6502/6502_instruction_set.html

playing with emulator.

compiling:

gcc -g emu.c MCS6502.c -o emu -lm 

build a program before running it in cpu, available in /programs

running programs:

./emu programs/basic.rom

now we can run wozmon(kind of!!)

./emu programs/wozmon.rom
  • our cpu load wozmon

  • can run in terminal as dispaly device(need more work)

  • need some input device

  • TODO

  • write BIOS

  • write some interesting program wozmon source:

https://github.com/jefftranter/6502

references to study about 6502 architecture and how it works:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published