(Topic ID: 269190)

Stars 2020 - new code for Stern Stars (1978)

By DickHamill

3 years ago


Topic Heartbeat

Topic Stats

  • 525 posts
  • 74 Pinsiders participating
  • Latest reply 14 days ago by DickHamill
  • Topic is favorited by 89 Pinsiders

You

Linked Games

  • Stars Stern Electronics, 1978

Topic Gallery

View topic image gallery

StempleLABS - Stars 2021 BSOS Sound system (resized).png
2 (resized).png
1 (resized).png
3 (resized).png
4 (resized).png
614CF2ED-B46E-4A7A-BA95-4E55D4EACFE7 (resized).jpeg
Stars 2021 - Overview Sheet (resized).png
WT Flasher Screenshot (resized).png
CH341a SPI mode to WAV trigger (resized).png
WAV trigger programmer (resized).JPG
Stern Stars Cards (resized).JPG
pasted_image (resized).png
Wiring rev5 (resized).png
b275c2cdb42ad1f14d3485afc58b80fdb5c3509c (resized).jpg
pasted_image (resized).png
20E4B30C-E4A5-4B79-A3BE-BB30EA4A55EA (resized).jpeg
There are 525 posts in this topic. You are on page 5 of 11.
#201 3 years ago

Your stars must not be the evil bastard that every stars I've ever played has been. In normal code stars I always went for the special because i've got it set to 100,000 and repeatable which is fun as hell. On 3 ball I manage to get it hit and light it probably once out of 5 or so games and that's starting with one of the stars lit each ball. If Elwin and Jesus had a baby I can't see him locking in star level 3 on a game that's set up to competition standards.

#202 3 years ago

About to make some connectors. On the Nano there's only 2 grounds that need to be spread across 5 pins. Trying to go straight from a male-pinned nano to the connector. Anybody come up with something more elegant than a wire nut or trying to crimp 3 wires to one terminal?

In other news those ebay project boards suck. They aren't actually traced out from the nano so you have to jump them yourself, and the areas they do have marked don't even line up straight across. Really weird.

#203 3 years ago
Quoted from Chalkey:

Your stars must not be the evil bastard that every stars I've ever played has been.

No I get what re saying, but do you want to dumb it down so you get it every 2 games? Its supposed to be hard for a reason. How often do you lock in the super bonus on other Strrn games?

#204 3 years ago

I just didn't feel like it would still be that easy. Locking in level 1 would probably happen most games but I feel like 3 would still be very hard - and then you still have the other 2 objectives to accomplish.

#205 3 years ago
Quoted from Chalkey:

I just didn't feel like it would still be that easy.

Well stock version of this with the added ball savers it might be

But yeah, I haven't had a deep dive into this yet at home, finally got my flippers together so I'm ready. Need to play it in the day though because this thing is ringing the chimes like nobody's business.

#206 3 years ago

Agreed right now, mine it setup for competition. You also have to remember that in competition you very rarely get to wizards modes, etc anyway so I think keeping the objective hard is good. You can make Stars setup easier, for instance I would adjust sling to be not so sensitive, put the outlane posts and rubbers back in and into the first position and lower the slope to 6.5. With that setup the wizard mode is more attainable.

Quoted from Chalkey:

Your stars must not be the evil bastard that every stars I've ever played has been. In normal code stars I always went for the special because i've got it set to 100,000 and repeatable which is fun as hell. On 3 ball I manage to get it hit and light it probably once out of 5 or so games and that's starting with one of the stars lit each ball. If Elwin and Jesus had a baby I can't see him locking in star level 3 on a game that's set up to competition standards.

#207 3 years ago
Quoted from Chalkey:

About to make some connectors. On the Nano there's only 2 grounds that need to be spread across 5 pins. Trying to go straight from a male-pinned nano to the connector. Anybody come up with something more elegant than a wire nut or trying to crimp 3 wires to one terminal?
In other news those ebay project boards suck. They aren't actually traced out from the nano so you have to jump them yourself, and the areas they do have marked don't even line up straight across. Really weird.

Chalkey - I revised my diagram. You only have to ground J5:pins 10, 13, and 24. Don't worry about 11 & 12. If you use a switch for that, you can turn it on/off to boot with 6800 or Arduino.

Wiring rev3a (resized).pngWiring rev3a (resized).png
#208 3 years ago

@chalkey, if you go into audits menu #15 you can make the skill shot give you a full level of stars. It's not that difficult to get to level 3 in a three ball game. Getting to the hurry up on the other hand...

#209 3 years ago
Quoted from CousinPookie:

