some flags for dual-sdr cores.
This commit is contained in:
@@ -605,6 +605,12 @@ int fpga_get_buttons()
|
||||
return (gpi >> 29) & 3;
|
||||
}
|
||||
|
||||
int fpga_get_io_type()
|
||||
{
|
||||
fpga_gpo_write(fpga_gpo_read() | 0x80000000);
|
||||
return (fpga_gpi_read() >> 28) & 1;
|
||||
}
|
||||
|
||||
void reboot(int cold)
|
||||
{
|
||||
sync();
|
||||
|
||||
@@ -15,6 +15,7 @@ int fpga_gpi_read();
|
||||
|
||||
void fpga_set_led(uint32_t on);
|
||||
int fpga_get_buttons();
|
||||
int fpga_get_io_type();
|
||||
|
||||
void fpga_core_reset(int reset);
|
||||
void fpga_core_write(uint32_t offset, uint32_t value);
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "loader.h"
|
||||
#include "../../sxmlc.h"
|
||||
#include "../../user_io.h"
|
||||
#include "../../fpga_io.h"
|
||||
#include "../../osd.h"
|
||||
#include "../../menu.h"
|
||||
|
||||
@@ -1016,7 +1017,7 @@ int neogeo_romset_tx(char* name)
|
||||
if (crom_start < 0x300000) crom_start = 0x300000;
|
||||
uint32_t crom_max = crom_start + crom_sz_max;
|
||||
uint16_t ram_sz = sdram_sz() & 3;
|
||||
if ((ram_sz == 2 && crom_max > 0x4000000) || (ram_sz == 1 && crom_max > 0x2000000) || !ram_sz)
|
||||
if ((!user_io_is_dualsdr() || !fpga_get_io_type()) && ((ram_sz == 2 && crom_max > 0x4000000) || (ram_sz == 1 && crom_max > 0x2000000) || !ram_sz))
|
||||
{
|
||||
Info("Not enough memory!\nGraphics will be corrupted");
|
||||
sleep(2);
|
||||
|
||||
12
user_io.cpp
12
user_io.cpp
@@ -47,6 +47,7 @@ static int emu_mode = EMU_NONE;
|
||||
|
||||
// keep state over core type and its capabilities
|
||||
static unsigned char core_type = CORE_TYPE_UNKNOWN;
|
||||
static unsigned char dual_sdr = 0;
|
||||
|
||||
static int fio_size = 0;
|
||||
static int io_ver = 0;
|
||||
@@ -608,6 +609,11 @@ uint16_t sdram_sz(int sz)
|
||||
return res;
|
||||
}
|
||||
|
||||
int user_io_is_dualsdr()
|
||||
{
|
||||
return dual_sdr;
|
||||
}
|
||||
|
||||
void user_io_init(const char *path)
|
||||
{
|
||||
char *name;
|
||||
@@ -622,6 +628,12 @@ void user_io_init(const char *path)
|
||||
fio_size = fpga_get_fio_size();
|
||||
io_ver = fpga_get_io_version();
|
||||
|
||||
if (core_type == CORE_TYPE_8BIT2)
|
||||
{
|
||||
dual_sdr = 1;
|
||||
core_type = CORE_TYPE_8BIT;
|
||||
}
|
||||
|
||||
if ((core_type != CORE_TYPE_DUMB) &&
|
||||
(core_type != CORE_TYPE_MINIMIG2) &&
|
||||
(core_type != CORE_TYPE_MIST) &&
|
||||
|
||||
@@ -137,10 +137,11 @@
|
||||
#define CORE_TYPE_UNKNOWN 0x55
|
||||
#define CORE_TYPE_DUMB 0xa0 // core without any io controller interaction
|
||||
#define CORE_TYPE_MIST 0xa3 // mist atari st core
|
||||
#define CORE_TYPE_8BIT 0xa4 // atari 800/c64 like core
|
||||
#define CORE_TYPE_8BIT 0xa4 // generic core
|
||||
#define CORE_TYPE_MINIMIG2 0xa5 // new Minimig with AGA
|
||||
#define CORE_TYPE_ARCHIE 0xa6 // Acorn Archimedes
|
||||
#define CORE_TYPE_SHARPMZ 0xa7 // Sharp MZ Series
|
||||
#define CORE_TYPE_8BIT2 0xa8 // generic core using dual SDRAM
|
||||
|
||||
#define UART_FLG_PPP 0x0001
|
||||
#define UART_FLG_TERM 0x0002
|
||||
@@ -236,6 +237,7 @@ const char* get_rbf_name();
|
||||
const char* get_rbf_path();
|
||||
|
||||
uint16_t sdram_sz(int sz = -1);
|
||||
int user_io_is_dualsdr();
|
||||
|
||||
int GetUARTMode();
|
||||
int GetMidiLinkMode();
|
||||
|
||||
Reference in New Issue
Block a user