Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Sega Dreamcast Reset-to-Menu function and automating it?  (Read 1100 times)

0 Members and 1 Guest are viewing this topic.

ZTylerDurden717

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 145
  • Last login:May 24, 2022, 10:18:56 am
  • I want to build my own arcade controls!
Sega Dreamcast Reset-to-Menu function and automating it?
« on: April 28, 2022, 09:08:57 am »
I have a Dreamcast in my cab and I love it to death.

One feature I would love to have is a reset-to-menu function if the game is idle for ~5 minutes so that it rolls the intro scenes like a normal cab would after 0 credits.

The Dreamcast has a reset-to-menu function by manually pressing the facebuttons+start at the same time.  I wanted to pick your brain and see if it was possible to somehow automate the reset through some rewiring process (2 player setup).  I was thinking an Arduino could be dropped in there and wired along with the arcade stick pcb with a timer to "press" the buttons, but I'm unsure about added latency and practicality on a 2 player setup.

Do you all remember when Dreamcasts were displayed at game stores (powerstone is what I remember) and they reset by themselves after a certain amount of time?  It'd be something like that except the reset should happen only when idle and not active.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 03:34:45 am
  • Designated spam hunter
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #1 on: April 28, 2022, 11:13:25 am »
I was thinking an Arduino could be dropped in there and wired along with the arcade stick pcb with a timer to "press" the buttons, but I'm unsure about added latency and practicality on a 2 player setup.
If the arcade stick PCB is "active low" (ground applied to an input port triggers the output), it should be possible using the approach outlined below.  It shouldn't cause any latency issues.   ;D

Get 5v and ground to power the Arduino from the Dreamcast controller connection.

Wire the Arduino in parallel with your current arcade stick PCB.
- Wire 4 Arduino input ports to the 4 D-Pad input ports on the arcade stick PCB.
- Wire 3 5 Arduino output ports to the facebutton and start input ports on the arcade stick PCB.

The Arduino program loop would be fairly simple:

