English Amiga Board


Go Back   English Amiga Board > Support > support.FS-UAE

 
 
Thread Tools
Old 25 February 2013, 16:19   #41
mr_a500
Amiga-based Cyborg
 
mr_a500's Avatar
 
Join Date: Dec 2004
Location: Canada
Posts: 808
I noticed a problem with the replaced ("old style") scanlines - in 2.1.29:



I also noticed this when I attempted to use "old style" scanline code (from 2.1.19) in 2.1.27 - but I just assumed I screwed something up or missed something.

Last edited by mr_a500; 25 February 2013 at 22:08. Reason: 2.1.27u was first version with problem
mr_a500 is offline  
Old 25 February 2013, 18:17   #42
Goingdown
Registered User
 
Goingdown's Avatar
 
Join Date: Dec 2012
Location: Finland
Posts: 162
Quote:
Originally Posted by spajdr View Post
Yo matey, what exact shader you trying? i dont have any problem with my Intel HD 3000.

Attach file fs-uae.log.txt from FS-UAE\Logs directory
Tried scanlines-nonlinear and scanlines-classic. Both will give same error message. All other shaders I tried are working.
Attached Files
File Type: zip FS-UAE.log.zip (20.9 KB, 171 views)
Goingdown is offline  
Old 25 February 2013, 20:08   #43
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Quote:
Originally Posted by spajdr View Post
By the way, is it possible to combine two shaders into one file, like scanline classic + curvature?
Yes, in most cases. But it might require some knowledge of how the shader system works to get optimal results...

Quote:
Originally Posted by Goingdown View Post
Tried scanlines-nonlinear and scanlines-classic. Both will give same error message. All other shaders I tried are working.
Thanks for helping debugging the problem (IRC). Fixes will be included in .30 (Shaders did not follow the specification to the letter, worked with some OpenGL drivers).

Quote:
Originally Posted by mr_a500 View Post
I noticed a problem with the replaced ("old style") scanlines - in 2.1.29: I also noticed this when I attempted to use "old style" scanline code (from 2.1.19) in 2.1.22 - but I just assumed I screwed something up or missed something.
I haven't seen anything like that. But when I think of it, the scanline implemention may not work properly with (video format) rgb565. Is that what you're running? Does it work with video format rgba or bgra?
FrodeSolheim is offline  
Old 25 February 2013, 21:37   #44
mr_a500
Amiga-based Cyborg
 
mr_a500's Avatar
 
Join Date: Dec 2004
Location: Canada
Posts: 808
Quote:
Originally Posted by FrodeSolheim View Post
I haven't seen anything like that. But when I think of it, the scanline implemention may not work properly with (video format) rgb565. Is that what you're running? Does it work with video format rgba or bgra?
I use default video format. The problem is same with rgba. The rgb565 was screwed up (remember corrupted screenshot in other thread) before, but now the screen remains completely black. (...but I don't care about that because default video format was fine before)

Something you changed when making the scanlines as shaders is causing this problem. (It's not in scanlines.c because as I said, when using the one from 2.1.19 instead - the problem is still there.)
mr_a500 is offline  
Old 25 February 2013, 21:39   #45
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
OK, what was the last version where scanlines worked correctly for you? 2.1.19 does not work I gather, does for example 2.1.18?
FrodeSolheim is offline  
Old 25 February 2013, 21:54   #46
spajdr
Old fart
 
spajdr's Avatar
 
Join Date: Feb 2003
Location: Ostrava/Czech Republic
Age: 46
Posts: 315
Send a message via ICQ to spajdr
Strange, all shaders works for me. I just have latest intel driver.
spajdr is offline  
Old 25 February 2013, 22:07   #47
mr_a500
Amiga-based Cyborg
 
mr_a500's Avatar
 
Join Date: Dec 2004
Location: Canada
Posts: 808
2.1.19 was the last version with the old scanlines - working fine. 2.1.21 - 2.1.27 have the new scanlines - working fine. 2.1.27(u?) has the new scanlines re-implemented as shader. That's the first version with the problem.
mr_a500 is offline  
Old 25 February 2013, 22:33   #48
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
@mr_a500. There's a couple of lines missing (for PPC), try this patch
Code:
diff --git a/libfsemu/src/emu/scanlines.c b/libfsemu/src/emu/scanlines.c
index d7deb36..64849d6 100644
--- a/libfsemu/src/emu/scanlines.c
+++ b/libfsemu/src/emu/scanlines.c
@@ -37,6 +37,10 @@ void fs_emu_render_scanlines(uint8_t* out, fs_emu_video_buffer *buffer,
                 continue;
             }
             for (int x = 0; x < cw; x++) {
+#ifdef __BIG_ENDIAN__
+                src ++;
+                dst ++;
+#endif
                 *dst++ = (*src++ * light_ia) / 256 + scanline_light;
                 *dst++ = (*src++ * light_ia) / 256 + scanline_light;
                 *dst++ = (*src++ * light_ia) / 256 + scanline_light;
FrodeSolheim is offline  
Old 26 February 2013, 11:57   #49
spajdr
Old fart
 
spajdr's Avatar
 
Join Date: Feb 2003
Location: Ostrava/Czech Republic
Age: 46
Posts: 315
Send a message via ICQ to spajdr
Frode : i wonder, can you add this shader to be compatible with fs-uae?
http://www.sendspace.com/file/p8037b

spajdr is offline  
Old 27 February 2013, 21:21   #50
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
The shader language is GLSL, so the shader could perhaps work with FS-UAE with small modifications. It isn't enough that the language is OpenGL Shading Language, shaders must also know how to get the Amiga video texture (and other information) from the emulator.

FS-UAE loads shaders following the "XML Shader Format 1.1" (http://gitorious.org/bsnes/pages/XmlShaderFormat). So someone would have to rewrite the shader slightly.

(Hmm, looking at the shader code, it uses two uniforms in addition to the video texture, color_texture_sz, color_texture_pow2_sz (vec2), and it is not immediately obvious what these are. FS-UAE do not provide such vec2s to shaders).
FrodeSolheim is offline  
Old 27 February 2013, 21:34   #51
spajdr
Old fart
 
spajdr's Avatar
 
Join Date: Feb 2003
Location: Ostrava/Czech Republic
Age: 46
Posts: 315
Send a message via ICQ to spajdr
No problem thanks for trying
spajdr is offline  
Old 16 March 2013, 00:56   #52
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,436
Another nice example for non-linear scanlines.

Retro-Nerd is offline  
Old 17 March 2013, 22:52   #53
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
@Retro-Nerd, Yes, though you can see a slightly annoying "wave pattern" in the solid color areas. See this thread on how to fix that: http://eab.abime.net/showthread.php?t=67535.
FrodeSolheim is offline  
Old 17 March 2013, 22:59   #54
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,436
Thanks for the custom theme settings. Looks really good now.
Retro-Nerd is offline  
Old 30 March 2013, 13:21   #55
TEOL
Registered User
 
Join Date: Jul 2009
Location: Middlesex, England
Posts: 141
After looking at this thread since I was watching a video at the same time I nicked these real scanlines from a youtube video where somebody recorded a video of an old game on his actual CRT TV.

So now we have a picture of some real scanlines maybe somebody can work on making a legit looking ones for our AMIGA emulator now and be the first emulator ever to have legit looking scanlines in the program?

As you can see by the picture the legit style scanlines have large spaces in between each set and look diagonal half circle style.

The real half circle scanlines also have verical scanlines going through them which are the Composite/RGB/RF/Component scanlines which come from the systems to make up the picture.

So basiclly TV scanlines are oval rather than horizontal and Console/Computer scanlines are vertical both together making a real scanlines picture which it's what I gather from the picture.

These oval scanlines look like a vortex into another dimension but they are at the same time actual CRT TV set ones as well. What retro beauty.

I've now since last Janurary become a regular user of FS-UAE and WinUAE unless if I'm pratting about in Workbench GUI as my WinUAE hard drive files didn't want to work in it is an after thought as far as playing both disk and WHD games is concerned now so I'm a complete FS-UAE backer all the way.


Last edited by TEOL; 30 March 2013 at 13:34.
TEOL is offline  
Old 30 March 2013, 14:31   #56
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Quote:
Originally Posted by TEOL View Post
So basiclly TV scanlines are oval rather than horizontal and Console/Computer scanlines are vertical both together making a real scanlines picture which it's what I gather from the picture.
I'm afraid the "circular wave pattern" in the photo does not represent real scanlines on CRTs/TVs. This pattern shows up in the digital picture because the picture has too low resolution to represent the complex/real pattern on the TV screen. This is an aliasing effect (see Moiré_pattern), and the person taking that picture would not see that pattern when looking at the real TV screen.

So this photo should not be used as basis for creating a scanline shader

Btw, you'll also see similar problems in TV broadcasts if a person in a TV studio has a sweater with a detailed checkered pattern, for instance.

Last edited by FrodeSolheim; 30 March 2013 at 14:41.
FrodeSolheim is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scanline modifications wanted Retro-Nerd support.FS-UAE 8 20 August 2013 20:31
Scanline shader problem TysonJacobs support.WinUAE 3 26 July 2013 09:43
Playing around with RGB/Scanline-Effect lomaxx Nostalgia & memories 13 23 July 2009 14:08
Scanline option request Christian request.UAE Wishlist 3 26 May 2009 22:24
REQ : Vistapro (Landscape Renderer) Djay request.Apps 22 01 May 2002 22:47

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:16.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09330 seconds with 16 queries