I am new here, so let me introduce myself before I post my problem:
I am 46, programmer at work, electronics and retro-computing hobbyist at home. Wife, kids, mortgage, problems, yada, yada... So the hobby is my venting outlet. Nice to meet you all.
Now to more interesting stuff:
I started to explore VDC graphics programming on C128. I am reading Compute's C128 Programmer's Guide and researching online while learning VDC programming.
I have been able to draw hi-res pixel by pixel graphics using 80-col chip, but after I return from graphics to text, my leftmost column in text mode is invisible. I must hit RUNSTOP/RESTORE to recover proper 80-col display. My C128's VDC has 16 kB of RAM.
This BASIC program reproduces the issue:
10 fast:ad=dec("cdcc") 20 sys ad,128,25:rem turn on graphics, turn off attributes 30 rem do something here, clean the screen, draw pixels etc. 70 getkey a$:sys ad,64,25:sys 65378:end:rem turn off graph., turn on attr., restore characters from rom
Do any of you guys have any idea what am I doing wrong?
25 $19 Horizontal smooth scrolling and control Bits 0-3: These bits can be used to smoothly scroll the screen horizontally. The use of these bits depends on the version of the VDC in your 128. (The version number can be determined by reading bits 0-2 of the external communications register at 54784/$D600.) For version 1 of the VDC, which includes most 128s, this register should be initialized to the maximum character width (in bits 4-7 of register 22/$16). Each decrement of this register shifts the display one pixel to the left. For the older version 0 of the VDC, these bits should be initialized to %0000. In this case, each increment of these bits shifts the display one pixel to the right.