- Define and initialize the input and output pins.
(Internal input pullup resistors are your friend https://www.arduino.cc/en/Tutorial/DigitalInputPullup and you can use the serial monitor output to troubleshoot/verify your code before you connect the Arduino to the arcade stick PCB)

- Start a more than 5 minute long for/next loop. (The idea is to keep resetting the counter variable before it reaches the end of the loop.)
-- Increment the for/next counter variable.
-- Read the 4 input ports.
-- If any of the 4 ports is logic low (D-pad pressed), reset the counter variable value and resume the for/next loop.
-- If the counter variable value indicates that it has been more than 5 minutes since the D-pad has been pressed, pull the 3 5 outputs low, wait enough miliseconds for the reset to trigger, pull the outputs high again, reset the counter variable value and resume the for/next loop.

Assuming that the reset-to-menu combo doesn't cause problems when you're already in the menu, this approach should work.   :cheers:


Scott
EDIT: You need 5 Arduino outputs for the combo, not 3.
« Last Edit: April 28, 2022, 09:47:33 pm by PL1 »

ZTylerDurden717

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 145
  • Last login:May 24, 2022, 10:18:56 am
  • I want to build my own arcade controls!
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #2 on: April 28, 2022, 12:55:33 pm »
I was thinking an Arduino could be dropped in there and wired along with the arcade stick pcb with a timer to "press" the buttons, but I'm unsure about added latency and practicality on a 2 player setup.
If the arcade stick PCB is "active low" (ground applied to an input port triggers the output), it should be possible using the approach outlined below.  It shouldn't cause any latency issues.   ;D

Get 5v and ground to power the Arduino from the Dreamcast controller connection.

Wire the Arduino in parallel with your current arcade stick PCB.
- Wire 4 Arduino input ports to the 4 D-Pad input ports on the arcade stick PCB.
- Wire 3 Arduino output ports to the facebutton and start input ports on the arcade stick PCB.

The Arduino program loop would be fairly simple:

- Define and initialize the input and output pins.
(Internal input pullup resistors are your friend https://www.arduino.cc/en/Tutorial/DigitalInputPullup and you can use the serial monitor output to troubleshoot/verify your code before you connect the Arduino to the arcade stick PCB)

- Start a more than 5 minute long for/next loop. (The idea is to keep resetting the counter variable before it reaches the end of the loop.)
-- Increment the for/next counter variable.
-- Read the 4 input ports.
-- If any of the 4 ports is logic low (D-pad pressed), reset the counter variable value and resume the for/next loop.
-- If the counter variable value indicates that it has been more than 5 minutes since the D-pad has been pressed, pull the 3 outputs low, wait enough miliseconds for the reset to trigger, pull the outputs high again, reset the counter variable value and resume the for/next loop.

Assuming that the reset-to-menu combo doesn't cause problems when you're already in the menu, this approach should work.   :cheers:


Scott

Awesome, Scott!  Thank you.  I had to read this like 8 times to make sense of it since I'm not well versed.  It makes sense though and it's encouraging to start on my side.

Let me ask you this as a test case.  If we're playing a beat 'em up 2 player, and I'm out of continues as 1st player while 2nd player keeps going.  What happens after 5 minutes, does the arduino reset the game?  In other words, is your wiring proposal taking into account 2nd player inputs?

« Last Edit: April 28, 2022, 12:57:31 pm by ZTylerDurden717 »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 03:34:45 am
  • Designated spam hunter
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #3 on: April 28, 2022, 03:23:46 pm »
If we're playing a beat 'em up 2 player, and I'm out of continues as 1st player while 2nd player keeps going.  What happens after 5 minutes, does the arduino reset the game?  In other words, is your wiring proposal taking into account 2nd player inputs?
If there are no P2 inputs wired to the Adruino inputs and P1 doesn't press any buttons wired to the Adruino inputs for 5 minutes, the Arduino will trigger the reset-to-menu combo.

You can wire the Arduino inputs to any non-analog (i.e. not the thumbstick) arcade stick PCB inputs that you want.

As long as you choose button or D-pad inputs that P1 or P2 will press at least every couple of minutes, you will be good to go.   ;D

For more specific advice, it would help to know what encoder PCB(s) you are currently using for your cab.
- PCB(s) connected to arcade-style controls would be the easiest hack.
- Hacking one original controller is probably doable, but a tight fit (no idea if there's enough room) and you would still have the P2 long-play issue you mentioned.
- Hacking two original controllers could be messy because you'd need at least one or two wires running from the P2 controller to the Arduino hidden in the P1 controller.   :banghead:


Scott
« Last Edit: April 28, 2022, 03:34:04 pm by PL1 »

ZTylerDurden717

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 145
  • Last login:May 24, 2022, 10:18:56 am
  • I want to build my own arcade controls!
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #4 on: April 28, 2022, 06:31:59 pm »
You can wire the Arduino inputs to any non-analog (i.e. not the thumbstick) arcade stick PCB inputs that you want.

As long as you choose button or D-pad inputs that P1 or P2 will press at least every couple of minutes, you will be good to go.   ;D


Ok, cool!  I've got two MC Cthulhu PCB's (love those things).  You mind double checking I got this right using a basic example?

1) Currently MC Cthulhu Dpad Down input port has one wire coming out of it for 1P and 2P.  They're both going to their respective fight stick down direction on the other end.  Solid.

2) I bring out a new wire for 1P.  One end goes into the Dpad Down input port of the pcb and the other end goes into the arduino input port.  The arcade pcb now has two wires coming out of its Dpad Down input port.

3) Same thing for 2P.  Is the new wire going to the same input port location of where 1P's wire went/is on the Arduino?


PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 03:34:45 am
  • Designated spam hunter
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #5 on: April 28, 2022, 08:20:09 pm »
 :dizzy:

Here's a simplified diagram of what I'm talking about.

The before shows what you currently have with the D-pad (joystick) and buttons wired directly to the MC Cthulhu inputs.

The after shows how you add the Arduino input and output wires.
- Connect the Arduino wires at the MC Cthulhu screw terminals.  One wire per Arduino input -- 4 total.  One wire per Arduino output -- 3 5 total.
- When the "D-pad right" switch is closed, ground is applied to both the Arduino and MC Cthulhu inputs and the Arduino restarts the for/next timer loop.
- When the for/next timer loop passes 5 minutes, the three Arduino outputs for the reset-to-menu combo are temporarily pulled low which triggers those three five MC Cthulhu inputs.

You can get 5v (VCC) for the Arduino from solder point "A" on one of the MC Cthulhu boards.


Scott
EDIT: You need 5 Arduino outputs for the combo, not 3.
« Last Edit: April 28, 2022, 09:50:35 pm by PL1 »

ZTylerDurden717

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 145
  • Last login:May 24, 2022, 10:18:56 am
  • I want to build my own arcade controls!
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #6 on: April 28, 2022, 08:52:33 pm »
Legendary, thank you.  That answered my question.

So 2nd player basic wiring should look something like this?

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 03:34:45 am
  • Designated spam hunter
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #7 on: April 28, 2022, 09:41:48 pm »
So 2nd player basic wiring should look something like this?
Close.

There will be 4 separate Arduino input ports, 2 from P1 and 2 from P2.

I'm thinking these controls would be good choices:
- P1 D-pad right
- P1 A (or X?) button
- P2 D-pad right
- P2 A (or X?) button

Just noticed that there are 4 facebuttons, not 2, so you'll need 5 Arduino outputs for the combo.   :embarassed:

For the 5 Arduino outputs, those only need to go to P1 since you don't need to trigget the reset-to-menu combo (pressing the four facebuttons + start at the same time) on both P1 and P2, right?

- Yes, you'll end up wiring an Arduino input and output to the same MC Cthulhu button input.
- No, it won't be a problem.   ;D


Scott

ZTylerDurden717

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 145
  • Last login:May 24, 2022, 10:18:56 am
  • I want to build my own arcade controls!
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #8 on: April 28, 2022, 10:59:30 pm »
Just noticed that there are 4 facebuttons, not 2, so you'll need 5 Arduino outputs for the combo.   :embarassed:

Your idea still makes sense regardless of button count.  ;)

For the 5 Arduino outputs, those only need to go to P1 since you don't need to trigget the reset-to-menu combo (pressing the four facebuttons + start at the same time) on both P1 and P2, right?

Right!  Just 1P needs to trigger the button sequence for reset.  Less work for me.

- Yes, you'll end up wiring an Arduino input and output to the same MC Cthulhu button input.
- No, it won't be a problem.   ;D

Ok! don't think it can get any clearer than this  :cheers:

I'll give it a go!  Thanks!!

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 03:34:45 am
  • Designated spam hunter
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #9 on: April 28, 2022, 11:46:38 pm »
Glad to assist.   :cheers:

Which Arduino do you plan on using?  Pro Micro?  Micro?  Leonardo?
- These 32u4 ones with a USB connector are good choices IMHO.
- Pro Micros are inexpensive, but can be a bit tricky to reprogram sometimes.
- You will be reprogramming it many times while developing/troubleshooting the sketch.

You'll probably want to do your development work and testing on your computer desk before you install the Arduino in your cab.
- If you have a 400 point breadboard, an assortment of Dupont jumpers, 4-5 tactile buttons, 5 LEDs and 5 current-limiting resistors, they will come in very handy.   ;)


Scott

ZTylerDurden717

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 145
  • Last login:May 24, 2022, 10:18:56 am
  • I want to build my own arcade controls!
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #10 on: April 29, 2022, 09:39:44 am »
Years ago I got the Arduino Uno (A000066) that I've been meaning to find some use for.  Should work?


I've got the arcade buttons, and a pack of these for resistors if these work? https://www.jaycar.com.au/300-ohm-0-5-watt-metal-film-resistors-pack-of-8/p/RR0559

I'll have to get the breadboard, jumpers, and LEDs.  They sell those by individual instead of having to get a 400 pack right?  ;D

And with these materials I should be able to test the scenario independent of the Dreamcast or in tandem with?  I've got a spare Dreamcast outside of the cab so I can use it for this.
« Last Edit: April 29, 2022, 09:42:14 am by ZTylerDurden717 »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 03:34:45 am
  • Designated spam hunter
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #11 on: April 29, 2022, 01:00:02 pm »
Years ago I got the Arduino Uno (A000066) that I've been meaning to find some use for.  Should work?
It will work fine for this application.   ;D

I've got the arcade buttons
You may want some 6mmx6mm tactile buttons for use on the breadboard.
- There are also 2-pin versions so you don't have to remember which legs are connected.

 

and a pack of these for resistors if these work? https://www.jaycar.com.au/300-ohm-0-5-watt-metal-film-resistors-pack-of-8/p/RR0559
Those should be good.

I'll have to get the breadboard, jumpers, and LEDs.  They sell those by individual instead of having to get a 400 pack right?  ;D
You might find better prices, but here are a few items to consider.

Breadboard (3 pack): https://www.amazon.com/gp/product/B00LSG5BJK/

LED assortment (25 pack): https://www.amazon.com/gp/product/B004JO2PVA/

Dupont jumpers: There are sets of M-M, F-F, and M-F.  Good idea to have all three kinds.  Your choice on separate wires or ribbon cable that easily separates into individual wires.
 

And with these materials I should be able to test the scenario independent of the Dreamcast or in tandem with?  I've got a spare Dreamcast outside of the cab so I can use it for this.
With these materials you can develop and test your mod independent of the Dreamcast and MC Cthulhu.   :cheers:


Scott

ZTylerDurden717

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 145
  • Last login:May 24, 2022, 10:18:56 am
  • I want to build my own arcade controls!
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #12 on: April 30, 2022, 09:31:48 am »
Awesome.  I'll get the materials.

I'm gonna keep you looped in progress and troubleshooting.  Hope that's fine  :)
« Last Edit: April 30, 2022, 09:53:52 am by ZTylerDurden717 »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8916
  • Last login:Today at 03:34:45 am
  • Designated spam hunter
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #13 on: April 30, 2022, 11:39:46 am »
I'm gonna keep you looped in progress and troubleshooting.  Hope that's fine  :)
Of course it is.   :cheers:

I'll probably chime in with (hopefully helpful) suggestions as you develop the sketch.   ;D

Here are some commands from this sketch that you may find useful for your sketch.

Define Arduino pins.
Code: [Select]
#define DIR       8   // Arduino pin that connects to A4988 driver board DIR pin.
#define STEP      9   // Arduino pin that connects to A4988 driver board STEP pin.

Define variables.
- "pd" is an integer in the range of -32,768 to 32,767 for your Uno board.
- "setdir" is a boolean logic value, either HIGH or LOW
Code: [Select]
int pd = 500;         // Pulse Delay period in miliseconds with "delay(pd);" command below
boolean setdir = LOW; // Set Direction

Set the pin defined as "DIR" to the value of the variable "setdir".
- setdir=0 ==> logic low   setdir=1 ==> logic high
Code: [Select]
    digitalWrite(DIR,setdir);

Set the pin defined as "STEP" to logic high, wait 500 microseconds, set the "STEP" pin to logic low, and wait for variable "pd" microseconds.
Code: [Select]
    digitalWrite(STEP,HIGH);
    delay(500); // wait 500 microseconds before proceeding;
    digitalWrite(STEP,LOW);
    delay(pd); // wait "pd" microseconds before proceeding;

Output the word "Step " and the value of variable "setdir" to the serial monitor window.
Code: [Select]
   // Print step, direction (0 or 1) and carriage return
  Serial.print("Step ");
  Serial.println(setdir);


Scott

ZTylerDurden717

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 145
  • Last login:May 24, 2022, 10:18:56 am
  • I want to build my own arcade controls!
Re: Sega Dreamcast Reset-to-Menu function and automating it?
« Reply #14 on: May 24, 2022, 10:18:56 am »
Still working on this..

Parts are here, just gotta get my hands dirty