Skip to content

Commit

Permalink
separate j3100 and j3100type options; the former allows j3100 to be a…
Browse files Browse the repository at this point in the history
…uto or manually started
  • Loading branch information
Wengier committed Nov 20, 2021
1 parent 7e27a12 commit 9e38023
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 15 deletions.
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ A list of features ported from DOSBox Staging (maintainers: dreamer and kcgen):
A list of features ported from DOSVAX (maintainer: akm) and DOSVAXJ3 (maintainer: nanshiki):

* Support for JEGA/AX machine type (imported from DOSVAX and DOSVAXJ3, cleaned up with some improvements by Wengier)
* Support for Toshiba J-3100 machine type (imported from DOSVAXJ3 by nanshiki and Wengier)
* Support for DOS/V service (imported from DOSVAXJ3 and then extended by Wengier, including support for non-Japanese DOS/V modes)
* Support for system input methods (IMEs) in Windows/Linux SDL1 builds (SDL-IM-plus by the DOSVAXJ3 maintainer, cleaned up and improved by Wengier)

Expand Down
8 changes: 6 additions & 2 deletions contrib/windows/installer/dosbox-x.reference.setup.conf
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,11 @@ pc-98 anex86 font =
# vtext2: V-text screen mode 2 for the DOS/V emulation. Set "machine=svga_et4000" for all available options; enter command "VTEXT 2" for this mode.
# Possible values: xga, xga24, sxga, sxga24, svga.
# use20pixelfont: Enables 20 pixel font will be used instead of the 24 pixel system font for the Japanese DOS/V emulation (with V-text enabled).
# j3100: With dosv=jp and a non-off setting of this option, the Toshiba J-3100 will be emulated according to the specified type.
# Possible values: off, on, gt, sgt, gx, gl, sl, sgx, ss, gs, sx, sxb, sxw, sxp, ez, zs, zx, 1, 0.
# j3100: With the setting dosv=jp and a non-off value of this option, the Toshiba J-3100 machine will be emulated with DCGA support.
# Setting to "on" or "auto" starts J-3100 automatically, and with the setting "manual" you can enter J-3100 mode with DCGA command.
# Possible values: off, on, auto, manual, 0, 1, 2.
# j3100type: Specifies the machine type for the Toshiba J-3100 emulation if enabled.
# Possible values: default, gt, sgt, gx, gl, sl, sgx, ss, gs, sx, sxb, sxw, sxp, ez, zs, zx.
dosv = off
getsysfont = true
fontxsbcs =
Expand All @@ -721,6 +724,7 @@ vtext1 = svga
vtext2 = xga
use20pixelfont = false
j3100 = off
j3100type = default

[video]
#DOSBOX-X-ADV:# vmemdelay: VGA Memory I/O delay in nanoseconds. Set to -1 to use default, 0 to disable.
Expand Down
8 changes: 6 additions & 2 deletions dosbox-x.reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,11 @@ pc-98 anex86 font =
# vtext2: V-text screen mode 2 for the DOS/V emulation. Set "machine=svga_et4000" for all available options; enter command "VTEXT 2" for this mode.
# Possible values: xga, xga24, sxga, sxga24, svga.
# use20pixelfont: Enables 20 pixel font will be used instead of the 24 pixel system font for the Japanese DOS/V emulation (with V-text enabled).
# j3100: With dosv=jp and a non-off setting of this option, the Toshiba J-3100 will be emulated according to the specified type.
# Possible values: off, on, gt, sgt, gx, gl, sl, sgx, ss, gs, sx, sxb, sxw, sxp, ez, zs, zx, 1, 0.
# j3100: With the setting dosv=jp and a non-off value of this option, the Toshiba J-3100 machine will be emulated with DCGA support.
# Setting to "on" or "auto" starts J-3100 automatically, and with the setting "manual" you can enter J-3100 mode with DCGA command.
# Possible values: off, on, auto, manual, 0, 1, 2.
# j3100type: Specifies the machine type for the Toshiba J-3100 emulation if enabled.
# Possible values: default, gt, sgt, gx, gl, sl, sgx, ss, gs, sx, sxb, sxw, sxp, ez, zs, zx.
dosv = off
getsysfont = true
fontxsbcs =
Expand All @@ -356,6 +359,7 @@ vtext1 = svga
vtext2 = xga
use20pixelfont = false
j3100 = off
j3100type = default

