Changed how serial ports are configured. Now you can select what individual port connects to.

This commit is contained in:
Christopher Mason 2014-02-12 05:10:59 +00:00
parent 7149c81995
commit 2404c4f5f4
3 changed files with 20 additions and 13 deletions

View File

@ -62,7 +62,7 @@ extern word32 g_adb_repeat_vbl;
extern int halt_sim; extern int halt_sim;
extern int g_limit_speed; extern int g_limit_speed;
extern int g_force_depth; extern int g_force_depth;
extern int g_raw_serial; extern int g_serial_type[];
extern int g_serial_out_masking; extern int g_serial_out_masking;
extern int g_serial_modem[]; extern int g_serial_modem[];
extern word32 g_mem_size_base; extern word32 g_mem_size_base;
@ -215,8 +215,10 @@ Cfg_menu g_cfg_rom_menu[] = {
Cfg_menu g_cfg_serial_menu[] = { Cfg_menu g_cfg_serial_menu[] = {
{ "Serial Port Configuration", g_cfg_serial_menu, 0, 0, CFGTYPE_MENU }, { "Serial Port Configuration", g_cfg_serial_menu, 0, 0, CFGTYPE_MENU },
{ "Serial Ports,0,Only use sockets 6501-6502,1,Use real ports if avail", { "Port 0 (slot 1),0,Only use socket 6501,1,Use real port if avail",
KNMP(g_raw_serial), CFGTYPE_INT }, KNMP(g_serial_type[0]), CFGTYPE_INT },
{ "Port 1 (slot 2),0,Only use socket 6502,1,Use real port if avail",
KNMP(g_serial_type[1]), CFGTYPE_INT },
{ "Serial Output,0,Send full 8-bit data,1,Mask off high bit", { "Serial Output,0,Send full 8-bit data,1,Mask off high bit",
KNMP(g_serial_out_masking), CFGTYPE_INT }, KNMP(g_serial_out_masking), CFGTYPE_INT },
{ "Modem on port 0 (slot 1),0,Simple socket emulation mode,1,Modem with " { "Modem on port 0 (slot 1),0,Simple socket emulation mode,1,Modem with "

View File

@ -28,7 +28,7 @@
extern int Verbose; extern int Verbose;
extern int g_code_yellow; extern int g_code_yellow;
extern double g_cur_dcycs; extern double g_cur_dcycs;
extern int g_raw_serial; extern int g_serial_type[];
extern int g_serial_out_masking; extern int g_serial_out_masking;
extern int g_irq_pending; extern int g_irq_pending;
@ -327,13 +327,19 @@ scc_port_init(int port)
int state; int state;
state = 0; state = 0;
if(g_raw_serial) { switch (g_serial_type[port]) {
#ifdef MAC case 0:
state = scc_serial_mac_init(port); break;
#endif case 1:
#ifdef _WIN32 #ifdef MAC
state = scc_serial_win_init(port); state = scc_serial_mac_init(port);
#endif #endif
#ifdef _WIN32
state = scc_serial_win_init(port);
#endif
break;
default:
break;
} }
if(state <= 0) { if(state <= 0) {

View File

@ -125,7 +125,7 @@ int g_ignore_halts = 1;
int g_code_red = 0; int g_code_red = 0;
int g_code_yellow = 0; int g_code_yellow = 0;
int g_use_alib = 0; int g_use_alib = 0;
int g_raw_serial = 1; int g_serial_type[2];
int g_iw2_emul = 0; int g_iw2_emul = 0;
int g_serial_out_masking = 0; int g_serial_out_masking = 0;
int g_serial_modem[2] = { 0, 1 }; int g_serial_modem[2] = { 0, 1 };
@ -241,7 +241,6 @@ void sim65816_initglobals()
g_code_red = 0; g_code_red = 0;
g_code_yellow = 0; g_code_yellow = 0;
g_use_alib = 0; g_use_alib = 0;
g_raw_serial = 1;
g_iw2_emul = 0; g_iw2_emul = 0;
g_serial_out_masking = 0; g_serial_out_masking = 0;
//g_serial_modem[2] = { 0, 1 }; //g_serial_modem[2] = { 0, 1 };