Quark - screen goes black after several minutes of play

Discuss ADFFS development and download test releases
wmd
Posts: 120
Joined: Thu Feb 04, 2021 1:02 am

Quark - screen goes black after several minutes of play

Post by wmd »

A few months ago I acquired a hacked version of Quark, it used the nodisc hack from here:

https://www.phlamethrower.co.uk/riscos/

However, after several minutes of gameplay, the game screen starts to flash and fades out to black. The screen doesn't reappear until you have lost all your lives and the high score screen is displayed. At first I thought this was an issue with the nodisc hack. However, today I obtained JFD images of both original discs, and the problem is still there. Any chance you could look into this? I can upload a video later if that helps.
JonAbbott
Posts: 2959
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Quark - screen goes black after several minutes of play

Post by JonAbbott »

What refresh rate is your screen?

My first thought is its not changing the palette at the correct time during VSync, which is causing the palette to remain black.
wmd
Posts: 120
Joined: Thu Feb 04, 2021 1:02 am

Re: Quark - screen goes black after several minutes of play

Post by wmd »

I use a CRT monitor running at 50Hz.
wmd
Posts: 120
Joined: Thu Feb 04, 2021 1:02 am

Re: Quark - screen goes black after several minutes of play

Post by wmd »

Interestingly, I just tried again, this time to capture a video, and for the first time in what must be at least 5 tests, it did not fade to black. However, much further than normal into the game it did eventually fade to black and stay that way. It only happens when the stage colours start to flash (palette change?) which I think indicates that the next stage has started.
wmd
Posts: 120
Joined: Thu Feb 04, 2021 1:02 am

Re: Quark - screen goes black after several minutes of play

Post by wmd »

Example of the palette change:

https://www.youtube.com/watch?v=EuCSgr0mjQo

However, when the bug occurs, instead of a smooth fade between colours, instead the whole screen starts to flash then fades to black.
JonAbbott
Posts: 2959
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Quark - screen goes black after several minutes of play

Post by JonAbbott »

I'll have to dump the game and look through its code to see what it's doing. It certainly sounds like something is going out of sync.

I don't recall if its this game or another, but there was at least one game that stored code in the video memory and switched the palette to black to hide it.
JonAbbott
Posts: 2959
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Quark - screen goes black after several minutes of play

Post by JonAbbott »

I've looked at the game code and can't see any obvious reason for the palette to go black. The palette swap code is all hanging off VSync, so does occur at the correct time...so it's more likely to be a bug in the game or possibly protection kicking in.

Whilst investigating, I've back-ported the various existing bug fixes and found a few more that I've fixed. I don't think they'll correct this issue, but its worth a try, if you want to grab the latest Boot scripts.

To investigate further, I need to figure out an invulnerability patch so I can leave the game running and compare it on a Pi vs Arc to see if it occurs on both.
wmd
Posts: 120
Joined: Thu Feb 04, 2021 1:02 am

Re: Quark - screen goes black after several minutes of play

Post by wmd »

I tried the new obey file, unfortunately the issue persists. It happened quite early on this time, as it normally does:

https://youtu.be/UrvFYuLyZOw

Once it fades to black, the intermittent flashing / reappearing of the screen with the wrong colours happens when I press the smart bomb button.
wmd
Posts: 120
Joined: Thu Feb 04, 2021 1:02 am

Re: Quark - screen goes black after several minutes of play

Post by wmd »

Note the HDD LED flashing on the A5000 as the screen goes black.
JonAbbott
Posts: 2959
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Quark - screen goes black after several minutes of play

Post by JonAbbott »

It's a bug in the game code. It looks like its supposed to transition to black at the end of a level, then fade back up for the next, but its doing both in parallel. I suspect there's supposed to be a timer running whilst it fades out, before it goes to the next level to the fade back in.

I've disabled the fade out in the latest Boot script as a temporary fix until I can figure out what the author intended.
Post Reply