SimoneN64 / Kaizen

Experimental Nintendo 64 emulator

Home Page:https://gadolinium.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong TLB index mask?

tamaroning opened this issue · comments

Very small nit, but should this mask be 0b11111?
It is also true for elsewhere index is used.

commented

It's not 5 bits no, it is 6, like my mask, at least to my knowledge. Will research further to investigate if my understanding is correct. Will leave the issue opened

If the function is only interested in the index field of the register, then masking a 6 bit wide value is accurate. bit-31 is also readable/writable.

The VR4300 manual does note that while the index field is 6 bits wide, only the least-significant 5 bits are actually used in TLB operations (page 146). Perhaps this is where the confusion is from?

The bit mask has be confirmed via an addition to the n64-systemtest suite: lemmy-64/n64-systemtest#57

commented

Alright, can close this issue as its been tested as right.