tag:blogger.com,1999:blog-3482569083413754132024-03-08T15:41:47.048-08:00Lubomir I. Ivanov's blogLubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.comBlogger89125tag:blogger.com,1999:blog-348256908341375413.post-68748777746592676242016-01-17T09:06:00.005-08:002017-10-10T18:03:08.448-07:00C: fast string to hex stringfollowing <a href="http://neolit123.blogspot.bg/2015/10/fast-parsing-of-hex-strings-to-char.html" target="_blank">this post</a>, i have also added a method to convert a char* buffer to a char* buffer which holds the hex values of each input character.<br />
<br />
e.g.:<br />
<span style="font-family: "courier new" , "courier" , monospace;">HelloWorld -> 48656c6c6f576f726c64</span><br />
<br />
a branchless method with a lookup table is used again. it works for any type of data (e.g. UTF-16, UTF-8, etc.) as long as sizeof(char) is 1 byte, as is in the standard.<br />
<br />
the <a href="https://github.com/neolit123/cfg2" target="_blank">cfg2</a> C library now includes the function cfg_char_to_hex(), which can be found <a href="https://github.com/neolit123/cfg2/blob/master/src/utils.c" target="_blank">here</a>.<br />
it's effectively the reverse of cfg_hex_to_char().<br />
<br />
--<br />
<br />Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-27980634494066598382015-10-22T06:21:00.003-07:002015-10-22T06:21:59.218-07:00Functors in Javai've added a <a href="https://github.com/neolit123/JavaFunctors" target="_blank">Github repository</a> for a a very simple Functor (function object) implementation in SE 7.<br />
<br />
--<br />
<br />Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-12150124981865295772015-10-12T06:22:00.001-07:002017-10-10T18:03:38.911-07:00C: fast parsing of hex strings to char buffersthe C library for parsing INI file syntax (<a href="https://github.com/neolit123/cfg2" target="_blank">cfg2</a>) that i'm hobby-maintaining has recently been improved quite a lot. supports sections, the parser should be much better now, improved API and so on.<br />
<br />
one of the features i've added is to be able to store HEX strings of binary data in the text file that can be optionally parsed into memory char buffers.<br />
<br />
for example:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">some_key=48656c6c6f77576f726c64</span></blockquote>
<br />
where the HEX string equals "HelloWorld".<br />
<br />
problems at hand:<br />
1) detect bad length<br />
2) detect bad characters<br />
3) support case-insensitive input<br />
<br />
of course, most programmers can immediately start writing a solution for this type of parser and solve all 3 problems, but the question is - how to write this to be as efficient as possible?<br />
<br />
solving 1) is quite easy. since we are working with 8 bit characters, we are going to have 256 values per character or a maximum of 0xFF (255). but instead of parsing bad characters we are strict and require the HEX string length to be divisible by 2:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">if (len % 2)<br /> goto error;</span></blockquote>
one would approach solving 2) with "if, then, else" branches to see if a character in the HEX string is in the 0-9,A-F range of the ASCII table.<br />
<br />
3) can be solved with toupper()/tolower()<br />
<br />
but instead, a lookup table can be used to solve both 2) and 3) in a single pass. this lookup table could have 256 indexes, where most are filled with zero, while the valid indexes are filled with values of interested.<br />
<br />
the table can be seen in <a href="https://github.com/neolit123/cfg2/blob/master/src/utils.c" target="_blank">this</a> source file - named "hex_to_char_lookup".<br />
<br />
so, when we first traverse the example HEX string we reach a couple of characters "48".<br />
the first one "4" - this character has an ASCII decimal value of 52. the lookup table has mapped this value at index 52 as 5. the reason for 5 instead of 4 is that i wanted the table to look pretty, filled with zeroes and thus i increased each value by one so that "0" is mapped to 1, "1" is mapped to 2 and so on. this can be removed for a small optimization [1], but then one has to fill the table with values such as -1.<br />
<br />
"8" which is mapped to ASCII index 56 in the table and a value 9 is returned.<br />
<br />
if we reach a bad character, 0 will be returned in which case the program should return an error with the bad character position in the HEX string.<br />
<br />
at some point in the example string, "c" will be reached and here we could have a case-sensitivity issue, but the lookup table has mapped both the ASCII "c" and "C" to return the same value which is 13 or the 12th index in hexadecimal, plus 1.<br />
<div>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">0 1 2 3 4 5 6 7 8 9 A B C D E F<br /> ^ (12 + 1 = 13)</span></blockquote>
now, to obtain the resulting C char we have to form a hexadecimal value combining the two decimal values, as follows:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">first = table[52]; // 5<br /> second = table[56]; // 9<br />if (!first || !second)<br /> goto error;<br />first--; second--; // 4, 8; possible optimization [1]<br />unsigned char result = first * 16 + second; // 72 = "H"</span></blockquote>
</div>
<div>
and then the result can be written to the output char buffer.<br />
<br />
that's all!<br />
TMK, this parsing method would work for any string encoding UTF-8, UTF-16, etc. as long as sizeof(char) == 1, which should be very much true as it's in the ISO C standard.<br />
--<br />
<br /></div>
Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-10919481851184506512015-02-04T12:34:00.001-08:002015-02-04T12:40:50.797-08:00libmodplugwhere is a small (wrapper / extension) library that can be used to manipulate libmodplug decoded buffers in terms of rows and patterns with sample accuracy:<br />
<br />
<a href="https://github.com/neolit123/libmodplugw">https://github.com/neolit123/libmodplugw</a><br />
<br />
--<br />
<br />Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-58931670492765851052014-12-19T06:17:00.000-08:002014-12-19T06:31:12.628-08:00AS3 KeyboardHandler<div style="background-color: white; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.3999996185303px; margin-bottom: 16px;">
(i've posted this as a comment in Starling bug report from a user)<br />
<br />
for performance crucial sections such as keyboard interaction i would not use anything but callbacks.<br />
the flash event system, and the alternatives such as signals are nice for higher level management, but they can't really beat callbacks for performance. what Starling does with the enhanced events is also fast, but here is my point.</div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.3999996185303px; margin-bottom: 16px;">
the virtual machine and the garbage collector already provide you with the flexibility of one of the core features - everything is an Object including Function.</div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.3999996185303px; margin-bottom: 16px;">
"functors" or function pointers is something that even languages like C++ don't handle that well, so you really should take advantage of this low level, yet still high level feature.</div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.3999996185303px; margin-bottom: 16px;">
since the only way in flash to see if a key is pressed is via the KeyboardEvent, use that and build a callback system on top of it. only maintain the stage events and propagate manually not display objects but rather <em style="box-sizing: border-box;">objects of interest</em>.</div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.3999996185303px; margin-bottom: 16px;">
check this concept i wrote quickly:</div>
<ul class="task-list" style="background-color: white; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.3999996185303px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;">
<li style="box-sizing: border-box;">KeyboardHandler is a state machine that tracks keyboard isDown states for a keyCode and calls your registered callback.</li>
<li style="box-sizing: border-box;">it uses the native stage</li>
<li style="box-sizing: border-box;">it's super fast</li>
<li style="box-sizing: border-box;">it's worker safe</li>
<li style="box-sizing: border-box;">you can stop it at any time using "enabled = false"</li>
<li style="box-sizing: border-box;">it does call event.preventDefault(), event.stopImmediatePropagation(), but you can mod that yourself or simply call "enabled = false" when needed.</li>
<li style="box-sizing: border-box;">once a key is down it no longer registers as down until it up, this forces you to write your key logic smart.</li>
<li style="box-sizing: border-box;">if you don't track a key state yourself (which would be faster) at any time you can call supportedKeyIsDown(...) to see if a key is currently down. this allows easy checks for key combinations e.g ALT + SHIFT + LEFT.</li>
</ul>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.3999996185303px;">
<a href="https://gist.github.com/neolit123/ec0999822737a2fc358f" style="background: transparent; box-sizing: border-box; color: #4183c4; text-decoration: none;">https://gist.github.com/neolit123/ec0999822737a2fc358f</a></div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.3999996185303px;">
<br /></div>
Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-79048830744972886322013-09-13T06:57:00.002-07:002014-02-16T12:11:27.067-08:00fast IEEE 754 double to int32 @ music-dspat the music-dsp mailing list there was a short discussion about a "double -> int" rounding hack present in the JUCE library.
i've posted an alternative solution that does the same without IEE 754 arithmetic. i'm sure similar solutions can be found in libraries and for CPU's that don't have a floating point co-processor unit. code is for c99.<br />
<br />
<a href="http://music.columbia.edu/pipermail/music-dsp/2013-September/071572.html">http://music.columbia.edu/pipermail/music-dsp/2013-September/071572.html</a><br />
<br />
can be summarized into:<br />
1) separate double into mantissa, exponent, sign bit<br />
2) depending on exponent value shift the mantissa left or right by the difference of the exponent and the amount of bits in the mantissa<br />
3) truncate and receive a 32bit integer, while applying the original double's sign<br />
<br />
--Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-72236082771763002202013-09-10T02:44:00.001-07:002013-09-10T07:23:39.905-07:00flash cs6 compiler bug<span style="font-family: inherit;">i have to work with tools like the one mentioned in the title. here is a bug that only happens if you assign code to a frame in the (main) timeline. target version is 12.0.0.481 and could be fixed in later interations.</span><br />
<span style="font-family: monospace;"><br /></span>
<span style="font-family: inherit;">you can try the following:</span><br />
<code>
<span style="font-family: monospace;">// Array can be used here instead, for 'list'</span><br>
<span style="font-family: monospace;">var list:Vector.<String> = Vector.<String>(["hello", "world"]);</string></string></span><br>
<span style="font-family: monospace;">trace(list); // hello,world</span><br>
<span style="font-family: monospace;">var vlen:uint = list.length;</span><br>
<span style="font-family: monospace;">trace(vlen); // 2</span><br>
<span style="font-family: monospace;">const clen:uint = vlen; // this works but 'vlen' is zero at this point</span><br>
<span style="font-family: monospace;">trace(clen); // 0</span><br>
<span style="font-family: monospace;">const len:uint = list.length; // list is a null object reference</span></code><br>
<span style="font-family: inherit;">results in:</span><br />
<code>
<span style="font-family: monospace;">TypeError: Error #1009: Cannot access a property or method of a null object reference.</span><br>
<span style="font-family: monospace;"><span class="Apple-tab-span" style="white-space: pre;"> </span>at Untitled_fla::MainTimeline()</span>
</code>
<span style="font-family: inherit;"><br />
what happens here is that the as3 compiler tries to play smart and traverses for 'const' declarations, and once it finds 'len' it decided to assign a value to the address where it will be stored in the 'constant pool' and then to be referenced by bytecode. but since 'list' is not a 'const' declaration itself the object is simply not constructed yet and 'list' is a null reference.</span><br />
<span style="font-family: inherit;"><br />
same does not happen if:</span><br />
<span style="font-family: inherit;">- 'const list:...' is used, but one may not want that</span><br />
<span style="font-family: inherit;">- if the same code is written in an external document class instead on the timeline</span><br />
<span style="font-family: inherit;">
<br>
if this is by design it may cause compatibility issues with class written code and simply confuse developers. after all, constant declarations after variable declarations should make perfect sense. in general, i wouldn't recommend writing anything more important on timeline frames, but use classes with ENTER_FRAME listeners or attempt to use addFrameScript() on MovieClip instances instead.
<br>--
</span>Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-71603553245514241372013-05-06T12:40:00.000-07:002015-11-29T13:52:27.706-08:00robotic arm flashbacksi remember programming this machine with an apple 2 clone, when i was quite young. it was a educational robotic arm i had access to in a laboratory in the mid 80's.<br />
<br />
<a href="http://www.old-computers.com/museum/photos/Pravetz_Imko_RobkoRobot_1.jpg" imageanchor="1"><img border="0" src="http://www.old-computers.com/museum/photos/Pravetz_Imko_RobkoRobot_1.jpg" /></a><br />
<br />
it had pretty good mobility, small error margin and it could lift up a kilo or so. here is a sheet photo where you can see some Tesla ICs and a voltage regulator:<br />
<a href="http://upload.wikimedia.org/wikipedia/commons/5/5d/Robko01elem.JPG" target="_blank">image</a>
<br />
<br />
--<br />
<br />Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-41929724517782294232013-02-21T01:30:00.001-08:002013-02-21T01:31:45.314-08:00android 4.2.2 and RSA encryptioni was doing some testing recently with the "Android Debug Bridge" ADB, but the device was refusing APK upload. it appears that the recent JB 4.2.2 has a security update:<br />
<a href="http://android-developers.blogspot.com/2013/02/security-enhancements-in-jelly-bean.html" target="_blank">http://android-developers.blogspot.com/2013/02/security-enhancements-in-jelly-bean.html</a><br />
<br />
which means that you will need to update your Android SDK and copy / use the adb.exe (and all dependencies from "/platform-tools"), which should be version >= 1.0.31 as of this point.<br />
<br />
--<br />
<br />Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-79284415073522740302013-02-08T15:31:00.001-08:002013-02-09T17:05:29.864-08:00bulls and cows: open source game in ANSI Chere is an open source <a href="http://en.wikipedia.org/wiki/Bulls_and_cows" target="_blank">"bulls and cows"</a> game written in ANSI C:<br />
<a href="http://dl.dropbox.com/u/1627980/bulls/bulls.zip" target="_blank">download</a><br />
<br />
pre-compiled win32 executable included.<br />
<br />
i wrote that after a simple challenge proposed by some of my friends, and now apparently they even play it from time to time.<br />
<br />
if you are a C programmer, try guessing out why the 0xDA special case happens and how volatile it is.<br />
--<br />
<br />Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-21828237116480043142013-01-28T01:19:00.003-08:002013-01-28T01:22:11.227-08:00starling framework video tutorialshere are a nice set of video tutorials by <a href="https://plus.google.com/u/0/110938573351743765184/about" target="_blank">+Hemanth Sharma</a> to get you started with the <a href="http://gamua.com/starling/" target="_blank">starling</a> framework:<br />
<a href="http://youtu.be/RTvhZ8wbJaQ" target="_blank">http://youtu.be/RTvhZ8wbJaQ</a><br />
<br />
if you don't use proprietary software like "flex builder", mind that you can set everything on the command line using the flex tools "mxmlc", "adl", "adb". i'm sure there are examples on how to do that online. <a href="http://flex.apache.org/" target="_blank">flex</a> is open source as is now maintained by the "apache software foundation".<br />
<br />
--<br />
<br />Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-4139002426961558902013-01-22T14:29:00.000-08:002013-01-28T01:23:14.778-08:00CFG2 - an INI-like parseri wrote a simple INI-like parser some time ago called CFG2.<br />
it's released in the "public domain" with source code at <a href="http://github.com/neolit123/cfg2">http://github.com/neolit123/cfg2</a>.<br />
<br />
--<br />
<br />Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-60583451133260751622012-12-13T08:21:00.000-08:002012-12-13T08:21:17.590-08:00clipboard managersi've been using <a href="http://bluemars.org/clipx/" target="_blank">ClipX</a> on windows for quite some time, but it seems the latest version (which haven't been updated for quite some time) has some bugs, or perhaps it's windows 7 with something installed or used at the moment.<br />
<br />
from time to time it did not catch all the "ctrl + c" events from text editors, so a couple of months ago i've moved to <a href="http://ditto-cp.sourceforge.net/" target="_blank">Ditto</a>, which has much more features, yet at the same time can remain quite simple when in action. it can store a very large number of entries in a database that can be cleared any time and is still quite responsive when retrieving something (perhaps slightly slower that ClipX).<br />
<br />
on the linux side of things, the only one i've tried is <a href="http://parcellite.sourceforge.net/" target="_blank">parcellite</a>, which apparently to a majority of users is the best one out there.<br />
<br />
perhaps future OS's will have native implementations of clipboard (history) managers pre-bundled.<br />
--<br />
<br />Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-14127084891320599522012-10-26T02:20:00.000-07:002012-10-26T02:30:28.637-07:00windows 8 micro ranti haven't seen or tried it yet, but i've seen some posts that people do not like the windows 8 new looks and mobile-like utilities. this new version seems like windows 7 with some mobile + touch screen extras, people say. what i'm sure however is that some of that can be disabled. here is an example for disabling the metro-ui:<br />
<a href="http://techmell.com/how-to/disable-metro-ui-windows-8/">http://techmell.com/how-to/disable-metro-ui-windows-8/</a>
<br />
<br />
so things like metro-ui should not be the only reason not to get a certain peace of software, because there may be an option to disabled such. perhaps the price itself can be a reason - which is around 30euros.<br />
<br />
i cannot say more about the OS itself as i haven't read something drastically negative yet...<br />
if you a are a windows "fan" and simply don't like the number 8, stick to 7.<br />
but if you are concerned about the price or anything else certainly try linux instead
<br />
<br />
--<br />
<br />Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-1808049181971688632012-10-20T18:18:00.000-07:002012-10-20T18:18:50.394-07:00RIP Nilz<span style="font-family: inherit;">i'm almost one year late, but RIP Nilz.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><a href="http://www.discogs.com/artist/Nilesh+Patel?anv=Nilesh+'Nilz'+Patel">http://www.discogs.com/artist/Nilesh+Patel?anv=Nilesh+'Nilz'+Patel</a>
</span><br />
<span style="background-color: #fefefe; font-family: inherit;">"He was a highly-regarded mastering engineer at </span><a href="http://www.discogs.com/label/The+Exchange" style="background-color: #fefefe; color: #884488; cursor: pointer; font-family: inherit; overflow: hidden; text-decoration: none;" target="_blank">The Exchange</a><span style="background-color: #fefefe; font-family: inherit;">, London."</span><br />
<span style="background-color: #fefefe; font-family: inherit;"><br /></span>
<span style="background-color: #fefefe; font-family: inherit;">you have probably heard music mastered by him!</span><br />
<span style="background-color: #fefefe; font-family: inherit;"><br /></span>
<span style="background-color: #fefefe; font-family: inherit;">--</span><br />
<span style="background-color: #fefefe; font-family: inherit;"><br /></span>Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com1tag:blogger.com,1999:blog-348256908341375413.post-61023693592116207962012-09-22T17:07:00.001-07:002013-06-21T12:28:42.840-07:00Sound Toy presetslast month i've sent a couple of presets to <a href="http://www.iquilezles.org/" target="_blank">InogoQuilez</a>'s online sound generator - <a href="http://www.iquilezles.org/apps/soundtoy/index.html" target="_blank">Sound Toy</a>.<br />
<div>
presets are named "FM1...FMx".</div>
<div>
<br /></div>
<div>
enjoy</div>
<div>
--</div>
<div>
<br /></div>
Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-7113213958061877872012-08-24T00:20:00.000-07:002015-02-04T12:42:01.046-08:00nightly builds of subsurface for windows(EDIT: the repository no longer exists as subsurface provides nightly builds!)<br />
<br />
subsurface is a mulitplatform dive log application that is written mainly by linus torvalds and dirk hohndel.<br />
<br />
it's website is at:
<br />
<a href="http://subsurface.hohndel.org/" target="_blank">http://subsurface.hohndel.org</a><br />
and with a mailing list at:<br />
<a href="http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface" target="_blank">http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface</a><br />
<br />
for quite some time i have the program set up with all the required libraries for building with mingw on windows. i will be uploading regular updates of binary packaging at the following github repository:<br />
<br />
<a href="http://github.com/neolit123/subsurface_win32" target="_blank">http://github.com/neolit123/subsurface_win32</a><br />
<br />
--<br />
<br />Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-71494328883725711052012-08-23T15:19:00.002-07:002013-02-08T15:37:50.669-08:00threading and concurrency in flash player 11.4the new flash player (as of 11.4) apparently now supports threads (and concurrency), exposed to the API via the Worker* / MessageChannel family of classes. the approach they took is actually similar to channels in GO, which is nice. <br />
<br />
API examples:<br />
<a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Worker.html">Worker class</a><br />
<br />
one slight inconvenience is that each time a worker / thread is created it has to exist in a separate SWF (ByteArray). this can be avoided if the actual SWF is created/loaded in/from memory.
<br />
<br />
a cool new feature, but it might be a little bit delayed in comparison to lets say Java, which became C/C++ like syntax multithreaded / "API exposed", i believe, since 1996 with JDK 1.0.<br />
<br />
--Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-12010491884079831892012-07-20T02:04:00.002-07:002013-04-29T14:36:35.434-07:00looks like SVN had a little bit of a re-design...SVN has its uses, but i was never a big fan due to some of the apparent sync issues when multiple people have to work on the same project and especially when the project becomes larger. not to mention that SVN branches are out of the question for most developers. one strictly annoying thing though, was the per-folder localized database instead of a centralised database per repository, which seem they redesigned in 1.7.0 (from october 2011 - yep, haven't used it for a while): <br>
<br>
<a href="http://subversion.apache.org/docs/release-notes/1.7.html">http://subversion.apache.org/docs/release-notes/1.7.html</a><br>
<br>
<bq>A key feature of the changes introduced in Subversion 1.7 is the centralization of working copy metadata storage into a single location. Instead of a .svn directory in every directory in the working copy, Subversion 1.7 working copies have just one .svn directory—in the root of the working copy. This directory includes (among other things) an SQLite-backed database which contains all of the metadata Subversion needs for that working copy.</bq><br>
<br>
--Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-18142122958279532492012-06-28T18:12:00.000-07:002012-08-08T15:20:32.437-07:00as3: callbacks for inter-object communication<br />
[post is pending for a syntax/typo check]<br />
<br />
in an almost non-coercive attempt, here goes a short explanation of something that has already been covered by people, perhaps much more competent than me on the specific subject. if you, at one point decided to tackle performance in as3 programming, you may have eventually bumped into the subject of memory management and whether to use the event system proposed by language specification.<br />
<br />
<hcon><br>
<b style="background-color: white;">the as3 event system is flawed, but certainly not that bad</b><br />
<br />
<span style="background-color: white;">going to low level programming as a distant reference, an event system does not exist until you create one as model or until the operation system's client library, somehow imposes one to you. </span><span style="background-color: white;">there are various topics on this subject if the as3 event system is good or not, but it is certainly widely used, yet language experts seem to criticize it a lot, thus there are alternatives like: </span><a href="https://github.com/robertpenner/as3-signals/" style="background-color: white;" target="_blank">as3-signals</a><span style="background-color: white;">, </span><a href="http://filimanjaro.com/fingers/" style="background-color: white;" target="_blank">fingers</a><span style="background-color: white;">, </span><a href="http://code.google.com/p/cjsignals/" style="background-color: white;" target="_blank">cjsignals</a><span style="background-color: white;">.</span><br />
<br />
<b>when are callbacks a better alternative</b><br /><br />
in short, a callback is a function called by another function, when desired to pass an end result of some sort. when there are multiple instances of objects with hierarchy and inheritance, the as3 language specification suggest usage of the event system for communication between such. each time an event is dispatched memory is allocated for it to occupy and also there are possibly other function calls, assignments and overhead. even if garbage collection is as3 does a good job (to the extend you may not notice memory increase), why use the event system for really simple tasks in the first place?<br />
<br />
consider a couple of display objects A, B, where A is parent to B (B instantiated in A).<br />
the obvious way to communicate B -> A, would be to dispatch some sort of an event, signal or message (depending on the library you are using), but how about not creating any overhead and simply passing a data object, local to method in B as a parameter to method in A. if the object is small enough (and if AVM2 does a good job when doing stack handling) the lifetime of the object will span only trough the two methods and nothing will be ever allocated in memory (heap allocation). so basically what we are telling the VM (and before that the MIR optimizer and such) by doing this is in the rough lines of:<br />
<br />
...<br />
call method in B (<span style="background-color: white;">call</span><span style="background-color: white;"> = <offset>)</offset></span><br />
do calculation in method (probably using the so called "local registers")<br />
pack result into an object<br />
push object on the stack<br />
grab offset of method in A via a reference<br />
<span style="background-color: white;">call method in A </span>(call = <offset> )</offset><br />
do calculation with the object (callproperty)<br />
<br />
so no allocation and no overhead by multiple calls...<span style="background-color: white;">but also, now consider having thousands of B instances.</span><br />
<br />
here is an example using a "Delegate" object:<br />
<br />
<a href="http://sites.google.com/site/neolit123/Home/as3Delegate.zip" target="_blank">as3Delegate.zip</a><br />
<br>
<hcon open="[+]View Image" close="[-]Hide Image">
<a href="http://sites.google.com/site/neolit123/Home/as3_delegate.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="273" src="http://sites.google.com/site/neolit123/Home/as3_delegate.png" width="320" /></a>
</hcon>
<br />
note that i advise against using "singleton" classes for inter-object communication with callbacks, unless such objects are "singletons" them self or there are no multiple instance considerations.<br />
<br />
<b style="background-color: white;">dynamic allocation of "enterFrame" callbacks</b><br /><br />
events such as ENTER_FRAME, that are called many times need allocation of many objects. <span style="background-color: white;">i've read a couple of post related to the possibility of writing a different "enterFrame" and the authors have considered the method of creating a two frame MovieClip, which is basically stack-only dispatch of the event with callbacks, yet they don't find any memory or speed benefits. this is mostly, as mentioned due to the fact the GC in AVM2 is quite efficient and also due to the fact that </span><span style="background-color: white;">modern machines are ridiculously fast:</span><br />
<br />
<a target="_blank" href="http://alecmce.com/as3/replacing-enter_frame">http://alecmce.com/as3/replacing-enter_frame</a><br>
<a target="_blank" href="http://blog.int3ractive.com/2010/07/myth-buster-enterframe-event.html">http://blog.int3ractive.com/2010/07/myth-buster-enterframe-event.html</a><br />
<br />
here is a small alternative (EnterFrame.as), which creates the two frame MovieClip dynamically instead of using library or meta data and has a much cleaner interface:<br />
<br />
<a target="_blank" href="http://sites.google.com/site/neolit123/Home/EnterFrameTest.zip">EnterFrameTest.zip</a><br />
<br />
the code is based on ClipFactory by <span style="background-color: white;">Denis Kolyako. ClipFactory is a nifty trick that creates a SWF in memory, appends a class which extends a MovieClip with a number of frames, loads the SWF, which then allows the class to be instantiated and </span><span style="background-color: white;">addFrameScript() used on the frames.</span><br />
<br />
<span style="background-color: white;">EnterFrame has </span>stop(), start(), setCallback(somemethod)<br />
<br />
<br />
<b>there are some drawbacks-to-callbacks</b><br />
<br />
- not possible to make this work for native events such as mouse and keyboard actions, since as3 uses the event model strictly and does not provide alternatives. the criticism which was present in as2 due to a sparse implementation has turned into a restriction in as3.<br />
<span style="background-color: white;">- having only one </span><span style="background-color: white;">centralised model for inter object communication is never a bad thing.</span><br />
<span style="background-color: white;">- closely related to the previous note, code obfuscation can become an issue when using callbacks, due to every programmer having a different naming conversation (this is a problem which an event / signal / message system certainly can solve quite well).</span><br />
<br />
<br />
<b style="background-color: white;">any event model does not cause stalls until proven guilty</b><br />
<br />
and that pretty much sums it up, considering the cpu power available on the market currently. if you do not wish to optimize your message / event / signal passing method you can pretty much stay with the defaults, by proposal and if you find the interface comfortable enough, of course. <span style="background-color: white;">in fact modern cpu are so fast that you may be hardly able to profile any code execution in research, thus leaving you with the question - "is it really worth it to even bother?".</span><br />
<br />
--<br />
<div>
<br /></div>
</hcon>Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-23070401012276476102012-06-28T14:52:00.001-07:002012-06-28T15:03:36.596-07:00win32: a tool to set the keyboard repeat ratei have a windows 7 machine and every time it exits sleep mode it (re)sets the keyboard repeat rate to a very low value (i normally set the value to high). i believe this could be due to a small driver issue.<br />
<br />
here is a command line tool that can be used to get/set the kb rate value (source code included):<br />
<a href="http://sites.google.com/site/neolit123/Home/setkbrate.zip" target="_blank">setkbrate.zip</a><br />
<br />
usage:<br />
setkbrate n<br />
<span style="background-color: white;">where n is a number between 0 (slowest) and 31 (fastest).</span><br />
<span style="background-color: white;">calling with no arguments will</span><span style="background-color: white;"> output the current rate.</span><br />
<br />
the way to use it when the system exits sleep mode is to set a new task scheduler task:<br />
<br />
1) control panel -> system and security -> administrative tools -> task scheduler<br />
2) right click the task list -> create basic task<br />
3) for triggers, one way would be to try to capture the system "exit sleep mode" event:<br />
- set trigger mode to "on an event", log: "system", source: "power-troubleshooter", id: "1" (should be 1, but has to be verified in the event log)<br />
4) for the action select "start a program" then browse and set to "setkbrate.exe", while adding a numeric argument of 0-31.<br />
<br />
--Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-35745555931439407442012-06-17T08:00:00.000-07:002012-07-27T05:07:38.371-07:00first impressions on the GO programming language<a target="_blank" href="http://golang.org/">http://golang.org/</a><br />
<br />
disclaimer: this article will not show much, other than submitting a surface look over the language.</br></br>
<b>positive:</b><br><br>
after doing the <a href="http://tour.golang.org/" target="_blank">tour at golang</a> i can say that i like the language a lot. i've also enjoyed watching some lengthy lectures. the syntax is mostly c based, while it grabs a little bit from other languages, yet also introduces some new concepts with an old-school twist.
<br><br>
- easy to get into for everyone with a little bit of background in languages like c, c++, java, python etc. it took me a couple of days to memorize a decent portion of the syntax and library calls.<br>
- the compilers are bit wip at this point, but already very potent at the same time<br>
- easy string and array manipulation<br>
- functions are objects<br>
- adding methods is possible to every type (e.g. primitives - int, float)<br>
- concurrent programming with the goroutines and channels is pretty cool<br>
- package download and install is very easy with the 'go' tool (go get / go install)<br>
- its possible to easily wrap c libraries and program in go (see the winapi example bellow).<br>
<br>
<hcon>
<b>negative:</b><br><br>
there are some huge articles on the web that explain some of the negative sides of go. for me personally i would point out: <br><br>
- garbage collected - the argument here is that modern runtime execution, can handle heap allocation quite easily. i would say that this is pretty much true for modern machines, but not the case if the same program is brought to older computers. while an optional garbage collector might be a cool feature, to my knowledge this might be a complication. on the other hand, modern java and actionscript 3.0 are proofs that garbage collectors are pretty efficient. i think thought, that this feature alone might be a deal breaker for some purists.<br>
- large executable sizes - not a big issues, but since the go runtime runs on top of an os, which is probably build in c, it statically links all its libraries into one big executable. not that big, but >= 1.x MB, which makes it not suitable for size-programming - e.g. demoscene material. but certainly not a deal breaker for a large group of developers and considering the disk sizes available.<br>
- at this point, remains slower than well optimized c (e.g. gcc -O3) - <a href='http://shootout.alioth.debian.org/u64/benchmark.php?test=all&lang=go&lang2=gpp&box=1' target='_blank'>comparisons</a><br>
<br>
<b>a WINAPI test:</b>
<br />
<br />
<code>
/*<br />
file: testwinapi.go<br />
<br />
go! winapi test using "go-winapi":<br />
http://github.com/lxn/go-winapi<br />
*/<br />
<br />
// this package<br />
package main<br />
<br />
// package imports<br />
import (<br />
"os"<br />
"fmt"<br />
"syscall"<br />
"unsafe"<br />
"github.com/lxn/go-winapi"<br />
)<br />
<br />
// variables<br />
var (<br />
oldWndProc winapi.HWND<br />
)<br />
<br />
// constants<br />
const (<br />
winWidth int32 = 300<br />
winHeight int32 = 200<br />
)<br />
<br />
// string to int16(utf) helper function<br />
func _S(_srt string) *uint16 {<br />
return syscall.StringToUTF16Ptr(_srt)<br />
}<br />
<br />
// window procedure<br />
func WndProc(hwnd winapi.HWND, msg uint32, wparam uintptr, lparam uintptr) uintptr {<br />
switch msg {<br />
case winapi.WM_CLOSE:<br />
winapi.DestroyWindow(hwnd)<br />
case winapi.WM_DESTROY:<br />
winapi.PostQuitMessage(0)<br />
}<br />
// call original procedure<br />
return winapi.CallWindowProc(uintptr(oldWndProc), hwnd, msg, wparam, lparam );<br />
}<br />
<br />
// main<br />
func main() {<br />
var message winapi.MSG<br />
var hwnd winapi.HWND<br />
var wproc uintptr<br />
<br />
// create a message box<br />
winapi.MessageBox(0, _S("some text"), _S("tittle"), 0)<br />
<br />
// create an edit window<br />
hwnd = winapi.CreateWindowEx(<br />
winapi.WS_EX_CLIENTEDGE,<br />
_S("EDIT"),<br />
_S("test window"),<br />
winapi.WS_OVERLAPPEDWINDOW,<br />
(winapi.GetSystemMetrics(winapi.SM_CXSCREEN) - winWidth) >> 1,<br />
(winapi.GetSystemMetrics(winapi.SM_CYSCREEN) - winHeight) >> 1,<br />
winWidth,<br />
winHeight,<br />
0,<br />
0,<br />
winapi.GetModuleHandle(nil),<br />
unsafe.Pointer(nil))<br />
<br />
// create callback, set procedure, show window<br />
wproc = syscall.NewCallback(WndProc)<br />
oldWndProc = winapi.HWND(winapi.SetWindowLong(hwnd, winapi.GWL_WNDPROC, int32(wproc)))<br />
winapi.ShowWindow(hwnd, winapi.SW_SHOWDEFAULT)<br />
<br />
// dispatch message<br />
for {<br />
if winapi.GetMessage(&message, 0, 0, 0) == 0 {<br />
break<br />
}<br />
winapi.TranslateMessage(&message)<br />
winapi.DispatchMessage(&message)<br />
}<br />
<br />
// print handle and exit<br />
fmt.Println("hwnd =", hwnd);<br />
os.Exit(int(message.WParam))<br />
}<br />
</code><br />
</hcon>
<br />
--Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-73498364364466015302012-05-26T17:46:00.000-07:002012-05-27T17:43:14.305-07:00a couple of pc hardware reviewsi bought a modest PC configuration recently and here are a couple of the components that i wasn't able to find much information about. you might have stumbled on this page via a search engine, so i hope this is somehow useful to you.<br />
<br />
list: gigabyte ga-p61a-d3, sapphire hd6770 1gb ddr5
<br />
<br />
<hcon>
<br />
<b><span style="font-size: large;">Gigabyte GA-P61A-D3</span></b><br /><br />
<a target="_blank" href="http://www.gigabyte.com/products/product-page.aspx?pid=4074#ov">http://www.gigabyte.com/products/product-page.aspx?pid=4074#ov</a><br />
<br />
this is a budget (upgrader market) motherboard based on the Intel H61 chipset with socket FC-LGA-1155. it does support the more recent Ivy Bridge and you have a decent room for upgrade up to something like the quad core (8 thread), ~75W TDP, i7-3770 if you have bought a less powerful CPU. mind that you should not get a K-series CPU, since this chipset will have the frequency multiplier of the processor locked, which is by design (which is also a marketing decision). user level, overclocking will be possible via the base clock of the board, but this can interfere with the standard operation of all interfaces like SATA and USB ports and is not recommended.<br />
<br />
the BIOS itself is EFI based and has a nice GUI interface with mouse support and a good set of control features. there is a backup integrated chip, which makes it a DualBios(tm), so basically you have a backup in cases of BIOS failure.<br />
<br />
there are three legacy PCI slots, two 1x PCIe and one 16x PCIe, but you might be facing a small problem if you want to connect two 1x PCIe cards and a dedicated two-slot GPU card at the same time.<br />
<br />
on the GPU side, this board does not support the on-board Intel HD Graphics unit inside the CPU and you will have to get a dedicated graphics card, but for a home desktop machine, i will really recommend getting a dedicated graphic card. the performance of the Intel HD Graphics will be more suitable for a office machine, where running GPU intensive code will not be an issue, but might be a slight problem for something more complicated.<br />
<br />
the board supports USB3.0 via a chipset extension with the Etron EJ168 chip, which seems to be working fine and i haven't had any problems with it so far. the chip is located near the USB2.0/LAN connectors.<br />
<br />
the <span style="font-family: inherit;"> Marvell 88SE9172 chip, which provides the SATA III and RAID 0/1 support seems a bit problematc. a couple of remarks that i can provide here are, that you should not get this board if you want your boot hard drive to be SATA III connected i.e. you should connect the boot drive to a Intel SATA II port instead (blue color) and also that you might encounter compatibility and/or Windows 7 driver issues using this chip and Western Digital drives. the issues i was having specifically were related to the Windows, hybrid sleep mode and drive wakeup timings. </span>please note though, that such issues (if strictly driver related) might get fixed eventually later on. at the same time, you should consider that spinning hard disk drives cannot reach the imposed transfer limit by SATA II, but you might benefit if using SSD drives (i haven't tested one with this controller).<br />
<span style="font-family: inherit;"><br /></span>
apparently Marvell 88SE9172 support is present in the linux kernel as of 3.2.0 according to this blog post:<br />
<a target="_blank" href="http://theangryangel.co.uk/blog/marvell-88se9172-sata3-under-linux-as-of-320">http://theangryangel.co.uk/blog/marvell-88se9172-sata3-under-linux-as-of-320</a><br />
but if you are using an older kernel the drives connected to the SATA III ports will not be visible. if you need stable SATA III support for your drives i would suggest that you target the Intel H67 chipset instead.<br />
<br />
<span style="font-family: inherit;">i believe there is only one extra 4pin PWM fan header (other than the CPU fan header), but you can either install a controller or look into getting thermistor controlled fans.</span><br />
<br />
a couple of really nice features that i like about this board is that it has two legacy PS/2 ports (mouse/keybard) and also a parallel port (LPT). if you are into device testing and driver development the parallel port might come in very handy.<br />
<br />
overall, a very nice board, with good set of features and i can definitely recommend it for a budget PC build.<br />
<br />
<b>pros:</b><br />
- budget
<br />
- 2x legacy PS/2 ports<br />
- H61 / LGA1155 and supports a nice range of Intel CPU models<br />
- has USB3.0 support<br />
- all polymer capacitors<br />
- a parallel port<br />
<br />
<b>cons:</b><br />
- unstable SATA III support and drivers. compatibility issues with the tested SATA III devices.<br />
- if you install a two-slot graphic card you will be left with only one 1x PCIe port. perhaps the three PCI slots should have been next to the graphic card instead.<br />
<br />
<br />
<b><span style="font-size: large;">Sapphire HD6770 </span></b><b><span style="font-size: large;">1GB DDR5</span></b><br /><br />
<a target="_blank" href="http://www.sapphiretech.com/presentation/product/?cid=1&gid=3&sgid=1073&pid=1247&psn=&lid=1&leg=0">http://www.sapphiretech.com/presentation/product/?cid=1&gid=3&sgid=1073&pid=1247&psn=&lid=1&leg=0</a>
<br />
<br />
this is a card that may confuse the buyer at first, due to its clock speeds and simpler look. also Sapphire, unlike Gigabyte for example, are less specific about their model names. while the GPU core is clocked at 775MHz and memory at 1000MHz, which i believe are the default for HD5770 and this chipset as well (but most manufacturers provide a factory overclock), this card can easily perform at higher frequencies and match the performance of similar and more expensive models.<br />
<br />
in stock settings, the card has an idle temperature of ~34 degrees C, fan speed running at 40%, which is pretty quiet (i would guess around 25-30dBa) and will most likely be masked in a modern PC case. the core idles at 157MHz and the memory at 300MHz (~1.2VDDC) with power consumption of ~20W. under load the card will consume near 110W, the temperature will increase to near 65 degrees C (for ambient room temperature near 20 degrees with decent case cooling) and the fan speed will be at 45% (which is also into the quiet zone).<br />
<br />
this card draws its main power from the PCIe 2.0 slot, which will provide a maximum of 75W and thus will require an extra 6-pin connector for compensation, so make sure your power supply unit has such a connector. in regard of the PSU choice itself, i would recommend that you get a unit that has at least 40A on the +12V rail (preferably one rail), but perhaps even more. you should also consider that the overall PSU temperature (and noise) will raise and be load dependent and while the power supply is quiet idle, it may become much louder when the GPU consumption increases.<br />
<br />
on overclocking, with respect to budget performance, i think you can push this card into the range for 1000MHz for core and 1300MHz for memory at ~1.20VDDC (or more), but the stock cooling will probably become much louder, as the fan noise curve is much more prominent above 50%, due to the fan diameter. for a basic overclocking setup i can recommend setting the core voltage to 1.2VDDC or slightly more if possible, the core clock to 850MHz, memory at 1200MHz and either keeping the stock cooler PWM curve or apply a steeper temperature to speed increment.<br />
<br />
Sapphire provides an overclock tool called Trixx that will support and understand this GPU:<br />
<a target="_blank" href="https://www.sapphireselectclub.com/ssc/TriXX/TriXX.aspx">https://www.sapphireselectclub.com/ssc/TriXX/TriXX.aspx</a><br />
<br />
if you are interested in modern, good looking games (y2012) i think you will be able to play anything on this card with its default clock speeds in 720p with high settings in the 30+ or event 60+ FPS range, assuming your CPU or something else will not bottleneck the overall performance. if you are willing to overclock it, you might get a ~5-15 FPS boost in such settings (end result depends on a lot of variables, though).<br />
<br />
for 3D development you are getting DirectX 11 / Shader Model 5.0 (800 streams) and OpenGL 4.1 support, which is a pretty nice set of features.<br />
<br />
as a side note, if you are in doubt about getting DDR3 or DDR5 i would encourage you to get a card that has at least of 1GB DDR5. this will give you a nice chance to handle relatively high resolutions with decent performance (i.e. frame buffer update).<br />
<br />
as another side note - i was able to find information about a similar product from the Sapphire line:<br />
<a target="_blank" href="http://www.sapphiretech.com/presentation/product/?cid=1&gid=3&sgid=1073&lid=1&pid=1190&leg=0">http://www.sapphiretech.com/presentation/product/?cid=1&gid=3&sgid=1073&lid=1&pid=1190&leg=0</a>
<br />
but not enough about the differences between the two, like cooling, temperatures and noise levels. manufacturers can provide a product with factory overlock settings, such as the second card in question. it may have a better overall build, with stronger elements and event slightly better cooling system (but i'm pretty sure both use the Vapor-X technology). it does not have the legacy D-SUB port, which is present on the first card, but instead it has a DisplayPort and HDMI with 3D. if you are looking for a DisplayPort card you should definitely consider the second card in question.<br />
<br />
<b>pros:</b><br />
- a budget, mid to high end, performance video card<br />
- low noise levels under load and idle on reasonable settings<br />
- low idle power consumption<br />
- decent automatic cooler handling under load
<br />
- uses polymer capacitors (not 100% sure as i haven't checked all of them under the cooler)<br />
- easy to overclock<br />
<br />
<b>cons:</b><br />
- supposedly uses cheaper elements than similar models<br />
- stock fan has a steep temperature to noise ratio, but could be tolerable for gamers with headphones.<br />
<br />
--<br />
<br />
</hcon>Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-75401955480604468552012-04-08T13:31:00.000-07:002012-04-15T17:03:43.915-07:00fried remote control<div style="text-align: left;">
i have a digital tv signal receiver, which comes with a remote control. the RC recently stopped working, so i've decided to check it out... obviously there isn't much sense into doing this, considering the price of it might be ~4$, but for the sake of not throwing a circuit board for something like a single electrolytic capacitor i gave this a quick check at least.</div>
<br><br><hcon>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://2.bp.blogspot.com/-8fvW1PwbQJ0/T4HshR33HMI/AAAAAAAAATU/S7ZsyP1jyS4/s1600/P1080681.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="222" src="http://2.bp.blogspot.com/-8fvW1PwbQJ0/T4HshR33HMI/AAAAAAAAATU/S7ZsyP1jyS4/s320/P1080681.JPG" width="320" /></a></div>
<div style="text-align: left;">
the board is named "KOR K4502A"</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://1.bp.blogspot.com/-pDfk80MgcyA/T4HsiCLIk0I/AAAAAAAAATc/e5VLzwDWq9s/s1600/P1080683.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="http://1.bp.blogspot.com/-pDfk80MgcyA/T4HsiCLIk0I/AAAAAAAAATc/e5VLzwDWq9s/s320/P1080683.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
using an old russian multimeter "Gost 10374-74 USSR<span style="font-weight: bold;">" = </span>FTW</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://1.bp.blogspot.com/-MspJUCdOMVI/T4HsjDCnzoI/AAAAAAAAATk/pUp-FQMS3yA/s1600/P1080684.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-MspJUCdOMVI/T4HsjDCnzoI/AAAAAAAAATk/pUp-FQMS3yA/s320/P1080684.JPG" width="320" /></a></div>
<div style="text-align: left;">
<br /></div>
<span style="font-family: inherit;">after checking the LED with a digital camera (without IR filtering) and it did not show any indication of emission, i've tried probing the board as much as possible...under the epoxy blob there is a integrated circuit, which i don't know the specification of, yet i don't really want to touch it (remove epoxy) - it is definitely a suspect. there is a tiny S8050 J3Y NPN transistor (marked in yellow above), the collector of which goes to the cathode of the RC LED. the other important/active element is a ceramic resonator (two legs in the bottom left corner on the photo), model <span style="background-color: white;">ZTB455E, which provides a carrier of ~450KHz for the IR emission. i think the element is ok, but i might need to double check that. i don't have a scope which might have been very useful here.</span></span><br />
<span style="font-family: inherit;"><span style="background-color: white;"><br /></span></span>
<span style="font-family: inherit;"><span style="background-color: white;">after opening the RC, the first suspect was a 16V </span></span>electrolytic capacitor, which is connected in parallel to the input voltage, but it seems to be working fine.<br />
<span style="font-family: inherit;"><span style="background-color: white;"><br /></span></span>
<span style="font-family: inherit;"><span style="background-color: white;">i'm able to force an emission if i shortcircuit the transistor B/C junction, but that obviously isn't a good solution and i'm not really certain what is the cause at this point. might as well replace the RC (throw away the board) :sadface:.</span></span><br />
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<b> update:</b> i was able to exchange the remote control for a used one that works (for free). overall i think the problem was due to the main IC chip (for the keyboard control) not working correctly. <br>
--</div>
</div>
</hcon><br />Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com0tag:blogger.com,1999:blog-348256908341375413.post-8206440535886242402012-03-20T16:52:00.002-07:002013-04-29T14:37:34.259-07:00the doppelgangaz - lone sharks (album)this is the best, new hip-hop album i've heard in a while (years ?):<br />
<br />
<a href="http://www.discogs.com/Doppelgangaz-Lone-Sharks/release/2990347" target="_blank">
<img src="http://s.pixogs.com/image/R-2990347-1310678159.jpeg"/>
<br>
discogs link</a><br />
<br />
--Lubomirhttp://www.blogger.com/profile/17514066819925841643noreply@blogger.com1