(Topic ID: 266605)

Replacing the M6800 in a Stern MPU100 with an Arduino

By DickHamill

4 years ago


Topic Heartbeat

Topic Stats

  • 282 posts
  • 51 Pinsiders participating
  • Latest reply 3 months ago by DickHamill
  • Topic is favorited by 87 Pinsiders

You

Linked Games

  • Stars Stern Electronics, 1978

Topic Gallery

View topic image gallery

IMG_1511 (resized).jpeg
pasted_image (resized).png
pasted_image (resized).png
pasted_image (resized).png
Stars2021-REV3 (resized).png
IMG_4356 (resized).jpeg
mpu.r30 (resized).png
22BFE879-2B7B-4155-B66E-BC9CEDC3CBEA (resized).jpg
5FCA0E77-1E60-4842-97BF-919E50FFD97E (resized).jpg
Screen Shot 2021-08-01 at 3.46.55 PM (resized).png
IMG_1527 (resized).jpeg
Screen Shot 2021-05-05 at 10.05.48 PM (resized).png
Screen Shot 2021-05-05 at 10.05.14 PM (resized).png
IMG_0162SB (resized).jpg
WAVTriggerBeautyKDS (resized).jpg
WAVTriggerBeauty (resized).jpeg
There are 282 posts in this topic. You are on page 2 of 6.
#51 3 years ago

I messed up the sound S0-S3 locations on U11. I will fix my post above.

#52 3 years ago

Spent a little time reading up on serial communications w/ arduinos. As I've read it, any impact to a realtime system would be in your control and dictated by how many bytes you read in a single pass. So my thought was that one could always read a fixed number of bytes into a buffer, deferring processing until an entire message has been read. Thus preventing unpredictable hang-ups/interrupts. Perhaps there's an existing protocol/library that handles this? Haven't looked that far yet.

If the above holds up--I'm probably missing something here as I'm far from an expert--and given the limited volume of data flowing, it would make more sense to me to stick with serial communication over USB instead of something custom.

On the DAC: Are you thinking you would use, e.g., an arduino mega so you could have 16+ bits of resolution? (Nano only has 14 digital outs.) Also -- arduino audio libraries look limited. Do you know of anything that would fit the bill for quality polyphony?

If one used serial communications with a raspberry pi in the configuration you described, then I suppose one would only need to add an amplifier -- or maybe could tie into the existing amp? Perhaps simpler in the end from a coding perspective at least.

#53 3 years ago
Quoted from geeteoh:

but it requires more machine modifications - which can be done with many other MPU replacement paths that already exist

I was thinking one could bolt a raspberry pi onto what DickHamill has built which doesn't require machine modifications. However, the software engineering overhead does start to go up quite a bit as compared to just using, e.g., https://www.lisy.dev/ which was recommended earlier. But, with LISY I have to produce/populate a custom board. And a raspberry pi + nano is pretty simple/cheap.

#54 3 years ago

Quench - I've updated the PlaySound function so that it:

Masks interrupts
Puts 1111 on U11:PB0-PB3 (solenoid/sound lines)
Raises U11:CB2
Puts the sound lower nibble on U11:PB0-PB3, and
Holds for 200 microseconds
Then puts the upper nibble on U11:PB0-PB3
Holds for 200 microseconds
Lowers U11:CB2
Unmask interrupts

The code is on github now. Thank you for that note.

#55 3 years ago

joetechbob - That's good to know about serial comm. My experience with this project was that it caused lag/display flicker when I used it to send debug messages, but I didn't investigate to see if there was a way to diminish that--I just wrapped all my debug messages in a conditional so I could turn them off.

I suppose it could be a valid way to talk to another device. There are a couple of pins that could be thrown to that.

As far as IO pins on the Arduino, they labelled them D0-D13 & A0-A5, but really all of them can be used for digital IO. Just the "analog" ones can be used for rudimentary analog IO. Pins D0 & D1 are used for comm to the computer, so in practice you safely have D2-D13 & A0-A5, for a total of 18 pins.

I haven't messed with trying to make a DAC/audio driver from an Arduino yet, so I was just throwing that out there as a possibility. The Pi, or LISY or whatever could be a better approach.

At any rate, the code is in there to talk to a sound board in the -35 approach. Looking at the MPU200 schematics, it looks like they did a J5 approach for that?
In the Galaxy disassm thread by slochar , the sound is listed as
00A0-00A8 and 00C0-00C3 SOUND CARD REGISTERS

Right now, I'm only hooked to A0, A1, A3, A4, and A7