[video]
# vmemsize: Amount of video memory in megabytes.
Expand Down
8 changes: 6 additions & 2 deletions dosbox-x.reference.full.conf
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,11 @@ pc-98 show graphics layer on initialize = true
# vtext2: V-text screen mode 2 for the DOS/V emulation. Set "machine=svga_et4000" for all available options; enter command "VTEXT 2" for this mode.
# Possible values: xga, xga24, sxga, sxga24, svga.
# use20pixelfont: Enables 20 pixel font will be used instead of the 24 pixel system font for the Japanese DOS/V emulation (with V-text enabled).
# j3100: With dosv=jp and a non-off setting of this option, the Toshiba J-3100 will be emulated according to the specified type.
# Possible values: off, on, gt, sgt, gx, gl, sl, sgx, ss, gs, sx, sxb, sxw, sxp, ez, zs, zx, 1, 0.
# j3100: With the setting dosv=jp and a non-off value of this option, the Toshiba J-3100 machine will be emulated with DCGA support.
# Setting to "on" or "auto" starts J-3100 automatically, and with the setting "manual" you can enter J-3100 mode with DCGA command.
# Possible values: off, on, auto, manual, 0, 1, 2.
# j3100type: Specifies the machine type for the Toshiba J-3100 emulation if enabled.
# Possible values: default, gt, sgt, gx, gl, sl, sgx, ss, gs, sx, sxb, sxw, sxp, ez, zs, zx.
dosv = off
getsysfont = true
fontxsbcs =
Expand All @@ -701,6 +704,7 @@ vtext1 = svga
vtext2 = xga
use20pixelfont = false
j3100 = off
j3100type = default

[video]
# vmemdelay: VGA Memory I/O delay in nanoseconds. Set to -1 to use default, 0 to disable.
Expand Down
5 changes: 3 additions & 2 deletions src/dos/dos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@
#endif

