NVR files now stored per-config.
This commit is contained in:
parent
9f2b58b7c4
commit
a44fcb196b
47 changed files with 32 additions and 4 deletions
BIN
nvr/default/430vx.nvr
Normal file
BIN
nvr/default/430vx.nvr
Normal file
Binary file not shown.
BIN
nvr/default/acer386.nvr
Normal file
BIN
nvr/default/acer386.nvr
Normal file
Binary file not shown.
BIN
nvr/default/adgold.bin
Normal file
BIN
nvr/default/adgold.bin
Normal file
Binary file not shown.
BIN
nvr/default/aha1542c.nvr
Normal file
BIN
nvr/default/aha1542c.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ami286.nvr
Normal file
BIN
nvr/default/ami286.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ami386.nvr
Normal file
BIN
nvr/default/ami386.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ami386dx_opti495.nvr
Normal file
BIN
nvr/default/ami386dx_opti495.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ami486.nvr
Normal file
BIN
nvr/default/ami486.nvr
Normal file
Binary file not shown.
BIN
nvr/default/at.nvr
Normal file
BIN
nvr/default/at.nvr
Normal file
Binary file not shown.
BIN
nvr/default/award286.nvr
Normal file
BIN
nvr/default/award286.nvr
Normal file
Binary file not shown.
BIN
nvr/default/cmdpc30.nvr
Normal file
BIN
nvr/default/cmdpc30.nvr
Normal file
Binary file not shown.
BIN
nvr/default/dell200.nvr
Normal file
BIN
nvr/default/dell200.nvr
Normal file
Binary file not shown.
BIN
nvr/default/deskpro386.nvr
Normal file
BIN
nvr/default/deskpro386.nvr
Normal file
Binary file not shown.
BIN
nvr/default/endeavor.nvr
Normal file
BIN
nvr/default/endeavor.nvr
Normal file
Binary file not shown.
BIN
nvr/default/europc.nvr
Normal file
BIN
nvr/default/europc.nvr
Normal file
Binary file not shown.
BIN
nvr/default/gw286ct.nvr
Normal file
BIN
nvr/default/gw286ct.nvr
Normal file
Binary file not shown.
BIN
nvr/default/hot-433.nvr
Normal file
BIN
nvr/default/hot-433.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ibmps1_2011.nvr
Normal file
BIN
nvr/default/ibmps1_2011.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ibmps1_2121.nvr
Normal file
BIN
nvr/default/ibmps1_2121.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ibmps2_m50.nvr
Normal file
BIN
nvr/default/ibmps2_m50.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ibmps2_m55sx.nvr
Normal file
BIN
nvr/default/ibmps2_m55sx.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ibmps2_m60.nvr
Normal file
BIN
nvr/default/ibmps2_m60.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ibmps2_m65sx.nvr
Normal file
BIN
nvr/default/ibmps2_m65sx.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ibmps2_m70.nvr
Normal file
BIN
nvr/default/ibmps2_m70.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ibmps2_m70_sec.nvr
Normal file
BIN
nvr/default/ibmps2_m70_sec.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ibmps2_m80.nvr
Normal file
BIN
nvr/default/ibmps2_m80.nvr
Normal file
Binary file not shown.
BIN
nvr/default/ibmps2_m80_sec.nvr
Normal file
BIN
nvr/default/ibmps2_m80_sec.nvr
Normal file
Binary file not shown.
BIN
nvr/default/kmxc02.nvr
Normal file
BIN
nvr/default/kmxc02.nvr
Normal file
Binary file not shown.
BIN
nvr/default/megapc.nvr
Normal file
BIN
nvr/default/megapc.nvr
Normal file
Binary file not shown.
BIN
nvr/default/mr386dx_opti495.nvr
Normal file
BIN
nvr/default/mr386dx_opti495.nvr
Normal file
Binary file not shown.
BIN
nvr/default/pc1512.nvr
Normal file
BIN
nvr/default/pc1512.nvr
Normal file
Binary file not shown.
BIN
nvr/default/pc1640.nvr
Normal file
BIN
nvr/default/pc1640.nvr
Normal file
Binary file not shown.
1
nvr/default/pc200.nvr
Normal file
1
nvr/default/pc200.nvr
Normal file
|
|
@ -0,0 +1 @@
|
|||
X<EFBFBD><19><19><02><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
BIN
nvr/default/pc2086.nvr
Normal file
BIN
nvr/default/pc2086.nvr
Normal file
Binary file not shown.
BIN
nvr/default/pc3086.nvr
Normal file
BIN
nvr/default/pc3086.nvr
Normal file
Binary file not shown.
BIN
nvr/default/revenge.nvr
Normal file
BIN
nvr/default/revenge.nvr
Normal file
Binary file not shown.
BIN
nvr/default/sis496.nvr
Normal file
BIN
nvr/default/sis496.nvr
Normal file
Binary file not shown.
BIN
nvr/default/spc4200p.nvr
Normal file
BIN
nvr/default/spc4200p.nvr
Normal file
Binary file not shown.
BIN
nvr/default/spc4216p.nvr
Normal file
BIN
nvr/default/spc4216p.nvr
Normal file
Binary file not shown.
BIN
nvr/default/tandy1000hx.bin
Normal file
BIN
nvr/default/tandy1000hx.bin
Normal file
Binary file not shown.
BIN
nvr/default/tandy1000sl2.bin
Normal file
BIN
nvr/default/tandy1000sl2.bin
Normal file
Binary file not shown.
BIN
nvr/default/win486.nvr
Normal file
BIN
nvr/default/win486.nvr
Normal file
Binary file not shown.
|
|
@ -5,6 +5,7 @@
|
|||
#include "config.h"
|
||||
|
||||
char config_file_default[256];
|
||||
char config_name[256];
|
||||
|
||||
static char config_file[256];
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ void config_dump(int is_global);
|
|||
void config_free(int is_global);
|
||||
|
||||
extern char config_file_default[256];
|
||||
extern char config_name[256];
|
||||
|
||||
#define CFG_MACHINE 0
|
||||
#define CFG_GLOBAL 1
|
||||
|
|
|
|||
25
src/nvr.c
25
src/nvr.c
|
|
@ -23,11 +23,32 @@ static int rtctime;
|
|||
FILE *nvrfopen(char *fn, char *mode)
|
||||
{
|
||||
char s[512];
|
||||
|
||||
FILE *f;
|
||||
|
||||
strcpy(s, nvr_path);
|
||||
put_backslash(s);
|
||||
strcat(s, config_name);
|
||||
strcat(s, ".");
|
||||
strcat(s, fn);
|
||||
return fopen(s, mode);
|
||||
pclog("NVR try opening %s\n", s);
|
||||
f = fopen(s, mode);
|
||||
if (f)
|
||||
return f;
|
||||
|
||||
if (mode[0] == 'r')
|
||||
{
|
||||
strcpy(s, nvr_path);
|
||||
put_backslash(s);
|
||||
strcat(s, "default");
|
||||
put_backslash(s);
|
||||
strcat(s, fn);
|
||||
return fopen(s, mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
pclog("Failed to open file '%s' for write\n", s);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void getnvrtime()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include "ibm.h"
|
||||
#include "nvr.h"
|
||||
#include "vid_ati_eeprom.h"
|
||||
|
||||
enum
|
||||
|
|
@ -33,7 +34,7 @@ void ati_eeprom_load(ati_eeprom_t *eeprom, char *fn, int type)
|
|||
FILE *f;
|
||||
eeprom->type = type;
|
||||
strcpy(eeprom->fn, fn);
|
||||
f = romfopen(eeprom->fn, "rb");
|
||||
f = nvrfopen(eeprom->fn, "rb");
|
||||
if (!f)
|
||||
{
|
||||
memset(eeprom->data, 0, eeprom->type ? 512 : 128);
|
||||
|
|
@ -45,7 +46,7 @@ void ati_eeprom_load(ati_eeprom_t *eeprom, char *fn, int type)
|
|||
|
||||
void ati_eeprom_save(ati_eeprom_t *eeprom)
|
||||
{
|
||||
FILE *f = romfopen(eeprom->fn, "wb");
|
||||
FILE *f = nvrfopen(eeprom->fn, "wb");
|
||||
if (!f) return;
|
||||
fwrite(eeprom->data, 1, eeprom->type ? 512 : 128, f);
|
||||
fclose(f);
|
||||
|
|
|
|||
|
|
@ -98,6 +98,9 @@ static int run(void* hdlg)
|
|||
pclog("Config name %s\n", cfg);
|
||||
|
||||
strcpy(config_file_default, cfg);
|
||||
strcpy(config_name, s);
|
||||
if (config_name[strlen(config_name)-1] == '.')
|
||||
config_name[strlen(config_name)-1] = 0;
|
||||
|
||||
wx_enddialog(hdlg, 1);
|
||||
// pause = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue