Security of the mind

 Security is a very dynamic sort of thing quite often.  It changes a lot over time, but it also often stays the same in many ways.  For the average user out there, they only have the know-how to rely on the OS for all potential security threats.  We all have experience using the internet every single day, but some don't utilize the best security tool on earth...  your own sound judgment. But sound judgment often derives from experience.  From experience comes confidence, and from confidence comes a sound mind.  Confidence should never be cocky though, because that will get you into trouble eventually.

When you consider that Apple hasn't offered a security update for a PowerPC OS since 2009...  we really are on our own with OS X.  But that's okay, because we the users dictate how secure we are through our own habits online.  And I am guilty myself of not having the confidence in some to be their own best security in my past writing here.  I don't know if that ever hurt anyone's confidence back then, but I certainly didn't help it either.  This changes now to a personal policy of encouraging confidence once people are put on the right path.  I'm going to instill confidence rather than fear. 

We notice things much easier when of a calm mind, and awareness is very important with security.  

So the point here is don't allow the lack of security updates on OS X to ever stop you from using it online.  Look no further than TenFourFox for modern web compatibility and security.  We really owe so much to Cameron Kaiser, because he alone has kept Mac OS PowerPC a viable internet platform.  So let's give him the respect he deserves.

I have been away from PowerPC Linux for a few years now, and need to re familiarize myself with it again, so for the next few months at least, my writing will be Mac OS related, and to me that's a great place to start after a two year hiatus here.

So for the next few months I will be doing a series of writings on OS X PowerPC security in 2020/2021, and how to best protect yourself.  To instill in you what I have to offer in me to keep yourself safe on operating systems that are 11+ years old now.  Only now instead of a Sawtooth, I'm using a G4 mini that dual boots Tiger and Leopard.

You're all going to have hardened ceramic armour shells when I'm done with you!  I hope you all can deal with that! 

WebDAV and Goliath

It's been a few years now since Dropbox ceased support for PowerPC and although there was a community workaround that worked for a while, that too fell by the wayside with ongoing developments at Dropbox.

Folder syncing has never been a specific requirement for myself but having convenient access to a central repository across various machines is always useful - for this I use the WebDAV protocol supported by various online storage providers either via Finder in OSX or with the excellent WebDAV client, Goliath (which I personally find delivers faster file transfers.)

So, after signing up to an online storage provider - one that includes WebDAV access - in OSX Finder go to Go/Connect to Server (or press CMD+k) and enter the provider's WebDAV URL and press Connect. Enter your username and password in the next dialogue and tick box to remember password.

All being well, the remote server will be mounted onto the Desktop and be available to all standard file operations just like any attached storage. For convenience, I make an alias of the mounted drive, move it to Documents and drag to the dock to provide instant access in future.
Note - to prevent .DS_Store files cluttering up your remote drive with this method, run the following in Terminal:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true




The procedure is similar when using Goliath - making a new connection, enter URL, username and password and once connected, go File/Save Connection As to save a WebDAV bookmark that can be launched from the dock if desired.

Of course, the advantage of Goliath is that it's available for OS9 too - it's quite remarkable at this late stage to still have the convenience of online connected storage on such an old OS.



In addition, all these online storage providers have a web interface accessible from anywhere and usually have purpose built mobile apps for Android and iOS - in addition, there's always mobile WebDAV clients too - even my beleaguered Windows Phone 10 powered Lumia 930 can get in on the action with it's WebDAV equipped Total Commander file manager!



WebDAV access is a refreshing change in these twilight days of PowerPC - an online service that spans legacy systems and doesn't tax the CPU in any way.

For those wishing for a more Dropbox like folder syncing facility, with a compatible provider, rsync can be utilised for effective backups but for now WebDAV suits me fine.

These are a few WebDAV compatible providers but there will be more - if anyone has any suggestions please ad in the comments:

Adrive

4Shared

SwissDisk

User Agents And The Art Of Online Camouflage

The user agent is a digital calling card presented by a web browser when it visits a website, identifying it and telling the website what content is best served to that particular web browser - the simplest example being the web browser on a mobile device will receive content more proportionally formatted for a smaller, portrait screen whereas when viewed from a laptop or desktop, the web browser will deliver the fully featured site.
This user agent can also inform the web site what features it should deploy - an old browser will perhaps be incapable of rendering certain content, so that content can be effectively cut out.

This all becomes relevant, especially to us PowerPC users, when it's possible to present an alternative user agent from the one your web browser natively employs - preferably to lessen CPU load and rendering times.

This has been a feature for a while with standard browser options or add-ons that facilitate selecting different user agents but what I shall discuss in this post is site specific user agents ie user agents that present themselves on a site by site basis automatically as you browse.

This legacy feature is present in the PPC spins of ArcticFox and IceWeasel but wasn't present in TenFourFox (which I'll utilise here) until I asked the developer to reintroduce it which he very generously did.

In the TenFourFox preferences, I leave the user agent at it's default setting and add site specific user agents with TextWrangler editing the TenFourFox prefs.js file that resides in

~/Library/Application Support/Firefox/Profiles/go96ey5b.default

the last part of that location string may look different on your machine but will always terminate with .default.

This is an example string added to prefs.js:

user_pref("general.useragent.override.youtube.com", "NokiaN90-1/3.0545.5.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1");

