Well, not
all bugs, it seems, was cured with this.
The following code:
Code:
!to "memtest.bin"
!cpu 65816
* = $FF00
boot
clc
xce
rep #$30
!al
!rl
lda #$FEFF
tas
lda #$FFFF
sta $02
jsr RamTest8K
ItWorks ; oscope on the EMUL output of 65816 to confirm
clc
xce
sec
xce
bra ItWorks
RamTest8K
ldx #$E000
stx $00
jsr td
stx $00
rts
td
lda #$A5A5
sta $0000,x
lda #$5A5A
sta $0002,x
lda $0000,x
eor $0002,x
inc
bne fail
inx
inx
inx
inx
rts
fail
bra fail
* = $FFFC
!word boot, boot
does not run to completion.
After downloading it into the Kestrel's memory space, the CPU goes into native mode, immediately goes back into emulation mode, and then a *continuous* blast of memory writes occurs. That is, it never stops writing to memory, and so far as I can tell, the memory it's writing to seems to be between $0100-$01FF. Looking at the o'scope traces, I'm seeing three byte writes to memory, which implies a JSL instruction, since the CPU is operating in emulation mode. The address bus is confirmed to be $0000 and $0001 prior to the JSL.
So, I'm really confused....why is this happening? As I've replaced the RAM chip twice, I've effectively confirmed it's not the RAM chip.
I can no longer figure out why this is happening. I am at a *TOTAL* loss at this point. Why is this circuit just plain refusing to work when presented why any *shred* of a non-trivial program??????
*sigh*