Profile cover photo
Profile photo
mos6502
1,586 followers -
6502 posts - new projects and interesting old projects from the archives
6502 posts - new projects and interesting old projects from the archives

1,586 followers
About
Posts

Post has attachment
This week, 6502 inside! In the form of the 1998 Furby toy - Sean Riddle got hold of the original source and has republished it. First thing to note is that it's not quite a 6502 - there's no Y register and some addressing modes and many opcodes are missing. But the source certainly looks like 6502 and would probably run on a 6502.
We noticed a couple of oddities:
- they always CLC before SBC, so maybe SEC is missing? It makes the result out-by-one, unless maybe SBC has the opposite sense of carry on this chip.
- they PHA and PHP in their interrupt routine. Is that PHP a mistake, or does RTI work differently on this chip? If it does, then PLA needs not to affect the flags.
...
Here's your book-length PDF of the source (let us know of any interesting findings):
https://www.seanriddle.com/furbysource.pdf

Also available at the Internet Archive in their book viewer:
https://archive.org/details/furby-source

See also the discussion on Hacker News - with links to more readings:
https://news.ycombinator.com/item?id=17751599

Add a comment...

Post has attachment
This week, the 6502 chip design photobombs the two Steves "in 1979, posing for Life magazine with the Apple II, Apple's first breakthrough product." It's the same chip design plot seen in the 6502 team photo as posted here in full colour:
https://plus.google.com/u/0/108984290462000253857/posts/4aZRDcBK64Z
...
via Jen Winograd's call for assistance with a treasure trove of early MOS materials kept by her father, Terry Holdt:
http://forum.6502.org/viewtopic.php?f=1&t=5227
(the outcome being that she will scan and publish the documents - we look forward to seeing it!)
Add a comment...

Post has attachment
Bonus: a modern three-chip wonder, by Michael McLaren, using a PIC to glue together a Rockwell 65C02 and a 64k SRAM. With the PIC acting as UART, bootloader and glue logic, the machine runs at 1MHz. It's seen here running OSI Basic (from 1977, by Microsoft) with 56575 bytes free - could be a record! Michael acknowledges the help he got from +Jac Goudsmit's write-up of his ProPeddle machine, and from other 6502 forum members.

Ref:
https://propeddle.com
Add a comment...

