English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 31 January 2017, 01:27   #1
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
Less than 2 MB ChipMem is shifted up by 16 kB problem?

Hi Toni,

I found a problem when the ChipMem setting in WinUAE is less than 2 MB. In ShowConfig the memory chunk always appears to be shifted up by 16 kB. If the ChipMem size is 2 MB then the upper boundary is correctly set to the limit of 2 MB, too. But if the ChipMem size is less than 2 MB then the upper boundary is also pushed up by 16 kB.

Now the problem: as soon as all the memory below 1.5 MB, 1 MB, 512 kB or 256 kB is allocated and you are trying to allocate more ChipMem a lot of Enforcer hits are coming up telling me that invalid reads or writes are occuring and the system freezes or crashes sooner or later. If you use MEMF_REVERSE for ChipMem WinUAE crashes right from the start.

It seems to me that these upper 16 kB of ChipMem don't exist or are not really accessible. Could you please check that. Thank you.

If the ChipMem size is set to 2 MB everything works just fine and there are no problems with lowmem handling at all.
Attached Thumbnails
Click image for larger version

Name:	1MB_ChipMem.png
Views:	155
Size:	3.2 KB
ID:	51868   Click image for larger version

Name:	2MB_ChipMem.png
Views:	167
Size:	3.1 KB
ID:	51869  

Last edited by PeterK; 31 January 2017 at 01:35.
PeterK is offline  
Old 31 January 2017, 04:58   #2
ReadOnlyCat
Code Kitten
 
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 52
Posts: 1,178
Before Toni gets to read your message.

These information are missing from your post :
- version of WinUAE used
- emulation config

Without these, there is no guarantee of reproducing the issue.
A bug can only be fixed if it can be reproduced.

(Well, in this particular case, this is specific enough to point at a very particular piece of code but even then, there might be subtleties which make the piece of code responsible for this issue hard to find, so clear repro config is essential.)
ReadOnlyCat is offline  
Old 31 January 2017, 08:38   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
Sounds like direct JIT being annoying. Try without it.
Toni Wilen is offline  
Old 31 January 2017, 10:27   #4
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
You're right, Toni !

Indirect Jit fixes it, but please let it work with direct Jit, too.
It does not depend on the WinUAE version. I'm using 3.3.0 64 bit.

Last edited by PeterK; 08 February 2017 at 14:54.
PeterK is offline  
Old 31 January 2017, 11:26   #5
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Slightly off topic and I'm sure this has been answered somewhere previously... I don't really use JIT but what's the difference between "direct" and "indirect"?
DamienD is offline  
Old 03 February 2017, 23:11   #6
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
@Toni
I don't have a working Amiga anymore, but I asked the users at A1k.org how the ChipMem chunks are configured on their Amigas.

On an A2000 the 1 MB ChipMem uses the range $4000-$FFFFF, so the upper 16 kB don't exist like under WinUAE. Maybe, it's the most compatible solution to just cut off these upper 16 kB from the ChipMem chunks instead of getting a headache from searching for a direct Jit solution.
PeterK is offline  
Old 06 February 2017, 18:13   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
This is now worked around but there is no guarantee it does not cause side-effects (like crash if program does something stupid like execution "falling off" the end of chip ram in direct jit mode)

Note that 1.5M can never work with direct JIT. JIT does not like non-power of 2 memory sizes.

Direct JIT = when translating m68k code to x86 code, direct jit compatible memory "bank" accesses are translated to x86 code (single instruction) instead of calling UAE memory bank access functions (lots of instructions). Increases speed greatly but can cause problems if programs do stupid things.
Toni Wilen is offline  
Old 06 February 2017, 21:07   #8
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
Thank you, Toni !

But where do you release the new beta versions now? I can't see any 3.5.0bxxx yet.
PeterK is offline  
Old 06 February 2017, 21:10   #9
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Quote:
Originally Posted by PeterK View Post
But where do you release the new beta versions now? I can't see any 3.5.0bxxx yet.
http://www.winuae.net/files/b/winuae.7z
DamienD is offline  
Old 06 February 2017, 21:29   #10
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
Thanks DamienD !

It seems to work now during the very first lowmem tests.
PeterK is offline  
Old 04 June 2017, 04:28   #11
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
Quote:
Originally Posted by PeterK View Post
Thank you, Toni !

But where do you release the new beta versions now? I can't see any 3.5.0bxxx yet.
Well, now I found it:
http://eab.abime.net/showthread.php?t=85939

PeterK 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
all gfx shifted to the right hitchhikr support.WinUAE 4 06 October 2011 19:57
Problem with very low Chipmem... (Startup-Sequence?!) Ebster support.Apps 15 25 February 2010 21:41
Wasted Dreams chipmem problem ancalimon support.Games 7 28 January 2010 18:53
Shifted keys Error support.WinUAE 7 18 April 2004 17:19
Gfx shifted to the left problem Leo42 support.WinUAE 6 30 January 2003 10:21

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 23:41.

Top

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