In this instance, browsing to any youtube.com address will invoke the Nokia N90 user agent automatically - presenting a less busy page, free of Youtube's normal CPU hungry "features" and allowing access to the video in 3gp format (more of this in a future post.)

This process is repeated for all the sites you wish to include - a laborious task admittedly but one you'll only have to do once.

User agents can be copied from online sources or you can even use those included within TenFourFox as standard - select one in preferences, then navigate to whatsmyua and copy/paste the string.

Another method for adding site specific user agents is from within the browser itself - navigate to about:config and right click to add a new string. As per the example above, general.useragent.override.youtube.com is added as the preference name, then NokiaN90-1/3.0545.5.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1 is added as the string value.

Generally, I will use either the oldest browser I can reasonably get away with or a Nokia mobile user agent for sites where I don't need all the CPU sapping bells and whistles - not only does this show mercy to your ageing PPC Mac but also loads pages quicker and in some cases is refreshingly distraction free.

Some example screens of TenFourFox pretending to be otherwise....












Drones beware!

 After a two year hiatus, myself and fiftysixk are returning the blog to an active state.  And we hope the other authors will join us.  

 To help liven things up a bit around here, we have brought in the Dronecatcher himself from the MacRumors PowerPC forum.  That's right...  the guy who can make web video play on a toaster has joined the PowerPC Liberation fold, and I for one am thrilled to have him!  Welcome, Wayne!

I've been thinking of a few different ideas for new content, as I just tricked out my G4 mini.  Stay tuned for something to do with that in the near future.

 If any readers have any ideas for new content, then please share them in the comments.

A hopeful real return

It has been quite a while, over two years to more precise. I hope every one is well and healthy, especially during these trying times.

I have moved into a development position at my employer. My on the job focus revolves around ASP.net, C# and querying Microsoft SQL databases. This has been a wonderful opportunity to learn and self teach. I now have enough experience and theory to branch out to other languages. My goal is to pursue Python, Swift, Objective-C and C++. I have a "27inch iMac" and a 2015 MacBook Air for pursuing Swift. I have set up a 17 inch PowerBook G4 for Python, Objective-C and C++ development. I have no idea what software I would like to build yet. I have time to figure that out, there is plenty of learning to do first. I still have several PowerPC Macs besides the 17 inch PowerBook G4 mentioned earlier.

I will share the journey here. I have documented my current process I go through when setting up a Tiger or Leopard install. You can find them at my git repository. Any software I create will also be hosted there.

I know it has been a while. It is good to be back with all of you. Take care!

Debian PPC Status Update


Earlier this month, the migration of the Debian PPC port from Debian's main archive to the Debian ports archive was completed. The DSAs' shut down of the powerpc buildds on the main archive was a result of the PPC port no longer being a release architecture. With this change, also comes the need to update one's sources.list file. Also keep in mind that if you want to continue running Debian on your PPC hardware and have the latest updates and security fixes, you'll need to be running unstable (a.k.a Sid) on your systems. As frightening as that sounds, running unstable has actually been pretty stable for me since I made the move around 7 months ago.

However, before making the switch, you'll want to install the Debian Ports archive keyring package first, otherwise you'll receive errors about missing public keys for the Debian Ports mirrors (such as ftp.ports.debian.org) when attempting to run apt update. In a small and condensed nutshell, this package provides the public keys needed to verify the signatures on the packages available from the Debian ports mirrors that are digitally signed with the corresponding private keys. See here for a bit more information on Debian's keyrings. To install, run the following:
apt install debian-ports-archive-keyring

Here is what I currently have in my /etc/apt/sources.list file. Feel free to use this as a solid starting point and adapt from there to best fit your needs. Also bear in mind that changes to this file requires sudo privileges.

# Binary Default
deb http://ftp.ports.debian.org/debian-ports/ unstable main 
deb http://ftp.ports.debian.org/debian-ports/ unreleased main 

# Package Source deb-src http://ftp.debian.org/debian/ unstable main

# Non-free firmware deb [arch=all] http://ftp.debian.org/debian/ unstable main contrib non-free

The first two lines provide access to the PPC or PPC64 Debian package binaries (with what few PPC64 binaries exist) for both unstable and unreleased. The package source section allows me to still download a package's source so I could tweak, build and/or install from scratch. Lastly, the non-free firmware entry allows me to still search and download packages from Debian's main archives that are compatible with all architectures (for example: linux-firmware-nonfree). This is especially useful for downloading Nvidia and AMD/Radeon firmware for your graphics card.

For more possible sources.list configurations for your PPC machines, see this mailing list post from John Paul Glaubitz who is basically spearheading a large part of this effort by himself. You have more options to choose from than what I've chosen to include in my own sources.list.

Again, thankfully him and others are willing to keep the port alive for the Debian distribution via the Debian Ports project. Although the chances of PPC ever being re-introduced as a first class release architecture are slim to none, I'm encouraged by the fact that we can still run the latest and greatest with a majority of the packages that are available for Debian.

Of course, there are an infinite numbers of ways you can help contribute to the Debian Ports project including:

  • Simply installing and running Debian on your PPC and PPC64 machines
  • Submitting bug reports
  • Being active on the Debian PPC as well as other Debian ports mailing lists
  • Submitting patches for any PPC and PPC64 bugs
  • Hosting another mirror for the Debian Ports project

One of the major projects for the PPC and PPC64 ports is migrating the architectures away from the no longer maintained Yaboot (last updated in 2011!) bootloader over to Grub. Any help you can provide in this regard would be much appreciated. If you need the latest installer ISO for PPC or PPC64, you can find those here.

