Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news


  

Author Topic: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots  (Read 11825 times)

0 Members and 1 Guest are viewing this topic.

ZeroPoint

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
EDIT: NEW VERSION FOR 0.152 - Download "VerticalMod.zip" attached somewhere below.

These are instructions how to get vertical games to look good (larger) on a horizontal LCD monitor using HLSL.

It will give the illusion of a vertical monitor tilted back.  ;D

The following settings are for Bomb Jack, but can be used for any vertical game with som minor changes.

The pincushion setting for Bomb Jack is 0.6. You may have to change this slightly for other games.

Change the + - sign in line 124 for games that are rotated 180 degrees from Bomb Jack.

This change is tested with MAMEUI32.143.1 on a 16:9 23,5" monitor with 1920 x 1080 resolution.

NOTE ! This is not any part of MAME development. Use it or do improvements if you wish.

Hopefully this will be integrated into future versions of MAME.

IMPORTANT: These settings will affect horisontal games. I would recommend to have separate MAME installations for vertical and 180 degree vertical games.

NEW: Ready to use post.fx now attached in later posts. Screenshots added !

Do the following changes to post.fx in the HLSL folder:

-------------------

Change line 75 from

Output.Position.y = 1.0f - Output.Position.y;

to

Output.Position.y = 1.12f - Output.Position.y;

-------------------

Change line 78 from

Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f);

to

Output.Position *= float4(3.5f, 3.5f, 1.0f, 1.0f);

-------------------

Change line 123 from

float2 PinViewpointOffset = float2(0.0f, 0.0f);

to

float2 PinViewpointOffset = float2(0.2f, 0.0f);

-------------------

Change line 124 from (Leave the + sign as is if monitor is 180 degrees from BombJack)

float2 PinUnitCoord = (Input.TexCoord + PinViewpointOffset) * Ratios * 2.0f - 1.0f;

to

float2 PinUnitCoord = (Input.TexCoord - PinViewpointOffset) * Ratios * 2.0f - 1.0f;

-------------------

Change line 131 from

BaseCoord *= 1.0f - PincushionAmount * Ratios * 0.2f; // Warning: Magic constant

to

BaseCoord *= 1.0f + PincushionAmount * Ratios * 0.2f; // Warning: Magic constant

-------------------

Change line 136 from

ScanCoord *= 1.0f - PincushionAmount * Ratios * 0.2f; // Warning: Magic constant

to

ScanCoord *= 1.0f + PincushionAmount * Ratios * 0.2f; // Warning: Magic constant

-------------------
-------------------

Settings in mame.ini (or use slider controls):

scanline_size              1.0 (gives true scanlines)
scanline_height           0.7 (or whatever)

pincushion                  0.6 (for Bomb Jack - adjust for others)

Other settings as you prefer.

IMPORTANT! gamename.ini in HLSL folder will not change if exists.

Also use max resolution supported by your display.

-------------------
-------------------

A big thanks to the MAME developers for the HLSL integration. Keep up the good work  :)

« Last Edit: January 24, 2014, 11:30:41 am by ZeroPoint »

opt2not

  • Trade Count: (+13)
  • Full Member
  • ***
  • Online Online
  • Posts: 4198
Re: HLSL for Vertical Games on Horizontal Monitor Instructions
« Reply #1 on: July 18, 2011, 07:09:40 pm »
I haven't tried this myself, but do you have a picture of this running on your cabinet?
I'd like to see how the pin-cushioning looks for vertical shmups.

ZeroPoint

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: HLSL for Vertical Games on Horizontal Monitor Instructions
« Reply #2 on: July 18, 2011, 08:30:38 pm »
Personally I think vertical SHMUPS looks AMAZING :o with these setting.

I made these changes to the HLSL post.fx because I wanted to fill more of the screen while keeping the aspect ratio and I just love the way games look on curved monitors. The perspective, scanlines and pincushion just brings more life to the games. Some 2D games even look like they are 3D games.

Just try it for yourself if you have and LCD monitor and a shader 3.0 compatible gfx-card.

Five minutes instructions:

1. Unpack MameUI 143.1 somewhere. Just for simplicity and testing.

2. Add some vertical roms in the ROMS folder.

3. Run MameUI.

4. Scan for roms.

