mirror of
https://github.com/david-schmidt/gsport.git
synced 2025-01-02 06:30:49 +00:00
Changed how serial ports are configured. Now you can select what individual port connects to.
This commit is contained in:
parent
7149c81995
commit
2404c4f5f4
@ -62,7 +62,7 @@ extern word32 g_adb_repeat_vbl;
|
||||
extern int halt_sim;
|
||||
extern int g_limit_speed;
|
||||
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_modem[];
|
||||
extern word32 g_mem_size_base;
|
||||
@ -215,8 +215,10 @@ Cfg_menu g_cfg_rom_menu[] = {
|
||||
|
||||
Cfg_menu g_cfg_serial_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",
|
||||
KNMP(g_raw_serial), CFGTYPE_INT },
|
||||
{ "Port 0 (slot 1),0,Only use socket 6501,1,Use real port if avail",
|
||||
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",
|
||||
KNMP(g_serial_out_masking), CFGTYPE_INT },
|
||||
{ "Modem on port 0 (slot 1),0,Simple socket emulation mode,1,Modem with "
|
||||
|
22
src/scc.c
22
src/scc.c
@ -28,7 +28,7 @@
|
||||
extern int Verbose;
|
||||
extern int g_code_yellow;
|
||||
extern double g_cur_dcycs;
|
||||
extern int g_raw_serial;
|
||||
extern int g_serial_type[];
|
||||
extern int g_serial_out_masking;
|
||||
extern int g_irq_pending;
|
||||
|
||||
@ -327,13 +327,19 @@ scc_port_init(int port)
|
||||
int state;
|
||||
|
||||
state = 0;
|
||||
if(g_raw_serial) {
|
||||
#ifdef MAC
|
||||
state = scc_serial_mac_init(port);
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
state = scc_serial_win_init(port);
|
||||
#endif
|
||||
switch (g_serial_type[port]) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
#ifdef MAC
|
||||
state = scc_serial_mac_init(port);
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
state = scc_serial_win_init(port);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(state <= 0) {
|
||||
|
@ -125,7 +125,7 @@ int g_ignore_halts = 1;
|
||||
int g_code_red = 0;
|
||||
int g_code_yellow = 0;
|
||||
int g_use_alib = 0;
|
||||
int g_raw_serial = 1;
|
||||
int g_serial_type[2];
|
||||
int g_iw2_emul = 0;
|
||||
int g_serial_out_masking = 0;
|
||||
int g_serial_modem[2] = { 0, 1 };
|
||||
@ -241,7 +241,6 @@ void sim65816_initglobals()
|
||||
g_code_red = 0;
|
||||
g_code_yellow = 0;
|
||||
g_use_alib = 0;
|
||||
g_raw_serial = 1;
|
||||
g_iw2_emul = 0;
|
||||
g_serial_out_masking = 0;
|
||||
//g_serial_modem[2] = { 0, 1 };
|
||||
|
Loading…
Reference in New Issue
Block a user