chalkey, if you go into audits menu #15 you can make the skill shot give you a full level of stars. It's not that difficult to get to level 3 in a three ball game. Getting to the hurry up on the other hand...

Aw, come on, how hard is hitting a few dozen drop targets?

#210 3 years ago
Quoted from DickHamill:

Aw, come on, how hard is hitting a few dozen drop targets...

...in one ball?

Fixed that for you

#211 3 years ago

@dickhamill, should your code work as is for an Arduino mega? I've been trying to get mine working for a while now with no luck. I can't even get a response from the diagnostic sketch you released. I'd like to use the mega in order to have extra serial ports for the wav trigger and maybe the matrix display. It seems like AltSoftSerial only wants to use D8/D9 for serial communication on the nano, but they're being used. I'm new to the Arduino thing and don't know if I would need to change anything in the code to get the mega to work.

It's always possible that I have some sort of wiring issue, but I've checked multiple times and everything seems correct.

20200603_172549 (resized).jpg20200603_172549 (resized).jpg
#212 3 years ago
Quoted from CousinPookie:

dickhamill, should your code work as is for an Arduino mega? I've been trying to get mine working for a while now with no luck. I can't even get a response from the diagnostic sketch you released. I'd like to use the mega in order to have extra serial ports for the wav trigger and maybe the matrix display. It seems like AltSoftSerial only wants to use D8/D9 for serial communication on the nano, but they're being used. I'm new to the Arduino thing and don't know if I would need to change anything in the code to get the mega to work.
It's always possible that I have some sort of wiring issue, but I've checked multiple times and everything seems correct.
[quoted image]

I just looked up the port mapping for the Mega and it's substantially different than the Nano. To get the speeds required, I wasn't able to use digitalRead and digitalWrite in the code (which would have guaranteed compatibility on different boards). So, instead, I read and write directly from PORTB, PORTC, and PORTD. On the Nano, the ports look like this:
nano port mapping (resized).jpgnano port mapping (resized).jpg

So, as you see, Pin 2 = PD4 (PortD4).

I'm looking at a similar diagram for the Mega, and I don't even see a PD4:

Mega pin out (resized).pngMega pin out (resized).png

So, all the port stuff in BallySternOS.cpp would need to be remapped in to available pins on the Mega.

#213 3 years ago
Quoted from pavel_one:

We may even stream both Stars2020 and Blackjack2020 real soon.

pavel_one I really hope to see a stream. I love watching pinball and I would enjoy seeing someone play the new rules of these games.
By the way, I've finished the writeup on Black Jack 2020 and posted it here:
https://pinside.com/pinball/forum/topic/black-jack-2020-new-code-for-bally-black-jack-1977

#214 3 years ago

All excited to try out the code today, installed board back in machine and the red light on board stays on no blink and the game doesn’t boot up. Back to the drawing board .

#215 3 years ago
Quoted from pins4life33:

All excited to try out the code today, installed board back in machine and the red light on board stays on no blink and the game doesn’t boot up. Back to the drawing board .

If you have the capability to plug the Arduino into a computer while it's on the MPU, try running MachineDiagnostics.ino
It will report back via the serial port and tell you what it's trying to do and what it sees from the MPU.
Here's an example of the output you should get back to the terminal:

Start of program
Monitoring VMA signal, looking for presence of M6800 processor
Saw no sign of M6800 -- program will continue
Attempting to read & write from U10
Testing U10A Control Register
The U10A control register passed
Testing U10B Control Register
The U10B control register passed
Testing U11A Control Register
The U11A control register passed
Testing U11B Control Register
The U11B control register passed
Testing the clock cycle (if this hangs here, the conncection to clock is faulty)
It took 20984 microseconds for 10000 clock cycles
Clock frequency (very) approximately = 476 kHz
DIP Bank 0 = 0xE8
DIP Bank 1 = 0xC0
DIP Bank 2 = 0x9B
DIP Bank 3 = 0xA7
Starting interrupt tests - this is going to take 5 seconds to test
In 5 seconds, saw 600 U10B interrupts and 1634 U11A interrupts
Zero-crossing approx. 120.00 times a second
Display interrupt approx. 326.80 times a second
Interrupt tests done - if frequencies aren't approx 120 & 320, there's a problem with the interrupt line.
END OF TESTS
(waiting for reset)
(waiting for reset)

#216 3 years ago

Thanks for advice, I will take a look and see if I can run this on the weekend. Just got back from the arcade where the machine is .

Quoted from DickHamill:

