Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Break Vice at certain opcode
2024-03-11 10:23
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....
 
2024-03-11 17:50
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...:)
2024-03-11 21:03
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.
2024-03-11 21:13
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)
2024-03-12 12:12
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
2024-03-12 13:39
ChristopherJam

Registered: Aug 2004
Posts: 1380
Sorry about the red herring in that case :D
2024-03-12 14:50
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.
2024-03-13 00:09
Krill

Registered: Apr 2002
Posts: 2852
Quoting Gordian
That'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?
2024-03-13 11:00
Gordian

Registered: May 2022
Posts: 35
Quote: Quoting Gordian
That'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.
2024-03-18 12:38
wacek

Registered: Nov 2007
Posts: 501
Gordian, I assume you do not use RetroDebugger for such things? :)
2024-03-18 13:21
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
E$G/hOKUtO fOrcE
Rhythm/G★P
Bacchus/FairLight
Unlock/Padua/Albion
Viti/Hokuto Force
A3/AFL
Alakran_64
Guests online: 93
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Musicians
1 Vincenzo  (9.8)
2 Rob Hubbard  (9.7)
3 Stinsen  (9.7)
4 Jeroen Tel  (9.6)
5 Linus  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.065 sec.