Monday, March 29, 2010

Bugs

With all these successful screenshots, you might think this stuff just turns out correctly on the first try... here is a good example of how tricky it is to get everything right:

I am trying to print the 'H' in "Hello world". It should line up in the upper right of the black box. Instead, there are sets of white pixels spread out in the middle of the screen (look closely, they come in pairs spread apart, with one solid line - the bar of the 'H').

This tells me two things:
  1. My starting point into the video memory is short by about one xterm height
  2. My next row code is off, by maybe 6 or so

Sunday, March 21, 2010

Console Coming Soon

This was a lot of fun!

I am supposed to be enabling interrupts (which will require turning off the PIC, configuring the IOPIC, and enabling the local APIC - a lot of boring and complicated stuff).

So instead, I thought about drawing console windows!

I got to think about fill_rect, and I have enough of the fixed width font ready to print Hello world.

Thursday, March 04, 2010

NewStars Status

Cool little bug managed to waste a week of John's time...

I had noticed a difference in surface minerals for player 1 in 2401. Examining the mining code indicated it was probably due to scrapping the JOAT remote miner.

The code which calculates ship cost and scrap value is pretty complicated, so it seemed natural the bug would be there.

After digging into it, it became apparent that the bug was due to the miner being on a destroyer hull!

This is due to a copy/paste bug in the code which gives players their initial fleets:
In function makeInitialJoatMiner (copied from the make destroyer code)
Ship *design = new Ship(*(pd->gd_->hullList[destroyer_hull]));

Oops.