binji/binjgb

Implement debug messages

jendrikw opened this issue · 1 comments

GBG knows two kinds of debug messages that can be used to trace what the program is doing. They're described in the manual.

In the first kind, the message is embedded in the instructions

    ld d, d ; signals a debug message
    jr .enddebugmsg
	; the next 4 instructions specify the kind of mesage
    ld h, h
    ld h, h
   	dw $0000
    db "my message"
.enddebugmsg

The second kind loads a zero-terminated string from an address, which can be useful for dynamic messages that include runtime values.

    ld d, d
    jr .enddebugmsg
    ; the next 4 instructions specify the kind of mesage
    ld h, h
    ld h, h
    dw $0001
    dw address
    dw bank
.enddebugmsg

In BGB, these messages are displayed in a separate window.

image

This would be a nice feature, I think.

binji commented

Same with the other feature -- sounds cool, but I don't know if I have time to implement.