Remember that ugly box from a few months back I made for playing classic Arcade games?
Well I got a sudden urge to replace it today and now I have a new shinier box with moar buttons, smaller form factor and proper non Japanese buttons.
A few months back after I made my initial blog posts I had ordered a new set of buttons and a joystick for my next project which was going to be a cabinet however things didn’t work out to the point where I could buy the necessary tools and materials to make that a reality and the parts just ended up sitting in my drawer for the last 3 months. My original controller while still functional was beginning to fold at the corners as I made fairly frequent use of it so I was beginning to really worry about how much longer it would last.
That brings me to today, I was looking at a box on my desk from my 4 year service award and just like before the wheel began to turn and all of a sudden I was cutting out holes on the box for the stick and buttons. That was the easy part. I also decided months ago to get parts that would require traditional wiring so I had already made my ground line 3 months ago but I still needed to make my cables for the actual switches themselves. It wasn’t too hard, I had the tools and parts for that already from my initial purchase 3 months ago.
Creating the cables
I had a ribbon jumper cable kit from adafruit and I had a bag of crimp terminals from a local electronics store (.205 size fits perfectly). What I was doing was cutting the jumper off one end, stripping about 2 cm, turning the exposed wire downwards, placing the terminal over the wire/exposed wire and crimping it together. Blammo! one Joystick switch -> pi GPIO cable created. repeat 13 times.
Once all the button cables were created I attached them to the Normal Open connector (NO) I already had the switches attached to a daisy chained ground cable I made months before and the jumper end to an open GPIO slot.
Setting up the OS
In my original box I was following an Adafruit tutorial that in the end gives you a retrogame.c file that gives you an easy way to map you controls to the GPIO, I continued with this program in this case as well. I had to add several more lines to the table since I was now supporting 6 play buttons and 1 more additional function button but the program is very straightforward to edit. I had to add KEY_SPACE,KEY_LEFTSHIFT,KEY_Z, KEY_X,KEY_ESC to the default table. I also had to make a small change to mame4all to remove the 1+coin escape workaround I had previously implemented.
What’s changed
- Well the obvious is 6 play buttons now instead of 2 but I also added an Escape button instead of having to do coin + 1p.
- No longer using Sanwa buttons, using the American style with the indented button.
- The size has also been reduced considerably.
- The pi is more secured into place instead of just dangling about as before.
- The cut outs on the exterior are more matching to the ports being used (HDMI, power, SD card)
- Not as much ugly tape is visible, a small bit of 2 sided can be seen holding the stick in place
The long term plan is still to eventually make a cabinet but for now this will be more than enough to do the job.
1 Comment
A month ago I went to the open house for the Greater Niagara model railroad engineer’s to checkout what their club was about. I enjoyed the visit, they had a wonderful layout and I took lots of pictures and a couple videos. I decided to continue visiting the club and hopefully eventually become a member. So 1 month later I have been to 3 members nights and have run a few of their trains and it has been a lot of fun.
The layout itself is era’d between 1955 and 1965 so unfortunately it is not by default a layout Chessie would make sense, around a decade too early BUT I was still able to get permission after an operating session to run my trains for a bit. This sounded like the perfect first outing for my Atlas U30B. This is a DC model from the silver series and it is exceptionally detailed and it runs very smooth. I also decided to give my Bachmann GP7 a run with the U30B as it hasn’t ever seen anything but EZ track beneath its wheels.
The Fenwick Central is a DC layout broken into several blocks for 4 throttles, it is a very well designed block system and multiple trains are able to run simultaneously through proper communication and passing siding usage. Now you may recall from my original post about my GP7 that is a DCC and it is however Bachmann puts dual mode decoders into its engines so that it can run both! FYI the GP7 ran excellent as DC and it also paired very nicely with the Atlas there wasn’t any tugging or dragging once the engines were moving.
So I had the cats running on the layout and I did 2 full trips around which took around 10-15minutes. Below is a video featuring Fenwick Central trains at first then it ends with my Chessie System run.
Enjoy
direct link to video
Share your thoughts
I manage several vCloud environments at the moment ranging from versions 1.5 to 5.1 right now (no 5.5’s yet) with permissions ranging from System Admin to Organization Admin. If you have ever managed a growing vCloud environment then you already know it is paramount to use some form of automation, scripts or even powershell to handle some of the very repetitive tasks you will be doing on a regular basis otherwise you will become overwhelmed by them.
What I have unfortunately noticed is that almost no one really talks about or documents anything beyond absolute basics so going forward I am going to share some of my tools on this blog starting with the basic and going all the way up to my OVF transfer and network1.5->network5.1 scripts.
Today we’ll start with an easy one.
lsorg
#!/usr/bin/php
<?php
/*
* lsorg 0.2 by Phil Spencer 2013
*/
$home = getenv('HOME');
require_once $home . '/etc/config.php';
// login
$service = VMware_VCloud_SDK_Service::getService();
$service->login($server, array('username'=>$user, 'password'=>$pswd), $httpConfig);
// create an SDK Query object
$sdkQuery = VMware_VCloud_SDK_Query::getInstance($service);
$recsObj = $sdkQuery->queryReferences("organization",null);
foreach($recsObj->getReference() as $orgRef) {
echo $orgRef->get_name() . "\n";
}
echo "\n";
$service->logout();
?>
This is a simple CLI utility I wrote that dumps out the Organizations in whatever cloud I am using at the time. The config.php file is the same config.php that comes with the PHP SDK samples. I have just put all my cloud config.php files into one directory and switch between them depending on what cloud I am accessing at the time.
As you can see in this case I create a VMware_VCloud_SDK_Query object then request all the organization records my permissions allow me access to with queryReferences(“organization”,null). If I were to replace null with search terms or a specific name I would get the record for just the Organizations that matched. Then with a foreach I loop through them and output the names. You might not see a reason for this script yet but when I am working with other scripts that require an Organization name sometimes it is easier to have the list in front of me to copy/paste quickly.
I also have this script in my /usr/bin folder for easy access, a quick lsorg on the command line and away I go.
So as I said, an easy one but there will be more to follow.
Share your thoughts
It’s been a while since a good round of Doomsday occurred but it’s back and the war is heating up!
15:47 < CrazySpence> someone better reign in that ganborro or we'll all be destroyed!
15:57 < Doomsday> In a ground force attack, Dictator Ganborro of Anatoray has declared war on Dictator CrazySpence of Philtopia.
15:57 < Doomsday> The citizens of Anatoray stand proud to fight the massive power of the defending force.
15:57 < Doomsday> In a moment of victory, Dictator Ganborro of Anatoray has won the war over Dictator CrazySpence of Philtopia.
15:57 < Doomsday> The war has ended.
15:58 < Doomsday> In a ground force attack, Dictator CrazySpence of Philtopia has declared war on Dictator Ganborro of Anatoray.
15:58 < Doomsday> In a moment of victory, Dictator CrazySpence of Philtopia has won the war over Dictator Ganborro of Anatoray.
15:58 < Doomsday> The war has ended.
15:58 < Doomsday> In a ground force attack, Dictator Ganborro of Anatoray has declared war on Dictator CrazySpence of Philtopia.
15:58 < Doomsday> The citizens of Anatoray stand proud to fight the massive power of the defending force.
15:58 < Doomsday> The defense of Dictator CrazySpence counter-attacks Dictator Ganborro and eliminates 80% of the advancing force.
15:58 < Doomsday> The war has ended.
15:59 < Doomsday> In a ground force attack, Dictator CrazySpence of Philtopia has declared war on Dictator Ganborro of Anatoray.
15:59 < Doomsday> The people of Philtopia demand someone pay for the attacks against their nation
15:59 < Doomsday> The citizens of Anatoray scramble in terror at the massive power of the attacking forces.
15:59 < Doomsday> In a moment of victory, Dictator CrazySpence of Philtopia has won the war over Dictator Ganborro of Anatoray.
15:59 < Doomsday> The war has ended.
16:00 < Doomsday> The dust settles for a brief moment...
16:00 < Doomsday> Taxes collected and wages paid, a month has passed. Go on great nations and continue to conquer.
16:00 < Doomsday> In a ground force attack, Dictator Ganborro of Anatoray has declared war on Dictator Serco of SercoLand.
16:00 < Doomsday> The citizens of Anatoray stand proud to fight the massive power of the defending force.
16:00 < Doomsday> In a moment of victory, Dictator Ganborro of Anatoray has won the war over Dictator Serco of SercoLand.
16:00 < Doomsday> The war has ended.
16:01 < Doomsday> In a ground force attack, Dictator Ganborro of Anatoray has declared war on Dictator ESX of ESXLand.
16:01 < Doomsday> The citizens of Anatoray stand proud to fight the massive power of the defending force.
16:01 < Doomsday> In a moment of victory, Dictator Ganborro of Anatoray has won the war over Dictator ESX of ESXLand.
16:01 < Doomsday> The war has ended.
16:01 < CrazySpence> see what i mean? he's out to get everyone
Doomsday is a text based strategy game where your goal is to build up a large nation and escape via space shuttle before Earth is annihilated by an asteroid. It has existed for a long time in many forms evolving from an ancient IRC bot on undernet to a reimagined Perl based IRC game in 2003, moving into client/server in 2007 and finally the current Doomsday website in 2011. Many warriors have come and gone but some, like Ganborro, Keep hanging around to keep me from that wonderful achievement of Victory.
Check out the DDAY website
Also available via classic IRC on irc.blitzed.org #doomsday and irc.undernet.org #Conquest
Share your thoughts
So the other day Susan and I were moving some old boxes we hadn’t seen in awhile and I came across my old Nintendo collection. Of course this inspired me to have to try and set it up and see if it still worked!
I still had an RCA cable attached to the NES but no power adapter was to be found. I had a controller in the box but wasn’t sure if it was still functional but it was better than nothing. I luckily had a couple power adapters for my Bachmann EZ-command thanks to a warranty replacement and it fit pefectly
Lets do it!
So I hooked it up to the TV, plugged in the power and I got a blinky red light so it was real, this was happening but would the games work? Thankfully the answer to that question was yes, My games which all probably haven’t been played in over 3 years all worked. The controller which was also coiled up for several years also appeared to work.
It was time for fun!
When the kids went to bed I went on an NES blitz and it was glorious! here are some screens below
Share your thoughts