ADFFs on the Pi over RCA video

Discuss development specific to the Pi version of ADFFS
Vanfanel
Posts: 373
Joined: Mon Sep 16, 2013 12:01 am

ADFFs on the Pi over RCA video

Post by Vanfanel » Mon Aug 08, 2016 10:51 am

Hi Jon,

I'm spending some days in a friend's house, in a small village with only old RCA tvs.
I have configured Risc OS for using "Auto" monitor, and on the EDID I have tried enabling and disabling the SDTV parameter.
In all cases, Risc OS works right, and native games (Zool, Twinworld) work well, but ADDFs games hang on a black screen.
Do you know what would be needed in config.txt and/or Risc OS to get ADFFS games working over RCA?

thanks!

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

Re: ADFFs on the Pi over RCA video

Post by JonAbbott » Tue Aug 09, 2016 6:10 am

I've no idea why RCA video should make any difference, Is it definitely hanging? Have you tried a game that plays music immediately?

What res/refresh rate are you using for the output?

Try:

Code: Select all

F12
GOS
ADFRemapVideoMemory 13 160
(do you see anything here?)
ADFRemapVideoMemory
QUIT
(do you end up back at the desktop)

Vanfanel
Posts: 373
Joined: Mon Sep 16, 2013 12:01 am

Re: ADFFs on the Pi over RCA video

Post by Vanfanel » Tue Aug 09, 2016 11:43 am

@Jon:
I am using, in config.txt, regarding video:

fake_vsync_isr=1
sdtv_mode=2

Also, I have commented out hdmi_ignore_edid=0xa5000080, because if I don't comment it out, the Pi does not show image over RCA.

As for monitor configuration inside RISC OS, I have tried "generic" with a 720x576@50Hz video mode, "auto", and several Accorn models with different modes.

When I do:

F12
GOS
ADFRemapVideoMemory 13 160

the screen goes totally black, until I do QUIT, and then I go back to the desktop.

The games vary: Cannon Fodder is hanged, no music at all, etc. Wolfenstein tittle music plays, I can hear the menu music... Fireball music plays, too. But nothing is on screen.

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

Re: ADFFs on the Pi over RCA video

Post by JonAbbott » Tue Aug 09, 2016 9:16 pm

Vanfanel wrote:When I do:

F12
GOS
ADFRemapVideoMemory 13 160

the screen goes totally black, until I do QUIT, and then I go back to the desktop.
At a guess the GPU isn't rescaling the image, with RCA PAL I believe you're stuck with the stock 720x576i@50Hz overscanned image. When ADFFS emulates a legacy video mode it goes into the TV version of the MODE which if not rescaled will result in invalid video output.

I've been unable to find any detailed info on what the Pi's GPU does when RCA is enabled, so am speculating on what's happening.

Do you see video if you simply go into MODE 13 from BASIC?

Vanfanel
Posts: 373
Joined: Mon Sep 16, 2013 12:01 am

Re: ADFFs on the Pi over RCA video

Post by Vanfanel » Wed Aug 10, 2016 2:31 pm

@Jon: Yes, if I do:

F12
basic
MODE 13
<ENTER>

..I can see the BASIC cursor on a black background, type lines, etc.. normally.

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

Re: ADFFs on the Pi over RCA video

Post by JonAbbott » Thu Aug 11, 2016 1:40 pm

There's only a few things that could be causing the issue:
  1. The mapping of the GPU memory isn't working
  2. There's no VSync's being generated
There's a few more checks you could do :
Go into MODE 13 from BASIC and then:

Code: Select all

PRINT MODE
Does it say 13?
Then try

Code: Select all

MODE 320,256,32
Does it work?
If these all work, go back to the desktop and load the debug Module, then try the following with and without the forced 50Hz setting:

Code: Select all

F12
GOS
GOARM3JIT 0
Do you see any debug info on screen?
If not immediately try the following to force a PCI memory remap:

Code: Select all

ECHO <22><0>
Then

Code: Select all

GOARM3JIT
Do you see a prompt?
Finally, ENTER to return to the desktop.

Vanfanel
Posts: 373
Joined: Mon Sep 16, 2013 12:01 am

Re: ADFFs on the Pi over RCA video

Post by Vanfanel » Mon Aug 15, 2016 9:11 pm

I can do MODE 13 right. Then I can do
>PRINT MODE
and I get 13 as the response. It's ok.
Then I can do
>MODE 320,256,32

When I do PRINT MODE after that, I get

>PRINT MODE
805725396

which I assume is right too.

So then I do after loading the debug module:

Code: Select all

F12
GOS
GOARM3JIT 0
I can see this:

Code: Select all

_
ANDEQ R0,R0,R0
0fps 000000 000000 PC:FFFFFFS USR
And if I do "set ADFFS$50Hz true" before entering the "ARM3JIT 0" line, I get a black screen.
Writting ECHO <22><0> has no effect on that black screen :(

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

Re: ADFFs on the Pi over RCA video

Post by JonAbbott » Tue Aug 16, 2016 8:46 am

Vanfanel wrote:

Code: Select all

F12
GOS
GOARM3JIT 0
I can see this:

Code: Select all

_
ANDEQ R0,R0,R0
0fps 000000 000000 PC:FFFFFFS USR
And if I do "set ADFFS$50Hz true" before entering the "ARM3JIT 0" line, I get a black screen.
Writting ECHO <22><0> has no effect on that black screen :(
Do games work without the 50Hz setting, try one under the debug build so you can confirm its running code? I suspect VSyncs aren't being generated by the hardware, which explains why you see a blank screen with the debug build and 50Hz forced.

Note that the 50Hz setting changes the blitter to blit at VSync and doesn't generate a fake system wide 50Hz VSync.

Vanfanel
Posts: 373
Joined: Mon Sep 16, 2013 12:01 am

Re: ADFFs on the Pi over RCA video

Post by Vanfanel » Tue Aug 16, 2016 8:56 am

@jon:

Without the 50Hz setting, games don't run either. Some stay still with this on screen, no moving instructions/addresses:
(Alone in the Dark, Chuck Rock...)

_
ANDEQ R0,R0,R0
0fps 000000 000000 PC:FFFFFF8 USR

And others show the same information briefly and then go to a black screen, like Cannon Fodder.

This is all with the debug module.

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

Re: ADFFs on the Pi over RCA video

Post by JonAbbott » Tue Aug 16, 2016 11:03 am

I'm out of ideas and really don't know why Composite should make any difference. The GPU should isolate to software layer from the fact it's running in a low res interlaced video mode, but its somehow affecting things.

Post Reply