Jump to content
IGNORED

PAL Gray?


Cybearg

Recommended Posts

I'm working on making PAL versions for my finished games, preferably PAL50 for compatibility reasons, but if I lap a "set tv pal" in top of most of my games, all the colors are grey.

 

This doesn't have to do with the color palette--I have already set the colors to work correctly with PAL60, but if I try PAL50, Stella reports the games have 313 scanlines @ 49.84fps => PAL and all the colors are grey, even if though they're correct for PAL.

 

What is causing this less-than-50 FPS issue?

 

This applies both to a standard kernel game and a multisprite kernel game.

Link to comment
Share on other sites

I'm working on making PAL versions for my finished games, preferably PAL50 for compatibility reasons, but if I lap a "set tv pal" in top of most of my games, all the colors are grey.

 

This doesn't have to do with the color palette--I have already set the colors to work correctly with PAL60, but if I try PAL50, Stella reports the games have 313 scanlines @ 49.84fps => PAL and all the colors are grey, even if though they're correct for PAL.

 

What is causing this less-than-50 FPS issue?

 

This applies both to a standard kernel game and a multisprite kernel game.

 

You need to have an even scanline count for PAL, otherwise it will have color loss. Make your scanlines 312 instead of 313.

Link to comment
Share on other sites

You need to have an even scanline count for PAL, otherwise it will have color loss. Make your scanlines 312 instead of 313.

So the problem is that PAL takes more cycles than NTSC? So I will have to simplify the cycle count somewhere in order to make it work with PAL50?

Link to comment
Share on other sites

I tried compiling the ms.bas multi-sprite kernel game and nitebear.bas standard kernel game and they all worked with "set tv pal"

 

Indeed many of the colors were grey but not all of them. As well the cycle count stayed at a steady 313.

 

As Cybearg never posted source I cannot be sure he's just using colors that are valid for NTSC and grey on PAL.

Link to comment
Share on other sites

Indeed many of the colors were grey but not all of them. As well the cycle count stayed at a steady 313.

 

As Cybearg never posted source I cannot be sure he's just using colors that are valid for NTSC and grey on PAL.

This doesn't have to do with the color palette--I have already set the colors to work correctly with PAL60, but if I try PAL50, Stella reports the games have 313 scanlines @ 49.84fps => PAL and all the colors are grey, even if though they're correct for PAL.

 

theloon, that may well be a secondary issue, but the odd-numbered scanline count is the primary issue.

 

Cybearg, which kernel are you using, and can you post the source files?

This applies both to a standard kernel game and a multisprite kernel game.

I'll attach one of them to the post.

 

You can toggle this in Stella with Control-L, but it really should be left on, and the actual cause of the irregular scanline count fixed.

I'm not worried about being informed of the FPS count or anything--just that everything is grey.

joyridePAL.bas

joyride.inc

Link to comment
Share on other sites

He forgot to hit Control-L for "listen" on his ears. Happens to me, too :)

I was thinking ALT+L, which is used to toggle the FPS counter on and off, so I thought that stephena was trying to let me know how to turn off the FPS counter, in case he thought that I was complaining about seeing the scanline/framerate count.

 

Good to know about the CTRL+L, though it would still be gray on a real PAL machine, wouldn't it? So I still need to know what's causing the issue.

Link to comment
Share on other sites

So I still need to know what's causing the issue.

 

Omegamatrix already replied with the cause and the fix:

You need to have an even scanline count for PAL, otherwise it will have color loss. Make your scanlines 312 instead of 313.

 

It has nothing to do with cycles, just the number of scanlines which MUST BE EVEN for PAL.

Edited by SpiceWare
Link to comment
Share on other sites

Bataris ms.bas example is dead simple so I don't know why it would have an inappropriate amount of cycles by default.

 

That's easy - batari's in the US and the color loss routines in Stella used to not work correctly, so it would have been easy to overlook it.

 

December 22, 2006

 

...

 

Fixed bug in PAL colour-loss emulation, which wasn't actually being done for the original Stella and z26 palettes.

Link to comment
Share on other sites

That's easy - batari's in the US and the color loss routines in Stella used to not work correctly, so it would have been easy to overlook it.

 

There's actually still an issue with the colour-loss effect with Blargg filtering; it doesn't work in that mode either. This will take some time to fix, as the issue is somewhat involved. Long story short; when testing ROMs, make sure to try it with and without TV effects enabled.

Link to comment
Share on other sites

It has nothing to do with cycles, just the number of scanlines which MUST BE EVEN for PAL.

 

So, uh, HOW do I set the number of desired scanlines exactly? So far as I know, that's all done in the kernel, and kernel tweaking is beyond my level of understanding, especially if it involves reordering the kernel's cycle counts.

 

I get that I need an even number. I saw Omega say that, don't worry. But in my experience so far, the only thing that causes scanline counts to be off is running out of cycles, QED.

Edited by Cybearg
Link to comment
Share on other sites

Ah, I thought you missed that part as your response didn't mention the scanline count. I don't program in bB so I tend to not realize just how much of what's going on it hides from you.

 

The kernel is just the part of the code that draws the screen. There's also code for Vertical Blank and Over Scan, during which non-visible scan lines are being generated by the TIA chip. The sum of the scanlines for vertical blank + kernel + overscan should be 262 for NTSC or 312 for PAL, if one of them is off then PAL can experience the color loss problem.

 

Routines for Vertical Blank and Over Scan both tend to utilize a timer, TIM64T, to know when to end. I suspect bB is updating the timer with an incorrect value when PAL has been selected. Looks like RevEng is going to check it when he gets home, so he might have a fix for you this evening.

 

If you'd like a short term fix you could add this just before drawscreen:

 asm
sta WSYNC ; the WSYNC must be all caps
end
drawscreen

 

that should give you 314 scanlines for PAL (and 263 for NTSC), both of which are within display tolerance.

Edited by SpiceWare
Link to comment
Share on other sites

If you'd like a short term fix you could add this just before drawscreen:

 asm
sta WSYNC ; the WSYNC must be all caps
end
drawscreen

 

that should give you 314 scanlines for PAL (and 263 for NTSC), both of which are within display tolerance.

 

Unfortunately that won't work. bB code runs in overscan, and the first thing "drawscreen" does is wait for INTIM to finish.

 

Does someone use PAL50 nowadays?

 

AFAIK people don't like slower speed and prefer PAL60.

 

For sure. That's probably why it took so long for anybody to find the bug. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...