Re: 6809 / 6702 puzzle

From: André Fachat <afachat_at_gmx.de>
Date: Sat, 04 Feb 2012 22:20:27 +0100
Message-ID: <20120204212027.251050@gmx.net>
-------- Original-Nachricht --------
> Von: Rhialto <rhialto@falu.nl>
> An: CBM Hackers <cbm-hackers@musoftware.de>
> Betreff: 6809 / 6702 puzzle

> Hi all,
> 
> in the last weeks I've been putting more SuperPET features into VICE.
> I'm currently testing to see how far I get running the Waterloo software
> (all available from zimmers.net).

Congratulations! That's a great achievement!

> land. Obviously my implementation of the 6702 dongle as a simple
> register isn't good enough!

That was to be expected...

> Can anybody see what this code is trying to do, and where it's going
> wrong? I can supply more disassembly if wanted.

I don't know much about the 6809, I'm basically seeing 6809 ASM for the first time... But I'll try to make out something.

* It looks like those ",S" addressing modes are stack-relative, which would allow us to identify local variables
* Unfortunately on 98b8 it branches back to the beginning, so it looks like a loop
* on 9895 it does a branch subroutine (BSR) to 989f, but the code (data) from 9897 to 989f is not deassembled.
* If I interpret the ",S++" opcodes e.g. at 989f correctly, the pull some values from the stack, so the subroutine may not be a subroutine but a jump
* S,06 seems to be a pointer somewhere into memory - according to the DONGLE traces pointing to the dongle
* you could make a stack dump on every cycle, as there is so much stack-relative addressing...

... but I'm afraid it seems I can't really make any sense out of this so far :-(

However - now that we know the access sequence, why not write a test program with that same sequence and run it on the real machine? You could find the correct values and from those maybe deduct some logic.


André

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

       Message was sent through the cbm-hackers mailing list
Received on 2012-02-04 22:00:03

Archive generated by hypermail 2.2.0.