From: Don Bruder on
In article <j7Wdne2Ir5coidDZnZ2dnUVZ_vydnZ2d(a)comcast.com>,
"Michael J. Mahon" <mjmahon(a)aol.com> wrote:

> sicklittlemonkey wrote:
> > (From Linards)
> >
> >>Is it documented anywhere which of these opcodes have which cycle counts?
> >
> >
> > Without checking, they should be the same as the corresponding LDA
> > opcode with the relevant addressing mode.
> >
> > (From Marcus)
> >
> >>There are some discrepancies between the different info files floating
> >>around the net.
> >
> >
> > Yes, I've been collecting these, and collating the information for some
> > time.
>
> Since there were several versions of the 6502, isn't it likely that
> some had *differing* illegal ops and results?

Not just likely - Absolutely certain.

I've long since forgotten the source, but there used to be a listing of
how the various "illegal" opcodes differed from chip version to chip
version, and only a very tiny handful of them that worked on one version
would work (or even do ANYTHING) on another version.

(which, of course, is why they're "illegal" or "unsupported" or
"undocumented" opcodes - You can't rely on them except on *THAT
PARTICULAR CHIP*, and in some cases, not even then because the "what
comes out the other end" can be influenced by the state of RAM, I/O
locations, or other things that may or may not be duplicatable from one
machine to the next!)

--
Don Bruder - dakidd(a)sonic.net - If your "From:" address isn't on my whitelist,
or the subject of the message doesn't contain the exact text "PopperAndShadow"
somewhere, any message sent to this address will go in the garbage without my
ever knowing it arrived. Sorry... <http://www.sonic.net/~dakidd> for more info
From: sicklittlemonkey on
> Since there were several versions of the 6502, isn't it likely that
> some had *differing* illegal ops and results?

The surprising answer is yes, but not many. ;-)

The earliest documentation I can find is Apple Assembly Line's
"So-Called Unused Opcodes" from 1981 (
http://bobsc5.home.comcast.net/aal/1981/aal8103.html#a2 ).

In 1995 I unknowingly duplicated this work (in less detail) and my
results on a Rockwell 6502 were almost identical to Bob
Sander-Cederlof's Synertek 6502:
http://www.apple2.org.za/mirrors/ground.icaen.uiowa.edu/Mirrors/uni-kl/hardware/undocumented_6502_opcodes

The Apple-based research doesn't differ much from the more detailed
research done on the C64, Atari and even BBC systems. It seems that
this is because the same MOS 6502 mask was used for the 6510 and other
6502 implementations.

In any case, some Apple games use these opcodes, and many more C64
games do. Although a multibyte NOP is often sufficient, in other cases
the expected operation is required, not hard to implement, and improves
emulation authenticity (e.g. crash behaviour).

Cheers,
Nick.

From: heuser.marcus on
sicklittlemonkey wrote:
>
> The Apple-based research doesn't differ much from the more detailed
> research done on the C64, Atari and even BBC systems. It seems that
> this is because the same MOS 6502 mask was used for the 6510 and other
> 6502 implementations.

As the 6510 is a MOS chip this doesn't come as a shock, really ;o)
And it explains why "illegal opcodes" are so much more popular on the
C64: Only one chip version in all these years (though under different
names).
AFAIK the 6502's in the Ataris were compatible to each other, too.

> In any case, some Apple games use these opcodes, and many more C64
> games do. Although a multibyte NOP is often sufficient, in other cases
> the expected operation is required, not hard to implement, and improves
> emulation authenticity (e.g. crash behaviour).

I agree with you here, Nick. Documenting them as thorough as possible
is definitely important, as they were used.
On the other hand I haven't seen an application where they were
indispensable.
Does anybody have some interesting sources they would share (or can me
point to some)?

bye
Marcus

From: sicklittlemonkey on
Hi Marcus.

The hard thing is collating the documentation!

As for indispensable, I've only seen this one:
http://groups.google.com/group/comp.sys.apple2/msg/cfc5ac0127e3cfb4

Cheers,
Nick.

From: Michael J. Mahon on
Don Bruder wrote:
> In article <j7Wdne2Ir5coidDZnZ2dnUVZ_vydnZ2d(a)comcast.com>,
> "Michael J. Mahon" <mjmahon(a)aol.com> wrote:
>
>
>>sicklittlemonkey wrote:
>>
>>>(From Linards)
>>>
>>>
>>>>Is it documented anywhere which of these opcodes have which cycle counts?
>>>
>>>
>>>Without checking, they should be the same as the corresponding LDA
>>>opcode with the relevant addressing mode.
>>>
>>>(From Marcus)
>>>
>>>
>>>>There are some discrepancies between the different info files floating
>>>>around the net.
>>>
>>>
>>>Yes, I've been collecting these, and collating the information for some
>>>time.
>>
>>Since there were several versions of the 6502, isn't it likely that
>>some had *differing* illegal ops and results?
>
>
> Not just likely - Absolutely certain.
>
> I've long since forgotten the source, but there used to be a listing of
> how the various "illegal" opcodes differed from chip version to chip
> version, and only a very tiny handful of them that worked on one version
> would work (or even do ANYTHING) on another version.
>
> (which, of course, is why they're "illegal" or "unsupported" or
> "undocumented" opcodes - You can't rely on them except on *THAT
> PARTICULAR CHIP*, and in some cases, not even then because the "what
> comes out the other end" can be influenced by the state of RAM, I/O
> locations, or other things that may or may not be duplicatable from one
> machine to the next!)

Actually, that was my point.

It's a tribute to the naivete of early game programmers that they
thought it would be OK to use undefined instructions. It's a good
way of making sure that a game will become obsolete as models advance.

And anyone who couldn't discipline themselves to "get the job done"
on time and under budget by using only documented opcodes isn't much
of a programmer. The whole thing reeks of high school... ;-)

-michael

Music synthesis for 8-bit Apple II's!
Home page: http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it is seriously underused."
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12
Prev: what happened CBM=VGA
Next: 1581 Drive Kits on eBay