Update on next release
Re: Update on next release
Didn't have time to test today! Will try to start testing tomorrow, really.
Re: Update on next release
Its a bit buggy at the minute, as you can tell from the list above, I'll attempt to get it resolved tonight so you can help with blitzing the testing tomorrow. If we both hit it, you on the Pi, me on StrongARM we'll get it done a lot quicker.Vanfanel wrote:Didn't have time to test today! Will try to start testing tomorrow, really.
Spent a few hours debugging today and found an issue with the branch walkers interaction with CLib. That's now corrected, but it's highlighted another more fundamental issue I need to resolve. It shouldn't be an issue, its related to how ADFFS handles illegal instructions and illegal branches which are inevitable when predicting branches in self-modifying code and jumps to appspace where code hasn't been loaded yet.JonAbbott wrote:I've spotted some code leakage between the builds, which is down to a compile bug. I'll spend today going through the whole code base to resolve this and see if it's the cause of the problem.
I've also spotted another bug that's causing Battle Chess to crash when the branch prediction is turned off that I need to investigate.
Re: Update on next release
I was up until 3:30am debugging this issue last night, it's the Unsqueeze module that's actually crashing - not ADFFS. It's trying to write to FFFFFxxx for some reason.JonAbbott wrote:I've also spotted another bug that's causing Battle Chess to crash when the branch prediction is turned off that I need to investigate.
ADFFS is the root cause however, as rolling back the code two weeks resolves the problem. I've ruled out the Abort handler, GOARM3JIT command and hypervised SWI code which are the main three that would affect this, so now need to pick through the hundreds of smaller changes in around 40 other files.
I'm seeing the problem under emulation as well, so we can rule out caching as well. Register/Stack corruption is my best guess as the cause.
Have just ruled out ldr, str and ldr_check. b, bl, core and codelets are the only code changes left to check.
Re: Update on next release
The problem is in "b" - the code that handles the Branch instruction. I suspect its thinking a branch to CLib needs walking, should hopefully have this fixed soon, then need to diagnose the branch prediction that's breaking the other game. The two issues may well be related.JonAbbott wrote:I've also spotted another bug that's causing Battle Chess to crash when the branch prediction is turned off that I need to investigate.
... b, bl, core and codelets are the only code changes left to check.
Re: Update on next release
It was indeed trying to walk CLib and is now fixed. The two issues are also related, so I'm working on the other problem now and will then upload a new version to the dev site for testing.JonAbbott wrote:The problem is in "b" - the code that handles the Branch instruction. I suspect its thinking a branch to CLib needs walking, should hopefully have this fixed soon, then need to diagnose the branch prediction that's breaking the other game. The two issues may well be related.
Re: Update on next release
@Vanfanel - I've uploaded revised versions of all modules to the dev site (/development/32bit/CPU) which have resolved the two issues above, overwrite the main ZIP files with these.
There is another issue though, as Battle Chess hangs whilst swapping discs. I'm going to quickly test the games above and update their status.
EDIT: Still cream crackered, thought I had it resolved as it's working under emulation. Back to the drawing board I'm afraid as even after turning off branch prediction it's broken
There is another issue though, as Battle Chess hangs whilst swapping discs. I'm going to quickly test the games above and update their status.
EDIT: Still cream crackered, thought I had it resolved as it's working under emulation. Back to the drawing board I'm afraid as even after turning off branch prediction it's broken
Re: Update on next release
@Vanfanel - I've uploaded revised versions of all modules to the dev site (/development/32bit/CPU) which have resolved most issues, overwrite the main ZIP files with these.
There's still a problem with CLib games which I'm looking into.
There's still a problem with CLib games which I'm looking into.
Re: Update on next release
Have now corrected two bugs. One in the Branch Prediction and another in the Cache optimization. Full cache invalidation is now substantially reduced:
The issues listed in this post are now consistent under emulation, so I can rule out cache issues.
@Vanfanel - I've uploaded the revised Modules to the dev site (/development/32bit/CPU)
Before | After | Description |
>473 | >457 | Number of times the JIT was entered, down by 4% |
I:4915 | I:4912 | Number of Instructions the JIT has had to looked at |
R:1042 | R:1057 | Number of Instructions the JIT has re-encoded |
L:342 | L:342 | Number of LDR's it's had to check for page zero reads |
C:85 | C:2 | Number of full Cache flushes required |
#:525 | #:522 | Number of codelets created |
@Vanfanel - I've uploaded the revised Modules to the dev site (/development/32bit/CPU)
Re: Update on next release
What an incredible thread. Just want to say how grateful I am that you continue to devote so much time and expertise to this project. Thank you.
Re: Update on next release
You're welcome, if you have any feedback let me know. Would you like more frequent posts? More technical detail? Less? More pictures?regin wrote:What an incredible thread. Just want to say how grateful I am that you continue to devote so much time and expertise to this project. Thank you.
I keep meaning to put videos up on eBay to show games running on the Pi, but spend so much time programming, I never seem to find the time to configure the capture device - let alone play the game and capture it! I'll nag my son tomorrow - he's the YouTube expert and it's his capture device
Latest update is that I believe there's one or possibly two bugs remaining. After correcting an issue with the BL instruction yesterday I noticed the JIT was turning itself off after Cannon Fodder loads, secondly the UnsqueezeAIF Module on RISCOS 5 is crashing when expanding various AIF based games. I noticed a recent update to RISCOS to fix a bug in this so need to see if it's the OS or ADFFS causing it. I'm not seeing the problem on RISCOS 3.71 but it's hard to tell when there's so many other factors involved, such as cache, vector handlers, etc.