Changes between Initial Version and Version 1 of Develop/FileFormats/MOTO


Ignore:
Timestamp:
19/11/2018 10:29:09 (21 months ago)
Author:
Thomas Bernard
Comment:

create Thomson formats page

Legend:

Unmodified
Added
Removed
Modified
  • Develop/FileFormats/MOTO

    v1 v1  
     1== Thomson MO/TO files formats
     2
     3GrafX2 is able to load/save pictures for the Thomson MO/TO ranges of computer in several formats :
     4* RAW binary files. Two files of 8000 (8008 or 8032 with color palette) per picture : One 'P' file for the "FORME" VRAM, one 'C' file for the color VRAM (READ ONLY)
     5* Autoloading DECB binary files.
     6* MAP files (with optional TO-SNAP extension)
     7
     8As the TO7, TO7/70 and MO5 machines only have a fixed palette, palette data (or TO-SNAP) extension is not saved when targetting theses machines.
     9
     10== MAP files
     11
     12documentation for the MAP files : http://collection.thomson.free.fr/code/articles/prehisto_bulletin/page.php?XI=0&XJ=13
     13
     14MAP files are saved on a Thomson machine using GET/SAVEP and loaded using LOADP/PUT. See link below for loading the palette from the TO-SNAP extension.
     15GrafX2 use an optimized packing algorithm.
     16
     17== GrafX2 autoloading DECB binary files (BIN)
     18GrafX2 use a format that can be natively be loaded on the Thomson machine using the LOADM instruction.
     19
     20The FORME VRAM is selected and loaded, then the COULEUR VRAM is selected and filled.
     21
     22{{{
     23offset| data                    | comment
     24 0000 | 00 00 01 e7 c3 65       | write 0x65 to 0xe7c3 to select FORME
     25 0006 | 00 1f 80 40 00 xx xx xx | write 8064 bytes to 0x4000 (VRAM)
     26 1f8c | 00 00 01 e7 c3 64       | write 0x64 to 0xe7c3 to select COULEUR
     27 1f91 | 00 1f 80 40 00 xx xx xx | write 8064 bytes to 0x4000 (VRAM)
     28 3f16 | ff 00 00 00 00          | end marker
     29}}}
     30
     31Here is a BASIC 128/512 program to load such a file :
     32{{{
     3310 REM CHARGEMENT D'UNE IMAGE GrafX2
     3420 REM (C) THOMAS BERNARD
     3530 LOCATE,,0 'DESACTIVE CURSEUR
     3640 LOADM"POISCTO8"
     3750 REM PALETTE EN VRAM APRES L'IMAGE
     3860 FOR I=0 TO 15
     3970 BGR=PEEK(&H4000+8000+I*2)*256+PEEK(&H4000+8000+I*2+1)
     4080 PALETTE I,BGR
     4190 NEXT I
     42100 IF INKEY$="" GOTO 100
     43110 LOCATE,,1 'ACTIVE CURSEUR
     44120 REM AFFICHAGE DU COMMENTAIRE
     45130 FOR I=0 TO 31
     46140 C=PEEK(&H4000+8032+I)
     47150 IF C>=32 AND C<127 THEN PRINT CHR$(C);
     48160 NEXT I
     49170 PRINT
     50}}}
     51
     52