I tried to add debug function to my liv (PVSnesLib) with such code :
Code: Select all
.equ REG_DEBUG $21FC
.section ".consoles_text" superfree
;---------------------------------------------------------------------------
; void consoleNocashMessage(const char *message);
consoleNocashMessage:
php
rep #$20
phy
ldy #$0
; Let tcc__r2 point to the message
lda 7,s
sta tcc__r2
lda 9,s
sta tcc__r2h
sep #$20
-: lda [tcc__r2],y
beq +
iny
sta.l REG_DEBUG
bra -
+: ply
plp
rtl
.endsThe code works fine in no$sns, i can see it with 'step by step' running, message pointer is ok and i send each character to $21fc address. But nothing appears in debug windows
*EDIT 05/09/2013 , stupid i was, need to activate debugmessage in OPtions/Debug. Works fine now. Thanks a lot for this option nocash ! *