El Descubrimiento de America

Two programs that occupy THE SAME addresses at different times, which is why there are five listings and not one; a second half that plays out inside a 128x52 tile cutaway of the caravel; and 7,564 bytes nobody ever reads, because the tape records fixed-size blocks no matter what.

Gema Software / OMK Software - (c) 1987 - Tape, 66,371 bytes - MSX1 - 64 KB of RAM - Dump ac7b7800...

Not one capture here. Every picture is drawn from the bytes of the tape, by running in Python the same upload routines the Z80 runs. The listings and the numbers are reproducible with make, and reassembling gives back the whole tape byte for byte.

The tape in numbers

100%of the tape explained
733named routines
26.7%of the listings commented
15,504bytes of code
50,512bytes of data
0bytes unidentified

What turned up when we took it apart

0xD300 is not code: it is a pointer

The CARGA file runs from 0xC000 to 0xD3DF, but its execution address is 0xD302, not 0xD300. The reason is in those two bytes: they hold 69 D3, the word 0xD369, which is the loop that reads a tape block.

The first half of the game ends with ld hl,(0xD300) / push hl / ret at 0x5CC2, and that is how it returns to the loader to ask for the second half without carrying the address in its own code. The loader survives both programs, because no tape block reaches past 0xD2FF.

Five listings for one game, because both programs live at the same addresses

The tape holds four files: one line of BASIC, the CARGA binary, and two headerless blocks of 30,472 and 30,467 bytes. The BIOS never reads those two: the loop at 0xD369 reads them by hand with TAPION and TAPIN, byte by byte, and splits them into three sync bytes, 0x2400 bytes at 0x4000 and 0x5300 bytes at 0x8000.

So both halves of the game occupy exactly the same addresses at different times. That is why this project is five listings and not one: carga, p1bajo, p1alto, p2bajo and p2alto.

The second half plays out inside the caravel

There are no screens here: there is a longitudinal cutaway of the ship, 128 x 52 tiles -1024 x 416 pixels- with the deck, three masts with their sails and rigging ladders, and three runs of cabins and hold below.

The 0x1A00 bytes run from 0x9000 to 0xA9FF, and what says the width is 128 is the 0x80 step between rows in the loop at 0x4285. The game cuts a 32x24 window out of that plan and scrolls it both ways.

What you buy is drawn stowed in the hold

The five commodities -water, wine, food, timber and cloth- are bought at the quayside warehouse, each costing one of the sixteen units of MONEY. But the number does not stay in a counter: the routine at 0x4F60 in the second half stows the cargo in the hold, one pile per commodity and as many pieces as units remain.

Drawn out, the tiles of each pile are staved barrels (0xBF-0xC4), tied sacks (0xB9-0xBE), stacked planks (0xC6-0xC8) and rolls of cloth (0xC5, 0xC9 and 0xCA).

7,564 bytes nobody reads, and one stretch of them is a snapshot of memory

The tape records fixed-size blocks -0x2400 and 0x5300 bytes- no matter what, but the first half's program ends at 0x5F9F and the second's at 0x5C3F. Whatever was in memory got recorded behind them. That is 7,564 bytes out of 66,016 (11.5%) that are identified and accounted for, but that no instruction ever touches; 4,534 of them are block tail.

One of those leftovers can be read: from 0xCC56 to 0xD2FF the first half carries 1,706 bytes identical to the CARGA file but for a single byte. It is the loading screen, still sat in memory when the block was recorded.

The publisher's signature carries a typo, and it is on the tape

Decoding the name table at 0xD000, down the right margin of the loading screen you read "OMIKRON Softwarwe", with two w's. The typo is on the tape, not in this disassembly, and a test pins it.

The letters are not ASCII: they are tile indices, and they use two different alphabets inside the same table (0x00-0x19 and 0x20-0x39, two sets for the same twenty-six letters), plus six tiles (0x3A-0x3F) for the tall two-tile capitals that start "El", "Descubrimiento" and "America".

What the tape draws

Under each picture is where it comes from and what is on it.

<b>The loading screen</b>, built from the name table at 0xD000 of the <code>CARGA</code> file. It is the only piece on the tape that names the publisher, and it does so with a typo: <b>OMIKRON Softwarwe</b>, running down the right margin
The loading screen, built from the name table at 0xD000 of the CARGA file. It is the only piece on the tape that names the publisher, and it does so with a typo: OMIKRON Softwarwe, running down the right margin
<b>Screen 0</b>, the street of the port of Palos: the tavern with its sign, the anchor, the quay and the water. Name table at 0x82F5
Screen 0, the street of the port of Palos: the tavern with its sign, the anchor, the quay and the water. Name table at 0x82F5
<b>Screen 1</b>: a studded gate between two houses. Name table at 0x85F5
Screen 1: a studded gate between two houses. Name table at 0x85F5
<b>Screen 2</b>: a courtyard with a staircase and barrels, and a bird crossing on the left. Name table at 0x88F5
Screen 2: a courtyard with a staircase and barrels, and a bird crossing on the left. Name table at 0x88F5
<b>Screen 3</b>, the church: crucifix, altar and stained glass. Name table at 0x8BF5
Screen 3, the church: crucifix, altar and stained glass. Name table at 0x8BF5
<b>Screen 4</b>, the map room, with the portrait and the table. Name table at 0x8EF5
Screen 4, the map room, with the portrait and the table. Name table at 0x8EF5
<b>Screen 5</b>, inside the tavern: the bar, the stools and a painting of a ship. Name table at 0x91F5
Screen 5, inside the tavern: the bar, the stools and a painting of a ship. Name table at 0x91F5
<b>Screen 6</b>, the ship's deck, with the rigging and the barrels. Name table at 0x94F5
Screen 6, the ship's deck, with the rigging and the barrels. Name table at 0x94F5
<b>Screen 7</b>, the quayside warehouse, where you buy: AGUA, VINO and COM... can be read. It is the only one with <b>no name table of its own</b>: it is cut as 32 columns out of a 64x24 map living at 0x97F5
Screen 7, the quayside warehouse, where you buy: AGUA, VINO and COM... can be read. It is the only one with no name table of its own: it is cut as 32 columns out of a 64x24 map living at 0x97F5
<b>The summary at the end of the first half</b>, with the seven figures: money, food, water, wine, timber, cloth and crew. The labels are artwork, not text
The summary at the end of the first half, with the seven figures: money, food, water, wine, timber, cloth and crew. The labels are artwork, not text
The same screen with <b>each counter in its own colour</b>. Since the labels are artwork, which is which has to be measured: the loop at 0x5D0C paints the fourteen digits on CONSECUTIVE tiles from 188 on, and those tiles are then looked up in the name table at 0xC310. The handover to the second half <b>crosses food with timber</b>
The same screen with each counter in its own colour. Since the labels are artwork, which is which has to be measured: the loop at 0x5D0C paints the fourteen digits on CONSECUTIVE tiles from 188 on, and those tiles are then looked up in the name table at 0xC310. The handover to the second half crosses food with timber
<b>The whole inside of the caravel</b>: 128 x 52 tiles, 1024 x 416 pixels, unpacked from the 0x1A00 bytes at 0x9000-0xA9FF. What says the width is 128 is the 0x80 step between rows in the loop at 0x4285
The whole inside of the caravel: 128 x 52 tiles, 1024 x 416 pixels, unpacked from the 0x1A00 bytes at 0x9000-0xA9FF. What says the width is 128 is the 0x80 step between rows in the loop at 0x4285
The <b>32x24 window</b> the game cuts out of that plan, here from column 50 and row 16. Checked tile by tile against the emulator's VRAM: 768 tiles, 0 different
The 32x24 window the game cuts out of that plan, here from column 50 and row 16. Checked tile by tile against the emulator's VRAM: 768 tiles, 0 different
<b>The ocean chart</b>, with its three gauges -days, morale and physical state- and the wind speed. The crossing is played on 20x20 one-byte squares (0xC98C-0xCB1B): 0 is open sea, 1 and 2 are currents, and 3 upwards is a setback looked up in the nine-entry table at 0xC968
The ocean chart, with its three gauges -days, morale and physical state- and the wind speed. The crossing is played on 20x20 one-byte squares (0xC98C-0xCB1B): 0 is open sea, 1 and 2 are currents, and 3 upwards is a setback looked up in the nine-entry table at 0xC968
<b>The cargo tiles</b>, lifted from the tape and laid out in a row: staved barrels for water and wine (0xBF-0xC4), tied sacks for food (0xB9-0xBE), stacked planks (0xC6-0xC8) and rolls of cloth (0xC5, 0xC9 and 0xCA). With these the routine at 0x4F60 stows the purchase in the hold
The cargo tiles, lifted from the tape and laid out in a row: staved barrels for water and wine (0xBF-0xC4), tied sacks for food (0xB9-0xBE), stacked planks (0xC6-0xC8) and rolls of cloth (0xC5, 0xC9 and 0xCA). With these the routine at 0x4F60 stows the purchase in the hold
<b>FINAL DE LA TRAVESIA</b> -end of the crossing-: land sighted, with the caption boxed over the sky
FINAL DE LA TRAVESIA -end of the crossing-: land sighted, with the caption boxed over the sky