irmen / prog8

high level programming language and compiler targeting 6502 machines such as the C-64 and CommanderX16
https://prog8.readthedocs.io/
Other
152 stars 18 forks source link

vera CTRL not properly reset in line drawing code #143

Closed irmen closed 5 months ago

irmen commented 5 months ago

a problem exists in gfx2 and monogfx libraries:

set_both_strides() routine leaves vera CTRL at ADDRSEL=1, which causes issues afterwards when calling kernal routines that expect ADDRSEL to be set to 0 on entry. Like printing characters with chrout

a simple VERA_CTRL=0 on exit likely fixes that problem