Compare commits

...

8 Commits

Author SHA1 Message Date
Hoe
cb05c53a7b update config for support non-standard wheel mapping button 2024-07-13 22:38:31 +08:00
Hoe
e36031ebfb Support non-standard wheel mapping button 2024-07-13 22:34:02 +08:00
92fe2751e7 Merge pull request 'dns: added WAHLAP billing DNS block' (#23) from zaphkito/segatools:develop into develop
Reviewed-on: Dniel97/segatools#23
2024-07-06 23:06:31 +00:00
8c839b0d4e dns: added WAHLAP billing DNS block
China have another company named universal service WACCA, but they use same PowerOn and Download Order domain with SEGA official, so we need express `sys-all.cn` is only used for WAHLAP, not all China SEGA games.
WAHLAP have a unused billing domain, just in case, we blocked it now
2024-07-03 18:04:21 +00:00
ccb655a12b Merge pull request 'Add configurable debug logging' (#22) from Bottersnike/segatools:develop into develop
Reviewed-on: Dniel97/segatools#22
2024-07-01 18:42:01 +00:00
ded89f6343 Make fixes based on #22 review 2024-07-01 19:28:23 +01:00
f3e31fc2ae improved doc 2024-06-30 19:37:04 +02:00
7d3cab256b Add configurable debug logging 2024-06-20 01:22:01 +01:00
25 changed files with 214 additions and 513 deletions

3
.gitignore vendored
View File

@ -18,3 +18,6 @@ build/
# External dependencies
subprojects/capnhook
# For enabling debug logging on local builds
MesonLocalOptions.mk

View File

@ -11,6 +11,11 @@ DOC_DIR := doc
DIST_DIR := dist
# Add "-D[option]=[value]" here as necessary
MESON_OPTIONS :=
# For options that shouldn't be committed
-include MesonLocalOptions.mk
# -----------------------------------------------------------------------------
# Targets
# -----------------------------------------------------------------------------
@ -19,9 +24,9 @@ include Package.mk
.PHONY: build # Build the project
build:
$(V)meson --cross cross-mingw-32.txt $(BUILD_DIR_32)
$(V)meson setup $(MESON_OPTIONS) --cross cross-mingw-32.txt $(BUILD_DIR_32)
$(V)ninja -C $(BUILD_DIR_32)
$(V)meson --cross cross-mingw-64.txt $(BUILD_DIR_64)
$(V)meson setup $(MESON_OPTIONS) --cross cross-mingw-64.txt $(BUILD_DIR_64)
$(V)ninja -C $(BUILD_DIR_64)
.PHONY: dist # Build and create a zip distribution package

View File

@ -185,14 +185,14 @@ static HRESULT jvs_ioctl_sense(struct irp *irp)
static HRESULT jvs_ioctl_transact(struct irp *irp)
{
#if 0
#if defined(LOG_JVS)
dprintf("\nJVS Port: Outbound frame:\n");
dump_const_iobuf(&irp->write);
#endif
jvs_bus_transact(jvs_root, irp->write.bytes, irp->write.nbytes, &irp->read);
#if 0
#if defined(LOG_JVS)
dprintf("JVS Port: Inbound frame:\n");
dump_iobuf(&irp->read);
dprintf("\n");

View File

@ -390,7 +390,7 @@ static HRESULT io3_cmd_read_switches(
return hr;
}
#if 0
#if defined(LOG_IO3)
dprintf("JVS I/O: Read switches, np=%i, bpp=%i\n",
req.num_players,
req.bytes_per_player);

View File

@ -267,7 +267,7 @@ static HRESULT led15093_handle_irp_locked(int board, struct irp *irp)
}
for (;;) {
#if 0
#if defined(LOG_LED15093)
dprintf("TX Buffer:\n");
dump_iobuf(&boarduart->written);
#endif
@ -294,7 +294,7 @@ static HRESULT led15093_handle_irp_locked(int board, struct irp *irp)
return hr;
}
#if 0
#if defined(LOG_LED15093)
dprintf("Deframe Buffer:\n");
dump_iobuf(&req_iobuf);
#endif

View File

@ -420,7 +420,7 @@ static HRESULT sg_nfc_cmd_felica_encap(
f_res.nbytes = sizeof(res->payload);
f_res.pos = 1;
#if 0
#if defined(LOG_NFC)
dprintf("FELICA OUTBOUND:\n");
dump_const_iobuf(&f_req);
#endif
@ -434,7 +434,7 @@ static HRESULT sg_nfc_cmd_felica_encap(
sg_res_init(&res->res, &req->req, f_res.pos);
res->payload[0] = f_res.pos;
#if 0
#if defined(LOG_NFC)
dprintf("FELICA INBOUND:\n");
dump_iobuf(&f_res);
#endif

View File

@ -115,14 +115,14 @@ static HRESULT sg_reader_handle_irp_locked(struct irp *irp)
{
HRESULT hr;
#if 0
#if defined(LOG_NFC)
if (irp->op == IRP_OP_WRITE) {
dprintf("WRITE:\n");
dump_const_iobuf(&irp->write);
}
#endif
#if 0
#if defined(LOG_NFC)
if (irp->op == IRP_OP_READ) {
dprintf("READ:\n");
dump_iobuf(&sg_reader_uart.readable);

View File

@ -137,7 +137,7 @@ static HRESULT controlbd_handle_irp_locked(struct irp *irp)
for (;;) {
if (controlbd_uart.written.bytes[0] == 0xE0) {
#if 0
#if defined(LOG_CAROL_CONTROL_BD)
dprintf("Control Board: TX Buffer:\n");
dump_iobuf(&controlbd_uart.written);
#endif
@ -152,7 +152,7 @@ static HRESULT controlbd_handle_irp_locked(struct irp *irp)
dprintf("Control Board: Dispatch Error: 0X%X\n", (int) hr);
return hr;
}
#if 0
#if defined(LOG_CAROL_CONTROL_BD)
dprintf("Control Board: RX Buffer:\n");
dump_iobuf(&controlbd_uart.readable);
#endif

View File

@ -94,7 +94,7 @@ static HRESULT ledbd_handle_irp_locked(struct irp *irp)
}
for (;;) {
#if 0
#if defined(LOG_CAROL_LED_BD)
dprintf("LED Board: TX Buffer:\n");
dump_iobuf(&ledbd_uart.written);
#endif

View File

@ -112,7 +112,7 @@ static HRESULT touch_handle_irp_locked(struct irp *irp)
}
for (;;) {
#if 0
#if defined(LOG_CAROL_TOUCH)
dprintf("Touchscreen: TX Buffer:\n");
dump_iobuf(&touch_uart.written);
#endif
@ -220,7 +220,7 @@ static void touch_scan_auto(const bool is_pressed, const uint16_t mouse_x, const
iobuf_write(&touch_uart.readable, &resp, sizeof(resp));
LeaveCriticalSection(&touch_lock);
#if 0
#if defined(LOG_CAROL_TOUCH)
dprintf("Touch: RX Buffer: (pos %08x)\n", (uint32_t)touch_uart.readable.pos);
dump_iobuf(&touch_uart.readable);
#endif

View File

@ -98,7 +98,7 @@ static HRESULT slider_handle_irp_locked(struct irp *irp)
}
for (;;) {
#if 0
#if defined(LOG_CHUNI_SLIDER)
dprintf("TX Buffer:\n");
dump_iobuf(&slider_uart.written);
#endif
@ -117,7 +117,7 @@ static HRESULT slider_handle_irp_locked(struct irp *irp)
return hr;
}
#if 0
#if defined(LOG_CHUNI_SLIDER)
dprintf("Deframe Buffer:\n");
dump_iobuf(&req_iobuf);
#endif

View File

@ -98,7 +98,7 @@ static HRESULT slider_handle_irp_locked(struct irp *irp)
}
for (;;) {
#if 0
#if defined(LOG_CHUSAN_SLIDER)
dprintf("TX Buffer:\n");
dump_iobuf(&slider_uart.written);
#endif
@ -117,7 +117,7 @@ static HRESULT slider_handle_irp_locked(struct irp *irp)
return hr;
}
#if 0
#if defined(LOG_CHUSAN_SLIDER)
dprintf("Deframe Buffer:\n");
dump_iobuf(&req_iobuf);
#endif

View File

@ -211,10 +211,21 @@ accelAxis=Y
start=1
viewChg=2
; DPad is already emulated, but in order to trigger "Time Up" and exit the
; course you need to press both left and right on the DPad at the same time.
; This is not possible on most devices, so we set the left and right button again.
; course you need to press both left and right on the DPad at the same time
; This is not possible on most devices, so we set the left and right button again
;
; up key
; down key
; left key
; right key
; leftThumb key (The left and right buttons cannot be pressed at the same time to set)
; rightThumb key (The left and right buttons cannot be pressed at the same time to set)
up=0
down=0
left=7
right=8
leftThumb=7
rightThumb=8
; Button mappings for the simulated six-speed shifter.
shiftDn=6
shiftUp=5

View File

@ -99,7 +99,7 @@ static HRESULT slider_handle_irp_locked(struct irp *irp)
}
for (;;) {
#if 0
#if defined(LOG_DIVA_SLIDER)
dprintf("TX Buffer:\n");
dump_iobuf(&slider_uart.written);
#endif
@ -118,7 +118,7 @@ static HRESULT slider_handle_irp_locked(struct irp *irp)
return hr;
}
#if 0
#if defined(LOG_DIVA_SLIDER)
dprintf("Deframe Buffer:\n");
dump_iobuf(&req_iobuf);
#endif

View File

@ -352,7 +352,7 @@ Enable keychip emulation. Disable to use a real keychip.
Default: `A69E-01A88888888`
Keychip serial number. Keychip serials observed in the wild follow this
pattern: `A6xE-01Ayyyyyyyy`.
pattern: `A\d{2}(E|X)-(01|20)[ABCDU]\d{8}`.
### `gameId`

View File

@ -58,8 +58,12 @@ void idac_di_config_load(struct idac_di_config *cfg, const wchar_t *filename)
cfg->start = GetPrivateProfileIntW(L"dinput", L"start", 0, filename);
cfg->view_chg = GetPrivateProfileIntW(L"dinput", L"viewChg", 0, filename);
cfg->up = GetPrivateProfileIntW(L"dinput", L"up", 0, filename);
cfg->down = GetPrivateProfileIntW(L"dinput", L"down", 0, filename);
cfg->left = GetPrivateProfileIntW(L"dinput", L"left", 0, filename);
cfg->right = GetPrivateProfileIntW(L"dinput", L"right", 0, filename);
cfg->leftThumb = GetPrivateProfileIntW(L"dinput", L"leftThumb", 0, filename);
cfg->rightThumb = GetPrivateProfileIntW(L"dinput", L"rightThumb", 0, filename);
cfg->shift_dn = GetPrivateProfileIntW(L"dinput", L"shiftDn", 0, filename);
cfg->shift_up = GetPrivateProfileIntW(L"dinput", L"shiftUp", 0, filename);

View File

@ -16,8 +16,12 @@ struct idac_di_config {
wchar_t accel_axis[16];
uint8_t start;
uint8_t view_chg;
uint8_t up;
uint8_t down;
uint8_t left;
uint8_t right;
uint8_t leftThumb;
uint8_t rightThumb;
uint8_t shift_dn;
uint8_t shift_up;
uint8_t gear[6];

View File

@ -69,8 +69,12 @@ static uint8_t idac_di_shift_dn;
static uint8_t idac_di_shift_up;
static uint8_t idac_di_view_chg;
static uint8_t idac_di_start;
static uint8_t idac_di_up;
static uint8_t idac_di_down;
static uint8_t idac_di_left;
static uint8_t idac_di_right;
static uint8_t idac_di_leftThumb;
static uint8_t idac_di_rightThumb;
static uint8_t idac_di_gear[6];
static bool idac_di_use_pedals;
static bool idac_di_reverse_brake_axis;
@ -105,6 +109,8 @@ HRESULT idac_di_init(
return hr;
}
dprintf("DirectInput: Controller initializing\n");
/* Initial D Zero has some built-in DirectInput support that is not
particularly useful. idachook shorts this out by redirecting dinput8.dll
to a no-op implementation of DirectInput. However, idacio does need to
@ -321,8 +327,12 @@ static HRESULT idac_di_config_apply(const struct idac_di_config *cfg)
}
dprintf("Wheel: Start button . . . : %i\n", cfg->start);
dprintf("Wheel: View Change button : %i\n", cfg->view_chg);
dprintf("Wheel: Up button . . . . . : %i\n", cfg->up);
dprintf("Wheel: Down button . . . . : %i\n", cfg->down);
dprintf("Wheel: Left button . . . . : %i\n", cfg->left);
dprintf("Wheel: Right button . . . : %i\n", cfg->right);
dprintf("Wheel: LeftThumb button . : %i\n", cfg->leftThumb);
dprintf("Wheel: RightThumb button : %i\n", cfg->rightThumb);
dprintf("Wheel: Shift Down button . : %i\n", cfg->shift_dn);
dprintf("Wheel: Shift Up button . . : %i\n", cfg->shift_up);
dprintf("Wheel: Reverse Brake Axis : %i\n", cfg->reverse_brake_axis);
@ -356,8 +366,12 @@ static HRESULT idac_di_config_apply(const struct idac_di_config *cfg)
idac_di_off_accel = accel_axis->off;
idac_di_start = cfg->start;
idac_di_view_chg = cfg->view_chg;
idac_di_up = cfg->up;
idac_di_down = cfg->down;
idac_di_left = cfg->left;
idac_di_right = cfg->right;
idac_di_leftThumb = cfg->leftThumb;
idac_di_rightThumb = cfg->rightThumb;
idac_di_shift_dn = cfg->shift_dn;
idac_di_shift_up = cfg->shift_up;
idac_di_reverse_brake_axis = cfg->reverse_brake_axis;
@ -504,11 +518,19 @@ static void idac_di_get_buttons(uint8_t *gamebtn_out)
gamebtn |= IDAC_IO_GAMEBTN_VIEW_CHANGE;
}
if (idac_di_left && state.st.rgbButtons[idac_di_left - 1]) {
if (idac_di_up && state.st.rgbButtons[idac_di_up - 1]) {
gamebtn |= IDAC_IO_GAMEBTN_UP;
}
if (idac_di_down && state.st.rgbButtons[idac_di_down - 1]) {
gamebtn |= IDAC_IO_GAMEBTN_DOWN;
}
if (idac_di_left && (state.st.rgbButtons[idac_di_left - 1] | state.st.rgbButtons[idac_di_leftThumb - 1])) {
gamebtn |= IDAC_IO_GAMEBTN_LEFT;
}
if (idac_di_right && state.st.rgbButtons[idac_di_right - 1]) {
if (idac_di_right && (state.st.rgbButtons[idac_di_right - 1] | state.st.rgbButtons[idac_di_rightThumb - 1])) {
gamebtn |= IDAC_IO_GAMEBTN_RIGHT;
}

View File

@ -46,7 +46,7 @@ void jvs_crack_request(
return;
}
#if 0
#if defined(LOG_JVS)
dprintf("Decoded request:\n");
dump_iobuf(&decode);
#endif
@ -96,7 +96,7 @@ void jvs_crack_request(
resp_bytes[2] = 0x01; /* Status: Success */
}
#if 0
#if defined(LOG_JVS)
dprintf("Encoding response:\n");
dump_iobuf(&encode);
#endif

View File

@ -130,7 +130,7 @@ static HRESULT touch0_handle_irp_locked(struct irp *irp)
}
for (;;) {
#if 0
#if defined(LOG_MERCURY_SLIDER)
dprintf("TX0 Buffer:\n");
dump_iobuf(&touch0_uart.written);
#endif
@ -177,7 +177,7 @@ static HRESULT touch1_handle_irp_locked(struct irp *irp)
}
for (;;) {
#if 0
#if defined(LOG_MERCURY_SLIDER)
dprintf("TX1 Buffer:\n");
dump_iobuf(&touch1_uart.written);
#endif
@ -309,7 +309,7 @@ static HRESULT touch_handle_get_unit_board_ver(const struct touch_req *req)
resp.version[6] = 'R';
resp.checksum = calc_checksum(&resp, sizeof(resp));
#if 0
#if defined(LOG_MERCURY_SLIDER)
for (int i = 0; i < sizeof(resp.version); i++) {
dprintf("0x%02x ", resp.version[i]);
}
@ -322,7 +322,7 @@ static HRESULT touch_handle_get_unit_board_ver(const struct touch_req *req)
resp.version[6] = 'L';
resp.checksum = calc_checksum(&resp, sizeof(resp));
#if 0
#if defined(LOG_MERCURY_SLIDER)
for (int i = 0; i < sizeof(resp.version); i++) {
dprintf("0x%02x ", resp.version[i]);
}
@ -388,7 +388,7 @@ static HRESULT touch_handle_start_auto_scan(const struct touch_req *req)
dprintf("Wacca Touch%d: Start Auto", req->side);
#if 0
#if defined(LOG_MERCURY_SLIDER)
for (int i = 0; i < req->data_length; i++)
dprintf("0x%02x ", req->data[i]);
#endif

View File

@ -39,6 +39,43 @@ if cc.get_id() != 'msvc'
)
endif
if get_option('log_all') or get_option('log_jvs')
add_project_arguments('-DLOG_JVS', language: 'c')
endif
if get_option('log_all') or get_option('log_io3')
add_project_arguments('-DLOG_IO3', language: 'c')
endif
if get_option('log_all') or get_option('log_led15093')
add_project_arguments('-DLOG_LED15093', language: 'c')
endif
if get_option('log_all') or get_option('log_nfc')
add_project_arguments('-DLOG_NFC', language: 'c')
endif
if get_option('log_all') or get_option('log_carol_control_bd')
add_project_arguments('-DLOG_CAROL_CONTROL_BD', language: 'c')
endif
if get_option('log_all') or get_option('log_carol_led_bd')
add_project_arguments('-DLOG_CAROL_LED_BD', language: 'c')
endif
if get_option('log_all') or get_option('log_carol_touch')
add_project_arguments('-DLOG_CAROL_TOUCH', language: 'c')
endif
if get_option('log_all') or get_option('log_chuni_slider')
add_project_arguments('-DLOG_CHUNI_SLIDER', language: 'c')
endif
if get_option('log_all') or get_option('log_chusan_slider')
add_project_arguments('-DLOG_CHUSAN_SLIDER', language: 'c')
endif
if get_option('log_all') or get_option('log_diva_slider')
add_project_arguments('-DLOG_DIVA_SLIDER', language: 'c')
endif
if get_option('log_all') or get_option('log_mercury_slider')
add_project_arguments('-DLOG_MERCURY_SLIDER', language: 'c')
endif
if get_option('log_all') or get_option('log_clock')
add_project_arguments('-DLOG_CLOCK', language: 'c')
endif
shlwapi_lib = cc.find_library('shlwapi')
dinput8_lib = cc.find_library('dinput8')
dxguid_lib = cc.find_library('dxguid')

65
meson_options.txt Normal file
View File

@ -0,0 +1,65 @@
option('log_all',
type : 'boolean',
value : false,
description : 'Enables all of the subsequent debug logging options'
)
option('log_jvs',
type : 'boolean',
value : false,
description : 'Enable debug logging for JVS'
)
option('log_io3',
type : 'boolean',
value : false,
description : 'Enable debug logging for JVS'
)
option('log_led15093',
type : 'boolean',
value : false,
description : 'Enable debug logging for the 15093 LED board emulation'
)
option('log_nfc',
type : 'boolean',
value : false,
description : 'Enable debug logging for NFC'
)
option('log_carol_control_bd',
type : 'boolean',
value : false,
description : 'Enable debug logging for the Carlo Control Board'
)
option('log_carol_led_bd',
type : 'boolean',
value : false,
description : 'Enable debug logging for the Carlo LED Board'
)
option('log_carol_touch',
type : 'boolean',
value : false,
description : 'Enable debug logging for the Carlo Touchscreen'
)
option('log_chuni_slider',
type : 'boolean',
value : false,
description : 'Enable debug logging for the Chunithm Slider'
)
option('log_chusan_slider',
type : 'boolean',
value : false,
description : 'Enable debug logging for the Chusan Slider'
)
option('log_diva_slider',
type : 'boolean',
value : false,
description : 'Enable debug logging for the Diva Slider'
)
option('log_mercury_slider',
type : 'boolean',
value : false,
description : 'Enable debug logging for the WACCA Slider'
)
option('log_clock',
type : 'boolean',
value : false,
description : 'Enable debug logging for clock APIs'
)

View File

@ -158,7 +158,7 @@ static BOOL WINAPI my_GetSystemTime(SYSTEMTIME *out)
return ok;
}
#if 0
#if defined(LOG_CLOCK)
static int last_second;
if (out->wSecond != last_second) {

View File

@ -109,21 +109,27 @@ HRESULT dns_platform_hook_init(const struct dns_config *cfg)
return hr;
}
// CHN
// PowerOn
// WAHLAP PowerOn
hr = dns_hook_push(L"at.sys-all.cn", cfg->startup);
if (FAILED(hr)) {
return hr;
}
// WeChat AimeDB Server
// WAHLAP WeChat AimeDB Server
hr = dns_hook_push(L"ai.sys-all.cn", cfg->aimedb);
if (FAILED(hr)) {
return hr;
}
// WAHLAP Billing
hr = dns_hook_push(L"ib.sys-all.cn", cfg->billing);
if (FAILED(hr)) {
return hr;
}
// if your ISP resolves bad domains, it will kill the network. These 2
// *cannot* resolve

View File

@ -1,456 +0,0 @@
# Segatools common configuration settings
This file describes configuration settings for Segatools that are common to
all games.
Keyboard binding settings use
[Virtual-Key Codes](https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes).
## `[aimeio]`
Controls the card reader driver.
### `path`
Specify a path for a third-party card reader driver DLL. Default is empty
(use built-in emulation based on text files and keyboard input).
In previous versions of Segatools this was accomplished by replacing the
AIMEIO.DLL file that came with Segatools. Segatools no longer ships with a
separate AIMEIO.DLL file (its functionality is now built into the various hook
DLLs).
## `[aime]`
Controls emulation of the Aime card reader assembly.
### `enable`
Default: `1`
Enable Aime card reader assembly emulation. Disable to use a real SEGA Aime
reader (COM port number varies by game).
### `aimePath`
Default: `DEVICE\aime.txt`
Path to a text file containing a classic Aime IC card ID. **This does not
currently work**.
### `felicaPath`
Default: `DEVICE\felica.txt`
Path to a text file containing a FeliCa e-cash card IDm serial number.
### `felicaGen`
Default: `1`
Whether to generate a random FeliCa ID if the file at `felicaPath` does not
exist.
### `scan`
Default: `0x0D` (`VK_RETURN`)
Virtual-key code. If this button is **held** then the emulated IC card reader
emulates an IC card in its proximity. A variety of different IC cards can be
emulated; the exact choice of card that is emulated depends on the presence or
absence of the configured card ID files.
## `[amvideo]`
Controls the `amvideo.dll` stub built into Segatools. This is a DLL that is
normally present on the SEGA operating system image which is responsible for
changing screen resolution and orientation.
### `enable`
Default: `1`
Enable stub `amvideo.dll`. Disable to use a real `amvideo.dll` build. Note that
you must have the correct registry settings installed and you must use the
version of `amvideo.dll` that matches your GPU vendor (since these DLLs make
use of vendor-specific APIs).
## `[clock]`
Controls hooks for Windows time-of-day APIs.
### `timezone`
Default: `1`
Make the system time zone appear to be JST. SEGA games malfunction in strange
ways if the system time zone is not JST. There should not be any reason to
disable this hook other than possible implementation bugs, but the option is
provided if you need it.
### `timewarp`
Default: `0`
Experimental time-of-day warping hook that skips over the hardcoded server
maintenance period. Causes an incorrect in-game time-of-day to be reported.
Better solutions for this problem exist and this feature will probably be
removed soon.
### `writeable`
Default: `0`
Allow game to adjust system clock and time zone settings. This should normally
be left at `0`, but the option is provided if you need it.
## `[dns]`
Controls redirection of network server hostname lookups
### `default`
Default: `localhost`
Controls hostname of all of the common network services servers, unless
overriden by a specific setting below. Most users will only need to change this
setting. Also, loopback addresses are specifically checked for and rejected by
the games themselves; this needs to be a LAN or WAN IP (or a hostname that
resolves to one).
### `router`
Default: Empty string (i.e. use value from `default` setting)
Overrides the target of the `tenporouter.loc` and `bbrouter.loc` hostname
lookups.
### `startup`
Default: Empty string (i.e. use value from `default` setting)
Overrides the target of the `naominet.jp` host lookup.
### `billing`
Default: Empty string (i.e. use value from `default` setting)
Overrides the target of the `ib.naominet.jp` host lookup.
### `aimedb`
Default: Empty string (i.e. use value from `default` setting)
Overrides the target of the `aime.naominet.jp` host lookup.
## `[ds]`
Controls emulation of the "DS (Dallas Semiconductor) EEPROM" chip on the AMEX
PCIe board. This is a small (32 byte) EEPROM that contains serial number and
region code information. It is not normally written to outside of inital
factory provisioning of a Sega Nu.
### `enable`
Default: `1`
Enable DS EEPROM emulation. Disable to use the DS EEPROM chip on a real AMEX.
### `region`
Default: `1`
AMEX Board region code. This appears to be a bit mask?
- `1`: Japan
- `2`: USA? (Dead code, not used)
- `4`: Export
- `8`: China
### `serialNo`
Default `AAVE-01A99999999`
"MAIN ID" serial number. First three characters are hardware series:
- `AAV`: Nu-series
- `AAW`: NuSX-series
- `ACA`: ALLS-series
## `[eeprom]`
Controls emulation of the bulk EEPROM on the AMEX PCIe board. This chip stores
status and configuration information.
### `enable`
Default: `1`
Enable bulk EEPROM emulation. Disable to use the bulk EEPROM chip on a real
AMEX.
### `path`
Default: `DEVICE\eeprom.bin`
Path to the storage file for EEPROM emulation. This file is automatically
created and initialized with a suitable number of zero bytes if it does not
already exist.
## `[gpio]`
Configure emulation of the AMEX PCIe GPIO (General Purpose Input Output)
controller.
### `enable`
Default: `1`
Enable GPIO emulation. Disable to use the GPIO controller on a real AMEX.
### `sw1`
Default `0x70` (`VK_F1`)
Keyboard binding for Nu chassis SW1 button (alternative Test)
### `sw2`
Default `0x71` (`VK_F2`)
Keyboard binding for Nu chassis SW2 button (alternative Service)
### `dipsw1` .. `dipsw8`
Defaults: `1`, `0`, `0`, `0`, `0`, `0`, `0`, `0`
Nu chassis DIP switch settings:
- Switch 1: Game-specific, but usually controls the "distribution server"
setting. Exactly one arcade machine on a cabinet router must be set to the
Server setting.
- `0`: Client
- `1`: Server
- Switch 2,3: Game-specific.
- Used by Mario&Sonic to configure cabinet ID, possibly other games.
- Switch 4: Screen orientation. Only used by the Nu system startup program.
- `0`: YOKO/Horizontal
- `1`: TATE/Vertical
- Switch 5,6,7: Screen resolution. Only used by the Nu system startup program.
- `000`: No change
- `100`: 640x480
- `010`: 1024x600
- `110`: 1024x768
- `001`: 1280x720
- `101`: 1280x1024
- `110`: 1360x768
- `111`: 1920x1080
- Switch 8: Game-specific. Not used in any shipping game.
## `[hwmon]`
Configure stub implementation of the platform hardware monitor driver. The
real implementation of this driver monitors CPU temperatures by reading from
Intel Model Specific Registers, which is an action that is only permitted from
kernel mode.
### `enable`
Default `1`
Enable hwmon emulation. Disable to use the real hwmon driver.
## `[jvs]`
Configure emulation of the AMEX PCIe JVS *controller* (not IO board!)
### `enable`
Default `1`
Enable JVS port emulation. Disable to use the JVS port on a real AMEX.
## `[keychip]`
Configure keychip emulation.
### `enable`
Enable keychip emulation. Disable to use a real keychip.
### `id`
Default: `A69E-01A88888888`
Keychip serial number. Keychip serials observed in the wild follow this
pattern: `A\d{2}(E01|X20)[ABCDU]\d{8}`.
### `gameId`
Default: (Varies depending on game)
Override the game's four-character model code. Changing this from the game's
expected value will probably just cause a system error.
### `platformId`
Default: (Varies depending on game)
Override the game's four-character platform code (e.g. `AAV2` for Nu 2). This
is actually supposed to be a separate three-character `platformId` and
integer `modelType` setting, but they are combined here for convenience. Valid
values include:
- `AAV0`: Nu 1 (Project DIVA)
- `AAV1`: Nu 1.1 (Chunithm)
- `AAV2`: Nu 2 (Initial D Zero)
- `AAW0`: NuSX 1
- `AAW1`: NuSX 1.1
- `ACA0`: ALLS UX
- `ACA1`: ALLS HX
- `ACA2`: ALLS UX (without dedicated GPU)
- `ACA4`: ALLS MX
### `region`
Default: `1`
Override the keychip's region code. Most games seem to pay attention to the
DS EEPROM region code and not the keychip region code, and this seems to be
a bit mask that controls which Nu PCB region codes this keychip is authorized
for. So it probably only affects the system software and not the game software.
Bit values are:
- 1: JPN: Japan
- 2: USA (unused)
- 3: EXP: Export (for Asian markets)
- 4: CHS: China (Simplified Chinese?)
### `systemFlag`
Default: `0x64`
An 8-bit bitfield of unclear meaning. The least significant bit indicates a
developer dongle, I think? Changing this doesn't seem to have any effect on
anything other than Project DIVA.
Other values observed in the wild:
- `0x04`: SDCH, SDCA
- `0x20`: SDCA
### `subnet`
Default `192.168.100.0`
The LAN IP range that the game will expect. The prefix length is hardcoded into
the game program: for some games this is `/24`, for others it is `/20`.
## `[netenv]`
Configure network environment virtualization. This module helps bypass various
restrictions placed upon the game's LAN environment.
### `enable`
Default `1`
Enable network environment virtualization. You may need to disable this if
you want to do any head-to-head play on your LAN.
Note: The virtualized LAN IP range is taken from the emulated keychip's
`subnet` setting.
### `addrSuffix`
Default: `11`
The final octet of the local host's IP address on the virtualized subnet (so,
if the keychip subnet is `192.168.32.0` and this value is set to `11`, then the
local host's virtualized LAN IP is `192.168.32.11`).
### `routerSuffix`
Default: `1`
The final octet of the default gateway's IP address on the virtualized subnet.
### `macAddr`
Default: `01:02:03:04:05:06`
The MAC address of the virtualized Ethernet adapter. The exact value shouldn't
ever matter.
## `[pcbid]`
Configure Windows host name virtualization. The ALLS-series platform no longer
has an AMEX board, so the MAIN ID serial number is stored in the Windows
hostname.
### `enable`
Default: `1`
Enable Windows host name virtualization. This is only needed for ALLS-platform
games (since the ALLS lacks an AMEX and therefore has no DS EEPROM, so it needs
another way to store the PCB serial), but it does no harm on games that run on
earlier hardware.
### `serialNo`
Default: `ACAE01A99999999`
Set the Windows host name. This should be an ALLS MAIN ID, without the
hyphen (which is not a valid character in a Windows host name).
## `[sram]`
Configure emulation of the AMEX PCIe battery-backed SRAM. This stores
bookkeeping state and settings. This file is automatically created and
initialized with a suitable number of zero bytes if it does not already exist.
### `enable`
Default `1`
Enable SRAM emulation. Disable to use the SRAM on a real AMEX.
### `path`
Default `DEVICE\sram.bin`
Path to the storage file for SRAM emulation.
## `[vfs]`
Configure Windows path redirection hooks.
### `enable`
Default: `1`
Enable path redirection.
### `amfs`
Default: Empty string (causes a startup error)
Configure the location of the SEGA AMFS volume. Stored on the `E` partition on
real hardware.
### `appdata`
Default: Empty string (causes a startup error)
Configure the location of the SEGA "APPDATA" volume (nothing to do with the
Windows user's `%APPDATA%` directory). Stored on the `Y` partition on real
hardware.
### `option`
Default: Empty string
Configure the location of the "Option" data mount point. This mount point is
optional (hence the name, probably) and contains directories which contain
minor over-the-air content updates.