English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 09 October 2018, 11:50   #1
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,146
SMC detection

I have just tried to use the WinUAE debugger to find some SMC and it doesn't appear to work for me. I made some simple test code and the debugger didn't break with "smc 1". I have used the following code for testing (using a standard 68000/A500 config):
Code:
START    lea    SMC(pc),a0

.LMB    btst    #6,$bfe001
    bne.b    .LMB


    move.w    #$4e71,(a0)
    ;rts
    tst.w    d0
    clr.w    d1


SMC    rts
    rts
I have added the bogus tst/clr dx instructions after the first test to make sure the short distance to the modified instruction isn't the problem but it didn't change anything.


What am I missing here?
StingRay is offline  
Old 09 October 2018, 13:55   #2
jotd
Cat freak
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 47
Posts: 2,647
I remember having such problems. But have you turned off JIT? because with JIT it's guaranteed that it DOESN'T work.

My whdload setup as some magical winuae start/stop command to turn on/off JIT & turn off/on MMU when running whload.

that would be super-cool if it worked, because whdload protectSMC is fairly limited, and there are a lot of SMC games out there...
jotd is offline  
Old 09 October 2018, 13:58   #3
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,146
JIT is of course turned off (68000/A500 config as mentioned). When doing WHDLoad stuff I always have JIT turned off as well. It would indeed be nice if the SMC detection worked, could save quite a bit of time.
StingRay is offline  
Old 09 October 2018, 14:05   #4
musashi5150
move.w #$4489,$dff07e
musashi5150's Avatar
 
Join Date: Sep 2005
Location: Norfolk, UK
Age: 37
Posts: 2,296
I think oldskool debuggers used to put ILLEGAL (or something) to trap breakpointed code through a vector. I wonder if UAE is doing something similar (with some clever slight-of-hand-magic so the Amiga can't see the value) rather than watching the PC - and you lose the magic when you SMC.

But I'm just guessing and quite possibly talking sausages
musashi5150 is offline  
Old 09 October 2018, 20:20   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,026
Memwatch point handling changed many releases ago and it affected smc (and few other debugger options).

You need to add "dummy" memwatch range, for example "w 0 0 80000 none" if code is in chip ram. (I guess some shortcut to add all ram regions would be nice to have..)

"More compatible" CPU option also must be ticked.
Toni Wilen is offline  
Old 09 October 2018, 21:19   #6
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,146
That does indeed work, thanks! And yes, a shortcut to add all the ram regions would be incredibly useful indeed.

Last edited by StingRay; 09 October 2018 at 21:25. Reason: typo
StingRay is offline  
Old 09 October 2018, 21:52   #7
jotd
Cat freak
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 47
Posts: 2,647
Some day I'll have to read the WinUAE reference manual, well, better read Toni's mind
jotd is offline  
Old 14 October 2018, 17:37   #8
Paradroid
Rock Lobster
 
Join Date: Nov 2012
Location: Macclesfield
Age: 44
Posts: 39
I've tried looking and failed to find any info/notes about memwatch changes, so what happened with it?

I ask as my usual method of triggering a breakpoint in my code is to add "clr.w $80000" at the point I want to break, then use "w1 80000" in the debugger. This has worked fine until I tried it today, so I started installing older versions of winua and found that it stopped working as of version 3.6.0

The "More Compatible" option is ticked in my config, although it's greyed out.


Do I need to type something different in the debugger now?
Paradroid is offline  
Old 14 October 2018, 18:30   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,026
w has always needed size parameter (w <num> <address> <length> [optional stuff]>. It probably was accidental side effect if it worked without it previously.
Toni Wilen is offline  
Old 14 October 2018, 18:48   #10
Paradroid
Rock Lobster
 
Join Date: Nov 2012
Location: Macclesfield
Age: 44
Posts: 39
Quote:
Originally Posted by Toni Wilen View Post
w has always needed size parameter (w <num> <address> <length> [optional stuff]>. It probably was accidental side effect if it worked without it previously.
It would use a size of 1 if not specified, but I've just tried again using "w1 80000 2" to be sure and it's still not working in 3.6.0 ~ 4.0.1

However, I should have mentioned that I'm using the GUI debugger, and I've just been reading the "UAE debugger updates" thread and noticed your "Don't mention anything about GUI." comment. Does this mean the GUI debugger is now effectively dead?

EDIT: I just tried "w0 80000" and it works.
Paradroid is offline  
Old 14 October 2018, 21:54   #11
jotd
Cat freak
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 47
Posts: 2,647
I noticed that if you don't have watchpoint 0 active then the others don't work.

Also the trainer feature (C command) doesn't work anymore (deep trainer works). And yes, the GUI version is not maintained anymore. I got used to the text mode, with proper colors & quick edit mode it's good enough
jotd is offline  
Old 16 October 2018, 20:41   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,026
Memwatch checking was optimized and it accidentally required that first slot is in use. Fixed.
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
Collision Detection sandruzzo Coders. General 5 10 June 2016 13:50
Joypad detection TuKo support.WinUAE 6 14 March 2015 16:12
Better gamepad detection Maren request.UAE Wishlist 8 25 November 2009 19:03
M.I.D.I. in detection bug GROSDAMS support.WinUAE 2 13 September 2008 02:05
HRTMon configuration options and SMC detector jotd request.UAE Wishlist 1 23 October 2006 23:38

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


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.08072 seconds with 15 queries