DualStick + CDZ Button DC Controls

General Dreamcast discussion applies here. Before posting here please check the other forums in the Dreamcast section to see if your topic would fit better in those categories.
Forum rules
Please check the other forums in the Dreamcast section before posting here to see if your topic would fit better in those categories. Example: A new game/homebrew release would go in the New Releases/Homebrew/Emulation section: http://dreamcast-talk.com/forum/viewforum.php?f=5 or if you're having an issue with getting your Dreamcast to work or a game to boot it would go in the Support section: http://dreamcast-talk.com/forum/viewforum.php?f=42
User avatar
Roel
Developer
Posts: 350
Location: Netherlands
Contact:

Re: Retro-Bit DC Controller

Post by Roel »

Anthony817 wrote:One of the cool things I had an idea for is to maybe map that unused "D" key which was actually a button for the Dream Eye camera, as maybe a macro of the A+B+X+Y+Start Soft Reset feature if that is possible for them to have on the firmware of the dongle.
I'm trying to wrap my head around this idea of yours, but it doesn't make any sense to me. You want to make a new controller, add a "D" button, and then instead of using it to send "D" to the console, send A+B+X+Y+Start instead?

Why not just add a soft reset button separately? You don't need the D button for that at all.

User avatar
Anthony817
Shark Patrol
Posts: 4036
Location: Fort Worth, Texas

Re: Retro-Bit DC Controller

Post by Anthony817 »

Sorry if I am confusing people, not my intent. I will try to recap what these controllers were actually planned for, and that they will still work for the Sega consoles even though they were made initially for more modern systems. Now while they do make normal controllers for Genesis and Saturn that are wireless and work with those 2 systems with use of dongle, they also planned more modern updated dual analog wireless Bluetooth controllers based on the console designs with more modern buttons also added. Note the prototypes below.

Image
Image

These updated dual analog controllers will be made regardless for PS3, PC and Android which has a modern "Home" and "Select" button as well. This can be seen on their dual analog prototypes above. The dongles that they make, will be compatible with every single one of their officially licensed Sega controllers as they confirmed this on Twitter. They noted the planned dual analog ones would work on any of the Sega consoles they make separate wireless controller dongles for.

Now, I was only saying "D" button since in maple that button is currently unused for any games, so the idea is to use an input the system understands. There is no Select button input for Dreamcast for example in the maple protocol. So that means that either one of the the unused Home or Select keys would be good candidates to add as macros for the "D" as soft reset. I am not talking about a new controller made exclusively for Dreamcast. I am saying that since they planned all new dual analog Bluetooth Saturn and Genesis style controllers for PS3, PC and Android as well as other compatible systems, we will be able to use these newer controllers on Dreamcast as well. Presumably a Dreamcast controller is coming as well.

Hope that makes more sense now. Hell, doesn't matter if it is any of those, just that controller dongle they made for Saturn again also supports PS4, Xbox One and Nintendo Switch controllers. You could literally use those too. They even posted about those controllers being used on Saturn with their dongle.
Image

User avatar
Roareye
Rank 9
Posts: 929
Dreamcast Games you play Online: Chu Chu Rocket, Quake 3, Monaco GP 2, PSO, Planet Ring, Toy Racer, Worms World Party
Location: England
Contact:

Re: Retro-Bit DC Controller

Post by Roareye »

Ragfish wrote:So now that Megavolt's adapter has proven without a doubt that dual analog controls can properly work on DC, I guess the next step would be for people to use it and then hack games to support the second stick.

Controller manufacturers aren't going to just make a product with previously unused features and then hope that modders will later be able find ways to use them, it will have to be the other way around. If we want them to make DC controllers with 2 sticks, then first we're going to have to be the ones to demonstrate that it would have uses.
It's a chicken and the egg scenario, for sure. However there's a few other issues.

Firstly megavolt's adapter doesn't exist as a product, it's a homebrew item that requires technical expertise in hardware (soldering etc) and specific equipment. His back and forth in that topic with a guy using an oscilloscope etc to debug their homemade version shows how difficult that item is to build if you have zero hardware knowledge/experience. It's an excellent project, but without it being easily accessible it's unlikely to change a hardware manufacturers mind.

The Brook Wingman SD is a product that gives access to controllers with the potential additional functions. But currently there's no proof that the Wingman SD will support the missing secondary stick and additional button features. It's a £40 item if anyone has the cash to test it.

As far as software is concerned, I'm willing to learn the process. I got hxd editor, but I've never done any coding related stuff before, so I don't know how to find the controller input code to alter it (nor what to alter it to). I'm looking for tutorials on this, if anyone is able to point me to one.

User avatar
OfManNotMachine
letterbomb
Posts: 152

Re: Retro-Bit DC Controller

