mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2026-09-26 08:55:24 -05:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0cfc8c948 | ||
|
|
93cfb591b7 | ||
|
|
3396c09fbf | ||
|
|
bd8dc18b30 | ||
|
|
8e9abf9906 | ||
|
|
62bb717582 | ||
|
|
4816fb809d |
@@ -1,4 +1,7 @@
|
|||||||
# Release history
|
# Release history
|
||||||
|
## 5.32
|
||||||
|
* Various bugfixes
|
||||||
|
|
||||||
## 5.31
|
## 5.31
|
||||||
* DDR: Fix p3io and extio lights not working / being swapped when using geninput
|
* DDR: Fix p3io and extio lights not working / being swapped when using geninput
|
||||||
* DDR: Add HDXS light support
|
* DDR: Add HDXS light support
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Bemanitools 5
|
# Bemanitools 5
|
||||||
[](https://dev.s-ul.eu/djhackers/bemanitools/commits/master)
|
[](https://dev.s-ul.eu/djhackers/bemanitools/commits/master)
|
||||||
|
|
||||||
Version: 5.31</br>
|
Version: 5.32</br>
|
||||||
[Release history](CHANGELOG.md)
|
[Release history](CHANGELOG.md)
|
||||||
|
|
||||||
A collection of tools to run [various Bemani arcade games](#list-of-supported-games).
|
A collection of tools to run [various Bemani arcade games](#list-of-supported-games).
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
This library drives a "legacy" ezusb IO board, also known as C02 IO, and
|
This library drives a "legacy" ezusb IO board, also known as C02/D01 IO, and
|
||||||
implements the iidxio API of BT5. Thus, it allows you to use this IO board with
|
implements the iidxio API of BT5. Thus, it allows you to use this IO board with
|
||||||
*any* version of IIDX that is supported by BT5.
|
*any* version of IIDX that is supported by BT5.
|
||||||
|
|
||||||
@@ -24,5 +24,7 @@ the status LEDs on the side of the board should show a blinking pattern.
|
|||||||
dump to the FPGA.
|
dump to the FPGA.
|
||||||
* There is a script called ezusb-boot.bat which combines the two steps above
|
* There is a script called ezusb-boot.bat which combines the two steps above
|
||||||
and can be integrated into the startup process of a dedicated setup.
|
and can be integrated into the startup process of a dedicated setup.
|
||||||
|
* If you are using a D01 IO board, use the `fpga-d01.bin` file instead of the
|
||||||
|
`fpga.bin` file.
|
||||||
* If you ignore these steps, you will either run into errors or parts of the
|
* If you ignore these steps, you will either run into errors or parts of the
|
||||||
IO board won't work (e.g. lights).
|
IO board won't work (e.g. lights).
|
||||||
@@ -105,11 +105,11 @@ static void ac_io_emu_hdxs_cmd_send_version(
|
|||||||
resp.cmd.version.type = ac_io_u32(AC_IO_NODE_TYPE_LED_STRIP);
|
resp.cmd.version.type = ac_io_u32(AC_IO_NODE_TYPE_LED_STRIP);
|
||||||
resp.cmd.version.flag = 0x00;
|
resp.cmd.version.flag = 0x00;
|
||||||
resp.cmd.version.major = 0x01;
|
resp.cmd.version.major = 0x01;
|
||||||
resp.cmd.version.minor = 0x06;
|
resp.cmd.version.minor = 0x00;
|
||||||
resp.cmd.version.revision = 0x00;
|
resp.cmd.version.revision = 0x01;
|
||||||
memcpy(
|
memcpy(
|
||||||
resp.cmd.version.product_code,
|
resp.cmd.version.product_code,
|
||||||
"HDXS",
|
"HDXB",
|
||||||
sizeof(resp.cmd.version.product_code));
|
sizeof(resp.cmd.version.product_code));
|
||||||
strncpy(resp.cmd.version.date, __DATE__, sizeof(resp.cmd.version.date));
|
strncpy(resp.cmd.version.date, __DATE__, sizeof(resp.cmd.version.date));
|
||||||
strncpy(resp.cmd.version.time, __TIME__, sizeof(resp.cmd.version.time));
|
strncpy(resp.cmd.version.time, __TIME__, sizeof(resp.cmd.version.time));
|
||||||
|
|||||||
@@ -52,19 +52,20 @@ enum hdxs_light_bit {
|
|||||||
LIGHT_HD_P2_LEFT_RIGHT = 0x0D,
|
LIGHT_HD_P2_LEFT_RIGHT = 0x0D,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum hdxs_rgb_light_bit {
|
// the indexing starts from 0x20 if you're looking in geninput
|
||||||
LIGHT_HD_P1_SPEAKER_F_R = 0x20,
|
enum hdxs_rgb_light_idx {
|
||||||
LIGHT_HD_P1_SPEAKER_F_G = 0x21,
|
LIGHT_HD_P1_SPEAKER_F_R = 0x00,
|
||||||
LIGHT_HD_P1_SPEAKER_F_B = 0x22,
|
LIGHT_HD_P1_SPEAKER_F_G = 0x01,
|
||||||
LIGHT_HD_P2_SPEAKER_F_R = 0x23,
|
LIGHT_HD_P1_SPEAKER_F_B = 0x02,
|
||||||
LIGHT_HD_P2_SPEAKER_F_G = 0x24,
|
LIGHT_HD_P2_SPEAKER_F_R = 0x03,
|
||||||
LIGHT_HD_P2_SPEAKER_F_B = 0x25,
|
LIGHT_HD_P2_SPEAKER_F_G = 0x04,
|
||||||
LIGHT_HD_P1_SPEAKER_W_R = 0x26,
|
LIGHT_HD_P2_SPEAKER_F_B = 0x05,
|
||||||
LIGHT_HD_P1_SPEAKER_W_G = 0x27,
|
LIGHT_HD_P1_SPEAKER_W_R = 0x06,
|
||||||
LIGHT_HD_P1_SPEAKER_W_B = 0x28,
|
LIGHT_HD_P1_SPEAKER_W_G = 0x07,
|
||||||
LIGHT_HD_P2_SPEAKER_W_R = 0x29,
|
LIGHT_HD_P1_SPEAKER_W_B = 0x08,
|
||||||
LIGHT_HD_P2_SPEAKER_W_G = 0x2A,
|
LIGHT_HD_P2_SPEAKER_W_R = 0x09,
|
||||||
LIGHT_HD_P2_SPEAKER_W_B = 0x2B,
|
LIGHT_HD_P2_SPEAKER_W_G = 0x0A,
|
||||||
|
LIGHT_HD_P2_SPEAKER_W_B = 0x0B,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum extio_light_bit {
|
enum extio_light_bit {
|
||||||
|
|||||||
@@ -160,6 +160,10 @@ static HRESULT ezusb_iidx_emu_msg_interrupt_read(struct iobuf *read)
|
|||||||
otherwise the game's fpga check will fail */
|
otherwise the game's fpga check will fail */
|
||||||
msg_resp->fpga2_check_flag_unkn = 2;
|
msg_resp->fpga2_check_flag_unkn = 2;
|
||||||
|
|
||||||
|
#ifdef EZUSB_IIDX_EMU_D01_BOARD
|
||||||
|
msg_resp->inverted_pad &= ~(1 << 4);
|
||||||
|
#endif
|
||||||
|
|
||||||
read->pos = sizeof(*msg_resp);
|
read->pos = sizeof(*msg_resp);
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|||||||
@@ -59,7 +59,9 @@ struct ezusb_iidx_msg_interrupt_read_packet {
|
|||||||
1: Not used
|
1: Not used
|
||||||
2: Not used
|
2: Not used
|
||||||
3: Not used
|
3: Not used
|
||||||
4: Not used
|
4: C02/D01 board identifier, 1 = C02, 0 = D01 (on active low). This defines how the game has
|
||||||
|
to flash the FPGA board since D01 needs a different firmware (see result of FPGA CHECK on
|
||||||
|
game bootup)
|
||||||
5: Not used
|
5: Not used
|
||||||
6: usb mute?
|
6: usb mute?
|
||||||
7: Not used
|
7: Not used
|
||||||
|
|||||||
@@ -192,7 +192,8 @@ uint8_t iidx_io_ep2_get_slider(uint8_t slider_no)
|
|||||||
|
|
||||||
uint8_t iidx_io_ep2_get_sys(void)
|
uint8_t iidx_io_ep2_get_sys(void)
|
||||||
{
|
{
|
||||||
return ((~iidx_io_ezusb_read_packet.inverted_pad) >> 28) & 0x03;
|
return (((~iidx_io_ezusb_read_packet.inverted_pad) >> 28) & 0x03) |
|
||||||
|
((((~iidx_io_ezusb_read_packet.inverted_pad) >> 22) & 0x01) << 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t iidx_io_ep2_get_panel(void)
|
uint8_t iidx_io_ep2_get_panel(void)
|
||||||
|
|||||||
@@ -97,13 +97,29 @@ bool ea3_ident_invoke_module_init(
|
|||||||
ident->rev,
|
ident->rev,
|
||||||
ident->ext);
|
ident->ext);
|
||||||
|
|
||||||
|
/* Set up long-form sidcode env var */
|
||||||
|
|
||||||
|
str_format(
|
||||||
|
sidcode_long,
|
||||||
|
lengthof(sidcode_long),
|
||||||
|
"%s:%s:%s:%s:%s",
|
||||||
|
ident->model,
|
||||||
|
ident->dest,
|
||||||
|
ident->spec,
|
||||||
|
ident->rev,
|
||||||
|
ident->ext);
|
||||||
|
|
||||||
|
/* Set this up beforehand, as certain games require it in dll_entry_init */
|
||||||
|
|
||||||
|
std_setenv("/env/profile/soft_id_code", sidcode_long);
|
||||||
|
|
||||||
ok = module_context_invoke_init(module, sidcode_short, app_config);
|
ok = module_context_invoke_init(module, sidcode_short, app_config);
|
||||||
|
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Back-propagate sidcode */
|
/* Back-propagate sidcode, as some games modify it during init */
|
||||||
|
|
||||||
memcpy(ident->model, sidcode_short + 0, sizeof(ident->model) - 1);
|
memcpy(ident->model, sidcode_short + 0, sizeof(ident->model) - 1);
|
||||||
ident->dest[0] = sidcode_short[3];
|
ident->dest[0] = sidcode_short[3];
|
||||||
@@ -111,7 +127,7 @@ bool ea3_ident_invoke_module_init(
|
|||||||
ident->rev[0] = sidcode_short[5];
|
ident->rev[0] = sidcode_short[5];
|
||||||
memcpy(ident->ext, sidcode_short + 6, sizeof(ident->ext));
|
memcpy(ident->ext, sidcode_short + 6, sizeof(ident->ext));
|
||||||
|
|
||||||
/* Set up long-form sidcode env var */
|
/* Set up long-form sidcode env var again */
|
||||||
|
|
||||||
str_format(
|
str_format(
|
||||||
sidcode_long,
|
sidcode_long,
|
||||||
|
|||||||
@@ -17,17 +17,23 @@ void module_context_init(struct module_context *module, const char *path)
|
|||||||
|
|
||||||
if (module->dll == NULL) {
|
if (module->dll == NULL) {
|
||||||
LPSTR buffer;
|
LPSTR buffer;
|
||||||
|
DWORD err = GetLastError();
|
||||||
|
|
||||||
FormatMessageA(
|
FormatMessageA(
|
||||||
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
|
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
|
||||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||||
NULL,
|
NULL,
|
||||||
GetLastError(),
|
err,
|
||||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||||
(LPSTR) &buffer,
|
(LPSTR) &buffer,
|
||||||
0,
|
0,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
if (err == ERROR_MOD_NOT_FOUND) {
|
||||||
|
log_warning("%s is likely missing dependencies", path);
|
||||||
|
log_warning("Do you have vcredist/directx runtimes installed?");
|
||||||
|
}
|
||||||
|
|
||||||
log_fatal("%s: Failed to load game DLL: %s", path, buffer);
|
log_fatal("%s: Failed to load game DLL: %s", path, buffer);
|
||||||
|
|
||||||
LocalFree(buffer);
|
LocalFree(buffer);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ void *xcalloc(size_t nbytes)
|
|||||||
mem = calloc(nbytes, 1);
|
mem = calloc(nbytes, 1);
|
||||||
|
|
||||||
if (mem == NULL) {
|
if (mem == NULL) {
|
||||||
log_fatal("xmalloc(%u) failed", (uint32_t) nbytes);
|
log_fatal("xcalloc(%u) failed", (uint32_t) nbytes);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@ void *xmalloc(size_t nbytes)
|
|||||||
mem = malloc(nbytes);
|
mem = malloc(nbytes);
|
||||||
|
|
||||||
if (mem == NULL) {
|
if (mem == NULL) {
|
||||||
log_fatal("xcalloc(%u) failed", (uint32_t) nbytes);
|
log_fatal("xmalloc(%u) failed", (uint32_t) nbytes);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user