Paul McGuinness's Facebook Profile

Installing MAME on an iPhone (Quick Guide!)

January 11th, 2010 Paul McGuinness No comments
Rating 4.83 out of 5


This quick guide will explain how to install MAME (Multi Arcade Machine Emulator) onto your Jailbroken iPhone

Ok, before we begin, you need to check that you have the following configured:-

  • iPhone (Jailbroken) with Cydia installed
  • A PC (or Mac) with a SFTP (SSH Secure FTP) client (FileZilla is a nice ‘free’ client)
  • A copy of the ROMs you want to play
  • A fair idea of how to use Cydia, SFTP, SSH etc…

Step 1.

Install Mame4iPhone, simply search on Cydia for ‘Mame’ (from the ZodTTD repository) and it will be the 2nd or 3rd item down the list.

Step 2.

Install “WhatIP” from Cydia (this app will tell you what IP address your iPhone is using)

Step 3.

Go back to the iPhone home screen, and tap on the WhatIP icon. You should see something like this:-

WhatIP

Step 4.

SFTP into your iPhone – The default username / password is “root” and “alpine”  [As a side note, its a good idea to change this!]

Place the ROM’s into the following folder: /var/mobile/Media/ROMs/MAME/roms

Step 5.

Play !!!!

Categories: General Stuff Tags:

VB.NET 2008 – Hint’s and Tip’s (including flicker-free ListViews)

November 19th, 2009 Paul McGuinness No comments
Rating 4.75 out of 5


Hi Avid Reader,

As you probably know by now, I’m a VB programmer. I’ve spent many year using VB6, and am now (under duress) having to migrate to VB.NET.

The purpose of this article is to show you some cool hint’s, tip’s, trick’s and bug-fixes that I’ve found along the way. I’ll be updating this Blog entry as time moves forward, so stay tuned to this one!

List View Flickers

This is just plain stupid. The standard ListView control (as part of the Common Control Library 6) invalidates the entire control each time a new item is added – e.g. lvInfo.Items.Add(“Hello World”)

This can be fixed using a little bit of Windows ‘SendMessage’ tweaking;

' Place at the top of the Form Class

Declare Auto Function SendMessage Lib "user32.dll" (ByVal hWnd As IntPtr, _
 ByVal msg As Integer, _
 ByVal wParam As IntPtr, _
 ByVal lParam As IntPtr) As IntPtr

 Const LVM_FIRST = &H1000
 Const LVM_SETEXTENDEDLISTVIEWSTYLE = (LVM_FIRST + 54)
 Const LVM_GETEXTENDEDLISTVIEWSTYLE = (LVM_FIRST + 55)
 Const LVS_EX_DOUBLEBUFFER = &H10000
 Const LVS_EX_BORDERSELECT = &H8000
' Place in the Form_Load event

 Dim styles As Long
 styles = SendMessage(lvInfo.Handle, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0&)
 styles = styles Or LVS_EX_DOUBLEBUFFER Or LVS_EX_BORDERSELECT
 Call SendMessage(lvInfo.Handle, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, styles)

This fix gives you a nice, smooth update each time.

The next fix is “How to keep the last item entered into a ListView visible…”

lv = myFormName.lvInfo.Items.Add("My Information to Show")
lv.EnsureVisible()

Simple, but effective!

Getting the App.Path in VB.NET

Another simple one (when you know it!) :-

Dim AppPath As String = Application.StartupPath()

Reading and Writing INI Files

Microsoft wants us to abandon INI Files and use XML instead. Whilst this may seem logical, its not always the simplest way of doing something (which sums VB.NET up really….) – This Class will give you a simple way of reading and writing INI Files.

