djhackersdev / segatools

Loaders and hardware emulators for SEGA games that run on the Nu and ALLS platforms
The Unlicense
51 stars 6 forks source link

Using SegaTools with PDAFT VerB 7.10 #11

Open icex2 opened 4 years ago

icex2 commented 4 years ago

In GitLab by @coburn64 on Jul 8, 2020, 06:45

After a lot of trial and error with SegaTools and needing to patch the Diva executable to bypass the Keychip Detection routines or else I'd be met with a "Error 0949: Keychip not found" (for whatever reason Segatools doesn't fake a keychip unless that's something I have to do/configure in the settings) I managed to get a slightly-patched version of Diva working with SegaTools on master branch.

I am working on contributing a configuration file for diva so I can do a PR, but I would like to know where SegaTools is mapping Square/Circle/Cross/Triangle to the arrow keys, and what parameters to put in the configuration file for remappable behaviour. Service, Test and Coin are working on 1, 2 and 3 respectively.

I'm also getting Touch Panel NG on startup check too. Is this to be implemented, or could the touch screen inputs be mapped to the mouse? I have a HDMI monitor that has a USB Multi-touch screen that I attached to my nVidia GPU-equipped workbench PC, and the game still said NG for the touch panel. I know of another open source loader that uses a similar-named DivaHook that has working touch panel support (the game says Touch Panel OK on startup and chimes when the screen is tapped).

icex2 commented 4 years ago

In GitLab by @WRShooter on Jul 8, 2020, 15:44

Hello Coburn,

If you are receiving the keychip warning, this means that the [keychip] part with the billing.pub and ca.crt is not configured properly or the files are not accessible. There is also the eeprom and sram that might not be set properly.

Also make sure that [ds] is set to region=1 if you are using the release on sows.

The button mapping was added last month to the dev release which uses [buttons] with key1, to key5 under it.

It can be modified either in the .ini or through divaio/config.c, that's up to you.

About the touch panel, i will let the other dev reply as it is not yet supported.

Best Regards

icex2 commented 4 years ago

In GitLab by @tau on Jul 10, 2020, 16:04

Right now the keyboard inputs for Diva are hardcoded. If you want to submit a MR for configurable keyboard bindings and/or XInput support then I'd be happy to take a look.

It's been a while since I looked at Diva so I don't recall how the touch screen works. Right now there is no touch screen support in the current divahook code.

icex2 commented 4 years ago

In GitLab by @tau on Jul 10, 2020, 16:10

Looks like the touch panel protocol is RS232 based, at least if I'm reading the cabinet wiring diagrams correctly. So this will require a Windows Multitouch shim to be added to Divahook.

icex2 commented 4 years ago

In GitLab by @coburn64 on Jul 11, 2020, 09:13

Hi there,

I was able to get past the keychip warning successfully. I also defined the controller keys in the segatools.ini file as Karl suggested and mapped the buttons to ASDF - works great... although for some reason the game just kicks me out with a Game Over after each song, unless I insert another quarter. Maybe it's not reading the coin counter correctly, although it does say "Credits 3" and increments when I insert virtual coins.

I also flipped the Dip Switch 1 and made the instance into a "Master" rather than Satellite Sub.

Is it normal for AFT to want to reinstall the option data every boot or is this a configuration issue? I have created app data paths for it's caches/appdata but it seems it still wants to reinstall all the option data. It will take some time every boot. Minime is running across the LAN on my office server in it's native NodeJS 12 environment, and the ALL.net icon does light up yellow with the exclaimation mark, so that's working.

Once I can figure out this, I'll PR the configuration file for your reviewing.

icex2 commented 4 years ago

In GitLab by @WRShooter on Jul 11, 2020, 16:07

Hello,

This is usually a sign that diva.exe is trying to output the temp to the Y: drive instead of the root of the game.

Did you hex edit the game for that?

icex2 commented 4 years ago

In GitLab by @coburn64 on Jul 12, 2020, 03:58

Do you mean that I hex-edit the binary to change the path? No, I haven't done that as I've kept the binary as virgin as possible.

I've found a hex address patch that does this, I'll apply it and check if that fixes the issue.

icex2 commented 3 years ago

In GitLab by @coburn64 on Jul 12, 2020, 10:20

Alright, I patched the binary to put things in the current directory instead of Y:, and the extended data does some quick number crunching and then says "OK". I assume if someone used the Windows subst Y: FOLDER_PATH command to mount a fake Y: drive then we could also work around that issue without requiring a patch.

Game is working as it should; no problems there apart from the touch screen which has already been mentioned earlier. Mind if I make a PR for you to review so we have a distribution configuration file for PD AFT?

icex2 commented 3 years ago

In GitLab by @WRShooter on Jul 12, 2020, 16:03

I personally don't mind that you make a PR but I won't be able to test until Monday.