Hello, Guest the thread was called920 times and contains 8 replays

last post from MIRKOSOFT at the

Graphics Capabilities (BASIC 10)

  • Hi,

    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?



  • Hello!
    The problem of Basic 10 is that was not finished.
    I found even more problems when I tried to draw Mandelbrot.
    I have available only commonly known 911001 ROM. On this forum was posted about ROM from november/december 1991. It was not (yet) shared. But it can be also not fixed problem.
    Please - always remember: C65 was never finished.


  • I think it will be hard decision for Paul.
    Basic 10 is even not backward compatible with older.
    Request was also to create backward compatible Basic.
    Work on Mega-Basic began - but don't know if for C64 mode only.
    My choice, if it could be my decision, could be use both.
    Finish original Basic 10 and create also backward compatible Mega-Basic with using all extended M65 functions.
    Yes, many people can say why original...was near never used.
    And other thing is to create 3 modes of operation: M65, C65, C64...

  • We hope that folks will fix the outstanding problems in the C65 ROMs. Whether we do it or not depends on a lot of things -- not just our limited time. But there is nothing stopping someone from already working on this, as there are good enough C65 emulators that can be used for testing and shaking down the bugs.

    The MEGA65 specific BASIC will likely be for "MEGA65 mode", and will allow GO65 and GO64 to select the other modes.


  • @gardners: reading your statement above about the MEGA65 mode Basic came in mind to use some 'magic-byte', so the computer could automatically go into the mode needed by the program (64/65/mega). The place for storing the 'magic byte' is quickly found. It's the load adress stored in basic programmfiles, as we all know CBM-Basic uses different load adresses (basic start) in different versions. Would that be difficult to implement in the kernal? or the load & run routines?

    :: @Freddy Champagne added on 24 Jun ’19 · 20:22

    don't misunderstand me, it's only a proposal, not a request.
    I thought it is a food idea.

  • Load address as ID is bit problem.
    If you want to create backward compatible Basic that can run older programs - if are not machine specific, other Commodore computers have different load address. If it loads Basic program to default location e.g. $0801 and load address is $1000, it will not recognize M65 or C64 mode...
    But it is possible to override.
    If load address does not match, it can run M65 mode as default.
    Because Basic 2 is backward compatible only with lower versions, so only VIC20 uses different address. Later models have higher version.