Public Class IniFile
 ' API functions
 Private Declare Ansi Function GetPrivateProfileString _
 Lib "kernel32.dll" Alias "GetPrivateProfileStringA" _
 (ByVal lpApplicationName As String, _
 ByVal lpKeyName As String, ByVal lpDefault As String, _
 ByVal lpReturnedString As System.Text.StringBuilder, _
 ByVal nSize As Integer, ByVal lpFileName As String) _
 As Integer
 Private Declare Ansi Function WritePrivateProfileString _
 Lib "kernel32.dll" Alias "WritePrivateProfileStringA" _
 (ByVal lpApplicationName As String, _
 ByVal lpKeyName As String, ByVal lpString As String, _
 ByVal lpFileName As String) As Integer
 Private Declare Ansi Function GetPrivateProfileInt _
 Lib "kernel32.dll" Alias "GetPrivateProfileIntA" _
 (ByVal lpApplicationName As String, _
 ByVal lpKeyName As String, ByVal nDefault As Integer, _
 ByVal lpFileName As String) As Integer
 Private Declare Ansi Function FlushPrivateProfileString _
 Lib "kernel32.dll" Alias "WritePrivateProfileStringA" _
 (ByVal lpApplicationName As Integer, _
 ByVal lpKeyName As Integer, ByVal lpString As Integer, _
 ByVal lpFileName As String) As Integer
 Dim strFilename As String

 ' Constructor, accepting a filename
 Public Sub New(ByVal Filename As String)
 strFilename = Filename
 End Sub

 ' Read-only filename property
 ReadOnly Property FileName() As String
 Get
 Return strFilename
 End Get
 End Property

 Public Function GetString(ByVal Section As String, _
 ByVal Key As String, ByVal [Default] As String) As String
 ' Returns a string from your INI file
 Dim intCharCount As Integer
 Dim objResult As New System.Text.StringBuilder(256)
 intCharCount = GetPrivateProfileString(Section, Key, _
 [Default], objResult, objResult.Capacity, strFilename)
 If intCharCount > 0 Then GetString = _
 Left(objResult.ToString, intCharCount)
 End Function

 Public Function GetInteger(ByVal Section As String, _
 ByVal Key As String, ByVal [Default] As Integer) As Integer
 ' Returns an integer from your INI file
 Return GetPrivateProfileInt(Section, Key, _
 [Default], strFilename)
 End Function

 Public Sub WriteString(ByVal Section As String, _
 ByVal Key As String, ByVal Value As String)
 ' Writes a string to your INI file
 WritePrivateProfileString(Section, Key, Value, strFilename)
 Flush()
 End Sub

 Public Sub WriteInteger(ByVal Section As String, _
 ByVal Key As String, ByVal Value As Integer)
 ' Writes an integer to your INI file
 WriteString(Section, Key, CStr(Value))
 Flush()
 End Sub

 Private Sub Flush()
 ' Stores all the cached changes to your INI file
 FlushPrivateProfileString(0, 0, 0, strFilename)
 End Sub

 End Class

 

This can be used in the following manner:-

 Dim settings As New IniFile(Application.StartupPath & "\My_INI_File.ini")
 gCustName = settings.GetString("General", "CustName", "Not Registered")
 gCustSerial = settings.GetString("General", "CustSerial", "")
Categories: General Stuff Tags:

How to make Sloe Gin – The ‘Dengie’ Way!

August 23rd, 2009 Paul McGuinness No comments
Rating 4.00 out of 5


Welcome again avid reader,

Due to a very wet spring followed by a wet July, and a fantastic August, we have an abundant crop of Sloes this year. Sloes are the fruit of the Blackthorn shrubs, and when ready to pick, show a white-ish blush on the otherwise deep purple berries.

Sloe Berries

These plum-like berries are very bitter, and are only used in Jams and preserves or as a core ingredient in Sloe Gin.

Traditionally you should wait for the first frost, or even place them in the freezer overnight, but after experimentation over the last couple of years I can categorically state that this seems to have no effect whatsoever, and just appears to be folklore!

My ‘Dengie’ recipe is as follows;

  • 1 x empty screw-top wine bottle (or bottle with a cork that removes easy… e.g. Port, Sherry or Pineau)
  • Fresh Sloes
  • 1 x Small Wine Glass of Sugar (normal granulated is fine)

Method:-

  • Clean and rinse the target bottle.
  • 1/2 fill with Gin (use a half-decent Gin for best results)
  • Tip the wine glass of sugar into the bottle
  • Wash the Sloes
  • Pierce the Sloes with a fork (no… a ‘Silver’ one is not mandatory – despite folklore!) and place in bottle till the Gin and Sloes reach halfway up the neck of the bottle.

Note: If the Gin reaches the neck before the Sloes, tip some away (into the next bottle obviously!) as the Sloes and Gin should reach the neck of the bottle at the same time.

Ongoing Care:

  • Shake the bottles vigorously once a day for the first week (the sugar will settle, so try to get it evenly mixed)
  • After Week 1, shake weekly
  • Wait for at least 3 months then decant the Gin (minus the berries and any sediment – I use a fine mesh sieve lined with muslin cloth) into fresh bottles

