heyrick1973 -at- yahoo -dot- co -dot uk

You are not reading my b.log using HTTPS. You can switch to HTTPS by clicking here.

ARM disassembler to come

I seem to be something of an anomoly, preferring to dabble in the inner workings of the Neuros OSD under Windows. I guess, some day, I'll need to get to know Linux, but I don't have the inclination to take it on right now. But, for what it is worth, I used Win7 earlier, and it didn't impress. I think the computer is trying too hard to second-guess me, when all I want is it to do what I ask.

Anyway, I digress. The big strange problem is that there doesn't seem to be an efficient, capable GUI disassembler. There is, of course, the command line objdump for Linux (maybe a Windows one?) and there are non-free GUI options, namely:

  • IDAPro - this is the be-all of disassemblers. However I don't justify hundreds of dollars for a disassembler that can deal with dozens of processor families, many of which I have never used, and probably never will...
    There's a free version, but it doesn't do ARM.
  • BDAsm - looks, at a glance, to be fairly capable. That is, until you realise the link addresses are all messed up (failure to sign extend?). I didn't look to see what else is wrong, because that's a pretty big problem!

So, then, using the venerable !Zap as a template, I decided to roll my own. ☺

It will support the ARM v5 architecture, with support for the ARM926. This is because it is being written specifically to allow poking around in the Neuros OSD's code. In addition, it will be designed with support for RISC OS and the ARM v2/v3 (ARM 3, ARM710).

That isn't to mean there aren't problems. Not big ones, it's just that as of the newer generation of ARM processors, the instruction set gets a bit fiddly. For example, once you have decoded a data processing instruction (SUB, RSB, etc) then you have to further decode to see if it really is that, or if it is something like UMULLS.
By digging into the ARM instruction set at a binary level, you start to appreciate that the arrangement of the processor is an interesting blend of simplicity and complexity that produces powerful results. No, that isn't a contradiction, for when you look at the instruction set, there are an astonishing array of options packed into those 28 bit words. 28 bits? Yup, that's because the upper four bits are condition codes. Couple that with the S bit (whether or not to affect the status register), you have the ability to perform arithmetic instructions without altering the status flags, and the ability to conditionally execute instructions based upon the state of the status flags.

To understand this in action, Wikipedia gives the following example. Consider some code in C:

    while(i != j) {
       if (i > j)
           i -= j;
       else
           j -= i;
    }
How would you code that? A comparison followed by a conditional branch? Not to mention a branch to implement the while loop...

Prepare for the ARM version:

 loop   CMP    Ri, Rj       ; set condition "NE" if (i != j),
                            ;               "GT" if (i > j),
                            ;            or "LT" if (i < j)
        SUBGT  Ri, Ri, Rj   ; if "GT" (greater than), i = i-j;
        SUBLT  Rj, Rj, Ri   ; if "LT" (less than), j = j-i;
        BNE    loop         ; if "NE" (not equal), then loop
Not the use of condition codes GT and LT, so if i and j are equal, then neither instruction would be executed, thus providing the 'while' condition automatically.

Anyway, I've only just started, don't expect to progress too quickly, however I can show you the state of play. Here is a screenshot of Zap in action:

RISC OS !Zap screenshot, code mode

And here, for your enjoyment, is the state of play of ArmitageIII:

ArmitageIII screenshot

There is a disparity in the red values of the second column. I'm not entirely certain how Zap denotes control codes. What I have done is run them from 0 to 9, then A upwards through the alphabet, this codes 0-15 will have a hex value to match (13 = D, just like 0x0D).

It is, I should point out, the first version, despite carrying the number 3. If the title makes no sense to you other than figuring out it has "arm" in it, please look at this Wiki article that describes Armitage III.
Then you'll get the idea...

 

"Dogshit everywhere"?

Mom was playing an on-line hangman game where the topic was "reasons not to go out", and she took a photo of the resultant answer. Umm...
Hangman - Dogshit everywhere
Not very child-friendly, is it?

Speaking of which...

 

Where's Maddie?

