[stella] SBC - Decimal mode
Gabriel Oshiro
gabrieloshiro at gmail.com
Thu Apr 9 09:34:59 CDT 2009
Yes I know, but anyway... it should be bug-compatible or
garbage-compatible... If I'm going to develop a 6502 compatible
processor I must have the exact same error, bugs, garbages that
original 6502 has. For instance, let`s suppose that one of atari 2600
programmers knows that the answer of 00 - AA will be 9B... It can use
it on his game...
am I right?
2009/4/9 Darrell Spice, Jr. <darrell.spice.jr at spiceware.org>:
> $AA is not a valid decimal mode value. It's probably why you're getting
> unexpected results - garbage in, garbage out.
>
>
> On Apr 9, 2009, at 8:37 AM, Gabriel Oshiro wrote:
>
>> Hi everyone,
>>
>> I'm are currently working in a project that intends to develop atari
>> 2600 system on an ASIC. I'm developing a 6502 core in verilog:
>>
>> http://www.opencores.org/?do=project&who=t6507lp
>>
>> We are having some problem with the SBC instruction:
>>
>> A = $00
>> SBC IMM $AA
>> C = 0
>>
>> so... Behavior of Stella is
>>
>> A - M - (1 - C) = $9B
>>
>> Is that right?
>>
>> I thought that decimal mode should not contain values greater than
>> 9... I've looked into Stella source code and I've seen that it uses a
>> table to keep the result values... unfortunately I can't use the same
>> algorithm in hardware...
>>
>> And the documentation from motorola is not accurate about SBC.
>>
>> Thanks a lot,
>> best regards,
>> Gabriel Oshiro
>>
>> _______________________________________________
>> Stella mailing list
>> Stella at atari2600.org
>> http://atari2600.org/mailman/listinfo/stella
>
> Darrell Spice, Jr.
> darrell.spice.jr at spiceware.org
>
>
>
>
> _______________________________________________
> Stella mailing list
> Stella at atari2600.org
> http://atari2600.org/mailman/listinfo/stella
>
More information about the Stella
mailing list