If you have the capability to plug the Arduino into a computer while it's on the MPU, try running MachineDiagnostics.ino
It will report back via the serial port and tell you what it's trying to do and what it sees from the MPU.
Here's an example of the output you should get back to the terminal:
Start of program
Monitoring VMA signal, looking for presence of M6800 processor
Saw no sign of M6800 -- program will continue
Attempting to read & write from U10
Testing U10A Control Register
The U10A control register passed
Testing U10B Control Register
The U10B control register passed
Testing U11A Control Register
The U11A control register passed
Testing U11B Control Register
The U11B control register passed
Testing the clock cycle (if this hangs here, the conncection to clock is faulty)
It took 20984 microseconds for 10000 clock cycles
Clock frequency (very) approximately = 476 kHz
DIP Bank 0 = 0xE8
DIP Bank 1 = 0xC0
DIP Bank 2 = 0x9B
DIP Bank 3 = 0xA7
Starting interrupt tests - this is going to take 5 seconds to test
In 5 seconds, saw 600 U10B interrupts and 1634 U11A interrupts
Zero-crossing approx. 120.00 times a second
Display interrupt approx. 326.80 times a second
Interrupt tests done - if frequencies aren't approx 120 & 320, there's a problem with the interrupt line.
END OF TESTS
(waiting for reset)
(waiting for reset)

#217 3 years ago

one of the best games of the era made even better???? Hell yes

#218 3 years ago
Quoted from Chalkey:

Your stars must not be the evil bastard that every stars I've ever played has been.....

well sweet revenge I fired it up last night and collected all stars 0 times so...yeah maybe not too easy

#219 3 years ago
Quoted from DickHamill:

The lamps are dimmed by only turning them on every other time through the 120Hz interrupt. I've tried dimming them more by using other patterns, but that causes noticeable flicker, even with incandescent lamps. However, if you want to try it out, the lines you're looking for are in BallySternOS.cpp. Currently, they look like this:
// Every other time through the cycle, we OR in the dim variable
// in order to dim those lights
if (numberOfU10Interrupts&0x00000001) lampOutput |= LampDim0[lampBitCount];
if (numberOfU10Interrupts&0x00000002) lampOutput |= LampDim1[lampBitCount];
You can try changing that middle line to this:
// Every other time through the cycle, we OR in the dim variable
// in order to dim those lights
if (numberOfU10Interrupts%3) lampOutput |= LampDim0[lampBitCount];
if (numberOfU10Interrupts&0x00000002) lampOutput |= LampDim1[lampBitCount];
Which will lower the dim lights from a 50% duty cycle to a 33%.
That makes things a bit flickery on my machine. Give it a shot and report back how it looks on LEDs.

I like the flickery effect on the Star lights alone. It really distinguished the DIM state. The problem is, just like you said, makes every DIM state a bit flickery, and it does not look good on the attract mode or in the bonus indicators.

I found on my all Alltek setup, I get more stability in the LED lights when my SLOW_STOBE is set to 1 and increase the LAMP LOOP to 40, effectively lengthening the lamp delay 130%

It works well! Thanks for the hard work!

#220 3 years ago
Quoted from pavel_one:

I like the flickery effect on the Star lights alone. It really distinguished the DIM state. The problem is, just like you said, makes every DIM state a bit flickery, and it does not look good on the attract mode or in the bonus indicators.
I found on my all Alltek setup, I get more stability in the LED lights when my SLOW_STOBE is set to 1 and increase the LAMP LOOP to 40, effectively lengthening the lamp delay 130%
It works well! Thanks for the hard work!

Aha - good to know. The SLOW_STROBE define only inserts one clock cycle in between the data writes. You might be able to go back to the 50% duty cycle by inserting more clock cycles between the data writes of that strobe. Let me know if you want to muck around more to really tune it in. Maybe we can come up with an alternate setup that works for more people.

Also, I really hope to see a stream sometime soon

#221 3 years ago

Just caught on to this thread. Very cool!! While I am not familiar with the arduino nano, you may be able to expand your GPIO horizons with an MCP23017:

https://www.digikey.com/product-detail/en/microchip-technology/MCP23017-E-SP/MCP23017-E-SP-ND/894272

There is an SPI version as well as an I2C version, so if the nano has either of those capabilities it could work. You can also chain them together to get additional GPIO pins. The only disadvantage is that it takes extra cpu cycles to read and write the chips, as opposed to directly reading and writing the registers as you do with the nano's built in GPIO pins.

I haven't tested the following.. but you can get a good start on code to talk to the 23017 for the arduino here:

https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library

Take a look at the above.. it may give you some ideas

#222 3 years ago
Quoted from pincoder:

