Author Topic: Earthshaker! Aftershock Project  (Read 16613 times)

ScottD

  • Moderator
  • ****
  • Posts: 388
  • Scott Danesi
    • View Profile
    • ScottDanesi.com
Earthshaker! Aftershock Project
« on: December 14, 2013, 11:01:16 AM »


Hey Everyone!
I finally got around to starting my Earthshaker Aftershock Project.  Below are a few sections outlining the project.

Overall Goal:
The plan for this project is to redo the entire code for Earthshaker and take advantage of it's great playfield layout.  As we all know Earthshaker is a great game as it sits, but I feel it could be so much more. 

Software:
I will be adding all new mini-modes along with new audio and display interaction.  I will keep the game easy to understand for novice players and deep enough for the most experienced. 

I have decided to share the code for this project in case anyone is interested. 

You can find it at the code at the github repository below:
https://github.com/scottdanesi/earthshaker-aftershock

Hardware:
I have in my possession Earthshaker prototype #2 (at least most of it) and I will be using that machine for my software re-write.  I do not plan on adding a DMD, I will be using the stock Alphanumeric displays (Thank you Jim).  I have also acquired one of Mark's System 11 P-ROC interface boards!  This project is going to be great.

Here is a checklist of hardware parts that I needed to install into my Earthshaker (estimated prices in USD):
  • P-ROC - $329
  • Mark's System 11 Interface Board - $225
  • Jim'a Alphanumeric Interface Board - $80
  • Computer - ~$400
  • Windows 7 OS - $100
  • Audio Amp - $30
  • Scott's CSSC - $60
  • Stern Autolaunch Mech - $60
  • Misc cables and wiring
Total - ~$1,284

I will be posting updates here throughout the project and updating this first post with more info along the way.  I hope to have something for Expo this year!  Let me know if you guys have any questions or suggestions.  I am always open to feedback (positive or negative).

Latest Gameplay Video:
https://www.youtube.com/watch?v=4Bznd4Y4qlE

High Score Entry Demo:
https://youtu.be/xjjRqHKQmxg

Special Thanks:
Mark S
Jim Askey
Koen Heltzel
Everyone on the PinballControllers Forum

Thank you,
« Last Edit: April 29, 2015, 12:02:49 PM by ScottDanesi »

ScottD

  • Moderator
  • ****
  • Posts: 388
  • Scott Danesi
    • View Profile
    • ScottDanesi.com
Re: Earthshaker! Aftershock Project
« Reply #1 on: December 14, 2013, 11:22:31 AM »
So here is the first update!

I have the hardware all squared away.  I have installed Mark's System 11 Interface board and Jim's Alphanumeric display driver.  The P-ROC is in place and the machine is happy. 

I am currently working on getting the machine flipping, which should be very soon.  I am just creating some test code to runt he hardware through it's paces to make sure everything is functioning the way it should.  Then it is time to map out what the game structure will look like. 

Talk to you guys soon!

bonnevil69

  • P3 Developers
  • *
  • Posts: 698
  • Matthew Bonnema
    • View Profile
Re: Earthshaker! Aftershock Project
« Reply #2 on: December 14, 2013, 12:27:56 PM »
  Nice.   Looking forward to watching your progress.
DeadPin and Doom

ScottD

  • Moderator
  • ****
  • Posts: 388
  • Scott Danesi
    • View Profile
    • ScottDanesi.com
Re: Earthshaker! Aftershock Project
« Reply #3 on: December 14, 2013, 01:00:13 PM »
  Nice.   Looking forward to watching your progress.

Thanks Matt!  I actually have the game flipping and lighting up stuff now.  I am just trying to get the display working correctly before I shoot a video of the progress.  At this rate, I will definitely have something for Expo 2014.  :)

Hope you will bring your machine again too as I want to see what you have done.

bonnevil69

  • P3 Developers
  • *
  • Posts: 698
  • Matthew Bonnema
    • View Profile
Re: Earthshaker! Aftershock Project
« Reply #4 on: December 15, 2013, 11:17:42 AM »
  Nice. That was my favorite part.  When i actually found that it wasnt an impossible feat. Lol. Is this your first P-roc project on your own?   
 
 Yes ive been working on tons of new stuff. Fixed just about all the problems i was having and added a few new problems. Lol.   Yeah i will definitely take it to expo again as long as Gerry will have it again
DeadPin and Doom

