ADFFS 2.57 beta

Discuss development specific to the Pi version of ADFFS
JonAbbott
Posts: 1739
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex

Re: ADFFS 2.57 beta

Post by JonAbbott » Fri Jul 01, 2016 10:19 pm

Vanfanel wrote:Simon The Sorcerer hangs with a black screen when entering the tabern. However, I can go outside the village without problems, or enter the shop.
Probably a Page Zero access, I'll investigate.

Kaptain Konflikt looks like it's works now, see what you think. The music is a bit off beat though!

And if you want a laugh, try F.R.E.D...it has a few graphical issues!

JonAbbott
Posts: 1739
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex

Re: ADFFS 2.57 beta

Post by JonAbbott » Sun Jul 03, 2016 7:51 am

JonAbbott wrote:
Vanfanel wrote:Simon The Sorcerer hangs with a black screen when entering the tabern. However, I can go outside the village without problems, or enter the shop.
Probably a Page Zero access, I'll investigate.
I had a quick look at this yesterday. An error is occurring, which is triggering it's Environment Error handler. The Error handler than generates its own error saying there's no stack, however that code has a bug which causes a Page Zero access.

I've fixed the Page Zero access bug, which has now highlighted an issue with OS_GenerateError I need to look at, but haven't had time to look at the lack of stack so I can figure out the initial triggering issue.

Another issue I need to look into is Instruction tracing, when it's turned on in the debug build some games aren't working. I suspect that may be an issue within ADFFS' IRQ handler, which having looked at it has a few potential issues I need to resolve, namely:

1. There's a potential for it to fail to preserve interrupted Codelet states in some rare circumstances
2. It's not aware of the current task, so could potentially corrupt other tasks in a Wimp environment, or worst case lock the machine

JonAbbott
Posts: 1739
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex

Re: ADFFS 2.57 beta

Post by JonAbbott » Mon Jul 04, 2016 11:59 am

Vanfanel wrote:Simon The Sorcerer hangs with a black screen when entering the tabern. However, I can go outside the village without problems, or enter the shop.
It's being cause by a bug in the original compiler. The stack overflow checks are using a signed comparison, when they should be using unsigned. There's far too many to fix (250), so the alternative is to make the stack overflow handler return to the caller, which can be done by adding the following to the !Run:

Code: Select all

JITMEMORY 39E38 EA002565 E1A0F00E
JITMEMORY 39E3C EA002565 E1A0F00E
This gets you into the Tavern, but could potentially cause a crash if a stack check is ever performed before R14 has been preserved. I've checked all 250 occurrences of stack overflow check and it looks like R14 is always preserved prior to the stack check so the fix should work, the only way to know for sure is to do a full playthrough.

I've uploaded a revised obey.zip.

Post Reply