Just caught on to this thread. Very cool!! While I am not familiar with the arduino nano, you may be able to expand your GPIO horizons with an MCP20317:
https://www.digikey.com/product-detail/en/microchip-technology/MCP23017-E-SP/MCP23017-E-SP-ND/894272
There is an SPI version as well as an I2C version, so if the nano has either of those capabilities it could work. You can also chain them together to get additional GPIO pins. The only disadvantage is that it takes extra cpu cycles to read and write the chips, as opposed to directly reading and writing the registers as you do with the nano's built in GPIO pins.
I haven't tested the following.. but you can get a good start on code to talk to the 23017 for the arduino here:
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
Take a look at the above.. it may give you some ideas

That's an interesting idea. It would give access to all the address lines.
As for the speed issue, the Arduino has to talk as fast as possible to the lines I'm currently using (D0-D7, A0, A1, A3, A4, A7, R/W, PHI2, IRQ, VMA), so if I used this port extender then I would keep those the same with the exception of A7. For all the 8250 stuff I'm doing, A7 is high, so it could be moved off-chip. That would mean I had two free pins to talk i2c with a MCP20317.
For a couple of dollars, this could be a substantial upgrade to the circuit.
I'm not sure I would want to wire it all up by hand.

#223 3 years ago
Quoted from DickHamill:

That's an interesting idea. It would give access to all the address lines.
As for the speed issue, the Arduino has to talk as fast as possible to the lines I'm currently using (D0-D7, A0, A1, A3, A4, A7, R/W, PHI2, IRQ, VMA), so if I used this port extender then I would keep those the same with the exception of A7. For all the 8250 stuff I'm doing, A7 is high, so it could be moved off-chip. That would mean I had two free pins to talk i2c with a MCP20317.
For a couple of dollars, this could be a substantial upgrade to the circuit.
I'm not sure I would want to wire it all up by hand.

If you *need* the extra GPIO the only other option is to use an arduino with enough built-in pins. Again, I'm not familiar with arduino but perhaps that's an option to consider. You may have to rewrite your code to use different GPIO pins to make it work but depending on your goals it could be the cleanest option.

Also, it doesn't hurt to order a few of the 23017 chips and play around a little just to see how it goes

#224 3 years ago
Quoted from DickHamill:

chalkey - I revised my diagram. You only have to ground J5:pins 10, 13, and 24. Don't worry about 11 & 12. If you use a switch for that, you can turn it on/off to boot with 6800 or Arduino.[quoted image]

The way the diagram is set up it looks like the pins you said to ground are going to a switch. Forgive my naivety if I'm reading this wrong. Can 10-13 and 24 still be connected to ground if somebody already made connectors for it?

#225 3 years ago
Quoted from Chalkey:

The way the diagram is set up it looks like the pins you said to ground are going to a switch. Forgive my naivety if I'm reading this wrong. Can 10-13 and 24 still be connected to ground if somebody already made connectors for it?

Chalkey - I added the switch so I can dual-boot my machines. For the Arduino to run, you have to ground J5:pin10 & J5:pin13. (way, way back I said ground 10-13, but that was just a convenience because I bridged them all, but really only 10 & 13 HAD to be grounded).

In order to halt the M6800 and leave it plugged in, you have to ground J5:pin24.

So on my latest boards, I'm putting in a switch to ground J5:pin24, 10, and 13. Turn the switch on (grounding the pins) and the Arduino runs. Turn it off, and the M6800 runs (with the latest code, the Arduino waits to see if the M6800 is running, and stays out of the way if it is).

If you already made the boards with 10-13 grounded, they will still run just fine. If you want to plug your M6800 back in, you can ground 24 on your board as well and the new code will run. But the only way to dual-boot is to have those grounds be on a switch so you can turn them off. If you go this route, be sure to use a 3pole switch so the grounds stay isolated when the switch isn't engaged.
https://www.amazon.com/gp/product/B07XMH174C/ref=ppx_yo_dt_b_asin_title_o08_s00

#226 3 years ago

DickHamill is the latest code (with the dual boot) on github? also did you implement the code version showing at boot up? you REALLY need to do that... Also increase the time between chime coil hits (or have it adjustable). As we discussed, you're pulsing the chime coils too quickly, and the chime plungers do not have enough time to "fall". Hence your sounds are a "muddy mess"...
thanks!

#227 3 years ago
Quoted from cfh:

DickHamill is the latest code (with the dual boot) on github? also did you implement the code version showing at boot up? you REALLY need to do that... Also increase the time between chime coil hits (or have it adjustable). As we discussed, you're pulsing the chime coils too quickly, and the chime plungers do not have enough time to "fall". Hence your sounds are a "muddy mess"...
thanks!

Yes, the dual boot code is on GitHub! it adds a few seconds to the Arduino boot time (where the Arduino waits to see if the M6800 in on the bus). Any other changes/additions/subtracts - you're welcome to have at it. All the code is open source and non-copyright so feel free to take it wherever you want it to go.

#228 3 years ago

I like the chimes! Some of them are like a flam.

#229 3 years ago

So this is kind of a funny note on my last post... I had the wrong chimes. Finally got my nano every wired up and i think i made it pretty clean including a quick disconnect for the pin 4 connection. The chimes on the uno seemed like they were working as they should but when the nano booted I was like holy shit it's a longass beautiful melody! On the uno it was kind of like "dadingding". Strange that everything else seems exactly the same. I guess this is a point towards maybe we need to spend the few bucks on the nano instead of trying to use other hardware.

20200608_112604.jpg20200608_112604.jpg

These are the nanos I got:

ebay.com link: MINI USB Nano V3 0 ATmega328P CH340G 5V 16M Micro controller board for Arduino

#230 3 years ago
Quoted from cfh:

... Also increase the time between chime coil hits (or have it adjustable). As we discussed, you're pulsing the chime coils too quickly, and the chime plungers do not have enough time to "fall". Hence your sounds are a "muddy mess"...
thanks!

big time

#231 3 years ago

What hardware are yall on that are having coil timing issues?

#232 3 years ago

stock stern chime hardware. the time between chime hits needs to be increased. If you have any chime hit that uses multiple hits on the same chime coil, the plunger just doesn't have enough time to fall to 'down or 'rest' position. so the initial hit is hard and clear, but following hits sounds like mud (because the plunger doesn't make the same travel)... the chime plunger isn't making full travel up to hit the chime bar, so it hits the chime bar softer (and hence the mud.) This also deadens the chime bar if the hits are too close together, there's no time for a 'ring' tone.

#233 3 years ago
Quoted from cfh:

stock stern chime hardware. the time between chime hits needs to be increased. If you have any chime hit that uses multiple hits on the same chime coil, the plunger just doesn't have enough time to fall to 'down or 'rest' position. so the initial hit is hard and clear, but following hits sounds like mud (because the plunger doesn't make the same travel)... the chime plunger isn't making full travel up to hit the chime bar, so it hits the chime bar softer (and hence the mud.) This also deadens the chime bar if the hits are too close together, there's no time for a 'ring' tone.

This video at 1:45, you'll see (hear) the original chime timing for a star hit:

Here's my fastest ring (which I give for the skill shot):

Yes, I'm driving the chime faster for the skillshot than the original did for a star hit (and the inlane--same series of 5 chimes). But the original code drove the chimes far faster than a "ring" tone as well.
But, regardless, if you want your machine to have more time between chimes, please be my guest. Every single line of this code is at your disposal!

Cheers - happy configuring - do what you will.

#234 3 years ago

a better approach would be to set up time between chime hits as a variable. want to change the chime hit timing? just change the variable in one place. Can you do that for us please Dick? also add the version number at boot (as we discussed). that would be really helpful too... thank you!

#235 3 years ago

Not the chime hardware the arduino hardware silly goose

#236 3 years ago

ha! totally didn't get that!! the arduino is one of ebay i listed above. the "4 for 1 price" deal.

#237 3 years ago

DickHamill would it be a good idea to send him one of the Arduinos I have to see if it's an Arduino version issue, or do you think it's MPU related?

Can one of you post a youtube video of the quick chimes? Do your games do the melody in the beginning correctly? I'm barking up the Arduino tree based on the results I had with the Uno vs. The Nano 340

#238 3 years ago
Quoted from Chalkey:

DickHamill would it be a good idea to send him one of the Arduinos I have to see if it's an Arduino version issue, or do you think it's MPU related?
Can one of you post a youtube video of the quick chimes? Do your games do the melody in the beginning correctly? I'm barking up the Arduino tree based on the results I had with the Uno vs. The Nano 340

I may be way off base here (and please correct me if I'm wrong), but I believe that the chimes that cfh is hearing are operating the same as in my video above. In his opinion they occur too fast because of the spacing of the repetitive hits, not because of an error with his board.

I suspect that the issue is actually a little more subtle than that. In the original code, the M6800 was completely occupied triggering the chimes. If one switch was hit during a chime sequence, it would be remembered and handled after the chimes were finished playing. A second switch hit was lost. For example, when a star is hit, you hear the 1k chime ring fives time in just under a second. If the star is hit again during that period, you hear two series of 5 rings in a row, taking nearly 2 seconds. Because of this limitation (a busy processor could only remember one additional switch hit), fast ball play events were sometimes lost. No big deal in a single-ball game. I'm not sure many people even noticed.

In my implementation, I keep a buffer of switch hits that's deep enough to capture everything. Additionally, I push my solenoid hits to a time-release array so playing a series of chimes doesn't preclude any other event. Because of this, multiple switch hits happening in a short period of time will trigger overlapping callouts.

I can implement a configurable multiplier on the gap between hits as you're requesting, cfh . I will add that to my list of things to do for Stars2020 (version number at boot is already on that list). However, having given it some thought, I don't think that's going to change the behavior in the way you expect. A ball going up and down an inlane is still going to trigger two nearly simultaneous events and the melodies will overlap. A change to that behavior will require somewhat of a re-architecture to make sure that melodies don't collide.

Four approaches occur to me (all have their downsides).
1) when playing a sound effect, the program could store a variable indicating the "finish" time fo the melody and that would be used as an offset for subsequent melodies. A burst of action would be trailed by the system catching up to all the callouts, but they would eventually all be played. Sound is important for pinball--players often use sound queues to make split-second decisions, so this doesn't seem ideal.

2) each new sound effect could clear the buffer of pending sounds and take it's place. This would likely require a "priority" variable so things like tilt-warnings would always take precedence over something like a 10-point switch.

3) new chime hits could only be pushed to the queue if there were no pending sound hits already there. Again, this would benefit from a priority.

4) the solenoid queue could be scanned in the loop to look for chime events that are too closely spaced and "declutter" the queue (only for chimes).

#239 3 years ago
Quoted from DickHamill:

In the original code, the M6800 was completely occupied triggering the chimes. If one switch was hit during a chime sequence, it would be remembered and handled after the chimes were finished playing. A second switch hit was lost. For example, when a star is hit, you hear the 1k chime ring fives time in just under a second. If the star is hit again during that period, you hear two series of 5 rings in a row, taking nearly 2 seconds. Because of this limitation (a busy processor could only remember one additional switch hit), fast ball play events were sometimes lost. No big deal in a single-ball game. I'm not sure many people even noticed.

That's not entirely true. The scoring and chiming is independent of the switch hit routine; yes, it is very possible to miss re-hits on switches, but you'd have to accumulate a LOT of hits in other switches as well to do so. The score queue is processed on the backend, for (I believe) precisely the reason of switch responsiveness. (Since you need time for the chime to react, or really, any solenoid). The other way it's going to miss a rehit is if you hit it, and it hasn't cleared the registers leading up to the action register yet (I call the 3 switch registers the 'initial', the 'history' (or previous), and the 'action'.) Both the initial and history have to be cleared again for a hit to re-register.

Now, there ARE bugs/oversights in the original code; for instance, each drop scores 500, EXCEPT the last one down that resets; you get 3000 (plus 7000, if it was the middle one)..... but you don't get the 500.

#240 3 years ago

If the overlapping chimes offend, just change the music setting to 1 for simplified chimes. I use that setting when it's late to be slightly less obnoxious.

#241 3 years ago
Quoted from slochar:

That's not entirely true. The scoring and chiming is independent of the switch hit routine; yes, it is very possible to miss re-hits on switches, but you'd have to accumulate a LOT of hits in other switches as well to do so. The score queue is processed on the backend, for (I believe) precisely the reason of switch responsiveness. (Since you need time for the chime to react, or really, any solenoid). The other way it's going to miss a rehit is if you hit it, and it hasn't cleared the registers leading up to the action register yet (I call the 3 switch registers the 'initial', the 'history' (or previous), and the 'action'.) Both the initial and history have to be cleared again for a hit to re-register.
Now, there ARE bugs/oversights in the original code; for instance, each drop scores 500, EXCEPT the last one down that resets; you get 3000 (plus 7000, if it was the middle one)..... but you don't get the 500.

Here's what I'm basing my statement on:

Two hits - no problem (second happens right after first).
Four hits (three happening during the first chime sequence) - only registers 2. The third and fourth are ignored.

Then when I hit the 7k on the drop target I'm able to hit the star switch 5 times and only one is registered and played after the 7k sequence.

This doesn't prevent pop-bumpers and slingshots from reacting during a chime sequence -- those firings are done reactively in the switch read -- but a chime sequence does seem to allow only one standup target from being registered.

#242 3 years ago

To clarify (just so we don't talk past each other while we're discussing the deep & dirty of switch reads), my point is that in the old code the chimes were less cluttered because the machine essentially started a chime sequence and limited its responsiveness to new stimuli until that chime sequence finished.

As you see in the video, 4 hits are processed like 2 if they happen too fast, and that means you're not inundated by chimes or listening to them for 20 seconds after a flurry of activity.

The new code queues everything, so overlapping events are captured and chime sequences stacked on top of one another. It's inarguably better to catch the switch hits , but arguably not better to stack the tunes, which is why I'm talking about possible methods of decluttering the callouts.

#243 3 years ago

I don't see how your demo of 4 switch hits in a row would actually happen in real life though, that's shorter than a ball from a standup to the pop. The actual chime queues would be incorrect in the original software because they don't operate on a schedule like the later games do - so there's that. Anytime you're adding the score into the queue instead of using a chime tune though it wouldn't bother the switch response (I'm not actually sure why they did it that way anyway originally, since the chime will end up being the 'same', regardless of if it's in the score queue processing or played as a 'tune').

The likely answer is that since Stern copied Bally's software byte for byte for Pinball and Stingray, and were likely still copying it slightly and just modifying it for later games (this info is straight from Alan McNeil) - it's not like we don't have the hindsight of 40 intervening years for our wisdom.

I would say you'd have to strike a balance between counting "every" switch hit, and ones where the switch might still be bouncing. Even with various schemes to prevent this over the years, you still sometimes get a double hit.

I've probably never noticed the 7k/10k score thing on mine since it's a completely different codebase anyway that requires the weebly board to run (extra ram and romspace used). It was a prototype for the OS I was going to replace flight 2000's with but I ended up being able to whittle down that codebase instead for the changes.

#244 3 years ago
Quoted from slochar:

I don't see how your demo of 4 switch hits in a row would actually happen in real life though, that's shorter than a ball from a standup to the pop. The actual chime queues would be incorrect in the original software because they don't operate on a schedule like the later games do - so there's that. Anytime you're adding the score into the queue instead of using a chime tune though it wouldn't bother the switch response (I'm not actually sure why they did it that way anyway originally, since the chime will end up being the 'same', regardless of if it's in the score queue processing or played as a 'tune').
The likely answer is that since Stern copied Bally's software byte for byte for Pinball and Stingray, and were likely still copying it slightly and just modifying it for later games (this info is straight from Alan McNeil) - it's not like we don't have the hindsight of 40 intervening years for our wisdom.
I would say you'd have to strike a balance between counting "every" switch hit, and ones where the switch might still be bouncing. Even with various schemes to prevent this over the years, you still sometimes get a double hit.
I've probably never noticed the 7k/10k score thing on mine since it's a completely different codebase anyway that requires the weebly board to run (extra ram and romspace used). It was a prototype for the OS I was going to replace flight 2000's with but I ended up being able to whittle down that codebase instead for the changes.

Ball sweeps by the drop targets:

The first set, I pause a tiny bit so my third hit is after the 5th chime and we get all three 500 rewards. (then I reset both by knocking down the second bank). Next time, I hit all three targets fast and only two register with chimes & score.
When you said, "yes, it is very possible to miss re-hits on switches, but you'd have to accumulate a LOT of hits in other switches as well to do so," I don't think that's correct. Not for Stars. The only thing required to miss a switch hit is if two occur while a chime sequence is already happening (like three drops in a sweep or the pop-bumper railing the ball off of the white star, which it does a lot).

In comparison, check out the response from Black Jack (Bally, a year older):

This is a very different approach. The chimes & score for hitting the Change Player standup are queued up and I can hit it a dozen times in a row without missing a single press. In addition, while it's playing the chimes for Change Player, I can hit Change Dealer and the lights change instantly while the chimes queue up behind the Change Dealer chime. However, if the ball dips in and out of the saucer and it gets into its "Player Wins" routine, nothing is registered at all. That actually happens in the game regularly--the saucer triggers, the ball comes out, and anything you hit in the next couple of seconds isn't scored.

On Black Jack, the case that could never happen (hitting the standup 5 times in one second) is handled perfectly, and the one that regularly occurs (saucer lip-out) is ignored.

