MAMEWorld >> EmuChat
View all threads Index   Flat Mode Flat  

tunstals
MAME Fan
Reged: 05/04/14
Posts: 11
Send PM
Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084)
05/18/14 12:55 PM


> > So are you trying to say that all BSR and JSR calls can't be intercepted by the
> MAME
> > 6809 emulator and their text equivalent pushed onto a list control? e.g.
>
> Sure you can, but that isn't anything like what a call stack is.
>
> You'd need to prune the list when you rts, taking into account that your rts might be
> on a different stack than the last JSR or the address might have been pushed onto the
> cpu stack as an indirect jump.
>
> (forgive me it's 6502 as it's the assembly I wrote the most)
>
> JSR myroutine
> RTS
>
> :myroutine
> LDA #$d0
> PHA
> LDA #$c0
> PHA
> RTS
>
> Some cpu's can move the stack pointer for multitasking, others can just copy the
> whole stack somewhere and restore it. When you do that the call stack is going to be
> even more messed up.

No, it's not a true call stack but it's a list of calls in a LIFO order, is that better

I would like the last 10 or so JSR and BSR to be logged somewhere. I would like to click on an entry on the log and go back to the relevant line of assembly .

I don't care about when RTS is hit, I just want to have a quick look of the subroutine being called, see if I recognise what it does, and if not quickly go back to the JSR and step over it.

Right now, I have to put a breakpoint on the RTS, run to that, but sometimes that's not really what I'm after, especially if PC is changed by something unexpected.

Right now I'm reverse engineering Robotron 2084, there are a lot of indirections, many JSRs that call JMP instructions, and these are quite hard to keep track of UNLESS I step through the function in its entirety and return to the caller that way.







Entire thread
Subject Posted by Posted on
* Debugging 6809 RAM writes with MAME debugger (Robotron 2084) tunstals 05/12/14 10:27 AM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) R. Belmont  05/12/14 04:58 PM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) tunstals  05/12/14 05:38 PM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) tunstals  05/15/14 01:04 PM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) Anonymous  05/15/14 07:14 PM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) Vas Crabb  05/15/14 10:21 PM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) tunstals  05/16/14 01:51 PM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) Matt Ownby  05/18/14 04:48 AM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) Vas Crabb  05/17/14 03:42 AM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) Anonymous  05/17/14 11:54 AM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) Anonymous  05/16/14 11:15 PM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) tunstals  05/18/14 12:55 PM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) Anonymous  05/18/14 03:38 PM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) R. Belmont  05/16/14 08:11 PM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) tunstals  05/18/14 12:58 PM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) jonwil  05/18/14 05:31 AM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) The_Hamster  05/17/14 04:12 PM
. * Re: Debugging 6809 RAM writes with MAME debugger (Robotron 2084) R. Belmont  05/19/14 05:42 PM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
1 registered and 179 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2838