Post has attachment
This week, we find Nintendo offer not one but two emulators of the NES. James Chambers has been digging through their Animal Crossing game, having found a way to get into developer mode with a keypad sequence, and discovered that the NES emulator built into the game as a playable item will run code from the real life memory card of the GameCube. So it seems a 500MHz PowerPC has the horsepower to the emulate the very-nearly-a-6502 inside a NES, as well as the video and audio and sprite engines. (That shouldn't perhaps be too surprising.)
...
This facility to load and run NES games turns out to be a possible exploitation vector too: "one of the most interesting things about this ROM loader to me was that it’s virtually the only thing in the game that accepts variable-size user input and copies it to different places in memory. Almost everything else uses fix-sized buffers." Interesting...

Oh, and the other NES emulator? That would be the one inside the NES Classic product, recently re-released and apparently the top-selling game console at present - selling more units than the PS4 or XBox!

Unfortunately in neither case do we get a view on how the emulator works - please, if you write one, make sure to publish your code with a permissive license! You'll be in good company - there are very many 6502 emulators already published, as seen here:
http://6502.org/tools/emu/
Add a comment...

Post has attachment
This week, Twisted Brain - an impressive demo and a no less impressive series of posts explaining the techniques used and how they were programmed - in this case, on Acorn's BBC Master machine. Many effects here have not been seen before on this machine. The demo also has a homepage
https://bitshifters.github.io/posts/prods/bs-twisted-brain.html
where you can play in-browser, download, and view the source. Not so many demos come with full source and explanation!
"This demo requires a BBC Master system as it uses all 64K of sideways RAM, 12K of Hazel RAM and the 20K shadow RAM for all manner of jiggery-pokery. Many cycles were counted and many NOP’s sacrificed during the making of this demo."
The writeup posts:
Part #1: FX Framework & Main Loop
Part #2: Da Brain Picture
Part #3: Text Screens
Part #4: A brief introduction to CRTC registers
Part 5: Vertical Rupture
Part #6: Copper Colours
Part #7: Plasma
Part #8: Parallax Bars
Part #9: Vertical Blinds
Part #10: Kefrens aka Alcatraz bars
Part #11: Checkerboard Zoom
Part #12: Bitshifters "MODE 7" logo
Part #13: Twister
Part #14: Smiley Drop
Part 15: Miscellaneous Debris
Bonus on Music in this post:
https://stardot.org.uk/forums/viewtopic.php?p=207269#p207269
Twisted Brain Demo -
Twisted Brain Demo -
stardot.org.uk
Add a comment...

Post has attachment
This week, back to 1982, and one of the "three-chip wonders" which you could then build or buy. We think there's room for a resurrection of this idea, but for now, here's the John Bell 82-300. The secret of the minimal designs from those days is the 6532 RIOT which offered just enough RAM to run some useful software and enough I/O to interact with the world. Surely 128 bytes of RAM is enough for your imagination to run wild?
Thanks to Mike, K8LH, for recapturing the schematic of this board - see the thread.
Add a comment...

Post has attachment
This week, it's our birthday! Instead of playing a happy tune to celebrate six years of weekly posts, we're diving straight into Gary Preston's 12-part blog series on recreating Acorn's Electron on FPGA. Our featured link is on the cassette storage - as you see, it's not even binary, as Acorn were able to get four voltage levels out of the ULA technology.
Here's the index page for Gary's posts on this project:
https://www.mups.co.uk/tags/acorn-electron/ You'll find posts on video, sound, clocking, keyboard decode (which is very odd on the Electron) and more.
...
Acorn got big when they got the contract to design and build the BBC Micro, a very full-featured and solidly constructed 2MHz 6502 machine which eventually sold into many homes and most schools in the UK. But the Beeb was expensive, so Acorn then tried to shoehorn all the features and three ULAs into one huge ULA, which turned out to be so difficult it almost broke the company.

That giant ULA still might hold a few secrets, but recreations are now getting extremely close - and certainly close enough!

(Photo by hoglet, from a thread on Stardot forum.)
Add a comment...

Post has attachment
This week, Matt Earl uses a Python 6502 emulator to extract all the Super Mario level screens automatically. Py65emu is by Jeremy Neiman, and emulates only the CPU of the NES, but that's enough for Matt to trace the tilehandling code and construct an image from the game cartridge.
Embedding a controllable CPU emulator into python is a very powerful technique: scotws and SamCoVT have been doing the same to automate testing of TaliForth2, but this time using py65 by Mike Naberezny.
Ref:
https://github.com/docmarionum1/py65emu
https://github.com/mnaberez/py65
https://github.com/scotws/TaliForth2
Add a comment...

Post has attachment
This week, writing Tetris for the C64, as blogged in this epic series by +Wiebo de Wit - 14 parts so far and still putting in the final touches. Source code can be found at
https://github.com/wiebow/tetris.c64
and the whole series of posts can be found under this tag:
https://devdef.blogspot.com/search/label/Tetris
"Several years ago (well, in 1992) I programmed a Tetris clone on my Commodore 64 using assembler and several floppy disks. The D64 file can be found on CSDB if you want to try it!
...
I still have the source code to this game and it's been really fun to read it, although it is obvious I was not a really good programmer in those days. I thought it would be fun to try to re-program the game using todays cross-platform tools and my infinite game development skills and wisdom gathered in the years since 1992. :)"

"The plan is to re-use the graphics and music and sound effects from the old 1992 version, but totally reprogram the game itself."
Add a comment...

Post has attachment
This week, an early retrospective: a 1985 look at the C64, "the world's most popular computer" and its origin story - being the "world's greatest video-game chips." See the full article here:
https://spectrum.ieee.org/ns/pdfs/commodore64_mar1985.pdf
There's lots of info in there about the VIC-II and the early production history of the C64, and a few hiccups too. Also "the albatross" - the slow disk drive interface, and the reasons for it, and the likelihood that this killed the C64's chances in business computing.
At the time of writing, the retail price had come down from $595 to an amazing $149 - and the bill of materials is estimated here as under $50.
"Although the machine has its flaws, the designers of the Commodore 64 believe they came up with many significant advances because of the freedom they enjoyed during the early stages of the project. The design team was autonomous—they did their own market research, developed their own specifications, and took their baby right up through production. But as soon as the production bugs were worked out and Commodore knew it had a winner, the corporate bureaucracy, which until then had been on the West Coast dealing with the VIC-20 and the Pet computer, moved in."
"And Jack Tramiel is currently chief executive officer of Atari Corp., the company that was Commodore’s chief competitor in the home-computer market before losing nearly a billion dollars in competing against the C-64. "

(It's not all about the VIC-II - there's an info-box about the SID too.)
Photo
Add a comment...
Wait while more posts are being loaded