Are you still using Debian on your PPC or PPC64 machines? It's not too late to continue doing so or get started. While you're at it, load up Debian on machines running other architectures such as m68k, hppa, etc. Let's keep this port and others alive for the foreseeable future. I'm sure we're to learn a thing or two along the way.

Back with a surprise


Hello everyone. I hope you have all been well. My apologies for falling off of the face of the earth. It is wild how time flies by. Enough about that though, it is time for the surprise.



There will be more details and plans shortly. It has already been quirky but hey, it is a G5 after all.

It is good to be back.

Why I finally ride the SSD train


For the longest time...  I was always against using SSD's, as reliability had been an issue for the first several years they were on the market.  Now however, I have discovered the Samsung 850 EVO series of 2.5" SSD's, and damn are they amazing.  I have one in my Sawtooth, and one in my late 2009 Mac mini.  The performance and reliability is amazing all-round.

As my Sawtooth relies on a PCI-M slot powered SATA 1 controller, I am limited to around 80MB/sec read and write, but the latency is incredibly good.  On my Intel mini, with SATA 2, I get sustained speeds of 270MB/sec read and 210MB/sec write.  It's also the most reliable boot drive I have ever used.  More on all this later.

I know this place has seemed dead in the last year or so, but I can assure you it's not.  There is still plenty of hits every day here, and I am starting to use my PowerPC systems more lately.  Also, I recently picked up a 1.5GHz 12" PowerBook G4 for next to nothing.  What a great machine.

I still have five PowerPC computers, so new content will come, and hopefully me posting will inspire the other authors.  *wink wink*  *nudge nudge*

Current state of Linux on PowerPC


I am sure most you have heard that Debian has dropped PowerPC as a release architecture.  If anyone is interested in the reading the meeting notes where it was discussed it can be found here. Basically it came down to lack of support. According to the Debian team there were no porters for PowerPC to maintain it as a release architecture. There is also the issue of outstanding bugs. An example is webkit2 is broken under PowerPC and it does not look like it is going to be fixed. The last version of firefox that works under PowerPC is 47. Yaboot has issues as well. In testing and sid you need to create a separate boot partition with ext2 in order for the kernel to load.

PowerPC will still be available in sid. There are some architectures that were once release that are only available there. However this does make the future of bleak. Already this decision is making an impact. The Ubuntu community is already considering dropping PowerPC for Lubuntu and Ubuntu-MATE. If you want to watch the hangout meeting where this is discussed you can see it here.

So where does that leave us who want to keep our PowerPC machines running a modern secure operating system? For G3, G4, and G5 machines there is the option of Gentoo. The learning curve is steep. However I have not heard discussions of dropping PowerPC. If you have a G5 machine then you also have the options of Fedora, and openSUSE. There is still an attempt to save PowerPC in Debain. The powerpc-notebook project is trying to get people together to help in testing and fixing bugs you can them on this email. You can also get involved in the debain-powerpc mailing list and #debian-ppc IRC channel.

Finally there are the BSDs. I prefer OpenBSD. It is pretty straightforward to get installed and it has the most binary packages for PowerPC. The one biggest drawback I have found is browser support. However sound and video playback work really well.

Please share your thoughts.

Ping


Just a quick note to let you all know we're still alive.  Content will come as time allows.

Though we are a team of writers, each of us is also our own satellite - since we each have our own orbits in life.  The point is that we write when time allows, which means that when we do post something, you know we mean it.

For the love of Mutt!


I have been trying to see how much I can get done just using the terminal. I have my Debian partition on my PowerBook G4 running Awesome. It is a very lightweight tiling window manager. It does take some practice getting use to but once you have it set up, navigating around is not hard. One tool that I have just come to love is the mutt email client.

I have found very few lightwieght email clients that are really good. Slypheed comes the closest at least in my experience. Thunderbird can be really resource intensive, especially if you are processing a lot of email. This is where the power of mutt comes in. It is simply fast. I can read, reply, delete, and save messages much faster than a gui mail client. This means less of a load on my PowerBook. It also has gpg support so you can sign and encrypt your messages if needed. It really customizable, all your setting are on a config file. What I would like to do is give a walk through on how I have mutt configured and suggest some additional plugins that will enhance the experience.

Install

If you do not have mutt installed in your system it is fairly simple.

apt-get install mutt mutt-patched

Set up and Configure

The package mutt will install the base application. The package mutt-patched install an add-on that allows you to have a sidebar for your folders. Once these install you will want to create a directory named .mutt. Here is where you will store your config files and directories. You can do most of this in one command.
mkdir -pv .mutt/{cache,certificates}

If you look in the /usr/share/doc/mutt/examples directory you will see some sample configuration files. The only one you really need to copy to .mutt/ is the gpg.rc file.

Now it is time to make our muttrc configuration file. I will be working under the assumption that gmail will be where the email is hosted.

The first thing you will want to do set up your credentials for imap and smtp. The imap credentials is what pulls down your emails and folders, whereas the smtp account allows mail to be sent through your provider's email system. Below is an example.

set realname = 'your name'
set from = 'your email'
set use_from = 'yes'
set envelope_from ='yes'
set imap_user = 'your gmail account'
set imap_pass = 'password'
set editor = vim
#smtp
set smtp_url = 'smtp://your email account'
set smtp_pass = 'your password'
set ssl_starttls = yes
set ssl_force_tls = yes

I would strongly recommend that if you are using gmail to enable 2-step authentication and application specific passwords. The next thing you might want to do is define your remote folders specifically you inbox, drafts, and trash.

# Folders
# REMOTE GMAIL FOLDERS
set folder = 'imaps://imap.gmail.com:993'
set spoolfile = '+INBOX'
set postponed ='+[Gmail]/Drafts'
set trash = '+[Gmail]/Trash'

When you want to save a draft in mutt, it will ask if you want to postpone it. Mutt will then save to where you defined in the code above. Also it would be a good idea to define local cache as well. Below is an example.

# Local cache
set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates

The next part is opitional and only needed if you want the sidebar and installed the mutt-patched package. If you did not you can still access your gmail folders by hitting 'c' then '?'. Below is what you will need to have the sidebar.

# Mailboxes to show in the sidebar.
mailboxes ="INBOX" ='[Gmail]/Drafts' ='[Gmail]/Sent Mail' ='label'
# Sidebar Patch --------------------------------------
set sidebar_delim = '│'
set sidebar_visible = yes
#set sidebar_width = 24
set sidebar_shortpath = yes
#Shortcuts
bind index CP sidebar-prev
bind index CN sidebar-next
bind index CO sidebar-open
macro index b 'toggle sidebar_visible'
macro pager b 'toggle sidebar_visible'
bind index B bounce-message

The first section defines the folders that will go into the sidebar, which gmail calls labels. Sublabels can also be added by using ='label/sublabel'. The second portion defines the look of the sidebar and the last portion defines the navigation shortcuts. Finally to enable gpg support do the following.

# GNUPG Config
source /home/user/.mutt/gpg.rc
set pgp_autosign = yes
# set pgp_replysignencrypt = yes
# set pgp_veryfy_sig = yes
set pgp_sign_as = gpg pub key

This will give a basic mutt interface with sidebar and gpg enabled. Now I want to share two addons that will really help enhance your experience in mutt.

goobook

Goobook is a simple utility that allows you to manage you gmail contacts from inside mutt. When it is time to compose a message just hit tab in the 'to:' field or just the begining of the name you want and hit tab. Goobook will present you a list of email addresses to choose from. The install of the package is pretty simple.

apt-get install goobook

Then create a .goobookrc file and add the following.

[default]
email: gmail account
password: password

Then run the command goobook authenticate to have gmail verify the tool has rights to manage you contacts. After you have authorized goobook then add the following to the muttrc file.

# Address book using goobook
set query_command="goobook query %s"
macro index,pager a "goobook add" "add sender to google contacts"
bind editor complete-query

urlview

This tool gives you the ability to open urls in messages with an external browser (ie luakit or w3m). The install is the same as the others.

apt-get install urlview

The config file is .urlview. Below is my setup.

#
# Sample urlview(1) configuration file
#

# regular expression to use to match URLs
REGEXP (((http|https|ftp|gopher)|mailto):(//)?[^ <>"\t]*|(www|ftp)[0-9]?\.[-a-z0-9.]+)[^ .,;\t\n\r<">\):]?[^, <>"\t]*[^ .,;\t\n\r<">\):]

# command to invoke for selected URL
# COMMAND /etc/urlview/url_handler.sh
COMMAND luakit %s

# set to yes to enable menu wrapping
#WRAP Yes

The key portion is here COMMAND luakit %s. Luakit can be replaced with any browser desired. Finally just add the following section to the muttrc file.

# View URLs inside Mutt
macro index \cb "|urlview\n"
macro pager \cb "|urlview\n"

When a message is opened hit CTRL+b and you will be given a list of urls to open. Just select one and the browser will open.

I hope this tutorial is helpful. I have my entire muttrc file hosted on github if anyone wants to see what I have set up. If you are for looking a fast flexable email client that will not slow down your PowerPC machine then I would seriously consider giving mutt a try.

Looming on the horizon


This is likely at least 3-4 years away, but h.264 is on its way out, now that h.265 (HEVC) has been adopted by more and more people.  Just as XviD was dropped by most in 2012, the same fate is inevitable for h.264 within a few years.


There are two key issues that keep h.265 off PowerPC:

1. Playback - there are currently no available playback applications capable of playing the h.265 codec that would work on Mac OS PowerPC.  VLC started supporting it in version 2.1.12, but this is irrelevant, since most h.265 is 2160p, and out of the range of even a quad G5.  There is some 720p h.265 floating around that a quad could likely play if there was a playback option.

2. Encoding - and this is the bigger need, as there are also no Mac OS PowerPC encoding software capable of reading h.265 to transcode it to something else.  Since most PowerPC hardware wouldn't be able to play most h.265 anyway, the best need to fill for us is to get an encoding app on PowerPC that can transcode h.265 to h.264 or XviD/DivX.


So we need a Mac developer to port a newer version of Handbrake (or any other equally capable encoder) to Tiger and Leopard PowerPC.

There is no point in wasting time on a player, as I already mentioned, since 90% of these files will not play on even a quad G5.

Even a Linux solution would work, but one for Mac OS would be a much broader brush stroke. 

I wanted to bring this up long before it became a dire need.

Thoughts?

CorePlayer details


I have received numerous questions regarding the method of the CorePlayer crack. Now I would like to briefly describe the process.

PPC Reverse engineering on Mac OS can be an easy process if we know how to do it. There are several debugging and disassembler tools available for Mac OS that can be used for such purposes.  In this case I only used OTX v.16b disassembler and a simple hex editor 0xEd.

For me the easiest way is to look into the code itself produced by OTX. It is a simple GUI application and produces a text file of the application that we want to disassemble. The CorePlayer binary itself is only 5 MB but the text output produced by OTX is nearly 21 MB.

A part of the output looks like this:

  +188    0006e23c  409e0064    bne         cr7,0x6e2a0
  +192    0006e240  813f0000    lwz         r9,0x0(r31)
  +196    0006e244  a161003e    lhz         r11,0x3e(r1)
  +200    0006e248  80490000    lwz         r2,0x0(r9)
  +204    0006e24c  a0020074    lhz         r0,0x74(r2)
  +208    0006e250  7f8b0000    cmpw     cr7,r11,r0
  +212    0006e254  40be004c    bne+         cr7,0x6e2a0
  +216    0006e258  a0010040    lhz         r0,0x40(r1)
  +220    0006e25c  2f800001     cmpwi     cr7,r0,0x1
  +224    0006e260  40be0040    bne+         cr7,0x6e2a0
  +228    0006e264  80010044    lwz         r0,0x44(r1)
  +232    0006e268  80410038    lwz         r2,0x38(r1)
  +236    0006e26c  7f801000     cmpw     cr7,r0,r2
  +240    0006e270  419e0030    beq         cr7,0x6e2a0
  +244    0006e274  a0010042    lhz         r0,0x42(r1)
  +248    0006e278  805f00dc     lwz         r2,0xdc(r31)
  +252    0006e27c  5409073e    rlwinm     r9,r0,0,28,31
  +256    0006e280  7f824800    cmpw     cr7,r2,r9
  +260    0006e284  419e0034    beq         cr7,0x6e2b8
  +264    0006e288  3802ffff       addi         r0,r2,0xffff
  +268    0006e28c  2b800002    cmplwi     cr7,r0,0x2
  +272    0006e290  419d0010    bgt         cr7,0x6e2a0
  +276    0006e294  3809ffff       addi         r0,r9,0xffff
  +280    0006e298  2b800002    cmplwi     cr7,r0,0x2

Each line is one operation in the code. I do not want to go into details now of assembly coding. There are dozens of good sites dealing with programming.

So a very plain explanation of a line:

+240        0006e270  419e0030    beq         cr7,0x6e2a0

+240                               reference line number within a program block
0006e270                        overall line number
419e0030                        machine hex code
beq    cr7,0x6e2a0          assembly code


The registration of CorePlayer is linked to the unique Mac serial number of a particular machine where the player is installed. 

In the output of OTX we have to find the appropriate places where the software checks the registration status and decides whether it will run or not. CorePlayer uses a 3 level verification process:

1. is there a valid serial number entered and stored in the Users/user/.CorePlayer/config.xml file,
2. is there a valid user based on the Mac serial number and CorePlayer serial number to run the program and start the GUI,
3. is there a valid user based on the Mac serial number and CorePlayer serial number to start video playback.

As I had the valid CorePlayer serial numbers from the start I only had to find the places in the code where the Mac and CorePlayer serial number checks were executed. This is the hardest part but if someone has some experience in assembly language then it is relatively easy to find these places in the code. In this case for me the starting point was the place where the registration dialog is called:

 +1176    000139b0  7f801000    cmpw     cr7,r0,r2
 +1180    000139b4  409e0030    bne         cr7,0x139e4
 +1184    000139b8  a001005a    lhz         r0,0x5a(r1)
 +1188    000139bc  805d00dc    lwz         r2,0xdc(r29)
 +1192    000139c0  5409073e    rlwinm     r9,r0,0,28,31
 +1196    000139c4  7f824800    cmpw     cr7,r2,r9
 +1200    000139c8  419e00c0    beq         cr7,0x13a88
 +1204    000139cc  3802ffff       addi     r0,r2,0xffff
 +1208    000139d0  2b800002    cmplwi     cr7,r0,0x2
 +1212    000139d4  419d0010    bgt         cr7,0x139e4
 +1216    000139d8  3809ffff       addi     r0,r9,0xffff
 +1220    000139dc  2b800002    cmplwi     cr7,r0,0x2
 +1224    000139e0  409d00a8    ble         cr7,0x13a88
 +1228    000139e4  807e0044    lwz         r3,0x44(r30)
 +1232    000139e8  3ca05549    lis         r5,0x5549
 +1236    000139ec  3c80001f     lis         r4,0x1f
 +1240    000139f0  38c00000     li         r6,0x0
 +1244    000139f4  38845f94     addi     r4,r4,0x5f94      serialdialog
 +1248    000139f8  60a54744     ori         r5,r5,0x4744      'UIGD'
 +1252    000139fc  481556e5     bl         0x1690e0
 +1256    00013a00  7c7f1b79     or.         r31,r3,r3
 +1260    00013a04  4082001c    bne         0x13a20
 +1264    00013a08  48000068    b         0x13a70
 +1268    00013a0c  7fc3f378      or         r3,r30,r30
 +1272    00013a10  38800000    li         r4,0x0
 +1276    00013a14  38a0020c    li         r5,0x20c
 +1280    00013a18  4bfff879      bl         0x13290
 +1284    00013a1c  4800006c    b         0x13a88
 +1288    00013a20  3c400001    lis         r2,0x1
 +1292    00013a24  93c10058    stw         r30,0x58(r1)
 +1296    00013a28  38800217    li         r4,0x217
 +1300    00013a2c  38a10054    addi     r5,r1,0x54
 +1304    00013a30  38423290    addi     r2,r2,0x3290

If we do not want to call the registration dialog then we have to tell the program to jump over the registration call. So the actual place that we have to alter is before the dialog call:

+1180    000139b4  409e0030    bne         cr7,0x139e4

I have found 6 places where these or very similar verifications were executed and called. The basic pattern of the code looks like this:

  +240    0006e270  409e0030    bne         cr7,0x6e2a0
  +244    0006e274  a0010042    lhz         r0,0x42(r1)
  +248    0006e278  805f00dc     lwz         r2,0xdc(r31)
  +252    0006e27c  5409073e    rlwinm     r9,r0,0,28,31
  +256    0006e280  7f824800    cmpw     cr7,r2,r9

The easiest way is to alter the program flow and negate the relevant operations. In this way it skips the appropriate parts and will accept any Mac serial numbers and a valid CorePlayer serial number. In order to negate the operation we have to change the  line:

0006e270 409e0030        bne         cr7,0x6e2a0

into

0006e270 419e0030        beq         cr7,0x6e2a0


We have to use the hex editor to change the code at 6 different places in the binary and save the altered code. After this entering a valid serial will produce a fully working CorePlayer.

If someone wants to dive deeply into this topic I would recommend starting with this site: https://reverse.put.as/

CorePlayer file association icons


Now that CorePlayer has been in the wild for a few weeks, I'm sure you have noticed that its file association icon is the default blank one, which has no personality at all.

Well, an app this efficient deserves to have better than a blank file association icon, and thanks to Adam Albrec, the maker of PPC Media Center, it now has two custom icons.



 


   




Here is the readme file contents, for your convenience.  You need the first icon .dmg for the .plist file, even if only using the second.  If only interested in the first one, then you don't need the second.

Copy the cpDocument.icns file to the Resources folder within the CorePlayer package contents.

Then copy the new Info.plist to the Contents folder within CorePlayer.

Next copy CorePlayer to a new location and then back to re-initialize it.

When you restart, or relaunch Finder, all documents assigned to use CorePlayer will now have the custom icon.

If you wish to make your own icon, feel free and just give it the same file name as above and install as directed.


Feel free to leave any comments for Adam here.

Thanks again, Adam!

New admin


In the spirit of this blog always growing and staying around, I have decided we needed another admin here, and Mark (fiftysixk) is the natural choice as the longest member of the team after me, and the guy works for freaking NASA.  Do I really need to say more?  I didn't think so...

Life is a delicate thing, and if anything ever happened to me I want another admin around to take care of the place.  Mark is that guy.

Mark is at the exact same level of power and control that I am, and by Blogger's guidelines and rules, this also makes him a part-owner of the blog now.  He deserves it for his dedication.

So please join me in welcoming the new admin to his new role here.

CorePlayer and the guy who proved me wrong, so I asked him to join us


As I'm sure many of you know already, CorePlayer was cracked by a man named Lotvai, and after me claiming this was "impossible".  You see...  I was basing this on the basis of code, and how it is virtually impossible to truly alter closed software.  This, added with the fact that I'm certainly no Mac developer, and never have been, caused me to make a judgement on fundamental fact, rather than outside the box thinking.

I was wrong... period, and I own that.  I am a BSD coder, always have been, and have never had enough motivation to ever do anything with Mac software, and in turn have deprived myself of a truly vast understanding of the limits.  Lotvai's Mac OS kung-fu is the best I have ever seen, and he deserves credit for being so gifted.

Lotvai is so gifted in fact, that I offered him an author account here, and he accepted.  So the guy that proved me wrong and brought all of you CorePlayer is now part of this blog, and I am honoured to have him here.

He explained to me how it was done, and while I will let him explain it in his first post here, I just want to say it was extremely creative.  I wouldn't call it simple, certainly not, but i bet it's a lot simpler than many would have thought; like me.

So please join me in welcoming Lotvai, then sit back and heed his CorePlayer slaying words.  He is officially PowerPC royalty now.

Parts exchange is up


A very early and primitive version of the parts exchange is now online here.

This is something we will be making up as we go.  As of now there are few guidelines, because we need to figure out what they should be.

Feel free to leave feedback here, or on the PowerPC Parts Exchange page.

Happy exchanging!

G5: Nouveau & 3D Acceleration


UPDATE 1: Updated glxgears output after running it not synced to vsync

As many of our readers may already be aware, both 2D and now 3D acceleration are working with the nouveau driver on PPC!  However, with a couple of hopefully temporary caveats that should hopefully disappear over time.  The caveats include the following:

1. You can only try/test this out by upgrading your system to Stretch (the next stable release of Debian still in development/testing) or Sid ( forever unstable). Eventually Stretch will become the next stable release (sometime early 2017) and by then let us hope that whatever version of mesa and its related libraries  included in the release still has working 3D and 2D acceleration with nouveau.

You could also try to compile the latest versions yourself using the instructions here, but keep in mind this route is difficult even for more experienced Linux users.

2. As exciting as this news is, the current performance is still lacking, but with regards to G5 machines, this should also be improved with the move to 64 KB page sizes in the future among many other things relevant to just nouveau and PPC development in general. Sadly, still no update on the 64 KB page size mapping bug yet either, but I am trying to keep in touch with the developers.

As first reported, by again, Peter Saisanas, in a comment from my last post, it appears the fix was included in Mesa's 11.0.3 release back in November.  He has also posted about his testing on the Debian PPC mailing list here.  One of the included fixes that may have resolved the remaining issues with 3D acceleration with nouveau on PPC in that release by Mesa developer Ilia Mirkin was "nv30: always go through translate module on big-endian."  That is the current theory anyways as looking through the rest of the fixes over that same release as well other recent releases, this one appears to be the most relevant.

I figured I would conduct my own testing as well by first upgrading to Stretch from Jessie (8.3) to Stretch.  I skipped backing up my current install as nothing on it is all that crucial. Most of my crucial files and configurations live on my G4 QS at the current time.  Since Stretch or Sid can be (is) unstable at times, you may not want to use it on a production system.  Choose your set up wisely.  I plan to eventually either partition my current SSD to host both Jessie and Stretch on separate dedicated partitions or use a drive in each available drive bay to host each release of Debian (one for testing and one for stable) so I can always fall back to one or the other in case something breaks.

Speaking of instability, there are issues when doing upgrades to or fresh installs of Stretch as the current kernel included with the release is broken on PPC. So you if you want to test this out, I would highly recommend first instaling Jessie and then downloading and installing one of the pre-built kernels available from Peter's Google Drive before doing the upgrade. I opted to use his latest kernel (at the time of this writing) 4.5.0-rc2. Just download the kernel-image deb and install it using the following command:

sudo dpkg -i  linux-image-4.5.0-rc2-powerpc64_2_powerpc.deb

With that out of the way, you will want to update your /etc/yaboot.conf file to either contain a new entry for the newly installed kernel or replace your existing one.

Here is an excerpt from my yaboot.conf file with the new kernel configuration:
image=/vmlinux-4.5.0-rc2-powerpc64
    label=Linux
    read-only
    initrd=/initrd.img-4.5.0-rc2-powerpc64


Save your changes and run the following:
sudo ybin -v

Next, go ahead reboot to the new kernel using whatever label you assigned to it in your yaboot configuration.
 
The kernels he has available work with a wide range of G5 towers and nVidia cards but if you are curious to see what has worked for others up to this point, see this post on the Debian PPC mailing list.

Once that is out of the way, upgrading to Stretch was simple enough as all it requires is editing your /etc/apt/sources.list file by replacing all occurrences of the word Jessie with Stretch.  If you are using vim for your text editing tool you can use the following trick once you have the file opened for editing:

:%s/jessie/stretch/

The %s basically means every occurrence of the string jessie with the string stretch.  Easy enough.  Save your changes run apt-get update and apt-get dist-upgrade per usual. This will update the list of packages from the stretch repositories and start the upgrade to testing.

Once the upgrade is complete, I would recommend rebooting one more time for good measure.  Once logged in, make sure mesa-utils or hardinfo (if you prefer a GUI to view what currently active renderer) is installed. Here is the output from my system:

br0c0l1@TheMaster:~$ glxinfo | grep -i renderer
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: Gallium 0.4 on NV47

As you can see we are using version 0.4 of Gallium on NV47 (my G5 machine's Quadro 4500FX nVidia card) to provide graphics rendering.

Here is the output when running glxgears:

br0c0l1@TheMaster:~$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
1840 frames in 5.0 seconds = 367.913 FPS
1861 frames in 5.0 seconds = 372.069 FPS
1828 frames in 5.0 seconds = 365.374 FPS
1823 frames in 5.0 seconds = 364.437 FPS

So again, not spectacular in terms of performance, but it is definitely a worthy start.  It is comforting and exciting to know we have made it this far. One thing I think I should make clear is that having 3D acceleration does not improve video playback performance as that is already optimized to its fullest with 2D acceleration.  3D acceleration helps considerably though if you are into gaming and OpenGL/WebGl projects.

I cannot thank Peter Saisanas enough for the work he puts into nouvea and PPC and kudos to the nouveau developers for not leaving us PPC users in the dust! 

I encourage you to try this out and report your findings with either 3D acceleration on nouvea and/or Peter's pre-built G5 kernels either here in the comments or on the Debian PowerPC mailing list.

And finally, as I always say, let the rest of us due our due diligence and report bugs!

Parts exchange brainstorm


After getting lots of interest from an earlier post about starting a parts exchange here - it is now time to start figuring out how to set it up best for everyone that desires to potentially use it one day.

Tell me what you would like it to both include and exclude, and any other details you can think of to create an exchange system that is efficient and beneficial to all.

This is for you guys...  all the PowerPC users that need help getting certain parts, whether the reason be geography or lack of money.  Lets make it the best it can be.

One thing I can tell you for sure is that you won't have to post personal details like address or full name to anyone but the person you're sending or receiving parts with.

Now lets fill the comments up with great ideas!

A summary of players


I'm a big advocate of Linux and BSD for security, but when it comes to offline things, like playing video files and DVD's, I am very pro-Mac OS PowerPC.  To me, there is no better OS to play video on than Mac OS X, and especially on Tiger (10.4) and Leopard (10.5), which as I'm sure you all know were the last two Apple OS to support PowerPC.

All my life I have been a big user and collector of video since before I ever even used computers, but from 2002 on I have been willingly engulfed in digital video on Mac OS X.  In all that time I have learned a thing or three about all the playback applications available, and the strengths and weaknesses of each.  These are my findings.


VLC

VLC is the all-round most stable and capable player ever made available on any OS in my opinion.  It's no MPlayer or CorePlayer in terms of CPU efficiency, but is still a lightweight compared to true resource hogs like Quicktime.  I recommend you use 0.9.10 on Tiger, and 1.1.12 on Leopard.  For Leopard users, the 2.xx versions are a bit more resource needy, and only worth running if you have a dual CPU system; because 2+ is more SMP optimized, but that is really the only true advantage.  So Leopard single CPU users should stick to 1.1.12.

Strengths:
  • stable
  • most codec capable player
  • most tweak-able player (via its vast extended preferences)
  • the best audio and subtitle sync repair of any player

Weaknesses:
  • not as resource efficient as others
  • the expanded preferences can really overwhelm some
  • the "Media library" below the playlist is sketchy at best


MPlayer

MPlayer is much more a lean and raw player compared to VLC and others, but it's quite resource efficient, and scrubs through video in a truly beastly manner.  There are various versions by various developers, but there are three versions that are very worth the HD space they use.  Those three are comprised of two versions of MPlayer OSX (one optimized for G3 and one for G4), and the rev14 version of MPlayer OSX Extended (Tiger users need rev11), which is by far the best thrid-party real media player.

I have some very old real player formatted video I downloaded years ago, but would never install Real Player on any system of mine, nor should you, as it is spyware VLC can play real media also, but it plays very jerky, and with lots of resources available.  The extended version, while newer, is less efficient and has some interlacing issues, so I use it strictly for real media, and a combo of MPlayer OSX and VLC for everything else non-HD.  Bottom line...  use extended for real media only, and the regular OSX version for all your other MPlayer needs.

Strengths:
  • efficient all-round
  • scrubs/scans through video better and more aggressively than any other player
  • frame dropping feature to help it smoothly play video that is slightly beyond your systems capability
  • very effective disk cache option which will offer smooth playback from very slow media, like old CD-R
  • very simple and straight forward preferences (if that's what you prefer)

Weaknesses:
  • struggles with some audio and some x264
  • not anywhere near as codec capable as VLC
  • limited preferences/settings
  • only the "Extended" version is really usable on G5's


CorePlayer

Even though this cannot be bought any longer, it's worth covering for those that do have it, and to help others gain more perspective with it.

CorePlayer OSX is the absolute champion of resource efficiency, and is a master of x264 codec playback, but to be honest, that is where its good qualities end.  The GUI is very sloppily put together, and just generally awkward to use, but not so bad that it's unusable; just clunky and oddball.  I guess this is what happens when you port cellphone software to the desktop, but forget to make it more desktop functional.  It also has little support for AC3 audio, or really any video wrapper that isn't AVI, MP4, M4V or MKV.

Strengths:
  • out of this world efficiency
  • a master at x264 playback

Weaknesses:
  • ugly as hell
  • clunky and awkward to use
  • limited codec support
  • most of the preferences do nothing in terms of producing noticeable results 
  • lack of proper subtitle support


Quicktime

QT is the undisputed champion of bloat when it comes to playback apps.  There is no other application that consumes more of your CPU than this one.

The only use I have for it is the editing feature in the pro version, which is actually quite simple and elegant, but still uses way too many resources.

Bottom line...  don't use it to play video.

Strengths:
  • simple and elegant video editor (with $30 pro version)

Weaknesses:
  • bloated garbage for playback
  • next to no codec support without third-party codecs installed


Apple DVD Player

Even though you can play DVD's in VLC, this application is more efficient at it, and makes the experience much more like using a real DVD player on a TV.  If you run Leopard, and have a CPU under 1GHz, then you should disable deinterlacing (in the "View" menu) for best results.

Since I cannot really find any weaknesses with this, I won't bother doing a strengths/weaknesses for it.  It plays DVD's really well and efficiently, and that's all you really need to know.


Wrapper Roundup

It makes sense to end this with a list of video wrappers, and which players are best for each.  Since this is all based on personal experience, I welcome any findings the readers have also.

Here is the list:

.AVI  -  VLC or MPlayer OSX
.MP4  -  VLC or CorePlayer
.M4V  -  VLC or CorePlayer
.MKV  -  VLC or CorePlayer
.MOV  -  VLC or CorePlayer
.MPG  -  VLC or MPlayer OSX
.WMV  -  MPlayer OSX
.ASF  -  MPlayer OSX or VLC
.FLV  -  VLC
.RM  -  MPlayer Extended
.RAM  -  MPlayer Extended

When it comes to HD, there really is no choice but CorePlayer without a G4 1.2GHz+.  A faster single G4 or dual 1GHz+ will play most 720p in VLC.  You may struggle with any 60fps content though.  As for 1080 without CorePlayer...  thats more for later duals and quad G5's.  On my single 1.8GHz G4 7448 I need CorePlayer to play 1080 smoothly.  60fps 720p h.264 is my limit without CorePlayer.  G4 1.2-1.5GHz would be limited to 24-30fps 720p.

Anyway...  that's about it for this summary.  If you require any additional info, please ask in comments, or add any of your experiences with the apps and codecs above, or others not mentioned.