tag:blogger.com,1999:blog-84023407008728132602024-03-13T06:42:21.109-07:00Jan's tech blogSometimes I fix things with solutions I figure out myself. Sometimes I have opinions. Sometimes I will write about it here. Sometime I might even put some design on this blog...
SharePoint, web development, hardware problems, retro gaming...Unknownnoreply@blogger.comBlogger22125tag:blogger.com,1999:blog-8402340700872813260.post-6426631108546730582022-01-01T07:25:00.001-08:002022-01-01T07:27:17.238-08:00Mega Man Legacy Collection 2 - decrypting game assets<p>If you own Mega Man Legtacy Collection 2, you might want to extract the games' assets (music, gallery, levels, movies, etc) for some reason. These assets are mostly in a ZIP archive named "disc", which can be opened with any application that can open ZIP achives. Anyone can browse the files in the archive, unfortunately the files themselves are encrypted.</p><p>For the first Mega Man Legacy Collection, the password can be found by disassembling the EXE file, or by watching the process memory while the game is running, as described here:</p><p><a href="http://sprites-inc.co.uk/post-20760.html">Get MMLC1 password using CheatEngine</a><br /></p><p><a href="https://www.reddit.com/r/Megaman/comments/3igzxk/mega_man_legacy_collection_is_a_fancy_emulator/">Get MMLC1 password using disassembly</a></p><p>These methods cannot as easily be used on MMLC2, at least I am not successful. Fortunatelly though, on MMLC2, the ZIP file is encrypted using the method "ZipCrypto Store", which is old and effectively broken. To crack it, all we need is:</p><p>- <i>12 bytes</i> of known decrypted plain text. Most PNG files have a 12 byte header, and this ZIP contains at least one PNG file! :)<br /></p><p>- <a href="https://github.com/kimci86/bkcrack">The tool bkcrack</a><br /></p><p>So what we need to do is:</p><p>1. Create a 12 byte file containing the PNG header as known plaintext<br /></p><p>2. Use bkcrack to crack the internal key of the ZIP archive<br /></p><p>3. Use bkcrack to use the internal key to create an unlocked copy of the ZIP archive with a password of our choice<br /></p><p>4. Use any ZIP software to extract the unlocked copy using our custom password</p><p>More detailed instructions can be found at <a href="https://www.programmersought.com/article/13436370754/">Examples on how to crack using PNG header</a> and on <a href="https://github.com/kimci86/bkcrack">the readme on the bkcrack tool (same as above)</a>.<br /></p><p><br /></p><h2 style="text-align: left;">Limitations</h2><p>- We don't get the actual password, only the internal key. This is enough to extract files from the archive, but I'm not sure if it allows us to change files in the archive. <b>Maybe </b>replacing the entire archive with an identical one without encryption would work? Have not done any experiments on this, depends completely on what checks the EXE does on the ZIP.<br /></p><p>- Many of the internal files are compressed files with "LZS" extensions. (The ZIP archive is for encryption only, not compression). Decrypting these should not be a challenge, but I haven't tested it.<br /></p><p>- Some of the games larger resources are in the "resources" folder. They may be encrypted movie files?</p><p>- The ZIP archive does not seem to contain any ROMs or other executables, only content, such as level data, fonts, music, graphics, videos, galleries etc. If ROMs or binaries are bundled in any way they are probably inside the EXE, like they were on MMLC1.</p><p><br /></p><p>As far as I know, this cannot be used for piracy or anything else of that kind. Regardless, I am strongly opposed to piracy. Please support your game developers, mkay? :)<br /></p><p><br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-76260790457167293242019-02-16T07:53:00.001-08:002019-02-16T07:55:13.961-08:00Make LG DVX-642H region freeTo make the DVD player LG DVX-642H region free, the same trick as for other LG dvd players can be used, as described here: http://multi-region.net/lg_3620<br />
In case that wiki is closed, what you do is you create a DVD with the folder "RMTM0000", with a subfolder "Scarlet", with a file named "kpjc19_1.dvd". (Some suggest the file should be uppercase).<br />
The length of the file should be 0x500004 bytes. The last four bytes (i.e. starting at address 0x50000), should be 008C1717. The rest of the file should be 00. Some versions of this suggest the file can be only four bytes long and contain "17178C00".<br />
Unfortunatelly you can't put this on a USB drive, but a DVD+RW is fine.<br />
<br />
Inserting this disc triggers a region test mode which allows you to select any region, including 0 for region free.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-75599505246959422912018-02-17T16:20:00.000-08:002018-03-22T15:10:37.402-07:00Deep dive into an old router to extract its password<b>The objectives:</b><br />
I had an old ISP provided ADSL wifi router to spare. I was hoping to increase its value slightly by checking if I would be able to use one of the LAN ports as WAN port and ignore the ADSL part, but we were never given the credentials for logging in to the web UI. Challenge accepted! :)<br />
<br />
<b>The router:</b><br />
Provided by Swedish ISP Boxer (later sold their ADSL service to AllTele)<br />
Branded name: <b>Inteno X5669A</b><br />
<br />
Original name: <b>Xavi X5669A-WP2 </b>(closely related to WP2U, same model with USB ports - they share firmware)<b><br /></b><br />
Specification: ADSL 2+, 4x10/100 Mbit LAN, 802.11b/g wifi, 2xVoIP ports<br />
Internal hardware:<br />
- ADSL/router SoC: Broadcom BCM6358VKFBG<br />
- Ethernet switch: Broadcom BCM5325EKQMG<br />
- Wifi: Broadcom BCM4318KFBG <br />
- VoIP: Legerity LE88221DLC<br />
- 32mb RAM<br />
- 8 mb Flash<br />
Router was running CFE version 1.0.37-12.5<br />
Firmware version was X5669A-WP2U_3.12UVNT10.08<br />
<br />
<b>Looking for the obvious...</b><br />
(Unsuccessful stuff is greyed out, including it since it might have worked for other routers)<br />
<br />
<span style="background-color: #cccccc;">- Lots of googling, tried every default credential I could find and think of (admin/admin, admin/serialnumber, etc), or trying to find a firmware update of this or a similar router that might contain the default credentials. No luck.</span><span style="background-color: #cccccc;">- Tried Telnet, SSH, etc - but these also required credentials.</span><br />
<span style="background-color: #cccccc;">- Contacted Boxer and AllTele asking for the default credentials - no luck.</span><br />
<span style="background-color: #999999;"><span style="background-color: #cccccc;">- Using Firefox dev tools I was able to see in the HTTP headers which HTTP server it used, trying to find exploits of it but no luck</span><span style="background-color: #999999;"></span></span><br />
- Resetting to factory settings by holding reset for 10+ seconds - no luck, but curiously it changed the Wifi name from the previous Boxer_XX to Inteno_YYXX (XX amd YYXX being the last digits of the MAC address). This might have affected the password as well!<br />
<br />
<b>No luck... Time to open it up </b><br />
- Opened it up, looking for serial port and JTAGs - yes to both!<br />
- Bought a CP210x (USB to Serial adapter with 3.3 and 5V support) for like 15 SEK on ebay. Initially I didn't get it to work - first Windows 10 just spammed me with "the device has malfunctioned", until I tried a different USB port (maybe it had problems with USB 3). Then I needed drivers.<br />
- Checked the settings of the device in device manager, I found that the COM port became called "COM6".<br />
- Used multimeter to find ground pin of the serial (black on a grounded point on the PCB, red on each of the four pins. All but one shows 0 while the others shows 3.3V - that one is the ground. Then just took a semi-wild guess and actually picked the right pinout on the first go: <b>"GROUND - NC - VCC (3.3V) - RX - TX"</b> - the TX goes to the RX on the adapter and vice versa. Note: Never connect VCC pin.<br />
- Tried to access the device with PuTTY. With cables connected as such, I just got a lot of garble. Changed the bit rate from the default to 115200, both in device settings in Windows and in PuTTy. Success - the CFE boot loader gave me a boot menu! :)<br />
<br />
<b>Using CFE</b><br />
<span style="background-color: #cccccc;">- Sadly, all of the obvious commands in CFE (such as "save") was not enabled in this version. There were plenty of commands to erase or write to Flash but that is not what I need.</span><br />
- However, the CFE allowed download an image from TFTP to RAM, and run it from there... but what image to use?<br />
<br />
<b>OpenWRT to the rescue!</b><br />
- OpenWRT supports at least the BCM63xx, so I created an Ubuntu VM, downloaded and installed the prerequisites and the code repository, selected the proper hardware (generic BCM63xx), "ramdisk" as target, and compression disabled.<br />
- I then used Solarwinds free SFTP server on Windows box and hosted the OpenWRT image I built. I hooked the PC and the router with Ethernet cables.<br />
- I configured CFE ("c" command) to a manually selected IP address of the PC, specified that it should boot from host ("h") instead of flash ("f").<br />
- Got error code "-18". Solarwinds log was empty. Removed a switch that sat between the router and the PC, and disabled the Windows firewall.<br />
- Succes! OpenWRT was booting!<br />
<br />
<b>Getting the Flash content</b><br />
- With OpenWRT running, I could use dd to copy the raw flash data from /dev/mtdX (X = 0-4) to files in the /tmp folder:<br />
<pre class="code">dd if=/dev/mtd0 of=/tmp/mtd0backup</pre>
- I could then use WinSCP to transfer the content to my PC.<br />
- I then used a hex editor (HxD) to simply search for "user" and "password" in the flash image files.
- In mtd1 I found quite a few interesting passwords, but the most interesting was [sysusername value="admin"] and [syspassword value="cGliNk9FWXZ5Qg=="]. (XML angle brackets replaced with square brackets because Blogger...<br />
- The "==" at the end of the password makes it look like it is base64 encoded. Decoding it gave me the password "pib6OEYvyB".<br />
<br />
And indeed, <b>admin </b>and <b>pib6OEYvyB</b> where the correct credentials for this device. Victory! :)<b></b><br />
<b><br /></b>
<b>Further work...</b><br />
<br />
And no... the current web UI doesn't allow using a LAN port as WAN port... :( Perhaps some configuration changes could be done to make it happen...<b><br /></b>Would be nice to get OpenWRT running on this, though it seems from the wiki that it is not likely to have wifi drivers for this device (and ADSL and VoIP certainly wont work). I'll look closer into this another day...<b><br /></b><br />
<b><br /></b>
<b>Very thankful for OpenWRT, enabling stuff like this!</b>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-8402340700872813260.post-76647274321665873262017-12-22T13:45:00.003-08:002017-12-22T13:47:55.077-08:00Checklist for freshing up computerI am wondering how much perfectly good computers are thrown out that could have been saved by a reinstallation of Windows (sometimes not even that).<br />
<br />
This is what I do when someone asks me to have a look at their computer:<br />
<br />
(Do everything behind a firewall and without any other devices in the network if there is a risk of it having a virus! If you KNOW it has a virus, deal with that first - worst case wipe hard drive using a safe, secure (but disposable) environment).<br />
<br />
<b>1. Is hardware OK?</b><br />
Visual inspection, are fans clogged up?<br />
<br />
Charger cable worn out? (often close to the connector at the PC end) - this can literally cause fires<br />
<br />
Dust clogged up in fans? (Causes fans to spin faster to compensate, makes PC louder, hotter and the fan will break down sooner)<br />
<br />
(start PC)<br />
<br />
Does the fans sound healthy?<br />
<br />
chkdsk X: /R (for each hard drive, C, D, etc).<br />
<br />
Seagate SeaTools for Seagate hard drives<br />
<br />
WD Windows Data Lifeguard (WinDLG) for all hard drives<br />
<br />
Windows memory diagnostics (start menu -> type: mdsched)<br />
<br />
Any serious errors - look closer into that part, make sure there is no false positive, replace any hardware determined to actually be bad<br />
<br />
Bluescreens happening? Maybe some bad hardware, but more commonly caused by bad drivers. Enable further logs and investigate based on information in bluescreens.<br />
<br />
If it can be done, upgrade to 4 gb ram or more and an SSD, SSHD or at least a 7200rpm drive.<br />
Definitly make sure it has at least 80gb drive (death to absolutely useless 32gb eMMC!)<br />
<br />
Check UEFI and firmware updates for other hardware from PC maker, hard drive firmware update from hard drive maker.<br />
<br />
<br />
<b>2. Is software OK?</b><br />
<br />
What version of Windows is suitable?<br />
- Windows XP - do not use! Upgrade if hardware can supports it<br />
- Windows Vista - not as bad as people say but if you can, but pretty much zero drawbacks of upgrading at least to Windows 7<br />
- Windows 7 - if user is happy, no problem keeping it, but can be upgraded to Windows 10 if user wants to.<br />
- Windows 8, 8.1 - strongly recommend upgrading Windows 10<br />
<br />
Note that if you have a legal license for Windows 7 and forward (e.g., it came with the computer), it can be upgraded to Windows 10 - you can simply download it from <a href="https://www.microsoft.com/software-download/windows10">Microsoft's website</a>. (DO NOT download it from any website not on "microsoft.com"). When asked for licence key, type the key on the sticker on the computer. Windows 10 installation will accept most keys for Windows 7 newer. If the Windows sticker on the computer does not have a licence key on it, the key is stored in the computer's UEFI (BIOS) and you can just click "I don't have a licence key" during the installation.<br />
<br />
Even if Windows version is good or not, do the rest of the list first before upgrading, system needs to be healthy before upgrading<br />
<br />
Then...<br />
<br />
Make sure some virus software is running, at least Windows Defender. Make sure it and it's virus definitions are up to date. Run a full scan and make sure it is not finding anything.<br />
<br />
Is Windows Update working properly? Sooner or later it tends to break in one way or another. Are recent updates installed? Is any update repeatedly being installed? Get those problems fixed.<br />
Configure WU to "include software for all Microsoft software". Check for updates manually until it specifically says there are no more updates.<br />
<br />
Disk clean up ("include system files")<br />
<br />
Clean temp folders (disk clean up does usually not clear up everything)<br />
<br />
Defrag (unless system is on SSD), check defrag is scheduled<br />
<br />
For each web browser, disable every add-on/plugin that is useless. Make sure default home page and search engine is the one the user want to use.<br />
<br />
Update drivers for everything (from PC maker and/or separate device manufacturers)<br />
<br />
Make sure all partitions have at least 15% free space (except "recovery" partitions, boot system partitions etc<br />
<br />
In Startup tab of Task Manager, disable everything useless<br />
<br />
Check services and make sure there is nothing inappropriate running<br />
<br />
Make sure computer is running the performance profile "Maximum performance"<br />
<br />
Check BIOS/UEFI settings. Reconsider all settings that affect the priority between performance, noise and heat. (E.g. "best performance" vs "best acoustics". Usually make sure everything is set to best performance, then noise, then heat.<br />
HP laptops often have option "Fan always on" - disable it. No reason to have fan running (and getting worn out) if the computer is not hot enough.<br />
<br />
<br />
Update everything, such as Flash, Acrobat, Java, web browsers, and generally everything else that says it needs to be updated<br />
<br />
Clear CCM cache - Control Panel -> Configuration Manager -> Cache<br />
<br />
Use Task Manager and Resource Monitor to see which the hardware bottlenecks are, and what processes are taking the most resources. Disable theses processes by appropriate measuers (e.g. uninstalling useless applications).<br />
<br />
<b>3. Still sluggish?</b><br />
<br />
Take a backup, wipe it, install Windows from scratch...Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-37594854787809339422017-01-13T17:20:00.000-08:002017-01-13T17:37:12.426-08:00Dear all web developers out there... Can we talk about some things?I use the web sometimes. Here are some practices that needs to end, now!.<br />
<br />
1. Page scrolling up and down on mobile devices.<br />
So I go to a long web page on your mobile device, sometimes not with the fastest connection. Top of the page loads, I scroll down. Since not all of the huge images and ads has loaded yet, the content scrolls up and down for ages until the page has finished loading. Developers, please pre-define the height of the content as much as possible (especially images) in the HTML so it doesn't have to be readjusted after the content has loaded!<br />
<br />
2. Banners that scrolls the page<br />
So there is some cookie warning or what
not as a banner on top of the page. Please, don't make it so the entire page scrolls 30 pixels down just as I am about
to click a link... (I'll appreciate any irony if there is such a cookie warning on this page. :-D )<br />
<br />
3. Popups (aka modal dialogs)<br />
A long time ago, pages used to open popups as new browser windows. People hated them, so browsers started blocking them. Then web designers started making in-page popups instead. Granted, there are many cases where this is perfectly fine. But to show errors or alerts or especially ads, are usually NOT. Even worse, the implementations are often slow and jerky and jumps around and the "X" icon are hard to find or moves around until the popup has finished loading. Please just integrate your message into the rest of the page instead!<br />
<br />
4. Full screen ads appearing after I already started reading the page<br />
See title. It just makes me hate your site and the advertiser more than otherwise. Especially if the scroll position is reset after I close the ad.<br />
<br />
5. target=_blank<br />
I know how to use "Open in new tab". If I clicked the link without selecting "Open in new tab", I did not want it to open in new tab. Open in same tab, please.<br />
<br />
Let's make the world a better place! :)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-62393864154478812732016-11-12T09:58:00.002-08:002016-11-12T09:58:36.437-08:00Intel SSD Toolbox - installation fails, reboots Windows before installation is completed<b>The problem:</b><br />
I wanted to install Intel SSD Toolbox 3.4.0.400. After clicking Next a few times in the wizard and the actual installation has started, Windows reboots and the installation is interrupted. Nothing of Intel SSD Toolbox is installedor changed.<br />
Additionally, for each interrupted installation, a number of folders called "IIxxxx.tmp" (xxxx = random characters and numbers) are left in the C:\Windows\Temp folder, each containing 300+ MiB.<br />
<br />
<b>The cause:</b><br />
The first thing the installer does, is to run the included vc_redist.x86.exe. This is the Visual C++ Redistributable runtime installer - essentially an installation program which installs a few DLLs that the toolbox apparently requires. On my computer, the VC++ runtime installer determined my computer needed to reboot. The Intel installer should have ran this installer with the command line that instructs the installer to suppress such reboots, but it does not.<br />
<br />
<b>The fix:</b><br />
Download the installer.Run it.<br />
Wait while "Please wait while setup initializes".<br />
When the installer is waiting for you to hit Next at the first step, do NOT press it.<br />
Instead, open C:\Windows\Temp.<br />
Find the LAST folder (order by Modified date) called "IIxxxx.tmp". Check the modified time - it should be just a minute ago.<br />
Open the Dependencies subfolder. It should contain a file called vc_redist.x86.exe file, and a few DLL files.<br />
Rename the vc_redist.x86.exe file something else or delete it.<br />
Find any other exe file - I picked C:\Windows\notepad.exe.<br />
Copy it to the Dependencies folder and rename it to vc_redist.x86.exe.<br />
Go back to the installation wizard and hit Next to let installation proceed.<br />
Hopefully installation should be fine.<br />
After completion, the installer will ask you properly to reboot. Do so.<br />
After reboot, make sure to remove all of the "IIxxxx..tmp" folder in your Temp directory to avoid wasting disk space.<br />
Complain to Intel that the installer has a bug.<br />
<br />
<b>Note:</b> If the toolbox doesn't work properly, or if installation now fails at a later stage, you might have a problem with the VC++ runtimes. One thing to try then, is to follow the instructions above, but copy the vc_redist.x86.exe file to a separate folder and run it on its own by just double clicking it. It should show you a GUI offering to install, repair or uninstall the runtimes. You could also try downloading the runtimes from Microsoft.<br />
<br />
<br />Please leave me a comment if this helped you or not!Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-8402340700872813260.post-2540592508662828512016-09-01T07:59:00.001-07:002016-09-01T08:01:15.192-07:00"Back to the Future: The Game" episodes 2-5 not downloading on iPad MiniI played the first free episode of "Back to the Future: The Game" (1.6) on my iPad Mini (with iOS 9.3.5). Everything was fine and I decided to buy the bundle with episode 2-5. However, downloading the episodes (over wifi) persistently froze somewhere between 1% and 12%. After a long time, the game would then either close or give an error message about losing internet connection. I would then have to restart the download. I contacted <a href="https://support.telltalegames.com/hc/en-us/requests/new">Telltale's support</a>, they responded quickly and with a lot of suggestions (restart the iPad, close all other apps, try another Wifi connection, keep trying, try a VPN), but neither of them made a difference.<br />
<br />
I found <a href="http://back-future-game.appstor.io/app-reviews">this page</a> where some people suggest using cellular data instead of wifi connection to get the episodes. That was not an option for me, as my iPad model is wifi only. However it gave me the idea to try to connect to the internet using internet sharing/tethering over Bluetooth from another device. Using Bluetooth internet sharing on my low end Lumia Windows Phone, I was able to download the episodes on the first attempt.<br />
Note that similar Bluetooth internet sharing on an old HTC One M7 was not successful - the iPad was not able to connect to internet at all using that.<br />
<br />
<b>So - things to do if you suffer this issue:</b><br />
- Contact Telltale support, even if you manage to solve this issue yourself using workarounds - if they do not know how many are having this issue, they wont fix it.<br />
- Try either cellular data or Bluetooth internet sharing from another device, instead of Wifi, if you can.<br />
- If it doesn't work over Bluetooth with your device - check if you have Internet connection at all over Bluetooth. If not, try another device, iOS is incompatible with many devices.<br />
- <a href="http://www.imore.com/how-to-get-refund-itunes-app-store">Demand a refund</a> if neither of the above helps.<br />
- Mention this issue on App Store review etc.<br />
<br />
Don't hesitate to leave a comment if this helped you or not!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-24480207204127423462014-01-04T18:34:00.003-08:002014-01-04T18:36:58.794-08:00Howto: Changing region on PS1 savegamesMaybe like me you have a bunch of PS1 games of PAL region, that you have replaced with the often much better NTSC U/C versions? Then you should know that while the PS1 memory cards are region free and can contain save games of mixed regions, the savegames themselves have regional tags set on them so that savegames made by a different regional version of a game while always show up as generic "used block" as if it was created by any other game.<br />
<br />
<br />
Fortunatelly, for plenty of PS1 games, it is possible to change the region of savegames.<br />
<br />
It should NOT matter if the game is a "PSOne classic" from PSN or a physical game. It should not matter if the game is "Greatest hits"/"Platinum" or not etc.<br />
It DOES matter if the game has any kind of in-game differences - if the game actually expect different data in the savegame, anything could happen, so keep a backup of the original savegame, as well as all other save games on the memory card. I play on PS3 so I have one virtual card for each game.<br />
I have tried converting 4 games so far from PAL to NTSC (FF1, FF4, Medal of Honor, Breath of Fire IV), no problems so far.<br />
I have no idea of the success rate converting to and from Japanese saves!<br />
Also note that it is impossible to via PS1/2/3 browsers/memory card utilities see the difference between the different regionalities so try to keep them appart so you don't get them mixed up. These browsers will always concider saves of different regions as from different game, so they are always possible to have side-by-side but since their icons and names will not differ it might get confusing.<br />
<br />
You will need a way to get savegames from and to a Windows PC - DexDrive, a PS2 that can run ULaunchElf or some Game Genie or such, the PS3 Memory Card adapter, USB stick, etc. Best option depends on your situation and available hardware.<br />
<br />
<br />
<br />
* Download MemCardRex from: http://shendosoft.blogspot.se/ .<br />
<br />
* Start the game of the "target" region. Create a dummy save on an empty memory card. Many games have virtual "slots", if possible you should create saves in the same "slot" as your real save game.<br />
<br />
* Use any method to copy both the original save games as well as the dummy save games to and from a Windows PC.<br />
<br />
<br />
* In MemCardRex, select Edit -> "Import save". Open the dummy save.<br />
<br />
* Right click on the imported save, and click "Edit save header".<br />
<br />
* Note all of the values. SCxS-yyyyy is the product name under which the game was sold as in the region. "x" is E for Europe (PAL), U for NTSC U/C, P for NTSC Japan. yyyyy is a five digit number, each games number is different for every region. Also note the Identifier, which is a string the game use to separate its own games. A few games contain region in this string as well (for example Breath of Fire 4 has "BOF4xxyy" where xx is the "slot" (00-14) and yy is the region (US for US, PL for PAL, unknown for Japan).<br />
<br />
* Now import the original save, and select Edit save header, and change the SCxx-xxxxx, the region dropdown, and if needed, the regional code in the ID.<br />
<br />
* Right-click and select "Export save". Select an appropriate format. Since the product code (SCxx-xxxxx) is a part of the file names, it is normal that the exported file has a different file name than the original one.<br />
<br />
* Move the modified game to your memory card.<br />
<br />
Troubleshooting:<br />
* In PS1/2/3 interface, save has garbled graphics and/or text - the save file is completely invalid. Check which format you exported the save from in MemCardRex, and check how you copied it to your PS1 memory card.<br />
<br />
* Save looks fine in PS1/2/3 interface, but game only shows save as a block used by another game: Check that all the regional parameters were changed to the values corresponding with the "target" region.<br />
<br />
* Save looks fine in PS1/2/3 interface, but game crashes or glitches when reading the memory card, when loading a savegame, or later during gameplay. Or, there are items missing in inventory, you are on the wrong level or in the wrong state - the save is probably not compatible with the new region.<br />
<br />
Hope this was of use to anyone!<br />
<br />Unknownnoreply@blogger.com7tag:blogger.com,1999:blog-8402340700872813260.post-67302782856257424812013-07-10T15:32:00.000-07:002013-09-05T08:06:51.473-07:00Nvidia nForce4 / geforce 6150 LE crashingI had an old Fujitsu-Siemens Esprimo E5615, which has a Nvidia nForce 410 or 430 chipset, with integrated GeForce 6150LE, running Windows 7 64-bit and the latest drivers supporting the GPU (version 307.83, according to Windows Update, Nvidia Update och Nvidia website)<br />
<br />
<b>The problem:</b><br />
* When playing movies encoded with VC-1 in Windows Media Player, the video would not be displayed properly and within seconds the computer froze, the graphics driver crashed, or I got a blue screen with various messages, often with a message that the graphics drivers timed out and could not be restarted. <br />
<br />
* When calculating the Windows Experience Index, the computer crashed in similar ways during the "Windows Media" assessment. <br />
<br />
<b>The cause:</b><br />
This seems to be an issue with the graphics driver, which crash on hardware accelerated VC-1 decoding. Note that the WEI crash while invisibly decode a VC-1 encoded file, "Clip_1080_5sec_VC1_15mbps.wmv", in C:\Windows\Performance\WinSAT. (SAT = System AssessmentTool).<br />
<br />
<b>Workarounds:</b><br />
* Ignore the WEI and don't watch VC-1 files :) <br />
<br />
* Get an older driver. For example, 285.79 (beta) seems to work while 296.10 (whql) does not, so somewhere between there, the bug was introduced. Obviously, any improvements done to the driver after will dissappear <br />
<br />
* Disable video hardware acceleration. This can be done in Windows Media Player -> menues (press Alt to make them appear) -> Performance tab -> Tools -> Options -> uncheck "Turn on DirectX Video Acceleration for WMV files". This will fix WEI and will make VC-1 videos play without crashing, but these, and all other WMV files will no longer have hardware acceleration and thus worse performance. (Note: DirectX Video Acceleration = DXVA). If other applications use DXVA, these may have to have hardware acceleration disabled as well.<br />
<br />
* Get another GPU if the computer has expansion ports. :) Make sure to get one that doesn't demand more than your power supply can handle. Remember to disable the 6150 (so it doesn't take up RAM and other resources) and uninstall its drivers.<br />
<br />
If you have a better workaround, please let me know :)<br />
<br />
<br />
<b>Other ideas:</b><br />
Some things that I tried that didn't help me in this case but might help someone else:<br />
<br />
* Run Memtest86+. Faulty RAM is the cause of many strange problems.<br />
<br />
* You can run WEI in console mode, just open a command prompt as administrator and run "winsat". It has various parameters to output reports and to only run particular tests. run "winsat -?" to show all parameters. Run "winsat >> c:\somelogfile.txt" to generate a log file. Also note that winsat can generate some XML report. This lets you troubleshoot various issues that happens during WEI problems.<br />
<br />
* If the computer just restart with no explanation, maybe you got a bluescreen and the computer has been configured to restart automatically on errors. To change this, hold Win + Pause/Break button (in the upper right corner of your keyboard) -> Advanced system settings -> Startup and Recovery -> Settings -> uncheck "Automatically restart".<br />
<br />
* Also try VMT, video memory stress test, from http://www.mikelab.kiev.ua/index.php?page=PROGRAMS/vmt . Like memtest but will run on the graphics RAM.<br />
<br />
* Note that the drivers included in the nForce4 driver package is ancient, so answer "no" to the questions if you want to install them in the installation wizard of the nForce4 drivers.<br />
<br />
* The nForce4 seems to have some problems with random hard drive corruption. If you have this chipset, try taking a big file and make multiple copies of it, preferably back and forth between two different (internal) hard drives, then run "comp" to ensure they are all identical.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-48935722410578370402013-04-03T16:31:00.004-07:002013-07-10T15:35:36.960-07:00Problem with Samsung SyncMaster SA300 24" (LS24A300BS/EN)I received a broken Samsung monitor (model name/no in title) that some else had given up on. When no cable was attached, it seemed to work great, with a "No signal" message floating across the screen. As soon as a cable with signal was passed however, the screen would go completely black (no backlighting). The problem was fixed with a firmware update available on Samsungs website. I had to use a DVI cable to get the update software to detect the monitor in Win7 64-bit, but did not have to install monitor specific drivers beforehand, only the firmware update was required. I tried at first to update using VGA cable - that didn't work (that laptop might have been incompatible as well).<br />
<br />
Unfortunatelly I managed to order a new mainboard - part no BN96-18431A, supposedely compatible with BN94-04264A and should work in LS24A300BS/ZA as well - I'll try to cancel that order but if I can't, then I guess I have this spare mainboard to sell :)<br />
<br />
By the way quality of this monitor is shit. I wouldn't recommend anyone buying it :) However it's low power consumption (< 30W), external supply, no inverter board and generally very few components to fail and very few and small capacitors to break, one would think it would be fairly reliable, but not as long as they make this shitty firmware for it :( Also its a screwless design held together with plastic hooks. Cheap cheap cheap. This is my first Samsung monitor, probably my last too...<br />
<br />
Some good resources that helped me when I was troubleshooting the monitor, or that might be useful to other people having problems with their monitor<br />
<br />
<a href="http://www.badcaps.net/forum/">Badcaps.net Forums</a> - great forum for troubleshooting monitors and other things (things with failed capacitors in particular) :)<br />
<br />
<a href="http://www.pacparts.com/">PacParts</a> - original spare part store, ships internationally and relatively cheap<br />
<br />
<br />
<a href="http://www.shopjimmy.com/">ShopJimmy.com - </a>great second hand spare part store<br />
<br />
<a href="http://youtu.be/BEPWrefQvqI">Understanding and finding Samsung monitor part numbers</a> - very good information, note that Samsung parts can have many BNXX-numbers on them but it's important to look for the proper ones. On my mainboard the partno was hiding in the middle of a long alphanumeric string (close to a barcode). while plenty of other less important BN numbers were printed on stickers and parts across the board.<br />
<br />
I hope this useful to anyone!Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-8402340700872813260.post-38827555927597044372012-06-23T03:33:00.001-07:002012-07-05T13:42:15.214-07:00Emulating Virtual Boy on a 3D TVInspired by <a href="http://www.bureauvoorgamers.nl/?p=4860">this video from "Bureau voor Gamers"</a>, I wanted to try playing some Virtual Boy on a modern 3D TV. It was a bit tricky so I'll share how I did it. What I have is a Panasonic DT50 and a computer connected to the PC using HDMI, running Windows 7 64-bit.<br />
<br />
<br />
First off, the TV must support "side-by-side" video. This is when the two images (left and right eye) are horizontally compressed to half their width and displayed side by side. My Panasonic <i>sometimes</i> automatically detect this signal as a 3D signal, but sometimes I will have to go the the 3D menu, press the button to go to manual signal selection, and select the "side by side -> 3D" option.<br />
<br />
This means your computer/graphics card does NOT have to support 3D in any way! With an emulator that can output side by side video in fullscreen, it will work with any computer, drivers, cables etc as long as your TV supports the mode.<br />
<br />
So here's how to do it:<br />
* Get Medafen from <a href="http://mednafen.sourceforge.net/">http://mednafen.sourceforge.net</a> . I got 0.9.22-WIP.<br />
* Unpack it and change the cfg file: Find the "vb.3dmode" and change it from "anaglyph" (the classic red/blue mode) to "sidebyside".<br />
* Change "vb.stretch" to "full".<br />
* Change "vb.3dreverse" if and only if the images are reversed (i.e. stuff that should be in the background appears to be closest to you)<br />
* Run the emulator (has to be started from command line, like "mednefaren filename.vb<rom file="">"). It should be displayed in a very wide window, with two images displayed side by side.</rom><br />
* Press Alt+Enter to go to fullscreen. The two images should be horizontally compressed.<br />
* Set the 3D mode on your TV if your TV doesn't detect it automatically. You may have to select 3D mode manually (for example "Side by side -> 3D")<br />
<br />
There you go! Don't hesitate to comment if you run into any problems or want to add something.<br />
<br />
Some notes:<br />
* Mednafen is also <a href="http://wiibrew.org/wiki/WiiMednafen">available for Wii</a> (WiiMednafen). 3D settings are not available in the UI but they might still be set in the config file.<br />
* Don't bother with "WiirtualBoy" for Wii, it's been superseeded by WiiMednafen!<br />
* I also tried "<a href="http://goliathindustries.com/vb/">Reality Boy</a>" and "<a href="http://www.planetvb.com/modules/tech/index.php?sec=emus&eid=rdragon">Red Dragon</a>" (Red Dragon is the one used in the video I mentioned above), they both looked fine in windows mode but all the colors got messed up when running them in fullscreen.<br />
* If you like the games or the console, you should <b>buy them</b>!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-36610932219433373272012-06-06T08:30:00.000-07:002012-06-06T08:30:37.416-07:00FAT32 FormatterI needed to take a backup of my PS3 hard drive. The USB drive to backup to must be formatted with FAT32. Windows wont format partitions larger than 32 GB with FAT32 so you'll have to use a third-party utility for that. (The limitation is <i>not </i>due to technical reasons, the limit is strictly artifical to make people stop using FAT32.)<br />
<br />
This good utility worked fine for me, in Win 7 64-bit:<br /><a href="http://tokiwa.qee.jp/EN/Fat32Formatter/">http://tokiwa.qee.jp/EN/Fat32Formatter/</a><br />
<br />
Also tried this WDs formatting utility, but that only works on specific WD external drives:<br />
<a href="http://support.wdc.com/product/download.asp?groupid=113&sid=34">http://support.wdc.com/product/download.asp?groupid=113&sid=34</a><br />
<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-76311723692892089302012-05-31T12:46:00.004-07:002012-05-31T12:52:36.200-07:00Problems upgrading WiFi + BlueTooth on HP laptop<b>My mission: </b>Upgrade the Broadcom 54mbps WiFi in my old HP 530 laptop to something faster, "Intel Centrino Advanced-N 6230" (300mbit N-card with Bluetooth). It was not as easy as I first thought :(<br />
<br />
<b>First problem: Full-length vs half-length PCI Express Mini. </b>The newer card was (like most other cards) half-length, to fit that in the older computer I needed an adapter which was about €1 on eBay.<br />
<br />
<b>Second problem: "104-Unsupported wireless network device detected". </b>The BIOS of most HP/Compaq laptops whitelist only a few specific wifi cards and will not boot if they detect any other card. This is f*cked up and this alone makes me never buy an HP laptop again (or a Lenovo, which appearantly does the same). I bought the laptop, let me do what I want with it!<br />
Fortunatelly, some very skilled people have found ways to disable the lock-out in the BIOS and have published these hacked BIOSes. See links below.<br />
<br />
Just make sure you don't accidentally downgrade your BIOS. And of course, do this at your own risk, etc :)<br />
<br />
<b>Third problem: No Bluetooth device detected by Windows.</b> The wifi device was found in device manager and worked fine after I downloaded the appropriate drivers. However, no Bluetooth devices were found or listed in the device manager - like the Bluetooth didn't even exist. Unfortunatelly, after reading a bit about the PCI Express Mini standard, I realize that it has two interfaces: PCI-e and USB. I think that the Bluetooth portion of the card works over the USB interface, while the wifi use the PCI-e interface, and that none of my two computers implement the USB interface, only the PCI-e interface. Either that or only the BT component of my card is broken, but I think that is less likely. So... Pity, I'll have to get a Bluetooth USB dongle I guess. But at least the wireless is a lot faster now :)<br />
<br />
Please let me know if this helped you! Also please share any additional findings about this if you can!<br />
<br />
Links I learned stuff from:<br />
<br />
<a href="http://forums.mydigitallife.info/threads/7681-This-is-no-request-thread%21-HP-COMPAQ-bioses-how-to-modify-the-bios/page111?p=333358#post333358">http://forums.mydigitallife.info/threads/7681-This-is-no-request-thread!-HP-COMPAQ-bioses-how-to-modify-the-bios/page111?p=333358#post333358</a><br />
<br />
<a href="http://www.pugetsystems.com/parts/Networking/Intel-WiFi-Bluetooth-6230-300-Mbps-Mini-PCIe-Card-W-Desktop-Adapter-8591">http://www.pugetsystems.com/parts/Networking/Intel-WiFi-Bluetooth-6230-300-Mbps-Mini-PCIe-Card-W-Desktop-Adapter-8591</a><br />
<br />
<a href="http://www.allpinouts.org/index.php/PCI_Express_Card_and_PCI_Express_Mini_Card">http://www.allpinouts.org/index.php/PCI_Express_Card_and_PCI_Express_Mini_Card</a><br />
<br />
<a href="http://en.wikipedia.org/wiki/PCI_Express">http://en.wikipedia.org/wiki/PCI_Express</a>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-8402340700872813260.post-57578750772895415282012-05-08T12:39:00.000-07:002012-05-08T12:49:56.017-07:00Backup savegames from Indiana Jones on Steam (and probably other games)I needed to copy the savegames for the Steam/LucasArts/SCUMM game "Indiana Jones and the Last Crusade" from one Windows 7 PC to another. The files were not that easy to find...<br />
<br />
The files are located here:<br />
"C:\Program Files (x86)\Steam\steamapps\common\indiana jones and the last crusade\INDY3\savegame.___"<br />
and <br />
"C:\Users\<your username>\AppData\roaming\LucasArts\Indiana Jones and the Last Crusade\*.*"<br />
<br />
<username>You need to copy the both the "savegame.___ " file and all files in the other folder and copy them to the corresponding location on the other computer.</username><br />
<username><br /></username><br />
<username>I would guess this applies to other Steam/LucasArts classics as well.</username><br />
<br />
<username>Also note that using the Steam function "Verify integrity of game cache" can actually overwrite your Indiana save games! This is because Steam thinks the "savegame.___" file is a game data file and thus overwrites it with some file one they have on their servers! Because they don't change the other files, they will mismatch and wont be possible to load. That happened to me, but I was fortunate enough to recover my savegames by using system restore (or whatever it is called) - right-click on the file, Properties, Previous versions. Copy the old version.</username><br />
<br />
<username>Based on the fact that one of the savegame folders are for all users, and one which is specific for the current computer user, I think trying to run the game using different Windows accounts on the same computer would probably not work and might corrupt savegames!</username><br />
<br />
I would be happy to post this info to Steam's support and the Steam forums instead, but because they for some moronic reason require separate accounts, I write about it here instead.<br />
<br />
<username>By the way, I wouldn't recommend anyone to buy the LucasArts classics from Steam. Even though non-steam of the games are made for DOS/Amiga/etc, you can use ScummVM to play the games on virtually any operating system and hardware.</username><br />
<br />
<username>Hope this was usefull to anyone!
</username>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-81479286179823367442012-02-05T10:45:00.000-08:002012-02-05T10:47:43.793-08:00PAL vs NTSC - what to play?Some things you should know:<br />
<br />
Japan/America and Europe use different TV systems (NTSC and PAL respectivelly). This matters, because video games must be adjusted for the different for the different formats. Because NTSC is a bigger market, games are usually adjusted for NTSC, and only a cheap PAL conversion is made, running in wrong speed (slower than it should) and with lower resolution (picture is letterboxed and "squeezed"). See comparison between NTSC and PAL here:<br />
<br />
http://www.youtube.com/watch?v=ZmMXA7FpR_U<br />
<br />
This was an issue all up until the PlayStation 2/GameCube/Xbox generation! For example, Final Fantasy X has a horrible PAL port (notice how the lipsynch is always good at the beginning of lines, but gets progressivelly worse the longer the conversation is...)<br />
<br />
It is also an issue when playing Virtual Console/PSN games, see for example:<br />
<br />
http://www.youtube.com/watch?v=T4gKOD4K088<br />
<br />
So - which games should you play to get the best experience?<br />
<br />
<b>Portable consoles</b><br />
Play anything, no difference in performance!<br />
<br />
<b>NES</b><br />
Get an NTSC console and NTSC games. Most PAL games (with some exceptions) are horrible ports. A PAL console can easily be modified to be region free, but games will still run in the slower speed!<br />
<br />
<b>SNES</b><br />
<br />
Get an NTSC console and NTSC games. Most PAL games (with some exceptions) are horrible ports. A converter can let you play most NTSC games on your PAL console - but the games will still run in the slower speed! If you're handy with a soldering iron, you could do this: http://www.gamesx.com/importmod/snes5060.htm - but remember that many games are "semi-ported" (for example, speed of music has been corrected but nothing more). Also, while the speed may be corrected for PAL games, you will still get a letterboxed and squashed video.<br />
<br />
<b>Nintendo GameCube</b><br />
<b>Sony PlayStation</b><br />
<b> Sony PlayStation 2</b><br />
Get NTSC games, and any machine that can play NTSC games, if they run they will run properly (not including disc swap mods etc!) Many PAL games are bad ports.<br />
Note that some NTSC PS2 games can even do 480p (as opposed to 480i)! This option is almost always removed in the PAL port.<br />
<br />
<b>Nintendo Wii</b><br />
PAL ports of Wii games are fine. On Virtual Console, the "import" games are fine (including Final Fantasy VI and Super Mario RPG), they run in proper NTSC speed and resolution. Avoid all other games that can be purchased in the European VC store as they are the same shitty PAL ports as when they were originally released. Try to get games from a store in an NTSC region instead. TurboGraphx games found in the VC store are always fine, that console were built so that games did not have to be adjusted for NTSC/PAL!<br />
<b><br />
</b><br />
<b>Sony PlayStation 3</b><br />
For physical PS1 and PS2 games, see above (get NTSC games). NTSC/PAL is no longer something to care about on PS3 games, and PS3 games are region free (all PS3 games works on all PS3 consoles). The PS1 games found in the european PlayStation Stores are bad ports. From any console you can, however, access any store, just lie about which country you live in, but NTSC PS1 games MAY not play on a PAL machine or vice versa (when launching it, you may get an "invalid video mode" message).<br />
<br />
Notes:<br />
- For consoles not listed, I don't know.<br />
- There are no one NTSC region - Japanese NTSC consoles wont run north american NTSC games.<br />
- Regardless of console, viewing NTSC signal may may require certain cables. Component and RGB has a higher probability of working with most TVs than the common composite and RF cables.Unknownnoreply@blogger.com8tag:blogger.com,1999:blog-8402340700872813260.post-27303274379463129592009-09-14T05:14:00.000-07:002009-09-14T05:41:20.987-07:00Some tips for working with URLs in the SharePoint Object ModelOk, so concistency is not one of the strenghts of the SharePoint OM.<br /><br />Here's a couple of tips that might just save you from some headache...<br /><br /><strong>1. SPListItem.Url does not make any sense<br /></strong><br />A typical value is "Lists/MyList/31_.000" where 31 is the list ID, and 000 somehow represents the version number. Of course, if you prepend the web URL and open this in a web browser, you get a 404. Great. If you want to send the user to the item display form, you need to get the name of the display form from the content type, and the item ID and build the URL manually.<br /><br /><strong>2. Don't trust the documentation<br /></strong><br />The documentation has this to say about SPWeb.GetList(string):<br /><br />public SPList GetList(string strUrl);<br />// Summary:<br />// Returns the list with the specified site-relative URL.<br />//<br />// Parameters:<br />// strUrl:<br />// A string that contains the site-relative URL for a list, for example, /Lists/Announcements.<br />//<br />// Returns:<br />// A Microsoft.SharePoint.SPList object representing the list.<br /><br />Which is great, except it's completely wrong. The URL must be server relative or absolute - not site relative.<br /><br /><strong>3. Be extremely careful not to mix up Absolute, Server, Site and Web Relative URLs<br /></strong><br />For a subweb of a site which is in the root web of a server, a site relative and a server relative URL are equal, which makes it easy to confuse them. If they are confused, the code will fail as soon as it tries to open a web under any site collection which is not in the root path of the server.<br /><br />(Similar things can happen if a Site/Web relative or Server/Web relative URL is confused as well.)<br /><br />Here's an example how <strong><em>not</em></strong> to do it, right out of one of the Microsoft assemblies using Reflector.<br /><br />In one of the content database tables (regarding alerts), they've named two columns "siteUrl" and "webUrl". These names are confusing, most of all because siteUrl is not the siteUrl at all; the column contains only server URLs! Also, the values in "webUrl" are server relative.<br /><br />Then, the developer of Microsoft.Office.Server.Search.Query.SearchAlertHandler.OnNotification in assembly Microsoft.Office.Server.Search, assumed that the "siteUrl" was the URL of the site (false), and that webUrl was a site relative URL (also false). S/he wrote these lines:<br /><br />using (SPSite site = new SPSite(alertHandlerParams.siteUrl)){<br />SPWeb web = site.AllWebs[alertHandlerParams.webUrl];<br />// most of the code is here<br />}<br /><br />(They forget to dispose that web, so the code is leaking memory, but that's not the main issue here.)<br /><br />The SPWebCollection, most commonly returned by SPSite.AllWebs[] and SPWeb.GetSubwebsForCurrentUser(), has an indexer which accepts a site relative string. That makes sense, so ok.<br /><br />But with webUrl actually being a server relative URL, that line will fail and throw an exception for any web whose parent site is not located in that the root of the server. It wont fail if the site is in the root of the server, because then a site relative and server relative web URL are the same.<br /><br />Result?<br /><br />Search-based alerts are completely broken for any web not being a subweb of the root site collection. They will inevitably fail with a "There is no web named ..." in the ULS log and no alerts will ever be sent. This bug exists in at least both SP1 and SP2 of MOSS 2007.<br /><br />The lesson is of course that it is extremely important to always ensure if you are passing an absolute or a server, site or web relative URL, and make sure that matches what is expected!<br /><br />By the way, Microsoft are aware of this issue, and they where already aware of it when I contacted them about it a couple of months ago. Appearantly, having all features in working order is not a high priority. :-(<br /><br />PS. I mixed up site and server quite a few times myself just when writing this entry. I hope I got it right now though... :-)<br /><br /><strong>4. URLs can change, so use other identifiers if possible<br /></strong><br />Web URLs are not static. For example, they can be changed by administrators. If possible, try not to handle any URL as something constant! That is, avoid specifying URLs in permanent configuration files, web part properties, etc. Whenever possible, use GUIDs or other static identifiers.<br /><br />If you have the option to chose between for example a SiteRelative or a WebRelative url, use the one which is most general for your purpose. For specifying a list in the same web, for example, the web relative URL would be best, site relative URL second best, and so on. (Again, concider using other identifiers before resorting to URLs.)<br /><br />Even worse of course is to use "Title" or "DisplayName" as identifiers, as they are even more likely to be changed in the future than the URL. Also, unlike any other identifier, they are never guaranteed to be unique!<br /><br /><strong>5. Use SPUtility, SPUrlUtility, HttpUtility if you can<br /></strong><br />Don't re-invent the wheel! SPUtility, SPUrlUtility and HttpUtility contains several methods for common operations with URLs, such as concatenating and splitting a URL string. Feel free to check them out in Reflector to see what they do if it's a least bit unclear.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-52412759729853311722009-09-03T07:09:00.000-07:002009-09-03T07:10:10.097-07:00A random WSS 3.0 SP2 issueI found this by accident:<br /><br /><a href="http://support.microsoft.com/?id=909455">http://support.microsoft.com/?id=909455</a><br /><br />"Document library event handlers that use object model code without explicit impersonation fail with the "Cannot complete this action" error message after Windows SharePoint Services Service Pack 2 is installed"<br /><br />"All document library event handlers must perform explicit impersonation to use Windows SharePoint Services object model calls."<br /><br />"This behavior is by design."<br /><br />I'll just leave it at that...Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-68524466900780761092009-08-27T07:18:00.000-07:002009-08-28T17:52:01.158-07:00A little bit about SPListItemCollection...<div class="ms-PostBody"><div dir=""><div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">Don't:</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">SPList list = SPContext.Current.Web.Lists["MyList"];<br />SPListItem item = <strong>list.Items.GetItemById(7);</strong></div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">Do:</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">SPList list = SPContext.Current.Web.Lists["MyList"];<br />SPListItem item = <strong>list.GetItemById(7);</strong></div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"><br />Why?<br />Using the "Items" field of an SPList will always create an SPListItemCollection and populate it with all items from the database, which can take a long time if the list contains many items.</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"> </div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">Calling GetItemById() directly on the SPList does not require this and can finish in a fraction of the time, even for a list with thousands of items.</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"> </div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">To go further into this...</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"> </div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">If performance is important (or if you are working with lists with many items), you should (or even must) avoid the "Items" field of SPList completely. Instead use SPQuery and SPList.GetItems(SPQuery) to create your own SPListItemCollection, and limit its size by setting these fields on the SPQuery:<br />- "ViewFields" - specify only the fields you need.<br />- Row Limit - set the maximum number of items you need<br />- Query - of course, to make the collection only contain items which you need.</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"><br />For example,</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"><br />Don't:</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"> </div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">SPListItem item = list.<strong>Items</strong>.Add(...);<br />item.Update();</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"> </div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">Do:</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"> </div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">SPListItem item = list.<strong>GetItems(new SPQuery { RowLimit = 0 }).</strong>Add(...);<br />item.Update();</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"> </div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"> </div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">Another example,</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"><br />Don't:<br /></div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">itemCount = list.<strong>Items</strong>.Count;</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"> </div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">Do:<br /></div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E">itemCount = list.<strong>GetItems(new SPQquery { ViewFields = "<fieldref name="'ID'/">" })</fieldref></strong>.Count;</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"><br />Much of this is usually not required of course, but for lists which contains hundreds of items the difference will likely be noticable.</div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"><br />By the way, many of the OM methods use SPQuerys "behind the curtain". For example, SPList.GetItemById() creates an SPQuery with RowLimit = 1 and a "where eq<where><eq><fieldref name="'ID'">" query searching for the specified ID, and the constructor of SPListItemCollection (which for some reason is marked internal) simply just takes an SPList and an SPQuery as parameters.</fieldref></eq></where></div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"> </div> <div class="ExternalClass756608168D7E450D8331F5CBCF19F56E"><br />Hope this is of use to anyone!</div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-81473077022437480202008-12-03T04:14:00.000-08:002008-12-03T07:54:49.124-08:00Firefox, Safari, SharePoint and modal windowsOk, I've been taking a closer look at the problem with SharePoint, modal windows, Firefox and Safari.<br /><br />Turns out the problem is NOT Firefox/Safari, rather, it is an issue with the setModalDialogObjectReturnValue() function in core.js. Basically, because of differences between Firefox/Safari and Internet Explorer, the result of the 'if' clause in this method is different. For Firefox/Safari, this has the result that the wrong method is used to set the return value of the window.<br /><br />Here is a <b><i>very</b></i> quick and dirty workaround that works in FF3, Safari 3 and IE7 (and WSS 3.0 SP1/MOSS 2007 SP1).<br /><br />Add the <b>bold</b> line to ...\12\TEMPLATE\LAYOUTS\1033\CORE.JS:<br /><br />function setModalDialogReturnValue(wnd, returnValue)<br />{<br /> if (wnd.opener !=null &&<br /> typeof(returnValue)=='string' &&<br /> wnd.opener.document.getElementById('__spPickerHasReturnValue') !=null &&<br /> wnd.opener.document.getElementById('__spPickerReturnValueHolder') !=null)<br /> {<br /> wnd.opener.document.getElementById('__spPickerHasReturnValue').value='1';<br /> wnd.opener.document.getElementById('__spPickerReturnValueHolder').value=returnValue;<br /> <b>wnd.returnValue=returnValue;</b><br /> }<br /> else<br /> {<br /> setModalDialogObjectReturnValue(wnd, returnValue);<br /> }<br />}<br /><br />I put this here only to <i>illustrate the problem and the solution</i>. <i>I have not tested this with older browsers - this code will probably break functionality with older browsers!</i> Preferably, one should modify the 'if' clauses in this method. Also, mind that changes to this file is not supported by Microsoft. It might be overwritten by future Service Packs or upgrades, so you better hope that this bug is fixed in the next Service Pack, or somehow put this fix in some other file.<br /><br /><br />So who is to blaim? Who should fix it?<br /><br />What Mozilla changed to make this problem arise in Firefox 3 was simply to add support for the IE specific method showModalDialog(). They didn't have to - they already had another way to do the exact same thing.<br /><br />For Firefox 3/Safari 3, the JavaScripts in core.js now choose the "IE" method to open the window, the "Firefox" method to set the return value to the window, and then again the "IE" method to read the return value from the window. Hence, the return value will always be undefined or null. The JavaScript functions must be modified in some way so that they are concistent.<br /><br />No one is to "blaim" - Firefox and Safari supports everything IE supports, and Microsoft made an effort to support Firefox in SharePoint, but even though SharePoint worked in all browsers available during its release, it now fails to properly detect modern browsers.<br /><br />While it's possible to work around the problem, and it should be quite easy to make the fix as a custom SharePoint solution, I recommend anyone being troubled by this issue to open a support case with Microsoft.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-21515288907139116432008-12-02T08:17:00.000-08:002008-12-03T07:55:17.086-08:00Firefox vs SharePointOne annoying thing when accessing SharePoint sites with Firefox is that it always requires the user to enter credentials when using NTLM authentication. It turns out, that's not a limitation, that is by design... <a href="http://www.cauldwell.net/patrick/blog/FirefoxAndSharepoint.aspx">Read this post by Patrick Cauldwell</a> about how to make Firefox log in automatically to SharePoint sites.<br /><br /><br />Also, there's an issue in Firefox (and Safari) which disables most things which depend on popup windows, most notably, it's not possible to add web parts to a page. <br /><br />Taking a look at the core.jss file, it appears that Microsoft put a fair bit of work into making this work in more than just IE, so it actually might be a bug in Firefox, not just Microsoft ignoring FF as I first thought. How about putting a vote for <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=463889">Bugzilla@Mozilla - Bug 463889 - Can't add web parts in Sharepoint 3 and MOSS 2007</a>?Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-8402340700872813260.post-47837721662752781572008-12-01T09:06:00.000-08:002008-12-03T07:56:15.478-08:00Jan vs Microsoft Content Management Server 2002My first post - and it's a REALLY REALLY long one!<br /><br /><br /><br />I've recently had to deal with a configuration of Microsoft Content Management Server 2002 which had been moved around and upgraded over the years. Some of the problems I ran unto were fairly unusual and finding solutions to some of the problems were difficult at best. Here are those problems and the solutions that <i>worked for me</i>. If you run into any problems with CMS, you should first check out the following two pages:<br /><br /><a href="http://download.microsoft.com/download/4/2/5/4250f79a-c3a1-4003-9272-2404e92bb76a/MCMS+2002+-+Site+Deployment+FAQ.htm">Site Deployment FAQ</a><br /><br /><a href="http://support.microsoft.com/kb/814774">HOW TO: Troubleshoot Site Deployment Issues in Microsoft Content Management Server 2002</a><br /><br /><br /><br /><b>Unable to export data from a CMS site.</b><br /><br />- Everything else, including imports, worked fine.<br />- CMS 2002 with SP2, upgraded from SP1a, running SQL Server 2005, upgraded from SQL Server 2000<br />- The export fails after almost exactly 30 seconds (stuck on 0% or 5%), then fails.<br />- The error details would specify "403 (Forbidden)".<br />- Using a packet sniffer like Fiddler would reveal the complete 403 reason to be <i>Directory Listing Denied</i>.<br />- The 403 is pretty irrelevant: If doing an export preview, the real error is revealed to originate from <i>.Net SqlClient Data Provider</i>, and have the description <i>Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.</i><br />- The pages linked to above offers a lot of suggestions, non of which helped us.<br /><br />Solution: Install hotfix 913401:<br /><br /><a href="http://support.microsoft.com/default.aspx?id=913401">FIX: If you try to perform a site deployment export operation to SQL Server 2005, the export operation fails in Content Management Server 2002 Service Pack 2</a><br /><br />How to install the hotfix:<br />1. Make a backup of the CMS database!<br />2. Request it from the page above. (If you can't, see below.)<br />3. Download it, extract it using the password in the e-mail.<br />4. Copy _both_ files to the folder "(MCMS)\Setup Files\SQL Install". Make a backup of "_dca.ini" first.<br />5. Run the DCA. Re-select the database. When continuing, the DCA should ask you to confirm the database upgrade.<br />6. Done!<br /><br />Thanks to:<br /><a href="http://tiredblogger.wordpress.com/2006/11/28/mcms-2002-sp2-sql-server-2005-provider-timeout-fix/">David Longnecker</a><br /><a href="http://blogs.technet.com/stefan_gossner/archive/2006/01/25/418049.aspx">Stefan Gossner</a><br /><br /><br /><b>Unable to view or request hotfix on support.microsoft.com</b><br /><br />Not really an CMS issue, but when clicking the "View and request hotfix downloads" link on the hotfix page above, you get a page with no content.<br /><br />Solution: Turns out Microsoft's support site isn't very well localized. It tries to show a localized (in my case a Swedish) version of the page, which doesn't exist. Click the link in the top right corner, above the search bar, to change your location to USA.<br /><br /><br /><b>Unable to install or upgrade all components because they require "Microsoft Java VM", "Visual J#.NET redistributable 3.0", or doesn't detect your version of Visual Studio.</b><br /><br />Solution: Here's the steps I've found necessary to safely install CMS SP2... Surely, lots can go wrong with this old system so it's of course not complete. It's probably not a bad idea to reboot between every step.<br /><br />1. Install the original version, without SP:s. Check only the core Server component.<br /><br />2. You need to uninstall the .Net framework 3.0/3.5, or Site Manager will not be available. (If you don't need the Site Manager, you can skip this step.) You can re-install the 3.0/3.5 framework afterwards, however, all this takes time, and you might break other things installed on the computer. There is a faster workaround - quoting Alan McBee:<br /><br /><i>This is a RegEdit thing, so the usual Warning About Tampering With The Registry apply/<br /><br />In RegEdit, go to this key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\<br /><br />Rename the subkey v3.0 to something else -- I used XXXv3.0XXX.</i><br /><br />In fact, I myself <i>had</i> to use this method, because uninstalling the framework <i>still left that 3.0 key</i>, so the Site Manager option was still disabled in the SP1a installation wizard. <br /><br />3. Install SP1a. If you need them, install the Site Manager, Site Stager and the Dev tools now.<br /><br />4. Change back the 3.0 registry key or re-install the .Net framework 3.0/3.5 (if you want it).<br /><br />5. Install SP2.<br /><br />6. Check <a href="http://update.microsoft.com">Microsoft Update</a>. There should be one single update from CMS available on Microsoft Update (under the "Office" category, I think). It is described as a security update, but you MUST get it if you are going to use SQL Server 2005, otherwise you wont be able to select the database in the DCA.<br /><br />7. Install the hotfix mentioned above, if you are going to use SQL Server 2005 and if you are going to use a database from SQL Server 2000.<br /><br />8. Create two websites in IIS, and create a new database (or copy an existing). Set up the security configurations, all the accounts and that boring stuff, and run the DCA/SCA.<br /><br />9. If upgrading database from SP1a, make sure any custom built form still works (see below)<br /><br />10. Done!<br /><br /><br />Thanks to:<br /><a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1182594&SiteID=1">Alan McBee</a><br /><a href="http://www.mombu.com/microsoft/cms-evaluation/t-cms-2002-will-not-install-on-w2k3-server-1785503.html">Stefan</a><br /><br /><br /><b>Unable to select SQL Server 2005 database in the DCA</b><br /><br />Problem: Authentication errors and other errors when choosing a DB in DCA.<br /><br />Solution: For CMS to support SQL Server 2005, CMS 2002 SP2 must be installed, AND an update must be installed from Microsoft Update! Check update.microsoft.com. There should be one single update from CMS available on Microsoft Update (under the "Office" category, I think). It is described as a security update, but you MUST get it if you are going to use SQL Server 2005.<br /><br /><br /><b>Custom forms are broken after SP1a upgrade to SP2</b><br /><br />Problem: After upgrading CMS 2002 SP1a to SP2, custom built forms are broken. They may refer to an invalid URL, giving the user a 404 when submitting a form. CMS is using ASP.NET.<br /><br />Solution: This is because they introduced a bug in a JavaScript in SP2. First, <a href="http://support.microsoft.com/kb/923755/">the post-SP2 hotfix package</a> MIGHT fix this, but only try this if your environment is "expendable", or if you manage to find more documentation than I did... Or possibly, there might be a fix available for ASP.NET.<br /><br />Otherwise, you can do what we did - it's insanely ugly, but it works. Copy this little piece of code somewhere into all templates containing broken forms:<br /><br /><br /><script language=”javascript” type="text/javascript"><br /><!--<br /> // hack to fix MCMS2002 SP2/ASP.NET generated action target<br /> __CMS_PostbackForm.action = __CMS_CurrentUrl;<br />// --><br /></script><br /><br />Basically, this line is for some reason not generated in the HTML output by CMS SP2, but it was in SP1a. So far we've seen no side effects from adding this snippet, please let me know if you do.<br /><br /><br /><br />I hope any of this is helpful to anyone else! (I really mean that, otherwise I've wasted a lot of time writing this...)Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-8402340700872813260.post-73970886286854639232008-08-02T14:45:00.001-07:002008-08-02T15:04:11.120-07:00WelcomeDon't worry, the design of the blog is only temporary. I can do better than using template 1A...<br /><br />Anyway, welcome to my blog!<br />With this blog, I guess I will do my share of clogging up the Interweb. We'll see what I will end up writing here... In the best case, you will here stumble upon the solution to the problem you've been Googling for for hours... (Please tell me if so!)<br /><br />About me?<br />I am Swedish, 23 years old, am a lot better (better != good) at writing than talking, enjoy traveling, avoid physical activity a bit too much for my own good, and I am supposed to be a Microsoft SharePoint developer (I've almost got the hang of it now).Unknownnoreply@blogger.com0