[cc65] 3dmaze portability

From: Oliver Schmidt <ol.sc1web.de>
Date: 2009-10-16 23:38:37
Hi,

The description of the user contribution program '3dmaze' contains:

"The current code has problems on other platforms, probably related to
the aspect ratio. It is possible to compile it for the C128 or any
other platform that has a TGI driver, but the output looks strange."

Today I analyzed this and found the actual reason: The program draws
lines starting or ending outside the screen presuming the lines get
clipped at the screen edge. This presumption is true for the C64 'std'
driver. However the the C128 vdc seems to not draw those lines at
all... and the Apple2 'std' driver shows undefined behaviour.

I didn't find definitive information on if a tgi driver is supposed to
clip lines. If yes then the C128 (?) and Apple2 drivers don't work
correctly. A change for the Apple2 driver would be difficult as it
currently uses a ROM function that just doesn't support clipping.

Regarding the 3dmaze program the problem can be worked around easily
by reducing the screen output area to a square with the size of the
screen y resolution. This is accomplished by replacing

    unsigned Size = (g.CenterX) / 2;

with

    unsigned Size = (g.CenterY - 1) / 2;

If anybody is interested I can send the modified source. Beside the
change above I leveraged the new "standard driver" feature and added a
small Apple2 workaround (necessary because of the missing clock()
function).

Best, Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Oct 16 23:38:44 2009

This archive was generated by hypermail 2.1.8 : 2009-10-16 23:38:48 CEST