| |
Gordian
Registered: May 2022 Posts: 35 |
Break Vice at certain opcode
Hello,
is there any possibility to create condition for breaking Vice monitor at certain opcode? |
|
... 38 posts hidden. Click here to view all posts.... |
| |
Gordian
Registered: May 2022 Posts: 35 |
Quote: Funky, under what conditions does it do that?
And talking about conditions - you can actually do what was requested, like:
break exec $a000 $bfff if @cpu:(pc) == $58
edit: tested and fixed
chatGPZ
Just check flags after SEI and after return from $AB1E:
sei
lda #<loadingString
ldy #>loadingString
jsr $ab1e
jmp *
loadingString
!scr "some string",0
ChristopherJam
Personally I use:
http://www.unusedino.de/ec64/technical/misc/c64/romlisting.html
and
https://skoolkid.github.io/sk6502/c64rom/index.html
The second map shows by what routines $AB1E is used. I've made quick view, but haven't find any PHP in calling routines...:) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11136 |
But it must push the status too when it pulls it, no? else stack will be misaligned? or what am i missing there?
That said, chrout ($ffd2) also has a CLI in it somewhere. |
| |
JackAsser
Registered: Jun 2002 Posts: 1989 |
Quote: But it must push the status too when it pulls it, no? else stack will be misaligned? or what am i missing there?
That said, chrout ($ffd2) also has a CLI in it somewhere.
I suppose the kernel developers always assumed that interrupts should be enabled after a critical section and just did a CLI regardless of state before. *shrugs*
It would save some bytes having that assumption.
SEI/CLI vs PHP/SEI/PLP (also return values in carry would need special treatments if PLP is to be used) |
| |
Gordian
Registered: May 2022 Posts: 35 |
Ok, so the reason is not PLP...
It is just CLI at $E6B4, which is part of routine at $E6A8, which is used not directly by $FFD2, which is used by...
Tested via setting break before JSR $AB1E, then setting: break exec $a000 $bfff if (FL & 4) == $0 |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1380 |
Sorry about the red herring in that case :D |
| |
Gordian
Registered: May 2022 Posts: 35 |
That's fine!
My solution of course is not solution. Calling PHP before/SEI after could be until custom IRQ vector is not set. |
| |
Krill
Registered: Apr 2002 Posts: 2852 |
Quoting GordianThat's fine!
My solution of course is not solution. Calling PHP before/SEI after could be until custom IRQ vector is not set. What do you actually want to achieve?
And would simply disabling all IRQ sources (and then temporarily re-enabling those that you need) be an option? |
| |
Gordian
Registered: May 2022 Posts: 35 |
Quote: Quoting GordianThat's fine!
My solution of course is not solution. Calling PHP before/SEI after could be until custom IRQ vector is not set. What do you actually want to achieve?
And would simply disabling all IRQ sources (and then temporarily re-enabling those that you need) be an option?
Krill,
I'm not looking for a solution at this moment. Thanks.
As you said, disabling IRQs could be an option. |
| |
wacek
Registered: Nov 2007 Posts: 501 |
Gordian, I assume you do not use RetroDebugger for such things? :) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11136 |
Does that really work differently in it? It is VICE afterall :) (actually not sure if this stuff actually works in the VICE release it uses) |
Previous - 1 | 2 | 3 | 4 | 5 - Next |