ScottD

  • Moderator
  • ****
  • Posts: 388
  • Scott Danesi
    • View Profile
    • ScottDanesi.com
Re: Earthshaker! Aftershock Project
« Reply #5 on: December 15, 2013, 03:23:59 PM »
Hey Matt,
Yeah I definitely agree.  Seeing the machine come to life is really a great feeling.  This is my first solo "ground up" p-roc rewrite project.  I am very excited to start sharing the code and getting this thing fully up and running. 

Can't wait to see Deadpin at Expo 14!  Seems like it is really coming along.

ScottD

  • Moderator
  • ****
  • Posts: 388
  • Scott Danesi
    • View Profile
    • ScottDanesi.com
Re: Earthshaker! Aftershock Project
« Reply #6 on: December 15, 2013, 03:29:27 PM »
Hey Everyone!  I have an official update on the Earthshker Aftershock project.  I have successfully tested all the hardware with a very simple demo game.  This game has just basic functionality and is able to test all the different parts of the hardware in the machine.  I have also implimented a VERY basic attract mode lightshow which I will share at the end of this post.

Here is a video of the demo game in progress:
https://www.youtube.com/watch?v=0QBQ4Bh6wDQ&feature=youtu.be

Here is the code that I wrote for my attract mode (only 11 lines!!!)
Code: [Select]
i = 0
for lamp in game.lamps:
if i % 4 == 3:
lamp.schedule(schedule=0xf000f000, cycle_seconds=0, now=False)
elif i % 4 == 2:
lamp.schedule(schedule=0x0f000f00, cycle_seconds=0, now=False)
elif i % 4 == 1:
lamp.schedule(schedule=0x00f000f0, cycle_seconds=0, now=False)
elif i % 4 == 0:
lamp.schedule(schedule=0x000f000f, cycle_seconds=0, now=False)
i = i + 1

Feel free to use this code if you want.  I find it great for testing out my yaml file and to ensure all my lights are working properly.

Please let me know if you have any questions or feedback.  Talk to you guys soon!
« Last Edit: December 23, 2013, 08:56:22 AM by ScottDanesi »

Snux

  • Wizard
  • *****
  • Posts: 779
  • Mark Sunnucks
    • View Profile
Re: Earthshaker! Aftershock Project
« Reply #7 on: December 16, 2013, 03:04:28 AM »
Hi Scott,

Good to see you're up and running, welcome to the niche that is System 11 P-ROC!!  I'll be keeping a keen eye on progress. 

Mark
F14 Tomcat - Second Sortie

ScottD

  • Moderator
  • ****
  • Posts: 388
  • Scott Danesi
    • View Profile
    • ScottDanesi.com
Re: Earthshaker! Aftershock Project
« Reply #8 on: December 23, 2013, 09:04:10 AM »
Thanks Mark!  I am currently restructuring how I organize my modes, but should have an update within the next week.  The game is coming along nicely.

I have some basic code shared up on github at the moment.  As it sits, it only plays 1 ball and 1 player.  I have yet to write any of that stuff yet since I am still just trying to test everything out and get the hang of the AC relay and the Alpha Display. 

Here is the link to the github repository:
https://github.com/scottdanesi/earthshaker-aftershock

If anyone has any suggestions for how I can better my code or structure, please let me know.  I am very receptive to feedback, positive or negative.  :)

Thank you!

myPinballs

  • Wizard
  • *****
  • Posts: 555
    • View Profile
    • myPinballs
Re: Earthshaker! Aftershock Project
« Reply #9 on: December 24, 2013, 05:39:04 PM »
Test looks good Scott. Coming along nicely. Great to see another alphy sys 11 project spring to life.

ScottD

  • Moderator
  • ****
  • Posts: 388
  • Scott Danesi
    • View Profile
    • ScottDanesi.com
Re: Earthshaker! Aftershock Project
« Reply #10 on: December 24, 2013, 09:30:13 PM »
Thanks Jim,
I think we can eventually make these old alphanumeric displays do some pretty cool stuff.  I am thinking about trying to make it do a pulse width modulation in order to fade the text on the display. 

Thanks again!

Gerry Stellenberg

  • Administrator
  • *****
  • Posts: 2397
    • View Profile
    • PinballControllers.com
Re: Earthshaker! Aftershock Project
« Reply #11 on: December 24, 2013, 09:38:56 PM »
Scott, alphanumeric.py code supports an character intensities for brightness control of each digit.  Does that work on the sys11 displays?  If so, higher level fade routines should be pretty easy.