Sloe Gin is best served as a sipping aperitif in shot-glasses, or over ice for a longer drink (or carried in a hip-flask for those cold winter mornings!).

I’m told that the boozy-Sloes can be used to make an interesting Jam/Jelly afterwards, but I haven’t tried this myself yet!

Categories: General Stuff Tags:

Simple guide to Jailbreak iPhone 3.0 on Windows

June 23rd, 2009 Paul McGuinness 1 comment
Rating 4.00 out of 5


Hi All,iphone

After much messing around, I have jailbroken my iPhone 3G that I updated to 3.0 firmware on Friday.

Please note that if you want to copy my instructions and do this to your own phone YOU DO SO AT YOUR OWN RISK.

NOTE: These instructions explain how to JAILBREAK an iPhone 3G NOT an iPhone 3GS.

“Jailbreak” means you can run ‘unauthorised’ applications that are not in the Apple Store – It does NOT mean ‘UNLOCK’  for use on other mobile networks. Please don’t ask me how to do that.

Ok, first of all, go to http://redsn0w.com, follow the link and then download the 0.7.2 redsnow jailbreak app and unzip to a folder on your desktop.

Plug in your iPhone to the PC and ensure that you switch it OFF after you connect the USB cable.

Next run the redsn0w.exe file.

Browse to find your ipsw firmware file. This will be located in:-

 c:\Document and Settings\<your login name>\applications data\
     Apple Computer\iTunes\iPhone Software Update. 

I suggest you back up the ipsw file before you begin.

Click “Next” and ensure that you ONLY INSTALL CYDIA – If you install ICY, most of the dependencies get screwed up and you can’t download anything in Cydia.

Next follow the on-screen instructions carefully, which are:-

  1. Hold down the power button till the Apple logo appears
  2. Immediately hold down the Home button (whilst still holding down the power button) for about another 8 secs.
  3. Release the power button, but keep the home held down for another 20 secs

During this process, the PC may install a new USB driver. If things seem to fail because of this, just start the process from the beginning.

Once the Jailbreak process starts DO NOT DISCONNECT THE CABLE OR INTERRUPT IT!

The whole thing takes about 5 mins.

On completion, go into Cydia and search for OpenSSH and install that, then install WhatIP – Once both are installed, run WhatIP to get the IP address of your iPhone and then use something like PuTTY to SSH into your phone to test it.

The username is “root” and the password is “alpine” (these are the default), if you have been successful, you should see something like this:-

ssh

Now you may ask yourself “What are the advantages” of this?

Well, some of the ‘cute’ things that Apple have now released in their 3.0 update were previously available via Cydia.

Along with these things (like Cut’n'paste, video recording etc), there are a lot of apps that Apple simply did not want users to have access to.

Fundimentally the iPhone is a Linux phone based on a Debian distribution, and because of this there are a whole raft of applets and tools that are being ported to work on this phone.

Here are some examples of the Cydia app’s that I’ve installed and use:-

“Make it Mine” - This overrides the carrier name to anything you want.iPhone_MiM

“WhatIP” (mentioned above) – Shows the IP address of your iPhone

“CompactTV” – Watch or Download South Park, Family Guy, Simpsons and American Dad

Categories: General Stuff Tags:

iPhone 3.0 Data Tethering on O2 (without the £14.68 a month!)

June 18th, 2009 Paul McGuinness No comments
Rating 4.75 out of 5


Hi All,

I’ve just upgraded my iPhone to 3.0 and was alarmed to see that to utilise Internet Tethering (which frankly, would be a ‘last resort’), I would need to pay O2 an additioanl £14.68 a month on top of my existing data connection!

Fear not humble iPhone users, there is a solution out there. Browse to this URL from Safari on the iPhone:-

http://www.iphone-notes.de/mobileconfig/

Select your country and carrier,  and download the Tethering profile (ignore the warning message)

Note: This doesn’t mean you get data for ‘free’, but if you already have a ‘data package’ it should be included within that, rather than paying a separate ‘Tethering’ charge (like O2 are trying to get you to do!)

When you go back into Settings, General, Network you will now see that the Internet Tethering is ‘Off‘ (as opposed to ’set up’)

If you now tap on the “Internet Tethering“, you get a new screen that allows you to enable it

Just as a footnote – if you are wondering how I captured the screens on an iPhone, simply press the top power button and the home button at the same time, and the current screen is saved to the camera roll.

Categories: Hacking, Modding, iPhone Tags: