Closed alex-free closed 10 months ago
Hmmm I'll check when I have some time if SetConf indeed reenables the interrupts, because it doesn't say so in the no$psx documentation (https://problemkaputt.de/psx-spx.htm)
Hmmm I'll check when I have some time if SetConf indeed reenables the interrupts, because it doesn't say so in the no$psx documentation (https://problemkaputt.de/psx-spx.htm)
Cool. I just also noticed that since you call setconf in the bios_reinitialize() function as well, the proceeding exitcriticalsection() in that function after the setconf() may also be redundant.
I've checked and I can confirm the ExitCriticalSection is indeed issued by the SetConf call.
I've removed the one in the secondary.c
file in 15290674f817aad0278a0f5829a1b04a77172f58.
The one in bios_reinitialize
must stay however, since FakeEnqueueCdIntr
skips the execution of the entire nested function which performs the CD initialization and also reactivation of the interrupts.
https://github.com/socram8888/tonyhax/blob/62b4213b43d4d7648b5d5547d0693c6e17057da9/loader/secondary.c#L254 does ExitCriticalSection(), but at https://github.com/socram8888/tonyhax/blob/62b4213b43d4d7648b5d5547d0693c6e17057da9/loader/bios.c#L73 it is said that the SetConf function already does this. I tried removing this in my fork and it works as expected.