News for hackers. Stuff that matters.
Re:BASIC Computer Games Book, published in 1978 by cubicle67 on Thursday November 04, 2010 @02:13AM (#1867891)
If anyone's interested, I wrote a Vic20 clone (not an emulator) in javascript http://quietcode.com/vic It's not finished (none of my stuff ever is), and to do much with it you need to open up a javascript console and drive it via its js api

Without the console, all you can do is type and move the cursor

I've mapped a number of the more important memory locations, including screen, character mapping, colours etc.

If you're game, give this a shot (in a js console)

  vic20.mem.poke(7680,1)
which will put a capital A in the top left corner of the screen. Colour memory is located starting 38400, so we can change the colour of that A to red by adding

  vic20.mem.poke(38400,2)
I'd like to add a basic interpreter and the rest, but I keep getting distracted by other things. Oh, and the black strip along the bottom of sort of a cpu usage graph.

Works well in Safari, and mostly well in FF. Chrome seems to have a problem with the cursor, and IE, well... it's a no go since it's all canvas based.

[Edit 2: entire thing is written in Coffee Script]

Re:BASIC Computer Games Book, published in 1978 by sswam on Thursday November 04, 2010 @02:21AM (#1867910)
sounds interesting, what is the difference between a clone and an emulator? do you mean it looks like a Vic20, but does not actually emulate 6502 (or whatever) machine code?
Re:BASIC Computer Games Book, published in 1978 by cubicle67 on Thursday November 04, 2010 @02:52AM (#1867987)
yes. Clone probably isn't the right word either, but I don't know what is.

The idea was to match, as closely as possible, the output and behaviour of a Vic20, but not the internals. I want it to be Basic compatible, and that includes making most of the memory locations behave properly, but not machine code compatible

Re:BASIC Computer Games Book, published in 1978 by metageek on Thursday November 04, 2010 @09:40AM (#1868786)
OK, so it's an emulator for VIC-20 BASIC, but not for the VIC-20.