@@ -21,7 +21,12 @@ static const char *CONF_PATH_HOME =
2121#include "log.h"
2222
2323// Emulator dynamic configuration
24- static struct { bool cge_installed ; } conf ;
24+ static struct {
25+ bool cge_installed ;
26+ ceda_string_t * bios_rom_path ;
27+ ceda_string_t * char_rom_path ;
28+ ceda_string_t * cge_rom_path ;
29+ } conf ;
2530
2631typedef enum conf_type_t {
2732 CONF_NONE ,
@@ -41,6 +46,9 @@ typedef struct conf_tuple_t {
4146
4247static conf_tuple_t conf_tuples [] = {
4348 {"mod" , "cge_installed" , CONF_BOOL , & conf .cge_installed },
49+ {"path" , "bios_rom" , CONF_STR , & conf .bios_rom_path },
50+ {"path" , "char_rom" , CONF_STR , & conf .char_rom_path },
51+ {"path" , "cge_rom" , CONF_STR , & conf .cge_rom_path },
4452 {NULL , NULL , CONF_NONE , NULL },
4553};
4654
@@ -192,6 +200,15 @@ bool *conf_getBool(const char *section, const char *key) {
192200 return conf_getType (conf_tuples , section , key , CONF_BOOL );
193201}
194202
203+ const char * conf_getString (const char * section , const char * key ) {
204+ ceda_string_t * * string = conf_getType (conf_tuples , section , key , CONF_STR );
205+
206+ if (string == NULL || * string == NULL )
207+ return NULL ;
208+
209+ return ceda_string_data (* string );
210+ }
211+
195212#if defined(CEDA_TEST )
196213
197214#include "hexdump.h"
0 commit comments