29 October 2017, 08:53 | #1 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
68000 undocumented STOP feature
(Not in normal undocumented thread because this is not really Amiga specific)
68000 (possibly 010 too) STOP #x has strange undocumented side-effect: STOP #<S-bit not set>: modifies SR, increases PC (next instruction), then generates privilege violation exception! Execution time: 8 extra idle cycles. Same as above but T (Trace) active before executing STOP: works as documented, no privilege violation. Only 4 extra idle cycles. (before trace exception starts) 68020/030: No side-effects. STOP parameter S-bit set or not set makes no difference, no weird privilege violation exceptions. 68040/060: STOP parameter S-bit not set: immediate privilege violation (same behavior as STOP being executed from user mode). SR is not changed. PC is not increased. (68060 LPSTOP documents this behavior, STOP documentation does not) (I didn't find this 68000 behavior, I got message from Hatari developers because someone found some Atari ST utility that has very rare protection that requires privilege violation exception behavior of STOP which needed emulation update.) |
29 October 2017, 09:52 | #2 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Hi Toni,
and this regardless of the state of S before STOP? Last edited by ross; 14 November 2017 at 22:37. |
29 October 2017, 10:08 | #3 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Must be in supervisor mode or you would get instant privilege violation exception. (which is not same as "STOP #S-bit-not-set" privilege violation on 68000, stacked SR and PC would be different)
It isn't _that_ undocumented |
29 October 2017, 10:34 | #4 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
At least it makes more sense, anyhow it's a weird behavior (and even on 040/060!).
Thanks! |
30 October 2017, 11:25 | #5 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
I saw the discussions about this protection (and the weird STOP behavior) on IRC, for reference, the protection is the one of Audio Sculpture.
|
01 November 2017, 21:43 | #6 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
I also used it on the bootblock of Stunner, IIRC the PC moving to next address was relied upon by me.
|
01 November 2017, 22:14 | #7 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
You most likely used documented behavior of STOP, instead of trying to cause privilege violation exceptions.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Undocumented Amiga hardware stuff | Toni Wilen | Coders. Asm / Hardware | 338 | 17 April 2024 22:40 |
ICD AdIDE "undocumented information" | Toni Wilen | support.Hardware | 18 | 12 August 2018 18:13 |
Swiv undocumented score feature | yaqube | Coders. General | 9 | 07 March 2017 20:35 |
Whdload quit key feature with a plain 68000 | Yulquen74 | Hardware mods | 3 | 25 February 2016 23:08 |
Action Replay Undocumented Features | deicidal | support.Hardware | 0 | 01 March 2010 17:15 |
|
|