All Projects → FrankBoesing → Teensy64

FrankBoesing / Teensy64

Licence: gpl-3.0
C64 Emulation on a Teensy 3.6

Projects that are alternatives of or similar to Teensy64

Retroesp32
Retro ESP32 is a turbo charged Odroid Go Launcher, Emulator and ROM Manager
Stars: ✭ 313 (+179.46%)
Mutual labels:  arduino, emulator, emulation
Ryu64
A Nintendo 64 Emulator made in C#!
Stars: ✭ 36 (-67.86%)
Mutual labels:  emulator, emulation
Higan Verilog
This is a higan/Verilator co-simulation example/framework
Stars: ✭ 35 (-68.75%)
Mutual labels:  emulator, emulation
Play
Play! - PlayStation 2 Emulator
Stars: ✭ 1,117 (+897.32%)
Mutual labels:  emulator, emulation
Ferret
Ferret is a free software lisp implementation for real time embedded control systems.
Stars: ✭ 878 (+683.93%)
Mutual labels:  arduino, teensy
Bsnes Mt
bsnes-based SNES emulator featuring pixel-perfect integer scaling, PNG screenshots, built-in hotkeys, translations, bug fixes, and more.
Stars: ✭ 22 (-80.36%)
Mutual labels:  emulator, emulation
Rf1101se Teensy
Driving one of those cheap RF1101SE boards with a Arduino or Teensy
Stars: ✭ 45 (-59.82%)
Mutual labels:  arduino, teensy
Citra
A Nintendo 3DS Emulator
Stars: ✭ 7,009 (+6158.04%)
Mutual labels:  emulator, emulation
Bizhawk
BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
Stars: ✭ 1,138 (+916.07%)
Mutual labels:  emulator, emulation
Unidbg
Allows you to emulate an Android ARM32 and/or ARM64 native library, and an experimental iOS emulation
Stars: ✭ 1,168 (+942.86%)
Mutual labels:  emulator, emulation
Vita3k
Experimental PlayStation Vita emulator
Stars: ✭ 1,329 (+1086.61%)
Mutual labels:  emulator, emulation
Wakxy
Wakxy is a Wakfu packet sniffer (MITM). Written in C++/Qt with Javascript scripting support.
Stars: ✭ 12 (-89.29%)
Mutual labels:  emulator, emulation
Cemu graphic packs
Community Graphic Packs for Cemu
Stars: ✭ 916 (+717.86%)
Mutual labels:  emulator, emulation
Teensy
teensy示例代码
Stars: ✭ 34 (-69.64%)
Mutual labels:  arduino, teensy
Giovanni
A Gameboy Emulator for the Apple Watch
Stars: ✭ 823 (+634.82%)
Mutual labels:  emulator, emulation
Desmume
DeSmuME is a Nintendo DS emulator
Stars: ✭ 989 (+783.04%)
Mutual labels:  emulator, emulation
Gopher2600
Gopher2600 is an Atari 2600/VCS Emulator.
Stars: ✭ 98 (-12.5%)
Mutual labels:  emulator, emulation
Skyline
Run Nintendo Switch homebrew & games on your Android device!
Stars: ✭ 670 (+498.21%)
Mutual labels:  emulator, emulation
Brutal
Payload for teensy like a rubber ducky but the syntax is different. this Human interfaes device ( HID attacks ). Penetration With Teensy . Brutal is a toolkit to quickly create various payload,powershell attack , virus attack and launch listener for a Human Interface Device ( Payload Teensy )
Stars: ✭ 678 (+505.36%)
Mutual labels:  arduino, teensy
Dmxusb
DMXUSB emulates an ENTTEC-compatible DMXKing USB to DMX serial device with one, two, or n universes.
Stars: ✭ 66 (-41.07%)
Mutual labels:  arduino, teensy

License: GPL v3

Teensy64

Commodore C64 Emulation on a Teensy 3.6 Microcontroller

Please read the forum for more detailed information.

Teensy64

Video

Features

  • Supports Commodore Serial IEC Bus
  • For ILI9341 SPI Display
  • USB-Keyboards (wireless too)
  • 31kHz reSID Audio emulation
  • Audio Line-Out
  • Compatible to SD2IEC
  • Simple drive emulation included (load "whatever.prg" or load "$" )
  • Supports original joysticks
  • very small

