Home

Previous 20

May. 1st, 2009

iMac

Da ist er, halb Designobjekt, halb Computer, halb Gott, ähhm, nein, also jedenfalls mein erster Rechner mit Motorola Vergangenheit seit dem guten alten Amiga:





Die Lücke auf dem Schreibtisch war nicht etwa schon da, sondern musste mühevoll erschaffen werden:



.. um dann gleich mit dem soliden Alublock gefüllt zu werden:





die erste Frage war: "wo ist denn der Computer, Festplatte und so was?"
[das Gerät hat nicht mehr als Monitorausmaße]





Nach der geilen Startanimation war der Mac schnell bereit zur Arbeit, ein Manko bei der Installation: mein Router, der über Mac-Adresse filtert, konnte nicht eingerichtet werden, da sich die Mac Adresse im Einrichten-Dialog nicht anzeigen lässt. Aber das konnte schnell nachgeholt werden.

Tags:

Jan. 28th, 2009

First Amiga ASM since ... years

zuio
Tags: , ,

Jan. 5th, 2009

Verpackungs - User Interface

Buying at the supermarket one sees user interfaces for consumers. Here is an example, a german hair shampoo.

Front: low-end user


Front shows ingredients in german
- Koffein
- Hopfen
- Meeresmineralien

Back: high-end user


The back is more precise, while showing Latin/english description
- Caffeine (not known by romans yet, 1820 extracted by german chemicist Runge)
- Humulus Lupulus Extract (= Hopfenextrakt)
- Maris sal, ... (latin again)

Neuroinformatik

Sohn von Lothar Bisky in seinem Appartement in Edinburgh tot aufgefunden. Er hatte Neuroinformatik studiert, sich danach zur Promotion an der Uni Edinburgh eingeschrieben. R.I.P.

guestbook spam filter

Only 2 and a half days (02/01 afternoon, 05/01 morning) after running the spam killer scripts, the guestbooks are again flooded by porn, links etc..
sum up(*):
- 11 entries starting with a link
- 106 entries starting with a block-word before the link
- 120 entries including porn
- 40 other ... (have to fix these)

Such traffic would keep me in an infinite loop running the "eat spam" script. Thus, the guestbooks has been equipped with a spam filter, that removes crap on the fly.

(*) many entries contain a combination of the above.
--
While establishing the blacklist, the main spammers seem to be
- medication for erection
- medication for depression
- gaming sites, e.g. powerlevelings.com (selling World of Warcraft "cheats")

Jan. 2nd, 2009

guestbook spam killer

after finishing the latest version of 7up sprite editor, I was going to shape up the web site. There were 2.4Mbytes of guestbook spamming. Before adding the CAPTCHA script, I was to clean the spam entries. After deleting around 300 of them in phpMyAdmin manually, I realized that the total amount of spam entries was still more than 1500, including other projects' guestbooks. So the idea of a spam filter came up ... which would be a php-script, that searches mySQL guestbook table for certain patterns.
These are (so far):
- starting with "<a href" (or " <a href", ...)
- starting with "http"
- user defined (starting with "comment")
- including porn
- including chinese
- empty entries as of name and text
Entries are deleted and written to a spam-log (maybe get some statistics from it later) Approx. 1400 were reduced to 150. I would say medium quality.
Tags: ,

Nov. 22nd, 2008

Windows IPC, Delphi

Using ActiveX under Vista with Delphi is just a fingersnip; read this article. Implementation time: 15 minutes.

1. for an existing app: create automation-object, add property (read,write)
2. use property "write" to set some variable in your program

under Vista: start with admin-rights

3. create new application, import typelibrary
4. drag new ActiveX object to new application's Form
5. call something like 
Softgenlock.stamp := 'sig-service'
6. finito!

But then ... recompile the original app => cannot compile ;-) The OLE server is registered and can thus not be overwritten ... => was still running |-:
--
Ahm, I have used ActiveX to write an interface for my webcam app (server) and an ActiveX-test-app (client).

Nov. 20th, 2008

Testing and tools (within the tangle of DirectShow)

While developing a program for reading webcam video, putting to samplegrabber, superimposing some timestamp, rendering to screen and capturing to .wmv-file (using ASF-writer) there was an error when inducing the "m_pMC.Run" command. I changed the order of Filtergraph additions, scrolled through several web pages, investigated DSPack sources ... but didn't find any solution. Later I installed Microsoft's (small, as from 1997) graphedit-tool. It allows to graphically drag and drop DirectShow filters, connect their pins etc. (Not) surprisingly graphedit showed an error as well. I played around with different filters, somehow I changed ASFWriter's profile GUID to a non-video GUID. The filter's number of pin changed to one (video), before it was video and audio. ... It worked!!! Then again to 2 pins. ... Error.

Ahh, the ASFWriter needs all pins to be connected. Baaaah!!

Oct. 19th, 2008

Reiseliteratur

Da habe ich mich letztens mit einer Diplomandin in unserer Firma unterhalten, und zwar über die Vorteile von TeX. Ich erwähnte, dass ich es leider seit meiner Diplomarbeit kaum noch nutze, insbesondere nicht auf der Arbeit. Allerdings ergänzte ich, ab und an mal einen Reisenericht mit TeX zu verfassen. Darauf sie: "Was schreibst Du denn da: Vorgestern hat's geregnet, gestern war das Wetter gut?"
Ohje, solch ein Kulturdefizit läßt selbst einen durch täglichen Umgang mit Ingenieuren hartgesottenen Menschen wie mich an starker Spezialisierung zweifeln. Her mit dem "Pisa Training für Erwachsene"! Um ein wenig den Blick über den Rand von Bits, Bytes, Elektronik und Technik zu heben, möchte ich ein sporadisches Forum für Reiseberichte oder Buchbesprechungen einrichten.
Zurzeit liegt auf meiner Bettkante "In 80 Tagen um die Welt" von Helge Timmerberg ...
Tags:

Aug. 30th, 2008

C64 multicolor dissection

While working on an animation for a demo I realized that Koala or Multicolor (MC)-Images store data in screen- and color-ram, that cannot be edited directly.

What had happened? - I coded a starfield animation displayed in the background colored area of the image. The stars should be display in white. But, guess what: the stars appeared in different colors or not at all.

So how to change foreground color whitout drawing anything in the foreground? ;-) Now here's, where a new program comes into play: Koala Surgeon, download here.

240

Technical: Code is based on the smallimageviewer. Drawing directly onto screen was too slow, so updates are drawn onto a Bitmap / devicecontext in memory and bitblitted into the window-devicecontext at paint event. Yet there is an issue with flickering to be solved ...

First book!

My bachelor thesis was published as a Monography. This is my second "ISBN-"publication after a Paper and my first complete book! It is printed on demand and can be ordered at Amazon. Go ahead!

US Trip

For two weeks I was visiting the US. Started the trip in Phoenix, 45 degree celsius. We drove to Santa Monica, San Francisco, Lake Tahoe, Salt Lake City, Las Vegas, Grand Canyon and back to Phoenix over Flagstaff.

Our trip was 3000 miles. We had lots of steaks, preferably at Outback ... tbc

Jul. 19th, 2008

Centipede gfx-ripped

The first version did collision test on canvas, i.e. canvas-color for the next move (of shot etc.) was read, then certain functions were performed, i.e.

shot hits
  • red = centipede => centipede is split, limb being hit becomes muhsroom
  • blue = mushroom => mushroom can cope with 4 shots before it destroys
  • pink = spider => clear spider and move it out of screen
(same for spider hits ...)

On one hand such was easy, on the other hand no complex patterns were possible. So Canvas and backend needed to be decoupled.

Now graphics for mushrooms, ship, shot, centipede, spider etc. could be ripped and inserted into drawing-functions...

Jun. 14th, 2008

Delphi freeware

I coded some Tools for work using Delphi, which I need to supply source and a legal dev-kit to compile. So I downloaded Lazarus, but then project includes a 3rd party SQLite component, which needs to be converted... Anyway, Lazarus was for some 2 or 3 days on my computer without being touched.

Then I met somebody on c64-forum, who owns a Mac and likes to test the Spriteeditor. I tried Delphi- to Lazarus-project conversion, but there was some exception, which again caused some problem with excepts.inc. Second conversion test with Centipede-game. Same exception problems. Since Centipede is some mere hundred lines of code, I created a new project and did copy & paste. It Works; well almost: needed to
- add doublebuffering,
- clear the screen
The executable file size thus increased exorbitantly: Delphi is 208 kbyte, Lazarus compiles to 11.527 kbytes, which is a factor of 55! A filecompressor shrinks 11,5 to 3,3 MByte. Further reduction is in need!



As I moved from Delphi3, Lazarus is quite a big step in comfort-progress. I like this free-IDE, same as I like Delphi. ... Maybe I'll switch. What if Lazarus IDE would combine with C++?

Feb. 9th, 2008

Cross development (for ARM)

Preface

For a demo on C64 I need a program to paint some sprites, i.e. a bitmap painter. What is better suitable for digital-painting than a touch screen? Among my devices with a touch sensitive screen - Nintendo DS and PocketPC(*) - I chose the latter one.
(*) with an OMAP 850 multipurpose processor

Story

With PellesC there is a free dev-Tool for Win32 and PocketPC available, featuring a custom c-compiler, derived from lcc-compiler. The IDE is comfortable, allowing to upload the built executable and to execute it with simple key-shortcuts.

Program sketch, first three steps: Allow to
(a) draw on the screen, i.e. read stylus position and draw points (SetPixel) or lines (MoveTo, LineTo),
(b) load a bmp file into the drawing area,
(c) save the drawing area to a bmp.
Steps (a) and (b) were simple to implement. Saving wasn't.

Examination

The file was opened, but 0 (zero) bytes were written. Slowly debugging line per line I realized that

bfh->bfSize = dwFileHeaderSize + bmi->bmiHeader.biSizeImage;

caused the error (which was not reported).
After reading lots of online-material I stumbled across the explanation:
The ARM processor requires long integers (DWORDS), i.e. 4-byte variables to be aligned to memory adresses which are a multitude of 4.

The struct storing the BITMAPFILEHEADER bfh is packed though, i.e.

#pragma pack( 2 ) 
   short bfType;       // byte [0..1]
     int bfSize;       // byte [2..5]
     ...
#pragma pack( )

which apparently causes bfType to be packed. Accessing bfSize then causes a data misalignment error.
So I cloned the BITMAPFILEHEADER struct

struct MYBITMAPFILEHEADER
{
   short bfType;       // byte  [0..1]
     int bfSize;       // bytes [4..7]
   short bfReserved1;
   short bfReserved2;
     int bfOffBits;
};

and aligned it's variable pointer to multiple of 4 adresses:

__unaligned struct MYBITMAPFILEHEADER  *bfh;   // ARM processor!!!

Now, the above assignment doesn't cause any data misalignment fault, yet the struct size is 16 bytes when it shall be 14.
In the end I use a simple char-array, fill it

char mybfh[14];
WORD p_shortint;
DWORD p_int;
p_shortint =0x4d42;
memcpy(mybfh,&p_shortint,2);
p_int = dwFileHeaderSize +bmi->bmiHeader.biSizeImage;
memcpy(mybfh+2,&p_int,4);
p_shortint =0;
memcpy(mybfh+6,&p_shortint,2);
memcpy(mybfh+8,&p_shortint,2);
p_int = dwFileHeaderSize;
memcpy(mybfh+10,&p_int,4);

...and write it into the bitmap file.

Nov. 3rd, 2007

Playstation

Just got the final play-station ready



a C64 + MMC64



some days ago I got the Competition Pro.

Plugged a 1GB SD-card into the MMC with the Thomas64 game compilation, which is faaaar too much for the simple MMC64 interface. Anyway, some shots of the whole setup attached:



The only "80ies" accessoire is the little Commodore - everything else is brandnew. The Joystick is a remake conceived by Individual Computers.



... running one of the favourite games.



Actually the C64 has some slight problems with colors, i.e. red color-part seems to be shifted some pixels horizontally. Have to figure this out yet.

Oct. 20th, 2007

Goldene Himbeere

... für "Da Vinci Code",
eine sinnvolle Wahl.

Der Film taugt überdies als
- stimmungsvolle Sound- und Bildkulisse für Grabkammern,
- Lachanleitung für chin*** Funktionäre,
- zweieinhalb-stündiger Funktionstest des DVD-Players (meiner hat eine Passage ausgesetzt).

