Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #3400 > unrolled thread
| Started by | Mark Lemmert <mark.lemmert@gmail.com> |
|---|---|
| First post | 2017-03-28 16:53 -0700 |
| Last post | 2017-04-22 18:32 -0700 |
| Articles | 8 — 6 participants |
Back to article view | Back to comp.sys.apple2.programmer
AppleWIN debugger question Mark Lemmert <mark.lemmert@gmail.com> - 2017-03-28 16:53 -0700
Re: AppleWIN debugger question qkumba <peter.ferrie@gmail.com> - 2017-03-28 21:06 -0700
AppleWIN debugger question Michael Pohoreski <michael.pohoreski@gmail.com> - 2017-03-29 00:54 -0700
Re: AppleWIN debugger question 6502workshop@gmail.com - 2017-03-29 12:08 -0700
Re: AppleWIN debugger question Nick Westgate <nick.westgate@gmail.com> - 2017-03-30 01:52 -0700
Re: AppleWIN debugger question 6502workshop@gmail.com - 2017-03-30 19:20 -0700
Re: AppleWIN debugger question TomCh <tomcharlesworth26@gmail.com> - 2017-04-17 08:09 -0700
Re: AppleWIN debugger question 6502workshop@gmail.com - 2017-04-22 18:32 -0700
| From | Mark Lemmert <mark.lemmert@gmail.com> |
|---|---|
| Date | 2017-03-28 16:53 -0700 |
| Subject | AppleWIN debugger question |
| Message-ID | <7c5cc1a1-9e51-42f0-a77b-09b7af92c817@googlegroups.com> |
I am a total newbie to the AppleWIN debugger and have a basic question. Is it possible to create a breakpoint conditioned on a memory address being equal to a particular value? The closest I found in the documentation was BPM, but that says it is triggered by the memory address being accessed by the 6502. The scenario I’m trying to troubleshooting involves a bug caused by the aux BSR address $DE0C being set to $39. For a variety of reasons, it is providing to be very difficult to point when the address is set to this value by tracing the program flow. I’m hoping that AppleWIN debugger can somehow alert me when $DE0C = $39. Thanks much if anyone has any insight on this. Mark
[toc] | [next] | [standalone]
| From | qkumba <peter.ferrie@gmail.com> |
|---|---|
| Date | 2017-03-28 21:06 -0700 |
| Message-ID | <f35e02b1-acdc-4497-887f-119ddb8a687b@googlegroups.com> |
| In reply to | #3400 |
No, AppleWin currently cannot do this, but MAME can.
[toc] | [prev] | [next] | [standalone]
| From | Michael Pohoreski <michael.pohoreski@gmail.com> |
|---|---|
| Date | 2017-03-29 00:54 -0700 |
| Message-ID | <76638cb7-3907-44d5-8b24-de2303637c49@googlegroups.com> |
| In reply to | #3400 |
This probably belongs in comp.emulators.apple2 but I digress. The foundation is definitely there -- checking the source, Debug.cpp, Func: CmdBreakpointAddMem() BreakpointOperator_t iCmp = BP_OP_EQUAL ; I see BPM is hard-coded to `==`. :-/ I'll add this feature request as an internal wishlist since I need this feature too. :-) I guess I should probably fix the help for BPM while I'm at it as well.
[toc] | [prev] | [next] | [standalone]
| From | 6502workshop@gmail.com |
|---|---|
| Date | 2017-03-29 12:08 -0700 |
| Message-ID | <c2b1f9a7-6522-4b0a-9fce-e1aa73424c2c@googlegroups.com> |
| In reply to | #3402 |
Ok, thanks guys! Mark
[toc] | [prev] | [next] | [standalone]
| From | Nick Westgate <nick.westgate@gmail.com> |
|---|---|
| Date | 2017-03-30 01:52 -0700 |
| Message-ID | <f00ad411-e2e4-4e85-9ecc-d10b1325bdc5@googlegroups.com> |
| In reply to | #3400 |
On Wednesday, 29 March 2017 12:53:51 UTC+13, Mark Lemmert wrote:
> I’m hoping that AppleWIN debugger can somehow alert me when $DE0C = $39.
AppleWin can't do this as is ... but with Visual Studio it can.
If you're using Windows, then just install VS 2017 Community Edition, install the C++ workflow, grab the source code and build AppleWin.
https://www.visualstudio.com/vs/community/
https://github.com/AppleWin/AppleWin
Search the source for CheckInterruptSources and put the following before it in the CPU of your choice, e.g. in cpu65C02.h around line 324:
if (mem[0xDE0C] == 0x39 && g_nAppMode != MODE_STEPPING)
{
g_nAppMode = MODE_STEPPING;
break;
}
You'll end up in the debugger just after the instruction that did it.
(With a warning since we haven't entered the debugger normally.
It would be nice to be able to do this properly - maybe Michael can expand if needed.)
Or if you just want to print something to the VS Output pane then put this in there:
char outputString[32];
sprintf_s(outputString, "PC=%0.4X", regs.pc);
OutputDebugStringA(outputString);
That's how I'd do it. Let me know if you need help.
Cheers.
Nick.
[toc] | [prev] | [next] | [standalone]
| From | 6502workshop@gmail.com |
|---|---|
| Date | 2017-03-30 19:20 -0700 |
| Message-ID | <7a76cb25-fe6b-41b1-bdf4-e28d29482602@googlegroups.com> |
| In reply to | #3404 |
On Thursday, March 30, 2017 at 3:52:45 AM UTC-5, Nick Westgate wrote: > On Wednesday, 29 March 2017 12:53:51 UTC+13, Mark Lemmert wrote: > > I’m hoping that AppleWIN debugger can somehow alert me when $DE0C = $39. > > AppleWin can't do this as is ... but with Visual Studio it can. > Hi Nick, Thanks for the detailed example! Mark
[toc] | [prev] | [next] | [standalone]
| From | TomCh <tomcharlesworth26@gmail.com> |
|---|---|
| Date | 2017-04-17 08:09 -0700 |
| Message-ID | <2ed206c6-6ff6-4016-92a8-162bedcddbd4@googlegroups.com> |
| In reply to | #3400 |
On Wednesday, March 29, 2017 at 12:53:51 AM UTC+1, Mark Lemmert wrote: > I am a total newbie to the AppleWIN debugger and have a basic question. > > Is it possible to create a breakpoint conditioned on a memory address being equal to a particular value? > > The closest I found in the documentation was BPM, but that says it is triggered by > the memory address being accessed by the 6502. > > The scenario I’m trying to troubleshooting involves a bug caused by the aux BSR address $DE0C being set to $39. For a variety of reasons, it is providing to be very difficult to point when the address is set to this value by tracing the program flow. > > I’m hoping that AppleWIN debugger can somehow alert me when $DE0C = $39. > > > Thanks much if anyone has any insight on this. > > > Mark Tracking as a feature request here: https://github.com/AppleWin/AppleWin/issues/402 Tom
[toc] | [prev] | [next] | [standalone]
| From | 6502workshop@gmail.com |
|---|---|
| Date | 2017-04-22 18:32 -0700 |
| Message-ID | <ddfa801c-cfb4-4d3a-a5f9-d7d65d8ed8e5@googlegroups.com> |
| In reply to | #3425 |
> > Tracking as a feature request here: > https://github.com/AppleWin/AppleWin/issues/402 > > Tom Thanks! Mark
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.apple2.programmer
csiph-web