MEGA65 / mega65-core

MEGA65 FPGA core
Other
241 stars 88 forks source link

Wrong 32 bit address mode used for 16 bit pointer #535

Closed Edilbert closed 3 weeks ago

Edilbert commented 2 years ago

In the sequence:

lda [ab],z
sta (cd),z

the store operation falsely uses cd as a 32 bit pointer, instead of 16 bit as it should.

Putting another instruction in between can be used as workaround.

lda [ab],z
clv
sta (cd),z
lydon42 commented 2 years ago

The fix does reset the signal to early, which disrupts the parallel memory process. I have a working fix build in matrixsid, for which I will now first write a complete four-way unittest (lda/sta, sta/lda, ldq/stq, stq/ldq).