English Amiga Board


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

 
 
Thread Tools
Old 10 February 2013, 12:11   #21
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
I've created another thread: "UAE Scripting Layer" (http://eab.abime.net/showthread.php?t=67805) for further ideas / discussion about a general Lua scripting layer and API
FrodeSolheim is offline  
Old 11 February 2013, 18:47   #22
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
@mr_a500: Hi, if you download the latest code from the git repo and build FS-UAE, you can have the feature you wanted (more or less) -but you need to "create it" yourself

Create a theme folder and put the following script in theme.lua (for example Documents/FS-UAE/Themes/ScanlineTheme/theme.lua):
Code:
bplcon0 = 0

function on_uae_vsync()
    bplcon0 = uae_peek_u16(BPLCON0)
end

function on_fs_emu_init_video()
    lowres_shader = fs_emu_load_shader("scanlines-nonlinear-blur")
    highres_interlaced_shader = fs_emu_load_shader("scanlines-classic")
end

function on_fs_emu_render_frame()
    if bit32.band(bplcon0, 0x8004) == 0x8004 then
        fs_emu_set_shader(highres_interlaced_shader)
    else
        fs_emu_set_shader(lowres_shader)
    end
end
Some notes:
* Remember to activate the theme (for example using option theme = ScanlineTheme)
* Remember to disable the scanline option, you don't want to double up on the scanlines...
* This won't work perfectly in all situations, but it will work well in many cases.
* The blpcon0 value stored by on_uae_vsync may not correspond to the correct frame due to threading when accessed in on_fs_emu_render_frame. This is not really a big problem here, but it will be possible to associate variables with specific frames later.
* Also, the script API is not frozen yet, so the script may need to be updated in the future.

Last edited by FrodeSolheim; 11 February 2013 at 19:00.
FrodeSolheim is offline  
Old 11 February 2013, 21:26   #23
mr_a500
Amiga-based Cyborg
 
mr_a500's Avatar
 
Join Date: Dec 2004
Location: Canada
Posts: 808
It looks like you have an undeclared variable:
Code:
src/emu/scanlines.c:57: error: ‘src2’ undeclared (first use in this function)
"src2" doesn't seem to do anything useful (testing?) but I declared it (same as "src") and recompiled. It then had no errors.

I did everything you listed above, but when I run FS-UAE, I get:
FAILED TO COMPILE FRAGMENT SHADER
NO SHADER PASSES LOADED
FAILED TO COMPILE FRAGMENT SHADER
NO SHADER PASSES LOADED
mr_a500 is offline  
Old 11 February 2013, 21:31   #24
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
The line src2++ must be deleted. I missed that one when cleaning up some code (in a section only compiled on PPC/bigendian architectures).

It's possible you don't have an sufficiently recent OpenGL GPU to run shaders. Please check FS-UAE.log for shader log.

Last edited by FrodeSolheim; 11 February 2013 at 21:37.
FrodeSolheim is offline  
Old 11 February 2013, 21:40   #25
mr_a500
Amiga-based Cyborg
 
mr_a500's Avatar
 
Join Date: Dec 2004
Location: Canada
Posts: 808
Here's part of the FS-UAE log:
Code:
fs_emu_xml_shader_init
checking shader scanlines-nonlinear-blur
checking shader (share)/shaders/scanlines-nonlinear-blur.shader
fs_get_application_exe_path
compiled vertex shader successfully
WARNING: failed to compile fragment shader
WARNING: no shader passes loaded
done loading shader
checking shader scanlines-classic
checking shader (share)/shaders/scanlines-classic.shader
fs_get_application_exe_path
compiled vertex shader successfully
WARNING: failed to compile fragment shader
WARNING: no shader passes loaded
done loading shader
I've got an ATI X800 XT card. (last ATI card available for PPC Mac)
mr_a500 is offline  
Old 11 February 2013, 21:57   #26
mr_a500
Amiga-based Cyborg
 
mr_a500's Avatar
 
Join Date: Dec 2004
Location: Canada
Posts: 808
I checked and it seems this card has limited fragment shader support. ("Damn you, ATI." ...shaking fist in air)

Instead of reworking the shader to get it to work on my old card (though it was kick-ass back in 2004 ), I think the best solution is for me to just use the old scanlines.
mr_a500 is offline  
Old 11 February 2013, 22:01   #27
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
OK -I should write the shader compiler log to the log file though, I see that I don't do this currently (it's quite possible that the shader can be rewritten to be more compatible with older cards, compilation errors will be useful).
FrodeSolheim is offline  
Old 21 February 2013, 16:45   #28
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
I cant get this to work, does it work with Intel HD 3000 card?
I cant get to work any theme at all actually.
I have two themes, scanlinetheme and 1084x_night_wall_wood in custom configuration.

