Hi I dont remember very well, but I think it was just an offset in 1 or 2 ranges of values I think the offset was #$40 to add or substract... the code was quite short and without tables last time I wrote that it was in 1984... -- didier Le 12/12/2011 17:11, "Gábor Lénárt" a écrit : > Hi, > > I want to manipulate the text video RAM directly, so I mostly have > information in the form of "screen codes" already (instead of PETSCII) since > using a KERNAL function like CHROUT is much slower for heavy usage. > However, I have some information presented in PETSCII. I have the idea that > KERNAL should know about the PETSCII->screen codes translation somehow, > since it also prints onto the screen. But I want to avoid the "overhead" > of calling CHROUT, so my question is: can I found a conversion table > somewhere in the ROM, I can use, like this? > > ; X=byte to output > LDA conv_table,X ; conv_table in KERNAL > ; now I have the screen code in A > > Of course I can include a 128 byte long conversion table by my own too, but > I wouldn't make my software larger, if there is already a table like this in > the ROM somewhere. Or does the conversion based on a routine and not table? > For sure, in this case, I don't need to interpret special "control > characters", like reverse on, return ... > > It's possible that KERNAL does this by a subroutine instead of a table, but > then it's surely slower than using just a table. > > Currently I do an ugly trick: after clearing the screen, I print out > characters by KERNAL, then I copy bytes from the video RAM (what kernal > written as bytes into the video ram) into my reserved area used as the > translation buffer. After this, I clear the screen again. In this way, at > least I don't need to include a pre-generated table in my program, however > this solution feels a bit hacky for me :) If kernal provides any translation > table (rather than using code for "translation") it's still means less > memory footprint if I can use that. > > thanks! > > Message was sent through the cbm-hackers mailing list Message was sent through the cbm-hackers mailing listReceived on 2011-12-12 18:00:26
Archive generated by hypermail 2.2.0.