A0 (22) – Nano Pin A0
A1 (21) – Nano Pin A1
A2 - not used
A3 (19) – Nano Pin A2
A4 (18) – Nano Pin A3
A5 - not used
A6 - not used
A7 (15) – Nano Pin A4

So, it looks like I would need to find 3 more pins in order to support that architecture as it stands.
As it's designed right now, I only have pins 13 & A5 free, unless I move the Clock input to pin A6 or A7.

The point being - staying in the bounds of the -35 architecture, the sound implementation is done (untested, but done). To use the MPU200 architecture, some pins will have to be wired/changed and code updated.

To do serial comm to another board (of whatever flavor), there are currently 2 pins free, so it's possible (although pins might need to be shuffled).

#56 3 years ago

SB300 isn't controlled the same way as Bally sound boards - there's no cpu on the sb300, just a timer, that the game sends bytes to to program. It's the stream of bytes sent that generates sounds. Now if someone can figure out how to actually generate new sounds, I'd be very interested in that.

The sound engines are even different from game to game depending on the programmer who wrote it.

So anyone looking to implement new game code on the nano with the original sounds is going to have to duplicate the timing and sound data to do so.

#57 3 years ago
Quoted from DickHamill:

Puts the sound lower nibble on U11:PB0-PB3, and
Holds for 200 microseconds

Cheers, if you want to make this more accurate change it to about 142 microseconds. I haven't calculated how long the upper (second) nibble is active for but the article I pointed you to the other day says 78 microseconds.

Another thing to note, the first Bally electronic (discrete) sound board does not follow this protocol. I'll have to look up some old notes but the communication setup of the first gen CPU based sound board doesn't follow it either.
i.e. the Bally -35 sound support you've added is specific to the "Squawk & Talk", and "Cheap Squeak" sound boards and possibly "SoundsPlus+Vocalizer" boards used in Xenon and Flash Gordon.

1 week later
#58 3 years ago

Very impressive what you have done with the nano and the using J5 as the entry point to an existing MPU.

I have been mucking arround with a bally AS-2518-23 and uno for my arduino pinball see
https://pinside.com/pinball/forum/topic/build-your-own-lamp-driver/page/3#post-4818280
So far I have managed to use the arduino for my William Phoenix machine, Gottlieb Close Encounters.

Its been a learning journey like yourself.

My latest machine utilizes a few arduinos that handle specific tasks, for example an uno with a spikenzie B64 shield performs the switch matrix function.
The rows and columns wires connects to it and it performs the debouncing. It serially connects to my arduino mega 2560.
A second uno connects to my Bally AS-2518-23 which controls the 60 Lamps again simple serial connection passes lamps on/off control.
I picked up a separate Zero Cross detector circuit that interfaces to the uno. Interfacing to the board taught me about SCR and Zero Cross world.
In hindsight, I could have completely bypassed that uno and just plug the leads into the Arduino Mega 2560 (oh well).

The Arduino Mega does all the real time stuff taking the switch matrix inputs and driving the solenoid board and talks serially to a Raspberry pi. I also have an 20x4 LCD screen for debug connected.
The pi drives the TV screen backboard and polyphonic sounds. Basically, the pi reads the serial commands from the mega to control the python program that displays the score, balls, credits, and queue the playing of sound, background music.

For the sound department, if I were to do it over, I think I would go the route of a wave trigger board
https://robertsonics.com/2015/04/25/arduino-serial-control-tutorial/ this seems to be the go to board for many hobby projects.

I just wanted to say thanks for sharing what you have done. Sharing your experience will aid me in my learning journey.

#59 3 years ago

Working with RoyGBev on an approach for Hot Hand (which uses the SB100 for sound).

I'm hoping that someone familiar with that architecture can validate the approach I'm thinking of below.

For some reason I had my signals crossed and I thought that Hot Hand was the same boards as Galaxy. It's actually much simpler. Looking at the schematic, the SB100 only responds to three addresses:
0x00A0
0x00C0
0x00E0
I've been wrong before though, so please check it out and see if you agree. What I'm seeing is that (on the SB100) A12 is NOR'd with the clock (theta2), A9 is NOR'd with R/W, and both are those are AND'd with VMA. So A9 & A12 have to be low.
Then, A7 has to be high to make those two (3-input) AND gates high.
A5 latches U3 & U4.
A6 latches U5.

Anyway, that means that the wiring of Hot Hand can be very close to Stars.

