NVR files now stored per-config.

This commit is contained in:
SarahW 2017-10-11 21:36:41 +01:00
commit a44fcb196b
47 changed files with 32 additions and 4 deletions

BIN
nvr/default/430vx.nvr Normal file

Binary file not shown.

BIN
nvr/default/acer386.nvr Normal file

Binary file not shown.

BIN
nvr/default/adgold.bin Normal file

Binary file not shown.

BIN
nvr/default/aha1542c.nvr Normal file

Binary file not shown.

BIN
nvr/default/ami286.nvr Normal file

Binary file not shown.

BIN
nvr/default/ami386.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/ami486.nvr Normal file

Binary file not shown.

BIN
nvr/default/at.nvr Normal file

Binary file not shown.

BIN
nvr/default/award286.nvr Normal file

Binary file not shown.

BIN
nvr/default/cmdpc30.nvr Normal file

Binary file not shown.

BIN
nvr/default/dell200.nvr Normal file

Binary file not shown.

BIN
nvr/default/deskpro386.nvr Normal file

Binary file not shown.

BIN
nvr/default/endeavor.nvr Normal file

Binary file not shown.

BIN
nvr/default/europc.nvr Normal file

Binary file not shown.

BIN
nvr/default/gw286ct.nvr Normal file

Binary file not shown.

BIN
nvr/default/hot-433.nvr Normal file

Binary file not shown.

BIN
nvr/default/ibmps1_2011.nvr Normal file

Binary file not shown.

BIN
nvr/default/ibmps1_2121.nvr Normal file

Binary file not shown.

BIN
nvr/default/ibmps2_m50.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/ibmps2_m60.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/ibmps2_m70.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/ibmps2_m80.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/kmxc02.nvr Normal file

Binary file not shown.

BIN
nvr/default/megapc.nvr Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/pc1512.nvr Normal file

Binary file not shown.

BIN
nvr/default/pc1640.nvr Normal file

Binary file not shown.

1
nvr/default/pc200.nvr Normal file
View 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

Binary file not shown.

BIN
nvr/default/pc3086.nvr Normal file

Binary file not shown.

BIN
nvr/default/revenge.nvr Normal file

Binary file not shown.

BIN
nvr/default/sis496.nvr Normal file

Binary file not shown.

BIN
nvr/default/spc4200p.nvr Normal file

Binary file not shown.

BIN
nvr/default/spc4216p.nvr Normal file

Binary file not shown.

BIN
nvr/default/tandy1000hx.bin Normal file

Binary file not shown.

Binary file not shown.

BIN
nvr/default/win486.nvr Normal file

Binary file not shown.

View file

@ -5,6 +5,7 @@
#include "config.h" #include "config.h"
char config_file_default[256]; char config_file_default[256];
char config_name[256];
static char config_file[256]; static char config_file[256];

View file

@ -21,6 +21,7 @@ void config_dump(int is_global);
void config_free(int is_global); void config_free(int is_global);
extern char config_file_default[256]; extern char config_file_default[256];
extern char config_name[256];
#define CFG_MACHINE 0 #define CFG_MACHINE 0
#define CFG_GLOBAL 1 #define CFG_GLOBAL 1

View file

@ -23,11 +23,32 @@ static int rtctime;
FILE *nvrfopen(char *fn, char *mode) FILE *nvrfopen(char *fn, char *mode)
{ {
char s[512]; char s[512];
FILE *f;
strcpy(s, nvr_path); strcpy(s, nvr_path);
put_backslash(s); put_backslash(s);
strcat(s, config_name);
strcat(s, ".");
strcat(s, fn); 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() void getnvrtime()

View file

@ -1,4 +1,5 @@
#include "ibm.h" #include "ibm.h"
#include "nvr.h"
#include "vid_ati_eeprom.h" #include "vid_ati_eeprom.h"
enum enum
@ -33,7 +34,7 @@ void ati_eeprom_load(ati_eeprom_t *eeprom, char *fn, int type)
FILE *f; FILE *f;
eeprom->type = type; eeprom->type = type;
strcpy(eeprom->fn, fn); strcpy(eeprom->fn, fn);
f = romfopen(eeprom->fn, "rb"); f = nvrfopen(eeprom->fn, "rb");
if (!f) if (!f)
{ {
memset(eeprom->data, 0, eeprom->type ? 512 : 128); 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) void ati_eeprom_save(ati_eeprom_t *eeprom)
{ {
FILE *f = romfopen(eeprom->fn, "wb"); FILE *f = nvrfopen(eeprom->fn, "wb");
if (!f) return; if (!f) return;
fwrite(eeprom->data, 1, eeprom->type ? 512 : 128, f); fwrite(eeprom->data, 1, eeprom->type ? 512 : 128, f);
fclose(f); fclose(f);

View file

@ -98,6 +98,9 @@ static int run(void* hdlg)
pclog("Config name %s\n", cfg); pclog("Config name %s\n", cfg);
strcpy(config_file_default, 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); wx_enddialog(hdlg, 1);
// pause = 0; // pause = 0;