Re: [cc65] Re: New 80 col switch API

From: Oliver Schmidt <ol.sc1web.de>
Date: 2009-09-07 09:31:45
Hi Jonathan,

> How about videomode(unsigned int mode) ? Then you could pass column
> and rows.

I think from the user's perspective there should be _either_ a number
of defines to be used as parameter _or_ arbitrary numbers.

From my understanding non of the cc65 targets can produce arbitrary
numbers of lines and columns. Having the users provide numbers
directly enforces the impression that many numbers works.

So I don't see good reasons to move away from unsigned char as long as
no target has more than 256 distinct videomodes to select from.

BTW: The C source code you provided is way larger than what I'd like
to come up with here. A replacement for toggle_videomode should still
be a short assembler function.

> #define VIDEOMODE_40COL 0x0028
> #define VIDEOMODE_80COL 0x0050
> #define VIDEOMODE_80by25 0x1550
> #define VIDEOMODE_80by32 0x2050

My proposal is:

#define VIDEOMODE_40COL 0x??
#define VIDEOMODE_80COL 0x??

These two defines should be available for all targets supporting this
type of switching to allow for target independent programming.

#define VIDEOMODE_40x25 0x??
#define VIDEOMODE_80x25 0x??
#define VIDEOMODE_??x?? 0x??

A target can have up to 256 defines of this type. It should have at
least two of them with values identical to VIDEOMODE_40COL and
VIDEOMODE_80COL.

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 Mon, 7 Sep 2009 09:31:45 +0200

This archive was generated by hypermail 2.1.8 : 2009-09-07 09:31:53 CEST