All academic, of course--doesn't point me in an actionable direction for the new software. I'll probably try to "declutter" by ignoring chime calls if they come too soon on the heels of an earlier one. That will be my first attempt anyway. I'm going to continue to count every switch hit. They're soft-ware debounced, just like in the original software (and as described in Bally's Theory of Pinball). That part is working fine.

Is your replacement OS the one with the PIGS implementation? How does that handle switch hits?

#245 3 years ago
Quoted from DickHamill:

Is your replacement OS the one with the PIGS implementation? How does that handle switch hits?

No. It's a mishmash of pigs and pinbol (Wms). It uses the williams style individual switch timings as detailed out at Jess Askey's site.

Ultimately all of the early solid states are software debounced - other than pulse-lengthing things on standup switches I don't think I've seen extra hardware employed there. Some of the schemes are debounced poorly, of course (Gottlieb, and some WMS system 6's, where you get bad debouncing on the credit button and add 2 players instead of one). Without hardware logging capability anyway some of the times I'm sure a switch was "missed" it probably wasn't. Of course, any switch that hasn't been serviced and had its entry removed from the action register would be missed. I'm pretty sure that Gottlieb was using a queue system like you describe (I haven't dug that much into gottlieb), williams uses a queue, bally/stern react to registers instead. The lack of ram in the early bally/stern games really hurt them but that stuff was EXPENSIVE in the 70s. I remember 2716's being $50 each then.

#246 3 years ago
Quoted from slochar:

williams uses a queue

Williams System 7-11 switches are not queued. Software debounced and latched, but not queued. WPC is the same.

Queuing switches makes no sense.

Chime handling on the bally/stern M-100 are just counted. Late (ie, low priority) in the main exec loop they are decremented one at time, highest value first.

#247 3 years ago

There's another chime implementation strategy and that's how gottlieb system1 does it. if you have a system1 game with chimes, you know what i'm saying! haha!

#248 3 years ago

Clay here's a LITTLE bit of the "full sound #2" versus a setting #1. Don;t have time for in depth at the moment

Full
https://vimeo.com/427544123

Setting #1

https://vimeo.com/427544158

#249 3 years ago
Quoted from CoreyStup:

Chime handling on the bally/stern M-100 are just counted. Late (ie, low priority) in the main exec loop they are decremented one at time, highest value first.

CoreyStup , for Bally Black Jack, stand-up targets and rollovers, yes the scores are added to counts and played in the loop. For the "Player Wins" sequence, no. For "Player Wins" a custom sequence is played and during this time other switches aren't handled:


When the ball lips-out of the saucer, nothing is registered until the sequence finishes.

For Stern Stars, the chime sequences block all but one additional switch registrations. Sweep all three drop targets before the chime sequence is finished and you will only get credit for two:


These sequences (when stacked) are not played in value order -- see here:

#250 3 years ago
Quoted from CoreyStup:

Williams System 7-11 switches are not queued. Software debounced and latched, but not queued. WPC is the same.
Queuing switches makes no sense.
Chime handling on the bally/stern M-100 are just counted. Late (ie, low priority) in the main exec loop they are decremented one at time, highest value first.

System 6 is queued (3 deep). 7-11 solenoids' are queued, 6 (green) is sort of with the solenoid strings. I don't know if you'd consider differing timings on the switches a timed queue? Would that even be called a queue, in the sense that the game notices a switch state changed, so it starts timing it until that switches criteria is met, so there's a list of switches that are timing before they are considered valid state changes? That's what I meant by queue there. I"m also looking at system 6 code for Time Warp right now so the switch queue there was top of mind as I'm attempting to transplant PIGS into the green rom just for S&G.

I agree that switches don't need to be queued in most cases. Half the time I'm trying to SLOW the response down especially for trough switches in multiball like flight 2000 and 9 ball, where I don't want the instant, ball ending response. I thought about grafting in a williams like switch response setup, but there wasn't enough ram available so I kind of went around it using delayed reaction routines instead to make the decisions.

I think Pascal uses queues in his system 1 boards and maybe it's mimicking the original system 1 behavior, because there's definitely something going on where you're waiting for switch responses sometimes, it has its charm since it adds the different scores in the order in which they are scored vs. scores queue hi to lo being processed.

Promoted items from Pinside Marketplace and Pinside Shops!
From: $ 50.75
Playfield - Other
Rocket City Pinball
 
$ 169.00
$ 12.00
Playfield - Toys/Add-ons
UpKick Pinball
 
$ 29.00
Boards
RoyGBev Pinball
 
From: $ 170.00
$ 199.95
Wanted
Machine - Wanted
St. Louis, MO
From: $ 115.00
Playfield - Protection
Beehive Pinball Co.
 
From: $ 130.00
Boards
Troxel Repair
 
$ 29.00
Boards
RoyGBev Pinball
 
There are 525 posts in this topic. You are on page 5 of 11.

Reply

Wanna join the discussion? Please sign in to reply to this topic.

Hey there! Welcome to Pinside!

Donate to Pinside

Great to see you're enjoying Pinside! Did you know Pinside is able to run without any 3rd-party banners or ads, thanks to the support from our visitors? Please consider a donation to Pinside and get anext to your username to show for it! Or better yet, subscribe to Pinside+!


This page was printed from https://pinside.com/pinball/forum/topic/stars-2020-new-code-for-stern-stars-1978/page/5?hl=pincoder and we tried optimising it for printing. Some page elements may have been deliberately hidden.

Scan the QR code on the left to jump to the URL this document was printed from.