In # Custom Configuration Options i have
theme = 1084x_night_wall_wood

If i add also under it second theme, it gets deleted when i save it
If i add it to # Custom Settings, second theme stays

but when i Start this configuration none of these themes are shown.
spajdr is offline  
Old 21 February 2013, 16:49   #29
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Hi spajdr, impossible to comment the problem without more information. Please FS-UAE.log after having enabled a theme.

(Also, you cannot add two themes at the same time, so only one of the config lines will be kept. When you use both custom options and custom settings, values in custom options (specific to configuration) overrides custom settings (global)).
FrodeSolheim is offline  
Old 21 February 2013, 17:16   #30
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
allrighty, here is the log file.
Attached Files
File Type: zip FS-UAE.log.txt.zip (8.3 KB, 123 views)
spajdr is offline  
Old 21 February 2013, 17:23   #31
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
@spajdr: The problem with this one is that the Lua support was not added until 2.1.27 (available here http://eab.abime.net/showthread.php?p=867244).

Regarding the problem with 1084x_night_wall_wood, I need FS-UAE.log for that case too. It seems the previous log file you posted was not complete. Please make sure you quit FS-UAE before uploading the log file, or the log may not be flushed.
FrodeSolheim is offline  
Old 21 February 2013, 17:28   #32
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
Second theme is not important, since if i cant use two at once, i want at least get these scanlines to work.
I updated to v27 but scanlines still not showing.
Attached Files
File Type: zip FS-UAE.log.txt.zip (8.5 KB, 108 views)
spajdr is offline  
Old 21 February 2013, 18:08   #33
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
OK, I see the problem. While Lua itself was added in 2.1.27, the code necessary for the above theme.lua to work was added later ("Hi, if you download the latest code from the git repo and build FS-UAE"..., dated Feb. 11 - 2.1.27 is from Feb. 9).

But if you simply want scanlines, just use the option "scanlines = 1" with the 2.1.27 version. (In 2.1.28, the scanlines option will revert to the former simpler/faster scanline implementation, and the new-style scanlines are available as a shader instead).
FrodeSolheim is offline  
Old 22 February 2013, 09:51   #34
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
Quote:
Originally Posted by FrodeSolheim View Post
OK, I see the problem. While Lua itself was added in 2.1.27, the code necessary for the above theme.lua to work was added later ("Hi, if you download the latest code from the git repo and build FS-UAE"..., dated Feb. 11 - 2.1.27 is from Feb. 9).

But if you simply want scanlines, just use the option "scanlines = 1" with the 2.1.27 version. (In 2.1.28, the scanlines option will revert to the former simpler/faster scanline implementation, and the new-style scanlines are available as a shader instead).
Thanks for all help Frode, i got scanlines working with Feb. 11 release
spajdr is offline  
Old 22 February 2013, 11:22   #35
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 if i may ask, how i can use shader files under shaders directory?
Thanks
spajdr
spajdr is offline  
Old 22 February 2013, 22:13   #36
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
Frode if i may ask, how i can use shader files under shaders directory? Thanks spajdr
Hi, examples are available here: http://fengestad.no/fs-uae/options#shader
FrodeSolheim is offline  
Old 22 February 2013, 22:42   #37
lesta_smsc
Registered User
 
lesta_smsc's Avatar
 
Join Date: Feb 2012
Location: United Kingdom
Posts: 3,175
Hey Frodo! I can't believe I missed this! The scanline implementation is pretty sweet! I think next time we play, it'll be using the scanline! :P
lesta_smsc is offline  
Old 25 February 2013, 12:13   #38
Goingdown
Registered User
 
Goingdown's Avatar
 
Join Date: Dec 2012
Location: Finland
Posts: 162
Hi,

New shader-based scanline renderer does not work on my Intel HD Graphics 3000 laptop. Is there something special it requires?
Goingdown is offline  
Old 25 February 2013, 12:30   #39
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
Quote:
Originally Posted by Goingdown View Post
Hi,

New shader-based scanline renderer does not work on my Intel HD Graphics 3000 laptop. Is there something special it requires?
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
spajdr is offline  
Old 25 February 2013, 12:43   #40
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
By the way, is it possible to combine two shaders into one file, like scanline classic + curvature?
spajdr 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 09:21.

Top

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