All Projects → DavidBuchanan314 → 6502-emu

DavidBuchanan314 / 6502-emu

Licence: MIT license
A simple 6502 emulator, with I/O via a 6850 UART.

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to 6502-emu

Punes
Nintendo Entertaiment System emulator and NSF/NSFe Music Player (Linux, FreeBSD, OpenBSD and Windows)
Stars: ✭ 217 (+648.28%)
Mutual labels:  6502
neskell
A Haskell 6502 Emulator
Stars: ✭ 56 (+93.1%)
Mutual labels:  6502
kernal64
A Scala Commodore 64, 128, VIC20, CBM2 and SuperCPU emulator
Stars: ✭ 87 (+200%)
Mutual labels:  6502
Nesicide
Integrated Development Environment for the 8-bit Nintendo Entertainment System
Stars: ✭ 244 (+741.38%)
Mutual labels:  6502
awesome-list
Awesome Lists of retrocomputing resources (6502, Apple 2, Atari, ...)
Stars: ✭ 38 (+31.03%)
Mutual labels:  6502
apultra
Free open-source compressor for apLib with 5-7% better ratios
Stars: ✭ 84 (+189.66%)
Mutual labels:  6502
Mednes
A cycle-accurate, cross-platform NES emulator written in C++
Stars: ✭ 189 (+551.72%)
Mutual labels:  6502
6502.ts
Emulators for MOS 6502 based systems written in TypeScript
Stars: ✭ 50 (+72.41%)
Mutual labels:  6502
appler
Apple ][ emulator for MS-DOS, written in 8088 assembly
Stars: ✭ 193 (+565.52%)
Mutual labels:  6502
atari64
Commodore 64 OS running on Atari 8-bit hardware
Stars: ✭ 133 (+358.62%)
Mutual labels:  6502
mos
An assembler, code formatter, language server and debug adapter for the MOS 6502 CPU.
Stars: ✭ 27 (-6.9%)
Mutual labels:  6502
libasm
C++ library of assembler / disassembler that can run on embedded system
Stars: ✭ 23 (-20.69%)
Mutual labels:  6502
fastbasic
FastBasic - Fast BASIC interpreter for the Atari 8-bit computers
Stars: ✭ 108 (+272.41%)
Mutual labels:  6502
X6502
Yet another 6502 emulator that one day dreams of being an Atari 2600.
Stars: ✭ 220 (+658.62%)
Mutual labels:  6502
basicv2
A Commodore (CBM) BASIC V2 interpreter/compiler written in Java
Stars: ✭ 73 (+151.72%)
Mutual labels:  6502
Json65
A JSON parser written in 6502 assembly language.
Stars: ✭ 208 (+617.24%)
Mutual labels:  6502
bbc-micro-3d
BBC Micro 6502 3D Graphics Renderer by Nick Jameson
Stars: ✭ 23 (-20.69%)
Mutual labels:  6502
c64adventures
Adventures into retro 8 bit Commodore 64 programming
Stars: ✭ 14 (-51.72%)
Mutual labels:  6502
elite-a-beebasm
Fully documented and annotated source code for Angus Duggan's Elite-A on the BBC Micro
Stars: ✭ 24 (-17.24%)
Mutual labels:  6502
Fearless-NES
A NES emulator written in Rust
Stars: ✭ 112 (+286.21%)
Mutual labels:  6502

6502-emu

A relatively bug-free and simple 6502 emulator. It is capable of running ehBasic.

Many 6502 emulators make extensive use of macros, which I personally think makes code harder to understand. At the other extreme, some emulators implement each addressing mode of each instruction separately, which is a big waste of time and makes the code harder to maintain.

I chose a middle-ground, and used lookup tables for instruction decoding and address decoding. This also gets rid of the common "giant opcode switch statement" (which can be seen in my CHIP8 emulator project).

Usage Example:

[david@D-ARCH 6502-emu]$ ./6502-emu examples/ehbasic.rom 

Enhanced 6502 BASIC 2.22 (c) Lee Davison
[C]old/[W]arm ?

Memory size ? 

40191 Bytes free

Enhanced BASIC 2.22

Ready
10 X1=59
15 Y1=21
20 I1=-1.0
23 I2=1.0
26 R1=-2.0
28 R2=1.0
30 S1=(R2-R1)/X1
35 S2=(I2-I1)/Y1
40 FOR Y=0 TO Y1
50 I3=I1+S2*Y
60 FOR X=0 TO X1
70 R3=R1+S1*X
73 Z1=R3
76 Z2=I3
80 FOR N=0 TO 30
90 A=Z1*Z1
95 B=Z2*Z2
100 IF A+B>4.0 GOTO 130
110 Z2=2*Z1*Z2+I3
115 Z1=A-B+R3
120 NEXT N
130 PRINT CHR$(63-N);
140 NEXT X
150 PRINT
160 NEXT Y
170 END

RUN
??????>>>>>===============<<<<<<;;;:7143;<<<<====>>>>>>>>>>>
?????>>>================<<<<<<<;;;984+18:;;<<<<=====>>>>>>>>
????>>>===============<<<<<<<;;::85    )/:;;;;<<=====>>>>>>>
???>>===============<<<<<<;:9999875     689::::;<<=====>>>>>
??>>=============<<<<;;;;::7/ '3           56446;<======>>>>
??>===========<<<;;;;;;:::863                 +8:;<======>>>
?>========<<<;6::::::::997!                   &89;<<======>>
?====<<<<<;;;:83567.678874                      ,:<<=======>
?=<<<<<<;;;;:986'      /4                       +:<<<======>
?<<<<<<;;::8675(        (                       9;<<<======>
?;;:999:88460                                 '9:;<<<======>
?;;:999:88460                                 '9:;<<<======>
?<<<<<<;;::8675(        (                       9;<<<======>
?=<<<<<<;;;;:986'      /4                       +:<<<======>
?====<<<<<;;;:83567.678874                      ,:<<=======>
?>========<<<;6::::::::997!                   &89;<<======>>
??>===========<<<;;;;;;:::863                 +8:;<======>>>
??>>=============<<<<;;;;::7/ '3           56446;<======>>>>
???>>===============<<<<<<;:9999875     689::::;<<=====>>>>>
????>>>===============<<<<<<<;;::85    )/:;;;;<<=====>>>>>>>
?????>>>================<<<<<<<;;;984+18:;;<<<<=====>>>>>>>>
??????>>>>>===============<<<<<<;;;:7143;<<<<====>>>>>>>>>>>

Ready

TODO:

  • Decimal mode.
  • Cycle-accurate timing.
  • GDB interface for easy debugging of 6502 programs (and the emulator itself).
  • Implement more hardware devices (mainly a 6522, also some character/graphics LCDs).
  • Turn it into a NES emulator.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].