Pegasus Mail closing shop

I loved Pegasus Mail, back in the day when we where using it at a previous employer. It treated email as text files, because, that what they where. You could edit the file on the server and clean emails up. It was nice and simple. Then we changed to GroupWise, which did group things (useful), but email now was E-Mail, and you couldn’t edit things, there was a huge DB back-end, and it was overkill.

So I’m sorry to hear they are closing their doors.

Why documenting Feels Hard

Last night, I realised I wanted to write a blog post about why I’ve been posting so much recently. There are two reasons, FeedDemon is making it easy for me to read many feeds, and thus I think about stuff that I want to talk about. And I’m documenting what we should do. Aka design.

Now I know the value of documentation is fantastic, and it lets me off load thoughts, gather others input and refine the plan for what is coming. But what I find hard is the writing for three reasons.

  1. I am pretending to do something mentally, so I can review my thoughts, decisions and strategies. Then write all this goodness down. But pretending is not actually doing. So there is a feeling that it’s not real, in which case why do it. I know weird feedback loop.
  2. Then I start writing stuff, and I am dictating to myself what to write. The thinker part says some profound thought, the writer queues this and starts to interact with the typist, to get it written. The latter two are slowish, so the thinker
    1. waits
    2. races ahead (and this can inject false words or letters into the typing queue, and the output becomes confused, family members will recognise this outcome)
    3. goes off on tangents

    some times the typist gets stuck and has to consult the speller, then the whole process stalls. Dangerous place to find ones self.

  3. The last reason I dislike writing is I’m not sure: I’m writing the correct thing? The right target audience? Too little information? Too much? Then analyst paralysis over what to write kicks in.

So I read blogs, write blogs, check email, write emails, eat lunch, then in the afternoon, in a fit of guilt make myself do the task at hand. Then I feel pleased progress is been made, but ashamed I didn’t start earlier. Because it’s not really hard, once you got it down others can add value and you feel good that you have advanced the good fight. But that is not how it feels at the start of the process.

So with this all in mind, this morning I read Mark Lawrence’s Why do I hate documenting Application Architectures? and felt doo-ee-oh, so just had to write this. Which was easy because I was just talking to myself.

Japanese Zodiac ~ Snake (hebi)

Garr Reynolds linked to Japanese Zodiac’s, and I’m a Snake

Snake (hebi) — Born 2001, 1989, 1977, 1965, 1953, 1941, 1929, 1917
People born in the year of the Snake are deep thinkers, speak very little and possess tremendous wisdom. They are fortunate in money matters and will always be able to obtain it. They are determined in what they do and hate to fail.

Italics mine, not sure anybody that knows me would agree strongly with that one. I take the perspective that, imagine how much I would babble if I was not wise. Scary I know!

DOSBox makes me Chuffed (aka helps find the bug)

After getting DOSBox to compile and then playing around with the memory reading functions to track the changes of the RAM location I wanted, I had the instruction pointer trace of the CoAB running.

The weird thing was the trail just stopped at the last good instruction location. So I dug around in the assembly of while loop, and found that I had flipped the while loop logic. Is should have been

while ( A == false && B == false )

but was

while ( A == false || B == false )

Now the game moves on to the next bit of non-decoded assembly and stops. Yeah!

Now that I am on the other side of the simple decoding mistake, I’m feeling really pleased or chuffed as I was saying last night. But besides finding the silly mistake, I have:

  • built up an assortment of tools, to better diagnose what the game is doing
  • named quite a few global variables
  • removed quite a few unused global variables (left overs from low level functions that no longer exist)
  • improved the graphics drawing in places.

I think DOSBox is going to be very handy in completing this project. I also dream of ways of using it to decode other games that interest me like Ancient Art of War

Building DOSBox – Win32 Visual Studio 2005

The base instruction on here.

  1. Get the DOSBox source: Page / File
  2. Get the SDL win32 development libraries: Page / File
  3. Get the SDL_net win32 development libraries: Page / File
  4. Expand the DOSBox source and open dev\DosBox\visualc_net\dosbox.sln
  5. Add dev\SDL-1.2.11\include and dev\SDL_net-1.2.6\include to the include paths
  6. Add dev\DXSDK\Include to the include paths
  7. Turn off screen capture, set C_SSHOT 0 in config.h so we don’t need libpng
  8. Turn off internal debugger, set C_DEBUG 0 in config.h, so we don’t need curses support
  9. Remove zlib.lib, libpng.lib and curses.lib from the Linker Dependencies

TA-DA. Ok, so you have no debugging support, thus the reason for building you our version is reduced. But I added the following code, and got the information I was after.

In CPU_Core_Normal_Run (src\cpu\core_normal.cpp) before the DEBUG_HeavyIsBreakpoint call (outside of the #if C_DEBUG block).

Bit16u ecl_offset = LoadMw( BaseDS + 0x4FCD);
Bit32u dsbase = LoadMd(BaseDS );
if( dsbase == 0x43240000 )
if( ecl_offset != offset_last )
printf("ECL_offset: 0x%04x\r\n",ecl_offset);
offset_last = ecl_offset;

The dsbase check was added because, for a span of time I was getting different results every second time around the loop, and I suspect that the instructions where not from my game code space, so I added a check that the data segment was my games before checking for changes. Worked a treat.