Page 1 of 1

ADFFS 2.53 update

Posted: Fri Jan 01, 2016 12:53 pm
by JonAbbott
Update on current situation...

I've had a couple of months off now, been in/out of hospital several times and had a general break from anything computer related. Health is rubbish, but it's not going to get any better, I just have to live and deal with it. So, putting that to one side, where are we now with regard to ADFFS:

Pi2 support is complete although some games aren't working correctly, this I believe is down to either deprecated instructions or errata in the ARMv7 core. I've catered for all documented deprecated instructions and implemented several fixes for documented errata which have got more games working, but obviously not all. As part of the Pi2 support, RISCOS was extended to expose the ARMOps to user code and it's these that ADFFS now uses for flushing the cache etc, there's a slim chance it could be related to this. We know there's no issues using the ARMOps on ARMv5/v6 as games are working on the Pi, it's just the Pi2 that has issues, so there's the potential that the ARMOps aren't flushing the caches correctly or that a different sequence of cache ops are required for ARMv7.

Obviously due to RISCOS being extended, the next release of ADFFS will require RISCOS 5.23 which opens up the possibility to be more intelligent about Page Zero access. For some time now, ADFFS has implemented it's own very of ZeroPain, in that it traps Page Zero read/writes and translates them to either internal values, or switches them to legal RISCOS calls. To implement read access however, ADFFS has to emulate all load instructions at least once to see if there touching Page Zero. This obviously isn't the best method, but was the only option at the time, whilst I waited for Page Zero to be relocated.

With Page Zero now relocated, the emulator can be removed and all Page Zero read/writes can be handled by the Abort handler, which is obviously quicker and also means all Page Zero access will be trapped, where currently reads are only trapped if the initial emulation of the instruction touched Page Zero. If it's a pointer that subsequently becomes NUL, it's currently not trapped.

I don't plan on implementing this change just yet though as its a big change, I'll get the initial Pi2 release out and give folk a chance to migrate to RISCOS 5.23 first and look to implement in the next major release.

The big outstanding piece of work is the changes to the blitter. During testing two games highlighted a problem, namely James Pond 2 and Grieveous Bodily ARM. Both have jerky scrolling, which despite many attempts to pin down, I'm still not certain of the cause. What I think is happening, is that the geometry is changing between frames and the Pi GPU is one frame behind that change, so it jerks then correctly itself on the next frame.

To attempt correct this, the blitter has undergone a major overhaul switching from dual buffer to triple buffer to allow for a one frame stall. The bit I've yet to code is tracking the geometry independently for each frame and passing it to the GPU at the correct time, this is what I'll be working on soon with a view to getting an alpha build out publicly.

I'm aiming to start on this next week and hope to have something public in Jan, provided there's no major show stoppers. Existing games that were working may not in this release, you'll have to bare with us whilst the issues are ironed out. Between the last release and this, very little code has remained untouched, so it's going to take a few releases to get it back to beta quality.

Re: ADFFS 2.53 update

Posted: Wed Jan 06, 2016 2:09 pm
by Vanfanel
Sorry to hear about those health problems, Jon. I hope you recover the best you can. Maybe some rest from programming would help. Programming at nights can be particularly bad for sleep quality and affect your health in the long term.
I will be waiting for new version, no matter how long it takes, and health comes first.