It would be useful for certain use cases to have the ability to print all the characters in a buffer as literal characters without the need to escape each control character. @stevesims suggested in discord to make the VDU system command &9B which is $80 + ESC ($1B).
Unfortunately this is my first time looking in the VDP codebase and I have gotten a bit bogged down understanding how to use the buffers. Here is what I have so far...
In agon.h:
#define VDP_BUFFER_PRINT 0x9B // Print a buffer of characters literally with no command interpretation
In vdu_sys.h:
case VDP_BUFFER_PRINT: { // VDU 23, 0, &9B
auto bufferId = readWord_t();
auto bufferIter = buffers.find(bufferId);
if (bufferIter == buffers.end()) {
debug_log("vdp_bufferPrint: buffer %d not found\n\r", bufferId);
return;
}
// i can't figure out how to extract the string from the buffer
context->plotString(stringFromBuffer);
}
It would be useful for certain use cases to have the ability to print all the characters in a buffer as literal characters without the need to escape each control character. @stevesims suggested in discord to make the VDU system command &9B which is $80 + ESC ($1B).
Unfortunately this is my first time looking in the VDP codebase and I have gotten a bit bogged down understanding how to use the buffers. Here is what I have so far...
In agon.h:
In vdu_sys.h: