Friday, February 21, 2014

Using Origin on Wine is BAD NEWS... maybe not?

It seems that most of the issues with this are due to the fiber optic line that broke causing internet issues and DLC authorization errors.  Make sure that all Origin executables on Windows is in your antivirus/firewall exception list.

I'll keep this brief. Over the past days, I had issues with Origin when playing Mass Effect 3 online where connectivity is just shot. I would get errors where Origin would complain not having internet connection.  Mass Effect 3 wouldn't go online either which caused DLC authorization errors.

As it turns out, I started logging into Origin using my Wine install and I noticed doing this would create connection issues on Origin. Once it all got sorted on Windows, using it was fine. So, I deleted Origin on my Wine install. Never again.




Sunday, February 9, 2014

Better Oracle Exception Handling

While working with Oracle, I've learned more and more on better ways of handling exceptions.  There are some major specifics that need to be taken note of.  raise_application_error only works with custom error numbers.  You cannot use it to make Oracle throw just any exception.  Normally, you would use a predefined name like this: 

begin
      some select statement...
exception when no_data_found then
      --handle exception
end;

Sometimes, the Oracle error you want to handle is just not predefined.  So, you'd need a better way of handling errors and throwing some meaningful error messages back.

var b_err_code number;
begin
      some select statement...
exception when others then
      :b_err_code = SQLCODE;
      if :b_err_code = '-00904' then
          --handle exception
      else
          raise_application_error(-20000, 'Some Customized Error Message: ' || :b_err_code || ' Actual SQL Error: ' || SQLERRM);
      end if;
end;

Some points of interest here.  Using when others then allows you to handle all other cases.  Over here, we store the SQL error number to the bind variable b_err_code.  In Oracle, SQLCODE returns exactly that and in our example, we are expecting to handle ORA-00904 via the if condition.  We also have an else part where we generate our own application error.  We also use SQLERRM to return a human readable version of the SQL error message received, that would otherwise had gotten lost in the call stack.  Hope this little bit helps other Oracle and SQL developers.

May Lee Shepard

Reposted here.

Having left the wikia community.  The profile is gone.  I may re-post it here some day.

I had fun doing this in the Mass Effect wikia.  Hope you enjoy this profile.

Wednesday, January 29, 2014

Nintendo Wii U and my HD TV

So here's a fairly significant update from my tests for some form of TV control via my Wii U gamepad for my Ovation 32" HD TV (OVA-HKC32A5).  For control, my bare minimum requirements are volume control and powering up and down my TV.  In my previous post, I found a signal buried in the Wii U's Akai manufacturer to provide some minor semblance of functionality.  Unfortunately, it's woefully inadequate.  This time, I've gone without much success until I reached 'T'.  All through that time, I was only testing using the volume + and - buttons but since the recent finds, I've decided to also test the INPUT button.  So without further ado, I give you the signals I found in addition.

TAG Signal Type 1 surprised the hell out of me as at this time I had come to get used to nothing ever happening.  Pressing 5 will change the sound mode on the Ovation TV.  Pressing Volume - will open the TV source menu.  The A button will decrease the volume while D-pad right will increase the volume.  D-pad down will alter the picture mode.  Pressing either the left or right stick will decrease the volume of the TV.  None of the other buttons seem to have any discernible effect.

Telefunken Signal Type 21 is the next one.  Again, pressing 5 will change the sound mode.  Pressing on Channel down button changes the picture mode.  D-pad down does this as well.  The volume buttons are properly mapped, so that's a good thing.  D-pad left increases the volume.  INPUT button toggles the sleep mode of the TV.

Telefunken Signal Type 23 is another.  The volume buttons are once again properly mapped.  INPUT button opens the TV source menu.  D-pad left decreases the volume and D-pad right increases the volume.  The channel up and down buttons browse the source menu up and down respectively.

Last one is Telefunken Signal Type 24.  INPUT button once again opens the TV source menu.  Channel up button decreases the volume.  D-pad right increases the volume while D-pad left decreases it.  Power button is properly mapped so it's now possible to turn on the TV and fiddle around with the volume settings.  This is pretty much the bare minimum of what I want my Wii U TV remote to do.  Shame Nintendo had to make me go through an enormous amount of tests just to find this.

Sunday, January 26, 2014

Nintendo Wii U and TV Signals

Good grief, Nintendo.  You clearly don't know how to make a user friendly app.  I've gone down to 'P' with no sign of progress except for the Akai one.  I read somewhere that the Akai TVs were rebadged Samsung TVs so that gave me some hope in using the Samsung signals.  I did go through those though and came away with nothing!

Nintendo has a search page for TV remote signals on their website but its all hidden in this crazy ajax search box.  Please let people browse the actual database.  Some people may actually want to try different codes on their TVs and not something tied specifically to their model number.  If you have a wealth of information there, let the people actually see it!

Thursday, January 23, 2014

Update on PulseAudio v ALSA

So, here I go again, diving into this PulseCrap and so, I've found that Ubuntu does come with the Pulse plugins for ALSA.  It's tucked inside libasound2-plugins but I'm starting to think this is the cause for my audio disappearing.  This reminds me of my OSS/ALSA days where sound contention causes the audio to just disappear.  Time to dive into the Launchpad bugs.

According to the archlinux blog, Trine 2 uses OpenAL, but I'm not certain if Natural Selection 2 uses that.  Still need to keep digging, though here's one interesting link I found.

Losing sound on select games...

I've noticed that on some games, I lose sound not only on the game, but also on the entire desktop. It's an odd issue, but I believe I have finally found a possible cause. I have tried playing Natural Selection 2 and although I am happy that it comes with a Linux client, along with Trine 1 and 2, as well as Red Orchestra, the sound goes away until I reboot.

I decided to run ldd on it to see if there were clues. I noticed that when I compare it with games that don't exhibit this behaviour that NS2 has a link to libasound.so which I think is a sure sign that this is another one of those ALSA vs Pulse Audio conflicts.  I will do more research, but this is a theory that is making a lot of sense at the moment.