About

10 PRINT "HELLO WORLD";    
20 GOTO 10

Some time ago, 2015, someone in the PJRC forum asked me if it was possible to emulate the C64's SID chip on the Teensy 3.2. Since I had already had experience with the porting of audio codecs (mp3/aac/flac), I came up with the idea to search for a "finished" emulator and found the very good reSID. This is also used by VICE. The porting wasn't that difficult, but I've optimized some parts of it to better match the Teensy and its audio library. It is even possible to emulate a second reSID for stereo operation. Unfortunately, current reSID versions require a lot of RAM, so I had to switch to an older version - which is not necessarily worse. Soon the wish for a SID-Player came up and a little later the Teensy 3.6 was announced. With 256KB RAM, more than enough flash, SD slot and 180 MHz it seemed possible to emulate a complete C64. But before that, other hurdles had to be overcome. There was no way to control a display fast enough. However, the T3.6 has a fast SPI interface, which can be supplied via a DMA channel. The first display that crossed my mind was the well-known ILI9341, which had already done a good job for the T3.2. Some time before, a user in the forum had noticed that you can overclock its SPi interface drastically. After some attempts I had a working video player - even before the official release of Teensy 3.6. Paul Stoffregen thankfully provided me with an early pre-release version. After many preliminary considerations and deviations I came to the conclusion that the T3.6 should be capable of a C64 emulation. Unfortunately I forgot almost everything about the C64, and I had to and still have to learn everything anew and read a lot of technical details. I must admit that I have underestimated the VIC (the video chip of the C64) enormously. But that was a good thing, otherwise I would never have started this project. In the meantime I have rewritten the code for the VIC four times.

In the beginning my goal was to make emulation good enough for "Boulder Dash" and other of my old favorite games. This goal has been achieved and I have the ambition to make some demos executable. "Teensy64" is compatible enough to play many games and other programs like the original. For the serial floppy interface the SID sound emulation has to be switched off during the accesses, because reSID requires a lot of computing time. Since the C64 operates this interface "in software" with the CPU and the signal lines have to be controlled more or less exactly in time, I couldn't find a way to keep the sound active even after many ideas and attempts. However, a 1541 floppy disk drive that had been bought extra second-hand was damaged after a short time. It was just too old. After some searching I found the "SD2IEC" project. It seems to be a good replacement and emulates the floppy drive wonderfully. SD2IEC can be connected to the interface of the board and works wonderfully. My plan is to port the SD2IEC software to Teensy 3.6 and integrate it into "Teensy64". I'm not sure if that's possible yet. There is also a way to work with the Teensy64 without an external drive. I patched the emulated ROM a little bit and misused the device ID 1. The following commands are available:

  • Load "$" - loads the directory (display as known with the command "LIST")

  • Load "whatever. prg" - Loads the program from the Teensy SD card.

  • Save "whatever. prg" - Saves the program.

Other commands such as "open" are currently NOT supported for Device 1.

Access is ALWAYS made to a subdirectory "/C64/"which must be present on the SD card.

Thanks to Bill Greiman for his SdFat library with long file names. The C64 was able to support file names of 16 characters in the 80's when Microsoft only supported 8+3 characters.

There are many more TODOs I would like to tackle little by little. The emulated VIC does not yet support the BA signal, and the emulated 6150 processor does not yet know it; -) Therefore there are some inaccuracies in the processor cycles. For example, the VIC can pause the processor or allow write access only. The latter has not yet been implemented. There's still work to be done on the internal timing of the sprites - so "Democoder"tricks like sprite stretching don't work. Also "xFLI" and "DMA Delay" is not yet possible. All things that the developers of the C64 didn't foresee at that time but were discovered by "hackers". Furthermore, only the PAL mode works satisfactorily - but this is only because I haven't found an NTSC program yet!

This project is "Open Source" and everyone is invited to work on it.

Board

Teensy64

Building - see forum for more

Install Arduino IDE - last tested with 1.8.4 and TeensyDuino - last tested with 1.39.

External libraries required to be in sketchbook/libraries:

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].