[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 6502 test suite
Thanks guys!
I had it mostly correct. There was some very strange behavior needed to get it 100% right. The B flag is set by BRK and is only cleared by an IRQ or NMI operation. I had that *mostly* correct. The really odd part is that the I flag is cleared when BRK pushes the status bits and then it is set afterwards. Very unusual behavior but now the test passes and I can say that the Jace 6502 emulation core is pretty close to the real thing. The only different in the 65c02 emulation is that the D flag is cleared by BRK as well.
I can't see how any Apple // software is affected by any of this, but if anyone found any particular interrupt-heavy titles to have issues please let me know. I haven't seen any problems with mouse-based software and the 6522 interrupts used for mockingboard timing seem to be OK also.
-B
On Thursday, September 13, 2012 4:39:34 PM UTC-5, D Finnigan wrote:
> Vladimir Ivanov wrote:
>
> >
>
> > One more note - the set 'B' flag in the trace up-to $131E is wrong.
>
> >
>
> > http://nesdev.com/the%20%27B%27%20flag%20&%20BRK%20instruction.txt
>
> >
>
> > This page claims that PHP also pushes value with 'B' set. This is easy to
>
> > check.
>
> >
>
>
>
> Take a look at the Monitor's test for BRK. It does a PLA then rotates the
>
> bits to test for the break flag.