GOTO 2016 • Emulating a 6502 system in Javascript • Matt Godbolt



This presentation was recorded at GOTO Chicago 2016
http://gotochgo.com

Matt Godbolt – Low-level Latency Geek, DRW

ABSTRACT
It’s said you should never meet your heroes. They’re wrong! This is the story of Matt meeting and getting to know one of his heroes: the 6502 microprocessor. It powered the Apple IIe […]
Read the full abstract here:
http://gotocon.com/chicago-2016/presentation/Emulating%20a%206502%20system%20in%20Javascript


https://www.facebook.com/GOTOConference
http://gotocon.com

Original source

23 thoughts on “GOTO 2016 • Emulating a 6502 system in Javascript • Matt Godbolt

  • May 19, 2019 at 18:02
    Permalink

    One error in the talk: You certainly can compare with both X and Y index registers on the 6502.

  • May 19, 2019 at 18:02
    Permalink

    I find this fascinating but I don't quite understand where to learn 6502 assembly efficiently on the web. I could get a book but I'm always afraid of trying to learn a programming language with books. I prefer to follow good video classes, and then complement it with all the documentation there is online.

  • May 19, 2019 at 18:02
    Permalink

    is there a reason the var pc started out at the address 0xfffe? Something special about RAM that I'm missing?

  • May 19, 2019 at 18:02
    Permalink

    I'd like to know what the actual speed of the emulation is. Since you mentioned things that needed special optimization, I gather that the detailed timing-step emulation has trouble keeping up with real-time?

  • May 19, 2019 at 18:02
    Permalink

    Amazing video, brings me back to 13 years old trying to learn assembly on my Apple II+. This completely demystifies emulators for me. Thanks

  • May 19, 2019 at 18:02
    Permalink

    Always thought that most old computers including the BBC had raster interrupts like on the C64. A raster interrupt happens when the "gun" hits the requested line.

  • May 19, 2019 at 18:02
    Permalink

    Just thought…
    Just need someone now to take an ARM processor that is running Javascript, placed in/on a board with some additional logic that emulates the 6502 signals on the processor pins. The board would be the same size as the original 6502 and have the inline pins down each side of the package. So basically you would have a 6502 processor, but inside it there will be an ARM chip running Javascript on top of an OS etc. You could then take a real BBC computer, place the ARM/Javascript/6502 processor in the original 6502 processor slot on the BBCs PCB and run BBC software on it. Then in 50 years time someone will write an emulator that mimics the ARM/Javascript/6502 processor using a Quantum processor using QSscript, then someone will suggest making an ARM/Javascript/Quantum/QSscript/6502 processor. Then in 100 years…

  • May 19, 2019 at 18:02
    Permalink

    I have only just discovered this BBC emulator. I actually programme educational physics simulations using Javascript.
    My first computer after graduating (in engineering) was a BBC Model B Microcomputer and yes I bought a lot of the games that are now playable in your browser using this amazing emulator. Starship Command, Elite, Acorn Arcade Action, Frak! etc
    Unfortunately I sold my BBC computer for about £300 with all the software and a floppy drive. I remember the floppy drive cost as much as the computer. It was replaced with an Amiga 500, which I still have.
    I remember before I bought the BBC computer I went to a computer exhibition in London and Acorn/BBC had a stall, no computer to see, just a colour brochure. I decided then and there to buy one even though Acorn had no hardware, other work colleagues bought Spectrums… and then the witty banter started. The great British tribal battle between BBC and Spectrum owners/gamers.
    Elite almost killed my social life and my friends couldn't understand my obsession with the game.

  • May 19, 2019 at 18:02
    Permalink

    Calling the 1980's BBC The Computer Programme "Universally dreadful"?! How very dare you! Shame on you, they were fucking awesome. Respeck your elders, boy! Ian McNaught-Davis 'Mac' would be spinning in his grave hearing you slander his show like that. xP

  • May 19, 2019 at 18:02
    Permalink

    This video brought back some good memories from the many hours I spent hacking games on the BBC micro, stepping through code with Exmon II looking for infinite lives pokes and other cheats. I too tried to write an emulator to crack one of my games that used hardware timers s in it's copy protection, but I had to admit defeat; it was a great challenge though.

  • May 19, 2019 at 18:02
    Permalink

    My proudest magazine moment was when after my (atari ST) game was published on the ST Format cover disk and I got my 50 quid, I got a random floppy disk in the post from some cracking group who'd taken the time to make a cracked and trained version of my game, that was used as a filler with a cracked commercial game. For some reason I found that way cooler 🙂

    This visual-6502 stuff is bonkers. Very cool.

  • May 19, 2019 at 18:02
    Permalink

    The thing he said about varying the volume register to play digitized sounds. On the C64 at least, the original SID chip had a leaky op-amp at the output pin (the designer, Yannes, knew this but didn't have the time to fix it properly) which output a DC level proportional to the master volume. What this meant was you could play 4-bit digis by piping them directly to the volume register. I love this kind of stuff!

  • May 19, 2019 at 18:02
    Permalink

    Gosh, it seems so ironic that In Britain, a television studio would foster educational programs in such a profound way; whereas in the States, television has been deliberately dumbing us down…

Leave a Reply