English Amiga Board Amiga Lore



Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 07 March 2012, 22:11   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 1,181
Automatic scaling issues

I tested WinUAE 2.4.0b20 in Windows XP SP3 (VirtualBox VM) and noticed some issues with automatic scaling. This doesn't seem specific to the beta as 2.3.3 showed pretty much the same issues.

1680x1050 Windows desktop. Aspect Ratio Correction disabled.

Emulated Amiga NTSC with ECS Agnus running OS 3.1, PAL high-res laced Workbench screen, 640x560 pixels (I increased vertical text overscan). Using a checkerboard WB background pattern which shows up any scaling artifacts clearly.

The first two issues below I saw in Windows XP in VirtualBox, but not when running under Wine. Could this be due to a bug in the VirtualBox graphics driver? Can anyone reproduce on native Windows?

1. With Null filter, No scaling, the Amiga display is shrunk vertically by 31 or 32 rows. Rows of pixels are missing regularly all the way down the screen. Changing the filter to none, the Workbench is shown 1:1 without missing pixels.

2. With Null filter again and enabling Integer scaling, the display is clearly being scaled by a non-integer amount.

The next issues happen for me in both XP/VirtualBox and Wine.

3. Enable Automatic scaling in Filter Settings. The Workbench display "jitters". The effect is hard to describe, but it's as if parts are jumping up and down. If I run a program which opens a non-laced screen the problem stops, until I drag the new screen down revealing the Workbench behind, then the whole screen starts jittering again. The problem only seems to happen when the display is interlaced. (Dragging a non-laced screen down to reveal another non-laced screen there is no jittering.)

If I change PAL overscan back to the default (so 640x512 WB), the screen does not jitter.

4. This applies to both the 640x560 and normal 640x512 screen: With the WB screen the only one open, dragging it down causes it to expand vertically, with the top of the screen remaining at the top of the emulation window, until the display is fully-expanded, after which it does move down as you continue dragging.

5. If instead of Automatic scaling I select Automatic resize in Filter Settings, when the screen would be jittering there's just a black screen and shortly after that WinUAE crashes. Dump file for that attached if it's any help.
Attached Files
File Type: dmp winuae_240bBeta 20_20120307_202756.dmp (42.1 KB, 44 views)
mark_k is offline  
AdSense AdSense  
Advertisement:
Old 08 March 2012, 10:38   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 39
Posts: 13,855
1-2: logs needed. D3D and DirectDraw? Usually it is VM problem, they really seem to hate dynamic surfaces/textures (whole big surface is updated 50fps using the CPU).

3: probably a bug.

4: it is normal, autoscale only calculates (and sometimes guesses) where display starts and ends using custom chipset register values. It does not know (and can't know) nothing about dragging, scrolling etc..
Toni Wilen is offline  
Old 08 March 2012, 10:59   #3
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: #
Posts: 13,356
I have been trying to get a nice picturr with the filters too. I tried for a scale that would exactly double the resolution, but you can easily see in wb patterns that the pixels are deformed. I perhaps am not making it right, first time i mess with the shaders, but i's like to get an image that maintains pixel proportion but is as big as my display allows.
Akira is offline  
Old 08 March 2012, 11:20   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 39
Posts: 13,855
Quote:
Originally Posted by Akira View Post
I have been trying to get a nice picturr with the filters too. I tried for a scale that would exactly double the resolution, but you can easily see in wb patterns that the pixels are deformed. I perhaps am not making it right, first time i mess with the shaders, but i's like to get an image that maintains pixel proportion but is as big as my display allows.
DirectDraw or D3D? Note that DD always seems to enable some filtering. D3D only if bilinear option is set.

Integer scaling option or 1x/2x.. select boxes should always enable pixel perfect mapping without blurring (unless DirectDraw..)

(Not really on-topic..)
Toni Wilen is offline  
Old 08 March 2012, 15:55   #5
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 1,181
Quote:
Originally Posted by Toni Wilen View Post
1-2: logs needed. D3D and DirectDraw? Usually it is VM problem, they really seem to hate dynamic surfaces/textures (whole big surface is updated 50fps using the CPU).
Logs attached. The missing lines/slightly squashed effect happens in both Direct3D and DirectDraw modes. (DirectDraw performance in VirtualBox is really bad, I get about 20fps vs 50 when using Direct3D mode, both with null filter. Performance is best in VirtualBox using DirectDraw with no filter.)

Strangely, when testing again I couldn't reproduce the "integer scaling not scaling by integer amount" issue in VirtualBox.
Attached Files
File Type: zip logs.zip (7.9 KB, 28 views)
mark_k is offline  
Old 08 March 2012, 16:28   #6
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: #
Posts: 13,356
Quote:
Originally Posted by Toni Wilen View Post
(Not really on-topic..)
Sorry about going off topic, I'll make my own thread. I have no problem with blurring, rather with pixels being not square
Akira is offline  
Old 09 March 2012, 15:43   #7
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 1,181
An update on one of the points I mentioned before...
Quote:
Originally Posted by mark_k View Post
The first two issues below I saw in Windows XP in VirtualBox, but not when running under Wine. Could this be due to a bug in the VirtualBox graphics driver? Can anyone reproduce on native Windows?

1. With Null filter, No scaling, the Amiga display is shrunk vertically by 31 or 32 rows. Rows of pixels are missing regularly all the way down the screen. Changing the filter to none, the Workbench is shown 1:1 without missing pixels.
Testing WinUAE today under Wine, I'm seeing that missing-lines issue with filter none or Null, No scaling, graphics API Direct3D. (There are no missing lines with DirectDraw.)

When I set scaling to Integer scaling (still with Direct3D gfx API), there are no missing lines.
mark_k is offline  
Old 10 March 2012, 21:42   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 39
Posts: 13,855
Quote:
Originally Posted by mark_k View Post
3. Enable Automatic scaling in Filter Settings. The Workbench display "jitters". The effect is hard to describe, but it's as if parts are jumping up and down. If I run a program which opens a non-laced screen the problem stops, until I drag the new screen down revealing the Workbench behind, then the whole screen starts jittering again. The problem only seems to happen when the display is interlaced. (Dragging a non-laced screen down to reveal another non-laced screen there is no jittering.)

If I change PAL overscan back to the default (so 640x512 WB), the screen does not jitter.
I can't duplicate this just by using 640x560 overscan. What are exact overscan values that causes the autoscale "jitter"?
Toni Wilen is offline  
Old 11 March 2012, 10:39   #9
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 1,181
Attached is an archive of prefs settings for overscan, screenmode and wbpattern. (Note: due to the EAB forum only accepting certain file extensions, I added a .zip suffix to the filename. You'll need to remove that before unpacking the gzipped tar archive.)

Take a Workbench 3.1 disk. Copy the prefs files from the attached archive into Prefs/Env-Archive/Sys, then boot from the disk. Hopefully that should be sufficient to show the problem. I see the jittering when Workbench loads. If it's relevant the emulation settings I used were PAL, ECS Agnus, immediate blitter, A2000 chipset extra.
Attached Files
File Type: zip jitterbug.tar.gz.zip (510 Bytes, 27 views)
mark_k is offline  
Old 11 March 2012, 12:42   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 39
Posts: 13,855
Screen is still stable.
Toni Wilen is offline  
Old 11 March 2012, 14:13   #11
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 1,181
I've confirmed the jittering effect on native Windows Vista too. It happens with both WinUAE 2.3.3 and 2.4.0b21. Can you see the problem using the attached settings file?

Since it's not allowed to attach a modified Workbench disk here, I've created a patch file so you can recreate the disk image I'm using for testing. Starting with a Workbench 3.1 ADF file (MD5: 1fb61921fcaebe926d78257ff658431b), you can use GPatch to create the modified WB3.1 disk.

Get GPatch from Aminet: http://aminet.net/util/misc/gpatch.lha (Amiga binaries), http://aminet.net/misc/emu/gpatchix.tgz (Unix/Linux binaries), or http://aminet.net/misc/emu/gpatchwin.zip (Windows binaries).
Attached Files
File Type: zip JitterTest.uae.zip (2.3 KB, 27 views)
File Type: zip WB31_jitter_test.gpch.zip (699 Bytes, 31 views)
mark_k is offline  
Old 11 March 2012, 16:56   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 39
Posts: 13,855
Thanks.

I thought interlace always started from even line but it wasn't true (for some reason I couldn't duplicate this by testing different overscan settings).

Now autoscale only checks long fields if interlace is active.
Toni Wilen is offline  
Old 26 March 2012, 20:35   #13
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 1,181
Quote:
Originally Posted by mark_k View Post
1. With Null filter, No scaling, the Amiga display is shrunk vertically by 31 or 32 rows. Rows of pixels are missing regularly all the way down the screen. Changing the filter to none, the Workbench is shown 1:1 without missing pixels.
A small update on that issue. I can see the problem running under Wine too, not only in a Windows XP VM.

With the emulated Amiga set to NTSC, ECS Agnus, using a 640x560 PAL overscan Workbench I see the missing rows of pixels.

However, with the same config except the emulated Amiga set to PAL, with the same 640x560 PAL Workbench there are no missing rows.

The attached logs and config file (created running under Wine) probably won't help with figuring out this issue. But they were created by running WinUAE, loading a config file then starting emulation (NTSC Amiga). After workbench loads showing missing rows of pixels, bring up GUI, set Amiga to PAL and reset. Boot to Workbench with no missing lines.
Attached Files
File Type: zip logs_2012-03-26.zip (12.6 KB, 29 views)
mark_k is offline  
Old 27 March 2012, 13:43   #14
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 1,181
I've been able to reproduce the missing lines issue in native Windows Vista too.

Attached are config files which should be identical apart from the PAL/NTSC setting. The NTSC config shows missing lines, the other one doesn't. To show the problem: load the NTSC config file. Boot a WB 3.1 floppy. Run the PAL monitor driver from the 3.1 Storage disk, then run screenmode prefs and set Workbench to PAL interlaced. You can use WBPattern prefs to set a checkerboard WB backdrop pattern so the missing lines are easily visible.

There are also missing lines when you set Workbench to PAL non-interlaced, but (at least with a checkerboard WB pattern) they are more visible with an interlaced WB.

Toni: I can send a bootable floppy image which will hopefully allow you to reproduce the problem if that would be easier. You could also use the "jitter test" ADF if you copy the PAL monitor driver to DEVS:Monitors.

Edit: I've attached a WBPattern.prefs file which shows the missing rows more clearly (alternate horizontal lines are white then black in the pattern).

Edit 2: So the issue seems to be this: With an NTSC emulated Amiga showing a PAL display [so ECS Agnus, full ECS, or AGA needed], when using Null filter + No scaling the output image is shrunk in height by 32 pixels.
Attached Thumbnails
Click image for larger version

Name:	PAL_laced_missing_lines.png
Views:	52
Size:	25.8 KB
ID:	31074   Click image for larger version

Name:	PAL_non-laced_missing_lines.png
Views:	50
Size:	23.6 KB
ID:	31075   Click image for larger version

Name:	PAL_laced_missing_lines2.png
Views:	52
Size:	23.3 KB
ID:	31091   Click image for larger version

Name:	PAL_non-laced_missing_lines2.png
Views:	56
Size:	21.9 KB
ID:	31092  
Attached Files
File Type: zip MissingLines.zip (4.7 KB, 24 views)
File Type: zip WBPattern.prefs.zip (245 Bytes, 19 views)

Last edited by mark_k; 27 March 2012 at 21:44.
mark_k is offline  
Old 28 March 2012, 13:33   #15
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 1,181
Here are another couple of screenshots taken in Windows Vista.

In both cases the emulated Amiga is showing a 640x560 PAL Workbench. The one with missing lines (and shifted-up display position with black space at the bottom) is an NTSC machine, the correct-looking one is a PAL machine.

The same missing lines issue is present with both Direct3D and DirectDraw graphics API modes.
Attached Thumbnails
Click image for larger version

Name:	MissingLinesNTSC_PALoverscan.png
Views:	52
Size:	24.5 KB
ID:	31099   Click image for larger version

Name:	NoMissingLinesPAL_PALoverscan.png
Views:	51
Size:	25.5 KB
ID:	31100  
mark_k is offline  
Old 29 March 2012, 16:58   #16
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 39
Posts: 13,855
Quote:
Originally Posted by mark_k View Post
Edit 2: So the issue seems to be this: With an NTSC emulated Amiga showing a PAL display [so ECS Agnus, full ECS, or AGA needed], when using Null filter + No scaling the output image is shrunk in height by 32 pixels.
This is by design so that PAL/NTSC switch, when (for example) showing early boot menu, appears to work like on real Amigas.

Technically it is correct but as you have noticed, it may not look too good
Toni Wilen is offline  
AdSense AdSense  
Advertisement:
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pre-Scaling before Bilinear Scaling? rsn8887 request.UAE Wishlist 4 11 January 2014 07:07
Off-by-one problem with 2x scaling mark_k support.WinUAE 0 05 February 2013 22:41
automatic scaling font distortion Falcon Flight support.WinUAE 4 05 February 2010 18:25
Automatic scaling testing (from beta thread) TCD support.WinUAE 59 24 April 2009 19:40
REQ: Automatic resolution change ; automatic resolution detection Borg_Number_One request.UAE Wishlist 3 21 August 2004 14:16

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 00:53.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Page generated in 0.20101 seconds with 14 queries