{{htmlmetatags>metatag-robots=() metatag-title=(MIDRES library) metatag-keywords=(C,library,Midres,Bitmaps,Commodore 64,Commodore VIC20,Commodore 16) metatag-description=(The MIDRES library allows you to quickly create games for many 8-bit platforms.) metatag-media-og:image=(::midres-logo-fb.png) metatag-og:title=(Using portable midres library) metatag-og:description=(The MIDRES library allows you to quickly create games for many 8-bit platforms.) }} ====== MIDRES LIBRARY ====== {{ :midres-logo.png?nolink&600 |}} The MIDRES library allows to create **WORA** (//Write Once Run Anywhere//) programs that are [[midres_library:isomorphism|very efficient "by design"]] on [[https://github.com/spotlessmind1975/midres/blob/master/docs/targets.md|various 8-bit platforms]], without the need for "fine tuning" them and without compromises of other dev-kits. **The isomorphic approach is different from abstraction**. It is based on mapping the underlying hardware without making use of third-party libraries and by matching complex and heterogeneous structures, albeit homologous, to each other. When the (client) code written with this approach is satisfactory (in terms of execution speed or use of resources), then **it is already optimized for any other platform**. ===== HOW TO USE THE LIBRARY ===== To add support for the midres library, simply include the "midres.h" file in the necessary sources. This file contains all the definitions and data types required for [[:midres|manipulating the screens]], [[:tiling|doing animations]] and so on. #include "midres.h" [[midres_library:functions|This page]] contains the a short function reference (it's a work in progress). For some activities, you can use some tools "out of the box": * ''[[:img2midres|img2midres]]'' - to convert images into midres screens. * ''[[:img2tile|img2tile]]'' - to convert images into programmable tiles. ===== HOW TO BUILD ===== [[https://github.com/spotlessmind1975/midres|Official repository]] contains a [[https://github.com/spotlessmind1975/midres/blob/master/makefile|generic makefile]] built through an automatic procedure written in PHP (''automake.php''). It is possible to rebuild the makefile at any time by typing the command: php automake.php The ''makefile'' has been designed to be able to compile a specific ''demo'', ''tutorial'' or ''program'' for a specific platform. The current list of programs is available [[https://github.com/spotlessmind1975/midres/blob/master/docs/programs.md|on this page]]. To compile the ''demo'' "TILE" for Commodore 64, the command is make demo=TILE target=c64 all To compile the ''tutorial'' "CTILE" for Atari, the command is make demo=CTILE target=atari all To compile the ''program'' "Air Attack!" for Commodore 128, the command is make program=airattack target=c128 all ===== GAMES ===== [[elevator|{{ :elevator_800x300.jpg?600 |The Elevator game }}]] [[alienstorm|{{ :alienstorm_copertina_800x300.png?600 |Alien Storm game}}]] [[totto|{{ :totto_title2.jpg?600 |Totto! game}}]] [[air_attack|{{ :air_attack_title_horizontal_winner2b.png?600 |Air Attack! game}}]] ===== DEMOS ===== [[:midres_library:demos|This page]] contains the list of demonstration programs, which can be compiled using the ''makefile'' from the library source.