rename user_io_8bit_set_status to user_io_status.
This commit is contained in:
40
menu.cpp
40
menu.cpp
@@ -1048,13 +1048,13 @@ void HandleUI(void)
|
||||
if (menu_visible > 0)
|
||||
{
|
||||
menu_visible = 0;
|
||||
video_menu_bg((user_io_8bit_set_status(0, 0) & 0xE) >> 1, 1);
|
||||
video_menu_bg((user_io_status(0, 0) & 0xE) >> 1, 1);
|
||||
OsdMenuCtl(0);
|
||||
}
|
||||
else if (!menu_visible)
|
||||
{
|
||||
menu_visible--;
|
||||
video_menu_bg((user_io_8bit_set_status(0, 0) & 0xE) >> 1, 2);
|
||||
video_menu_bg((user_io_status(0, 0) & 0xE) >> 1, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1065,7 +1065,7 @@ void HandleUI(void)
|
||||
{
|
||||
c = 0;
|
||||
menu_visible = 1;
|
||||
video_menu_bg((user_io_8bit_set_status(0, 0) & 0xE) >> 1);
|
||||
video_menu_bg((user_io_status(0, 0) & 0xE) >> 1);
|
||||
OsdMenuCtl(1);
|
||||
}
|
||||
}
|
||||
@@ -1090,15 +1090,15 @@ void HandleUI(void)
|
||||
case KEY_F12:
|
||||
menu = true;
|
||||
menu_key_set(KEY_F12 | UPSTROKE);
|
||||
if(video_fb_state()) video_menu_bg((user_io_8bit_set_status(0, 0) & 0xE) >> 1);
|
||||
if(video_fb_state()) video_menu_bg((user_io_status(0, 0) & 0xE) >> 1);
|
||||
video_fb_enable(0);
|
||||
break;
|
||||
|
||||
case KEY_F1:
|
||||
if (is_menu() && cfg.fb_terminal)
|
||||
{
|
||||
unsigned long status = (user_io_8bit_set_status(0, 0)+ 2) & 0xE;
|
||||
user_io_8bit_set_status(status, 0xE);
|
||||
unsigned long status = (user_io_status(0, 0)+ 2) & 0xE;
|
||||
user_io_status(status, 0xE);
|
||||
FileSaveConfig(user_io_create_config_name(), &status, 4);
|
||||
video_menu_bg(status >> 1);
|
||||
}
|
||||
@@ -1736,7 +1736,7 @@ void HandleUI(void)
|
||||
if ((p[0] == 'O') || (p[0] == 'o'))
|
||||
{
|
||||
int ex = (p[0] == 'o');
|
||||
uint32_t status = user_io_8bit_set_status(0, 0, ex); // 0,0 gets status
|
||||
uint32_t status = user_io_status(0, 0, ex); // 0,0 gets status
|
||||
|
||||
//option handled by ARM
|
||||
if (p[1] == 'X') p++;
|
||||
@@ -1752,7 +1752,7 @@ void HandleUI(void)
|
||||
// option's index is outside of available values.
|
||||
// reset to 0.
|
||||
x = 0;
|
||||
//user_io_8bit_set_status(setStatus(p, status, x), 0xffffffff);
|
||||
//user_io_status(setStatus(p, status, x), 0xffffffff);
|
||||
substrcpy(s, p, 2 + x);
|
||||
l = strlen(s);
|
||||
arc = get_arc(s);
|
||||
@@ -2081,7 +2081,7 @@ void HandleUI(void)
|
||||
p++;
|
||||
}
|
||||
|
||||
uint32_t status = user_io_8bit_set_status(0, 0, ex); // 0,0 gets status
|
||||
uint32_t status = user_io_status(0, 0, ex); // 0,0 gets status
|
||||
uint32_t x = minus ? (getStatus(p, status) - 1) : (getStatus(p, status) + 1);
|
||||
uint32_t mask = getStatusMask(p);
|
||||
x &= mask;
|
||||
@@ -2104,7 +2104,7 @@ void HandleUI(void)
|
||||
if (!strlen(s) || get_arc(s) < 0) x = 0;
|
||||
}
|
||||
|
||||
user_io_8bit_set_status(setStatus(p, status, x), 0xffffffff, ex);
|
||||
user_io_status(setStatus(p, status, x), 0xffffffff, ex);
|
||||
|
||||
if (is_x86() && p[1] == 'A')
|
||||
{
|
||||
@@ -2143,10 +2143,10 @@ void HandleUI(void)
|
||||
|
||||
if (is_pce() && mask == 1) pcecd_reset();
|
||||
|
||||
uint32_t status = user_io_8bit_set_status(0, 0, ex);
|
||||
uint32_t status = user_io_status(0, 0, ex);
|
||||
|
||||
user_io_8bit_set_status(status ^ mask, mask, ex);
|
||||
user_io_8bit_set_status(status, mask, ex);
|
||||
user_io_status(status ^ mask, mask, ex);
|
||||
user_io_status(status, mask, ex);
|
||||
menustate = MENU_GENERIC_MAIN1;
|
||||
if (p[0] == 'R' || p[0] == 'r') menustate = MENU_NONE1;
|
||||
}
|
||||
@@ -2479,7 +2479,7 @@ void HandleUI(void)
|
||||
else
|
||||
{
|
||||
char *filename = user_io_create_config_name();
|
||||
uint32_t status[2] = { user_io_8bit_set_status(0, 0, 0), user_io_8bit_set_status(0, 0, 1) };
|
||||
uint32_t status[2] = { user_io_status(0, 0, 0), user_io_status(0, 0, 1) };
|
||||
printf("Saving config to %s\n", filename);
|
||||
FileSaveConfig(filename, status, 8);
|
||||
if (is_x86()) x86_config_save();
|
||||
@@ -2847,8 +2847,8 @@ void HandleUI(void)
|
||||
if (!dipv)
|
||||
{
|
||||
arcade_sw_save(dipv);
|
||||
user_io_8bit_set_status(UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
user_io_8bit_set_status(0, UIO_STATUS_RESET);
|
||||
user_io_status(UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
user_io_status(0, UIO_STATUS_RESET);
|
||||
menustate = MENU_NONE1;
|
||||
}
|
||||
else
|
||||
@@ -4966,7 +4966,7 @@ void HandleUI(void)
|
||||
else
|
||||
{
|
||||
char *filename = user_io_create_config_name();
|
||||
uint32_t status[2] = { user_io_8bit_set_status(0, 0xffffffff, 0), user_io_8bit_set_status(0, 0xffffffff, 1) };
|
||||
uint32_t status[2] = { user_io_status(0, 0xffffffff, 0), user_io_status(0, 0xffffffff, 1) };
|
||||
printf("Saving config to %s\n", filename);
|
||||
FileSaveConfig(filename, status, 8);
|
||||
menustate = MENU_GENERIC_MAIN1;
|
||||
@@ -4976,8 +4976,8 @@ void HandleUI(void)
|
||||
{
|
||||
arcade_sw(n)->dip_cur = arcade_sw(n)->dip_def;
|
||||
arcade_sw_send(n);
|
||||
user_io_8bit_set_status(UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
user_io_8bit_set_status(0, UIO_STATUS_RESET);
|
||||
user_io_status(UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
user_io_status(0, UIO_STATUS_RESET);
|
||||
arcade_sw_save(n);
|
||||
}
|
||||
}
|
||||
@@ -6186,7 +6186,7 @@ void HandleUI(void)
|
||||
{
|
||||
if (c & UPSTROKE)
|
||||
{
|
||||
video_menu_bg((user_io_8bit_set_status(0, 0) & 0xE) >> 1);
|
||||
video_menu_bg((user_io_status(0, 0) & 0xE) >> 1);
|
||||
video_fb_enable(0);
|
||||
menustate = MENU_SYSTEM1;
|
||||
menusub = 3;
|
||||
|
||||
@@ -81,7 +81,7 @@ void archie_set_ar(char i)
|
||||
{
|
||||
config.system_ctrl &= ~0b11000000;
|
||||
config.system_ctrl |= (i & 3) << 6;
|
||||
user_io_8bit_set_status(config.system_ctrl, 0b11000000);
|
||||
user_io_status(config.system_ctrl, 0b11000000);
|
||||
}
|
||||
|
||||
int archie_get_ar()
|
||||
@@ -93,7 +93,7 @@ void archie_set_scale(char i)
|
||||
{
|
||||
config.system_ctrl &= ~0b1100000000;
|
||||
config.system_ctrl |= (i & 3) << 8;
|
||||
user_io_8bit_set_status(config.system_ctrl, 0b1100000000);
|
||||
user_io_status(config.system_ctrl, 0b1100000000);
|
||||
}
|
||||
|
||||
int archie_get_scale()
|
||||
@@ -105,7 +105,7 @@ void archie_set_60(char i)
|
||||
{
|
||||
if (i) config.system_ctrl |= 0b1000;
|
||||
else config.system_ctrl &= ~0b1000;
|
||||
user_io_8bit_set_status(config.system_ctrl, 0b10000);
|
||||
user_io_status(config.system_ctrl, 0b10000);
|
||||
}
|
||||
|
||||
int archie_get_60()
|
||||
@@ -117,7 +117,7 @@ void archie_set_afix(char i)
|
||||
{
|
||||
if (i) config.system_ctrl |= 0b10000;
|
||||
else config.system_ctrl &= ~0b10000;
|
||||
user_io_8bit_set_status(config.system_ctrl, 0b100000);
|
||||
user_io_status(config.system_ctrl, 0b100000);
|
||||
}
|
||||
|
||||
int archie_get_afix()
|
||||
@@ -139,7 +139,7 @@ int archie_get_mswap()
|
||||
void archie_set_amix(char i)
|
||||
{
|
||||
config.system_ctrl = (config.system_ctrl & ~0b110) | ((i & 3)<<1);
|
||||
user_io_8bit_set_status(config.system_ctrl << 1, 0b1100);
|
||||
user_io_status(config.system_ctrl << 1, 0b1100);
|
||||
}
|
||||
|
||||
int archie_get_amix()
|
||||
@@ -295,7 +295,7 @@ inline int hdd_open(int unit, char *filename)
|
||||
void archie_init()
|
||||
{
|
||||
archie_debugf("init");
|
||||
user_io_8bit_set_status(UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
user_io_status(UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
|
||||
// set config defaults
|
||||
config.system_ctrl = 0;
|
||||
@@ -338,7 +338,7 @@ void archie_init()
|
||||
|
||||
load_cmos();
|
||||
|
||||
user_io_8bit_set_status(~UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
user_io_status(~UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
|
||||
/*
|
||||
int i;
|
||||
|
||||
@@ -124,8 +124,8 @@ void mcd_set_image(int num, const char *filename)
|
||||
{
|
||||
mcd_mount_save("");
|
||||
|
||||
user_io_8bit_set_status(1, 1);
|
||||
user_io_8bit_set_status(0, 1);
|
||||
user_io_status(1, 1);
|
||||
user_io_status(0, 1);
|
||||
mcd_reset();
|
||||
|
||||
loaded = 0;
|
||||
|
||||
@@ -1043,14 +1043,14 @@ int neogeo_romset_tx(char* name)
|
||||
int system_type;
|
||||
static char full_path[1024];
|
||||
|
||||
system_type = (user_io_8bit_set_status(0, 0) >> 1) & 3;
|
||||
system_type = (user_io_status(0, 0) >> 1) & 3;
|
||||
printf("System type: %u\n", system_type);
|
||||
|
||||
spi_uio_cmd_cont(UIO_GET_OSDMASK);
|
||||
uint16_t mask = spi_w(0);
|
||||
DisableIO();
|
||||
|
||||
user_io_8bit_set_status(1, 1); // Maintain reset
|
||||
user_io_status(1, 1); // Maintain reset
|
||||
|
||||
crom_sz_max = 0;
|
||||
crom_start = 0;
|
||||
@@ -1140,7 +1140,7 @@ int neogeo_romset_tx(char* name)
|
||||
FileGenerateSavePath((system_type & 2) ? "ngcd" : name, (char*)full_path);
|
||||
user_io_file_mount((char*)full_path, 0, 1);
|
||||
|
||||
user_io_8bit_set_status(0, 1); // Release reset
|
||||
user_io_status(0, 1); // Release reset
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -113,9 +113,9 @@ static void notify_mount(int load)
|
||||
|
||||
if (!load)
|
||||
{
|
||||
user_io_8bit_set_status(UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
user_io_status(UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
usleep(100000);
|
||||
user_io_8bit_set_status(0, UIO_STATUS_RESET);
|
||||
user_io_status(0, UIO_STATUS_RESET);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ int sharpmz_file_write(fileTYPE *file, const char *fileName)
|
||||
strcpy(directoryPath,SHARPMZ_CORE_NAME);
|
||||
findPrefixDir(directoryPath, sizeof(directoryPath));
|
||||
|
||||
|
||||
|
||||
|
||||
sprintf(fullPath, "%s/%s", directoryPath, fileName);
|
||||
|
||||
@@ -118,7 +118,7 @@ void sharpmz_reset(unsigned long preResetSleep, unsigned long postResetSleep)
|
||||
// Set the reset bit.
|
||||
//
|
||||
config.system_ctrl |= 1;
|
||||
user_io_8bit_set_status(config.system_ctrl, (1));
|
||||
user_io_status(config.system_ctrl, (1));
|
||||
|
||||
// Sleep and hold device in reset for given period.
|
||||
//
|
||||
@@ -128,7 +128,7 @@ void sharpmz_reset(unsigned long preResetSleep, unsigned long postResetSleep)
|
||||
// Remove reset.
|
||||
//
|
||||
config.system_ctrl &= ~(1);
|
||||
user_io_8bit_set_status(config.system_ctrl, (1));
|
||||
user_io_status(config.system_ctrl, (1));
|
||||
|
||||
// Sleep and hold device in reset for given period.
|
||||
//
|
||||
@@ -204,7 +204,7 @@ int sharpmz_reset_config(short setStatus)
|
||||
//
|
||||
if(setStatus)
|
||||
{
|
||||
user_io_8bit_set_status(config.system_ctrl, 0xffffffff);
|
||||
user_io_status(config.system_ctrl, 0xffffffff);
|
||||
|
||||
// Set the registers.
|
||||
//
|
||||
@@ -248,7 +248,7 @@ int sharpmz_reload_config(short setStatus)
|
||||
//
|
||||
if(setStatus && success)
|
||||
{
|
||||
user_io_8bit_set_status(config.system_ctrl, 0xffffffff);
|
||||
user_io_status(config.system_ctrl, 0xffffffff);
|
||||
|
||||
// Set the registers.
|
||||
//
|
||||
@@ -286,7 +286,7 @@ void sharpmz_init(void)
|
||||
|
||||
// Setup the status values based on the config.
|
||||
//
|
||||
user_io_8bit_set_status(config.system_ctrl, 0xffffffff);
|
||||
user_io_status(config.system_ctrl, 0xffffffff);
|
||||
|
||||
// Set the control registers according to config.
|
||||
//
|
||||
@@ -797,7 +797,7 @@ void sharpmz_set_aspect_ratio(short on, short setStatus)
|
||||
config.system_ctrl |= (on == 1 ? 1 << 1 : 0);
|
||||
|
||||
if(setStatus)
|
||||
user_io_8bit_set_status(config.system_ctrl, (1 << 1));
|
||||
user_io_status(config.system_ctrl, (1 << 1));
|
||||
}
|
||||
|
||||
// Return Scan doubler fx status bits. Bits 2,3,4 of systemctrl.
|
||||
@@ -827,7 +827,7 @@ void sharpmz_set_scandoubler_fx(short doubler, short setStatus)
|
||||
config.system_ctrl |= (doubler & 0x07) << 2;
|
||||
|
||||
if(setStatus)
|
||||
user_io_8bit_set_status(config.system_ctrl, (0x07 << 2));
|
||||
user_io_status(config.system_ctrl, (0x07 << 2));
|
||||
}
|
||||
|
||||
// Return VRAM wait state mode status bit. Bit 6 of system_reg, 0 = Off, 1 = On
|
||||
|
||||
@@ -293,7 +293,7 @@ static uint8_t bin2bcd(unsigned val)
|
||||
|
||||
void x86_init()
|
||||
{
|
||||
user_io_8bit_set_status(UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
user_io_status(UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
|
||||
const char *home = HomeDir();
|
||||
|
||||
@@ -417,7 +417,7 @@ void x86_init()
|
||||
for (unsigned int i = 0; i < sizeof(cmos) / sizeof(cmos[0]); i++) IOWR(RTC_BASE, i, cmos[i]);
|
||||
|
||||
x86_share_reset();
|
||||
user_io_8bit_set_status(0, UIO_STATUS_RESET);
|
||||
user_io_status(0, UIO_STATUS_RESET);
|
||||
}
|
||||
|
||||
static void fdd_io(uint8_t read)
|
||||
|
||||
20
user_io.cpp
20
user_io.cpp
@@ -598,7 +598,7 @@ static void parse_config()
|
||||
|
||||
if (p[0] == 'O' && p[1] == 'X')
|
||||
{
|
||||
uint32_t status = user_io_8bit_set_status(0, 0);
|
||||
uint32_t status = user_io_status(0, 0);
|
||||
printf("found OX option: %s, 0x%08X\n", p, status);
|
||||
|
||||
unsigned long x = getStatus(p + 1, status);
|
||||
@@ -1096,7 +1096,7 @@ void user_io_init(const char *path, const char *xml)
|
||||
spi_uio_cmd16(UIO_SET_MEMSZ, sdram_sz(-1));
|
||||
|
||||
// send a reset
|
||||
user_io_8bit_set_status(UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
user_io_status(UIO_STATUS_RESET, UIO_STATUS_RESET);
|
||||
}
|
||||
else if (core_type == CORE_TYPE_SHARPMZ)
|
||||
{
|
||||
@@ -1163,8 +1163,8 @@ void user_io_init(const char *path, const char *xml)
|
||||
}
|
||||
|
||||
status[0] &= ~UIO_STATUS_RESET;
|
||||
user_io_8bit_set_status(status[0], ~UIO_STATUS_RESET, 0);
|
||||
user_io_8bit_set_status(status[1], 0xffffffff, 1);
|
||||
user_io_status(status[0], ~UIO_STATUS_RESET, 0);
|
||||
user_io_status(status[1], 0xffffffff, 1);
|
||||
}
|
||||
|
||||
if (is_st())
|
||||
@@ -1174,9 +1174,9 @@ void user_io_init(const char *path, const char *xml)
|
||||
}
|
||||
else if (is_menu())
|
||||
{
|
||||
user_io_8bit_set_status((cfg.menu_pal) ? 0x10 : 0, 0x10);
|
||||
user_io_status((cfg.menu_pal) ? 0x10 : 0, 0x10);
|
||||
if (cfg.fb_terminal) video_menu_bg((status[0] >> 1) & 7);
|
||||
else user_io_8bit_set_status(0, 0xE);
|
||||
else user_io_status(0, 0xE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1293,7 +1293,7 @@ void user_io_init(const char *path, const char *xml)
|
||||
send_rtc(3);
|
||||
|
||||
// release reset
|
||||
if(!is_minimig() && !is_st()) user_io_8bit_set_status(0, UIO_STATUS_RESET);
|
||||
if(!is_minimig() && !is_st()) user_io_status(0, UIO_STATUS_RESET);
|
||||
if(xml) arcade_check_error();
|
||||
break;
|
||||
}
|
||||
@@ -2079,8 +2079,8 @@ static void check_status_change()
|
||||
uint32_t st0 = spi32_w(0);
|
||||
uint32_t st1 = spi32_w(0);
|
||||
DisableIO();
|
||||
user_io_8bit_set_status(st0, ~UIO_STATUS_RESET, 0);
|
||||
user_io_8bit_set_status(st1, 0xFFFFFFFF, 1);
|
||||
user_io_status(st0, ~UIO_STATUS_RESET, 0);
|
||||
user_io_status(st1, 0xFFFFFFFF, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2420,7 +2420,7 @@ char *user_io_get_confstr(int index)
|
||||
return buffer;
|
||||
}
|
||||
|
||||
uint32_t user_io_8bit_set_status(uint32_t new_status, uint32_t mask, int ex)
|
||||
uint32_t user_io_status(uint32_t new_status, uint32_t mask, int ex)
|
||||
{
|
||||
static uint32_t status[2] = { 0, 0 };
|
||||
if (ex) ex = 1;
|
||||
|
||||
@@ -193,7 +193,7 @@ char user_io_user_button();
|
||||
void user_io_osd_key_enable(char);
|
||||
void user_io_read_confstr();
|
||||
char *user_io_get_confstr(int index);
|
||||
uint32_t user_io_8bit_set_status(uint32_t, uint32_t, int ex = 0);
|
||||
uint32_t user_io_status(uint32_t, uint32_t, int ex = 0);
|
||||
int user_io_get_kbd_reset();
|
||||
|
||||
uint32_t user_io_get_file_crc();
|
||||
|
||||
@@ -1277,7 +1277,7 @@ void video_fb_enable(int enable, int n)
|
||||
|
||||
DisableIO();
|
||||
if (cfg.direct_video) set_vga_fb(enable);
|
||||
if (is_menu()) user_io_8bit_set_status((fb_enabled && !fb_num) ? 0x160 : 0, 0x1E0);
|
||||
if (is_menu()) user_io_status((fb_enabled && !fb_num) ? 0x160 : 0, 0x1E0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user