static bool first_run=true;
extern bool use_quick_reboot, enable_config_as_shell_commands;
extern std::string log_dev_con_str;
extern const char* RunningProgram;
extern bool log_int21, log_fileio;
extern bool sync_time, manualtime;
extern bool use_quick_reboot, j3100_start;
extern bool enable_config_as_shell_commands;
#if defined(USE_TTF)
extern bool ttf_dosv;
#endif
Expand Down Expand Up @@ -4165,7 +4166,7 @@ class DOS:public Module_base{
if(IS_DOSV) {
#endif
DOSV_Setup();
if(IS_J3100) {
if(IS_J3100 && j3100_start) {
INT10_SetVideoMode(0x74);
SetTrueVideoMode(0x74);
} else if(IS_DOSV) {
Expand Down
22 changes: 16 additions & 6 deletions src/dosbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ int boothax = BOOTHAX_NONE;
bool gbk = false;
bool chinasea = false;
bool jp_ega = false;
bool j3100_start = false;
bool want_fm_towns = false;

bool dos_con_use_int16_to_detect_input = true;
Expand Down Expand Up @@ -1043,16 +1044,18 @@ void DOSBOX_RealInit() {

else E_Exit("DOSBOX-X:Unknown machine type %s",mtype.c_str());

dos.set_jdosv_enabled = dos.set_kdosv_enabled = dos.set_pdosv_enabled = dos.set_cdosv_enabled = dos.set_j3100_enabled = false;
dos.set_jdosv_enabled = dos.set_kdosv_enabled = dos.set_pdosv_enabled = dos.set_cdosv_enabled = dos.set_j3100_enabled = j3100_start = false;
Section_prop *dosv_section = static_cast<Section_prop *>(control->GetSection("dosv"));
const char *dosvstr = dosv_section->Get_string("dosv");
del_flag = dosv_section->Get_bool("del");
if (!strcasecmp(dosvstr, "jp")) {
dos.set_jdosv_enabled = true;
std::string j3100str = dosv_section->Get_string("j3100");
if(j3100str != "off" && j3100str != "0") {
std::string j3100mode = dosv_section->Get_string("j3100");
std::string j3100type = dosv_section->Get_string("j3100type");
if(j3100mode != "off" && j3100mode != "0") {
dos.set_j3100_enabled = true;
if (j3100str != "on" && j3100str != "1") J3_SetType(j3100str);
if (j3100mode != "manual") j3100_start = true;
if (j3100type != "default") J3_SetType(j3100type);
}
}
if (!strcasecmp(dosvstr, "ko")) dos.set_kdosv_enabled = true;
Expand Down Expand Up @@ -1212,7 +1215,8 @@ void DOSBOX_SetupConfigSections(void) {
const char* acpi_rsd_ptr_settings[] = { "auto", "bios", "ebda", 0 };
const char* cpm_compat_modes[] = { "auto", "off", "msdos2", "msdos5", "direct", 0 };
const char* dosv_settings[] = { "off", "jp", "ko", "chs", "cht", "cn", "tw", 0 };
const char* j3100_settings[] = { "off", "on", "gt", "sgt", "gx", "gl", "sl", "sgx", "ss", "gs", "sx", "sxb", "sxw", "sxp", "ez", "zs", "zx", "1", "0", 0 };
const char* j3100_settings[] = { "off", "on", "auto", "manual", "0", "1", "2", 0 };
const char* j3100_types[] = { "default", "gt", "sgt", "gx", "gl", "sl", "sgx", "ss", "gs", "sx", "sxb", "sxw", "sxp", "ez", "zs", "zx", 0 };
const char* acpisettings[] = { "off", "1.0", "1.0b", "2.0", "2.0a", "2.0b", "2.0c", "3.0", "3.0a", "3.0b", "4.0", "4.0a", "5.0", "5.0a", "6.0", 0 };
const char* guspantables[] = { "old", "accurate", "default", 0 };
const char *sidbaseno[] = { "240", "220", "260", "280", "2a0", "2c0", "2e0", "300", 0 };
Expand Down Expand Up @@ -2143,7 +2147,13 @@ void DOSBOX_SetupConfigSections(void) {

Pstring = secprop->Add_string("j3100",Property::Changeable::OnlyAtStart,"off");
Pstring->Set_values(j3100_settings);
Pstring->Set_help("With dosv=jp and a non-off setting of this option, the Toshiba J-3100 will be emulated according to the specified type.");
Pstring->Set_help("With the setting dosv=jp and a non-off value of this option, the Toshiba J-3100 machine will be emulated with DCGA support.\n"
"Setting to \"on\" or \"auto\" starts J-3100 automatically, and with the setting \"manual\" you can enter J-3100 mode with DCGA command.");
Pstring->SetBasic(true);

Pstring = secprop->Add_string("j3100type",Property::Changeable::OnlyAtStart,"default");
Pstring->Set_values(j3100_types);
Pstring->Set_help("Specifies the machine type for the Toshiba J-3100 emulation if enabled.");
Pstring->SetBasic(true);

secprop=control->AddSection_prop("video",&Null_Init);
Expand Down
2 changes: 1 addition & 1 deletion src/ints/int10_modes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,7 @@ bool INT10_SetVideoMode(uint16_t mode) {
}
break;
case M_DCGA:
if (J3_GetMachineCode()) {
if (IS_J3100 && J3_GetMachineCode()) {
uint8_t r, g, b;
uint8_t vmode = GetTrueVideoMode();
J3_GetPalette(0, r, g, b);
Expand Down

0 comments on commit 9e38023

Please sign in to comment.