ADFFS 2.71 beta

Discuss ADFFS development and download test releases
Post Reply
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.71 beta

Post by JonAbbott »

Vanfanel wrote: Thu Jan 24, 2019 8:15 pm @Jon: I have discovered another problem between games. If you run "Simon the Sorcerer" and then exit and try to run "Alone in the Dark", it will fail.

Another game that has problems on quit is "Magnetoids":
-If you quit via CTRL+SHIFT+F12 it goes to a black screen (system is still running).
-If you quit via CTRL+ESC, it quits well, but trying to run it again, it fails.
Sounds like something isn't shutting down cleanly, I'll investigate.
richw wrote: Thu Jan 24, 2019 9:41 pm I am pretty impressed that it is even possible to cleanly exit and load something else. Back in the day, you would have to reboot, as there was always dirt left behind.
As ADFFS is hypervising the game, it pretty much knows everything it's doing and simply shuts down the hypervising layer to terminate it. It's not a true Hypervisor in the sense that it doesn't paravirtualize the CPU or MMU yet, so you can't run a full OS under it, but it's near identical to a type 1 Hypervisor in most other respects, such as the code running natively on the CPU and minimal interaction.
richw wrote: Thu Jan 24, 2019 9:41 pm I just assumed a reboot was sensible, particularly with all the hairy tricks ADFFS gets up to! I will try and do some tests without rebooting in future.
If a game is cleanly quit via CTRL-ESC or its equivalent, running another game should cause no issues assuming the game closed any open files. Even if it fails to release IRQ's ADFFS will shut them down when the JIT shuts down.

Forcibly terminating a game via CTRL-SHIFT-F12 will cause ADFFS to terminate all IRQ code, voices, channel handlers, sequencers etc that are running in AppSpace. It doesn't currently close open files and I can't remember off the top of my head what it does with 26bit Modules, they're possibly left alive and will be RMKilled when the JIT shuts down.

ADFFS certainly doesn't do anything hairy, it's all done through legal OS calls and it doesn't modify any parts of the OS. The self-modifying code support I suppose you could say is a bit dodgy, as it changes the write permissions on AppSpace pages which is something the OS doesnt know about, but I believe it's something that's going to be added as currently RISC OS corrupts page flags.

On a seperate issue...Whilst testing the Pi3 blanking issue yesterday I noticed RISCOS was down clocking the CPU when it was being heavily used by background non-Wimp tasks, key presses at the commandline had a noticeable delay on them when ADFFS was emulating a legacy mode. As a consequence, I'm going to modify the blitter to force the CPU speed high around itself and halt the CPU when the game is waiting.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.71 beta

Post by JonAbbott »

Vanfanel wrote: Thu Jan 24, 2019 8:15 pm If you run "Simon the Sorcerer" and then exit and try to run "Alone in the Dark", it will fail.
It appears I've broken something. After running a game and quitting, the first time the JIT shuts down properly. Subsequent running and quitting any game however, the JIT doesn't shut down.

Until I've fixed this, you'll need to reboot after quitting or terminating a game.

I've also spotted Alone in the Dark contains a save game, so I'll remove that and repackage it. If you spot any other games that have saves or unclean high score tables, let me know.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.71 beta

Post by JonAbbott »

2.71t package is up. I've added in the CPU speed control, it now halts the CPU when waiting and puts the CPU to 100% when blitting.
Vanfanel wrote: Wed Jan 23, 2019 12:14 pm -HeroQuest is still hanging on the language selection screen
Should now be fixed. Double check Pacmania is smooth. I did a comparison and couldn't honestly tell the difference between 2.71s and 2.71t.
Vanfanel wrote: Thu Jan 24, 2019 8:15 pm If you run "Simon the Sorcerer" and then exit and try to run "Alone in the Dark", it will fail.
Fixed. It was decreasing the task count one too many times, so went negative leaving the JIT stuck on :oops:
Vanfanel wrote: Thu Jan 24, 2019 8:15 pm Another game that has problems on quit is "Magnetoids":
-If you quit via CTRL+SHIFT+F12 it goes to a black screen (system is still running).
-If you quit via CTRL+ESC, it quits well, but trying to run it again, it fails.
Remove the package and redownload it and it should now exit cleanly.

