8 ms·
A little more speed from the 6502
- snoopy_telex 4y agoThe images on that site are down right hostile to mobile devices. It’s completely unreadable.
- colejohnson66 4y agoThey look perfectly fine for me on Firefox on an iPhone 13.
- haneefmubarak 4y agoLooks fine on Chrome on a Galaxy S10...
- GirishSharma643 4y agoFor me, nothing is unclear on my xiaomi mi9 miui 12.5.
- anonymousiam 4y agoThis is a follow up to: https://imapenguin.com/how-fast-can-a-6502-transfer-memory/ https://imapenguin.com/how-fast-can-a-6502-transfer-memory/ https://news.ycombinator.com/item?id=31764722 https://news.ycombinator.com/item?id=31764722
- jhallenworld 4y agoIt could be faster: lda #firstbyte sta dest+0 lda #secondbyte sta dest+1 etc. 6 cycles per byte, so 166KB/sec. But we can do better: there are only 256 different bytes, so group the stores by byte value so that you don't have to reload before each one: lda #0 sta dest+10 ; All the places that get 0 sta dest+29 sta dest+42 lda #1 sta dest+3 ; All the places that get 1 sta dest+82 etc. Up to 250 KB/sec and less space. If the prior data in dest is known, it could be even faster: skip stores where the destination already has the correct data. And even faster: for video, skip stores which have a low hamming distance from the prior bytes and put up with a bit of noise..
- tedunangst 4y agoHow do you know which places get 0 bytes?
- jhallenworld 4y agoWith pre-processing: sort the source data so that the same bytes (along with their offsets) are grouped together, then convert this to code. It could be useful for drawing things like fixed sprites quickly.
- rzzzt 4y agoThis presentation of "A Pig Quest" for the C64 describes similar methods for efficient bitmap copying (the timestamped part is more relevant, but I recommend watching the entire thing): https://youtu.be/I8CTKeh8N0Q?t=578 https://youtu.be/I8CTKeh8N0Q?t=578
- vikingerik 4y agoEven faster: use the X register instead of A, because there's an increment instruction for it (INX) that takes only 2 cycles instead of 3 to do LDA with the next value. Also FYI, that 6 cycles to load/store each byte is only if you're writing to zero page (an 8-bit address, meaning the first 256 bytes of the address space.) Stores to a 16-bit address take one more cycle, 4 instead of 3, to read the operand when it's a two-byte address instead of one.
- olliej 4y agoOne thing I've always wondered is how fast you could make these chips go with modern fabrication - I know it's not necessarily just a trivial scale down design+scale up clock speed, but assuming the same fundamental design with necessary changes to keep things functioning (gate delays and stuff seem like they'd be the big changes?). Is anyone here an EE, who has access to original circuit design, knows how to translate to vhdl, verilog, or what have you, and also just happen to have the money lying around to have TSMC tape out the design so we can find out? :D
- hotpotamus 4y agoIt's an interesting question. I get that taping one out is a joke, but wouldn't it be possible to implement one with an FGPA? I know almost nothing about it, but I know that people have essentially built out new Super Nintendos with them, so the 6502 should be doable.
- krallja 4y agoThe Super Nintendo contains a 65816 core, so of course the 6502 is doable on an FPGA. Here’s a “100 MHz 6502”: http://www.e-basteln.de/computing/65f02/65f02/ http://www.e-basteln.de/computing/65f02/65f02/
- krallja 4y agoWestern Design Center will happily license the soft core IP of the 65C02 for you to use in a larger chip design.
- jhgb 4y agoSurely you could design one of your own? The complexity seems low enough for a hobby project, it's not like trying to recreate a IBM Z CPU.
- krallja 4y agoYes, the original 6502 was laid out by hand on Mylar with pencils and X-acto knives by only a couple people. A motivated hobbyist could probably do it in a weekend in VHDL. The more interesting thing I think is that the existence of this official IP core implies that it is already out in production in millions of components, like the Tamagotchi[1] and Furby[2], presumably running at a very diverse array of clock frequencies. I wonder which product has the fastest WDC 6502? [1] https://hackaday.com/2013/05/24/tamagotchi-rom-dump-and-reverse-engineering/ https://hackaday.com/2013/05/24/tamagotchi-rom-dump-and-reve... [2] https://official-furby.fandom.com/wiki/Furby_(1998)/Technical_information https://official-furby.fandom.com/wiki/Furby_(1998)/Technica...
- dwheeler 4y agoYou can also put the main loop in zero page, and increment the addresses directly by incrementing their zpage values. I would expect that to be slightly slower than total unrolling, but it wouldn't be as long and thus more practical.
- gaudat 4y agoI expected some extreme overclocking action complete with liquid nitrogen... https://3.14.by/en/read/arduino-liquid-nitrogen-overclocking https://3.14.by/en/read/arduino-liquid-nitrogen-overclocking