Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/davervw/simple-emu-c64?fbclid=IwAR1J1fWypVV7pvGl6CUvcYaRXWDQCNY5OT2hZBX_hCGkevdzfFhOvEEtVSY

Terminal 6502 Emulator with Commodore 64, 128, Vic-20, PET 2001, and TED: C16, Plus/4
https://github.com/davervw/simple-emu-c64?fbclid=IwAR1J1fWypVV7pvGl6CUvcYaRXWDQCNY5OT2hZBX_hCGkevdzfFhOvEEtVSY

6502-emulation c64 c64-emulator commodore commodore-128 commodore-64 pet plus4 vic20

Last synced: about 1 month ago
JSON representation

Terminal 6502 Emulator with Commodore 64, 128, Vic-20, PET 2001, and TED: C16, Plus/4

Awesome Lists containing this project

README

        

# simple-emu-c64 #
Here is a simple Commodore (64, 128, PET 2001, VIC-20, Commodore 16, Plus/4, ...) and 6502 Emulator I wrote from scratch. Runs in a text console window.

![Machines](https://github.com/davervw/simple-emu-c64/raw/master/machines.png)

Notable features

* Emulates MOS6502/6510 series processors as appropriate
* Runs as a Windows Console Program (or in Mac/Linux terminal, source is C#)
* Note that there is a separate cross-platform port to C++ is available at [c-simple-emu6502-cbm](https://github.com/davervw/c-simple-emu6502-cbm) and has [graphical options](https://github.com/davervw/c-simple-emu6502-cbm/tree/unified) specifically for Windows, ESP32, M5Stack, Teensy, ...)
* Text based Commodore BASIC and 6502 Assembly/Machine Code programs supported
* only a few hooks: CHRIN-$FFCF/CHROUT-$FFD2/COLOR-$D021/199/646 (COLOR background/inverse $9001 on VIC-20)
(also hooked READY, GETIN, STOP, SETLFS, SETNAM, LOAD, SAVE for better simulation) *see limitations
* reverse/inverse characters implemented for most systems
* ESC is STOP key
* C64 RAM/ROM/IO/CHARSET banking is implemented!
* Plus/4 implementation has banking enabled, can access almost 60K RAM for BASIC!
* C128 MMU implemented, with two banks of 64K memory, almost 120K for BASIC programs (57K) and variables (63K).
* VIC-20 memory is configurable, can access almost 28K RAM for BASIC! Plus 11K more for machine code. Valid memory configurations include 5, 8, 13, 16, 21, 24, 29, 32, 37, 40 covering combinations building up from 1K LOW + OPTIONAL 3K EXPANSION + 4K BASE + 8/16/24/32K EXPANSION. Note not all expansion memory is always accessible to BASIC.
* See [release](https://github.com/davervw/simple-emu-c64/releases) for third-party Commodore look-alike font, and color customization instructions.

![Sample.bas](https://github.com/davervw/simple-emu-c64/raw/master/Sample.png)

BUILD/INSTALL:

1. Install ROMs in subdirectories c64, c128, pet, ted, vic20 (copy from VICE or distribution or similar)
2. Dependency: [.NET 7.0](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)
3. Build from Visual Studio (simple-emu-c64.sln),
or
from command line or Visual Code (recommend delete simple-emu-c64.csproj): dotnet build
4. Either run the executable, or use:
dotnet run

USAGE:

simple-emu-c64
simple-emu-c64 help
simple-emu-c64 c128
simple-emu-c64 c64 ram 4
simple-emu-c64 c64
simple-emu-c64 c64 startup.prg
simple-emu-c64 c64 walk
simple-emu-c64 c64 walk FFD2
simple-emu-c64 vic20
simple-emu-c64 vic20 ram 7
simple-emu-c64 vic20 ram 28
simple-emu-c64 vic20 ram 39
simple-emu-c64 vic20 walk
simple-emu-c64 vic20 walk FFD2 FFCF
simple-emu-c64 pet
simple-emu-c64 pet ram 32
simple-emu-c64 pet walk
simple-emu-c64 c16
simple-emu-c64 plus4
simple-emu-c64 ted ram 32
simple-emu-c64 ted walk

LIMITATIONS:

* Only keyboard/console I/O. No text pokes, no graphics. Just stdio. Asynchronous input `GET K$` is implemented, and `INPUT S$` works. No special Commodore keys, e.g. function keys, cursor keys, color keys, STOP/RESTORE, RUN, PETSCII graphics characters, etc.
* No keyboard color switching. No border or border color on most.
* Reverse/inverse characters not yet supported on PET.
* Hooks on PET limited to version 1 ROMs.
* LOAD/SAVE/STOP(ESC) not working on PET.
* No screen editing (gasp!) Just short and sweet for running Commodore BASIC in terminal/console window via 6502 chip emulation in software. Uses Windows Console line editor features instead.
* No PETSCII graphic characters, only supports printables `CHR$(32)` to `CHR$(126)`. But does support `CHR$(147)` for clear screen and Home/Left/Right/Up/Down characters too (output only).
* No timers. No interrupts except BRK. No NMI or RESTORE key.
* Loading and saving of files not currently implemented for PET (but Windows clipboard works!)
* No cartridge, no joystick, no paddles, no light pen, no IEC, no serial port, no cassette, no sound, no sprites.
* No Z80 support. Only 6502 compatible.
* Lightly tested. Bugs are lurking!
* No undocumented opcodes.

CREDITS:

* [Micro Logic Corp. 6502 (65XX) Microprocessor Instant Reference Card](https://archive.org/details/6502MicroprocessorInstantReferenceCard)
* Compute's [Mapping the Commodore 64](https://archive.org/details/Compute_s_Mapping_the_Commodore_64)
* Compute's [Mapping the VIC](https://archive.org/details/COMPUTEs_Mapping_the_VIC_1984_COMPUTE_Publications)
* Compute's [Mapping the Commodore 128](https://archive.org/details/Compute_s_Mapping_the_Commodore_128)
* [Commodore 128 Programmer's Reference Guide](https://archive.org/details/C128_Programmers_Reference_Guide_1986_Bamtam_Books)
* [VICE](https://vice-emu.sourceforge.io/) for performing trace comparisons
* Commodore ROMs from [VICE](https://vice-emu.sourceforge.io/) or [Zimmers.net](http://www.zimmers.net/anonftp/pub/cbm/firmware/computers/c64/) or other
* Inspired by [mist64/cbmbasic](https://github.com/mist64/cbmbasic)
* Inspired by [Retroshield 6502](http://www.8bitforce.com/projects/retroshield)
* Built with Microsoft Visual Studio or Visual Code, .NET Framework 4, C#

Read the blog entries at [davevw.com](http://davevw.com)

* [Original and updated announcement](https://techwithdave.davevw.com/2020/03/simple-emu-c64.html)
* [C128 model support added](https://techwithdave.davevw.com/2022/05/simplec128.html)
* [GO 128 enhancment highlighted](https://techwithdave.davevw.com/2022/05/go.html)
* [Video presentation to Commodore Users Europe](https://youtu.be/kYUPLnlQbv0)

And [Slide Presentation](https://github.com/davervw/slides-c64/#readme) is also available