[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 6502 illegal opcodes questions



>>>>> "hm" == heuser marcus <heuser.marcus@freenet.de> writes:

hm> On the other hand I haven't seen an application where they were
hm> indispensable.

There are several C64 demo effects that could not have been done
without illegal opcodes. One good example is 6 sprites on top of an
FLI picture, done by Ninja in Darwin 80%:

  http://noname.c64.org/csdb/release/?id=12732

It's not just one or two illegals here and there either:

  9097   8D 11 D0   STA $D011
  909a   4F 18 D0   SRE $D018
  909d   8D 11 D0   STA $D011
  90a0   4F 02 DD   SRE $DD02
  90a3   8C 11 D0   STY $D011
  90a6   0E 18 D0   ASL $D018
  90a9   8F 11 D0   SAX $D011
  90ac   8C 02 DD   STY $DD02
  90af   8D 11 D0   STA $D011
  90b2   4F 18 D0   SRE $D018
  90b5   8D 11 D0   STA $D011
  90b8   6F 02 DD   RRA $DD02
  90bb   8D 11 D0   STA $D011
  90be   0F 18 D0   SLO $D018
  90c1   8E 11 D0   STX $D011
  90c4   8E 02 DD   STX $DD02
  90c7   8D 11 D0   STA $D011
  90ca   4F 18 D0   SRE $D018
  90cd   8D 11 D0   STA $D011
  90d0   4F 02 DD   SRE $DD02

They were also used in a lot of games - instructions like LAX, SAX are
easy to use and can save a couple of cycles in a critical place.

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .  Per Olofsson, arkadspelare
    o-o    .      .     .   o         +          MagerValp@cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/