My approach for the Addressing on the MPU100 (and -17) is as follows
VMA (26) - Nano Pin A5
A0 (22) – Nano Pin A0
A1 (21) – Nano Pin A1
A2 - not used
A3 (19) – Nano Pin A2
A4 (18) – Nano Pin A3
A5 (17) - (will be hooked up to Nano Pin13)
A6 (16)
A7 (15) – Nano Pin A4

To address the SB100, I'm thinking A5 will need to be added. After disassembling the Hot Hand ROMs, I can't find any mention of address M00C0 or M00E0. The only sound calls I see are to M00A0.

There's this part, which looks like it's just clearing the sound card:
CLRA *1634: 4F 'O'
STA M00A0 *1635: 97 A0 '..'

And then later a chunk that looks like it's actually playing sounds:
STA M00A0 *1FDA: 97 A0 '..'
LDU M0008 *1FDC: DE 08 '..'
LDA $00,X *1FDE: A6 00 '..'
BEQ Z1FF2 *1FE0: 27 10 ''.'
STA M00A0 *1FE2: 97 A0 '..'

This is just a guess, but I'm wondering if it's possible that only a part of the SB100's capabilities are being utilized? I haven't been through this exhaustively.
For other games with the SB100, I'm certain that A6 would be required.

#60 3 years ago

Thanks, legtod2 - I look forward to checking out your project!

#61 3 years ago
Quoted from DickHamill:

0x00A0
0x00C0
0x00E0

From memory, the SB-100 in Hot Hand is only addressed via port $A0
Port $C0 was used on earlier SB-100 sound boards that had electronic chime simulation.

I believe only Lectronamo and Wild Fyre had the electronic chime support populated on the SB-100 board (revision A boards). Nugent and Dracula had the same software code as Lectronamo and Wild Fyre respectively, but the electronic chime support was removed from the SB-100 (revision B boards).

#62 3 years ago

Thanks, Quench , that makes perfect sense now.
It's interesting to see how Stern/Bally split on the sound implementation as they moved away from chimes.

#63 3 years ago

Is there a shopping list for this mod? Would love to do this with my Stars. Looks absolutely amazing and having carry over objectives makes my heart grow 3x.

#64 3 years ago

TaylorVA - I can put together a shopping list, but I built mine from nonsense I had laying around. I think RoyGBev just bought parts, maybe he has a list handy.

#65 3 years ago
Quoted from DickHamill:

taylorva - I can put together a shopping list, but I built mine from nonsense I had laying around. I think roygbev just bought parts, maybe he has a list handy.

Thanks, I’m a complete idiot with this stuff, but can usually figure stuff out if I have parts on hand. Really looking forward to doing this to my stars.

#66 3 years ago

Thank you so much @DickHamill. I saw your post on Reddit about this a couple of months ago, and since then have been obsessed with doing this mod. I bought a Stars about three weeks ago and even as a complete Arduino noob followed your detailed instructions and got it working. Anyone on the fence about it, just do it! I think I spent about 20 bucks on parts and made it happen. As a noob, I will advise other novices that if you're using a Chinese Arduino clone, use the old bootloader option in Tools/Processor in the Arduino IDE. I struggled with this for days. I used a cheap shield from amazon that breaks the pins out to screw terminals. The Inland Arduino starter kit that came from Micro Center had everything else I needed to get it running. I cut the female/female patch cables in half and used them to connect to the pins on the J5 one at a time. Also for noobs like me: the J5 pins are numbered from right to left. It's a quick and dirty setup, but it works like a champ. I've been looking all over for an option to make a 32 pin female connector but to no avail. I bought some 40 pin female headers to use as a connector, but soldering wire directly onto header pins is no fun at all. I have a Wav Trigger coming tomorrow and hopefully with the help of some of the more knowledgeable users here on Pinside will have custom sounds/music added soon.

starsduino (resized).jpgstarsduino (resized).jpgstarsduinoloose (resized).jpgstarsduinoloose (resized).jpg
#67 3 years ago
Quoted from CousinPookie:

