Page 4 of 4

Re: ADFFS 2.66 beta

Posted: Thu Jun 21, 2018 10:50 am
by JonAbbott
JonAbbott wrote: Thu Jun 21, 2018 12:03 am From the brief look I had at Hamsters earlier, it's possibly a bug in the code. It's changing to mode 141 (shadowed mode 13) which requires 160KB of screen memory, but later checks for 80KB. I've not looked to see which VDU variable its using to get the value it checks, so it's also possible there's an issue with RISC OS
Hamsters is doing a very odd check, its checking if the start address of Bank 1 is &14000 above Bank 0 - what it should be doing is checking the size of DA2 is &28000! Anyhow, it's re-highlighted an issue I've already raised on ROOL where the GraphicsV driver doesn't know how many screen banks of memory to allocate. I've changed my previous botch to a better botch, so hopefully it will now allocate the correct amount of screen banks and fix Hamsters.
JonAbbott wrote: Thu Jun 21, 2018 12:03 am I'll have another big change Module build up in a few days, more drastic changes for improved Wimp support. This time it's separating the RO3.11 screen memory mapping from the JIT in a way that allows all combinations of ADFEmulateRISCOS, ADFRemapVideoMemory and the JIT.
v2.68d is now on the dev site, but I've not tested beyond testing Hamsters.

Re: ADFFS 2.66 beta

Posted: Thu Jun 21, 2018 2:21 pm
by Vanfanel
@jon: tested latest modules, Hamsters works again but Elite's polygons have gone away again :D

Re: ADFFS 2.66 beta

Posted: Thu Jun 21, 2018 6:35 pm
by JonAbbott
Vanfanel wrote: Thu Jun 21, 2018 2:21 pm Elite's polygons have gone away again :D
There's an updated obey.zip on the dev site. Because of the changes it no longer requires an emulated RISC OS 3.11, but does require the screen memory to be remapped.

Re: ADFFS 2.66 beta

Posted: Sun Jun 24, 2018 8:28 pm
by Vanfanel
@Jon: Yes, polygons are back after updating the !Run for Elite 1.14 from this latest Obey.

Re: ADFFS 2.66 beta

Posted: Sat Jun 30, 2018 1:16 am
by JonAbbott
Despite putting more than ten hours a day in for several weeks, I'm struggling to find the root cause of various issues that are preventing me releasing a new build.

I've completely rewritten the Environment handlers to fix crashing that was occurring on the Elite Wimp app menus. When Wimp_Poll is called it changes the handlers, which was randomly causing crashing on the IRQ vector - I've no idea why.

The big issue I'm trying to resolve at the moment is with BASIC when it's running under the Wimp. For example, SYS "xx" TO xyz is triggering all sorts of odd issues from variable corruption to locks, remove the TO and there's no issues. All Wimp Info menus that are handled in BASIC also lock the machine, which may be a related issue.

I also spotted an issue in Overload (Paradise) on the instruction page that displays the VuMeters. They're updated via TickerV which calls a DSymphonyPlayer SWI. This seems to trigger a random PC branch, which must be caused by stack or codelet corruption. I've gone back several dozen builds and the problem is still there, it's just happening more often under recent builds.

Another more serious issue I've spotted is with the way I've implemented LDM and STM that touch PC. They're going to need complete rewrites if they're going to handle loading the PC from a misaligned source address. I started looking at a rewrite two weeks ago, but after a week of writing various methods with pen and paper, I decided it's probably better to hold off until I've got time to implement CPU Paravirtualization correctly as that would entail a further rewrite.

You can see the issue on the instructions page in Caverns. Caverns has another issue where the mouse cursor is blank, so the ship and score aren't visible. I went back several dozen builds and found that the ship was appearing and disappearing, so it's a timing issue somewhere.

I've noticed Black Angel does not work from HD, but I've been unable to determine why. My guess is the JIT cache is getting out of sync with main memory.

Long story short, there's lots of issues to resolve before most Wimp apps work reliably.

Re: ADFFS 2.66 beta

Posted: Wed Jul 04, 2018 8:28 pm
by Vanfanel
@Jon: I'll be watching this space for news and tests! :)

Re: ADFFS 2.66 beta

Posted: Wed Jul 04, 2018 11:25 pm
by JonAbbott
JonAbbott wrote: Sat Jun 30, 2018 1:16 am The big issue I'm trying to resolve at the moment is with BASIC when it's running under the Wimp. For example, SYS "xx" TO xyz is triggering all sorts of odd issues from variable corruption to locks, remove the TO and there's no issues. All Wimp Info menus that are handled in BASIC also lock the machine, which may be a related issue.
I've tracked this issue down to the OS not preserving page permissions when memory is mapped out/in. The knock on effect is self-modifying code becomes out of sync with the JIT cache. BASIC uses a self-modifying routine for SYS, hence the issues when SYS are handled after Wimp_Poll is called.
JonAbbott wrote: Sat Jun 30, 2018 1:16 am Black Angel does not work from HD, but I've been unable to determine why. My guess is the JIT cache is getting out of sync with main memory.
This is being caused by a combination of Environment handler issues and the Wimp_Poll issue.

It's very likely we'll need to wait for modifications to the OS before some Wimp apps work correctly. I can modify BASIC so it works, by rewriting it's SYS handler to perform a OS_SynchroniseCodeAreas on the SWI instruction, but any game that uses self-modifying code is going to fail, if page access permissions aren't preserved across Wimp_Poll.

The next issue to investigate is why K.V., Manchester United / Europe and Quark all crash when switching to custom screen modes. I suspect it may also need to wait for OS modifications to resolve, as GraphicsV doesn't currently know how many video buffers to allocate.

I spotted another issue with the use of IOC timers, which can be seen in Rotor. I've reverted part of the change made to get Labrynth working to resolve.

I'm hoping to have a new build up soon, once I've resolved the SYS issue in BASIC.