Compare commits

..

7 Commits
5.31 ... 5.32

Author SHA1 Message Date
icex2
e0cfc8c948 Bump to version 5.32 and update changelog 2020-08-13 13:14:54 +02:00
icex2
93cfb591b7 iidxio-ezusb: Update documentation 2020-08-12 18:01:22 +00:00
icex2
3396c09fbf ezusb-iidx: Add macro to enable D01 board emulation
Used for dumping firmware, only. C02 and D01 boards only differ
in the FPGA firmware written to the board on boot up. This doesn't
matter for emulation, but when using a real IO board with
iidxio-ezusb.dll, a different FPGA firmware is required to be
flashed in order to get working turntables, top unit lights etc
2020-08-12 18:01:22 +00:00
icex2
bd8dc18b30 iidxio-ezusb: Support coin mech input 2020-08-11 22:05:46 +02:00
Will Xyen
8e9abf9906 launcher: Set soft_id_code before calling init as some games use it then 2020-07-24 08:47:25 -07:00
Will Xyen
62bb717582 hdxs: Is really an HDXB 1.0.1 apparently
Also update enum hdxs_rgb_light_idx to start from 0 since that's what the function does
2020-07-10 11:06:13 -07:00
Will Xyen
4816fb809d launcher: Use more descriptive error message for ERROR_MOD_NOT_FOUND 2020-07-06 18:03:25 +00:00
11 changed files with 60 additions and 25 deletions

View File

@@ -1,4 +1,7 @@
# Release history
## 5.32
* Various bugfixes
## 5.31
* DDR: Fix p3io and extio lights not working / being swapped when using geninput
* DDR: Add HDXS light support

View File

@@ -1,7 +1,7 @@
# Bemanitools 5
[![pipeline status](https://dev.s-ul.eu/djhackers/bemanitools/badges/master/pipeline.svg)](https://dev.s-ul.eu/djhackers/bemanitools/commits/master)
Version: 5.31</br>
Version: 5.32</br>
[Release history](CHANGELOG.md)
A collection of tools to run [various Bemani arcade games](#list-of-supported-games).

View File

@@ -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
*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.
* 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.
* 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
IO board won't work (e.g. lights).

View File

@@ -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.flag = 0x00;
resp.cmd.version.major = 0x01;
resp.cmd.version.minor = 0x06;
resp.cmd.version.revision = 0x00;
resp.cmd.version.minor = 0x00;
resp.cmd.version.revision = 0x01;
memcpy(
resp.cmd.version.product_code,
"HDXS",
"HDXB",
sizeof(resp.cmd.version.product_code));
strncpy(resp.cmd.version.date, __DATE__, sizeof(resp.cmd.version.date));
strncpy(resp.cmd.version.time, __TIME__, sizeof(resp.cmd.version.time));

View File

@@ -52,19 +52,20 @@ enum hdxs_light_bit {
LIGHT_HD_P2_LEFT_RIGHT = 0x0D,
};
enum hdxs_rgb_light_bit {
LIGHT_HD_P1_SPEAKER_F_R = 0x20,
LIGHT_HD_P1_SPEAKER_F_G = 0x21,
LIGHT_HD_P1_SPEAKER_F_B = 0x22,
LIGHT_HD_P2_SPEAKER_F_R = 0x23,
LIGHT_HD_P2_SPEAKER_F_G = 0x24,
LIGHT_HD_P2_SPEAKER_F_B = 0x25,
LIGHT_HD_P1_SPEAKER_W_R = 0x26,
LIGHT_HD_P1_SPEAKER_W_G = 0x27,
LIGHT_HD_P1_SPEAKER_W_B = 0x28,
LIGHT_HD_P2_SPEAKER_W_R = 0x29,
LIGHT_HD_P2_SPEAKER_W_G = 0x2A,
LIGHT_HD_P2_SPEAKER_W_B = 0x2B,
// the indexing starts from 0x20 if you're looking in geninput
enum hdxs_rgb_light_idx {
LIGHT_HD_P1_SPEAKER_F_R = 0x00,
LIGHT_HD_P1_SPEAKER_F_G = 0x01,
LIGHT_HD_P1_SPEAKER_F_B = 0x02,
LIGHT_HD_P2_SPEAKER_F_R = 0x03,
LIGHT_HD_P2_SPEAKER_F_G = 0x04,
LIGHT_HD_P2_SPEAKER_F_B = 0x05,
LIGHT_HD_P1_SPEAKER_W_R = 0x06,
LIGHT_HD_P1_SPEAKER_W_G = 0x07,
LIGHT_HD_P1_SPEAKER_W_B = 0x08,
LIGHT_HD_P2_SPEAKER_W_R = 0x09,
LIGHT_HD_P2_SPEAKER_W_G = 0x0A,
LIGHT_HD_P2_SPEAKER_W_B = 0x0B,
};
enum extio_light_bit {

View File

@@ -160,6 +160,10 @@ static HRESULT ezusb_iidx_emu_msg_interrupt_read(struct iobuf *read)
otherwise the game's fpga check will fail */
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);
return S_OK;

View File

@@ -59,7 +59,9 @@ struct ezusb_iidx_msg_interrupt_read_packet {
1: Not used
2: 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
6: usb mute?
7: Not used

View File

@@ -192,7 +192,8 @@ uint8_t iidx_io_ep2_get_slider(uint8_t slider_no)
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)

View File

@@ -97,13 +97,29 @@ bool ea3_ident_invoke_module_init(
ident->rev,
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);
if (!ok) {
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);
ident->dest[0] = sidcode_short[3];
@@ -111,7 +127,7 @@ bool ea3_ident_invoke_module_init(
ident->rev[0] = sidcode_short[5];
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(
sidcode_long,

View File

@@ -17,17 +17,23 @@ void module_context_init(struct module_context *module, const char *path)
if (module->dll == NULL) {
LPSTR buffer;
DWORD err = GetLastError();
FormatMessageA(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetLastError(),
err,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPSTR) &buffer,
0,
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);
LocalFree(buffer);

View File

@@ -16,7 +16,7 @@ void *xcalloc(size_t nbytes)
mem = calloc(nbytes, 1);
if (mem == NULL) {
log_fatal("xmalloc(%u) failed", (uint32_t) nbytes);
log_fatal("xcalloc(%u) failed", (uint32_t) nbytes);
return NULL;
}
@@ -31,7 +31,7 @@ void *xmalloc(size_t nbytes)
mem = malloc(nbytes);
if (mem == NULL) {
log_fatal("xcalloc(%u) failed", (uint32_t) nbytes);
log_fatal("xmalloc(%u) failed", (uint32_t) nbytes);
return NULL;
}