It's been a *very* long time since I wrote that code, but it looks like you send in lists of percentages (0 <= % <= 1), where each item in the list corresponds to a display digit.

- Gerry

ScottD

  • Moderator
  • ****
  • Posts: 388
  • Scott Danesi
    • View Profile
    • ScottDanesi.com
Re: Earthshaker! Aftershock Project
« Reply #12 on: December 24, 2013, 09:48:05 PM »
Hey Gerry,
Thanks for the heads up on that!  I was going to try and force a PWM, glad you responded before I went that route.  :) 

Side question:  In your alphanumeric code, I noticed that a few key characters are not accounted for in the asciiSegments list (see below).  I do not know too much about how this is handled yet, but is there an easy way to include characters like ">" and "|"?  What about custom defined characters configured by segment? 

Code: [Select]
asciiSegments = [0x0000,  # ' '
                         0x0000,  # '!'
                         0x0000,  # '"'
                         0x0000,  # '#'
                         0x0000,  # '$'
                         0x0000,  # '%'
                         0x0000,  # '&'
                         0x0200,  # '''
                         0x1400,  # '('
                         0x4100,  # ')'
                         0x7f40,  # '*'
                         0x2a40,  # '+'
                         0x8080,  # ','
                         0x0840,  # '-'
                         0x8000,  # '.'
                         0x4400,  # '/'
 
                         0x003f,  # '0'
                         0x0006,  # '1'
                         0x085b,  # '2'
                         0x084f,  # '3'
                         0x0866,  # '4'
                         0x086d,  # '5'
                         0x087d,  # '6'
                         0x0007,  # '7'
                         0x087f,  # '8'
                         0x086f,  # '9'
 
                         0x0000,  # '1'
                         0x0000,  # '1'
                         0x0000,  # '1'
                         0x0000,  # '1'
                         0x0000,  # '1'
                         0x0000,  # '1'
                         0x0000,  # '1'
     
                         0x0877,  # 'A'
                         0x2a4f,  # 'B'
                         0x0039,  # 'C'
                         0x220f,  # 'D'
                         0x0879,  # 'E'
                         0x0871,  # 'F'
                         0x083d,  # 'G'
                         0x0876,  # 'H'
                         0x2209,  # 'I'
                         0x001e,  # 'J'
                         0x1470,  # 'K'
                         0x0038,  # 'L'
                         0x0536,  # 'M'
                         0x1136,  # 'N'
                         0x003f,  # 'O'
                         0x0873,  # 'P'
                         0x103f,  # 'Q'
                         0x1873,  # 'R'
                         0x086d,  # 'S'
                         0x2201,  # 'T'
                         0x003e,  # 'U'
                         0x4430,  # 'V'
                         0x5036,  # 'W'
                         0x5500,  # 'X'
                         0x2500,  # 'Y'
                         0x4409   # 'Z'
                        ]

Thanks Gerry,

Gerry Stellenberg

  • Administrator
  • *****
  • Posts: 2397
    • View Profile
    • PinballControllers.com
Re: Earthshaker! Aftershock Project
« Reply #13 on: December 24, 2013, 10:20:19 PM »
It's been forever since I've looked at that code; so I"ll mostly leave it up to you to decipher.  What I do remember after a brief look through it is...

The characters passed in through 'input_strings' are indexes into the asciiSegments list, which is simply ordered exactly like a standard ASCII table (search the internet for ASCII table).  asciiSegments starts with ascii char 0x20 (space) because that's the first human readable char in the ASCII table.  So any character not present can be added... just find your char in an ASCII table, and add it to the list in the right position.

The values in asciiSegments are such that each bit in the 16-bit value correspond to one line segment in the alpha display digit.  With a bit of trial and error, or by deciphering the other characters, you should be able to figure out what you need. 

- Gerry

Snux

  • Wizard
  • *****
  • Posts: 779
  • Mark Sunnucks
    • View Profile
Re: Earthshaker! Aftershock Project
« Reply #14 on: December 25, 2013, 07:53:45 AM »
I wrote a simple spreadsheet for playing around with the segments.  I actually did it for the 7 segment displays in my F14 but you could probably take the idea and expand it for the bigger displays.

You just put a 1 or a 0 in each of the "segments" in the spreadsheet, it'll then work out the appropriate hex value...

Mark
F14 Tomcat - Second Sortie