Skip to main content
Share Your Experience: Take the 2024 Developer Survey
35 votes
Accepted

Why did Commodore sell CPUs to its competitors?

The 6502 was designed and manufactured before Commodore bought MOS Technology, the creator of the 6502. MOS Technology didn't originally plan to build computers. They wanted to sell the 6502 to ...
Tim Locke's user avatar
  • 4,810
34 votes
Accepted

What is a use case for the JAM instruction on the MOS Technology 650x family of processors?

It's a bit misleading to call them "undocumented opcodes". "Accidental opcodes" would be more accurate. Instead of using microcode, the 6502 family used a programmable logic array as a lookup table ...
Mark's user avatar
  • 8,585
33 votes
Accepted

Use of undocumented opcodes

In some cases undocumented instructions may be useful as shortcuts to accomplish tasks that are "difficult" to achieve with the official instructions. Going with the Z80, it is common practice ...
Konamiman's user avatar
  • 1,095
31 votes
Accepted

MOS 8502, just a 6510B?

The change in the MOS designator from 65xx to 85xx was due to the process change - original 65xx were NMOS process, while later 85xx changed to the new HMOS process. This allowed for better densities ...
Brian H's user avatar
  • 60.8k
27 votes

Use of undocumented opcodes

In many cases, undocumented opcodes were not deliberately created, but are merely the result of designers including the minimal circuitry necessary to create a specified set of opcodes. On the 6502, ...
supercat's user avatar
  • 36.5k
27 votes

Use of undocumented opcodes

More “serious and modern” CPUs than the 6502, Z80 and PDP-8 have undocumented instructions too, and they don’t necessarily cause the CPU to stop. The Intel x86 line has quite a few instructions which ...
Stephen Kitt's user avatar
24 votes
Accepted

Who ended up owning Commodore's semiconductor IP?

TL;DR The ownership issue is really associated with the trademarked brand and product names, and the copyrighted ROM software, not the processor/co-processor hardware. I think there are two ...
Brian H's user avatar
  • 60.8k
20 votes
Accepted

Is it possible to procedurally determine the number of cycles a particular instruction takes on a 6502?

To a certain extent you can guess the number of cycles by counting the number of memory accesses. A 2-byte instruction will take a minimum of 2 cycles because you need to read 2 bytes. If the ...
Ken Gober's user avatar
  • 11.4k
17 votes

Why does MOS 6502 require an external clock if it has an internal oscillator?

I have a trouble understanding how the MOS 6502 clock works. Erm, reading through the question it seems you're actually asking why different 6500 CPU variants each need a different clock setup. ...
Raffzahn's user avatar
  • 224k
17 votes
Accepted

How did the Atari 2600's 6507 handle zero page and stack with only 128 bytes of RAM?

I presume that these locations [Zero Page and Stack] are hard-coded into the workings of the 6502 Yup, they are. So how did this work? Simply by partial address decode. Address bit A8 was not ...
Raffzahn's user avatar
  • 224k
17 votes
Accepted

What does MOS 6507 do in Atari 2600 when you turn it on without a cartridge?

According to the schematics These are the things on the data bus: The CPU (which the question is about) The ROM (which the question posits is not connected) The RIOT (a.k.a 6532) The TIA The RIOT ...
Omar and Lorraine's user avatar
16 votes
Accepted

6502 branch offset calculation

Quick shot, without looking it up in Visual 6502 (which would be the authorative option): Sign extend the branch offset (replicate MSB of offset), that will tell you the ALU input for the PC high ...
dirkt's user avatar
  • 27.8k
16 votes

Why did Commodore sell CPUs to its competitors?

The 6502 has been used in huge volumes in markets that commodore never cared about competing in much - terminals for large-scale professional computing, printers and plotters (which they mostly bought ...
rackandboneman's user avatar
15 votes
Accepted

6510 I/O port initialisation

Yes, your assumption is correct. Like in any microcontroller design I know of, I/O lines with programmable direction are set to input on reset. The 6510 is no exception, its data direction register ...
followed Monica to Codidact's user avatar
14 votes

Why does MOS 6502 require an external clock if it has an internal oscillator?

I think there's one point that needs to be sorted first: Your Wikipedia quote suggests that there's an on-chip oscillator in the 6502. There isn't. [1] What there is is a clock generator, which takes ...
Michael Graf's user avatar
  • 10.1k
11 votes

Why does MOS 6502 require an external clock if it has an internal oscillator?

All 6502-family processors subdivide each cycle into two active periods, controlled by wires called phi1 and phi2. For each cycle, it's necessary that phi1 goes high and low for a certain period of ...
supercat's user avatar
  • 36.5k
10 votes

How does the 6502 implement its branch instructions?

(Caveat, this is from far away memory) In general your second assumption is right. But step by step: I can imagine one way to do it would be to have all the relevant flags serve as inputs to the ...
Raffzahn's user avatar
  • 224k
8 votes

Use of undocumented opcodes

Not sure that this really counts as using undocumented op-codes, but might be sufficiently related to be of interest... On the 8086, there are often two ways of encoding the same instruction (...
TripeHound's user avatar
  • 1,091
6 votes

Commodore-Motorola lawsuit in 1984

The only issue that comes to mind was the original Motorola vs. MOS case about the 6501 being pin compatible to the 6800. Since MOS was by then part of Commodore, their settlement not to make a ...
Raffzahn's user avatar
  • 224k
4 votes

Why does MOS 6502 require an external clock if it has an internal oscillator?

The 6502 does not really have an oscillator. Confusing terminology is being used. It requires an external clock signal to be fed into Phi0. However it has an internal clock generator which takes the ...
Justme's user avatar
  • 32.8k
4 votes

Were any Apple 1s sold with non-ROR 6502s?

In this video from an auction service, the 6502 fitted is clearly shown (eg. at 2:05) as a white-ceramic packaged example with a 1576 datecode, corresponding to early April. This is before the ROR ...
Chromatix's user avatar
  • 16.8k
4 votes
Accepted

65C816: Inputs TTL-compatible?

Are old 65C816s TTL compatible? If their Vih is 2.0v, they are certainly TTL-compatible. Was there some kind of change? All WDC chips seem to be verilog-reimplemented, so when they synthesized ...
lvd's user avatar
  • 10.5k
4 votes

6510 I/O port initialisation

yes ddr register is set to input on reset and because of the pullup lines for charen loram and hiram its a logical 1. take a look at the Pitfall 2 cartdrige. it works with vice 3.1 but not in 3.2. ...
PiCiJi's user avatar
  • 41
4 votes

What is a use case for the JAM instruction on the MOS Technology 650x family of processors?

In some memory constrained situations (like a 4K demo or something like that), it could be useful to stop the CPU. A jam instruction is one obvious way to accomplish that in as few bytes as possible. ...
Omar and Lorraine's user avatar
3 votes
Accepted

How does the 6502 implement its branch instructions?

Quick answer (I can update with a cycle-by-cycle description of what happens if you need it): You can see exactly what happens in the 6502 using the in-browser simulation provided by visual6502.org ...
dirkt's user avatar
  • 27.8k
3 votes

Why did Commodore sell CPUs to its competitors?

Aside from the licensing, computer manufacturers have always had a "nuclear option" of asking another CPU maker to make an enhanced 6502 clone. Because of the Z-80 A different manufacturer (Zilog) ...
Harper - Reinstate Monica's user avatar
3 votes

Why did Commodore sell CPUs to its competitors?

Commodore thought they would have such high volumes that they needed a second source because MOS Technology might not be able to reliably fab enough. Semiconductor process technology was not as ...
hotpaw2's user avatar
  • 8,219
3 votes

Is it possible to procedurally determine the number of cycles a particular instruction takes on a 6502?

You are correct that instructions of the same form follow the same pattern. Alas, I forget my original documentation sources now (perhaps this?), but these days I tend to use my emulator code as a ...
zellyn's user avatar
  • 1,005
3 votes

6502 branch offset calculation

AFAIR it's Carry XOR Sign (of the offset). If this yields true, it's increment when Carry, otherwise decrement.
Raffzahn's user avatar
  • 224k
3 votes

Were any Apple 1s sold with non-ROR 6502s?

For the second part: But was there any other software sold or widely shared that deliberately worked around the ROR bug? The most prominent may be Microchess, originally developed for the KIM but ...
Raffzahn's user avatar
  • 224k

Only top scored, non community-wiki answers of a minimum length are eligible