5. Set your default game options, including highest resolution your monitor supports and mark "switch resolutions to fit".

6. Many options are broken in this version, so exit mame and edit the mame.ini in the INI folder.

7. Enable HLSL in mame.ini. Remember to set pincushion to 0.6 and I recommend scanlines set to 1.0. Other settings as you prefer.

8. Take a copy of the post.fx file if you want to restore it back to the original later.

9. Edit the post.fx file in the HLSL folder with notepad and replace the lines as instructed before.

10. Run MameUI and start with Bomb Jack.

11. Keep post.fx open in notepad at line 124 and change between + and - if the game is upside down. Remember Ctrl-S in notepad before running the game again. No need to quit Mame (just the game) in between.

12. In some games you would need to increase the pincushion amount in "tab" slider controls. These are separate gamename.ini files stored in the HLSL folder.

Some feedback would be welcome. Thanks.  :)

ZeroPoint

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: HLSL for Vertical Games on Horizontal Monitor Instructions
« Reply #3 on: July 19, 2011, 07:27:29 am »
Here are some screenshots. Enjoy  ;D

As you can see, there is a big difference how the vertical games fill the screen.

BombJack 1 and 2 shows the new effects while BombJack 3 and 4 is how it is originally displayed (pincushion 0.1).

Valtric and Argus are examples where you need to use the + sign in line 124 of post.fx.

« Last Edit: July 19, 2011, 07:39:09 am by ZeroPoint »

wweumina

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 221
Re: HLSL for Vertical Games on Horizontal Monitor Instructions
« Reply #4 on: July 19, 2011, 07:35:47 am »
Wow, that looks really cool.  I'll check it out next time I update/compile.

ZeroPoint

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: HLSL for Vertical Games on Horizontal Monitor Instructions
« Reply #5 on: July 19, 2011, 07:57:20 am »
Thanks, but there is no need to compile MAME for this. Just edit post.fx in notepad.

Just follow my first two posts in this topic.

What I do is that I use three different Mame folders.

1. Horizontal with the original post.fx

2. Vertical with modified post.fx and + sign in line 124.

3. Vertical with modified post.fx and - sign in line 124.




« Last Edit: July 19, 2011, 08:00:38 am by ZeroPoint »

wweumina

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 221
Yep, but I'm going to compile my own 143 to get access to the hlsl effects as I'm using 127 at the moment.  I might just try it out with the binary though to have a look.

ZeroPoint

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Attaching the modified post fx file for vertical games on horizontal lcd monitors.

Look at first post in this topic to see what is replaced if you want to have some fun playing around with the settings.

Just replace it with the one in the HLSL folder.

Remember to set pincushion between 0.6 and 0.75 and use the highest possible (native) resolution on your monitor.

You still need to change the + - sign in line 124 for different games.


ZeroPoint

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
New version that curves more at the bottom of the screen - giving a more even curve.

I think I still prefer the first version with nearly flat bottom - so just try both.

95 % of the vertical games work with this. Only a few needs adjustment of horizontal position and stretch (monitor pow).

Still need to change + - sign at line 124.

