Samsung R590 Hackingtosh + DSDT file

I’m trying to get Mac OS X to run on my Samsung R590 and I’m not having much luck… I can installed 10.6.3 from my retail disk, using iBoot, and it’s usable – though the ethernet or wireless LAN adapters don’t work, and I have to reboot with iBoot every time.

Although I have no clue what I’m doing, I read that I may need a “DSDT” file – and I couldn’t find one for my laptop – so I set about extracting it and fixing it (well, trying to anyway – I did seem to get rid of the errors and warnings). I tried using it with MultiBeast but it didn’t help or fix anything, but maybe it’s of some use to someone else: SamsungR590.zip.

UPDATE: It seems things work fairly well (after updating to 10.6.6) with my DSDT file and the MultiBeast (3.20) settings below:

SamsungR590 MultiBeast

(The “System Definitions” is set to “Mac Pro” otherwise the nVidia drivers wont install)

Chameleon boots (so you don’t need the “iBoot” disk) and the keyboard and trackpad works (though the trackpad’s detected as a mouse, not a trackpad, so swiping doesn’t work). LAN and Wireless still don’t work, despite having tried multiple kext files and adding a “IONameMatch” to “AppleAirPortBrcm4311.kext/Contents/Info.plist” (see http://www.insanelymac.com/forum/index.php?showtopic=223182 for more info – my R590 has a “pci14e4,4727″ wireless adapter).

You can get sound working by using “VoodooHDA” (here’s the exact version I used: VoodooHDA.kext.zip) – I had to “sudo rm -rf /System/Library/Extensions/AppleHDA.kext” though – and “VoodooBattery” (version I used: VoodooBattery.kext.zip) will show your battery status etc.

Update: It might also be worth keeping an eye on http://wiki.osx86project.org/wiki/index.php/HCL_10.6.6/Portables#R590 – in case anyone else adds to it :/

String to Hex / Hex to String – in Ruby :D

I’m busy converting a project of mine from PHP in to Ruby, and one of the things it needs to be able to do is convert a bunch of hex characters into a string (and vice versa)… which I wasn’t sure how to do, so I hit Google. As it turns out there seem to be several other people who’ve needed to do the same thing, without finding the answer they were looking for, so I got to trying to code my own functions and managed to come up with this:

# hex_to_string("486578546f537472") returns "HexToStr"
def hex_to_string(str)
  returned = ''
  for i in (0..str.length).step(2)
    unless str[i].nil?
      hex_chr = str[i].chr + str[i+1].chr
      returned += hex_chr.hex.chr
    end
  end
  returned
end
# string_to_hex("StrToHex") returns "537472546f486578"
def string_to_hex(str)
  returned = ''
  for i in (0..str.length)
    unless str[i].nil?
      returned += str[i].to_s(16)
    end
  end
  returned
end

I’m still new to Ruby, and don’t really know what I’m doing, so please feel free to make any improvements or suggestions. You can find the latest versions of these functions on github: https://github.com/hypn/HexToString

When I hate being a coder… #2

I just found this gem, in some of our billing code:

$ci = $this->paymentMethod;

$cc['CC_CardType'] = $ci['CC_CardType'];
$cc['CC_Number'] = $ci['CC_Number'];
$cc['CC_ExpMonth'] = $ci['CC_ExpMonth'];
$cc['CC_ExpYear'] = $ci['CC_ExpYear'];
$cc['CC_Name'] = $ci['CC_Name'];
$cc['CC_Street'] = $ci['CC_Street'];
$cc['CC_City'] = $ci['CC_City'];
$cc['CC_State'] = $ci['CC_State'];
$cc['CC_Country'] = $ci['CC_Country'];
$cc['CC_Zip'] = $ci['CC_Zip'];

$p->loadCreditCardPayment($cc, $total, 0);

First it copies A ($this->paymentMethod) to B ($ci), then copies each value of B in to C ($cc), and then passes C to the function. That’s right, 3 copies of the same data, and 14 lines of code. One could also have just passed A to the function, as so:

$p->loadCreditCardPayment($this->paymentMethod, $total, 0);

It’s kinda like pouring a drink that’s already in glass in to another glass, then using a spoon to move the liquid in to a different glass, then drinking from that last glass… why not just drink from the glass it was originally in? o_O

When I hate being a coder…

This is how NOT to comment your code:

#addCreditCard
function addCreditCard(){
… code removed …
//————————————————————————-
#addBankAccount
function addBankAccount(){
… code removed …
//———————————————————–
#deleteCreditCard()
function deleteCreditCard(){
… code removed …
//—————————————————————–
#deleteBankAccount()
function deleteBankAccount(){
… code removed …

Now I totally understand that for doc-generating programs, and certain IDEs, you’re meant to put comments above your functions describing them and the parameters use… but who does this (above)? Are you really so stupid that you need to put the function’s name in a comment above… the function’s name?

You, sir, should not be coding.

Birthday present (painting)

My birthday present from my girlfriend – a commissioned painting by an artist we both like (http://kirstentjie.deviantart.com) painted to the inspiration of “Orbital – Halcyon On and On

(the paint was still a bit wet when this picture was taken, it looks even better in real life :D)

Awesome 8-bit Color Cycling with HTML5

There are some awesome 8-bit (think arcade games) color cycling demos, using HTML 5, over at EffectGames – definitely worth checking out.

(lame GIF animation by me :P)

Some Team Fortress 2 Fun

Looks like I’m getting better at playing Spy ;)

USB Webserver 8.0 is out!


I’ve just gotten word from the creators that USB Webserver 8 is out – long time readers might remember that I released an unofficial hacked up version a little while ago, you should definitely use this official version instead.

USB Webserver 8

This release contains:

  • Php 5.2.13
  • Apache 2.2.15
  • PhpMyAdmin 3.3.1-rc1
  • MySQL 5.1.44

Simon Sinek: How great leaders inspire action

Simon Sinek: How great leaders inspire action  (aka “Why Apple is so successful)

YouTube Preview Image

How to make Mac OS X awesome

I’ve recently started using Mac OS X (Snow Leopard) – having just bought a MacBook – and there are few things about it I found annoying, and some functionality I was missing, so this blog post is an attempt to list the “hacks” I’ve made to get Mac OS X doing what I want it to.

There are plenty of “obvious” customizations (disabling the middle mouse button from showing the dock, changing the default text selection colour, etc) that I’m sure you can figure out on your own. So here goes:

  1. Launchy – I’m not sure what the appeal of “Quicksilver” is, maybe I should give it a try sometime, but I’ve been using Launchy in Windows for ages and can’t live with out it – it’s like “Spotlight”, only much better. If you’re going to use Launchy, you may as well disable Spotlight and save on some processing (it scans all new files and extracts “metadata” for it’s search results).
  2. RightZoom – When I “maximize” a window, I want it maximized… full screen… not to some size Mac OS determines based on how much content there is in the window. This app fixes Mac OS’s “green button” to maximize windows to full screen.
  3. Dock Dodger – Some applications (such as “Launchy”, in my case) display an icon in your dock when they really don’t need to… this app prevents applications from doing this. You can also make these changes to an app manually by following these instructions.
  4. xGestures – A Mac version of “StrokeIt”, which lets you setup “gestures” (basically drawings with your mouse) to do various things from opening applications/sites to controlling iTunes. My main use for it is minimizing, maximizing (see script below) and closing applications – much faster than moving your mouse to the other side of the screen and clicking a button.
  5. “Maximize” script – An Apple Script for maximizing the active window, I use it with xGestures, but it doesn’t seem to work with “RightZoom” (it does a regular “calculated size” maximizing, not fullscreen).
  6. Symlinks – This a console command, in most *nix operating systems including Mac OS X, which allows you to create a link to another file or folder somewhere else on your system. With it you’re able to “redirect” where files are saved – most applications store their settings in a specific location. Using symlinks I have all my applications with saved passwords (eg FireFox and FileZilla) reading and writing their settings to an encrypted TrueCrypt container, which is a really good thing if ever my MacBook gets stolen.
  7. BetterTouchTool – I found this program while looking for a way to enable “window snapping”, which it asks you if you want to enable at the start of the installation, but I must say my windows don’t seem to be doing much snapping. It still has a ton of other useful features, such as Windows 7′s “snapping” a window to quarter/half screen depending where you drag it to, and a bunch of extra touchpad options.
  8. Fixing “Screen Sharing” – While it may appear as simple as ticking this box in “Sharing” (under “System Preferences”), I wasn’t able to connect to my MacBook after doing this and instead got an error saying “Incompatible Version” with my VNC client. The forum post linked to explains how to fix all of that – it’s a bit lengthy, but works. You might need to enable your root account and then “su” (switch to the “root” user – just make sure to “exit” when you’re done) to execute the commands.
  9. ControllerMate – Although I haven’t used this yet, it’s meant to be like AutoHotkey (for Windows, which I’ve used often), which makes it easy to write powerful scripts to automate stuff and control stuff.
  10. scplugin – TortoiseSVN for Mac… doesn’t work quite as well in Snow Leopard as it does in Windows (you have to install a toolbar item) – an essential. In case you’re having problems with a certificate, read this.

I’ll probably update this list on my quest to make using Mac OS X more efficient and enjoyable.

Copyright © 2012 Hypn.za.net

CSS Template By RamblingSoul | WordPress Theme by Theme Lab and Best Hosting.