Post by OfManNotMachine »

I thought the Retro Fighters pad was decent, until I just play Blue Stinger on it. The way the analog stick works must not be exactly how it works on a real DC controller. You literally can't run and turn at the same time with the Retro Fighters pad like you can on a real DC Controller. Now I'm left wondering how many other games might not perform correctly with the Retro Fighters controller.

User avatar
Roareye
Rank 9
Posts: 929
Dreamcast Games you play Online: Chu Chu Rocket, Quake 3, Monaco GP 2, PSO, Planet Ring, Toy Racer, Worms World Party
Location: England
Contact:

Re: Retro-Bit DC Controller

Post by Roareye »

Okay, I've ordered a Brook Wingman SD from Amazon, which means if it doesn't work with the additional controls I can easily return it.

LOOKING FOR A TUTORIAL ON HOW TO ALTER CONTROLS VIA HEX EDITOR - that way I can test multiple titles by modifying them, and if they work I can release those versions on here.

OR if anyone able to build a disc image in CDI or GDI of any game like Fur Fighters, Quake III etc with the secondary stick controls etc unlocked and I'll test it.

User avatar
Roareye
Rank 9
Posts: 929
Dreamcast Games you play Online: Chu Chu Rocket, Quake 3, Monaco GP 2, PSO, Planet Ring, Toy Racer, Worms World Party
Location: England
Contact:

Re: Retro-Bit DC Controller

Post by Roareye »

Anthony817 wrote: Analog inputs.

Code: Select all

/* Raw controller condition structure */
typedef struct {
    uint16 buttons;         /* buttons bitfield */
    uint8 rtrig;            /* right trigger */
    uint8 ltrig;            /* left trigger */
    uint8 joyx;         /* joystick X */
    uint8 joyy;         /* joystick Y */
    uint8 joy2x;            /* second joystick X */
    uint8 joy2y;            /* second joystick Y */
} cont_cond_t;
And then the digital inputs.

Code: Select all

#define CONT_C          (1<<0)
#define CONT_B          (1<<1)
#define CONT_A          (1<<2)
#define CONT_START      (1<<3)
#define CONT_DPAD_UP        (1<<4)
#define CONT_DPAD_DOWN      (1<<5)
#define CONT_DPAD_LEFT      (1<<6)
#define CONT_DPAD_RIGHT     (1<<7)
#define CONT_Z          (1<<8)
#define CONT_Y          (1<<9)
#define CONT_X          (1<<10)
#define CONT_D          (1<<11)
#define CONT_DPAD2_UP       (1<<12)
#define CONT_DPAD2_DOWN     (1<<13)
#define CONT_DPAD2_LEFT     (1<<14)
#define CONT_DPAD2_RIGHT    (1<<15)
This appears to relate to controller code for MAPLE, but I can't find these pieces of code in HxD hex editor. I'm guessing they don't show themselves this way in the hex editor.