Thank you so much DickHamill. I saw your post on Reddit about this a couple of months ago, and since then have been obsessed with doing this mod. I bought a Stars about three weeks ago and even as a complete Arduino noob followed your detailed instructions and got it working. Anyone on the fence about it, just do it! I think I spent about 20 bucks on parts and made it happen. As a noob, I will advise other novices that if you're using a Chinese Arduino clone, use the old bootloader option in Tools/Processor in the Arduino IDE. I struggled with this for days. I used a cheap shield from amazon that breaks the pins out to screw terminals. The Inland Arduino starter kit that came from Micro Center had everything else I needed to get it running. I cut the female/female patch cables in half and used them to connect to the pins on the J5 one at a time. Also for noobs like me: the J5 pins are numbered from right to left. It's a quick and dirty setup, but it works like a champ. I've been looking all over for an option to make a 32 pin female connector but to no avail. I bought some 40 pin female headers to use as a connector, but soldering wire directly onto header pins is no fun at all. I have a Wav Trigger coming tomorrow and hopefully with the help of some of the more knowledgeable users here on Pinside will have custom sounds/music added soon.[quoted image][quoted image]

Nice job, but you should really address that leaking battery and battery damage...

#68 3 years ago

That's fantasic, CousinPookie !
I'd love to hear your thoughts on the rules, and I'm suddenly mortified that I haven't finished a couple of major things in the code.
Having played it for a month or so, I'm beginning to think that I'm ringing the chimes too much, but maybe putting in a sound board would alleviate that concern. Let me know what you're thinking with the Wav Trigger. I was considering hooking one up with the serial interface, but I haven't started that approach yet.

#69 3 years ago

I wanted to take a stab at a shopping list, in case anyone is looking for a starting point. These prices are definitely not the cheapest you could find if you shopped around, I'm sure. Also, I pulled all Amazon links, but I'm sure there are other vendors people might want to use for a variety of reasons. Is that enough disclaimers?

BOARD
=====
Official Arduino Nano ($12.50) - Its probably good to support legitimate Arduino development
Correction: Don't purchase the "Arduino Nano Every" board based on the ATmega4809 chip. It doesn't allow fast direct port access. You need the cheaper Elegoo board or a Nano based on the ATmega328p chip.

If you want to do a few, and you've already supported Arduino enough (!), you might consider these because it lowers the price to $4.33 per board.
Cheap Arduino knockoff x3 ($12.98) - needs CH340 driver for programming
https://www.amazon.com/Arduino-Board-ATmega328P-Without-Compatible/dp/B07XVYBR9Y/

CONNECTOR
========
0.1" 40-pin connector (40 pieces for $7.99)
https://www.amazon.com/Honbay-Single-Female-Connector-Arduino/dp/B06Y4S6G29/

PROTOTYPE BOARD
============
32-pin Prototype PCB (2 pack for $9.99) - If you're working on the MPU100/-17, then this will do
https://www.amazon.com/Prototype-Snappable-Arduino-Electronics-Gold-Plated/dp/B081QYPHHP/

To fit the pins for the MPU200/-35, I think you need this one
60-pin Prototype PCB (3 pack for $12.99)
https://www.amazon.com/dp/B07YBYZCTN/

WIRE
====
Wire ($7.99) - Any wire is fine. Here are some cheap pre-cut ones.
https://www.amazon.com/REXQualis-Breadboard-Assorted-Prototyping-Circuits/dp/B081H2JQRV/

#70 3 years ago

ForceFlow : Good looking out. The pic is a bit deceiving from that angle. The damage is old and the battery is fairly new. If I keep the Arduino in there permanently I might just delete it as the Arduino keeps the high score for the Stars 2020 code.

DickHamill : I love the rule set you've created! Even if you don't change a thing I'd still keep it. Knowing that I love the code and don't want to complain, a fresh set of eyes might have seen something you haven't. What I've noticed is:

1) The slingshots don't score. I believe you might have their 10 points tied to the spinner.

2) The spinner always scores 10 points above how much they should per star lit. I think that might be why you find it so noisy. The 10 point chime goes off at the same time as whatever value it is currently lit for (210, 1010, 2010, etc.).

3) There is no Tilt support.

These are all just nitpicky quality of life issues, the rules and code are incredibly fun. I like the skill shot, and Stars should've always had a ball save. I'm afraid I screwed up my setup today removing it to tap into the power to run another Arduino for a little 8x32 dot matrix screen. Manually installing the individual pins was just a proof of concept anyway. I've got the 40 pin headers, I just need to get a pcb to mount them as soldering individual wires was more trouble than it was worth.

#71 3 years ago
Quoted from CousinPookie:

The damage is old and the battery is fairly new.

NiCad batteries are known for leaking, just like alkaline. The best thing is to get that battery off the board entirely and install NVRAM.

Additionally, even though the damage is "old" it will still continue to spread, corrode traces and components, and eventually prevent the board from working. It's usually best to address the issue earlier, rather than later.

https://www.pinwiki.com/wiki/index.php?title=Bally/Stern#Get_rid_of_that_battery_now.21

