English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 07 February 2009, 00:57   #1
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
Some screen corruption with JIT enabled

I have a small test-program which occasionally displays some bitplane corruption when the JIT is active in 1.5.3 and the latest beta.

I've inspected the bitplane data and it's valid, the corruption is only visible in the bitmap output. What happens is that there is a blank bitmap line inserted somewhere among the upper 10 lines, and the rest of the bitplane data is offset one line down.

Configuration and exe here:
http://zb.stolendata.net/test.zip
Attached Thumbnails
Click image for larger version

Name:	test.png
Views:	217
Size:	605 Bytes
ID:	20203  
Leffmann is offline  
Old 07 February 2009, 01:40   #2
killergorilla
Lesser Talent
killergorilla's Avatar
 
Join Date: Jan 2003
Location: UK
Age: 39
Posts: 7,957
JIT has and never will be 100% guaranteed, Toni has always said that.

If it works without JIT I'd consider it fine!
killergorilla is offline  
Old 07 February 2009, 10:16   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,791
I can't duplicate.
Toni Wilen is offline  
Old 07 February 2009, 10:30   #4
Ironclaw
Banned
Ironclaw's Avatar
 
Join Date: Oct 2004
Location: ...
Age: 43
Posts: 3,313
I never us JIT, no one should. It should ONLY be used if you REALLY need the speed (which should be never, I didn't even use it in 3D games like Genetic Speciec I think, still got full speed).
Ironclaw is offline  
Old 07 February 2009, 10:47   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,791
How useless reply. (Offtopic warning!)
Toni Wilen is offline  
Old 07 February 2009, 11:40   #6
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
Quote:
Originally Posted by Toni Wilen View Post
I can't duplicate.
It only appears rarely, maybe 1 in 20 runs. Sorry can't give any more details other than the config file and that exe. The error doesn't persist with state files.

I agree that the JIT shouldn't be used for anything than speeding some processes up. The Workbench is probably the only thing I actually use it for as it makes things very zippy. I wouldn't use it for games or any detailed tests, though I would never expect it to affect the video display emulation.

BTW I noticed another thing while doing some tests. When I switch from fullscreen to fullscreen+v-sync in the display settings, the emulation slows down greatly. It's as if the CPU emulation normally runs in turbo speed during the vertical blanking, and the effect is canceled when you use v-sync. Is this expected behavior?

Last edited by Leffmann; 07 February 2009 at 11:45.
Leffmann is offline  
Old 07 February 2009, 14:16   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,791
Quote:
Originally Posted by Leffmann View Post
It only appears rarely, maybe 1 in 20 runs. Sorry can't give any more details other than the config file and that exe. The error doesn't persist with state files.
Ah, I have seen similar single black line randomly. Unfortunately it does happen really rarely.

Quote:
BTW I noticed another thing while doing some tests. When I switch from fullscreen to fullscreen+v-sync in the display settings, the emulation slows down greatly. It's as if the CPU emulation normally runs in turbo speed during the vertical blanking, and the effect is canceled when you use v-sync. Is this expected behavior?
Not expected behavior, currently vsync works as expected only in a500 modes.
Toni Wilen is offline  
Old 07 February 2009, 14:34   #8
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
I found another thing :P

Between vpos $138 and $0 the CPU seems to break the chipset timing. In this interval of 1 or 2 rasterlines I have enough time to do more than 300 000 longword moves from chipmem to chipmem.

I understand this is because this interval will be longer than the real ~64us due to the speed of the emulation, but isn't it possible to limit the RAM access speed here? It would make for more realistic emulation of non-A500 systems.
Leffmann is offline  
Old 07 February 2009, 14:41   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,791
JIT = fastest possible, accuracy isn't important. JIT runs in bursts, it can't be told to stop after n cycles, it will run complete translated block until it returns.

JIT directly access all memory, emulation can't detect if it is chip ram or fast or whatever ram access, it completely skips all normal memory accesses for best performance.

Do not use JIT if you want timing accuracy or care about accuracy.
Toni Wilen is offline  
Old 07 February 2009, 14:54   #10
Ironclaw
Banned
Ironclaw's Avatar
 
Join Date: Oct 2004
Location: ...
Age: 43
Posts: 3,313
Quote:
Originally Posted by Toni Wilen View Post
Do not use JIT if you want timing accuracy or care about accuracy.
Exactly.... don't ever use JIT unless you really need to .

When using it I can get crashes, dodgy graphics, failure to load games, sound delay in recordings, sound errors etc etc etc.

But it's darn good to have JIT as an option for when you need to run programs and stuff fast, to try things out....
Ironclaw is offline  
Old 07 February 2009, 14:56   #11
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
The last example is without using JIT. A plain unexpanded A1200 configuration.
Leffmann is offline  
Old 07 February 2009, 15:55   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,791
Quote:
Originally Posted by Leffmann View Post
The last example is without using JIT. A plain unexpanded A1200 configuration.
Title says "JIT" so..
Toni Wilen is offline  
Old 07 February 2009, 18:03   #13
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
Quote:
Originally Posted by Toni Wilen View Post
Title says "JIT" so..
You mean I should write a new thread? I thought I could just squeeze that in as well, you see I'm not as orderly as you are

Give us the verdict on the turbo charged CPU and chipmem!
Leffmann is offline  
Old 07 February 2009, 19:07   #14
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,791
Quote:
Originally Posted by Leffmann View Post
You mean I should write a new thread? I thought I could just squeeze that in as well, you see I'm not as orderly as you are
Just mentioning non-JIT mode. Title has highest priority = all posts mean JIT until someone mentions non-JIT. Simple!

Quote:
Give us the verdict on the turbo charged CPU and chipmem!
Long burst between frames is weird behaviour (not sure how or why, not my code..) but the main problem is CPU caches (again). I can't make chipram as slow as real Amiga (in 68020+ modes) because it would make average speed too slow, especially if code is in chipram and cpu caches are enabled (usually always)
Toni Wilen is offline  
Old 07 February 2009, 21:31   #15
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
Alright I understand it's not easily solved when it depends on the caches. At least this can be fixed programmatically, with a copper interrupt on one of the last lines holding until line 0 things should be fine.

Thanks!
Leffmann 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
Blizzard MK-IV: MapRom enabled = purple screen after reboot Scyphe support.Hardware 5 13 August 2013 04:33
Shapeshifter and Fusion crash without JIT enabled clauddio support.WinUAE 3 12 March 2012 11:44
Problem with games when JIT enabled Skirner support.WinUAE 19 08 January 2010 17:22
Framerate limit not working when JIT enabled rsn8887 support.WinUAE 0 18 October 2008 05:09
1.5.1 screen corruption with CWBP96 DDNI support.WinUAE 12 22 August 2008 21:22

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:34.


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