Added UEF Converter (#519)

* added uef converter

* added uef converter
This commit is contained in:
Alan Steremberg
2022-02-02 15:27:08 -08:00
committed by GitHub
parent d01a87e9f8
commit 8c46d13d4f
4 changed files with 536 additions and 0 deletions

View File

@@ -280,6 +280,13 @@ char is_sharpmz()
return(core_type == CORE_TYPE_SHARPMZ);
}
static int is_electron_type = 0;
char is_electron()
{
if (!is_electron_type) is_electron_type = strcasecmp(core_name, "AcornElectron") ? 2 : 1;
return (is_electron_type == 1);
}
static int is_no_type = 0;
static int disable_osd = 0;
char has_menu()
@@ -2180,6 +2187,8 @@ int user_io_file_tx(const char* name, unsigned char index, char opensave, char m
int dosend = 1;
int is_snes_bs = 0;
if (is_snes() && bytes2send)
{
@@ -2290,6 +2299,15 @@ int user_io_file_tx(const char* name, unsigned char index, char opensave, char m
}
}
if (is_electron() && bytes2send)
{
const char *ext = strrchr(f.name, '.');
if (ext && !strcasecmp(ext, ".UEF")) {
UEF_FileSend(&f,use_progress);
dosend=0;
}
}
if (dosend && load_addr >= 0x20000000 && (load_addr + bytes2send) <= 0x40000000)
{
uint8_t *mem = (uint8_t *)shmem_map(fpga_mem(load_addr), bytes2send);