Welcome Guest, you are in: Login

Fruit Of The Shed

Navigation (Colour MaxiMite 2 (CMM2))






Search the wiki

»


Page History: Converting older MMBASIC programs

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2020/07/30 13:20


====Tips on converting code from older versions of MMBASIC, e.g. the version for the original Colour Maximite, to the CMM2's current version.

=

=Language References
The current CMM2 MMBASIC manual is at ???
Some of the older versions to convert from:
???

=

=Different variable names by type
Many old programs re-use variables with different types. e.g. A and A$. Modern versions of MMBasic (V5 onwards) don't allow this so that is the first thing to fix. e.g they could be A and AStr$ instead.

=

=OPTION LEGACY, and PIXEL, LINE, BOX and CIRCLE
You can use OPTION LEGACY ON at the start of a program to continue using the old syntax for the graphics commands: PIXEL, LINE, BOX and CIRCLE.
or you can change the code for the new syntax.


=

=MODE
The MODE command has different syntax, and different modes.

Old syntax is MODE mode (and optional argument, palette)
New syntax is MODE resolution, bits (and 2 more optional arguments). Setting bits as 8 is the minimum, and plenty more than the old modes.

The old Colour Maximite, modes 1,2,3 have resolution 480 x 432 pixels, which you can match with mode resolution 4 in the Colour Maximite 2.
The old Colour Maximite, mode 4 has resolution 240 x 216 pixels, which you can match with mode resolution 5 in the Colour Maximite 2.

But a different mode may work better in some cases, as the new mode resolution 1 (800x600), 2 (640x400) and 3 (320x200) align properly with the the expected pixel locations of modern LCD displays.
The other modes may appear to have uneven pixel sizes.