cleanup: doc moved to doc folder
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@22 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									96f9a9f3dc
								
							
						
					
					
						commit
						816230058e
					
				
							
								
								
									
										1983
									
								
								doc/doc_eng.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1983
									
								
								doc/doc_eng.txt
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										2113
									
								
								doc/doc_fra.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2113
									
								
								doc/doc_fra.txt
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										273
									
								
								doc/history.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										273
									
								
								doc/history.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,273 @@
 | 
			
		||||
HISTORY of GRAFX: (in chronological order: latest version at the end)
 | 
			
		||||
 | 
			
		||||
* GRAFX 1.0á -> 1.02 (09/??/1995 -> 07/??/1996)
 | 
			
		||||
        Forget it!
 | 
			
		||||
 | 
			
		||||
* GRAFX 2.00 Beta 90% (11/01/1996) - Wired'96 release
 | 
			
		||||
        This version was 1st shown at the Wired'96 demo party in Belgium.
 | 
			
		||||
        We gave it to many people there, so let's start history from here.
 | 
			
		||||
        Note that there were a few different "90%" versions because we didn't
 | 
			
		||||
        want to change the number just for tiny bug-fixes.
 | 
			
		||||
 | 
			
		||||
* GRAFX 2.00 Beta 91% (11/20/1996)
 | 
			
		||||
        - Fixed: Terrific bug in Help/Messages (one line was too long and
 | 
			
		||||
        crashed the program!).
 | 
			
		||||
        - Added: Some new parameters for the settings.
 | 
			
		||||
        - Added: Now, you can automatically set the best resolution for the
 | 
			
		||||
        picture loaded and/or slightly adapt the picture to keep the colors of
 | 
			
		||||
        the menu (for those who want to use GrafX2 as a viewer).
 | 
			
		||||
        - Fixed: Bug that occured when you wanted to restore your previous
 | 
			
		||||
        brush while being in "grab brush" mode.
 | 
			
		||||
        - Added: English user's manual written (will be updated later, and
 | 
			
		||||
        translated into French).
 | 
			
		||||
        - Fixed: No more displays pixels out of the preview window when
 | 
			
		||||
        loading corrupt pictures.
 | 
			
		||||
        - Fixed: Small bug in LBM loading (for non-standard widths).
 | 
			
		||||
        - Fixed: Minor error when saving the original screen dimensions in PKM
 | 
			
		||||
        files. (we didn't save words with Intel conventions)
 | 
			
		||||
        - Fixed: Exactly the same bug for LBM (but with Motorola conventions)
 | 
			
		||||
        - Removed: No more saving the current palette when exiting the program
 | 
			
		||||
        (that was useless and boring when pictures had a weird palette).
 | 
			
		||||
 | 
			
		||||
* GRAFX 2.00 Beta 92% (11/27/1996)
 | 
			
		||||
        - Fixed/Removed: Error message occuring when accessing a drive with no
 | 
			
		||||
        disk or so finally suppressed!
 | 
			
		||||
        - Fixed: BMP loading was almost completely bugged and it should now be
 | 
			
		||||
        completely debugged.
 | 
			
		||||
        - Fixed/Modified: Set_palette routine (the previous one was fast but
 | 
			
		||||
        did not work with some weird cards that don't support a REP OUTSB).
 | 
			
		||||
        - Added: Multi-Undo.
 | 
			
		||||
        - Added: Backup (*.BAK) files.
 | 
			
		||||
 | 
			
		||||
* GRAFX 2.00 Beta 93% (12/12/1996)
 | 
			
		||||
        - Fixed: Bug that occured when approaching the borders of the screen
 | 
			
		||||
        in grid mode with the type of cursor used for brush grabbing.
 | 
			
		||||
        - Fixed: Small but annoying bug when saving files with a name of 9
 | 
			
		||||
        characters.
 | 
			
		||||
        - Fixed: Saved PAL files no longer modify the picture's name (some
 | 
			
		||||
        mistake must have been done when we implemented the backup option).
 | 
			
		||||
        - Added: Now, you can stop the loading of previews by pressing a key.
 | 
			
		||||
        - Improved: Video cards that don't use the same VESA bank for reading
 | 
			
		||||
        and writing should now work correctly.
 | 
			
		||||
        - Improved: Frame displayed around the magnifier's preview.
 | 
			
		||||
        - Improved: Menu of resolutions completely modified, and many new
 | 
			
		||||
        modes added.
 | 
			
		||||
        - Modified: The default colors of the menu have been slightly
 | 
			
		||||
        lightened.
 | 
			
		||||
        - Improved: The whole configuration is now saved and reloaded in the
 | 
			
		||||
        settings menu.
 | 
			
		||||
 | 
			
		||||
* GRAFX 2.00 Beta 94.0|1|2% (02/13-23/1997) - ACE CD #4 & Volcanic3 releases
 | 
			
		||||
        (These different versions were too close from each other to be
 | 
			
		||||
        separated in this file. Just check the last modifications to know
 | 
			
		||||
        which version you have)
 | 
			
		||||
        - Added/Improved: (approximative) HAM6 and HAM8 support in IFF(LBM)
 | 
			
		||||
        files, and improved compatibily with Amiga IFF files => should be
 | 
			
		||||
        total now.
 | 
			
		||||
        - Added: The absolutely useless :) CEL and KCF (KISS) file formats.
 | 
			
		||||
        - Added: The not much more useful SCx (ColoRIX) file format.
 | 
			
		||||
        - Improved: You can now use the keys to scroll the text in the Help.
 | 
			
		||||
        - Fixed: Small bug in the scrolling list of resolutions (1 extra line
 | 
			
		||||
        was displayed at the end of the list when current mode was 640x512).
 | 
			
		||||
        - Added: English user's manual translated into French (and corrected..
 | 
			
		||||
        There can be bugs in text files :)).
 | 
			
		||||
        - Improved: Now, you can use the brush as an eraser by right clicking.
 | 
			
		||||
        - Added: X-Invert in the palette editor.
 | 
			
		||||
        - Fixed: Small bug in the reduce-palette function.
 | 
			
		||||
        - Improved: GIF saving strongly accelerated (finally!).
 | 
			
		||||
        - Improved: Shade mode completely modified (customized shades added).
 | 
			
		||||
        - Fixed: Tiny bug in the block definition of the palette editor.
 | 
			
		||||
        - Improved: Non-standard PCX files that don't reset the compression
 | 
			
		||||
        after each line should be supported now (at least for 256-color
 | 
			
		||||
        pictures).
 | 
			
		||||
        - Added: Undo in the Shade menu.
 | 
			
		||||
        - Added: Statistics screen.
 | 
			
		||||
 | 
			
		||||
* GRAFX 2.00 Beta 94.666% (03/20/1997)
 | 
			
		||||
        - Fixed: Statistics screen no longer displays that VESA 1.2 is not
 | 
			
		||||
        supported.
 | 
			
		||||
        - Fixed: A few bugs of no consequence.
 | 
			
		||||
        - Fixed: Bug in the mode-X initialization introduced in the previous
 | 
			
		||||
        version.
 | 
			
		||||
        - Added: It is possible to choose between Relative and Absolute
 | 
			
		||||
        coordinates in the settings menu.
 | 
			
		||||
        - Improved: The colors of the menu are now calculated from the current
 | 
			
		||||
        palette, so you won't have to be concerned by the colors of the menu
 | 
			
		||||
        any more.
 | 
			
		||||
        - Fixed: The VESA modes are no longer disabled for some video cards.
 | 
			
		||||
        - Imporoved: "Windows 95" keys are now usable.
 | 
			
		||||
        - Modified: We now use the EOS dos-extender Copyright (c) 1996 by
 | 
			
		||||
        Eclipse, so read carefully the docs if you can't use GrafX2 anymore.
 | 
			
		||||
 | 
			
		||||
* GRAFX 2.00 Beta 95% (07/18/1997) - Wired'97 release
 | 
			
		||||
        (It's GrafX2 creation's 1st anniversary! =D     (...but still Beta :/)
 | 
			
		||||
        We wrote the usual "void main(int argc, char * argv[])" one year ago!)
 | 
			
		||||
        - Fixed: PCX files with odd widths should be supported now. (We fixed
 | 
			
		||||
        a bug in version 94.1% which added a new one) :(
 | 
			
		||||
        - Fixed: Small display bug in the grid of the Sieve menu.
 | 
			
		||||
        - Fixed: Oops! We forgot to remap the colors of the menu when loading
 | 
			
		||||
        a PAL file. That's stupid! :)
 | 
			
		||||
        - Improved: The number of predefined paintbrushes has been doubled.
 | 
			
		||||
        - Added: Outline and Nibble effects for brushes.
 | 
			
		||||
        - Improved: The "Brush grabbing", "Zoom" and "Pipette" options are no
 | 
			
		||||
        more stopped by hiding/showing the tool-bar.
 | 
			
		||||
        - Improved: Now, you can change the current color while drawing.
 | 
			
		||||
        - Improved: The "auto-set resolution" option works better.
 | 
			
		||||
        - Added: The 3 color components are displayed in the toolbar when you
 | 
			
		||||
        want to choose a color.
 | 
			
		||||
        - Added: A small preview of the color selected by the pipette is
 | 
			
		||||
        displayed in the tool-bar.
 | 
			
		||||
        - Fixed: GIF saving (the bug didn't corrupt the file but resulted in a
 | 
			
		||||
        file that wasn't as well compressed as it should have been).
 | 
			
		||||
        - Fixed: GIF loading doesn't flash any more on some pictures that were
 | 
			
		||||
        not corrupt; and LBM neither when loading is interrupted by user.
 | 
			
		||||
        - Added: Menu where you can choose what you want to copy to the spare
 | 
			
		||||
        page (pixels, palette, or both...).
 | 
			
		||||
        - Modified: The size of the palette editor has been very slightly
 | 
			
		||||
        reduced.
 | 
			
		||||
        - Modified: The Stencil is now taken into account when using the
 | 
			
		||||
        "Clear" button.
 | 
			
		||||
        - Improved: The "magnify" mode is finally displayed with a splitted
 | 
			
		||||
        screen where you can see both zoomed and unzoomed parts of the picture.
 | 
			
		||||
        - Added: Now, you can load a picture from the command line (type
 | 
			
		||||
        "gfx2 /?" for the syntax).
 | 
			
		||||
        - Added: The preview of a PAL file is now displayed in file-selectors.
 | 
			
		||||
        - Modified: The tool-bar has been reduced vertically by about 1/3.
 | 
			
		||||
        - Fixed: Bug in the Grid menu. (The user was able to enter a null grid
 | 
			
		||||
        step. Doh!)
 | 
			
		||||
        - Added: "Adjust brush pick" option.
 | 
			
		||||
        - Fixed: DP2e (LBM-"PBM") files (including new BBM files) with odd
 | 
			
		||||
        width are now loaded correctly.
 | 
			
		||||
        - Improved: LBM files are now saved with their exact width and not
 | 
			
		||||
        with a multiple-of-16 witdh (viewers that can't read these files are
 | 
			
		||||
        "badly coded" because we save them correctly).
 | 
			
		||||
        - Improved: The selector bar is now placed on last visited directory
 | 
			
		||||
        when you change directory.
 | 
			
		||||
        - Added: "Mask" drawing mode.
 | 
			
		||||
        - Added: "Smear" drawing mode.
 | 
			
		||||
        - Improved: "Shade" mode options (normal, loop, saturation).
 | 
			
		||||
        - Added: You can define if you want Feedback (or not) while drawing
 | 
			
		||||
        in the drawing modes (effects).
 | 
			
		||||
        - Improved: The amount of memory used for brushes has been reduced.
 | 
			
		||||
        - Improved: Scrolling lists speed slightly accelerated.
 | 
			
		||||
        - Improved: FloodFill slightly accelerated.
 | 
			
		||||
 | 
			
		||||
* GRAFX 2.00 Beta 95.5% (09/04/1997)
 | 
			
		||||
        - Improved: SCx files with less than 256 colors are now supported.
 | 
			
		||||
        - Fixed: Bug when double-clicking on the Floodfill button.
 | 
			
		||||
        - Fixed: Bug when "flood-filling" with an effect with feedback.
 | 
			
		||||
        - Fixed: Bug when filling a vertical-1-pixel-wide area.
 | 
			
		||||
        - Fixed: Bug of the shape of the cursor when a window is open in
 | 
			
		||||
        magnify mode.
 | 
			
		||||
        - Added: Special cursor shape for the pipette.
 | 
			
		||||
        - Modified: The method to recenter the page when exiting magnifier
 | 
			
		||||
        mode (the picture recovers its position as it was before zooming).
 | 
			
		||||
        - Added: Linear Frame Buffer (VESA 2.0 LFB) supported.
 | 
			
		||||
        - Added: You can now load and save brushes (from the Brush FX menu).
 | 
			
		||||
        - Fixed: A few video modes (Modes X with a height multiple of 270).
 | 
			
		||||
        - Fixed: You couldn't save the configuration in the settings menu if
 | 
			
		||||
        the Auto-save option was off.
 | 
			
		||||
        - Improved: Polyform has now reached its definitive behaviour.
 | 
			
		||||
        - Added: Polyfill and filled polyform.
 | 
			
		||||
        - Added: Lasso (polyformed brushes).
 | 
			
		||||
        - Added: Concentric lines.
 | 
			
		||||
        - Added: GFX2.INI file (check its contents for new options).
 | 
			
		||||
        - Improved: GFX2.CFG file will have ascending compatibility with
 | 
			
		||||
        future versions from now.
 | 
			
		||||
        - Added: Some drawing tips have been detailed in the documentation
 | 
			
		||||
        files.
 | 
			
		||||
        - Improved: Pipette handling.
 | 
			
		||||
 | 
			
		||||
* GRAFX 2.00 Beta 96% (11/03/1997) - Saturne (aborted) party 5 release
 | 
			
		||||
        - Added: Now, you can increase or decrease the size of the paintbrush.
 | 
			
		||||
        The default keys are [,<] and [.>] ([;.] and [:/] for azerty).
 | 
			
		||||
        - Added: Typing the first letters of a filename in file-selectors will
 | 
			
		||||
        place the selection bar onto it.
 | 
			
		||||
        - Fixed: Small but annoying bugs in the writing of the GFX2.CFG file
 | 
			
		||||
        in GFXCFG. The data concerning Shade and Stencil modes were destroyed.
 | 
			
		||||
        - Added/Improved: It is now possible to define the matrix of the
 | 
			
		||||
        Smooth mode. We also seized the opportunity to improve the Smooth on
 | 
			
		||||
        the boundaries of the picture, and to improve the function that
 | 
			
		||||
        calculates nearest colors.
 | 
			
		||||
        - Added: The "Replace color" option that replaces all the pixels of
 | 
			
		||||
        the color pointed by the mouse with the paintbrush color. This tool is
 | 
			
		||||
        accessible by right clicking on the Floodfill button.
 | 
			
		||||
        - Improved: FloodFill slightly accelerated (especially with small
 | 
			
		||||
        surfaces).
 | 
			
		||||
        - Fixed: The picture was automatically zoomed when choosing a zoom
 | 
			
		||||
        factor in the menu if the Fast_zoom option was set.
 | 
			
		||||
        - Added: "Stretch brush".
 | 
			
		||||
        - Added: Now, you can move windows (menus) and even hide the palette
 | 
			
		||||
        menu for picking a color that is behind it (with the key just below
 | 
			
		||||
        <Escape>).
 | 
			
		||||
        - Fixed: Small bug in "Menu_ratio=2" mode when remapping the screen
 | 
			
		||||
        after color changes.
 | 
			
		||||
        - Added: "Thin" cursor type (looks like VGApaint's one).
 | 
			
		||||
        - Fixed: A few video modes (Modes X with a height multiple of 224 and
 | 
			
		||||
        some others).
 | 
			
		||||
        - Added: It is now possible to select the colors that can be used for
 | 
			
		||||
        the smooth and transparency modes, and remapping.
 | 
			
		||||
        - Fixed: Clicking twice on the Lasso button did not restore the paint-
 | 
			
		||||
        brush correctly.
 | 
			
		||||
        - Fixed: the absolute coordinates option wasn't correctly saved in
 | 
			
		||||
        the .INI file.
 | 
			
		||||
        - Added: A few new parameters can be defined in the .INI file.
 | 
			
		||||
        - Added: "Copy palette to spare page and remap destination" option
 | 
			
		||||
        (accessible from the "Copy to spare page" menu (default: Shift+Tab)).
 | 
			
		||||
 | 
			
		||||
* GRAFX 2.00 Beta 96.1% (02/28/1998) - Volcanic Party 4 release
 | 
			
		||||
        - Fixed: File selector gauges don't bug any more when there are more
 | 
			
		||||
        than 584 entries :) in the current directory.
 | 
			
		||||
        - Fixed: The file selector _should_ hang no more on non-image (or
 | 
			
		||||
        corrupt image) files containing data that look like a known format
 | 
			
		||||
        signature.
 | 
			
		||||
        - Fixed: Old and horrible :) video bug. Most of the VESA video cards
 | 
			
		||||
        that displayed unexpected pixels (when moving the mouse for instance)
 | 
			
		||||
        should work better (perfectly?) now.
 | 
			
		||||
        - Fixed: The mouse correction factors didn't work properly.
 | 
			
		||||
        - Added: Quick-shade mode.
 | 
			
		||||
        - Improved: You can hide any menu that needs a color selection to pick
 | 
			
		||||
        up a color behind the window.
 | 
			
		||||
        - Added: A couple of new parameters in the GFX2.INI file.
 | 
			
		||||
 | 
			
		||||
* GRAFX 2.00 Alpha 96.3% (04/11/1998) - Lucky n' Tigrou Party 2 release
 | 
			
		||||
        !!! Warning: possibly unstable version !!!
 | 
			
		||||
        - Improved: You can edit pictures bigger than 1024x768, and small
 | 
			
		||||
        pictures take much less memory, allowing to have many more undo pages!
 | 
			
		||||
        - Improved: The list of undo pages is preserved when you load a
 | 
			
		||||
        picture, modify its size, or just go to the spare page.
 | 
			
		||||
        - Added: You can "kill" a page (i.e. removing it from the list of undo
 | 
			
		||||
        pages).
 | 
			
		||||
        - Modified: The Settings menu has been reorganized.
 | 
			
		||||
        - Improved: The drawing mode is no more set to "discontinuous" by
 | 
			
		||||
        default.
 | 
			
		||||
        - Improved: The function to compute the best matching RGB color used
 | 
			
		||||
        in smooth, colorize, and some other operations has been strongly
 | 
			
		||||
        accelerated on 486 and Cyrix processors, while it should be about the
 | 
			
		||||
        same speed or very slightly slower on Intel Pentiums (II) than before.
 | 
			
		||||
        - Fixed: The program finally works under Windows NT (without dos4gw)!
 | 
			
		||||
 | 
			
		||||
* GRAFX 2.00 Beta 96.5% (12/23/1999) - Xmas'99 release
 | 
			
		||||
        - Fixed: This version seems (is!) stable even with huge pictures. :)
 | 
			
		||||
        - Fixed: A few options on brushes kept modifying the continuity of the
 | 
			
		||||
        free-hand drawing mode.
 | 
			
		||||
        - Fixed: The "nibble brush" operation crashed sometimes.
 | 
			
		||||
        - Fixed: Remapping the screen after modifying colors in the palette
 | 
			
		||||
        editor displayed, in rare cases, unexpected pixels or even crashed.
 | 
			
		||||
        It didn't remap correctly the picture in "Magnify" mode, too.
 | 
			
		||||
        - Fixed: Catastrophic bug occuring when you "flood-filled" an area
 | 
			
		||||
        starting at the bottom of the picture.
 | 
			
		||||
        - Added: An option in GFX2.INI to tell if the number of colors used
 | 
			
		||||
        must be automatically calculated, and another one for the default
 | 
			
		||||
        video mode at startup.
 | 
			
		||||
        - Fixed: The colors of the menu are now correctly remapped when
 | 
			
		||||
        getting colors from the brush.
 | 
			
		||||
        - Added: Degas Elite's file formats (PI1,PC1,...) support.
 | 
			
		||||
        - Added: True-color BMP (Windows) and PCX images can be loaded. They
 | 
			
		||||
        will be converted to a 256-color image with palette optimization and
 | 
			
		||||
        Floyd/Steinberg dithering. Note: some other true-color formats will be
 | 
			
		||||
        added in the next release.
 | 
			
		||||
        - Fixed: Loading corrupt pictures with null dimensions could crash.
 | 
			
		||||
        - Improved: Brush streching is now in "real time" (and snaps to the
 | 
			
		||||
        grid if "Adjust brush picking" is set).
 | 
			
		||||
        - Added: Brush rotation by any angle.
 | 
			
		||||
							
								
								
									
										145
									
								
								doc/readme!.1st
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										145
									
								
								doc/readme!.1st
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,145 @@
 | 
			
		||||
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 | 
			
		||||
³!!!!!!! PLEASE READ THIS FILE !!!!!!!³!!!!!! VEUILLEZ LIRE CE FICHIER !!!!!!³
 | 
			
		||||
³!! ENTIRELY BEFORE RUNNING GRAFX2 !!!³! ENTIEREMENT AVANT DE LANCER GRAFX2 !³
 | 
			
		||||
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
 | 
			
		||||
                                      ³
 | 
			
		||||
                                      ³
 | 
			
		||||
  If you are reading this file right  ³   Si vous lisez ce fichier maintenant,
 | 
			
		||||
now, I'm sure that it is for one out  ³ Je suis s–r que c'est pour l'une de
 | 
			
		||||
of these four reasons:                ³ ces quatre raisons:
 | 
			
		||||
                                      ³
 | 
			
		||||
  1) You are THE ONE who first reads  ³ 1) Vous ˆtes CELUI qui lit les
 | 
			
		||||
     README.1ST files before running  ³    fichiers README.1ST avant de lancer
 | 
			
		||||
     new programs.                    ³    de nouveaux programmes.
 | 
			
		||||
                                      ³
 | 
			
		||||
  2) Today is a rainy day and you've  ³ 2) Il pleut aujourd'hui et vous avez
 | 
			
		||||
     already finished all the games   ³    d‚j… termin‚ tous les jeux que vous
 | 
			
		||||
     you've... "purchased". So you    ³    avez... "achet‚s". Donc vous n'avez
 | 
			
		||||
     have nothing else to do that     ³    rien d'autre … faire que de lire ce
 | 
			
		||||
     reading this damn file.          ³    fichu fichier.
 | 
			
		||||
                                      ³
 | 
			
		||||
  3) You had the quite good reflex    ³ 3) Vous avez eu l'assez bon r‚flŠxe
 | 
			
		||||
     (for someone who did not read    ³    (pour quelqu'un qui n'a pas lu ce
 | 
			
		||||
     this file) to switch off your PC ³    fichier) d'‚teindre votre PC avant
 | 
			
		||||
     before your monitor burns, and   ³    que votre moniteur grille, et
 | 
			
		||||
     now you wonder why.              ³    maintenant vous cherchez pourquoi.
 | 
			
		||||
                                      ³
 | 
			
		||||
  4) You have burnt your monitor      ³ 4) Vous avez bouzill‚ votre moniteur
 | 
			
		||||
     because you didn't read this     ³    parce que vous n'avez pas lu ce
 | 
			
		||||
     file first. And you now have all ³    fichier en premier. Et maintenant
 | 
			
		||||
     the time to read it on your      ³    vous avez tout le temps de le lire
 | 
			
		||||
     neighbour's computer before you  ³    sur l'ordinateur de votre voisin en
 | 
			
		||||
     can buy another monitor.         ³    attendant de pouvoir vous acheter
 | 
			
		||||
                                      ³    un nouvel ‚cran.
 | 
			
		||||
                                      ³
 | 
			
		||||
                                      ³
 | 
			
		||||
úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄú
 | 
			
		||||
                                      ³
 | 
			
		||||
                                      ³
 | 
			
		||||
  So here is what you must know about ³   Donc voici ce que vous devez savoir
 | 
			
		||||
GrafX2 before running it:             ³ … propos de GrafX2 avant de le lancer:
 | 
			
		||||
                                      ³
 | 
			
		||||
                                      ³
 | 
			
		||||
  Video problems:                     ³   ProblŠmes vid‚o:
 | 
			
		||||
  ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ                     ³   ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
 | 
			
		||||
                                      ³
 | 
			
		||||
  - This program provides a huge      ³   - Ce programme propose un trŠs grand
 | 
			
		||||
  range of video resolutions. All     ³   nombre de modes vid‚o. Toutes ces
 | 
			
		||||
  these resolutions may not work with ³   r‚solutions peuvent ne pas marcher
 | 
			
		||||
  your monitor or video card. This    ³   avec votre moniteur ou carte vid‚o.
 | 
			
		||||
  should result by your monitor to    ³   Ceci peut r‚sulter par un sifflement
 | 
			
		||||
  whistle and stay black or display   ³   de votre moniteur ou bien plus g‚n‚-
 | 
			
		||||
  shit.                               ³   ralement qu'il affiche n'importe
 | 
			
		||||
    So we added a keyboard shortcut   ³   quoi ou qu'il reste tout noir.
 | 
			
		||||
  for you to come back to a normal    ³     Par cons‚quent, nous avons ajout‚
 | 
			
		||||
  resolution (MCGA 320x200). The      ³   un raccourci clavier pour que vous
 | 
			
		||||
  default keys for this shortcut are  ³   puissiez revenir … un r‚solution
 | 
			
		||||
  [Shift]+[Return]. But, since you    ³   normale (MCGA 320x200). La combinai-
 | 
			
		||||
  can configure all the keys with     ³   son de touches par d‚faut est
 | 
			
		||||
  GFXCFG, you should check its actual ³   [Shift]+[Return]. Mais, puisque vous
 | 
			
		||||
  value by running this setup program.³   pouvez configurer toutes les touches
 | 
			
		||||
                                      ³   avec GFXCFG, vous devriez v‚rifier
 | 
			
		||||
    Note that we take no responsa-    ³   la combinaison exacte en lan‡ant ce
 | 
			
		||||
  bility for any problems you could   ³   programme.
 | 
			
		||||
  encounter with GrafX2.              ³
 | 
			
		||||
                                      ³     Notez que ne sommes aucunement
 | 
			
		||||
  Important:                          ³   responsables d'‚ventuels problŠmes
 | 
			
		||||
    If the standard VESA modes (i.e.  ³   que vous pourriez rencontrer avec
 | 
			
		||||
  640x400,640x480,800x600 & 1024x768) ³   GrafX2.
 | 
			
		||||
  don't work, please type this line   ³
 | 
			
		||||
  from the DOS command line:          ³   Important:
 | 
			
		||||
  TESTVESA > VESA.TXT                 ³     Si les modes VESA standards (i.e.
 | 
			
		||||
  and send us the file thus created   ³   640x400,640x480,800x600 & 1024x768)
 | 
			
		||||
  telling us the name of your video   ³   ne fonctionnent pas, veuillez taper
 | 
			
		||||
  card. It would be even better if you³   ceci sur la ligne de commande DOS:
 | 
			
		||||
  sent a version of this file with no ³   TESTVESA > VESA.TXT
 | 
			
		||||
  VESA driver in memory and another   ³   et nous envoyer le fichier ainsi
 | 
			
		||||
  one with a resident driver (such as ³   cr‚‚ en nous donnant le nom de votre
 | 
			
		||||
  UNIVBE (c)Scitech Software).        ³   carte vid‚o. Ce serait encore mieux
 | 
			
		||||
                                      ³   si vous nous envoyiez une version de
 | 
			
		||||
                                      ³   ce fichier avec aucun gestionnaire
 | 
			
		||||
                                      ³   VESA en m‚moire et une autre avec un
 | 
			
		||||
                                      ³   driver r‚sident (tel que UNIVBE
 | 
			
		||||
                                      ³   (c)Scitech Software).
 | 
			
		||||
                                      ³
 | 
			
		||||
                                      ³
 | 
			
		||||
  Problems with the keys?             ³   ProblŠmes avec les touches?
 | 
			
		||||
  ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ             ³   ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
 | 
			
		||||
                                      ³
 | 
			
		||||
  - The button in the bottom-left     ³   - Le bouton dans le coin bas-gauche
 | 
			
		||||
  corner of the tool-bar (the one     ³   de la barre d'outils (celui avec une
 | 
			
		||||
  with a cross) was designed to hide  ³   croix) a ‚t‚ con‡u pour cacher la
 | 
			
		||||
  the tool-bar. But, the danger with  ³   barre d'outils. Mais le danger avec
 | 
			
		||||
  this button is that, if you don't   ³   ce bouton est que si vous ne con-
 | 
			
		||||
  know the key to have it back, you   ³   naissez pas la touche qui permet de
 | 
			
		||||
  will be in trouble :).              ³   la rafficher, vous serez embˆt‚ :).
 | 
			
		||||
    The default key is [F10] but      ³     La touche par d‚faut est [F10]
 | 
			
		||||
  check it in the setup program.      ³   mais v‚rifiez-la avec GFXCFG.
 | 
			
		||||
                                      ³
 | 
			
		||||
  - The default key for exiting the   ³   - La touche par d‚faut pour quitter
 | 
			
		||||
  program is [Q] (for QWERTY          ³   le programme est [Q] (pour claviers
 | 
			
		||||
  keyboards). This can be useful if   ³   QWERTY). Cela peut ˆtre utile si
 | 
			
		||||
  you don't remember how to show the  ³   vous ne vous rappelez pas comment
 | 
			
		||||
  tool-bar.                           ³   remontrer la barre d'outils.
 | 
			
		||||
                                      ³
 | 
			
		||||
  - The key-configuration program     ³   - Le programme de configuration des
 | 
			
		||||
  displays the values for QWERTY      ³   touches affiche ces derniŠres pour
 | 
			
		||||
  keyboards. So if you have an AZERTY ³   les claviers QWERTY. Donc, si vous
 | 
			
		||||
  keyboard for example, and want to   ³   avez un clavier AZERTY par exemple
 | 
			
		||||
  use your true Q key for quitting,   ³   et que vous voulez utiliser votre
 | 
			
		||||
  don't worry if the program displays ³   vraie touche Q pour quitter, ne vous
 | 
			
		||||
  'A'.                                ³   ‚tonnez pas si le programme affiche
 | 
			
		||||
                                      ³   'A'.
 | 
			
		||||
  - Though keys are designed for      ³
 | 
			
		||||
  QWERTY keyboards, "typing areas"    ³   - Bien que les touches soient g‚r‚es
 | 
			
		||||
  will read the key-codes of your     ³   pour claviers QWERTY, les zones de
 | 
			
		||||
  country. For example, when you'll   ³   saisie lisent les touches de votre
 | 
			
		||||
  have to enter a file name, you'll   ³   pays. Par exemple, lorsque vous
 | 
			
		||||
  get what you type (cool! :)).       ³   entrerez un nom de fichier, vous
 | 
			
		||||
                                      ³   obtiendrez ce que vous tapez (cool!)
 | 
			
		||||
  - For people who would like to get  ³   :).
 | 
			
		||||
  directly the AZERTY equivalent of   ³
 | 
			
		||||
  the default configuration file, we  ³   - Pour ceux qui voudraient avoir
 | 
			
		||||
  have added the GFX2_FRA.CFG file.   ³   directement l'‚quivalent AZERTY du
 | 
			
		||||
  Then you'll just have to rename it  ³   fichier de configuration par d‚faut,
 | 
			
		||||
  to GFX2.CFG (great!) ;).            ³   nous avons inclus le fichier
 | 
			
		||||
                                      ³   GFX2_FRA.CFG. Vous n'aurez qu'… le
 | 
			
		||||
                                      ³   renommer en GFX2.CFG (g‚nial!) ;).
 | 
			
		||||
                                      ³
 | 
			
		||||
                                      ³
 | 
			
		||||
úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄú
 | 
			
		||||
                                      ³
 | 
			
		||||
                                      ³
 | 
			
		||||
  OK! Now you can use and abuse of    ³   OK! Maintenant vous pouvez user et
 | 
			
		||||
this program!                         ³ abuser de ce programme!
 | 
			
		||||
                                      ³
 | 
			
		||||
                                      ³
 | 
			
		||||
PS: Pleeeease! If you think something ³ PS: Par piti‚‚‚‚! Si vous pensez que
 | 
			
		||||
    is going wrong, read all the docs ³     quelque chose ne tourne pas rond,
 | 
			
		||||
    before complaining! Maybe that's  ³     lisez toutes les docs avant de
 | 
			
		||||
    merely because you don't know how ³     vous plaindre! Peut-ˆtre que c'est
 | 
			
		||||
    to use it that it doesn't act as  ³     simplement parce que vous ne savez
 | 
			
		||||
    you expect. ;)                    ³     pas comment l'utiliser qu'une
 | 
			
		||||
                                      ³     option n'agit pas comme vous
 | 
			
		||||
                                      |     esp‚rez.
 | 
			
		||||
                                      ú
 | 
			
		||||
							
								
								
									
										60
									
								
								doc/readme.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								doc/readme.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,60 @@
 | 
			
		||||
GrafX2 - The Ultimate 256-color bitmap paint program
 | 
			
		||||
Copyright (C)1996-2001 Sunset Design (G.Dorme & K.Maritaud)
 | 
			
		||||
-------------------------------------
 | 
			
		||||
 | 
			
		||||
Here you can find the source code of GrafX2.
 | 
			
		||||
You can use and modify it as you want (in the
 | 
			
		||||
limits fixed the GNU GPL).
 | 
			
		||||
But you are strongly encouraged to submit new
 | 
			
		||||
versions to the authors (see addresses below)
 | 
			
		||||
if you plan to release them.
 | 
			
		||||
 | 
			
		||||
The GFX2_SRC directory contains the current state
 | 
			
		||||
of our own directory when we were programming GrafX2.
 | 
			
		||||
The source code is mainly in French but you'll find
 | 
			
		||||
more explanations (in both English and French) on
 | 
			
		||||
our web site (see address below).
 | 
			
		||||
 | 
			
		||||
The subdirectory "DAT" contains the source code
 | 
			
		||||
of the program used to generate the GFX2.DAT file.
 | 
			
		||||
 | 
			
		||||
The subdirectory "CFG" contains the source code
 | 
			
		||||
of the GFXCFG program used for redefining keys
 | 
			
		||||
and recreating corrupt configuration files.
 | 
			
		||||
 | 
			
		||||
The current version of GrafX2 must be compiled
 | 
			
		||||
with Watcom C (we used version 10.6).
 | 
			
		||||
The auxiliary programs (GFXCFG, MAKEDAT, etc...)
 | 
			
		||||
must be compiled with Borland Turbo Pascal 7.
 | 
			
		||||
Both Watcom C and Borland Turbo Pascal 7 are now
 | 
			
		||||
FREE to use.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
------- GNU G.P.L. disclaimer -------
 | 
			
		||||
This program is free software; you can redistribute it and/or
 | 
			
		||||
modify it under the terms of the GNU General Public License
 | 
			
		||||
as published by the Free Software Foundation; either version 2
 | 
			
		||||
of the License, or (at your option) any later version.
 | 
			
		||||
 | 
			
		||||
This program is distributed in the hope that it will be useful,
 | 
			
		||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
GNU General Public License for more details.
 | 
			
		||||
 | 
			
		||||
You should have received a copy of the GNU General Public License
 | 
			
		||||
along with this program; if not, write to the Free Software
 | 
			
		||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 | 
			
		||||
-------------------------------------
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
You can contact the authors here:
 | 
			
		||||
 | 
			
		||||
Guillaume DORME
 | 
			
		||||
address: 15, rue de l'Observatoire, 87000 LIMOGES (FRANCE)
 | 
			
		||||
e-mail: dorme@msi.unilim.fr
 | 
			
		||||
 | 
			
		||||
Karl Maritaud
 | 
			
		||||
address: 10, rue de la Brasserie, 87000 LIMOGES (FRANCE)
 | 
			
		||||
e-mail: maritaud@ensil.unilim.fr
 | 
			
		||||
 | 
			
		||||
http://w3.ensil.unilim.fr/~maritaud/sunset
 | 
			
		||||
							
								
								
									
										732
									
								
								doc/tech_eng.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										732
									
								
								doc/tech_eng.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,732 @@
 | 
			
		||||
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 | 
			
		||||
³°±²Û Technical documentation for GrafX 2.00 - Version 1.08 (10/05/1997) Û²±°³
 | 
			
		||||
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
 | 
			
		||||
 | 
			
		||||
This file deals with:
 | 
			
		||||
 | 
			
		||||
  - the PKM picture format
 | 
			
		||||
  - the values to send to the CRTC to access all the amazing video modes
 | 
			
		||||
    available in GrafX 2.00
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 | 
			
		||||
³            °±²Û The PKM picture format - by Karl Maritaud Û²±°             ³
 | 
			
		||||
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    First of all, I'd like to say that I made this file format some years ago
 | 
			
		||||
  when I didn't knew how to load any good format (eg. GIF) and wanted to have
 | 
			
		||||
  my own format.
 | 
			
		||||
    PKM format was designed to be very simple, easy to encode and decode. Its
 | 
			
		||||
  header is very simple (short) and evolutive.
 | 
			
		||||
    The only real default I can find in this format is that you can only save
 | 
			
		||||
  256-color pictures.
 | 
			
		||||
    I know that you will think:
 | 
			
		||||
      "Oh no just another fucking format! I'll never use it! Its compression
 | 
			
		||||
      is too poor and I prefer GIF!".
 | 
			
		||||
    And I'll answer:
 | 
			
		||||
      "Yeah! You're right. But if you dunno how to load GIF and want a simple
 | 
			
		||||
      format with a quite good compression rate (on simple pictures at least),
 | 
			
		||||
      it could be useful."
 | 
			
		||||
 | 
			
		||||
  So, here comes the format documentation...
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The HEADER:
 | 
			
		||||
ÍÍÍÍÍÍÍÍÍÍÍ
 | 
			
		||||
 | 
			
		||||
  The header is the following 780-byte-structure. (Don't worry about the size.
 | 
			
		||||
  That's just because the palette is considered as a part of the header).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  ÚÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 | 
			
		||||
  ³ Pos ³ Field     ³ Type ³ Size ³ Description                              ³
 | 
			
		||||
  ÆÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵
 | 
			
		||||
  ³   0 ³ Signature ³ char ³   3  ³ Constant string "PKM" (with NO size      ³
 | 
			
		||||
  ³     ³           ³      ³      ³ delimitation '\0' or so...)              ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³   3 ³ Version   ³ byte ³   1  ³ For the moment, it can take only the     ³
 | 
			
		||||
  ³     ³           ³      ³      ³ value 0.                                 ³
 | 
			
		||||
  ³     ³           ³      ³      ³ Other packing methods may change this    ³
 | 
			
		||||
  ³     ³           ³      ³      ³ field but there is only one for now...   ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³   4 ³ Pack_byte ³ byte ³   1  ³ Value of the recognition byte for color  ³
 | 
			
		||||
  ³     ³           ³      ³      ³ repetitions that are coded on 1 byte.    ³
 | 
			
		||||
  ³     ³           ³      ³      ³ (See the picture packing section for a   ³
 | 
			
		||||
  ³     ³           ³      ³      ³ better explanation)                      ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³   5 ³ Pack_word ³ byte ³   1  ³ Value of the recognition byte for color  ³
 | 
			
		||||
  ³     ³           ³      ³      ³ repetitions that are coded on 2 bytes.   ³
 | 
			
		||||
  ³     ³           ³      ³      ³ (See the picture packing section...)     ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³   6 ³ Width     ³ word ³   2  ³ Picture width  (in pixels)               ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³   8 ³ Height    ³ word ³   2  ³ Picture height (in pixels)               ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³  10 ³ Palette   ³ byte ³ 768  ³ RGB palette (RGB RGB ... 256 times) with ³
 | 
			
		||||
  ³     ³           ³      ³      ³ values from 0 to 63. I know the standard ³
 | 
			
		||||
  ³     ³           ³      ³      ³ in picture files is 0 to 255 but I find  ³
 | 
			
		||||
  ³     ³           ³      ³      ³ it stupid! It is really easier to send   ³
 | 
			
		||||
  ³     ³           ³      ³      ³ the whole palette in port 3C9h with a    ³
 | 
			
		||||
  ³     ³           ³      ³      ³ REP OUTSB without palette convertion.    ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³ 778 ³ PH_size   ³ word ³   2  ³ Post-header size. This is the number of  ³
 | 
			
		||||
  ³     ³           ³      ³      ³ bytes between the header and the picture ³
 | 
			
		||||
  ³     ³           ³      ³      ³ data. This value can be equal to 0.      ³
 | 
			
		||||
  ÀÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
 | 
			
		||||
 | 
			
		||||
  Data of type "word" are stored with Intel conventions: lower byte first.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The POST-HEADER:
 | 
			
		||||
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
 | 
			
		||||
 | 
			
		||||
  The post-header has a variable size. It was designed to support new features
 | 
			
		||||
for this file format without changing the whole format.
 | 
			
		||||
 | 
			
		||||
  It consists in field identifiers followed by their size and their value.
 | 
			
		||||
  A field identifier is coded with 1 byte and a field size also.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  These field identifiers are:  (this list may be updated...)
 | 
			
		||||
  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
 | 
			
		||||
 | 
			
		||||
    0 : Comment on the picture
 | 
			
		||||
    1 : Original screen dimensions
 | 
			
		||||
    2 : Back color (transparent color)
 | 
			
		||||
 | 
			
		||||
  If you encounter a field that you don't know just jump over it. But if a
 | 
			
		||||
  field tells you to jump to a position that is over the beginning of the
 | 
			
		||||
  picture data, there is an error in the file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  The fields:
 | 
			
		||||
  ÄÄÄÄÄÄÄÄÄÄÄ
 | 
			
		||||
 | 
			
		||||
    * Comment:
 | 
			
		||||
 | 
			
		||||
      With this field, artists will be able to comment their pictures.
 | 
			
		||||
      Note that GrafX 2 has a comment size limit of 32 chars. But you can
 | 
			
		||||
      comment a picture with up to 255 chars if you make your own viewer
 | 
			
		||||
      since GrafX 2 will just ignore extra characters.
 | 
			
		||||
 | 
			
		||||
      Example: [0],[16],[Picture by X-Man]
 | 
			
		||||
      This sequence means:
 | 
			
		||||
        - the field is a comment
 | 
			
		||||
        - the comment takes 16 characters (there is no end-of-string character
 | 
			
		||||
          since you know its size)
 | 
			
		||||
        - the comment is "Picture by X-Man"
 | 
			
		||||
 | 
			
		||||
    * Original screen dimensions:
 | 
			
		||||
 | 
			
		||||
      Since GrafX 2 supplies a huge range of resolutions, it seemed convenient
 | 
			
		||||
      to add a field that indicates what were the original screen dimensions.
 | 
			
		||||
 | 
			
		||||
      Example: [1],[4],[320],[256]
 | 
			
		||||
      This sequence means:
 | 
			
		||||
        - the field is a screen dimensions descriptor
 | 
			
		||||
        - the dimensions are 2 words (so this value must be always equal to 4)
 | 
			
		||||
        - the original screen width was 320 pixels
 | 
			
		||||
        - the original screen height was 256 pixels
 | 
			
		||||
 | 
			
		||||
      Note that words stored in fields are written Intel-like. The 90% BETA
 | 
			
		||||
      version did not respect this norm. I'm really sorry about this. This is
 | 
			
		||||
      not very serious but pictures saved with version 90% and loaded with a
 | 
			
		||||
      latest version (91% and more) won't set the right resolution.
 | 
			
		||||
 | 
			
		||||
    * Back color:
 | 
			
		||||
 | 
			
		||||
      Saving the back color (transparent color) is especially useful when you
 | 
			
		||||
      want to save a brush.
 | 
			
		||||
      The size of this field is 1 byte (index of the color between 0 and 255).
 | 
			
		||||
 | 
			
		||||
      Example: [2],[1],[255]
 | 
			
		||||
      This sequence means:
 | 
			
		||||
        - the field is a screen dimensions descriptor
 | 
			
		||||
        - the value takes 1 byte
 | 
			
		||||
        - the transparent color is 255
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The PICTURE PACKING METHOD:
 | 
			
		||||
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
 | 
			
		||||
 | 
			
		||||
  The PKM compression method is some sort of Run-Length-Compression which is
 | 
			
		||||
very efficient on pictures with long horizontal color repetitions.
 | 
			
		||||
  Actually, the compression is efficient if there are often more than 3 times
 | 
			
		||||
the same color consecutively.
 | 
			
		||||
 | 
			
		||||
  I think that it would be better to give you the algorithm instead of swim-
 | 
			
		||||
ming in incomprehensible explanations.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  BEGIN
 | 
			
		||||
    /*
 | 
			
		||||
      functions:
 | 
			
		||||
        Read_byte(File)       reads and returns 1 byte from File
 | 
			
		||||
        Draw_pixel(X,Y,Color) draws a pixel of a certain Color at pos. (X,Y)
 | 
			
		||||
        File_length(File)     returns the total length in bytes of File
 | 
			
		||||
 | 
			
		||||
      variables:
 | 
			
		||||
        type of Image_size          is dword
 | 
			
		||||
        type of Data_size           is dword
 | 
			
		||||
        type of Packed_data_counter is dword
 | 
			
		||||
        type of Pixels_counter      is dword
 | 
			
		||||
        type of Color               is byte
 | 
			
		||||
        type of Byte_read           is byte
 | 
			
		||||
        type of Word_read           is word
 | 
			
		||||
        type of Counter             is word
 | 
			
		||||
        type of File                is <binary file>
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
    /* At this point you've already read the header and post-header. */
 | 
			
		||||
 | 
			
		||||
    Image_size          <- Header.Width * Header.Height
 | 
			
		||||
    Data_size           <- File_length(File) - (780+Header.PH_size)
 | 
			
		||||
 | 
			
		||||
    Packed_data_counter <- 0
 | 
			
		||||
    Pixels_counter      <- 0
 | 
			
		||||
 | 
			
		||||
    /* Depacking loop: */
 | 
			
		||||
    WHILE ((Pixels_counter<Image_size) AND (Packed_data_counter<Data_size)) DO
 | 
			
		||||
    {
 | 
			
		||||
      Byte_read <- Read_byte(File)
 | 
			
		||||
 | 
			
		||||
      /* If it is not a packet recognizer, it's a raw pixel */
 | 
			
		||||
      IF ((Byte_read<>Header.Pack_byte) AND (Byte_read<>Header.Pack_word))
 | 
			
		||||
      THEN
 | 
			
		||||
      {
 | 
			
		||||
        Draw_pixel(Pixels_counter MOD Header.Width,
 | 
			
		||||
                   Pixels_counter DIV Header.Width,
 | 
			
		||||
                   Byte_read)
 | 
			
		||||
 | 
			
		||||
        Pixels_counter      <- Pixels_counter + 1
 | 
			
		||||
        Packed_data_counter <- Packed_data_counter + 1
 | 
			
		||||
      }
 | 
			
		||||
      ELSE /* Is the number of pixels to repeat coded... */
 | 
			
		||||
      {    /* ... with 1 byte */
 | 
			
		||||
        IF (Byte_read = Header.Pack_byte) THEN
 | 
			
		||||
        {
 | 
			
		||||
          Color     <- Read_byte(File)
 | 
			
		||||
          Byte_read <- Read_byte(File)
 | 
			
		||||
 | 
			
		||||
          FOR Counter FROM 0 TO (Byte_read-1) STEP +1
 | 
			
		||||
            Draw_pixel((Pixels_counter+Counter) MOD Header.Width,
 | 
			
		||||
                       (Pixels_counter+Counter) DIV Header.Width,
 | 
			
		||||
                       Color)
 | 
			
		||||
 | 
			
		||||
          Pixels_counter      <- Pixels_counter + Byte_read
 | 
			
		||||
          Packed_data_counter <- Packed_data_counter + 3
 | 
			
		||||
        }
 | 
			
		||||
        ELSE /* ... with 2 bytes */
 | 
			
		||||
        {
 | 
			
		||||
          Color     <- Read_byte(File)
 | 
			
		||||
          Word_read <- (word value) (Read_byte(File) SHL 8)+Read_byte(File)
 | 
			
		||||
 | 
			
		||||
          FOR Counter FROM 0 TO (Word_read-1) STEP +1
 | 
			
		||||
            Draw_pixel((Pixels_counter+Counter) MOD Header.Width,
 | 
			
		||||
                       (Pixels_counter+Counter) DIV Header.Width,
 | 
			
		||||
                       Color)
 | 
			
		||||
 | 
			
		||||
          Pixels_counter      <- Pixels_counter + Word_read
 | 
			
		||||
          Packed_data_counter <- Packed_data_counter + 4
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  END
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  For example, the following sequence:
 | 
			
		||||
    (we suppose that Pack_byte=01 and Pack_word=02)
 | 
			
		||||
    04 03 01 05 06 03 02 00 01 2C
 | 
			
		||||
  will be decoded as:
 | 
			
		||||
    04 03 05 05 05 05 05 05 03 00 00 00 ... (repeat 0 300 times (012Ch=300))
 | 
			
		||||
 | 
			
		||||
  Repetitions that fit in a word must be written with their higher byte first.
 | 
			
		||||
  I know that it goes against Intel standard but since I read bytes from the
 | 
			
		||||
  file thru a buffer (really faster), I don't care about the order (Sorry :)).
 | 
			
		||||
  But words in the header and post-header must be written and read Intel-like!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  Packing advices:
 | 
			
		||||
  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
 | 
			
		||||
 | 
			
		||||
  * As you can see, there could be a problem when you'd want to pack a raw
 | 
			
		||||
  pixel with a color equal to Pack_byte or Pack_word. These pixels should
 | 
			
		||||
  always be coded as a packet even if there is only one pixel.
 | 
			
		||||
 | 
			
		||||
    Example: (we suppose that Pack_byte=9)
 | 
			
		||||
      9   will be encoded 9,9,1     (The 1st 9 in the encoded...
 | 
			
		||||
      9,9 will be encoded 9,9,2     ... sequence is Pack_byte)
 | 
			
		||||
      etc...
 | 
			
		||||
 | 
			
		||||
  * It seems obvious to find values for Pack_byte and Pack_word that are
 | 
			
		||||
  (almost) never used. So a small routine that finds the 2 less used colors
 | 
			
		||||
  in the image should be called before starting to pack the picture. This can
 | 
			
		||||
  be done almost instantaneously in Assembler.
 | 
			
		||||
 | 
			
		||||
  * When you want to pack a 2-color-sequence, just write these 2 colors one
 | 
			
		||||
  after the other (Color,Color) because it only takes 2 bytes instead of 3 if
 | 
			
		||||
  you had to write a packet (Pack_byte,Color,2).
 | 
			
		||||
 | 
			
		||||
  * If you pack a very simple picture which has a sequence of more than 65535
 | 
			
		||||
  same consecutive bytes, you must break the sequence and continue with a new
 | 
			
		||||
  packet.
 | 
			
		||||
 | 
			
		||||
    Example: you have to pack 65635 same consecutive bytes (eg. color 0)
 | 
			
		||||
      (we suppose that Pack_byte=01 and Pack_word=02)
 | 
			
		||||
      You'll write: 02 00 FF FF 01 00 64        (FFFFh=65535, 64h=100)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 | 
			
		||||
³                  °±²Û Setting GrafX 2.00 video modes Û²±°                  ³
 | 
			
		||||
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    All set-mode procs are in 386 ASM. Anyway, if you can't understand any
 | 
			
		||||
  line of ASM, I really can't see the use you'll have of these procedures.
 | 
			
		||||
 | 
			
		||||
    They are designed to be used in FLAT memory model. Anyway, it wouldn't
 | 
			
		||||
  take too much time for you to adapt them to the model you use since only
 | 
			
		||||
  memory indexations can be affected by this (so use DS:SI instead of ESI,
 | 
			
		||||
  ES:DI instead of EDI, and beware to the address 0A0000h that will become
 | 
			
		||||
  0A000h:0000h).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
MCGA: (Standard VGA mode)
 | 
			
		||||
ÍÍÍÍÍ
 | 
			
		||||
 | 
			
		||||
    Is there anybody in this world who still don't now how to set the MCGA
 | 
			
		||||
  320x200 256 colors mode ??!?
 | 
			
		||||
    Well... I hope you are a novice if you read the 2 following lines :)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    mov  ax,0013h
 | 
			
		||||
    int  10h
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
X-Modes: (Extended VGA modes)
 | 
			
		||||
ÍÍÍÍÍÍÍÍ
 | 
			
		||||
 | 
			
		||||
    Well... I think the original Mode X was 320x240 but now, many people call
 | 
			
		||||
  "X-Modes" (or Modes X, or Tweaked modes) all the VGA modes that use more
 | 
			
		||||
  that 64Kb of video memory with the "Unchained" structure.
 | 
			
		||||
    Setting a pixel in any X-Mode can be done by one same function (but I
 | 
			
		||||
  won't explain to you how to do that. You just have to tell the function what
 | 
			
		||||
  the plane width (screen_width/4) is).
 | 
			
		||||
    If you can't understand anything about what I say (unchained, planes...),
 | 
			
		||||
  just read any good documentation about Mode X.
 | 
			
		||||
 | 
			
		||||
    We'd like to thank the authors of XLIB2 for saving our time by having made
 | 
			
		||||
  this useful function. We slightly optimized it for our needs but the most
 | 
			
		||||
  important parts are here.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    mov  ax,13h      ; Yeah! The MCGA mode again! All X-Modes must start from
 | 
			
		||||
    int  10h         ; the standard VGA mode, but many things change after.
 | 
			
		||||
 | 
			
		||||
    mov  dx,3C6h     ; During the initialization, we'll turn the palette into
 | 
			
		||||
    xor  al,al       ; black in order to avoid the user to see all our
 | 
			
		||||
    out  dx,al       ; manipulations.
 | 
			
		||||
 | 
			
		||||
    mov  dx,3C4h     ; We will inform the TIMING SEQUENCER register to switch
 | 
			
		||||
    mov  ax,0604h    ; in unchained mode (mode-X), without odd/even management
 | 
			
		||||
    out  dx,ax       ; and with an access to the 256Kb of the video card.
 | 
			
		||||
    mov  ax,0100h    ; Now we will engage the synchronous reset of the TS
 | 
			
		||||
    out  dx,ax       ; register because we're about to play with registers.
 | 
			
		||||
 | 
			
		||||
    mov  al,01h      ; Like with the palette, we ask the video card not to
 | 
			
		||||
    out  dx,al       ; peek the memory to display it anymore. Thus, it's
 | 
			
		||||
    inc  dx          ; one more way to avoid interferences in the display,
 | 
			
		||||
    in   al,dx       ; which happens until the mode is completely initialized
 | 
			
		||||
    mov  ah,al       ; and stable. In addition, we can expect that asking a
 | 
			
		||||
    mov  al,01h      ; memory reading interruption will turn the system
 | 
			
		||||
    push ax          ; faster, and thus speed up the initialization of the
 | 
			
		||||
    mov  al,ah       ; graphic mode (hope makes you live :))
 | 
			
		||||
    or   al,20h      ;
 | 
			
		||||
    out  dx,al       ;
 | 
			
		||||
 | 
			
		||||
    mov  esi,X_ptr   ; Pointer on the list of constants to send to the CRTC.
 | 
			
		||||
    cld
 | 
			
		||||
 | 
			
		||||
    lodsb            ; This loads in AL a value that will tell what to do
 | 
			
		||||
                     ; with the MISCELLANEOUS register, and increases ESI.
 | 
			
		||||
                     ; The value is equal to ZERO => Nothing to do
 | 
			
		||||
                     ;                    or ELSE => Send AL to MISCELLANEOUS
 | 
			
		||||
 | 
			
		||||
    or   al,al       ; Shall we modify the basic video mode?
 | 
			
		||||
    jz   NoThankYou  ; No?Ä¿ Actually the answer is always "Yes".
 | 
			
		||||
    mov  dx,3C2h     ;     ³ Except for a few modes such as
 | 
			
		||||
    out  dx,al       ;     ³ 320x200 in Mode X
 | 
			
		||||
    NoThankYou:      ; <ÄÄÄÙ (but our 320x200 is MCGA...)
 | 
			
		||||
 | 
			
		||||
    mov  dx,3C4h     ; Manipulations with MISCELLANEOUS register are over, we
 | 
			
		||||
    mov  ax,0300h    ; can now disengage the synchronous register of the TS.
 | 
			
		||||
    out  dx,ax
 | 
			
		||||
 | 
			
		||||
    ; Now, what about teasing the CRTC?
 | 
			
		||||
 | 
			
		||||
    mov  dx,3D4h     ; In the 18th register of the CRTC, we will disengage the
 | 
			
		||||
    mov  al,11h      ; protection bit. Without this, the values we would have
 | 
			
		||||
    out  dx,al       ; sent to the CRTC registers would have been ignored.
 | 
			
		||||
    inc  dx
 | 
			
		||||
    in   al,dx
 | 
			
		||||
    and  al,7Fh
 | 
			
		||||
    out  dx,al
 | 
			
		||||
 | 
			
		||||
    dec  dx          ; DX points back to the CRTC register entry
 | 
			
		||||
    lodsb            ; This loads in AL the number of CRTC registers to modify
 | 
			
		||||
    xor  ecx,ecx     ; You must clear ECX before...
 | 
			
		||||
    mov  cl,al       ; ... starting to repeat AL (CL) times OUTSW
 | 
			
		||||
    rep  outsw       ; Let's send all the CRTC parameters!
 | 
			
		||||
 | 
			
		||||
    ; Just in case the 20th CRTC register would have been forgotten in the
 | 
			
		||||
    ; initialisation table, we can compute it by ourselves (Yeah, we are good
 | 
			
		||||
    ; guys).
 | 
			
		||||
 | 
			
		||||
    mov  ax,Screen_width ; You must tell the routine what the Screen width is
 | 
			
		||||
    shr  ax,3
 | 
			
		||||
    mov  ah,al
 | 
			
		||||
    mov  al,13h
 | 
			
		||||
    out  dx,ax
 | 
			
		||||
 | 
			
		||||
    mov  dx,3C4h     ; Now you have the good resolution but there can be
 | 
			
		||||
    mov  ax,0F02h    ; shitty pixels on the screen coming from the uncleared
 | 
			
		||||
    out  dx,ax       ; memory areas.
 | 
			
		||||
    mov  edi,0A0000h ; So we'll clean memory starting from 0A0000h with the
 | 
			
		||||
    xor  eax,eax     ; value 0 (which is the standard black) and on a range
 | 
			
		||||
    mov  ecx,4000h   ; of 4000h dwords (256Kb).
 | 
			
		||||
    rep  stosd       ; Let's wipe all this out.
 | 
			
		||||
 | 
			
		||||
    mov  dx,3C4h     ; We can ask the VGA to read again the memory to display
 | 
			
		||||
    pop  ax          ; it on the screen...
 | 
			
		||||
    out  dx,ax       ;
 | 
			
		||||
    mov  dx,3C6h     ; ... and turn on the palette so the picture appears to
 | 
			
		||||
    mov  al,0FFh     ; the user.
 | 
			
		||||
    out  dx,al       ;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  The table of constants you must send is one of these:
 | 
			
		||||
  (These are tables for C but they can be easily used in other languages)
 | 
			
		||||
 | 
			
		||||
  word X320Y224[] =
 | 
			
		||||
    { 0x0BA3, 0x6F06, 0xBA07, 0x0008, 0x4109, 0x0810, 0x8A11, 0xBF12, 0x0014,
 | 
			
		||||
      0xC715, 0x0416, 0xE317 };
 | 
			
		||||
  word X320Y240[] =
 | 
			
		||||
    { 0x0AE3, 0x0D06, 0x3E07, 0x4109, 0xEA10, 0xAC11, 0xDF12, 0x0014, 0xE715,
 | 
			
		||||
      0x0616, 0xE317 };
 | 
			
		||||
  word X320Y256[] =
 | 
			
		||||
    { 0x0CE3, 0x2306, 0xB207, 0x0008, 0x6109, 0x0A10, 0xAC11, 0xFF12, 0x2013,
 | 
			
		||||
      0x0014, 0x0715, 0x1A16, 0xE317 };
 | 
			
		||||
  word X320Y270[] =
 | 
			
		||||
    { 0x0BE7, 0x3006, 0xF007, 0x0008, 0x6109, 0x2010, 0xA911, 0x1B12, 0x0014,
 | 
			
		||||
      0x1F15, 0x2F16, 0xE317 };
 | 
			
		||||
  word X320Y282[] =
 | 
			
		||||
    { 0x0CE3, 0x6206, 0xF007, 0x6109, 0x310F, 0x3710, 0x8911, 0x3312, 0x2F13,
 | 
			
		||||
      0x0014, 0x3C15, 0x5C16, 0xE317 };
 | 
			
		||||
  word X320Y300[] =
 | 
			
		||||
    { 0x0DE3, 0x4606, 0x1F07, 0x0008, 0x4009, 0x3110, 0x8011, 0x2B12, 0x2013,
 | 
			
		||||
      0x0014, 0x2F15, 0x4416, 0xE317 };
 | 
			
		||||
  word X320Y360[] =
 | 
			
		||||
    { 0x09E3, 0x4009, 0x8810, 0x8511, 0x6712, 0x2013, 0x0014, 0x6D15, 0xBA16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X320Y400[] =
 | 
			
		||||
    { 0x03E3, 0x4009, 0x0014, 0xE317 };
 | 
			
		||||
  word X320Y448[] =
 | 
			
		||||
    { 0x0BA3, 0x6F06, 0xBA07, 0x0008, 0x4009, 0x0810, 0x8A11, 0xBF12, 0x0014,
 | 
			
		||||
      0xC715, 0x0416, 0xE317 };
 | 
			
		||||
  word X320Y480[] =
 | 
			
		||||
    { 0x0AE3, 0x0D06, 0x3E07, 0x4009, 0xEA10, 0xAC11, 0xDF12, 0x0014, 0xE715,
 | 
			
		||||
      0x0616 , 0xE317};
 | 
			
		||||
  word X320Y512[] =
 | 
			
		||||
    { 0x0CE3, 0x2306, 0xB207, 0x0008, 0x6009, 0x0A10, 0xAC11, 0xFF12, 0x2013,
 | 
			
		||||
      0x0014, 0x0715, 0x1A16, 0xE317 };
 | 
			
		||||
  word X320Y540[] =
 | 
			
		||||
    { 0x0BE7, 0x3006, 0xF007, 0x0008, 0x6009, 0x2010, 0xA911, 0x1B12, 0x0014,
 | 
			
		||||
      0x1F15, 0x2F16, 0xE317 };
 | 
			
		||||
  word X320Y564[] =
 | 
			
		||||
    { 0x0CE7, 0x6206, 0xF007, 0x0008, 0x6009, 0x3E10, 0x8911, 0x3312, 0x2013,
 | 
			
		||||
      0x0014, 0x3C15, 0x5C16, 0xE317 };
 | 
			
		||||
  word X320Y600[] =
 | 
			
		||||
    { 0x0BE7, 0xBE06, 0xF007, 0x0008, 0x6009, 0x7C10, 0x8C11, 0x5712, 0x0014,
 | 
			
		||||
      0x5815, 0x7016, 0xE317 };
 | 
			
		||||
  word X360Y200[] =
 | 
			
		||||
    { 0x09E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x2D13, 0x0014,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y224[] =
 | 
			
		||||
    { 0x12A7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x6F06, 0xBA07,
 | 
			
		||||
      0x0008, 0x4109, 0x0810, 0x8A11, 0xBF12, 0x2D13, 0x0014, 0xC715, 0x0416,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y240[] =
 | 
			
		||||
    { 0x11E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x0D06, 0x3E07,
 | 
			
		||||
      0x4109, 0xEA10, 0xAC11, 0xDF12, 0x2D13, 0x0014, 0xE715, 0x0616, 0xE317 };
 | 
			
		||||
  word X360Y256[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x2B06, 0xB207,
 | 
			
		||||
      0x0008, 0x6109, 0x0E10, 0xAC11, 0xFF12, 0x2D13, 0x0014, 0x0715, 0x1A16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y270[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x3006, 0xF007,
 | 
			
		||||
      0x0008, 0x6109, 0x2010, 0xA911, 0x1B12, 0x2D13, 0x0014, 0x1F15, 0x2F16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y282[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x6206, 0xF007,
 | 
			
		||||
      0x6109, 0x310F, 0x3710, 0x8911, 0x3312, 0x2D13, 0x0014, 0x3C15, 0x5C16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y300[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x4606, 0x1F07,
 | 
			
		||||
      0x0008, 0x4009, 0x3110, 0x8011, 0x2B12, 0x2D13, 0x0014, 0x2F15, 0x4416,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y360[] =
 | 
			
		||||
    { 0x0FE7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x4009, 0x8810,
 | 
			
		||||
      0x8511, 0x6712, 0x2D13, 0x0014, 0x6D15, 0xBA16, 0xE317 };
 | 
			
		||||
  word X360Y400[] =
 | 
			
		||||
    { 0x0AE7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x4009, 0x2D13,
 | 
			
		||||
      0x0014, 0xE317 };
 | 
			
		||||
  word X360Y448[] =
 | 
			
		||||
    { 0x12A7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x6F06, 0xBA07,
 | 
			
		||||
      0x0008, 0x4009, 0x0810, 0x8A11, 0xBF12, 0x2D13, 0x0014, 0xC715, 0x0416,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y480[] =
 | 
			
		||||
    { 0x11E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x0D06, 0x3E07,
 | 
			
		||||
      0x4009, 0xEA10, 0xAC11, 0xDF12, 0x2D13, 0x0014, 0xE715, 0x0616, 0xE317 };
 | 
			
		||||
  word X360Y512[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x2B06, 0xB207,
 | 
			
		||||
      0x0008, 0x6009, 0x0E10, 0xAC11, 0xff12, 0x2D13, 0x0014, 0x0715, 0x1A16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y540[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x3006, 0xF007,
 | 
			
		||||
      0x0008, 0x6009, 0x2010, 0xA911, 0x1B12, 0x2D13, 0x0014, 0x1F15, 0x2F16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y564[] =
 | 
			
		||||
    { 0x12EB, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x6206, 0xF007,
 | 
			
		||||
      0x0008, 0x6009, 0x3E10, 0x8911, 0x3312, 0x2D13, 0x0014, 0x3C15, 0x5C16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y600[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0xBE06, 0xF007,
 | 
			
		||||
      0x0008, 0x6009, 0x7C10, 0x8C11, 0x5712, 0x2D13, 0x0014, 0x5815, 0x7016,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y200[] =
 | 
			
		||||
    { 0x09E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x3213, 0x0014,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y224[] =
 | 
			
		||||
    { 0x12A7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x6F06, 0xBA07,
 | 
			
		||||
      0x0008, 0x4109, 0x0810, 0x8A11, 0xBF12, 0x3213, 0x0014, 0xC715, 0x0416,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y240[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x0D06, 0x3E07,
 | 
			
		||||
      0x0008, 0x4109, 0xEA10, 0xAC11, 0xDF12, 0x3213, 0x0014, 0xE715, 0x0616,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y256[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x2B06, 0xB207,
 | 
			
		||||
      0x0008, 0x6109, 0x1310, 0xAC11, 0xFF12, 0x3213, 0x0014, 0x0715, 0x1A16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y270[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x3006, 0xF007,
 | 
			
		||||
      0x0008, 0x6109, 0x2010, 0xA911, 0x1B12, 0x3213, 0x0014, 0x1F15, 0x2F16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y282[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x6206, 0xF007,
 | 
			
		||||
      0x6109, 0x310F, 0x3710, 0x8911, 0x3312, 0x3213, 0x0014, 0x3C15, 0x5C16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y300[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x4606, 0x1F07,
 | 
			
		||||
      0x0008, 0x4009, 0x3110, 0x8011, 0x2B12, 0x3213, 0x0014, 0x2F15, 0x4416,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y360[] =
 | 
			
		||||
    { 0x0FE7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x4009, 0x8810,
 | 
			
		||||
      0x8511, 0x6712, 0x3213, 0x0014, 0x6D15, 0xBA16, 0xE317 };
 | 
			
		||||
  word X400Y400[] =
 | 
			
		||||
    { 0x0AE7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x4009, 0x3213,
 | 
			
		||||
      0x0014, 0xE317 };
 | 
			
		||||
  word X400Y448[] =
 | 
			
		||||
    { 0x12A7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x6F06, 0xBA07,
 | 
			
		||||
      0x0008, 0x4009, 0x0810, 0x8A11, 0xBF12, 0x3213, 0x0014, 0xC715, 0x0416,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y480[] =
 | 
			
		||||
    { 0x11E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x0D06, 0x3E07,
 | 
			
		||||
      0x4009, 0xEA10, 0xAC11, 0xDF12, 0x3213, 0x0014, 0xE715, 0x0616, 0xE317 };
 | 
			
		||||
  word X400Y512[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x2B06, 0xB207,
 | 
			
		||||
      0x0008, 0x6009, 0x1310, 0xAC11, 0xFF12, 0x3213, 0x0014, 0x0715, 0x1A16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y540[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x3006, 0xF007,
 | 
			
		||||
      0x0008, 0x6009, 0x2010, 0xA911, 0x1B12, 0x3213, 0x0014, 0x1F15, 0x2F16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y564[] =
 | 
			
		||||
    { 0x12EB, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x6206, 0xF007,
 | 
			
		||||
      0x0008, 0x6009, 0x3E10, 0x8911, 0x3312, 0x3213, 0x0014, 0x3C15, 0x5C16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y600[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0xBE06, 0xF007,
 | 
			
		||||
      0x0008, 0x6009, 0x7C10, 0x8C11, 0x5712, 0x3213, 0x0014, 0x5815, 0x7016,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  The structure: (example)
 | 
			
		||||
 | 
			
		||||
       ÚÄÄÄÄThis is the number of values to send to the CRTC registers. This
 | 
			
		||||
       ³    is actually the number of words in the tables minus 1 (because the
 | 
			
		||||
       ³    1st word of the table is not sent to the CRTC but contains a value
 | 
			
		||||
       ³    to send to the MISCELLANEOUS register and the number of values to
 | 
			
		||||
       ³    send to the CRTC registers ;) ).
 | 
			
		||||
       ³
 | 
			
		||||
       ³ ÚÄÄThis is the value to send to the MISCEALLANEOUS register (or ZERO
 | 
			
		||||
       ³ ³  if no value must be sent to it).
 | 
			
		||||
       ³ ³
 | 
			
		||||
       ³ ³     ÚÄÄÄThis is a value to send to a register of the CRTC.
 | 
			
		||||
       ³ ³     ³
 | 
			
		||||
       ³ ³     ³ ÚÄThis is the index of the CRTC register that will receive
 | 
			
		||||
       ³ ³     ³ ³ the value.
 | 
			
		||||
       ÿÿ    ÿÿ
 | 
			
		||||
   { 0x0AE3, 0x0D06, 0x3E07, 0x4109, 0xEA10, 0xAC11, 0xDF12, 0x0014, 0xE715,
 | 
			
		||||
     0x0616, 0xE317 };
 | 
			
		||||
 | 
			
		||||
    You can notice that CRTC registers 0 to 5 (and 13h) define the screen
 | 
			
		||||
  width while registers 6 to 17h (except 13h) define the screen height.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    We have more modes in our pocket than the "few" :) ones we included in
 | 
			
		||||
  GrafX 2.00, but they aren't really useful or stable. But we may decice to
 | 
			
		||||
  include them anyway in a next version.
 | 
			
		||||
    If some of your favourite modes are missing, just send us the list of
 | 
			
		||||
  constants we must shoot at the CRTC just following the structure we use
 | 
			
		||||
  above.
 | 
			
		||||
 | 
			
		||||
  IMPORTANT! The constant values listed above are not supported by every
 | 
			
		||||
             monitor or video card.
 | 
			
		||||
             We have tested GrafX2 with several different configurations and
 | 
			
		||||
             we constated that some modes don't work at all with some video
 | 
			
		||||
             cards while some others can be overscanned, out of center, dark,
 | 
			
		||||
             too bright, or shrunk.
 | 
			
		||||
             But they all work fine with our poor little Tseng Labs ET4000...
 | 
			
		||||
 | 
			
		||||
  If you already have a good knowledge about CRTC and have different values
 | 
			
		||||
  than ours for certain modes, please let us know. We'll use them if they work
 | 
			
		||||
  better with a majority of computers.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
VESA: (A "pseudo-standard" for Super-VGA modes)
 | 
			
		||||
ÍÍÍÍÍ
 | 
			
		||||
 | 
			
		||||
    We use VESA for modes that require a width of 640, 800 or 1024 pixels.
 | 
			
		||||
  But there is a way to combine X-Modes height with VESA so it's possible to
 | 
			
		||||
  have modes as weird as in X-Mode.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  mov  ax,4F02h
 | 
			
		||||
  mov  bx,Video_mode
 | 
			
		||||
  int  10h
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  256-color-VESA video modes are:
 | 
			
		||||
    100h :  640x400
 | 
			
		||||
    101h :  640x480
 | 
			
		||||
    103h :  800x600
 | 
			
		||||
    105h : 1024x768
 | 
			
		||||
    107h : 1280x1024 (not available in GrafX2 because only supported with
 | 
			
		||||
                     video cards with 2 or more Megabytes of video memory)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  As with X-Modes, you can modify CRTC registers to access "Xtd-VESA" modes!
 | 
			
		||||
  (Note that some video cards don't support the modification of the VGA CRTC
 | 
			
		||||
  registers in VESA modes.)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  To enter these extended VESA modes, set a standard VESA mode with the right
 | 
			
		||||
  width, and then call Modify_CRTC_registers with the proper Height table.
 | 
			
		||||
 | 
			
		||||
  Example (640x512) :
 | 
			
		||||
    VESA_Set_mode(101h)          /* Set a video mode with the same width */
 | 
			
		||||
    Modify_CRTC_registers(Y512)  /* Modify height */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  * Height tables:
 | 
			
		||||
 | 
			
		||||
  word Y224[] =
 | 
			
		||||
    { 0x09A3, 0x6F06, 0xBA07, 0x0008, 0x4109, 0x0810, 0x8A11, 0xBF12, 0xC715,
 | 
			
		||||
      0x0416 };
 | 
			
		||||
  word Y240[] =
 | 
			
		||||
    { 0x09E3, 0x0D06, 0x3E07, 0x0008, 0x4109, 0xEA10, 0xAC11, 0xDF12, 0xE715,
 | 
			
		||||
      0x0616 };
 | 
			
		||||
  word Y256[] =
 | 
			
		||||
    { 0x0900, 0x2B06, 0xB207, 0x0008, 0x6109, 0x0A10, 0xAC11, 0xFF12, 0x0715,
 | 
			
		||||
      0x1A16 };
 | 
			
		||||
  word Y270[] =
 | 
			
		||||
    { 0x09E7, 0x3006, 0xF007, 0x0008, 0x6109, 0x2010, 0xA911, 0x1B12, 0x1F15,
 | 
			
		||||
      0x2F16 };
 | 
			
		||||
  word Y282[] =
 | 
			
		||||
    { 0x0AE3, 0x6206, 0xF007, 0x0008, 0x6109, 0x310F, 0x3710, 0x8911, 0x3312,
 | 
			
		||||
      0x3C15, 0x5C16 };
 | 
			
		||||
  word Y300[] =
 | 
			
		||||
    { 0x09E3, 0x4606, 0x1F07, 0x0008, 0x4009, 0x3110, 0x8011, 0x2B12, 0x2F15,
 | 
			
		||||
      0x4416 };
 | 
			
		||||
  word Y350[] =
 | 
			
		||||
    { 0x09A3, 0xBF06, 0x1F07, 0x0008, 0x4009, 0x8310, 0x8511, 0x5D12, 0x6315,
 | 
			
		||||
      0xBA16 };
 | 
			
		||||
  word Y360[] =
 | 
			
		||||
    { 0x07E3, 0x0008, 0x4009, 0x8810, 0x8511, 0x6712, 0x6D15, 0xBA16 };
 | 
			
		||||
  word Y400[] =
 | 
			
		||||
    { 0x01E3, 0x4009 };
 | 
			
		||||
  word Y448[] =
 | 
			
		||||
    { 0x09A3, 0x6F06, 0xBA07, 0x0008, 0x4009, 0x0810, 0x8A11, 0xBF12, 0xC715,
 | 
			
		||||
      0x0416 };
 | 
			
		||||
  word Y480[] =
 | 
			
		||||
    { 0x09E3, 0x0D06, 0x3E07, 0x0008, 0x4009, 0xEA10, 0xAC11, 0xDF12, 0xE715,
 | 
			
		||||
      0x0616 };
 | 
			
		||||
  word Y512[] =
 | 
			
		||||
    { 0x0900, 0x2B06, 0xB207, 0x0008, 0x6009, 0x0A10, 0xAC11, 0xFF12, 0x0715,
 | 
			
		||||
      0x1A16 };
 | 
			
		||||
  word Y540[] =
 | 
			
		||||
    { 0x09E7, 0x3006, 0xF007, 0x0008, 0x6009, 0x2010, 0xA911, 0x1B12, 0x1F15,
 | 
			
		||||
      0x2F16 };
 | 
			
		||||
  word Y564[] =
 | 
			
		||||
    { 0x09E7, 0x6206, 0xF007, 0x0008, 0x6009, 0x3E10, 0x8911, 0x3312, 0x3C15,
 | 
			
		||||
      0x5C16 };
 | 
			
		||||
  word Y600[] =
 | 
			
		||||
    { 0x09E7, 0xBE06, 0xF007, 0x0008, 0x6009, 0x7C10, 0x8C11, 0x5712, 0x5815,
 | 
			
		||||
      0x7016 };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  Modifying CRTC registers: (inspired by X-Modes init... See above for more
 | 
			
		||||
  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ  details or comments)
 | 
			
		||||
 | 
			
		||||
  mov  esi,XVESA_Ptr
 | 
			
		||||
  cld
 | 
			
		||||
 | 
			
		||||
  lodsb
 | 
			
		||||
  or   al,al       ; Shall we modify the basic video mode?
 | 
			
		||||
  jz   NoThankYou  ; No?Ä¿ The answer can be "No" because initialisations
 | 
			
		||||
  mov  dx,3C2h     ;     ³ of certain VESA modes directly set the right
 | 
			
		||||
  out  dx,al       ;     ³ value for the Miscellaneous register.
 | 
			
		||||
  NoThankYou:      ; <ÄÄÄÙ
 | 
			
		||||
 | 
			
		||||
  mov  dx,3D4h
 | 
			
		||||
  mov  al,11h
 | 
			
		||||
  out  dx,al
 | 
			
		||||
  inc  dx
 | 
			
		||||
  in   al,dx
 | 
			
		||||
  and  al,7Fh
 | 
			
		||||
  out  dx,al
 | 
			
		||||
 | 
			
		||||
  dec  dx
 | 
			
		||||
  lodsb
 | 
			
		||||
  xor  ecx,ecx
 | 
			
		||||
  mov  cl,al
 | 
			
		||||
  rep  outsw
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    If you are cunning enough, you'll be able to combine constants used in
 | 
			
		||||
  X-Modes to get more "Xtd-VESA" modes such as 640x200, 800x480, etc...
 | 
			
		||||
  (but I don't think this will work with 1024x??? because this mode is
 | 
			
		||||
  generally interlaced... But who knows?...)
 | 
			
		||||
    The most difficult is to find the right value for the MISCELLANEOUS
 | 
			
		||||
  register.
 | 
			
		||||
							
								
								
									
										769
									
								
								doc/tech_fra.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										769
									
								
								doc/tech_fra.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,769 @@
 | 
			
		||||
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 | 
			
		||||
³°±²Û   Doc. technique pour GrafX 2.00 - Version 1.08 (5 octobre 1997)   Û²±°³
 | 
			
		||||
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
 | 
			
		||||
 | 
			
		||||
Ce fichier traite:
 | 
			
		||||
 | 
			
		||||
  - du format d'image PKM
 | 
			
		||||
  - des valeurs … envoyer au CRTC pour avoir accŠs … tous les modes vid‚os
 | 
			
		||||
    incroyables disponibles dans GrafX 2.00
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 | 
			
		||||
³            °±²Û Le format d'image PKM - par Karl Maritaud Û²±°             ³
 | 
			
		||||
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    Tout d'abord, je tiens a dire que j'ai cr‚‚ ce format il y a d‚j… quelques
 | 
			
		||||
  ann‚es, … l'‚poque o— je ne savais pas comment charger les meilleurs formats
 | 
			
		||||
  (GIF par exemple) et que je voulais ‚galement avoir mon propre format.
 | 
			
		||||
    Le format PKM a ‚t‚ con‡u pour ˆtre trŠs simple, facile … encoder et …
 | 
			
		||||
  d‚coder. De plus, son header est trŠs simple (court) et evolutif.
 | 
			
		||||
    Le seul vrai d‚faut que je puisse y trouver est que l'on ne peut sauver
 | 
			
		||||
  des images qu'en 256 couleurs.
 | 
			
		||||
    Je sais que vous allez vous dire:
 | 
			
		||||
      "Oh non! Encore un nouveau format … la con! J'm'en servirai jamais! En
 | 
			
		||||
      plus le taux de compression est naze! Je prefŠre le GIF!".
 | 
			
		||||
    Et je r‚pondrai:
 | 
			
		||||
      "Ouais! T'as raison. Mais si tu ne sais pas comment charger du GIF et
 | 
			
		||||
      que tu veux un format simple avec une compression correcte (du moins sur
 | 
			
		||||
      les images simples), il peut ˆtre utile."
 | 
			
		||||
 | 
			
		||||
  Donc, voici la documentation de ce format...
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Le HEADER:
 | 
			
		||||
ÍÍÍÍÍÍÍÍÍÍ
 | 
			
		||||
 | 
			
		||||
  Le header est la structure de 780 octets suivante. (Ne vous inqui‚tez pas …
 | 
			
		||||
  propos de la taille. C'est tout simplement parce que la palette fait partie
 | 
			
		||||
  du header).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  ÚÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 | 
			
		||||
  ³ Pos ³ Champ     ³ Type ³Taille³ Description                              ³
 | 
			
		||||
  ÆÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵
 | 
			
		||||
  ³   0 ³ Signature ³ char ³   3  ³ ChaŒne constante "PKM" (SANS d‚limitation³
 | 
			
		||||
  ³     ³           ³      ³      ³ de taille '\0' ou autres...)             ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³   3 ³ Version   ³ byte ³   1  ³ Pour le moment, ce champ ne peut prendre ³
 | 
			
		||||
  ³     ³           ³      ³      ³ que la valeur 0.                         ³
 | 
			
		||||
  ³     ³           ³      ³      ³ D'autres m‚thodes de compression pourront³
 | 
			
		||||
  ³     ³           ³      ³      ³ la modifier mais pour l'instant il n'y en³
 | 
			
		||||
  ³     ³           ³      ³      ³ a qu'une seule.                          ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³   4 ³ Pack_byte ³ byte ³   1  ³ Valeur de l'octet de reconnaissance pour ³
 | 
			
		||||
  ³     ³           ³      ³      ³ les r‚p‚titions de couleurs cod‚es sur 1 ³
 | 
			
		||||
  ³     ³           ³      ³      ³ Octet. (Voir la section sur la m‚thode de³
 | 
			
		||||
  ³     ³           ³      ³      ³ compression pour plus d'informations)    ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³   5 ³ Pack_word ³ byte ³   1  ³ Valeur de l'octet de reconnaissance pour ³
 | 
			
		||||
  ³     ³           ³      ³      ³ les r‚p‚titions de couleurs cod‚es sur 2 ³
 | 
			
		||||
  ³     ³           ³      ³      ³ Octets. (Voir la section sur la m‚thode  ³
 | 
			
		||||
  ³     ³           ³      ³      ³ de compression pour plus d'informations) ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³   6 ³ Largeur   ³ word ³   2  ³ Largeur de l'image (en pixels)           ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³   8 ³ Hauteur   ³ word ³   2  ³ Hauteur de l'image (en pixels)           ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³  10 ³ Palette   ³ byte ³ 768  ³ Palette RGB (RGB RGB ... 256 fois) avec  ³
 | 
			
		||||
  ³     ³           ³      ³      ³ des valeurs de 0 … 63. Je sais que le    ³
 | 
			
		||||
  ³     ³           ³      ³      ³ standard dans les fichiers d'images est  ³
 | 
			
		||||
  ³     ³           ³      ³      ³ de 0 … 255 mais je trouve ‡a cr‚tin!     ³
 | 
			
		||||
  ³     ³           ³      ³      ³ C'est tellement plus simple d'envoyer la ³
 | 
			
		||||
  ³     ³           ³      ³      ³ palette toute entiŠre dans le port 3C9h  ³
 | 
			
		||||
  ³     ³           ³      ³      ³ avec un REP OUTSB sans avoir … convertir ³
 | 
			
		||||
  ³     ³           ³      ³      ³ la palette.                              ³
 | 
			
		||||
  ÃÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
 | 
			
		||||
  ³ 778 ³ Taille_PH ³ word ³   2  ³ Taille du Post-header. C'est le nombre   ³
 | 
			
		||||
  ³     ³           ³      ³      ³ d'octets entre le header et les donn‚es  ³
 | 
			
		||||
  ³     ³           ³      ³      ³ de l'image. Cette valeur peut valoir 0.  ³
 | 
			
		||||
  ÀÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
 | 
			
		||||
 | 
			
		||||
  Les donn‚es du type "word" sont stock‚es selon les conventions d'Intel:
 | 
			
		||||
  c'est-…-dire l'octet de poids le plus faible en premier.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Le POST-HEADER:
 | 
			
		||||
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
 | 
			
		||||
 | 
			
		||||
  Le post-header a une taille variable. Il a ‚t‚ con‡u pour supporter les
 | 
			
		||||
nouvelles fonctions de ce format sans avoir a changer complŠtement le format.
 | 
			
		||||
 | 
			
		||||
  Il est constitu‚ d'identificateurs de champ suivis par leur taille et leur
 | 
			
		||||
contenu.
 | 
			
		||||
  Un identificateur de champ est cod‚ sur 1 octet ainsi que sa taille.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  Ces identificateurs de champ sont:  (cette liste peut ˆtre rallong‚e...)
 | 
			
		||||
  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
 | 
			
		||||
 | 
			
		||||
    0 : Commentaire sur l'image
 | 
			
		||||
    1 : Dimensions de l'‚cran d'origine
 | 
			
		||||
    2 : Couleur de fond (couleur de transparence)
 | 
			
		||||
 | 
			
		||||
  Si vous rencontrez un champ inconnu par votre routine de chargment, sautez
 | 
			
		||||
  simplement au del…. Mais, par contre, si un champ vous dit de sauter … une
 | 
			
		||||
  position qui tombe aprŠs le d‚but th‚orique des donn‚es de l'image, alors
 | 
			
		||||
  c'est qu'il y a une erreur dans le fichier.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  Les champs:
 | 
			
		||||
  ÄÄÄÄÄÄÄÄÄÄÄ
 | 
			
		||||
 | 
			
		||||
    * Commentaire:
 | 
			
		||||
 | 
			
		||||
      Grƒce … ce champ, les artistes vont pouvoir commenter leurs dessins.
 | 
			
		||||
      Notez que GrafX 2 a une taille limite de commentaire de 32 caractŠres.
 | 
			
		||||
      Mais vous pourrez avoir des commentaires allant jusqu'… 255 caractŠres
 | 
			
		||||
      si vous cr‚ez votre propre viewer puisque GrafX 2 ignorera simplement
 | 
			
		||||
      les caractŠres en trop.
 | 
			
		||||
 | 
			
		||||
      Exemple: [0],[15],[Dessin de X-Man]
 | 
			
		||||
      Cette s‚quence signifie:
 | 
			
		||||
        - le champ est un commentaire
 | 
			
		||||
        - le commentaire a une taille de 15 caractŠres (il n'y a pas de
 | 
			
		||||
          caractŠre de fin de chaŒne puisque vous connaissez sa taille)
 | 
			
		||||
        - le commentaire est "Dessin de X-Man"
 | 
			
		||||
 | 
			
		||||
    * Dimensions de l'‚cran d'origine:
 | 
			
		||||
 | 
			
		||||
      Puisque GrafX 2 propose un ‚norme choix de r‚solutions, il a sembl‚
 | 
			
		||||
      pratique d'ajouter un champ indicant quelles ‚taient les dimensions de
 | 
			
		||||
      l'‚cran d'origine.
 | 
			
		||||
 | 
			
		||||
      Exemple: [1],[4],[320],[256]
 | 
			
		||||
      Cette s‚quence signifie:
 | 
			
		||||
        - Le champ d‚crit les dimensions de l'‚cran d'origine
 | 
			
		||||
        - Les dimensions sont 2 words (donc cette valeur doit ˆtre ‚gale … 4)
 | 
			
		||||
        - La largeur de l'‚cran d'origine ‚tait de 320 pixels
 | 
			
		||||
        - La hauteur de l'‚cran d'origine ‚tait de 256 pixels
 | 
			
		||||
 | 
			
		||||
      Notez que les words stock‚s dans les champs sont ‚crits … la maniŠre
 | 
			
		||||
      Intel. La BETA-version 90% ne respectait pas cette norme (d‚sol‚).
 | 
			
		||||
      Ce n'est pas bien grƒve mais les images sauv‚es avec la version 90% et
 | 
			
		||||
      recharg‚es avec une version post‚rieure (91% et plus) ne passeront pas
 | 
			
		||||
      dans la bonne r‚solution.
 | 
			
		||||
 | 
			
		||||
    * Couleur de fond:
 | 
			
		||||
 | 
			
		||||
      Enregistrer la couleur de fond (couleur de transparence) se r‚vŠle
 | 
			
		||||
      particuliŠrement utile lorsque vous voulez sauvegarder une brosse.
 | 
			
		||||
      La taille de ce champ est 1 octet (indice de la couleur entre 0 et 255).
 | 
			
		||||
 | 
			
		||||
      Exemple: [2],[1],[255]
 | 
			
		||||
      Cette s‚quence signifie:
 | 
			
		||||
        - le champ d‚crit la couleur de fond
 | 
			
		||||
        - la valeur prend 1 octet
 | 
			
		||||
        - La couleur de transparence est 255
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
La METHODE DE COMPACTAGE DE L'IMAGE:
 | 
			
		||||
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
 | 
			
		||||
 | 
			
		||||
  La m‚thode de compression PKM est une sorte de "Run-Length-Compression" qui
 | 
			
		||||
est trŠs efficace sur les images comportant de longues r‚p‚titions d'une mˆme
 | 
			
		||||
couleur horizontalement.
 | 
			
		||||
  En fait la compression commence … ˆtre efficace s'il y a souvent plus de 3
 | 
			
		||||
fois la mˆme couleur cons‚cutivement.
 | 
			
		||||
 | 
			
		||||
  Je pense qu'il est pr‚f‚rable de vous donner directement l'algorithme plut“t
 | 
			
		||||
que de nager dans des explications incomprehensibles.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  DEBUT
 | 
			
		||||
    /*
 | 
			
		||||
      fonctions:
 | 
			
		||||
        Lire_octet(Fichier)            Lit et retourne 1 octet … partir de
 | 
			
		||||
                                     Fichier
 | 
			
		||||
        Dessiner_pixel(X,Y,Couleur)    Dessine un pixel d'une certaine Couleur
 | 
			
		||||
                                     … la position (X,Y)
 | 
			
		||||
        Taille_fichier(Fichier)        Retourne la taille totale d'un Fichier
 | 
			
		||||
                                     en octets
 | 
			
		||||
 | 
			
		||||
      variables:
 | 
			
		||||
        le type de Taille_image        est dword
 | 
			
		||||
        le type de Taille_donnees      est dword
 | 
			
		||||
        le type de Compteur_donnees    est dword
 | 
			
		||||
        le type de Compteur_pixels     est dword
 | 
			
		||||
        le type de Couleur             est byte
 | 
			
		||||
        le type de Octet_lu            est byte
 | 
			
		||||
        le type de Word_lu             est word
 | 
			
		||||
        le type de Compteur            est word
 | 
			
		||||
        le type de Fichier             est <fichier binaire>
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
    /* A cet endroit, le header et le post-header ont d‚j… ‚t‚ lus. */
 | 
			
		||||
 | 
			
		||||
    Taille_image        <- Header.Largeur * Header.Hauteur
 | 
			
		||||
    Taille_donnees      <- Taille_fichier(Fichier) - (780+Header.Taille_PH)
 | 
			
		||||
 | 
			
		||||
    Compteur_donnees    <- 0
 | 
			
		||||
    Compteur_pixels     <- 0
 | 
			
		||||
 | 
			
		||||
    /* Boucle de d‚compression: */
 | 
			
		||||
    TANT QUE ((Compteur_pixels<Taille_image)
 | 
			
		||||
           ET (Compteur_donnees<Taille_donnees)) FAIRE
 | 
			
		||||
    {
 | 
			
		||||
      Octet_lu <- Lire_octet(Fichier)
 | 
			
		||||
 | 
			
		||||
      /* Si pas un octet de reconnaissance de paquet, c'est un pixel brut */
 | 
			
		||||
      SI ((Octet_lu<>Header.Pack_byte) ET (Octet_lu<>Header.Pack_word))
 | 
			
		||||
      ALORS
 | 
			
		||||
      {
 | 
			
		||||
        Dessiner_pixel(Compteur_pixels MOD Header.Largeur,
 | 
			
		||||
                       Compteur_pixels DIV Header.Largeur,
 | 
			
		||||
                       Octet_lu)
 | 
			
		||||
 | 
			
		||||
        Compteur_pixels  <- Compteur_pixels + 1
 | 
			
		||||
        Compteur_donnees <- Compteur_donnees + 1
 | 
			
		||||
      }
 | 
			
		||||
      SINON   /* Est-ce que le nombre de pixels … r‚p‚ter est cod‚... */
 | 
			
		||||
      {       /* ... sur 1 octet ? */
 | 
			
		||||
        SI (Octet_lu = Header.Pack_byte) ALORS
 | 
			
		||||
        {
 | 
			
		||||
          Couleur  <- Lire_octet(Fichier)
 | 
			
		||||
          Octet_lu <- Lire_octet(Fichier)
 | 
			
		||||
 | 
			
		||||
          POUR Compteur ALLANT DE 0 A (Octet_lu-1) PAR PAS DE +1
 | 
			
		||||
            Dessiner_pixel((Compteur_pixels+Compteur) MOD Header.Largeur,
 | 
			
		||||
                           (Compteur_pixels+Compteur) DIV Header.Largeur,
 | 
			
		||||
                           Couleur)
 | 
			
		||||
 | 
			
		||||
          Compteur_pixels  <- Compteur_pixels + Octet_lu
 | 
			
		||||
          Compteur_donnees <- Compteur_donnees + 3
 | 
			
		||||
        }
 | 
			
		||||
        SINON /* ... sur 2 octets ? */
 | 
			
		||||
        {
 | 
			
		||||
          Couleur <- Lire_octet(Fichier)
 | 
			
		||||
          Word_lu <- (word) (Lire_octet(Fichier) SHL 8)+Lire_octet(Fichier)
 | 
			
		||||
 | 
			
		||||
          POUR Compteur ALLANT DE 0 A (Word_lu-1) PAR PAS DE +1
 | 
			
		||||
            Dessiner_pixel((Compteur_pixels+Compteur) MOD Header.Largeur,
 | 
			
		||||
                           (Compteur_pixels+Compteur) DIV Header.Largeur,
 | 
			
		||||
                           Couleur)
 | 
			
		||||
 | 
			
		||||
          Compteur_pixels  <- Compteur_pixels + Word_lu
 | 
			
		||||
          Compteur_donnees <- Compteur_donnees + 4
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  FIN
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  Par exemple, la s‚quence suivante:
 | 
			
		||||
    (on suppose que Pack_byte=01 et Pack_word=02)
 | 
			
		||||
    04 03 01 05 06 03 02 00 01 2C
 | 
			
		||||
  sera d‚cod‚e comme:
 | 
			
		||||
    04 03 05 05 05 05 05 05 03 00 00 00 ... (rep‚ter 0 300 fois (012Ch=300))
 | 
			
		||||
 | 
			
		||||
  Les r‚p‚titions qui tiennent sur un word doivent ˆtre ‚crites avec leur
 | 
			
		||||
  octet de poids le plus fort en premier. Je sais que ‡a va … l'encontre du
 | 
			
		||||
  standard Intel mais puisque je lis les octets du fichier au travers d'un
 | 
			
		||||
  buffer (franchement plus rapide), Je me fous complŠtement de l'ordre
 | 
			
		||||
  (D‚sol‚ :)). Mais les words du header et du post-header doivent ˆtre ‚crits
 | 
			
		||||
  et lus … la maniŠre Intel!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  Conseils de compactage:
 | 
			
		||||
  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
 | 
			
		||||
 | 
			
		||||
  * Comme vous pouvez le constater, il pourrait y avoir un problŠme lorsque
 | 
			
		||||
  vous devriez compacter un pixel brut de couleur ‚gale … Pack_byte ou …
 | 
			
		||||
  Pack_word. Ces pixels doivent toujours ˆtre cod‚s comme des paquets mˆme
 | 
			
		||||
  s'il n'y a qu'un seul pixel.
 | 
			
		||||
 | 
			
		||||
    Exemple: (supposons que Pack_byte=9)
 | 
			
		||||
      9   sera encod‚ 9,9,1     (Le 1er 9 dans la s‚quence...
 | 
			
		||||
      9,9 sera encod‚ 9,9,2     ... encod‚e est Pack_byte)
 | 
			
		||||
      etc...
 | 
			
		||||
 | 
			
		||||
  * Il semble ‚vident de trouver des valeurs pour Pack_byte et Pack_word qui
 | 
			
		||||
  ne sont jamais (ou presque) utilis‚es. Donc, une petite routine qui trouve
 | 
			
		||||
  les 2 couleurs les moins utilis‚es dans l'image devrait ˆtre appel‚e avant
 | 
			
		||||
  de commencer la compression. Ceci peut ˆtre r‚alis‚ presque instantan‚ment
 | 
			
		||||
  en Assembleur.
 | 
			
		||||
 | 
			
		||||
  * Quand vous voulez ‚crire une s‚quence de 2 couleurs identiques, ‚crivez
 | 
			
		||||
  simplement ces 2 couleurs l'une aprŠs l'autre (Couleur,Couleur) puisque ‡a
 | 
			
		||||
  ne prend que 2 octets au lieu de 3 si vous aviez ‚crit un paquet (Pack_byte,
 | 
			
		||||
  Couleur,2).
 | 
			
		||||
 | 
			
		||||
  * Si vous compressez une image extrˆmement simple qui comporte une s‚quence
 | 
			
		||||
  de plus de 65535 fois la mˆme couleur cons‚cutivement, vous devez "casser"
 | 
			
		||||
  la s‚quence et continuer avec un nouveau paquet.
 | 
			
		||||
 | 
			
		||||
    Exemple: vous devez compacter les 65635 mˆmes octets cons‚cutifs (de
 | 
			
		||||
             couleur 0 par exemple)
 | 
			
		||||
      (On suppose que Pack_byte=01 et Pack_word=02)
 | 
			
		||||
      Vous devrez alors ‚crire: 02 00 FF FF 01 00 64    (FFFFh=65535, 64h=100)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 | 
			
		||||
³            °±²Û Passer dans les modes vid‚os de GrafX 2.00 Û²±°            ³
 | 
			
		||||
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    Toutes les proc‚dures d'initialisation de mode sont ‚crites en ASM 386. De
 | 
			
		||||
  toutes fa‡ons, si vous ne comprenez pas une ligne d'ASM, je ne vois vraiment
 | 
			
		||||
  pas … quoi pourront vous servir ces proc‚dures.
 | 
			
		||||
 | 
			
		||||
    Elles ont ‚t‚ con‡ues pour ˆtre utilis‚es dans le modŠle de m‚moire FLAT.
 | 
			
		||||
  Mais cela ne devrait pas vous prendre trop de temps de les adapter au modŠle
 | 
			
		||||
  que vous souhaitez utiliser puisqu'il n'y a que les manipulations de m‚moire
 | 
			
		||||
  que cela affectera (utilisez donc DS:SI au lieu de ESI, ES:DI … la place de
 | 
			
		||||
  EDI et faŒtes attention … l'adresse 0A0000h qui se transforme en l'adresse
 | 
			
		||||
  0A000h:0000h).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
MCGA: (Mode VGA standard)
 | 
			
		||||
ÍÍÍÍÍ
 | 
			
		||||
 | 
			
		||||
    Y-a-t'il quelqu'un sur cette planŠte qui ne sache toujours pas comment
 | 
			
		||||
  on passe en mode MCGA 320x200 en 256 couleurs ??!?
 | 
			
		||||
    Bon... Je suppose que vous ˆtes un novice si vous lisez les 2 lignes
 | 
			
		||||
  suivantes :)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    mov  ax,0013h
 | 
			
		||||
    int  10h
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Modes X: (Modes VGA ‚tendus)
 | 
			
		||||
ÍÍÍÍÍÍÍÍ
 | 
			
		||||
 | 
			
		||||
    Bon... Il me semble que le Mode X original ‚tait en 320x240, mais
 | 
			
		||||
  maintenant tout le monde appelle "Modes X" (ou X-Modes, ou Tweaked modes)
 | 
			
		||||
  tous les modes VGA qui utilise plus de 64Ko de m‚moire vid‚o et la structure
 | 
			
		||||
  "Unchained".
 | 
			
		||||
    Afficher un pixel dans n'importe quel Mode X peut ˆtre effectu‚ par la
 | 
			
		||||
  mˆme et unique fonction (mais je ne vous expliquerai pas comment faire, il
 | 
			
		||||
  vous suffit d'indiquer … la fonction la taille des plans (Largeur/4)).
 | 
			
		||||
    Si vous ne comprenez rien … ce que je dis, (Unchained, plans...) il vous
 | 
			
		||||
  suffit de lire n'importe quelle bonne documentation sur le Mode X.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    Nous tenons … remercier les auteurs de XLIB2 pour nous avoir ‚conomis‚ du
 | 
			
		||||
  temps en ayant ‚crit cette fonction. Nous l'avons l‚gŠrement optimis‚e en
 | 
			
		||||
  fonction de nos besoins, mais l'essentiel en a ‚t‚ conserv‚.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    mov  ax,13h      ; Oui! Encore le mode MCGA! Tous les Modes X doivent
 | 
			
		||||
    int  10h         ; commencer … partir du mode VGA standard, mais bien des
 | 
			
		||||
                     ; choses changent par la suite.
 | 
			
		||||
 | 
			
		||||
    mov  dx,3C6h     ; Pour la dur‚e de l'initialisation, on va ‚teindre la
 | 
			
		||||
    xor  al,al       ; palette de fa‡on … ce que l'utilisateur ne subisse pas
 | 
			
		||||
    out  dx,al       ; nos triturations.
 | 
			
		||||
 | 
			
		||||
    mov  dx,3C4h     ; Nous allons demander au registre TIMING SEQUENCER de
 | 
			
		||||
    mov  ax,0604h    ; passer dans le mode "Unchained" (mode X), sans g‚rer de
 | 
			
		||||
    out  dx,ax       ; parit‚, et un accŠs aux 256Ko de la carte vid‚o.
 | 
			
		||||
    mov  ax,0100h    ; On va ensuite enclencher le reset synchrone du registre
 | 
			
		||||
    out  dx,ax       ; TS car on s'apprˆte … jouer avec les registres.
 | 
			
		||||
 | 
			
		||||
    mov  al,01h      ; De la mˆme fa‡on que pour la palette, on demande … la
 | 
			
		||||
    out  dx,al       ; carte vid‚o de ne plus scruter la m‚moire pour
 | 
			
		||||
    inc  dx          ; afficher son contenu. Ainsi, c'est une fa‡on de plus
 | 
			
		||||
    in   al,dx       ; d'‚viter l'affichage parasite qui arrive le temps que
 | 
			
		||||
    mov  ah,al       ; le mode soit totalement initialis‚ et stabilis‚.
 | 
			
		||||
    mov  al,01h      ; De plus, on peut esp‚rer qu'en demandant un arrˆt de
 | 
			
		||||
    push ax          ; la lecture de la m‚moire, le systŠme s'en voit un peu
 | 
			
		||||
    mov  al,ah       ; acc‚l‚r‚, et ainsi acc‚l‚rer l'initialisation du mode
 | 
			
		||||
    or   al,20h      ; graphique (l'espoir fait vivre :))
 | 
			
		||||
    out  dx,al       ;
 | 
			
		||||
 | 
			
		||||
    mov  esi,X_ptr   ; Pointeur sur la liste des constantes … envoyer au CRTC.
 | 
			
		||||
    cld
 | 
			
		||||
 | 
			
		||||
    lodsb            ; Ceci charge dans AL une valeur qui nous dira quoi faire
 | 
			
		||||
                     ; avec le registre MISCELLANEOUS, et incr‚mente ESI.
 | 
			
		||||
                     ; La valeur est ‚gale … ZERO => Rien … faire
 | 
			
		||||
                     ;                      sinon => Envoyer AL au reg. MISC.
 | 
			
		||||
 | 
			
		||||
    or   al,al       ; Devons nous modifier le mode vid‚o de base ?
 | 
			
		||||
    jz   NonMerci    ; Non?Ä¿ En fait, la r‚ponse est toujours "Oui".
 | 
			
		||||
    mov  dx,3C2h     ;      ³ Sauf pour quelques modes tels que le
 | 
			
		||||
    out  dx,al       ;      ³ 320x200 en Mode X
 | 
			
		||||
    NonMerci:        ; <ÄÄÄÄÙ (mais notre mode 320x200 est en MCGA...)
 | 
			
		||||
 | 
			
		||||
    mov  dx,3C4h     ; On en a termin‚ avec les manipulations du registre
 | 
			
		||||
    mov  ax,0300h    ; MISCELLANEOUS, on peut maintenant d‚senclencher le
 | 
			
		||||
    out  dx,ax       ; reset synchrone du registre TIMING SEQUENCER.
 | 
			
		||||
 | 
			
		||||
    ; Et maintenant, si on jouait avec le CRTC?
 | 
			
		||||
 | 
			
		||||
    mov  dx,3D4h     ; Dans le 18Šme registre du CRTC, on va d‚senclencher le
 | 
			
		||||
    mov  al,11h      ; bit de protection. Sans cela, les valeurs que nous
 | 
			
		||||
    out  dx,al       ; aurions envoy‚es aux registres du CRTC auraient ‚t‚
 | 
			
		||||
    inc  dx          ; ignor‚es.
 | 
			
		||||
    in   al,dx
 | 
			
		||||
    and  al,7Fh
 | 
			
		||||
    out  dx,al
 | 
			
		||||
 | 
			
		||||
    dec  dx          ; DX pointe … nouveau sur "l'entr‚e" du registre CRTC.
 | 
			
		||||
    lodsb            ; Ceci met dans AL le nombre de registres CRTC … changer
 | 
			
		||||
    xor  ecx,ecx     ; On doit nettoyer ECX avant de commencer … r‚p‚ter...
 | 
			
		||||
    mov  cl,al       ; ...CL (AL) fois OUTSW
 | 
			
		||||
    rep  outsw       ; On peut envoyer la sauce aux registres du CRTC!
 | 
			
		||||
 | 
			
		||||
    ; Juste au cas o— le 20Šme registre CRTC aurait ‚t‚ oubli‚ dans la table
 | 
			
		||||
    ; d'initialisation, on peut le calculer nous-mˆmes (Ouaip, on est des
 | 
			
		||||
    ; braves gars).
 | 
			
		||||
 | 
			
		||||
    mov  ax,Screen_width ; Vous devez indiquer … la routine quelle est la
 | 
			
		||||
    shr  ax,3            ; largeur de l'‚cran
 | 
			
		||||
    mov  ah,al
 | 
			
		||||
    mov  al,13h
 | 
			
		||||
    out  dx,ax
 | 
			
		||||
 | 
			
		||||
    mov  dx,3C4h     ; Maintenant vous avez la bonne r‚solution mais il peut
 | 
			
		||||
    mov  ax,0F02h    ; y avoir des pixels pourris … l'‚cran … cause de zones
 | 
			
		||||
    out  dx,ax       ; non nettoy‚es de la m‚moire vid‚o.
 | 
			
		||||
    mov  edi,0A0000h ; Donc on va nettoyer la m‚moire … partir de 0A0000h
 | 
			
		||||
    xor  eax,eax     ; avec la valeur 0 (qui est le noir standard) et sur une
 | 
			
		||||
    mov  ecx,4000h   ; longueur de 4000h dwords (256Ko).
 | 
			
		||||
    rep  stosd       ; Allez, liquidez-moi tout ‡a!
 | 
			
		||||
 | 
			
		||||
    mov  dx,3C4h     ; On peut redemander … la carte VGA de relire la m‚moire
 | 
			
		||||
    pop  ax          ; pour afficher l'‚cran...
 | 
			
		||||
    out  dx,ax       ;
 | 
			
		||||
    mov  dx,3C6h     ; ... et r‚tablir la palette pour que l'image soit
 | 
			
		||||
    mov  al,0FFh     ; visible … l'utilisateur.
 | 
			
		||||
    out  dx,al       ;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  La table de constantes que vous devez employer est l'une des suivantes:
 | 
			
		||||
  (Ces tables sont au format C, mais elles peuvent facilement ˆtres employ‚es
 | 
			
		||||
   dans d'autres langages)
 | 
			
		||||
 | 
			
		||||
  word X320Y224[] =
 | 
			
		||||
    { 0x0BA3, 0x6F06, 0xBA07, 0x0008, 0x4109, 0x0810, 0x8A11, 0xBF12, 0x0014,
 | 
			
		||||
      0xC715, 0x0416, 0xE317 };
 | 
			
		||||
  word X320Y240[] =
 | 
			
		||||
    { 0x0AE3, 0x0D06, 0x3E07, 0x4109, 0xEA10, 0xAC11, 0xDF12, 0x0014, 0xE715,
 | 
			
		||||
      0x0616, 0xE317 };
 | 
			
		||||
  word X320Y256[] =
 | 
			
		||||
    { 0x0CE3, 0x2306, 0xB207, 0x0008, 0x6109, 0x0A10, 0xAC11, 0xFF12, 0x2013,
 | 
			
		||||
      0x0014, 0x0715, 0x1A16, 0xE317 };
 | 
			
		||||
  word X320Y270[] =
 | 
			
		||||
    { 0x0BE7, 0x3006, 0xF007, 0x0008, 0x6109, 0x2010, 0xA911, 0x1B12, 0x0014,
 | 
			
		||||
      0x1F15, 0x2F16, 0xE317 };
 | 
			
		||||
  word X320Y282[] =
 | 
			
		||||
    { 0x0CE3, 0x6206, 0xF007, 0x6109, 0x310F, 0x3710, 0x8911, 0x3312, 0x2F13,
 | 
			
		||||
      0x0014, 0x3C15, 0x5C16, 0xE317 };
 | 
			
		||||
  word X320Y300[] =
 | 
			
		||||
    { 0x0DE3, 0x4606, 0x1F07, 0x0008, 0x4009, 0x3110, 0x8011, 0x2B12, 0x2013,
 | 
			
		||||
      0x0014, 0x2F15, 0x4416, 0xE317 };
 | 
			
		||||
  word X320Y360[] =
 | 
			
		||||
    { 0x09E3, 0x4009, 0x8810, 0x8511, 0x6712, 0x2013, 0x0014, 0x6D15, 0xBA16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X320Y400[] =
 | 
			
		||||
    { 0x03E3, 0x4009, 0x0014, 0xE317 };
 | 
			
		||||
  word X320Y448[] =
 | 
			
		||||
    { 0x0BA3, 0x6F06, 0xBA07, 0x0008, 0x4009, 0x0810, 0x8A11, 0xBF12, 0x0014,
 | 
			
		||||
      0xC715, 0x0416, 0xE317 };
 | 
			
		||||
  word X320Y480[] =
 | 
			
		||||
    { 0x0AE3, 0x0D06, 0x3E07, 0x4009, 0xEA10, 0xAC11, 0xDF12, 0x0014, 0xE715,
 | 
			
		||||
      0x0616 , 0xE317};
 | 
			
		||||
  word X320Y512[] =
 | 
			
		||||
    { 0x0CE3, 0x2306, 0xB207, 0x0008, 0x6009, 0x0A10, 0xAC11, 0xFF12, 0x2013,
 | 
			
		||||
      0x0014, 0x0715, 0x1A16, 0xE317 };
 | 
			
		||||
  word X320Y540[] =
 | 
			
		||||
    { 0x0BE7, 0x3006, 0xF007, 0x0008, 0x6009, 0x2010, 0xA911, 0x1B12, 0x0014,
 | 
			
		||||
      0x1F15, 0x2F16, 0xE317 };
 | 
			
		||||
  word X320Y564[] =
 | 
			
		||||
    { 0x0CE7, 0x6206, 0xF007, 0x0008, 0x6009, 0x3E10, 0x8911, 0x3312, 0x2013,
 | 
			
		||||
      0x0014, 0x3C15, 0x5C16, 0xE317 };
 | 
			
		||||
  word X320Y600[] =
 | 
			
		||||
    { 0x0BE7, 0xBE06, 0xF007, 0x0008, 0x6009, 0x7C10, 0x8C11, 0x5712, 0x0014,
 | 
			
		||||
      0x5815, 0x7016, 0xE317 };
 | 
			
		||||
  word X360Y200[] =
 | 
			
		||||
    { 0x09E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x2D13, 0x0014,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y224[] =
 | 
			
		||||
    { 0x12A7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x6F06, 0xBA07,
 | 
			
		||||
      0x0008, 0x4109, 0x0810, 0x8A11, 0xBF12, 0x2D13, 0x0014, 0xC715, 0x0416,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y240[] =
 | 
			
		||||
    { 0x11E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x0D06, 0x3E07,
 | 
			
		||||
      0x4109, 0xEA10, 0xAC11, 0xDF12, 0x2D13, 0x0014, 0xE715, 0x0616, 0xE317 };
 | 
			
		||||
  word X360Y256[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x2B06, 0xB207,
 | 
			
		||||
      0x0008, 0x6109, 0x0E10, 0xAC11, 0xFF12, 0x2D13, 0x0014, 0x0715, 0x1A16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y270[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x3006, 0xF007,
 | 
			
		||||
      0x0008, 0x6109, 0x2010, 0xA911, 0x1B12, 0x2D13, 0x0014, 0x1F15, 0x2F16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y282[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x6206, 0xF007,
 | 
			
		||||
      0x6109, 0x310F, 0x3710, 0x8911, 0x3312, 0x2D13, 0x0014, 0x3C15, 0x5C16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y300[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x4606, 0x1F07,
 | 
			
		||||
      0x0008, 0x4009, 0x3110, 0x8011, 0x2B12, 0x2D13, 0x0014, 0x2F15, 0x4416,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y360[] =
 | 
			
		||||
    { 0x0FE7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x4009, 0x8810,
 | 
			
		||||
      0x8511, 0x6712, 0x2D13, 0x0014, 0x6D15, 0xBA16, 0xE317 };
 | 
			
		||||
  word X360Y400[] =
 | 
			
		||||
    { 0x0AE7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x4009, 0x2D13,
 | 
			
		||||
      0x0014, 0xE317 };
 | 
			
		||||
  word X360Y448[] =
 | 
			
		||||
    { 0x12A7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x6F06, 0xBA07,
 | 
			
		||||
      0x0008, 0x4009, 0x0810, 0x8A11, 0xBF12, 0x2D13, 0x0014, 0xC715, 0x0416,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y480[] =
 | 
			
		||||
    { 0x11E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x0D06, 0x3E07,
 | 
			
		||||
      0x4009, 0xEA10, 0xAC11, 0xDF12, 0x2D13, 0x0014, 0xE715, 0x0616, 0xE317 };
 | 
			
		||||
  word X360Y512[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x2B06, 0xB207,
 | 
			
		||||
      0x0008, 0x6009, 0x0E10, 0xAC11, 0xff12, 0x2D13, 0x0014, 0x0715, 0x1A16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y540[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x3006, 0xF007,
 | 
			
		||||
      0x0008, 0x6009, 0x2010, 0xA911, 0x1B12, 0x2D13, 0x0014, 0x1F15, 0x2F16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y564[] =
 | 
			
		||||
    { 0x12EB, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0x6206, 0xF007,
 | 
			
		||||
      0x0008, 0x6009, 0x3E10, 0x8911, 0x3312, 0x2D13, 0x0014, 0x3C15, 0x5C16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X360Y600[] =
 | 
			
		||||
    { 0x12E7, 0x6B00, 0x5901, 0x5A02, 0x8E03, 0x5E04, 0x8A05, 0xBE06, 0xF007,
 | 
			
		||||
      0x0008, 0x6009, 0x7C10, 0x8C11, 0x5712, 0x2D13, 0x0014, 0x5815, 0x7016,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y200[] =
 | 
			
		||||
    { 0x09E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x3213, 0x0014,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y224[] =
 | 
			
		||||
    { 0x12A7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x6F06, 0xBA07,
 | 
			
		||||
      0x0008, 0x4109, 0x0810, 0x8A11, 0xBF12, 0x3213, 0x0014, 0xC715, 0x0416,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y240[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x0D06, 0x3E07,
 | 
			
		||||
      0x0008, 0x4109, 0xEA10, 0xAC11, 0xDF12, 0x3213, 0x0014, 0xE715, 0x0616,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y256[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x2B06, 0xB207,
 | 
			
		||||
      0x0008, 0x6109, 0x1310, 0xAC11, 0xFF12, 0x3213, 0x0014, 0x0715, 0x1A16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y270[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x3006, 0xF007,
 | 
			
		||||
      0x0008, 0x6109, 0x2010, 0xA911, 0x1B12, 0x3213, 0x0014, 0x1F15, 0x2F16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y282[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x6206, 0xF007,
 | 
			
		||||
      0x6109, 0x310F, 0x3710, 0x8911, 0x3312, 0x3213, 0x0014, 0x3C15, 0x5C16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y300[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x4606, 0x1F07,
 | 
			
		||||
      0x0008, 0x4009, 0x3110, 0x8011, 0x2B12, 0x3213, 0x0014, 0x2F15, 0x4416,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y360[] =
 | 
			
		||||
    { 0x0FE7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x4009, 0x8810,
 | 
			
		||||
      0x8511, 0x6712, 0x3213, 0x0014, 0x6D15, 0xBA16, 0xE317 };
 | 
			
		||||
  word X400Y400[] =
 | 
			
		||||
    { 0x0AE7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x4009, 0x3213,
 | 
			
		||||
      0x0014, 0xE317 };
 | 
			
		||||
  word X400Y448[] =
 | 
			
		||||
    { 0x12A7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x6F06, 0xBA07,
 | 
			
		||||
      0x0008, 0x4009, 0x0810, 0x8A11, 0xBF12, 0x3213, 0x0014, 0xC715, 0x0416,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y480[] =
 | 
			
		||||
    { 0x11E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x0D06, 0x3E07,
 | 
			
		||||
      0x4009, 0xEA10, 0xAC11, 0xDF12, 0x3213, 0x0014, 0xE715, 0x0616, 0xE317 };
 | 
			
		||||
  word X400Y512[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x2B06, 0xB207,
 | 
			
		||||
      0x0008, 0x6009, 0x1310, 0xAC11, 0xFF12, 0x3213, 0x0014, 0x0715, 0x1A16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y540[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x3006, 0xF007,
 | 
			
		||||
      0x0008, 0x6009, 0x2010, 0xA911, 0x1B12, 0x3213, 0x0014, 0x1F15, 0x2F16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y564[] =
 | 
			
		||||
    { 0x12EB, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0x6206, 0xF007,
 | 
			
		||||
      0x0008, 0x6009, 0x3E10, 0x8911, 0x3312, 0x3213, 0x0014, 0x3C15, 0x5C16,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
  word X400Y600[] =
 | 
			
		||||
    { 0x12E7, 0x7100, 0x6301, 0x6402, 0x9203, 0x6604, 0x8205, 0xBE06, 0xF007,
 | 
			
		||||
      0x0008, 0x6009, 0x7C10, 0x8C11, 0x5712, 0x3213, 0x0014, 0x5815, 0x7016,
 | 
			
		||||
      0xE317 };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  La structure: (exemple)
 | 
			
		||||
 | 
			
		||||
       ÚÄÄÄÄCeci est le nombre de valeurs … envoyer aux registres CRTC. C'est
 | 
			
		||||
       ³    en fait le nombre de words dans la table moins 1 (… cause du 1er
 | 
			
		||||
       ³    word de la table qui n'est pas envoy‚ au CRTC mais qui contient
 | 
			
		||||
       ³    une valeur … envoyer au registre MISCELLANEOUS et le nombre de
 | 
			
		||||
       ³    valeurs … envoyer aux registres CRTC ;) ).
 | 
			
		||||
       ³
 | 
			
		||||
       ³ ÚÄÄCeci est la valeur … envoyer au registre MISCELLANEOUS (ou 0 si
 | 
			
		||||
       ³ ³  aucune valeur ne doit y ˆtre envoy‚e).
 | 
			
		||||
       ³ ³
 | 
			
		||||
       ³ ³     ÚÄÄÄCeci est une valeur … envoyer dans un registre du CRTC.
 | 
			
		||||
       ³ ³     ³
 | 
			
		||||
       ³ ³     ³ ÚÄCeci est le num‚ro du registre du CRTC qui recevra la
 | 
			
		||||
       ³ ³     ³ ³ valeur cit‚e pr‚c‚demment.
 | 
			
		||||
       ÿÿ    ÿÿ
 | 
			
		||||
   { 0x0AE3, 0x0D06, 0x3E07, 0x4109, 0xEA10, 0xAC11, 0xDF12, 0x0014, 0xE715,
 | 
			
		||||
     0x0616, 0xE317 };
 | 
			
		||||
 | 
			
		||||
    Vous pouvez remarquer que les registres 0 … 5 (et le 13h) du CRTC
 | 
			
		||||
  d‚finissent la largeur de l'‚cran, alors que les registres 6 … 17h (…
 | 
			
		||||
  l'exception du 13h) definissent la hauteur de l'‚cran.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    Nous avons plus de modes en poche que les quelques-uns :) que nous avons
 | 
			
		||||
  inclus dans GrafX 2.00, mais ils ne sont ni vraiment utiles ni vraiment
 | 
			
		||||
  stables. Nous pourrons toutefois d‚cider de les inclure dans une prochaine
 | 
			
		||||
  version.
 | 
			
		||||
    S'il manque certains de vos modes pr‚f‚res, envoyez nous simplement la
 | 
			
		||||
  liste des constantes que l'on doit balancer au CRTC … la maniŠre de la
 | 
			
		||||
  structure utilis‚e ci-dessus.
 | 
			
		||||
 | 
			
		||||
  IMPORTANT! Les valeurs des constantes cit‚es plus haut ne sont pas
 | 
			
		||||
             support‚es par tous les moniteurs ou les cartes vid‚os.
 | 
			
		||||
             Nous avons test‚ GrafX2 avec diff‚rentes configurations et avons
 | 
			
		||||
             constat‚s que certains modes ne marchent pas du tout avec
 | 
			
		||||
             certaines cartes vid‚os, alors que d'autres d‚bordent de l'‚cran,
 | 
			
		||||
             sont d‚centr‚s, assombris, trop clairs, ou tass‚s.
 | 
			
		||||
             Toutefois, ils marchent tous correctement avec notre pauvre
 | 
			
		||||
             petite Tseng Labs ET4000...
 | 
			
		||||
 | 
			
		||||
  Si vous avez d‚j… une bonne connaissance … propos du CRTC, et avez des
 | 
			
		||||
  valeurs diff‚rentes des notres pour certains modes, merci de nous en
 | 
			
		||||
  informer. Nous nous en servirons s'ils marchent mieux sur une majorit‚
 | 
			
		||||
  d'ordinateurs.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
VESA: (Un "pseudo-standard" pour les modes Super-VGA)
 | 
			
		||||
ÍÍÍÍÍ
 | 
			
		||||
 | 
			
		||||
    Nous nous servons du VESA pour des modes qui n‚cessitent une largeur de
 | 
			
		||||
  640, 800 ou 1024 pixels. Mais il existe un moyen de combiner la hauteur des
 | 
			
		||||
  Modes X avec les modes VESA, il est ainsi possible d'avoir des modes aussi
 | 
			
		||||
  timbr‚s qu'en Mode X.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  mov  ax,4F02h
 | 
			
		||||
  mov  bx,Video_mode
 | 
			
		||||
  int  10h
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  Les modes VESA 256 couleur VESA sont:
 | 
			
		||||
    100h :  640x400
 | 
			
		||||
    101h :  640x480
 | 
			
		||||
    103h :  800x600
 | 
			
		||||
    105h : 1024x768
 | 
			
		||||
    107h : 1280x1024 (non disponible dans GrafX2 parce qu'uniquement support‚
 | 
			
		||||
                     par des cartes vid‚o avec 2 Megaoctets ou plus de m‚moire
 | 
			
		||||
                     vid‚o)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  Comme avec les Modes X, vous pouvez modifier les registres CRTC pour acc‚der
 | 
			
		||||
  aux modes "VESA-X"! (Notez que certaines cartes vid‚o ne supportent pas les
 | 
			
		||||
  modifications des registres du CRTC VGA dans les modes VESA.)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  Pour passer dans ces modes ‚tendus, passez dans un mode VESA standard ayant
 | 
			
		||||
  la bonne largeur, puis appelez Modif_registres_CRTC avec la bonne table de
 | 
			
		||||
  hauteur.
 | 
			
		||||
 | 
			
		||||
  Exemple (640x512) :
 | 
			
		||||
    VESA_Set_mode(101h)         // On passe dans un mode qui a la mˆme largeur
 | 
			
		||||
    Modif_registres_CRTC(Y512)  // On modifie la hauteur
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  * Tables des hauteurs:
 | 
			
		||||
 | 
			
		||||
  word Y224[] =
 | 
			
		||||
    { 0x09A3, 0x6F06, 0xBA07, 0x0008, 0x4109, 0x0810, 0x8A11, 0xBF12, 0xC715,
 | 
			
		||||
      0x0416 };
 | 
			
		||||
  word Y240[] =
 | 
			
		||||
    { 0x09E3, 0x0D06, 0x3E07, 0x0008, 0x4109, 0xEA10, 0xAC11, 0xDF12, 0xE715,
 | 
			
		||||
      0x0616 };
 | 
			
		||||
  word Y256[] =
 | 
			
		||||
    { 0x0900, 0x2B06, 0xB207, 0x0008, 0x6109, 0x0A10, 0xAC11, 0xFF12, 0x0715,
 | 
			
		||||
      0x1A16 };
 | 
			
		||||
  word Y270[] =
 | 
			
		||||
    { 0x09E7, 0x3006, 0xF007, 0x0008, 0x6109, 0x2010, 0xA911, 0x1B12, 0x1F15,
 | 
			
		||||
      0x2F16 };
 | 
			
		||||
  word Y282[] =
 | 
			
		||||
    { 0x0AE3, 0x6206, 0xF007, 0x0008, 0x6109, 0x310F, 0x3710, 0x8911, 0x3312,
 | 
			
		||||
      0x3C15, 0x5C16 };
 | 
			
		||||
  word Y300[] =
 | 
			
		||||
    { 0x09E3, 0x4606, 0x1F07, 0x0008, 0x4009, 0x3110, 0x8011, 0x2B12, 0x2F15,
 | 
			
		||||
      0x4416 };
 | 
			
		||||
  word Y350[] =
 | 
			
		||||
    { 0x09A3, 0xBF06, 0x1F07, 0x0008, 0x4009, 0x8310, 0x8511, 0x5D12, 0x6315,
 | 
			
		||||
      0xBA16 };
 | 
			
		||||
  word Y360[] =
 | 
			
		||||
    { 0x07E3, 0x0008, 0x4009, 0x8810, 0x8511, 0x6712, 0x6D15, 0xBA16 };
 | 
			
		||||
  word Y400[] =
 | 
			
		||||
    { 0x01E3, 0x4009 };
 | 
			
		||||
  word Y448[] =
 | 
			
		||||
    { 0x09A3, 0x6F06, 0xBA07, 0x0008, 0x4009, 0x0810, 0x8A11, 0xBF12, 0xC715,
 | 
			
		||||
      0x0416 };
 | 
			
		||||
  word Y480[] =
 | 
			
		||||
    { 0x09E3, 0x0D06, 0x3E07, 0x0008, 0x4009, 0xEA10, 0xAC11, 0xDF12, 0xE715,
 | 
			
		||||
      0x0616 };
 | 
			
		||||
  word Y512[] =
 | 
			
		||||
    { 0x0900, 0x2B06, 0xB207, 0x0008, 0x6009, 0x0A10, 0xAC11, 0xFF12, 0x0715,
 | 
			
		||||
      0x1A16 };
 | 
			
		||||
  word Y540[] =
 | 
			
		||||
    { 0x09E7, 0x3006, 0xF007, 0x0008, 0x6009, 0x2010, 0xA911, 0x1B12, 0x1F15,
 | 
			
		||||
      0x2F16 };
 | 
			
		||||
  word Y564[] =
 | 
			
		||||
    { 0x09E7, 0x6206, 0xF007, 0x0008, 0x6009, 0x3E10, 0x8911, 0x3312, 0x3C15,
 | 
			
		||||
      0x5C16 };
 | 
			
		||||
  word Y600[] =
 | 
			
		||||
    { 0x09E7, 0xBE06, 0xF007, 0x0008, 0x6009, 0x7C10, 0x8C11, 0x5712, 0x5815,
 | 
			
		||||
      0x7016 };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  Modifier les registres CRTC: (inspir‚ de l'init. des Modes X... voir plus
 | 
			
		||||
  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ  haut pour de plus amples d‚tails)
 | 
			
		||||
 | 
			
		||||
  mov  esi,XVESA_Ptr
 | 
			
		||||
  cld
 | 
			
		||||
 | 
			
		||||
  lodsb
 | 
			
		||||
  or   al,al       ; Devons nous modifier le mode vid‚o de base ?
 | 
			
		||||
  jz   NonMerci    ; Non?Ä¿ La r‚ponse peut ˆtre "Non" car les initialisations
 | 
			
		||||
  mov  dx,3C2h     ;      ³ de certains modes VESA mettent directement la
 | 
			
		||||
  out  dx,al       ;      ³ bonne valeur pour le registre MISCELLANEOUS.
 | 
			
		||||
  NonMerci:        ; <ÄÄÄÄÙ
 | 
			
		||||
 | 
			
		||||
  mov  dx,3D4h
 | 
			
		||||
  mov  al,11h
 | 
			
		||||
  out  dx,al
 | 
			
		||||
  inc  dx
 | 
			
		||||
  in   al,dx
 | 
			
		||||
  and  al,7Fh
 | 
			
		||||
  out  dx,al
 | 
			
		||||
 | 
			
		||||
  dec  dx
 | 
			
		||||
  lodsb
 | 
			
		||||
  xor  ecx,ecx
 | 
			
		||||
  mov  cl,al
 | 
			
		||||
  rep  outsw
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    Si vous ˆtes suffisament astucieux, vous pourrez combiner les constantes
 | 
			
		||||
  utilis‚es dans les Modes X pour obtenir plus de modes "VESA-X" tels que le
 | 
			
		||||
  640x200, 800x480, etc... (mais je ne pense pas que ‡a marche convenablement
 | 
			
		||||
  avec les largeurs de 1024 pixels puisque ce mode est g‚n‚ralement
 | 
			
		||||
  entrelac‚... Mais qui sait?...)
 | 
			
		||||
    Je pense que le plus difficile est de trouver la bonne valeur du registre
 | 
			
		||||
  MISCELLANEOUS.
 | 
			
		||||
							
								
								
									
										26
									
								
								doc/todo.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								doc/todo.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,26 @@
 | 
			
		||||
WHAT WE STILL HAVE TO DO TO "COMPLETE" GRAFX 2.00:
 | 
			
		||||
 | 
			
		||||
    - Rectangles filled with gradation
 | 
			
		||||
    - Distort brushes
 | 
			
		||||
    - Allow to use HSB values to define colors.
 | 
			
		||||
    - FX on the picture (flip, stretch, shrink, ...)
 | 
			
		||||
    - Text (we hope we'll be able to use TrueType fonts)
 | 
			
		||||
    - Improve clicks on buttons in the menus (don't block the mouse).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
OTHER POSSIBLE IMPROVEMENTS:
 | 
			
		||||
 | 
			
		||||
    - Add "Anti-aliasing" mode.
 | 
			
		||||
    - Add more drawing modes.
 | 
			
		||||
    - Support Windows 95 long filenames.
 | 
			
		||||
    - Add more video modes and fix some others.
 | 
			
		||||
    - Add PiNG, TIFf, TarGA and JPeG file supports (in our dreams ;)).
 | 
			
		||||
    - Allow to load more types of truecolor pictures with Dithering or
 | 
			
		||||
      Floyd/Steinberg color reduction.
 | 
			
		||||
    - Add Pop-up menus.
 | 
			
		||||
    - Palette sort.
 | 
			
		||||
    - ...
 | 
			
		||||
    - Fix unknown (and known) bugs! :)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Note: There is no special order for the things to do listed above.
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user