zodttd
Solving your premature emulation since the Tapwave
I've spent the past two days trying to figure out if what Admin@FreeDO was true...
I had a private conversation with him about the FreeDO project, which still sounds promising.
Basically what he said was the interrupts on the GP2X Linux distro were being polled way too fast and sucking up CPU time. Disabling interrupts was said to give a 35%-40% increase in CPU performance. This is why HH was being used in his project. I decided to try it out.
I spoke with Squidge and he and I got it worked out. Our code uses his MMU uname patching to get us the ability to write to CPSR and SPSR's control field and either ORR (disable) or BIC (enable) the IRQ and FIQ bits.
It seems to work, and disables IRQs on load, and enables them on exit of psx4gp2x. The problem is there is extremely (less than a single FPS) little to no performance gains from this.
Maybe it's my implementation or maybe it truly isn't disabling IRQs. I even downgraded the GP2X from fw3.0 to fw2.0 to be more sure the uname address used in Squidge's code was correct. When exiting the emulator without re-enabling IRQs the emulator will crash indicating they were disabled. Strangely though, SD access still works.
Thinking maybe IRQ's get re-enabled occassionally, I did exactly what Admin@FreeDO said, and enabled/disabled IRQ's on each branch in my dynarec. This causes a good amount of slowdown, about a 75% DECREASE in performance.
So I'm not sure if that statement is quite factual yet. If anyone has expierence with using HH over Linux for GP2X dev let me know if performance is better. And if possible, let me know if it's due to the IRQs being the reason.
Squidge is in the process of doing his own testing, I believe. Hopefully he gets different results.
Two days wasted? Hope not!
I had a private conversation with him about the FreeDO project, which still sounds promising.
Basically what he said was the interrupts on the GP2X Linux distro were being polled way too fast and sucking up CPU time. Disabling interrupts was said to give a 35%-40% increase in CPU performance. This is why HH was being used in his project. I decided to try it out.
I spoke with Squidge and he and I got it worked out. Our code uses his MMU uname patching to get us the ability to write to CPSR and SPSR's control field and either ORR (disable) or BIC (enable) the IRQ and FIQ bits.
It seems to work, and disables IRQs on load, and enables them on exit of psx4gp2x. The problem is there is extremely (less than a single FPS) little to no performance gains from this.
Maybe it's my implementation or maybe it truly isn't disabling IRQs. I even downgraded the GP2X from fw3.0 to fw2.0 to be more sure the uname address used in Squidge's code was correct. When exiting the emulator without re-enabling IRQs the emulator will crash indicating they were disabled. Strangely though, SD access still works.
Thinking maybe IRQ's get re-enabled occassionally, I did exactly what Admin@FreeDO said, and enabled/disabled IRQ's on each branch in my dynarec. This causes a good amount of slowdown, about a 75% DECREASE in performance.
So I'm not sure if that statement is quite factual yet. If anyone has expierence with using HH over Linux for GP2X dev let me know if performance is better. And if possible, let me know if it's due to the IRQs being the reason.
Squidge is in the process of doing his own testing, I believe. Hopefully he gets different results.
Two days wasted? Hope not!