Skip to content

MD Debugger: Console's base VRAM address can only be multiple of $4000 #42

@vladikcomper

Description

@vladikcomper

It appears that Console subsystem (used by MD Debugger and MD Shell) is implemented in such a way that it only properly works with base VRAM addresses that are multiples of 4 (e.g. $0000, $4000, $8000, $C000).

Attempts to use other valid base VRAM addresses (e.g. $E000) will break as soon as "%" token is encountered (or Console.BreakLine, Console.WriteLine are used), because of "plane boundary" protection implemented here:

; For flags E0-EF (no arguments)
add.l d6, d7 ; $00 ; codes E0-E1 : start a new line
moveq #29, d1 ; $02 ; codes E2-E3 : <<UNUSED>>
bclr d1, d7 ; $04 ; codes E4-E5 : <<UNUSED>>
bra.s @reset_line ; $06 ; codes E6-E7 : reset position to the beginning of line

(Also see Console_StartNewLine)

This effectively subtracts $2000 (1<<13) from the base address if it's not multiple of $4000.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions