oldies.c: Add Thomson MOTO functions

This commit is contained in:
Thomas Bernard
2018-11-14 11:21:46 +01:00
parent d32390a943
commit ffd2c7e8ce
2 changed files with 127 additions and 1 deletions

View File

@@ -19,7 +19,7 @@
*/
///@file oldies.h
/// C64 FLI functions
/// functions relative to old computers (Commodore 64, Thomsons MO/TO, Amstrad CPC, ZX Spectrum, etc.)
/**
* Save a 3 layer picture to C64 FLI format
@@ -34,3 +34,40 @@ int C64_FLI(byte *bitmap, byte *screen_ram, byte *color_ram, byte *background);
int C64_FLI_enforcer(void);
/**
* Add a chunk to a Thomson MO/TO binary file
*
* @param f open file
* @param size size of the memory chunk
* @param address load address of the memory chunk
* @param data data to add in memory chunk
* @return true for success
*/
int MOTO_BIN_Add_Chunk(FILE * f, word size, word address, const byte * data);
/**
* Add a chunk to a Thomson MO/TO binary file
*
* @param f open file
* @param address run address of the binary file (LOADM,,R)
* @return true for success
*/
int MOTO_BIN_Add_End(FILE * f, word address);
/**
* Checks if the file is a Thomson binary file (SAVEM/LOADM format)
*
* @param f a file open for reading
* @return 0 if this is not a binary file
* @return >0 if this is a binary file :
* @return 1 no further details found
* @return 2 This is likely a MAP file (SAVEP/LOADP format)
* @return 3 This is likely a TO autoloading picture
* @return 4 This is likely a MO5/MO6 autoloading picture
*/
int MOTO_Check_binary_file(FILE * f);
/**
* Convert a RGB value to Thomson BGR value with gamma correction.
*/
word MOTO_gamma_correct_RGB_to_MOTO(T_Components * color);