There is an updated USBJoystick with this release, which fixes the issues with some games, but mouse clicks don't register in Populous and HeroQuest skips past the intro with USBJoystick loaded.

Richard - I think I said Jahingir Khan Squash wasn't working with 0.14, but it appears to now be working :? - I wonder if there's a register getting corrupt, as I've not changed anything that could possibly fix this game. I'll take a look at HeroQuest over the weekend as that's an issue I've seen previously, but didn't realise it was USBJoystick causing it to skip the intro. It doesn't support Joystick, so is possibly the same issue as Populous.

I'll do some debugging around the Populous and HeroQuest key/mouse code to see if I can spot anything.
Vanfanel
Posts: 576
Joined: Mon Sep 16, 2013 12:01 am

Re: ADFFS 2.71 beta

Post by Vanfanel »

@Jon: PacMania (and others) is not smooth anymore, it has hiccups... :(
I really prefer smooth graphics for the games than HeroQuest compatibility.
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.71 beta

Post by JonAbbott »

Vanfanel wrote: Sat Jan 26, 2019 12:13 am PacMania (and others) is not smooth anymore, it has hiccups... :(
I'll go the * command route then
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.71 beta

Post by JonAbbott »

JonAbbott wrote: Fri Jan 25, 2019 11:57 pm I'll do some debugging around the Populous and HeroQuest key/mouse code to see if I can spot anything.
HeroQuest's problem is OS_Byte 128, 255 which always returns R1=1 with USBJoystick loaded. Its expecting R1=0.

Populous looks like a similar issue, its using OS_Byte 128,7 and OS_Byte 128,8 to determine the mouse position, both of which return R1=1 when USBJoystick is loaded.

So the problem is in the ADC code.
richw
Posts: 159
Joined: Sat Sep 14, 2013 9:05 pm

Re: ADFFS 2.71 beta

Post by richw »

Ahh... That makes sense. I should have read this before mucking about earlier!

There are some *commands in USBJoystick which can turn on/off the ADC. A bit of a hack.

I shall have to check the code and see if I can ignore 128,7 (and 8) without breaking ADC. Or maybe I could disable ADC by default?
JonAbbott
Posts: 2938
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: ADFFS 2.71 beta

Post by JonAbbott »

richw wrote: Sat Jan 26, 2019 11:31 pm I shall have to check the code and see if I can ignore 128,7 (and 8) without breaking ADC. Or maybe I could disable ADC by default?
I'd probably say that reason codes 1-4 can remain captured by USBJoystick, 7-8 should only be captured if emulating a Voltmace Joystick Eliminator and all other reason codes should be passed to the OS.
richw
Posts: 159
Joined: Sat Sep 14, 2013 9:05 pm

Re: ADFFS 2.71 beta

Post by richw »

I have spotted an issue in the bytev handler. A missing break!

I can see Heroquest is doing reason 255, and now USBJoystick is passing on the request, it works.
Seems to make Populous work too.

JKSquash still jumps the intro, and moving the joystick starts accepting the menu options. Then I get stuck in a game I cannot control. Odd. Looks like it is hitting the joy_read swi but that is always returning zero.
richw
Posts: 159
Joined: Sat Sep 14, 2013 9:05 pm

Re: ADFFS 2.71 beta

Post by richw »

I am monitoring the number of USB HID reads and can see that increasing as the game is running, so I really don't get why 0 is being returned.

In BASIC, I can do:

SYS &CFFC0 TO j% : PRINT j%

and moving the joystick results in different values in j%

But when the game runs, Reporter shows me that we are always returning 0!
Post Reply