Oct. 17th, 2007

Bergtour auf die Gurtisspitze

Um 08:30 Uhr mit dem Auto von Lindau aus ca. 50 km über Dornbirn, Feldkirch und Frastanz nach Gurtis, einem österreich. Dörfchen auf ca. 900 m Höhe. Zunächst über eine Kuhwiese (Wegmarkierung: weiss-rot-weiss, mittlerer Schwierigkeitsgrad) Richtung Bazoraalpe. Unterwegs durch dunkle Tann, hohe Hell-dunkel Kontraste. Zwischendurch schlechte Ausschilderung, über den Skihang zur Bazoraalpe, danach durch einen Wald bei starkem Anstieg. Vorbei an überhängenden Felswänden und spitzen Kehren an hunderte Meter ins Tal reichenden Abhängen.
Das letzte Stück zum Gipfel ist stark geröllhaltig. Oben ein famoser Ausblick
- nach Süden auf Gletscher,
- nach Westen auf drei Schwestern (dahinter Lichtenstein),
- nach Norden auf das Wolkenmeer, unter dem alles verschwindet,
- nach Osten auf Alpenketten (??).
Leider sind Gipfelstempel ohne Tinte. Essen schmeckt prima, ist aber zuwenig ;-) Apfelkitsche werden den kunstfliegenden Dohlen abgezweigt. Abstieg mit erhöhtem Schwierigkeitsgrad, zunächst bergauf über eine Seilstrecke, zur Gradwiese, dann bergab zur Sattelalpe und schließlich über abwechselnd mittlere und leichte Wege ins Tal. Der Abstieg kostet am meisten Kraft (...Stöcke für Natalia!). Kommen kurz nach 16 Uhr wieder an der Dorfkirche an, losgegangen sind wir um kurz vor 10.
Geiles Wetter, ebensolcher Ausblick und Klettertour.
Tags:

Oct. 11th, 2007

Project: 8-bit Synthesizer

First attempt not to make, play or listen to sound, but instead to code it. (Article in progress...)

The idea was in my head for some time. Some time ago I stumbled across a DSP webpage, implementing mathematical functions like sine etc. efficiently. Also used for music routines. ##add link## Then I remembered using sine tables on the Amiga.

Lately I examined some signals (from a laser sensor) at work, on the other hand I was always impressed by Fourier analyzer displays back in time on Amiga etc.. First tries on the PC with Delphi and mmlib were successful, but I liked to get more to the basics, i.e. on a synthesizer level. I found only poor documentation how to produce sound on PC, not using DirectX etc., but instead register Hardware directly.

After hacking the C64 for the last months I decided to code some Synthesizer, i.e. sample editor or frequency sampler or... (and maybe later a tracker ;-) Being a dummy in sound processing I need to learn the very basics. First I took "Intern" to grab registers and and a program in Basic
10 S1=54272: REM Stimme 1
...
40 FL=54293: REM Filter Lo-Byte
...
310 POKE S1+4,T+1: REM Ton einschalten
...
SID 6581 (A/D Sound-Chip) built into C64

4 waveforms (saw, triangle, noise, rectangle)
A - attack
D - decay
S - sustain
R - release
Hold

Reading Lasse Öörni's Tutorial Building a musicroutine,
Dissection of Rob Hubbard's music routine.

Adding Pulse-width

Oct. 7th, 2007

C64 + Vectrex

Dieses Wochenende wurden gleich zwei Retro-träume wahr:
Am Freitag kam der C64-II (mit starkem Netzteil) an, am Samstag morgen die Vectrex.

Der C-64 kann jetzt mühelos die MMC 64 mit eingelegter Speicherkarte starten. Der alte C64 (1) war damit überfordert.

Die Vectrex habe ich bei Ebay ersteigert, zugegeben - zu einem horrenden Preis, allerdings in Top-Zustand und mit gut erhaltener Verpackung. Es gibt Assembler für den 6809 und C-Compiler, den Assembler und ein Demo-Source habe ich ausprobiert - auf einem Emulator zunächst: Der derzeit beste Emulator scheint ParaJVE zu sein.
Tags: ,

Previous 20

May 2009

S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Advertisement

Syndicate

RSS Atom
Powered by LiveJournal.com