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: 101
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: 101
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: 11523
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: 2038
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: 101
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: 1424
Sorry about the red herring in that case :D
2024-03-12 14:50
Gordian

Registered: May 2022
Posts: 101
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: 3098
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: 101
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: 526
Gordian, I assume you do not use RetroDebugger for such things? :)
2024-03-18 13:21
chatGPZ

Registered: Dec 2001
Posts: 11523
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
pievspie
Scooby/G★P/Light
Matt
MaD ][/Starship
megasoftargentina
t0m3000/bo0M!^hf^ibex
Tommy/Noice^DCS
algorithm
vili
DJ Space
Exile/Anubis
MWR/Visdom
DeMOSic/MS^LSD^ONS
Guests online: 333
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Performers  (9.3)
5 Censor Design  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 OTD  (9.8)
3 Antitrack  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.753 sec.