English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 13 January 2016, 23:02   #1
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,367
illegal memory access not working

Hi,

Trying to debug something. wd 1 is breaking for nothing... check the current instruction, the log below, and see it's not working at all.
Tells me it's trying to write in some custom $DFFxxx register whereas it's writing to regular chipmem

My config is a 68020 no JIT 24 bit addressing (CD32 with hard disk actually)

Click image for larger version

Name:	cd32_config_wd_1.png
Views:	296
Size:	52.0 KB
ID:	46960

thx
jotd is offline  
Old 14 January 2016, 20:07   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,567
Since memwatch breakpoint handling was changed (few releases ago), wd only sees accesses that also hit any memwatch region.

Use something like "w 0 <start> <len> none" or similar.
Toni Wilen is offline  
Old 14 January 2016, 22:29   #3
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,367
yes, it works. It's more powerful, but also less convenient. Well, I found something fishy thanks to it!!
jotd is offline  
Old 07 July 2019, 13:49   #4
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,490
Sorry to revive this old thread, but I've the same mentioned problem.

Latest WinUAE stable, no JIT or fancy configuration, a simple A500 or A1200 quick config, CE (or any other similar one).

Tried with "w 0 <start> <len> none" or similar.
But
wd
does't trap or log illegal memory access.


And write strangeness:
Code:
>wd
Memwatch breakpoints enabled
Illegal memory access logging enabled. Break=0
>
or
Code:
>wd 1
Cleared logging addresses 00000001 - 00000002
>
What's the way to make it work?

I've also problem with
w
command and Z3 memory, but I can't understand under what conditions it doesn't work.
ross is offline  
Old 07 July 2019, 20:09   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,567
wd supports only first 16M of address space. Including Z3 space would require huge amounts of RAM.

w does not have any limits.
Toni Wilen is offline  
Old 07 July 2019, 20:34   #6
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,490
Quote:
Originally Posted by Toni Wilen View Post
wd supports only first 16M of address space. Including Z3 space would require huge amounts of RAM.

w does not have any limits.
So the only possibility is to use the native MMU?

What we need is simply a log when unmapped memory is accessed.
Yes Z3 memory can be huge and problematic, but think about old games/demos/stuff where 24-bit memory is usual.
An option for a break/log if ((high byte != 0) && (24-bit memory flag)) can be simple.
And wd working in 'low' 16MB memory space.
ross is offline  
Old 07 July 2019, 20:37   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,567
Any CPU unmapped (address space where nothing is mapped) access is already logged if misc panel illegal access option is ticked.
Toni Wilen is offline  
Old 07 July 2019, 21:23   #8
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,490
And obviously I've missed this option Thanks.
I suppose all zone mapped as <none> in current address space map trigger a log.

But how about the 'mirror' zone?
I tried wd for the addresses $80000-$1FFFFF but it didn't seem to work, nor in $C00000 and up
(off course not used in memory map).
ross is offline  
Old Yesterday, 14:33   #9
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 195
ok, some points to this command:

wd [<0-1>] Enable illegal access logger. 1 = enable break.

I don't know why this command get the name 'wd'? Maybe better would be: 'im' illegal memory (access)
And then wd would be free as command for delete all memory watchpoints similar to fd command.

Then what's the logic behind 'wd'?
Code:
>wd
Illegal memory access logging disabled
>wd 0
Illegal memory access logging enabled. Break=1
>wd 0
Cleared logging addresses 00000000 - 00000001
>wd 1
Cleared logging addresses 00000001 - 00000002
>wd
Illegal memory access logging disabled
>wd 1
Illegal memory access logging enabled. Break=1
>wd 1
Cleared logging addresses 00000001 - 00000002
>wd 0
Cleared logging addresses 00000000 - 00000001
>wd
Illegal memory access logging disabled
>wd 0
Illegal memory access logging enabled. Break=1
>wd 30000
Cleared logging addresses 00030000 - 00030001
>wd 30000 40000
Cleared logging addresses 00030000 - 00070000
>
Maybe better would be: wd enable/disable illegal access logger (or even better 'im')
>wd
Illegal memory access logging enabled
>wd
Illegal memory access logging disabled

Like 'smc', the 'wd' needs a dummy memwatch
>w 0 $0 $1000000 none ; w 0 <start> <len> none
0: 00000000 - 00FFFFFF (16777216) RWI NONE ; it's need for wd (max. 16MB)

Is it possible to set this memwatch automatically as default and to give out the actual setting info by wd enabling?

>wd
Illegal memory access logging enabled
0: 00000000 - 00FFFFFF (16777216) RWI NONE ; default complete 16M

Then wd in practice:

Code:
	move.b d0,$F80000	; write access ROM - illegal memory access
	move.w d0,$F90000	; write access ROM - illegal memory access
	move.l d0,$FA0000	; write access ROM - illegal memory access
	move.w $dff180,d1	; Color00, data access custom-chips	(write only)
	move.w d0,$200002	; 8MB Fast RAM area
	move.w #$0,$C80000	; normaly unused
	
>g
WO: 00F80000    PC=00022E3C
...
00022e3c 13c0 00f8 0000           move.b d0,$00f80000 [11]	; works fine
>g
WO: 00F90001    PC=00022E44		
WO: 00F90000    PC=00022E44
...
00022e44 33c0 00f9 0000           move.w d0,$00f90000 [6602]	; works fine
>g
WO: 00FA0001    PC=00022E4C
WO: 00FA0000    PC=00022E4C
...
00022e4c 23c0 00fa 0000           move.l d0,$00fa0000 [524151ca]	; works fine
>
;-------------------------------------------------------------
>g
RO: 00DFF181=FF PC=00023A24
RO: 00DFF180=FF PC=00023A24
...
00023a24 3239 00df f180           move.w $00dff180,d1	; works fine
...
;-------------------------------------------------------------
>g
W: 00200003=AB PC=00023F96
W: 00200002=BA PC=00023F96
...
00023f96 33c0 0020 0002           move.w d0,$00200002	; works fine
;-------------------------------------------------------------
>g
WO: 00DFF001    PC=00023FA0
WO: 00DFF000    PC=00023FA0
...
00023fa0 33fc 0000 00c8 0000      move.w #$0000,$00c80000	; works fine
00023fa8 0839 0006 00bf e001      btst.b #$0006,$00bfe001
Next PC: 00023fb0
>
info message is missed like:
illegal memory access at

WO: 00F80000 PC=00022E3C
...

Then I see a W: WO: RO:
it could be: Write, Write Only, Read Only but ROM ist for me: RO and not WO and DFF180 is WO and not RO.
W offcourse is both.

;-------------------------------------------------------------

Then some questions to the memory dump.
Code:
>dm
00000000    2048K/4 =     512K ID* C16 Chip memory
00200000    8192K/0 =    8192K --  F16 <none>
00A00000    2048K/0 =    2048K --  CIA CIA
00C00000     512K/1 =     512K ID* C16 Slow memory
00C80000    1024K/0 =    1024K --  F16 Custom chipset
00D80000     256K/0 =     256K --  C16 <none>
00DC0000      64K/0 =      64K --  C16 Battery backed up clock (MSM6242B)
00DD0000      64K/0 =      64K --  C16 <none>
00DE0000     128K/0 =     128K --  C16 Custom chipset
00E00000     512K/2 =     256K ID* F16 Kickstart ROM (C4F0F55F)
=KS ROM v1.3 (A500,A1000,A2000) rev 34.5 (256k) [315093-02]
00E80000     512K/0 =     512K --  F16 <none>
00F00000      64K/1 =      64K --* F16 UAE Boot ROM
00F10000     448K/0 =     448K --  F16 <none>
00F80000     512K/2 =     256K ID* F16 Kickstart ROM (C4F0F55F)
=KS ROM v1.3 (A500,A1000,A2000) rev 34.5 (256k) [315093-02]
>
Maybe an additional info sign about a potential 'illegal access area' W, RO, WO would be good.
(All <none> and ROM regions and the son on)

Then my interpretation to this /0 /1 /2 /4 is:
/0 - not present
/1 - 1x present
/2 - 2x present (mirrored)
/4 - 4x present (mirrored)

What means ID* or '--' or '--*' ?
I - Instruction, D - Data, * - ?

;-------------------------------------------------------------

00000000 2048K/4 = 512K ID C16 Chip memory ; Chip memory
;0800000 copy of chip
;1000000 copy of chip
;1800000 copy of chip

But there is no illegal memory access log in the mirrored chip ram area from $800000 - $1FFFFF
because wd supports only the first 16M of address space.

>w 0 $0 $1FFFFFF none
0: 00000000 - 01FFFFFE (33554431) RWI NONE ; false message?

with Paths 'Log window' enabled and Misc Panel 'Log illegal memory accesses' is ticked, the illegal memory access is logged
Illegal wput at 0088888a=1234abba PC=2464c ; works
Rock'n Roll is offline  
Old Yesterday, 19:58   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,567
Just a quick note: not interested in debugger updates at the moment, maybe (much) later.

All debugger features are "undefined". Features randomly change or appear if I need some new feature to debug something..
Toni Wilen 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
memory access speed question Lord Riton Coders. General 42 27 February 2019 14:26
Is there a list of know working memory parts available toddbailey support.Hardware 2 25 August 2015 01:31
Break on Memory Access? Khyron support.WinUAE 3 21 August 2010 00:10
access emulated memory ara support.WinUAE 6 03 April 2010 13:05

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

Top

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