https://www.pinwiki.com/wiki/index.php?title=Bally/Stern#Repairing_Alkaline_Damage

https://pinside.com/pinball/forum/topic/stripping-battery-corrosion-with-a-strong-acid

#72 3 years ago

CousinPookie - I'll take a look at the spinner/sling scoring. I think there are too many chimes in the tunes played for inlanes and star collects, so I might simplify those in the future. I'm also thinking that the # of pop bumper hits to light the in/outlanes is too many.

As for tilt/slam - you're absolutely right. I'll get that working soon and post an update. I kept putting that off because I didn't have a tilt bob in my machine and I was debating the actual code implementation. I like what Bally does with some of their tilt where the bonus countdown still happens but with no sound/score (just lights). Regardless, I need to get something in there.

#73 3 years ago

Just discovered this thread... amazing idea to use J5 with an Arduino... and so much explanations from OP! Thank you DickHamill, I learned a lot today!

#74 3 years ago

I cannot get this to work. Arduino has green light but the mpu-100 just has red led and blank displays. My setup is like CousinPookie but with 8pin connectors. I have zero code experience and with Arduino so I'm guessing that is the issue. I open Stars2020.ino in Arduino and uploaded the sketch 19986 bytes. Is this correct? Or could be a wire connection issue?

#75 3 years ago

Hi 8bitrobo - sorry to hear you're having problems!
Can you take a picture of your hardware plugged into the board so I can see if there are any obvious issues?

I've uploaded a new revision of the code with updates to PinballMachineBase.ino.
If you build and upload the PinballMachineBase.ino project, and leave the serial connection to the Arduino plugged in when you power on the machine, you'll be able to open a terminal window in the Arduino software (Tools->Serial Monitor).
That will give you messages as the program tries to run (set the serial port connection to 115200 baud), and it will help with the debugging.

The size of PinballMachineBase.ino at the moment should come up as follows:

Sketch uses 10274 bytes (33%) of program storage space. Maximum is 30720 bytes.
Global variables use 1061 bytes (51%) of dynamic memory, leaving 987 bytes for local variables. Maximum is 2048 bytes.

#76 3 years ago

