I bought this board off ebay and it worked well for the compile/upload
ebay.com link: 4X MINI USB Nano V3 0 ATmega328P CH340G 5V 16M Micro controller board Arduino
I bought this board off ebay and it worked well for the compile/upload
ebay.com link: 4X MINI USB Nano V3 0 ATmega328P CH340G 5V 16M Micro controller board Arduino
Quoted from mc8045:I found the problem I bought the Nano Every your parts link sent me to, The nano every isn't compatable with the code you wrote, need a standard nano or one of the nano knockoffs.
Might want to check the amazon links just to make sure they are right?????
Spent a couple hours trying to figure out what was going wrong lol.
Yup, sorry about that mc8045 .
It seems like they've upgraded the Arduino since I last bought the "official" board. The new "Arduino Nano Every" is based on a ATmega4809 and it bans direct port access and doesn't offer a fast way to write directly to registers (I found out that "The port registers on mega4809 are not in the IO space of the AVR").
So, as you found out, when you try to compile for that board the registers I'm manipulating are not available. I will hunt for a solution for this board, meanwhile the other link (for the Elegoo knockoffs) or the link that cfh just gave will work. Anything based on the ATmega328 has the ports exposed.
I will go back and edit my post -- sorry again.
update: I spoke too strongly when I said it "bans" direct port access. With further research, it seems there might be a way to use this board in the future, but I'll have to incorporate a different set of definitions for the port access.
Quoted from kermit24:I have an Alltek board, has anyone tried this with one?
I've had some success on the Rev G Ultimate Board.
The Alltek board is similar to the MPU200 with pin 34 being IRQ.
Quoted from DickHamill:Yup, sorry about that mc8045 .
It seems like they've upgraded the Arduino since I last bought the "official" board. The new "Arduino Nano Every" is based on a ATmega4809 and it bans direct port access and doesn't offer a fast way to write directly to registers (I found out that "The port registers on mega4809 are not in the IO space of the AVR").
So, as you found out, when you try to compile for that board the registers I'm manipulating are not available. I will hunt for a solution for this board, meanwhile the other link (for the Elegoo knockoffs) or the link that cfh just gave will work. Anything based on the ATmega328 has the ports exposed.
I will go back and edit my post -- sorry again.
update: I spoke too strongly when I said it "bans" direct port access. With further research, it seems there might be a way to use this board in the future, but I'll have to incorporate a different set of definitions for the port access.
No worries, just figured id point it out and save someone else, also I get to use this meme for the first time.
Thanks again for your work looking forward to getting this running
300px-I_Am_Never_Gonna_Financially_Recover_From_This (resized).jpgQuoted from mc8045:No worries, just figured id point it out and save someone else, also I get to use this meme for the first time.
Thanks again for your work looking forward to getting this running
[quoted image]
I found a guy who wrote a "library" (it's a header file) that gives general access to the GPIO pins and it works with both old and new boards. I think I can update the code base, but he seemed to think that the new board would require somewhat of a rewrite. I'll look into that when I get done with other bug fixes. It would be nice to future-proof the code a bit, but the board that works is actually cheaper so it's hard to get too excited about it
Quoted from pavel_one:I've had some success on the Rev G Ultimate Board.
The Alltek board is similar to the MPU200 with pin 34 being IRQ.
[quoted image]
Going forward, if running this code on boards with clock speeds faster than 500 kHz, please update the following lines in BallySternOS.h:
// This define needs to be set for the number of loops
// needed to get a delay of 80 us
// So, set it to (0.000080) / (1/Clock Frequency)
// Assuming Frequency = 500kHz, 40 = (0.000080) / (1/500000)
#define BSOS_NUM_SWITCH_LOOPS 40
// 60 us
// So, set this to (0.000060) / (1/Clock Frequency)
#define BSOS_NUM_LAMP_LOOPS 30
(just in case that board runs faster than 500 kHz)
Everything seems to be working as far as I can tell except the end game parameter. I have my dip switch set to 3 and it will keep incrementing ball in play an ever end a game when I drain. I went as high as 11. Is there a software parameter I might be missing? All extra balls should appear as the same ball number right?
If anything from the old audits is used I had it set for a free game at 10,000 points so I would never have to add credits. I have not gone through the software settings and changed anything, just my dip switches.
Quoted from Chalkey:Everything seems to be working as far as I can tell except the end game parameter. I have my dip switch set to 3 and it will keep incrementing ball in play an ever end a game when I drain. I went as high as 11. Is there a software parameter I might be missing? All extra balls should appear as the same ball number right?
If anything from the old audits is used I had it set for a free game at 10,000 points so I would never have to add credits. I have not gone through the software settings and changed anything, just my dip switches.
Hi Chalkey,
Sounds like your Balls per Game value is being overwritten by an invalid default.
In the self-test/audit/settings "pages", Balls Per Game is on page 18. (press the self-test button until credits shows 18). Please check the number there. Valid values are 3, 5, and 99. If it's other than that, you'll need to pull the latest code.
Thanks - let me know!
18 is set to 97 so that's the issue. Weird thing is the credit button works to increment them in the other menus, but not number 18! I'll reinstall code and see if it fixes it.
Quoted from Chalkey:18 is set to 97 so that's the issue. Weird thing is the credit button works to increment them in the other menus, but not number 18! I'll reinstall code and see if it fixes it.
Yeah, that code wasn't fault-tolerant for bad values of that parameter. The new version (hopefully) should fix it.
I feel like I have my own personal programmer. You are awesome.
I set it to 99 which is supposed to reference the dip switch, right? I have the dip set to 3 balls (7= OFF) and it played a 5 ball game, so it is sort of fixed I'm perfectly happy setting the software to 3 ball just wanted you to know.
Quoted from Chalkey:I feel like I have my own personal programmer. You are awesome.
I set it to 99 which is supposed to reference the dip switch, right? I have the dip set to 3 balls (7= OFF) and it played a 5 ball game, so it is sort of fixed I'm perfectly happy setting the software to 3 ball just wanted you to know.
Huh. Yeah, it's supposed to default to the DIP switch if it's set to 99.
Afraid I can't debug that part from here, but I'll test it when I have a chance.
After playing a 5 ball game I'll probably have to load the code with unlimited balls to get anywhere anyways. Stars!!!
Played some last night...I didn't read the rules so umm...that was a mistake
EDIT: The added ball saver is a bit much
Having to lock in the stars set with the roving special is an absolute #$%$@#$%. I appreciate the meanness, just saying.
We just got all of our parts to do our first install so really appreciate you guys documenting all of the troubleshooting here.
Super excited to get this code loaded and then to show it off on a stream!!!
> The added ball saver is a bit much
Here's a cheat sheet on the adjustments:
Test/Audit/Parameters
00:01 - Lamps
XX:XX - Displays
00:03 - Solenoids
00:04 - Switches
00:05 - Sound
01 - Award Score Level 1
02 - Award Score Level 2
03 - Award Score Level 3
04 - High Score to Date
05 - Current Credits
06 - Total plays (Audit)
07 - Total replays (Audit)
08 - Total times high score was beaten (Audit)
09 - Chute #2 coins (Audit)
10 - Chute #1 coins (Audit)
11 - Chute #3 coins (Audit)
12 - Free play off/on (0, 1)
13 - Ball Save Num Seconds (0, 6, 16, 21)
14 - Music Level (0, 1, 2)
15 - Skill Shot Levels Up Stars (0, 1)
16 - Tilt Warning (0, 1, 2)
17 - Award Score Override (0 - 7, 99)
18 - Balls per game Override (3, 5, 99)
Full documentation here:
http://ikehamill.com/wp-content/uploads/2020/05/Stars2020.pdf
Quoted from pins4life33:We just got all of our parts to do our first install so really appreciate you guys documenting all of the troubleshooting here.
Super excited to get this code loaded and then to show it off on a stream!!!
Any videos of people playing games would be *greatly* appreciated!
Quoted from DickHamill:>
Here's a cheat sheet on the adjustments:
Awesome thanks! We just basically wanted to verify it was working and didn't go into the adjustments at all
Quoted from pins4life33:We just got all of our parts to do our first install so really appreciate you guys documenting all of the troubleshooting here.
Super excited to get this code loaded and then to show it off on a stream!!!
Was planing on streaming when I got mine going also, mine won't be ready until mid/late next week so you should beat me to it.
Ya not sure when we will get it done hoping by this weekend but will see.
Quoted from mc8045:Was planing on streaming when I got mine going also, mine won't be ready until mid/late next week so you should beat me to it.
#define BSOS_NUM_LAMP_LOOPS 30 changed to 35 in the end didn't solve the issue. It first I thought it did, but bottom to top attract mode still goes dim and the colored stars will randomly shutoff and randomly come back. Pop bumper will also randomly fire on its own sometimes.
Uploaded the lasted code today 6/2 and the ball issue is still there. Did some testing and noticed that if it drains down the middle it will not advance to ball 2, or 3 (3 ball game), but if it drains on the outlane it will advance the ball.
Quoted from 8bitrobo:#define BSOS_NUM_LAMP_LOOPS 30 changed to 35 in the end didn't solve the issue. It first I thought it did, but bottom to top attract mode still goes dim and the colored stars will randomly shutoff and randomly come back. Pop bumper will also randomly fire on its own sometimes.
Uploaded the lasted code today 6/2 and the ball issue is still there. Did some testing and noticed that if it drains down the middle it will not advance to ball 2, or 3 (3 ball game), but if it drains on the outlane it will advance the ball.
That sucks, 8bitrobo ! Sorry to run you back and forth, but could you try a couple of things for me?
I should have asked before, but can you also change the 40 to 47?
#define BSOS_NUM_SWITCH_LOOPS 47
And, one more thing -- earlier MachineDiagnostics reported these values for your dip switches. Could you verify if these match your switch settings?
DIP Bank 0 = 0xA2
DIP Bank 1 = 0xE2
DIP Bank 2 = 0xDF
DIP Bank 3 = 0x13
Switches 1 to 32 would be:
1 off
2 on
3 off
4 off
5 off
6 on
7 off
8 on
9 off
10 on
11 off
12 off
13 off
14on
15 on
16 on
17 on
18 on
19 on
20 on
21 on
22 off
23 on
24 on
25 on
26 off
27 off
28 off
29 on
30 on
31 off
32 off
DickHamill It's no problem, I'm sure this will help other people who might run into similar issues.
Changed #define BSOS_NUM_SWITCH_LOOPS 40 to 47. The pop bumper was normal in testing if that what it was for.
The only dip switch that are different are:
#26 is on (Extra Ball on WOW)
#30 is off (Star Special is open ended)
I changed the values to see if it did anything, and it didn't. Currently back to 26 on and 30 off.
Starting really simple... You sure your ball advance problem isn't due to the ball save feature? The lamps are supposed to dim in /out instead of the normal blink in the attract. Do you have incandescents or LEDs?
That's good news about the pop bumper. I think that means that we're moving in the right direction. What the pop bumper issues suggests is that (at a value of 40 for BSOS_NUM_SWITCH_LOOPS) the Arduino wasn't reading your switch grid correctly. And, to be clear, the DIP switches I listed were the values that MachineDiagnositics thought it was reading from your board. So the fact that two of the switches read differently suggests again that 40 wasn't long enough of a delay for the caps on your switch grid to charge. Hopefully, that part of the issue has been fixed.
As for the lights, my next thought is that the lamp latches are being strobed too fast. I've added a define to BallySternOS.h that enables a pause in the lamp latching. After getting the latest BallySternOS files, please find this line:
#define BSOS_SLOW_DOWN_LAMP_STROBE 0
and change the 0 to a 1
Let's see if that makes any difference.
Am I remembering right that the behavior changes the longer the machine is on?
#define BSOS_SLOW_DOWN_LAMP_STROBE 1 didn't do anything. After the first game it always reverts to weak attract and colored stars don't light up in phase 1. I think my game is just not compatible with the dim light setting. When they do go on they are bright.
Ball Save set to 0 didn't have any effect on advancing to the next ball.
Had a random glitch today that hitting the white star target made the left slingshot go off.
Quoted from 8bitrobo:#define BSOS_SLOW_DOWN_LAMP_STROBE 1 didn't do anything. After the first game it always reverts to weak attract and colored stars don't light up in phase 1. I think my game is just not compatible with the dim light setting. When they do go on they are bright.
Ball Save set to 0 didn't have any effect on advancing to the next ball.
Had a random glitch today that hitting the white star target made the left slingshot go off.
Wow. That's so nutty. What kind of MPU board is it? Is it a Stern MPU100?
Yes it's a stern mpu100. The board is originally from a 1979 Trident. I'm not aware of any mpu differences from 78 to 79.
Quoted from 8bitrobo:Yes it's a stern mpu100. The board is originally from a 1979 Trident. I'm not aware of any mpu differences from 78 to 79.
Me neither. Just curious. I don't suppose you have another board lying around you could try -- just to see if we can pin down the issue? Completely understand if you'd rather not.
You guys think there's any chance his rectifier has some resistance on the pins or something and isn't pushing the full voltage?
I got 3 Nanos in the mail, I'm going to try to put a few together. If I'm able to get one working on mine maybe I can send it to you to rule out wiring / connector type issues. I may actually also have a working spare MPU-100 sans game chip but I'll have to put that through the paces first.
Quoted from Chalkey:You guys think there's any chance his rectifier has some resistance on the pins or something and isn't pushing the full voltage?
I got 3 Nanos in the mail, I'm going to try to put a few together. If I'm able to get one working on mine maybe I can send it to you to rule out wiring / connector type issues. I may actually also have a working spare MPU-100 sans game chip but I'll have to put that through the paces first.
Yeah, Chalkey , that's the line I was going down as well: can we figure out if it's the MPU or the Arduino... I was contemplating finding another MPU100 or Bally -17 and seeing if maybe we could get the MPU switched out. If it's something with the MPU, I would love to get my hands on the one in there so I can scope out all the signals and figure out the difference. So far, every MPU I've worked on has had tiny peculiarities and it would be nice to make the code robust enough to work with all of them.
The 6800 worked, but it wasn't pushing the limits of the hardware as much as the Arduino is.
The one thing I keep sticking on is MachineDiagnostics. Everything performed perfectly in that test...
it's not the MPU.
there's no differences in the M100 or the -17.
and really the only difference in the -17/m100 and a -32 is the ROM space. they added A14 to the J5 connector. A14 was used on the -35 because they needed more ROM space for the addition of the sound board capabilites starting with Bally Lost World. they also wanted more ROM space for added programming of the more complicated games (like say Centaur.)
Now if you are running an M200 board, different story. that runs at a different clock rate.
Quoted from cfh:it's not the MPU.
there's no differences in the M100 or the -17.
Yes, it works on the MPU100 (I'm running on one here) and the -17 (I'm also running one here) -- lots of us are running on the MPU100. The question is why it doesn't run on that *particular* MPU100.
Perhaps, over the years, that particular board has developed some timing sensitivity that the rest of us aren't experiencing.
I'm getting this error when trying to upload to arduino
BallySternOS.cpp:31:50: error: stray '\302' in program
<title>BallySternOS/Stars2020.ino at master · MrEkted/BallySternOS · GitHub</title>
Any help would be great.
Quoted from Stretch7:I'm getting this error when trying to upload to arduino
BallySternOS.cpp:31:50: error: stray '\302' in program
<title>BallySternOS/Stars2020.ino at master · MrEkted/BallySternOS · GitHub</title>
Any help would be great.
Hi Stretch7 - it sounds like that file got corrupted from the version on GitHub (based on what I'm reading here: https://arduino.stackexchange.com/questions/30581/stray-302-in-program-error-when-compiling and here: https://stackoverflow.com/questions/19198332/compilation-error-stray-302-in-program-etc)
Please prepare the files again, by:
1) go here: https://github.com/MrEkted/BallySternOS
2) Clone or Download
3) Click Download ZIP
4) Unzip the file
5) Copy BallySternOS.cpp, BallySternOS.h, SelfTestAndAudit.cpp, and SelfTestAndAudit.h into the Stars2020 folder
6) Open the Stars2020.ino in Arduino's IDE
7) Hit Sketch->Verify/Compile
8) Plug in the Arduino and hit Sketch->Upload
Thanks
looks like that was the problem
It compiles fine now but there is an issue with uploading says problem uploading to board, i even tried with old bootloader......im going to try with another board in a bit and report back.
Quoted from DickHamill:Yes, it works on the MPU100 (I'm running on one here) and the -17 (I'm also running one here) -- lots of us are running on the MPU100. The question is why it doesn't run on that *particular* MPU100.
Perhaps, over the years, that particular board has developed some timing sensitivity that the rest of us aren't experiencing.
if that was the case the board would have exhibited other problems with the 6800 running.
there is no variability here from a hardware point of view!
Quoted from cfh:if that was the case the board would have exhibited other problems with the 6800 running.
there is no variability here!
There's variability in the way the two programs are structured and how they tell the hardware to work.
Quoted from Chalkey:There's variability in the way the two programs are structured and how they tell the hardware to work.
No doubt it's going to end up being a timing issue that just needs to be worked out.
Some feedback:
Running on Alltek Ultimate Rev G with jumpers set to MPU100/Bally
Alltek LED/Lamp board with all LED lamps.
The timing needs to be set a bit higher for switches (45-47) or the pop re-triggers itself. Too high and the slings don't pop with much power. The lamp timing I set higher, and that seems to work nearly perfectly.
I have also tried setting the SLOW LAMP STROBE - It doesn't seem to affect much.
The only issue, and I am pretty sure that it's a bug - When the game is on and played for a while - the lamps start to flicker. Not all of them, but I think it's the DIM mode, and it's most noticeable on the roving shot. I will investigate this more to be sure.
Mine works with a cheap Arduino and a 'real' Arduino. Works with Alltek LED Board and LED board as well as original board with incandescents. I will also be testing on a -17 real soon.
We may even stream both Stars2020 and Blackjack2020 real soon.
Thanks, MrEkted DickHamill! Great work!
Quoted from pavel_one:Some feedback:
Running on Alltek Ultimate Rev G with jumpers set to MPU100/Bally
Alltek LED/Lamp board with all LED lamps.
The timing needs to be set a bit higher for switches (45-47) or the pop re-triggers itself. Too high and the slings don't pop with much power. The lamp timing I set higher, and that seems to work nearly perfectly.
I have also tried setting the SLOW LAMP STROBE - It doesn't seem to affect much.
The only issue, and I am pretty sure that it's a bug - When the game is on and played for a while - the lamps start to flicker. Not all of them, but I think it's the DIM mode, and it's most noticeable on the roving shot. I will investigate this more to be sure.
Mine works with a cheap Arduino and a 'real' Arduino. Works with Alltek LED Board and LED board as well as original board with incandescents. I will also be testing on a -17 real soon.
We may even stream both Stars2020 and Blackjack2020 real soon.
Thanks, MrEkted DickHamill! Great work!
That's awesome that you have it running on the Alltek -- first one, I think. If you feel like you have your timing defines dialed in, it would be great if you publish them so others with the same boards will have a starting point.
I'm super curious about your lamp flicker after the machine has been on a while. It sounds like maybe it's related to what 8bitrobo reported. If you get anywhere on the issue, please let me know.
Please shoot me a message before you stream--I'll want to watch. Full documentation of Bally Black Jack should be out tomorrow. It's a pretty aggressive change from the old code.
Quoted from DickHamill:That's awesome that you have it running on the Alltek -- first one, I think. If you feel like you have your timing defines dialed in, it would be great if you publish them so others with the same boards will have a starting point.
I'm super curious about your lamp flicker after the machine has been on a while. It sounds like maybe it's related to what 8bitrobo reported. If you get anywhere on the issue, please let me know.
Please shoot me a message before you stream--I'll want to watch. Full documentation of Bally Black Jack should be out tomorrow. It's a pretty aggressive change from the old code.
With the LEDs, its very hard to tell when the lamps are in DIM mode. Where can I make a change to set the dimming level lower when in that state?
Quoted from pavel_one:With the LEDs, its very hard to tell when the lamps are in DIM mode. Where can I make a change to set the dimming level lower when in that state?
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.
If the stars inserts could be programmed with a bulb like this might be a solution. You would need to find a 47 bulb thou.
https://www.cometpinball.com/products/rgb-multi-fade-cob?variant=27863116251238
In the early code was the stars progress saved? I feel like it was but I'm not sure. I feel like that's a much more obtainable objective & more fun to progress. I'm lucky to get the roving lock shot lit once a game and haven't nailed it in days.
Quoted from Chalkey:In the early code was the stars progress saved? I feel like it was but I'm not sure. I feel like that's a much more obtainable objective & more fun to progress.
Waaaaaaaay too easy.
Wanna join the discussion? Please sign in to reply to this topic.
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/4?hl=slochar 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.