I wanted to give a chance to the games I am converting to take advantage of any HD6309 installed in place of the std MC6809
The code is fairly simple:
Code: Select all
Set6309 fcb $10,$86,$55,$55 ; ldw #$5555
fcb $1f,$61 ; tfr w,x
cmpx #$ffff ; did it fail?
beq ES6309 ; yes, skip next
fcb $11,$3d,$01 ; ldmd #$01
ES6309 rts ; return
So I cannot tell if it works well because on my Real Dragon64 it works and no problems arise ...
Then I decided to trace this code with GDB and much to my surprise the registers are not correctly updated.
After the first LDW #$5555 register E (high byte) shows $00 and at its right the decimal value ... 21760 ($5500)
the low register, reg F shows value $00 too
Till now register md shows $00 but after the TFR W,X I can see clearly that register X has been loaded with #$5555 as I expected
and suprisingly register md now shows $55 (something's been shifted?)
The compare fails, so no branch is taken and then the LDMD #01 should put the 6309 into native mode
but md keeps showing value $55
I am afraid that there could be misaligned data in the interface XRoar - DBG ...
cheers
pere