Here's a picture that is doing the rounds now:
Madeleine McCann, aged to present day
[picture from here, tidied a little for weird colour cast]

She's been quite nicely cuted up for this age progression photo. Personally, if you ask me, I would be inclined to suggest that you dredge the sea near the hotel she was staying to see what the fishes left behind. There is always the want to hope that the girl is alive, though I wonder if the legend "Missing & exploited" isn't something of a stretch.
The Portuguese detective in charge of the investigation (Goncalo Amaral) thinks that the girl died in the apartment in Portugal. He wrote a book about it, but this was subject to a libel prosecution (ongoing?) and a gagging order. His next book was called, oddly enough, "The English Gag".

I am not sure exactly how the McCanns plan to sue for libel. They can, of course, claim that Maddie was taken, but what they can't do is prove that she didn't die in their room that night.

Is this a useless detective dumping blame on the parents to make an easy resolution to the case, or is this an abuse of power by those responsible to prevent their involvement being questioned? I have a feeling this one will be like "who shot Kennedy?".

The fun thing about the Internet is that they have taken time and money to prevent the book being published. Oh well, that won't stop it. You can read it here, make up your own mind.

Before you do - I should point out that as of 31st March 2008, the released accounts of the Madeleine fund was as follows [source figures, but this is laid out nicer]:

T-shirt sales and donations+ £1,846,178
Sales, awareness, legal fees, website- £423,366
Actually looking for the girl- £250,000
Misc other expenses- £141,747
Bank interest on fund+ £33,424
Amount carried forward...+ £1,064,489
I wonder if this includes the two mortgage payments they made using fund money?

So... their daughter is missing or dead because the parents were off having a meal rather than looking after their children, their fund sits to the sum of a million, with rather more expenditure on publicity and lawyers than actually looking for the child, and the only prosecution proceedings to have come of this so far is against the detective. Doesn't that all seem a little... peculiar?

 

Authentic Japanese rice

I ordered some rice from Satsuki called "Shinmai Akita komachi". At €12.95 for a 2kg bag, it was a little expensive, but in comparison really only twice the price of regular "japanese rice". I say that in quotes as Japan doesn't export much rice. The Shinode that I love the taste of is actually grown in Italy.
So this. The real deal. A question I've always had is the Asian and European methods of growing rice differs (Asia is more likely to use flooded paddies, while the West uses controlled irrigation), so how will this affect the taste?
A lovely little plastic bag with pink cord tie was included as a gift, and it is a perfect fit for the rice, to keep it safe. The bag is actually from a pack of "Seven Gods" rice crackers in a variety of flavours. It is described here, about two thirds of the way down (hint, search for "180g").
Shinmai Akita komachi Japanese rice in a cute bag
I have been warned, however, not to fall in love with this product. For there will be no more, at all. The recent tsunami saw to that... <cry>

I don't plan to cook this until I get a rice cooker to do it more justice than spinning around in the microwave.

 

Some you win, some you lose

As of the 6th of June, I will be working from 9pm until 4.30am. The benefit is that being all within night hours, I get the night supplement. A whole 25% extra. Well, it is better than nothing, given I'm working to live and living to work right now. Can't even afford a flaming Farnell order for a bunch of components I want (and the €12 postage charge isn't a help - I don't need the thing the next day for God's sake!).

However... to make matters worse. I will be down three days pay next month for the days I was off. It could have been worse, I had a day docked this month, but nicely I was credited for Easter Monday even though I was 'sick' on that day. But next month I can look forward to being around €180-€200 down. This is why I've told mom that I want to have a few months off of paying for the car loan - she never really 'took' to the Saxo so has plans of trading it in for something else. But I always feel like I'm neither coming nor going. My Satsuki order and a book from Amazon are the only perks I get from 161 hours of working. So in a way it will be a little nicer to make that extra pay, even though I'll be more of a zombie than normal. And, come November when the car is paid for, it will be nice to put the amount of the loan into savings, so I actually have a little something to fall back on should I be ill again. Well, it's my first absence in two and a half years, not bad...

The rules are as follows - if you are ill for one to three days, you get nothing. From the fourth day, the CPAM (social service) will provide an amount of pay, but apparently they take forever to get around to doing anything. After around a week, both the CPAM and the company will provide money so you will have some sort of income. This goes up to three months. The rule is, obviously, if you're going to be ill, be very ill, for a long time.
I understand it is part and parcel of how to stop people taking sickies, but it sucks when you are genuinely ill...

 

Let it rain

Yesterday was the first proper rain we've had in ages. So it would probably not be that big a surprise when water was pouring down one of the walls. I grabbed the ladder and went to take a look. Lots of... what is this, old oak flowers? Some sort of brown stuff that fell off of the oak trees last month clogging up the gutter. So I hoiked it all out, and everything returned to normal.
Gutter

 

Vide greniers

While the weather was a bit dodgy, with occasional light showers, we ventured out to a vide grenier. Mom bought a few cook books, and a jigsaw puzzle. Upon returning home, I asked her if she was going to count all 1000 pieces to make sure they were all there. She opened the box and said "you're never going to believe this".
She was right.
Jigsaw puzzle, each piece numbered
Who numbers puzzle pieces?!?

I spent a couple of euros and purchased a Casio labelling machine, a KL-2000. I figured, what the heck, it might be fun to play with.

Casio KL-2000 EZ-LABEL

It became obvious very quickly that the internal NiCad battery pack had given up the ghost and leaked all over the place. Trusty screwdriver in hand, and a recycling bag on the table to catch anything nasty, I took the machine apart and wiped all of the slime off. The power pack provided was only capable of a mere (and rather lame) 100mA, it would appear that the device is only intended to charge the battery pack. Not only that, but tests with other power packs hint to the labeller actually being unable to run from a mains power pack. This wasn't a problem, I took apart the old battery and removed the wires and fuse. The fuse was kept, and the wires were shoved into the plug from a power brick (you can just see this at the bottom of the picture, under the 'M' key). Then, it worked.
It seems a pretty respectable bit of kit, although numerous functions are a little obscure (power-up with 'B' held to enter "barcode printer mode") or over-complicated. But for what it is, it is fairly powerful and flexible.
You can see a small example stuck to the front panel under the Casio KL-2000 branding. That is two-line printing on a 9mm wide tape. The tape contained within the unit is silver on transparent, perhaps the least useful combination I can think of!
I have discovered I can get labels from Amazon, but at a cost of around €23 a cartridge... it'll be a while before I get to buying that!

I plan to revamp my room. Throw away a lot of old crap, and give myself some workspace. I am thoroughly annoyed with meddling with stuff on a book on my bed. It's the quickest way of losing screws you can imagine. I want a table. I don't plan to entertain much working with the bricked Neuros OSD until I have a table, something to open it out on. I also want shelves because, I swear, I must have several dozen jeweller's screwdrivers around here. But can I lay my hands on a mid-sized cross-head? Can I heck.
So this thing will come in useful as instead of trying to remember what device plugs into which port of the router, I can print a little label to stick to the front. Also, I can put labels on equipment to specify its hostname and IP address. That sort of thing.

Me? Organised? Wow. [no, I wouldn't believe it either!]

 

Now, what kind of geek would I be if I didn't include this:

Casio KL-2000 EZ-LABEL - main board
The device is powered by a Z84C00006 (top left) which is a type of Z80 capable of running at 6MHz, although it would appear that the main system clock is 4MHz (the Xtal says "4000" on it). The Z80 is a mostly 8 bit CPU with a few 16 bit functions, that gave the 6502 a good run for its money in the home micro days. It has been retained as a small and useful processor in low-speed requirements, finding extensive application in embedded systems that do not need the sort of power that an ARM-based device would require. Quite a few of the older generation MP3 players used a Z80 core. Another example is the Game Boy and Game Boy Color, Sega Master System (and Game Gear hand-held). So, it saw life beyond the Spectrum and ancient CP/M boxes like the Osborne system.

Just below the processor, on the lower right, is a 32KiB "pseudo static RAM", with a 120ns access time. The "pseudo" part means it is essentially a dynamic RAM with built-in refresh circuitry so it can refresh itself rather than requiring the processor to refresh. This allows the processor the ability to suspend to save power, without worrying about losing the contents of the memory.

To the left of the processor is a 128KiB mask ROM, which will hold the system firmware.

It would appear that the big chip is an ASIC, so its function will be custom to the device. Looking at the circuit board, it would be - at a guess - an interface between the processor and the I/O and display (which is a separate board - the white connections leading to this).

The final thing is the chunky chip on the left. It is a high current Darlington transistor array. Leading to the printer board, this will control the data matrix for the print head, and also the motor.

The other board contains an LCD signal row driver, and two LCD signal column drivers. It is not immediately obvious what handles the keyboard matrix. I don't plan to take the thing apart more to find out...

The interesting thing is that this device appeared to be reliable and bug free. I guess the flexibility of FlashROM is not always the blessing it is thought to be, for while bugs are inevitable, it seems to me nowadays that more and more "problems" are considered acceptable as a company can just issue a firmware update. Or not, as the case frequently is. But back in these days, firmware was committed to a mask-programmed ROM that was soldered to the board. It simply had to be right, or at least the bugs being minor things.

 

There wasn't anything else of much interest at the vide grenier, though it was interesting to note that some people wore light clothes and fairly open shoes, while others dressed more appropriately for the weather - with one slightly overdressing in waders and a plastic poncho. Those dressed in a more summery manner got a little soggy. Speaking of which...

 

Can you say continuity?

There is a film coming on BBC at 9pm this Friday called "An Education". It is at 9pm, so it will clash with "The Mentalist", if you didn't already watch it on 5* (I can't, only "five" is free-to-air on satellite).

Anyway... About five minutes in we see the lead character waiting at a bus stop.
It is raining. A lot.

Continuity, 1
She is getting soaked.
Continuity, 2
It doesn't show up very well in a still frame, but it is tipping it down.
Continuity, 3
Except in this shot, where not only is it a sunny day (and the girl appears dry, plus carrying her satchel evenly), but it is raining only on the bonnet of the car!!!
Continuity, 4

Oh, BBC. Seriously? ☺

 

Animé

In the winter season, I quite enjoyed "Fractale", even though the series seemed to collapse about as readily as the Fractale system. There was so much promise in the early episodes that couldn't be fully sustained in the later ones, and to be honest the ending was messy. But at least it was an ending.
I also watched "Freezing", but like "High School Of the Dead", I found the fanservice tended to get in the way. The premise was interesting, but I'm not sure if it really went anywhere much.
I am going to try "Gosick" (strange name!) to see what it is like. It is an ongoing winter season [at ep 16 of 24], so I'll have some catching up to do.
I am also watching the ridiculously titled "[C] The Money of Soul and Possibility Control", which I think is making some pretty strong points about the corrupting influence of 'foreign' money, but I am not sure if I will continue or not.

But there is one I will carry on with, and I like it so much I'll be interested in a release date of region 2 DVDs...

 

Steins;Gate (1-5)

An animé series I am following right now is "Steins;Gate". Don't ask about the odd punctuation, I have nothing to say except their last series was called "Chaos;Head" (actually "ChäoS;HEAd"), so I guess like semicolons;and;stüff in titles.

Based loosely around a crazy-scientist-meets-cute-a-smart-chick with a lot of the John Titor legend tossed in, this is a slow-burn series in which takes its time, and throws out annoyingly tantalising hints.

The story opens with a lengthy disconnect. We see the mad scientist Okarin wandering around a press conference on time travel. He wears a lab coat. He always wears a lab coat. He is also something of a paranoid conspiracy nut, convinced they are out to get him, whoever "they" might be. Following him around like a faithful puppy is a girl called Mayuri who is kinda cute but lacking in brains. The name Okarin was given to him by Mayuri, as a contraction of his real name Rintarô Okabe. This seems to be a Japanese thing - "Nodame (Cantabile)" is from Megumi Noda. Okarin, by the way, gives his name as "Kyôma Hôôin".
The press conference seems to consist of little more than a rehash of the John Titor story. Leaving the report after pointing this out, Okarin bumps into a girl called Kurisu. Okarin recognises the girl from something she wrote, but while she seems to think she spoke to him only a little while ago, he seems confused. It didn't happen.
Mere moments later, during a scene involving Mayuri and a toy, we hear a scream. Okarin rushes off, to find Kirusu dead in a pool of blood.
Okarin panics, as you would, then reaches for his phone. And for just a moment is utterly alone in a street in a deserted world. A blink and everybody is there, but, wait, there is a satellite embedded in the building he'd just been standing in. Not wreckage, not pieces that survived re-entry, but an entire satellite, just... there...

Back at base, we meet the other person in the "Future Gadget Lab", a hacker-supreme called "Daru" who has a rather dirty mind. However the essence of the Future Gadget Lab is that it isn't really anything serious. The hacker has nothing better to do and the mad scientist is delusional to the point of possibly being unable to function in society.

On to episode two, which starts with Okarin prodding and groping a somewhat perturbed Kurisu, who is quite definitely not dead. Did this happen, or is it a hint as to the scale of Okarin's delusions?
Okarin attends a lecture on time travel, and it turns out to be held by Kurisu, who explains mathematically why time travel just isn't going to happen. We see that she's a little shy but very bright, although she took a sort of delight in trouncing Okarin's suggestions that time travel could be possible.
Back at base, Okarin hits the web to try to find out what happened previously. He comes up empty, but does run into a character claiming to be John Titor. He wants to slam this obvious imposter off the web, but strangely he can't find any references to John, and the books he had have just vanished. Later, when out, he is taking pictures on his phone (why?) when one of them is a girl who objects. She seems... confused. Borderline deranged, but not like Okarin, more in the way of needing a hug and a good cry. She is looking for an IBM 5100 computer.

For those wondering about "John Titor", he was an online persona in around 2000-2001 who claimed to be a time traveller from 2036. It's kinda cool to see this story picked up and placed into an animé. For those who don't already know about this, and his so-called predictions, read the Wiki article.

In episode three, the "Future Gadget Lab crew are playing with their microwave. It makes stuff turn into an icky green jelly. Something goes wrong, involving a mobile phone, and the banana vanishes from the microwave...
...only to turn up completely reattached to the clump of bananas it came from, only green and icky. It just so happens that this entire scene was witnessed by Kurisu. A lot of talk, going all around until Kurisu reins in the boys and asks exactly what happened to the banana? There is more experimentation, which involves a message sent on the mobile phone travelling into the past when it is connected to the microwave. This leads to only one possibility that makes any sort of sense - time travel. As soon as the realisation of this sinks in, Kurisu turns around and runs.
We meet another girl, "Suzuha", a CRT enthusiast who is working part time in the TV repair shop downstairs.
Okarin turns his focus back to John Titor, and here we see a lot of conspiracy guff about CERN (amusingly fansubbed as "SERN"!), how they have the monopoly on time travel, how it's all about creating some sort of miniature black hole to make time travel real, how the Large Hadron Colider is for this purpose, how... et cetera et cetera. All of this leads Okarin to ask Daru to hack into CERN. Which in true sci-fi fashion is a mildly trivial event. Only, wait, some of the stuff supports Titor's story. What happens if you dump a delusional conspiracy theorist into the middle of an epic conspiracy?

Swiftly on to episode four, there are references to a dead person in the CERN messages, plus a file that resists decoding or decyphering - something that annoys the hell out of Daru. It will require... doo-da-doooo!... an IBM 5100 computer! The hunt is on, and along the way Okarin bumps into Kurisu who is in complete denial over what happened in the Future Gadget Lab, yet she is somehow fascinated by everything that is going on, albeit slightly annoyed that Okarin insists on calling her Christina. Then, yet another character is introduced in a lengthy way. A maid in a café. She is called "Feyris" and she appears to be about as delusional as Okarin, but he has to be nice and play a game with her in order to extract some information that might help him locate this computer he is after. He plays the game with some style, instantly losing and then pointing out that the request was to play, not to win. Begrudgingly, Feyris tells him to visit a shrine. A shrine that has just such a computer. And a reasonably pretty girl... who is actually a boy.

Up to date, episode five. The barrow is broken, so Kurisu and Okarin lug the heavy computer back to base. However just before, the repair girl Suzuha glares at Kurisu and adopts a stance with something like a golf club that suggests she's all but ready to beat the crap out of Kurisu. This is quickly defused by the owner of the shop telling her to get back to work, but... what? What was that all about?
Kurisu hears Mayuri saying she is Okarin's hostage and is in the process of phoning the police when Mayuri admits she made herself his hostage. Kurisu is floored - is anybody in this place even borderline normal?
As they live in Akihabara, Okarin pops out to get some spare parts so Daru can get the 5100 up and running in a matter of hours. Along the way, Suzuha warns Okarin not to trust Kurisu, and freaks out as a helicopter passes overheard.
The IBM 5100 effortlessly translates the super-secret text into something readable (my God, the 5100 didn't even have a real processor inside!), so the group start to piece together the CERN time travel story, where people have turned up in various locations and times, all of them a kind of icky green jelly. Sound familiar?
There is a lovely scene, following a board game, where Kurisu tells Okabe (his real name) that he isn't good at taking a strategic view. He only considers his own strategy and doesn't consider that of the opponent, and thus doesn't realise when something is a trap. Okarin explodes, not in fury about being criticised, but about Kurisu's neglect of calling him hoooooooin, saying "How many times must I tell you, Christina?" (yeah, like he gets her name right!). She starts to cry, and denies it saying "I definitely wasn't terrified by a guy screaming in my face, so I definitely didn't start crying from relief afterwards! That's not what happened!" So Okarin asks Daru why she is crying, and he said "She just told you, dumb-ass".

Steins;Gate, a frightened Kurisu (ep 5)
It is a lovely scene because it shows a vulnerability in Kurisu, an emotional human side. She might be the bright girl, but she is normal, not a "magical girl" or any of the usual animé stereotypes.

With another 19 episodes to go, this series can afford to take its leisurely pace, and be tantalisingly annoying about it. This is one episode I wish I stumbled on at some later date so I could get all the episodes, wipe an entire day off my calendar, and just watch it from beginning to end. Having to wait each week is surely a form of cruelty!

 

Your comments:

Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺
 
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.

Jess, 12th May 2011, 05:09
The mother everybody loves to hate will be on desert island discs if you listen to radio four. 
 
Do not forget as well that they didn't spend time and money getting the book gagged; it was yet more publicity for them and silencing their critic and it was donation money they used to do it. Ding-a!
tim, 30th May 2011, 19:36
I have seen numbered jigsaw pieces used in a management training context, where the thing could be quickly assembled number-side up and then flipped to show the solution. The clue is that you give a group two trays to aid with the flipping. The puzzle can be in the way the thing is numbered.

Add a comment (v0.08) [help?] . . . try the comment feed!
Your name
Your email (optional)
Validation Are you real? Please type 50269 backwards.
Your comment
Calendar
«   May 2011   »
MonTueWedThuFriSatSun
      1
234567
91011121314
16171819202122
2325262729
31     

Japan - can you help?
Japanese Red Cross
日本 赤十字社

Earthquake relief donations have closed.

Read about the JRC
Make a general donation

Last 5 entries

List all b.log entries

Return to the site index

Search

Search Rick's b.log!

Etc...

Thank you:
  • Fred
  • Bernard
  • Michael
  • David

Last read at 10:21 on 2017/11/23.

QR code


Valid HTML 4.01 Transitional
Valid CSS
Valid RSS 2.0

 

© 2011 Rick Murray
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted.
RIPA notice: No consent is given for interception of page transmission.

 

Have you noticed the watermarks on pictures?
Next entry - 2011/05/15
Return to top of page