libtonc icon indicating copy to clipboard operation
libtonc copied to clipboard

fix incorrect 32-bit read of 16-bit register

Open redthing1 opened this issue 4 years ago • 1 comments

this code has a bug where it reads 32 bit value from IME, which is a 16 bit reg. this can cause open bus.

IME is a 16 bit register and shouldn't be read from using ldr. Prevents possibly unwanted open bus behavior.

redthing1 avatar Jan 09 '22 23:01 redthing1

Are you sure the top 16 bits are open bus? If I remember correctly, a lot of IO registers are 16 bit in the documentation, but the top 16 bits just return 0.

AntonioND avatar May 19 '22 20:05 AntonioND