https://segaxtreme.net/threads/about-ip-bin.6229/
The second post in this topic states that there are separate flags for each button and control on the Dreamcast pad inside the game files (It mentions IP.BIN specifically, but the one game I have with an IP.BIN (An F355 Challenge rearview hack) seems to include the same code as track03 from dubcity's GDIs. The decoded text lines appear to all be gibberish past the first few lines, which name the game and publisher, so they're not helping. Certainly none of them mention the controls in English.

I know I'm going wrong here, anyone able to enlighten me?

User avatar
Roel
Developer
Posts: 350
Location: Netherlands
Contact:

Re: Retro-Bit DC Controller

Post by Roel »

Anthony817 wrote:So that means that either one of the the unused Home or Select keys would be good candidates to add as macros for the "D" as soft reset.
But the "D" button doesn't soft-reset, so sending a "D" button press over the maple bus does not achieve that goal. Unless you want to hack all Dreamcast games to soft-reset when the "D" is pressed. Which, in my opinion, would be impractical at best.

I appreciate you taking the time to clarify your idea, and I agree that soft reset would be a good use of the Home button. But as far as I can tell, the implementation of such a feature would not require, or even relate to, the presence of a D button in the maple protocol.

If you want the Home button to soft-reset:
1. Press "Home" on the wireless controller.
2. Controller tells the dongle that "Home" has been pressed.
3. Firmware in dongle maps that input to "A+B+X+Y+Start" and sends that over the maple bus to the Dreamcast, triggering a soft reset (in games that support it).

The "D" button doesn't come into play here.


I apologise if I'm just missing the point here, but I hope I have at least been clear about what's causing my confusion in this matter.
Last edited by Roel on Tue Jan 05, 2021 8:26 am, edited 1 time in total.

User avatar
Roel
Developer
Posts: 350
Location: Netherlands
Contact:

Re: Retro-Bit DC Controller

Post by Roel »

Roareye wrote:
Anthony817 wrote: Analog inputs.

Code: Select all

/* Raw controller condition structure */
typedef struct {
    uint16 buttons;         /* buttons bitfield */
    uint8 rtrig;            /* right trigger */
    uint8 ltrig;            /* left trigger */
    uint8 joyx;         /* joystick X */
    uint8 joyy;         /* joystick Y */
    uint8 joy2x;            /* second joystick X */
    uint8 joy2y;            /* second joystick Y */
} cont_cond_t;
And then the digital inputs.

Code: Select all

#define CONT_C          (1<<0)
#define CONT_B          (1<<1)
#define CONT_A          (1<<2)
#define CONT_START      (1<<3)
#define CONT_DPAD_UP        (1<<4)
#define CONT_DPAD_DOWN      (1<<5)
#define CONT_DPAD_LEFT      (1<<6)
#define CONT_DPAD_RIGHT     (1<<7)
#define CONT_Z          (1<<8)
#define CONT_Y          (1<<9)
#define CONT_X          (1<<10)
#define CONT_D          (1<<11)
#define CONT_DPAD2_UP       (1<<12)
#define CONT_DPAD2_DOWN     (1<<13)
#define CONT_DPAD2_LEFT     (1<<14)
#define CONT_DPAD2_RIGHT    (1<<15)
This appears to relate to controller code for MAPLE, but I can't find these pieces of code in HxD hex editor. I'm guessing they don't show themselves this way in the hex editor.

https://segaxtreme.net/threads/about-ip-bin.6229/
The second post in this topic states that there are separate flags for each button and control on the Dreamcast pad inside the game files (It mentions IP.BIN specifically, but the one game I have with an IP.BIN (An F355 Challenge rearview hack) seems to include the same code as track03 from dubcity's GDIs. The decoded text lines appear to all be gibberish past the first few lines, which name the game and publisher, so they're not helping. Certainly none of them mention the controls in English.

I know I'm going wrong here, anyone able to enlighten me?
I'm afraid you are quite on the wrong track. That code is not supposed to appear in IP.BIN.

What you've got there is C code, which is how humans write programs. The code is then compiled, meaning it is translated to something the computer can understand. That is the "gibberish" you see in IP.BIN.

To edit a compiled game, you would have to use a decompiler or disassembler, or to know what the binary (or hexadecimal) representation is of the code that you wish to alter. This requires specialist knowledge which takes quite some time to learn.

User avatar
megavolt85
Developer
Posts: 2170

Re: Retro-Bit DC Controller

Post by megavolt85 »

Roareye wrote: OR if anyone able to build a disc image in CDI or GDI of any game like Fur Fighters, Quake III etc with the secondary stick controls etc unlocked and I'll test it.
use Quake 3 for testing, it does not need to be hacked, it supports everything that is included in the Maple protocol

User avatar
Roareye
Rank 9
Posts: 929
Dreamcast Games you play Online: Chu Chu Rocket, Quake 3, Monaco GP 2, PSO, Planet Ring, Toy Racer, Worms World Party
Location: England
Contact:

Re: Retro-Bit DC Controller

Post by Roareye »

Roel wrote: I'm afraid you are quite on the wrong track. That code is not supposed to appear in IP.BIN.

What you've got there is C code, which is how humans write programs. The code is then compiled, meaning it is translated to something the computer can understand. That is the "gibberish" you see in IP.BIN.

To edit a compiled game, you would have to use a decompiler or disassembler, or to know what the binary (or hexadecimal) representation is of the code that you wish to alter. This requires specialist knowledge which takes quite some time to learn.
Ah damn. The other forum stated it could be done via a hex editor, though they likely already have the specialist knowledge to know what they're looking at, and how to use a decompiler.

Either way it would be useful information to learn, if not for right now then for the future. Is there a tutorial on the process anywhere online you would recommend, or is it a university level thing?

With the Wingman coming tomorrow, I was looking to map the (usually ABXY) movement to the second analog stick (freeing ABXY for other functions), and use C & Z for the shoulder buttons with the Screenshot (Xbox One)/Share (PS4) button being D. If these functions can be set in a game, I can test them tomorrow when the Wingman arrives.

::EDIT:: Just seen megavolt85's response. Awesome! Thank you. I will use Quake III Arena for testing, and let you know how it goes. Fingers crossed. If the Wingman can do it, then it means there's a strong homebrew solution (megavolt85's MAPLE adapter) and a purchasable product that can pull it off. With that in mind we can look at modifying other titles to expand the use of the additional controls and it should have a knock-on effect to the controller designers such as Retro Fighters and Retro-Bit. Exciting times.

  • Similar Topics
    Replies
    Views
    Last post