Live data from Hacker News

The MOS 6502 and the Best Layout Guy in the World

research.swtch.com

31–40 of 53 posts

Re: The MOS 6502 and the Best Layout Guy in the World

#31
post #4
post #3

Earlier quoted context omitted.

That's the sensation of working with someone who's incredibly good. And, BTW, the 6502 was a work of art. Simple, elegant and fast (even at 1 MHz), it ran rings around the Z-80's you found in more expensive computers of the time. Plus, it was delightful to program.

I'm curious why you think so (about the Z80, I mean). I seem to remember it being in very cheap computers as well (ZX Spectrum, doesn't get much cheaper than that) and was a great deal faster. I grew up with a 6502 and love it like a childhood pet but can't see how it 'ran rings' around the Z80.

In his talk http://www.youtube.com/watch?v=HW9AWBFH1sA#t=3m01s Michael Steil claimed that the 6502 had 60% fewer transistors than the Z80 but was twice as fast (in clock terms, I presume), while the Z80 had more registers and allowed slighly denser code.

Re: The MOS 6502 and the Best Layout Guy in the World

#32
The whole 'Reverse Engineering the 6502' talk Michael Steil gave at CCC congress is on YouTube. I posted this earlier in a separate topic, but it didn't pick up.

Clickable links to the 6 parts:

http://www.youtube.com/watch?v=HW9AWBFH1sA

http://www.youtube.com/watch?v=bBE4KHKzhKc

http://www.youtube.com/watch?v=tRBo7O_blVo

http://www.youtube.com/watch?v=H_15RtVbqGU

http://www.youtube.com/watch?v=N9DYmlprCKA

http://www.youtube.com/watch?v=eZOUuqc4pk8

Re: The MOS 6502 and the Best Layout Guy in the World

#33
post #5
post #3

Earlier quoted context omitted.

That's the sensation of working with someone who's incredibly good. And, BTW, the 6502 was a work of art. Simple, elegant and fast (even at 1 MHz), it ran rings around the Z-80's you found in more expensive computers of the time. Plus, it was delightful to program.

Plus, it was delightful to program. Simple maybe, but not delightful to program. I don't know of any assembly language that is delightful to program. BTW, I knew someone from junior high & high school who could write code for the 6502 using a hex dump with amazing speed. You might have heard of him: Randy Linden.

6502 assembly was the first language after Apple Basic that I learned. I found it to be a very enjoyable experience. These days it would be tedious, but back then it was fun making the limited hardware do something and the only thing you used is what the hardware gave you. Today we have it lucky... with all the frameworks, libraries, and such only a small percentage of the end result is your original work. That's great for efficiency, though the downside is you can't point to a program and say that you wrote 100% of it.

I imagine this is similar to how someone who likes to tinker with engines might prefer an old motorcycle they can take apart and put back together themselves even though there are many advantages in terms of reliability, efficiency, comfort, and so on to driving a Prius.

Re: The MOS 6502 and the Best Layout Guy in the World

#34
post #15

Earlier quoted context omitted.

As Doug McIlroy (inventor of pipes, diff) once said of punched cards, "It's the kind of thing you can be nostalgic about, but it wasn't actually fun." http://research.swtch.com/2008/04/computing-history-at-bell-...

Punch cards are different: there's substantially delayed gratification. When you're a poor college student as I was, entering opcodes in a monitor/debugger you wrote in BASIC because you couldn't afford an assembler, then yes, assembly was fun. Fun, that is, until you had to hand-calculate negative jump offsets. Don't remember why, but for some reason I seem to think that the MC6809 I was running on made it difficult…

There must have been something special about the 6809 - I recall doing my Digital Design course on that Chip. And yes, we didn't have an assembler, everything was entered via opcodes either. It was a very enjoyable experience for someone like me who wasn't a gear head, and got to play around with SB555s, NAND Gates, and lots, and lots of wirewrapping.

Re: The MOS 6502 and the Best Layout Guy in the World

#35
post #31
post #4

Earlier quoted context omitted.

