Commodore 64 emulator 
       ======================
       
       
       Introduction 
       -------------
       
       
       C64JS is a Commodore 64 emulator written in JavaScript. It learned me a lot about emulation of CPU, Video (VIC-II) and Audio (SID) and other stuff (Disk format/file system, Input/Output, keyboard handling) and about performance coding in JavaScript. And that emulation is boring :-) 
       
       
       There is almost no keyboard support yet, but you can use the buttons to load some test programs. 
       
       
        Hard reset  Load ART.BAS  Load keyboard scanner  Load hairline-monochrome.prg  Load VOIDRUNNER.PRG  Load COLOURGALAGA.PRG  Load GALAGA.PRG  Load HELLGATE.PRG  Load MATRIX.PRG  Load rgcd2014.prg  Load FlappyBird.prg  Load flappernote.prg  Load flt-01.prg   RUN  LIST  STOP    press key  WAITFORS.PRG  
       
       
       The red ones are very buggy and crash the emulator. Also, you may need to refresh the page because a 'hard reset' doesn't reset everything. 
       
       
       It is far from finished, but other individual parts have been written: 
       
 (DIR) .D64
 (DIR) Cartridge experiments
 (DIR) CPU experiments
 (DIR) CIA
 (DIR) Keyboard
 (DIR) Memory
 (DIR) SID
 (DIR) VIC-II
 (DIR) Unit tests
       
       Version history 
       ----------------
       
       Version  | Date  | 
       0.0.0.1  | 5 January 2014  | Initial version. Runs test1.prg , test2.prg , test3.prg succesfully! 
 (DIR) test1.prg
 (DIR) test2.prg
 (DIR) test3.prg
       0.0.0.2  | 6 January 2014  | Loads KERNAL, BASIC and CHARGEN. But ends up  in a loop due to no VIC (KERNAL does initialize $d012 to some non-zero value and later on $d012; BNE *-3 :-) .  Fixed by initializing $d012 to zero. 
       0.0.0.3  | 8 January 2014  | Runs KERNAL, BASIC and crashes. 
       0.0.0.4  | 13 January 2014  | Still crashes due to wrong instruction decoding (probably). Added rudimentary disassembler and debugger. 
       0.0.0.5  | 16 January 2014  | Added preliminary VIC-II emulation. Textmodus only. Kernal still ends up in an endless loop though :-( 
       
       0.0.0.6  | 20 January 2014  | Added preliminary SID emulation. Kernal still looping :-( Suspect is that ADC / SBC do not set the overflow-flag correctly and cause an incorrect branch ( BVS ) 
       
       0.0.0.7  | 27 January 2014  | [Branch] .D64 support 
       0.0.0.8  | 28 January 2014  | [Branch] Start writing unit tests for 6510. 
       0.0.0.9  | 29 January 2014  | KERNAL loop was caused by BEQ not branching on Z = 1, but on Z = 0 :s. Another KERNAL loop was caused by initializing I/O (but there is no I/O yet). Patched up KERNAL for now. Added missing opcodes. 
       0.0.1.0  | 29 January 2014  | Prints BASIC startup message! Compare instructions did not handle C-flag very well (reversed logic). Added a bunch of opcodes. BASIC BYTES FREE is incorrect though ('H26439.4215'). 
       0.0.1.1  | 30 January 2014  | Rudimentary keyboard and CIA timer implementation, enough to call timer IRQ and thus show a blinking cursor and waiting for input \o/ Every command yields a syntax error though. Also known as IFYOUREHAPPYANDYOUKNOWITSYNTAXERROR-version. 
       
       0.0.1.2  | 6 February 2014  | Fixed some carry- and overflow-flag bugs. Is able to execute BASIC programs, but bugs when doing calculations. PRINT 10 yields 0.00000128 :-) 
       0.0.1.3  | 8 February 2014  | [Branch] minor work on VIC-II emulation; timings, colors and XSCROLL ($d016) 
       0.0.1.4  | 9 February 2014  | Fixed a lot of ASL, LSR, ROR and ROL bugs (mostly carry-flag related), wrong addressing modes etc. CPU emulation is at ~90% now. Lacks BCD-mode (Binary-coded decimal) and illegal opcodes. ART.BAS other BASIC programs run fine. BASIC BYTES FREE is better now, but still wrong ('51216') because all memory is writable and memory test sees $d011 as highest non-writable address :-) Hence $d011 - $0801 = 51216! Performance in Firefox degraded badly :-( 
       
 (DIR) ART.BAS
       
       0.0.1.5  | 10 February 2014  | VIC-II emulation: implemented HIRES mode ($d011, bit 5). Runs HIRES.BAS , hairline-monochrome.prg and last but not least: MATRIX.PRG ! 
 (DIR) HIRES.BAS
 (DIR) hairline-monochrome.prg
 (DIR) MATRIX.PRG
       0.0.1.6  | 27 February 2014  | Implemented basic memory manager for I/O-traps. 
       0.0.1.7  | ? February 2014  | [Branch] Improved keyboard emulation; all keys on a regular C=64 are supported now. 
 (DIR) previous Hextris C=64
       
 (DIR) next Octettenpletter
       
       
       Related 
       --------
       
 (DIR) Fixed point explanatorial
 (TXT) Bits (.svg) 
 (DIR) Minimalistic SVG library
 (TXT) SVG Logo (.svg) 
 (DIR) Creating SVG from JavaScript
 (TXT) W3 SVG Logo (.svg) 
 (DIR) Tetris for Commodore 64
 (IMG) Tetris screenshot WIP (.png) 
 (DIR) Hextris
 (IMG) Hextris (.png) 
 (DIR) Tetris inner loop MOS6510 / C=64
 (IMG) Tetris Block (.png) 
 (DIR) Hextris C=64
 (IMG) Hextris screenshot WIP (.png) 
 (DIR) JavaScript Tetris in 1.5 kB
 (IMG) jstetris.html (.png) 
 (DIR) Flappy Dino C=64
 (IMG) Flappy Dino preview (.png) 
 (DIR) About me
 (TXT) /img/fallback.svg (.svg)