Hunk_4TH

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 306
  • I DON'T ALLOW VANDALISM IN MY STOOOOOOOOOOORE!
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #9 on: September 13, 2011, 05:42:23 pm »
Upon using the new post.fx Pacman is way too large :( Not sure about other vertical games. I do know that with hlsl enabled Galaga just shows a black screen. Any ideas what it could be?


ZeroPoint

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #10 on: September 13, 2011, 08:12:47 pm »
Upon using the new post.fx Pacman is way too large :( Not sure about other vertical games. I do know that with hlsl enabled Galaga just shows a black screen. Any ideas what it could be?

You need to go into "Tab - Slider Controls" and adjust the Image Pincushion to 0.7 for Pac-Man (or edit mame.ini for global settings)

or

you can use smaller amount of pincushion and adjust horizontal size and position with the same amount on vertical size to keep the correct aspect ratio (if you want the barrel effect to be smaller)

This mod of the post.fx alters the point of view (like on donkey kong machines).

Black screen on Galaga 143u5, but not on 143u3. (Mame is very buggy these days.)

Hunk_4TH

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 306
  • I DON'T ALLOW VANDALISM IN MY STOOOOOOOOOOORE!
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #11 on: September 14, 2011, 12:24:19 pm »
Upon using the new post.fx Pacman is way too large :( Not sure about other vertical games. I do know that with hlsl enabled Galaga just shows a black screen. Any ideas what it could be?

You need to go into "Tab - Slider Controls" and adjust the Image Pincushion to 0.7 for Pac-Man (or edit mame.ini for global settings)

or

you can use smaller amount of pincushion and adjust horizontal size and position with the same amount on vertical size to keep the correct aspect ratio (if you want the barrel effect to be smaller)

This mod of the post.fx alters the point of view (like on donkey kong machines).

Black screen on Galaga 143u5, but not on 143u3. (Mame is very buggy these days.)
Thanks! That seemed to fix it. Sucks about Galaga. Do you still recommend using a separate version of Mame for Vertical games?


ahofle

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4524
    • Arcade Ambience Project
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #12 on: September 14, 2011, 01:17:04 pm »
This is pretty neat, although the CRT curve seems a little excessive to me in those Bombjack screenshots.

mgb

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3466
  • North East, US
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #13 on: September 14, 2011, 03:13:24 pm »
That is a cool effect.

scofthe7seas

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 340
  • I'm Eskimo. There's nothing here.
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #14 on: September 14, 2011, 07:50:34 pm »
Black screen on Galaga 143u5, but not on 143u3. (Mame is very buggy these days.)

You're not having any problems with hlsl on u5? I first compiled u5 from 142 to get the latest and see what the hlsl was all about, and was getting horrendous crashes all the time. Couldn't load most games, some games would crash after being loaded the second time in a row. Crashes stopped reverting back to u4..
Also, have you noticed any games with part of the screen cut off? I've seen one or two where a good 2 inches are just missing from the right side.

ZeroPoint

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #15 on: September 15, 2011, 04:35:33 am »
Thanks! That seemed to fix it. Sucks about Galaga. Do you still recommend using a separate version of Mame for Vertical games?

I use separate Mame version for horizontal, vertical and vertical rotated 180. I just use the version that works for the games I intend to emulate and the effects I like to use.

This is pretty neat, although the CRT curve seems a little excessive to me in those Bombjack screenshots.

Compared to my curved cga monitors it looks almost the same when viewed from the side. But if you want less "barrel effect" then just use smaller amount of "Image Pincushion" and adjust the size and position instead. It may look a little strange projecting this on a lcd without the environment (bezel, stickers, artwork) compared to a real arcade machine. What you could do for your favorite games is to add ingame artwork for these. Just adjust the image first as you like it and take a screenshot. A little photoshop work can do magic by adding a bezel, artwork, instruction cards etc. Maybe finish this with an tranparent overlay with glass reflections ?

Maybe in the future Mame could have head tracking and a transparent overlay captured realtime from a webcam !?!?  ;D

That is a cool effect.

Yeah. I think so too. Just hope the Mame developers likes it too and adds "point of view" adjustments to future versions.

You're not having any problems with hlsl on u5? I first compiled u5 from 142 to get the latest and see what the hlsl was all about, and was getting horrendous crashes all the time. Couldn't load most games, some games would crash after being loaded the second time in a row. Crashes stopped reverting back to u4..
Also, have you noticed any games with part of the screen cut off? I've seen one or two where a good 2 inches are just missing from the right side.

Same with me. I use u3 as this got the scanline flicker back. Some games get cut off with me too. Going into "Tab - Slider Controls" resolves this issue temporarily.

ZeroPoint

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #16 on: November 23, 2011, 05:10:47 pm »
HLSL settings in mame.ini for BombJack and others, tested on 0.144:

(remember to download post.zip or post2.zip and replace it with the one in the hlsl folder - also read the other instructions above)

#
# DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable               1
hlslpath                  hlsl
hlsl_ini_read             0
hlsl_ini_write            0
hlslini                   %g
hlsl_prescale_x           0
hlsl_prescale_y           0
hlsl_preset               -1
hlsl_write                
hlsl_snap_width           2048
hlsl_snap_height          1536
shadow_mask_alpha         0.1
shadow_mask_texture       aperture.png
shadow_mask_x_count       320
shadow_mask_y_count       240
shadow_mask_usize         0.09375
shadow_mask_vsize         0.109375
curvature                 0.0
pincushion                0.6
scanline_alpha            1.0
scanline_size             1.0
scanline_height           0.8
scanline_bright_scale     1.5
scanline_bright_offset    1.0
scanline_jitter           0.1
defocus                   0.5,0.5
converge_x                0.0,0.0,0.0
converge_y                0.0,0.0,0.0
radial_converge_x         0.0,0.0,0.0
radial_converge_y         0.0,0.0,0.0
red_ratio                 1.0,0.0,0.0
grn_ratio                 0.0,1.0,0.0
blu_ratio                 0.0,0.0,1.0
saturation                1.0
offset                    0.0,0.0,0.0
scale                     1.0,1.0,1.0
power                     1.0,1.0,1.0
floor                     0.0,0.0,0.0
phosphor_life             0.4,0.4,0.4
yiq_enable                0
yiq_cc                    3.59754545
yiq_a                     0.5
yiq_b                     0.5
yiq_o                     0.0
yiq_p                     1.0
yiq_n                     1.0
yiq_y                     6.0
yiq_i                     1.2
yiq_q                     0.6
yiq_scan_time             52.6
yiq_phase_count           2


Note:

HLSL prescale x and y other than 0 seems to produce a blurry result with "Bitmap prescale" set to 1.

Scanlines size must be set to 1.0 for 1:1 scanlines.

Set "hlsl_ini_read" and "hlsl_ini_write" to 1 if you want to save individual hlsl settings for each game in the HLSL folder.

Other settings as you prefer, of course.

Again, use full native resolution for you LCD monitor.
« Last Edit: November 23, 2011, 06:32:04 pm by ZeroPoint »

Paul Olson

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1217
    • Paul's Arcade
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #17 on: November 25, 2011, 03:27:03 am »
Here is a snap of Donkey Kong. Sorry for the flash. I think this could come close to passing for a pic of a dedicated DK. I will try to take a pic of that out in the garage tomorrow when it warms up a bit to compare. I had to adjust the size with the sliders to fit inside the artwork, so the aspect is probably a little off. I just started looking through the HLSL code, so I haven't figured out how to make it fit to the screen when artwork is used.


Cory

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #18 on: November 25, 2011, 08:37:46 pm »
That looks pretty cool with the bezel added on, I'm definitely going to use that!

On a side note, is hlsl having issues for anyone else under 144?  If I have it turned on in the mame.ini I just get an error dump when trying to run a game...

Paul Olson

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1217
    • Paul's Arcade
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #19 on: November 25, 2011, 10:01:57 pm »
Someone else on here mentioned to download the direct x runtime. It worked for me.

LeedsFan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1022
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #20 on: November 27, 2011, 12:59:11 pm »
I've just been playing around with this HLSL feature for the first time using MameUI v.144.  I have to say I am VERY impressed with this!

Just messed around with Pacman on my desktop monitor at 1920x1080 resolution. At first I was having problems with the scanlines. I was getting large black lines down the screen instead of nice neat scanlines. My mistake was that I had scanlines effect selected in the Advanced tab of MameUI.... you need to leave this effect box alone so it reads "none". And then set scanlines at 1.0 on the slider bar in HLSL section of MameUI. With pincushion at 0.05 I think Pacman looks superb!

The only other issue I am having right now is that when I exit from a game MameUI just crashes and I have to restart it. I'm just testing right now but I would like to put this in my Donkey Kong bartop as the effect really does look nice. I don't need to have the image sloped back as the LCD monitor in there is already at 45 degrees. I just need the slight barrel look for authenticity.

nitz

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 507
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #21 on: November 27, 2011, 01:21:02 pm »
The only other issue I am having right now is that when I exit from a game MameUI just crashes and I have to restart it.

This is a bug in 0.144. Also, a few games are missing sound, notably Q*Bert. I think both these things have been fixed for 0.144u1.

I was all ready to upgrade to 0.144, but decided to check mametesters first and am glad I did. Think I'll just wait for 0.145 (can't be bothered keeping up with the u releases).

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1848
  • Make It So!
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #22 on: November 29, 2011, 08:33:21 am »
Outstanding work ZeroPoint, just set this up now with groovymame. Wonder if Calamity can add this to his buld some how so we can select the different post files depend on if were playing a ver o hor game.


Now need to find a way to get Mala Frontend to have 2 different version of mame loaded into one list  ???

EDIT: just tried Donpachi and the prospective effect isnt correct and the top of the screen is cut off!, how do i sort Donpachi out Zeropoint?

EDIT2: sorted now just read i need to change line 124 in the post.fx file!  ;D
« Last Edit: November 29, 2011, 08:49:42 am by lettuce »

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1848
  • Make It So!
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #23 on: November 29, 2011, 08:55:15 am »
How come the pincushion setting isnt being saved for each game, it keeps reverting back to 0.60?? The horizontal position is being saved but the pincushion value always resets back to 0.60 everytime i load the game

« Last Edit: November 29, 2011, 09:14:23 am by lettuce »

jekbrown

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #24 on: November 29, 2011, 03:01:04 pm »
dumb question: how much does hlsl effect rom-running performance?  If you had a PC that was borderline or barely able to run a game at 100%, could adding a bunch of effects via hlsl potentially drop you below 100%?

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1848
  • Make It So!
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #25 on: November 29, 2011, 04:37:34 pm »
yeah, HLSL would require a bit more horsepower if your just barely running mame now without any effects added

eadmaster

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • I want to build my own arcade controls!
    • eadmaster Dot TK
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #26 on: September 15, 2012, 01:54:47 pm »
did anybody managed to make a lists of all vertical "negative" and "positive" games?
Having them ready i could write an cmdline launcher that automatically choose the right shader according to the game loaded.

Also note that you don't need to have 3 different mame copies,
but only 3 copies of the "hlsl" directory.
Then you just launch MAME from the cmdline with a different "-hlslpath" option.

P.S.:
This is a very interesting thread, i hope there's no problem re-upping it.  :notworthy:
« Last Edit: September 15, 2012, 01:56:50 pm by eadmaster »

Gray_Area

  • -Banned-
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3363
  • -Banned-
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #27 on: September 15, 2012, 03:39:19 pm »
did anybody managed to make a lists of all vertical "negative" and "positive" games?
Having them ready i could write an cmdline launcher that automatically choose the right shader according to the game loaded.

Also note that you don't need to have 3 different mame copies,
but only 3 copies of the "hlsl" directory.
Then you just launch MAME from the cmdline with a different "-hlslpath" option.


As all the parametres are typically game-specific, I'm guessing that was an early bug.

OR the person was selecting the values in-game. This has gone back and forth between some being saved, some not, but I think now none of them are. They have to be changed in the ini, or via a capable front end.
« Last Edit: September 15, 2012, 03:41:05 pm by Gray_Area »
-Banned-

eadmaster

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • I want to build my own arcade controls!
    • eadmaster Dot TK
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #28 on: September 17, 2012, 10:04:38 am »
@Gray_Area: i guess you quoted the wrong post..

What is the difference between vertical positive and negative games btw?
If it is a fixed propriety (e.g. the aspect ratio) one could easly write a filter for games...

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1848
  • Make It So!
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #29 on: December 31, 2013, 04:50:39 pm »
Any ideas if this still can be applied to the latest post.fx file, as alot seems to have changed in these files now??

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1848
  • Make It So!
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #30 on: January 04, 2014, 08:20:18 am »
Anyone?

ZeroPoint

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #31 on: January 05, 2014, 04:50:00 pm »
Hi, Lettuce...

I have a new and improved fx-file for 152b. Will try to post it tomorrow.

Can you tell me what type of monitor you intend to use it on ? Aspect ratio 5:4 - 16:9 - 16:10 etc. and resolution !?

This way I can try it out on the same type of monitor before posting it.

Also, does anyone know if it is still possible to save the hlsl-settings on the new mame version ? Currently I have to use separate ini-files for each game and manually enter the numbers.  :dizzy:

GeoMan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 160
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #32 on: January 05, 2014, 07:27:08 pm »
This is pretty neat, although the CRT curve seems a little excessive to me in those Bombjack screenshots.

I agree. Used to play a lot of the original arcades when i was young. None of them had such an extreme CRT curve.

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1848
  • Make It So!
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #33 on: January 05, 2014, 07:42:10 pm »
Hi, Lettuce...

I have a new and improved fx-file for 152b. Will try to post it tomorrow.

Can you tell me what type of monitor you intend to use it on ? Aspect ratio 5:4 - 16:9 - 16:10 etc. and resolution !?

This way I can try it out on the same type of monitor before posting it.

Also, does anyone know if it is still possible to save the hlsl-settings on the new mame version ? Currently I have to use separate ini-files for each game and manually enter the numbers.  :dizzy:

Thanks ZeroPoint, i have 2 systems i use mame on, one has a res of 2560x1440 and the other 1920x1080 so both 16:9 aspect. Yeah hlsl setting save just find for me.

This is the hlsl settings i use and think it looks really good, i also use a different shadow mask texture from the default one mame use, the one i use is called CRT_Shadow_mask.png you can find details of it below my hlsl settings, i also use an edited post.fx file tht gives curved corners and a CRT look, maybe you can add that to your post.fx file.....or though i dont know what the results would look like. Here how my looks anyway....



Code: [Select]
prescale                  1
waitvsync                1

## DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable               1
hlslpath                  HLSL
hlsl_ini_read             0
hlsl_ini_write            0
hlslini                   %g
hlsl_prescale_x           0
hlsl_prescale_y           0
hlsl_preset               -1
hlsl_write               
hlsl_snap_width           1920
hlsl_snap_height          1080
shadow_mask_alpha         0.075
shadow_mask_texture       crt_shadow_mask.png
shadow_mask_x_count       -3
shadow_mask_y_count       -2
shadow_mask_usize         0.09375
shadow_mask_vsize         0.109375
curvature                 0.0
pincushion                0.3
scanline_alpha            1.2
scanline_size             1.0
scanline_height           1.0
scanline_bright_scale     1.0
scanline_bright_offset    0.0
scanline_jitter           0.0
defocus                   0.3,0.3
converge_x                0.2,0.0,0.0
converge_y                0.0,0.0,0.0
radial_converge_x         0.2,0.0,0.0
radial_converge_y         0.0,0.0,0.0
red_ratio                 0.85,0.15,0.0
grn_ratio                 -0.05,1.05,0.0
blu_ratio                 -0.025,-0.025,1.05
saturation                1.4
offset                    -0.15,-0.16,-0.16
scale                     1.15,1.16,1.16
power                     1.1,0.95,0.8
floor                     0.01,0.01,0.01
phosphor_life             0.0,0.0,0.0

#
# NTSC POST-PROCESSING OPTIONS
#
yiq_enable                0
yiq_cc                    3.59754545
yiq_a                     0.5
yiq_b                     0.5
yiq_o                     1.570796325
yiq_p                     1.0
yiq_n                     1.0
yiq_y                     6.0
yiq_i                     1.2
yiq_q                     0.6
yiq_scan_time             52.6
yiq_phase_count           2

#
# VECTOR POST-PROCESSING OPTIONS
#
vector_length_scale       0.9
vector_length_ratio       500.0

#
# BLOOM POST-PROCESSING OPTIONS
#
vector_bloom_scale        0.32
raster_bloom_scale        0.17
bloom_lvl0_weight         1.0
bloom_lvl1_weight         0.21
bloom_lvl2_weight         0.19
bloom_lvl3_weight         0.17
bloom_lvl4_weight         0.15
bloom_lvl5_weight         0.14
bloom_lvl6_weight         0.13
bloom_lvl7_weight         0.12
bloom_lvl8_weight         0.11
bloom_lvl9_weight         0.10
bloom_lvl10_weight        0.09

The edited post.fx file & CRT_Shadow_mask.png can be found here....

https://dl.dropbox.com/u/5414984/mslug-mame-filter/post.fx
(Might want to take out the '// -- Light Reflection --' section as im not a fan of the light reflection effect thats added)

Please note in order to get the above to work 'pincushion' need to be set to 0.2 or 0.3 and 'curvature' need to be set to 0.15.

Full thread on this over at AEP forums....

http://www.aep-emu.de/index.php?name=PNphpBB2&file=viewtopic&t=18991&postdays=0&postorder=asc
« Last Edit: January 05, 2014, 07:43:46 pm by lettuce »

Xiaou2

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3957
  • NOM NOM NOM
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #34 on: January 05, 2014, 09:17:03 pm »
Ref. Pic...


lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1848
  • Make It So!
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #35 on: January 08, 2014, 01:00:48 pm »
Any update on this ZeroPoint?

ZeroPoint

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #36 on: January 08, 2014, 09:08:28 pm »
Hi, Lettuce...

Sorry for the late reply. Have been a little busy.  ;D

Here you have the new mod. Itīs not cleaned up (early version), but it should work just fine. Read the included ReadMe.

And thanks for the link. :notworthy: That looks great. Actually, I used this as a base, including both the vignette and round corners.

The main difference from before is that pincushion and tilt are separated and you can tilt both ways.

Note that I moved the vignette-amount to another slider.

Consider removing the shadow mask or increase the hlsl prescale values if your gpu is strong enough.

The shadow mask is set too strong now. This is to show any possible moire-patterns. Reduce or remove...

It would be nice with some feedback or screenshots when you have tried this for a while.

Thanks to Jezze at aep-emu.de for the Vignette and Round Corners effects.  :applaud:

lamprey

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 636
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #37 on: January 23, 2014, 09:54:18 pm »
Zeropoint,

Thanks for posting this. I was just poking around to see if anyone had updated the FX files to work with 0152! :) Smooth!

I just started messing with config/FX files and I can get it to work on all my computers. However, I'm having an issue on the computer I'm going be using for my cabinet. Since you are more familiar with the changes to the FX filies, I was wondering if you might have any ideas.

1. I am running in Portrait (flipped) mode and was able to figure out I needed to change the hlsl_snap_width/height and the Resolution to my screens' resolution. However, I'm running at 2160x3840 and I get an "Illegal Resolution Value" error at that resolution when trying to launch MAME. I should note that if I set the resolution to something less, like 1080x1920, then it works. Is there some calculation going on in the FX files that might cause this?

2. If I use the in game bezel artwork depending on the Aspect setting either the game "screen" to stretched too thin and the bezel is correct. Or, the game "screen" is correct and the bezel is too wide. I can "over come" this by adjusting the Vertical Stretch. But, I think it messes up the pixel ratio.. But, this doesn't matter much unless I can get #1 solved.. :)

Any advice or tips appreciated.
« Last Edit: January 23, 2014, 10:11:50 pm by lamprey »

lettuce

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1848
  • Make It So!
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #38 on: January 24, 2014, 09:48:29 am »
This new version doesnt seem to fill the screen out (width wise) as much as your first version, alo i miss the barrel effect :(. Other than these 2 things its great

ZeroPoint

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 131
Re: HLSL for Vertical Games on Horizontal Monitor Instructions - Screenshots
« Reply #39 on: January 24, 2014, 11:24:29 am »
@ lamprey

1. I donīt think snap width/height is important here. Maybe your GPU canīt handle the hlsl_prescale_x and y values at this :o resolution. They are set to 3 as default. Try to reduce them to 1 or 0 (auto) in vertical.ini and/or gamename.ini. And what about vertical refresh ???

I found this:

-       if (sscanf(data, "%dx%dx%d@%d", &config->width, &config->height, &config->depth, &config->refresh) < 2 && report_error)
+       if (sscanf(data, "%dx%dx%d@%lf", &config->width, &config->height, &config->depth, &config->refresh) < 2 && report_error)
                mame_printf_error("Illegal resolution value for %s = %s\n", name, data);


2. With In-game Artwork the aspect ratio is important. You should change this in gamename.ini for that particular game and also edit the lay-file to change the "screen" position and size. What I do: Open the artwork in photoshop and change it to 1920 x 1080 or 3840 x 2160 in your case and just make it look good. Then I make a new lay-file with "bezel" at x=0, y=0, width=1920, height=1080 and "screen"-values as where I would like the screen to be in the artwork, usually with x,y, width and height values read out from photoshop. Then I set aspect ratio to 16:9 or auto. If I want to finetune the size and position of the "screen" I do this in slider controls. This affects only the "screen" part in the artwork.

@ lettuce

Did you read the readme file ?  The width is set with a combination of aspect ratio and slider controls. If you are missing the "barrel" effect you now adjust this with pincushion only. The difference is that this value is multiplied with 0.25 in the fx-file so you need a much higher value now than before.

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31