I'm curious why you think so (about the Z80, I mean). I seem to remember it being in very cheap computers as well (ZX Spectrum, doesn't get much cheaper than that) and was a great deal faster. I grew up with a 6502 and love it like a childhood pet but can't see how it 'ran rings' around the Z80.

In his talk http://www.youtube.com/watch?v=HW9AWBFH1sA#t=3m01s Michael Steil claimed that the 6502 had 60% fewer transistors than the Z80 but was twice as fast (in clock terms, I presume), while the Z80 had more registers and allowed slighly denser code.

Specifically, the talk mentions that the 6502 was pipelined and could do many instructions in 2 clock cycles, while the Z80 needed at least 4.

This translates to 2x the speed at the same clock rate.

Re: The MOS 6502 and the Best Layout Guy in the World

#36
post #35
post #31

Earlier quoted context omitted.

In his talk http://www.youtube.com/watch?v=HW9AWBFH1sA#t=3m01s Michael Steil claimed that the 6502 had 60% fewer transistors than the Z80 but was twice as fast (in clock terms, I presume), while the Z80 had more registers and allowed slighly denser code.

Specifically, the talk mentions that the 6502 was pipelined and could do many instructions in 2 clock cycles, while the Z80 needed at least 4. This translates to 2x the speed at the same clock rate.

The 6510(6502 plus IO-ports) could do no such thing. Fastest instructions used 2 cycles and 1 byte op-code.

Re: The MOS 6502 and the Best Layout Guy in the World

#37
post #36
post #35

Earlier quoted context omitted.

Specifically, the talk mentions that the 6502 was pipelined and could do many instructions in 2 clock cycles, while the Z80 needed at least 4. This translates to 2x the speed at the same clock rate.

The 6510(6502 plus IO-ports) could do no such thing. Fastest instructions used 2 cycles and 1 byte op-code.

You use two cycles, but the 6502 could execute the instruction while fetching the next one.

Re: The MOS 6502 and the Best Layout Guy in the World

#38
post #31
post #4

Earlier quoted context omitted.

I'm curious why you think so (about the Z80, I mean). I seem to remember it being in very cheap computers as well (ZX Spectrum, doesn't get much cheaper than that) and was a great deal faster. I grew up with a 6502 and love it like a childhood pet but can't see how it 'ran rings' around the Z80.

In his talk http://www.youtube.com/watch?v=HW9AWBFH1sA#t=3m01s Michael Steil claimed that the 6502 had 60% fewer transistors than the Z80 but was twice as fast (in clock terms, I presume), while the Z80 had more registers and allowed slighly denser code.

> while the Z80 had more registers

To somewhat counter that, the 6502 could read and write to the first 256 bytes of memory with shorter instructions. The 65816 expanded that idea to allow you to do that to any place in memory.

Re: The MOS 6502 and the Best Layout Guy in the World

#39
post #27
post #7

Earlier quoted context omitted.

I believe the 6502 could do things faster than the Z80. Right, I was hoping someone might remember specifics. I don't think this is really true, in general. The 6800 is very close to the 6502 Not really.

The 6502 was faster at accessing memory. I remeber Elite running a lot better on a 2MHz BBC Micro than on any 3.58MHz Z80 based micro, like the MSXs.

The MSX 1 also had a hideous design flaw (for a gaming machine) that hid the framebuffer from the processor. IIRC, you had to do a couple IOs to get a single byte to or from the VRAM.

Re: The MOS 6502 and the Best Layout Guy in the World

#40
post #37
post #36

Earlier quoted context omitted.

The 6510(6502 plus IO-ports) could do no such thing. Fastest instructions used 2 cycles and 1 byte op-code.

You use two cycles, but the 6502 could execute the instruction while fetching the next one.

That's not the pattern I see when looking at the op-code/cycle chart. I recently implemented part of a C64-emulator in JavaScript and it seems very much like every step takes a cycle.

For example the instructions NOP(or CLI, STI, INX etc), 1 byte, 2 cycles. 1 cycle for fetching the instruction and one for executing the fetched instruction.

LDA addr,x seems to be pipelined a bit though. It's "AD lo hi" in memory and takes 4 cycles unless lo+x > 255, then it takes 5 cycles. The lo+x calculation seems to occur while hi is being read.

Post reply on HN