I've set up my Nexys4DDR and have attempted to code some BASIC 10 programs.
Whenever I try to do some graphics programming I run into some problems.
Namely the LINE statement doesn't work as I would expect. LINE accept 2 or 4 parameters.
If 2 parameters then it plots a point and works perfectly. If 4 parameters then it (apparently) is means to draw a line going from x0,y0 to x1,y1. However LINE only works for the 2 parameter (point) version and for certain specific cases of 4 parameters: namely 45-degree lines, horizontal lines and vertical lines. I can't get it to work nicely for arbitrary lines. Instead it draws crooked, broken lines. Even the demo program in the system specification for the c65 has this problem.
The problem seems to crop up again with the POLYGON statement. The parameters seem out-of-order in real code versus the system specification. When I finally (I think) figured it out, the polygon drawn by POLYGON draws the same kind of crooked broken lines that LINE does.
Strangely, filled polygons drawn with POLYGON seem to fill okay and look correct. It's the unfilled ones that don't work.
To fix these annoying shortcomings I wrote a quick Bresenham's line drawing subroutine and call LINE X,Y to plot points individually. Of course, doing this makes everything work nicely, but it's operating in BASIC, drawing lines via LINE x,y dot-by-dot which is a tad slower than if there was a working LINE x0,y0,x1,y1 statement.
Question: Have I missed something? Line settings via DMODE or DPAT? Or maybe something about the SCREEN etc? Or is this a known bug?
Also, as an unrelated issue, there seem to be some limitation on the size of the screen.
I can get 320x200, 640x200, 320x400, 640x400 resolutions but with differing color depths.
Question: Is this documented somewhere already? That is, what are the permitted color depths versus resolutions allowed?