Rename DECB binary files related functions
This commit is contained in:
parent
967bad8f6d
commit
80e381a599
@ -5514,16 +5514,17 @@ void Save_MOTO(T_IO_Context * context)
|
||||
snprintf((char *)vram_forme + 8032, 32, "GrafX2 %s.%s", Program_version, SVN_revision);
|
||||
memcpy(vram_couleur + 8000, vram_forme + 8000, 64);
|
||||
// Format BIN
|
||||
if (!MOTO_BIN_Add_Chunk(file, 1, reg_prc, &prc_value))
|
||||
// TO8/TO9 : set LGAMOD 0xE7DC 40col=0 bm4=0x21 80col=0x2a bm16=0x7b
|
||||
if (!DECB_BIN_Add_Chunk(file, 1, reg_prc, &prc_value))
|
||||
goto error;
|
||||
if (!MOTO_BIN_Add_Chunk(file, 8000+64, 0x4000, vram_forme))
|
||||
if (!DECB_BIN_Add_Chunk(file, 8000+64, 0x4000, vram_forme))
|
||||
goto error;
|
||||
prc_value &= 0xFE; // select color data
|
||||
if (!MOTO_BIN_Add_Chunk(file, 1, reg_prc, &prc_value))
|
||||
if (!DECB_BIN_Add_Chunk(file, 1, reg_prc, &prc_value))
|
||||
goto error;
|
||||
if (!MOTO_BIN_Add_Chunk(file, 8000+64, 0x4000, vram_couleur))
|
||||
if (!DECB_BIN_Add_Chunk(file, 8000+64, 0x4000, vram_couleur))
|
||||
goto error;
|
||||
if (!MOTO_BIN_Add_End(file, 0x0000))
|
||||
if (!DECB_BIN_Add_End(file, 0x0000))
|
||||
goto error;
|
||||
// TODO : format MAP
|
||||
fclose(file);
|
||||
|
||||
@ -473,7 +473,7 @@ int MOTO_Check_binary_file(FILE * f)
|
||||
return type;
|
||||
}
|
||||
|
||||
int MOTO_BIN_Add_Chunk(FILE * f, word size, word address, const byte * data)
|
||||
int DECB_BIN_Add_Chunk(FILE * f, word size, word address, const byte * data)
|
||||
{
|
||||
return Write_byte(f, 0)
|
||||
&& Write_word_be(f, size)
|
||||
@ -481,7 +481,7 @@ int MOTO_BIN_Add_Chunk(FILE * f, word size, word address, const byte * data)
|
||||
&& Write_bytes(f, data, size);
|
||||
}
|
||||
|
||||
int MOTO_BIN_Add_End(FILE * f, word address)
|
||||
int DECB_BIN_Add_End(FILE * f, word address)
|
||||
{
|
||||
return Write_byte(f, 0xff)
|
||||
&& Write_word_be(f, 0)
|
||||
|
||||
10
src/oldies.h
10
src/oldies.h
@ -35,7 +35,7 @@ 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
|
||||
* Add a chunk to a DECB binary file
|
||||
*
|
||||
* @param f open file
|
||||
* @param size size of the memory chunk
|
||||
@ -43,17 +43,19 @@ int C64_FLI_enforcer(void);
|
||||
* @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);
|
||||
int DECB_BIN_Add_Chunk(FILE * f, word size, word address, const byte * data);
|
||||
|
||||
/**
|
||||
* Add a chunk to a Thomson MO/TO binary file
|
||||
* Add a chunk to a DECB 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);
|
||||
int DECB_BIN_Add_End(FILE * f, word address);
|
||||
|
||||
|
||||
int DECB_Check_binary_file(FILE * f);
|
||||
/**
|
||||
* Checks if the file is a Thomson binary file (SAVEM/LOADM format)
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user