Saturday 31 August 2013

Arduino Game Player - Sega Master System (2 of 2)

Here is the code and the sketch that I promised in part one.

You'll notice I've refactored the code a bit so that the button pressing code is now just 1 method where we pass in the buttons we want to press, the amount of buttons we want to press and the length of time we want to press them for.

This makes a lot more sense on a platform like the Arduino due it's limited memory, no point in filling it up with six methods that do pretty much the same thing. Of course it is good practice in programming in general as well since now if we want to change how we press a button we only have to change it in one place, not six.

Here is the refactored code:

Sunday 25 August 2013

Arduino Game Player - Sega Master System (1 of 2)

Here's a fun little project I've wanted to work on for a while, an automated system that is able to play console based games.

Initially I thought about making a series of wires that connected my PC to a variety of video game consoles via their control ports but since I have the Arduino I think I can throw together something simpler yet just as effective with it.

There are already a few blogs out there showing how to do this, for example this one on instructables which shows you how to tap into a Snes controller or this one also on instructables which shows you how to do the same to an Xbox 360 controller however this isn't quite what I'm looking to do. I want to connect my Arduino directly to the control port of the system, not to the controller. I will admit though using the Arduino as a controller 'expansion' to allow macros and the like is a pretty cool idea and I may come back to that at some point.

I also want to do more with this project than just connect the Arduino to the target system, I also want it to play the games on the system. I've italicised the word play as I'm not exactly certain how I'm going to define the word play yet. Is just moving the character enough or does the character have to be moved towards the goal? Does the system have to work out the goal or can it be pre-programmed in? Does the path to the goal need to be the optimum one or can it be anything as long as it is in the right direction? Does it need to learn?

Friday 23 August 2013

Arduino Mega Drive Rom Dumper (1 of ?)

You may remember at the start of the year I posted this entry on Inside Sega Megadrive Carts where I spoke briefly about an awesome project I saw on insideGadgets.

In the project Alex created an Arduino sketch that was capable of dumping the ROM data from a GameBoy cartridge as well as being able to read and write the data from RAM. This inspired me to get my own Arduino with the aim of one day creating my own dumper for the Sega Megadrive system. Well today is that day!

Ok not exactly today but today is at least the start of it!

In case you can't remember the project here are all the relevant posts from his blog, consolidated into one handy list:

Tuesday 20 August 2013

Internet Camera in a Bird House (1 of ?)

After the Time Lapse Videos of the Garden project I got thinking about how to get round the issue of nothing being visible at night. If you haven't looked at that project the basic issue is that the infared light generated by the camera is reflecting off the glass of the window making it impossible to see outside.

Two solutions instantly came to mind:
  1. Turn the IR on the camera off and flood the garden with infared light from a source already outside.
  2. Move the whole camera outside.
From the two I've decided to go with the 2nd one. The first idea may actually be easier as you can already buy outdoor infared lights and all I'd have to do is connect the power to them and set up some sort of timer to turn them on and night and off during the day. However, I can't really justify the expense on what is just a 'for fun' project so I'm really stuck with option 2 regardless.