whenpenguinsattack.com

Wednesday, April 26, 2006

Commodore 64 emulator in PHP

By Justin Silverton

For those of you that still remember the early days of computing, there is a commodore 64 emulator written in PHP.

A live demo is available here: http://phpc64.extra.hu/c64/index.html
the sourcecode is available here: http://phpc64.extra.hu/php_c64_source.tar.gz (released under the GPL License)

Homepage is here: http://phpc64.extra.hu/

Some Commands

The following are supported: NEW, RUN, LIST, LIST N-M, SAVE "NAME", LOAD "NAME",

Programming examples

PRINT "HELLO WORLD"
IF 2<6>"A" THEN XXX (Note: XXX being a line number.)
GOTO XXXGOSUB XXX (...)
RETURN

10 FOR I%=1 TO 1020
PRINT "C64"
30 NEXT I% (Note: variable after NEXT is optional, but recommended)

Known Bugs

-----* doesn't check BASIC programs for syntax errors (because of size limitations)*
Internet Explorer crashes when loading programs longer then approximatly 700 bytes
* when the frame containing c.php is loaded before creation of frame named 's', it causes javascript error; you should reload the page when this bug shows

Tricks

in Opera the execution of the BASIC program stops when INPUT commands are being executed; it will continoue if you activate another tab, then return to the window of the Emulator (you should press RETURN)

2 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home