DickHamill Here is my temporary rig to test out. I tried verify on the new code but get:
C:\STARS Custom\BallySternOS-master\PinballMachineBase/PinballMachineBase.ino:284: undefined reference to `SetLastSelfTestChangedTime(unsigned long)'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino Nano.

IMG_20200520_211117323 (resized).jpgIMG_20200520_211117323 (resized).jpgIMG_20200520_211156826 (resized).jpgIMG_20200520_211156826 (resized).jpg
#77 3 years ago

Hi 8bitrobo - thanks for the pictures. I believe the problem is the wiring to J5.
That connect has pin 1 on the right. If you take your connectors and flip them around, i think you'll be pretty close.
The other thing I see is the red & green wires (ground and +5) look like they're at the very end of the connector?
+5 is pin 30 and GND is 31, but the connector actually goes all the way to pin 32. So there should be an unconnected pin at the very end, when you swap these around to the left side.
That yellow jumper for IRQ is plugged into U9:pin4, correct? I can't tell from the picture if it's 4 or 5.

I'll update my diagram when I get a chance to make this stuff clear.

As for the software - I moved around some function calls and updated all the files. If you grab everything from GitHub, I think that PinballMachineBase project will build.

#78 3 years ago

8bitrobo , CousinPookie and anyone else wanting to try this out - I "released" a new version today (with wizard mode, tilt, match, etc.) and documented everything over in the modding forum, which is maybe where this post should have been in the first place?

https://pinside.com/pinball/forum/topic/stars-2020-new-code-for-stern-stars-1978

The code is still on GitHub in the same place:
https://github.com/MrEkted/BallySternOS

I've broken out Self Test & Audit to its own file so it can be portable with other implementations (at least the base functionality). I've also added the PinballMachineBase Arduino project so it's easier to start a new build from scratch.

I'll be working on Bally Black Jack (1977) next, because that's my other machine from the same era.

If anyone has a Bally/Stern early SS that they want updated with new rules, please put it on a palette and ship it over here.
You pay the shipping and lend me a machine for a month and I'll do all the work for the fun of it.

#79 3 years ago

Man @dickhamill, you've been putting in work over there! I tried to upload your new sketch, but I'm stuck on the Wavtrigger.h file. I have a wav trigger, but haven't even started working with it yet. Did you finish the sound implementation already? I'd love to try the new code immediately, so is there some sort of placeholder I can use to check out the new code until I get the wav trigger ready?

Thanks for the link to the 32 pin prototype board in the shopping list btw. It was perfect for a more permanent solution. Please don't judge my sloppy soldering. It works.

20200521_162321 (resized).jpg20200521_162321 (resized).jpg
#80 3 years ago

Hi all,
Very impressiuve.I thought I was alone in this.... I havce an EM that is gutted and I started from scratch with Mega2560. I have two. One is handling the score reels and head only and getting signals via IC2. Wav trigger on the way. I made two boards with mosfets one 16 mosfet for main and one 8 mosfet for the head and secondary mega.

I know thi sis different than what you guys are doing but not that much.

I started with Frogger's submarine framework, but have changed it so much the only thing left is the bumpers and torpedoes..... lol

Great work, I think I will take a look at your ino's and see if it would be easier to start with them. Most everything is working on the bench but I am not happy with my code. So need to study other stuff to see if I am doing correctly.

I though of getting something going to start an framework for arduino's and mega's and such, but it looks like you already did....

Nice work BTW.....

#81 3 years ago

CousinPookie Your board looks better than mine!
Sorry about the dependency -- I forgot that I was messing with the wavtrigger. It looks doable, but I haven't done the implementation yet. The problem I have right now is that I have to refactor the code in order to free up some space. I think I'm using 95% of the Arduino's code space at the moment.

I'll comment out the wavtrigger dependency until it's working.

(I just pushed new code to GitHub -- give it a try)

#82 3 years ago
Quoted from bevins:

Hi all,
Very impressiuve.I thought I was alone in this.... I havce an EM that is gutted and I started from scratch with Mega2560. I have two. One is handling the score reels and head only and getting signals via IC2. Wav trigger on the way. I made two boards with mosfets one 16 mosfet for main and one 8 mosfet for the head and secondary mega.
I know thi sis different than what you guys are doing but not that much.
I started with Frogger's submarine framework, but have changed it so much the only thing left is the bumpers and torpedoes..... lol
Great work, I think I will take a look at your ino's and see if it would be easier to start with them. Most everything is working on the bench but I am not happy with my code. So need to study other stuff to see if I am doing correctly.
I though of getting something going to start an framework for arduino's and mega's and such, but it looks like you already did....
Nice work BTW.....

bevins honestly, my code for Stars is a bit sloppy at the moment. There aren't enough comments and it has some inefficient spots. The general concept is a state machine on a tight loop. On each pass, I update the score, lights, and sound based on the switch hits in the queue. Then, there are special states for bonus countdown, ball end, match, attract, etc.

There's a base implementation (PinballMachineBase.ino) that's fairly stripped down to show the concept.

#83 3 years ago

DickHamill Well I definitely did the the connectors backwards because i pinned it like the picture, 1 on the left. I completely redid the connectors and it is correct now. But when i upload stars2020.ino or pinballmachine.ino to the nano and turn on the machine it goes crazy. All the coils go off at once and the display numbers are random changing fast. I can only test it for a second for fear of burning coils. I fear having the connections backwards damaged something or if there is something in the Arduino program I'm not understanding. I have BallysternOS-Master in the include library and everything verified and uploads just fine.

#84 3 years ago
Quoted from 8bitrobo:

dickhamill Well I definitely did the the connectors backwards because i pinned it like the picture, 1 on the left. I completely redid the connectors and it is correct now. But when i upload stars2020.ino or pinballmachine.ino to the nano and turn on the machine it goes crazy. All the coils go off at once and the display numbers are random changing fast. I can only test it for a second for fear of burning coils. I fear having the connections backwards damaged something or if there is something in the Arduino program I'm not understanding. I have BallysternOS-Master in the include library and everything verified and uploads just fine.

8bitrobo By all means, please don't burn coils or mess up hardware! The only time I've had behavior like you're describing, it was because my Arduino wasn't reading the clock properly (J5:pin27 to Arduino Pin 4). I'm assuming you have the latest code.

Have you tried putting the M6800 back in to see if the board is still running okay? I'm struggling to think of damage that could have been caused by the backwards wiring regardless.

#85 3 years ago

when you do this, remove the playfield fuse!!! for god's sake that should be a DUH moment. don't put this together and just turn it on!

after you see the PF controlled lights and score displays working, THEN with the game on, take the PF fuse and just put it across the playfield fuse holder "for a second". If the coils turn on, obviously there's still a problem! if they don't, then press the fuse into place and test the game.

now i don't know what dick did on the testing situation. Did he write test routines? like the original had?? i would hope so... Me i would run diagnostics before i tried a game...

#86 3 years ago
Quoted from cfh:

when you do this, remove the playfield fuse!!! for god's sake that should be a DUH moment. don't put this together and just turn it on!
after you see the PF controlled lights and score displays working, THEN with the game on, take the PF fuse and just put it across the playfield fuse holder "for a second". If the coils turn on, obviously there's still a problem! if they don't, then press the fuse into place and test the game.
now i don't know what dick did on the testing situation. Did he write test routines? like the original had?? i would hope so... Me i would run diagnostics before i tried a game...

That's a good tip about removing the playfield fuse. I will add that to the documentation.
As far as testing, as soon as the Arduino starts to try to read/write the PIAs (flashes 4 & 5), if the wiring is incorrect, there's no way to predict what the response from the board will be.

#87 3 years ago

So Dick did you write test routines? that is, when you press the coin door test button, it runs tests like the original? if you didn't do that, you *need* to do that!

#88 3 years ago
Quoted from cfh:

So Dick did you write test routines? that is, when you press the coin door test button, it runs tests like the original? if you didn't do that, you *need* to do that!

cfh , Yes, implemented all the original tests plus more:

Written documentation here:
http://ikehamill.com/wp-content/uploads/2020/05/Stars2020.pdf

#89 3 years ago

Nice work on diagnostics!
I would make a couple changes to the diagnostics though. For the score display test after it goes through from 000000 to 999999, I would walk the digits right to left. And then after that’s done revert back to the normal 000000 to 999999 and repeat.

Good work on the diagnostics coil test and the ability to lock on a single driver. Also great idea on the switch test too

On the audits, I would make the slam tilt the Audit/adjustment clear. Watching you fumble through the double push was making me cry...

And on the adjustments why not use another score display with an English word descriptor? I know there aren’t a lot of segments but if you check out pascals work on the system 80 and system1 boards. he got pretty creative with spelling out words on a six digit numerical display

Oh and on the coil test another thing that two bit score implemented is kind of cool. In coil test if you press switch number one, it would fire coil number one three times. And he did this for the switches up to switch 19. The reason why this is cool is that a lot of us have the all tech diagnostic switch boards. And if you’re using that you just press switch number one and it fires coil number 1 three times. This way the Coil test isn’t quite so linear

#90 3 years ago

bally does not control segments individually so for custom digits you are kind of at the mercy of what the display board's segment decoder chip can output. Might be some tricks like strobe two numbers back and forth to give the perception of a different letter.

#91 3 years ago

Andrew appears you are incorrect about this, or you misunderstood, or I didn’t explain it very well. See video below

#92 3 years ago

That makes sense now when the test chip was talking about the rows and columns for the lamps, that didn't make sense on whatever thread that was.

Andrew is talking about the display digits themselves, with the 4543 segment decoder any BCD info sent to the display that isn't 0-9 (ie. ABCDEF in hex) is displayed as a blank.

That's not to say it couldn't be changed to a different decoder, though. Especially if you have aftermarket LED displays in a kit, easy to change at that point.

The only digits that aren't specifically 0-9 that are sent to the displays are F (for blanking) and occasionally $E (for specific purposes in showing or hiding credits/match numbers) - those would have to be corrected.

Slam switch to clear the memory is smart I will steal that idea for my stuff I was using the coin switch instead like Bally did in -35 boardset games, but the slam is a better idea.

The numbers that you think are sound boards might be for SB-100 and SB-300 on stern games? What is that test chip in the alltek board or the 2 bit ones?

#93 3 years ago
Quoted from cfh:

Andrew appears you are incorrect about this, or you misunderstood, or I didn’t explain it very well. See video below

Walking digits like MPU200 does is do-able. I thought you where talking trying to do alphabetic which the CD4543 won't do.

Quoted from cfh:

And on the adjustments why not use another score display with an English word descriptor? I know there aren’t a lot of segments but if you check out pascals work on the system 80 and system1 boards. he got pretty creative with spelling out words on a six digit numerical display

The 4543 will only draw 0 to 9. In system 80 and system 11 they control each segment so they can do fun things with the displays. The CD4543 kind of road blocks you into just digits 0 to 9.
Untitled (resized).pngUntitled (resized).png

Quoted from slochar:

That makes sense now when the test chip was talking about the rows and columns for the lamps, that didn't make sense on whatever thread that was.
Andrew is talking about the display digits themselves, with the 4543 segment decoder any BCD info sent to the display that isn't 0-9 (ie. ABCDEF in hex) is displayed as a blank.
That's not to say it couldn't be changed to a different decoder, though. Especially if you have aftermarket LED displays in a kit, easy to change at that point.
The only digits that aren't specifically 0-9 that are sent to the displays are F (for blanking) and occasionally $E (for specific purposes in showing or hiding credits/match numbers) - those would have to be corrected.
Slam switch to clear the memory is smart I will steal that idea for my stuff I was using the coin switch instead like Bally did in -35 boardset games, but the slam is a better idea.
The numbers that you think are sound boards might be for SB-100 and SB-300 on stern games? What is that test chip in the alltek board or the 2 bit ones?

Have four inputs so with the right software and display hardware could do up to 14 segment display and comma with a 4 to 16 decoder

#94 3 years ago

I just posted this to the Stars2020 thread, but in case anyone finds this thread and not that one, I figured I would post here too.

Good news on the dual-boot front--I clipped a line to the top of R134 (thanks Quench ) and made a jumper block to a couple of pins, and I'm able to run the Arduino on the board with the M6800 still installed.

I made a video:

To switch to the Arduino, I installed a switch to turn off the +5V to the Arduino, and I installed a 5-pin block of ground pins on my card. In order to take over, one pin grounds the /RDY line on J5:pin24. I also have to ground J5:pins10-13 so the addressing with work for the Arduino. This can be done on a single switch if anyone has a Quintuple Pole / Single Throw switch.

Anyway, it's still not an adjustment through the menu or anything, but it's essentially now a dual-boot machine without installing or removing any parts.

If anyone has thoughts on how to make this a little more convenient (a switch behind the coin door would be ideal) I would love to hear ideas.

#95 3 years ago

Side note, I presume you noticed the 6800 welcome tune is incorrectly playing the 1,000 chime at the moments it should play the 10,000 (extra) chime?

#96 3 years ago
Quoted from Quench:

Side note, I presume you noticed the 6800 welcome tune is incorrectly playing the 1,000 chime at the moments it should play the 10,000 (extra) chime?

Alas, my machine only has a 3-chime box! It does't look original to the machine, and one of the chimes is connected to two solenoid channels (I assume because it fires twice in the solenoid test).

#97 3 years ago

So it's missing the second chime box that's only populated with the extra chime:

https://www.ipdb.org/showpic.pl?id=309&picno=31699

#98 3 years ago
Quoted from Quench:

So it's missing the second chime box that's only populated with the extra chime:
https://www.ipdb.org/showpic.pl?id=309&picno=31699

Thank you - I didn't realize that was a thing. Now that I see that picture, it appears that the chimes I have do look original. Same white plastic.

#99 3 years ago

So looking through the code, seems like you're HALTing the 6800, which tristates it. Am I right in assuming that you can take over the bus at that point via the arduino and address memory locations? i.e. see what's in the ram, etc. - I know that won't get the 6800 registers from the processor (there'd have to be a 6800 emulator running on the arduino to get that) but at least contents of ram could be explored as a debugger? That might get me where I'd like to go with this. I plan on trying out the code on my stars next week with an ancient Duemilenove I have laying around.

I know the debugger memory stuff would require many more I/O pins (although not so much if I just want the Ram contents, nothing with roms).

Maybe I can rig something with an external interrupt to have the processor save the registers into memory somewhere (the extended ram in the weebly board would help here) - what does the 6800 do when it comes out of HALT? All its registers are internal so does it just resume where it left off or does it reset?

Still keeping the dream of a monitor alive.....

#100 3 years ago

It looks like the 6800 is pulled right off those board so no need to halt it if it isn't there.

Promoted items from Pinside Marketplace and Pinside Shops!
$ 29.00
Boards
RoyGBev Pinball
 
$ 12.00
Playfield - Toys/Add-ons
UpKick Pinball
 
$ 9.00
Cabinet Parts
Third Coast Pinball
 
$ 169.00
From: $ 2.99
From: $ 1.00
Playfield - Other
Rocket City Pinball
 
$ 29.00
Boards
RoyGBev Pinball
 
From: $ 50.75
Playfield - Other
Rocket City Pinball
 
Wanted
Machine - Wanted
St. Louis, MO
From: $ 130.00
Boards
Troxel Repair
 
There are 282 posts in this topic. You are on page 2 of 6.

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/replacing-the-m6800-in-a-stern-mpu100-with-an-arduino/page/2 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.