Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions graal-6.03r7-G3D0511C/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Graal 6.03 rev 7 for Linux (`G3D0511C`)

The 6.03r7 client, rebuilt. The original read for this folder is the Linux
x64 build of November 2012: one native C++ program, no launcher and no
engine library. On the wire it keeps the gen-5 codec with its own token,
no tamper check, no listserver and no licence file. This folder starts
from `graal-5.00r7-G3D22067` and changes what the 6.x notes say differs.
This is the 0.0.1 reproduction: hit or miss.

The Windows 6.03r7 is the same release with its own token (`G3D0311C`) and
`win` in its login line. It is not this folder.

> **Not affiliated.** graal-delphi is an independent fan project. It is not
> affiliated with, endorsed by, or connected to GraalOnline or
> graalonline.com, Cyberjoueurs, or Stéphane Portha ("unixmad").

## Sources

From [graal_analysis](https://github.com/squirelworks/graal_analysis), not
from decompiled code:

| Area | Notes |
|---|---|
| Token, login line, framing, ids both ways | `protocol/v6x-clients.md` |
| Ids in table form | `version-profiles/5.00-6.03.toml` |
| Login mode, server warp, play (Windows 6.03r7 in the lab) | `protocol/v5v6-lab-play.md` |
| Everything carried over | `../graal-5.00r7-G3D22067/README.md`, `../graal-3.153-G3D28015/README.md` |

## What differs from the 5.00r7 rebuild

| | 5.00r7 | 6.03r7 Linux (this folder) |
|---|---|---|
| Game token | `G3D22067` | `G3D0511C` |
| Login line tail | `win` and three machine fields | `linux` and four machine fields |
| Login mode | level drawn, no characters | no tiles and no characters (chests and image NPCs only) |
| Long frames | none | 0xFFFF bytes or more: length 0xFFFF, then a u32be length |
| Early flush | not traced (60000 bytes) | at 0x1000 bytes |
| Server ids handled | 100 | 92: drops 41, 75, 132, 133, 165, 169, 171, 175, 181, 184, 193; adds 109, 111, 198 |
| OSTYPE prop | `win` | `linux` (assumed from the login line) |

The machine ids are, on the original, MD5 hashes of the `eth0` MAC and of
the inode of `/etc`, an empty field, and the kernel release and version.
The rebuild reads none of them and sends each as `""`.

## Units

As in 5.00r7, with the suffix `603`: `Protocol603`, `GraalClient`,
`Adventure`, `Graal603.dpr`, `ListServer603`, `StartScreen603`, `RunMode`.

## Running it

Put `Graal603` in the root of a 6.03r7 install and start it with no
arguments for the start screen. It finds the install's files from there,
or from `graal-assets/6.03r7/` and `graal-assets/common/` next to it.

Start asks a Seihai listserver for the server list (`listserver.txt` next
to the program, else `listserver.graal.in` on 14922), since the rebuild
cannot show the Login server's scripted list. The picked server's name
becomes the client's server name, as if the Login server had already
warped there, so the level and the player are drawn.

```
GRAAL_PW=... Graal603 --server HOST:PORT --account NAME # as Login
GRAAL_PW=... Graal603 --server HOST:PORT --account NAME --server-name Classic
Graal603 --level some.nw # offline
```

With `--server` and no `--server-name` the server is `Login`: no tiles and
no characters are drawn until the server sends a 178.

## Files it opens

From the program's folder (or `--data`), then `graal-assets/6.03r7/`, then
`graal-assets/common/`:

- `pics1.png` (or `pics1.gif`) at the top or in `levels/tiles/`, where a
5.x/6.x install keeps it; `arrays.dat` (a 5.x/6.x install has none, so
the built-in tile types are used)
- `levels/` for levels, ganis and images; `levels/heads/`, `levels/bodies/`,
`levels/swords/`, `levels/shields/`, `levels/hats/`, `levels/images/`,
`levels/tiles/` and `levels/images/downloads/` (where the install keeps
`sprites.png`)
- `levels/offlinetutorial_b-2.nw` (or `.graal`) for Training, else `start.nw`
(a 5.x/6.x install has no offline tutorial, so Training plays `start.nw`)
- `listserver.txt` (optional)

## Not yet, or not known

- The Login server's scripted GUI and GS2: 140 and 197 (scripts and the
`GRESCR01` cache), 195 (gani scripts) and 190 are accepted and ignored.
- 109 (probably a file redirect), 111 (`creationtime.dat`) and 198 are
accepted and ignored; the rebuild writes no `creationtime.dat`.
- 46 (ENTERLEVEL) on level entry, 162 (the ping answer), the base-file
requests and the keep-alive 24 are not sent.
- `GR-V1.05` levels and `GRPKG001` update packages.
- The chat font (Tempus Sans ITC 24) and nickname colours by AP.
- Whether 6.03r7 plays offline at all is not traced; Training keeps 3.153's.
- No side-by-side run against the real 6.03r7; that is 0.0.2 work.
- Everything still missing from the 5.00r7 rebuild.
61 changes: 61 additions & 0 deletions graal-6.03r7-G3D0511C/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Graal 6.03 rev 7 for Linux (G3D0511C)

The first rebuild of the Graal 6.03 rev 7 Linux client, in Delphi (Object
Pascal). The original is a Linux program from 2012; this rebuild runs on
Linux and Windows. It is an early version: most of the game (NPCs, items,
weapons, scripts, the scripted login screens) is not there yet.

> **Not affiliated.** graal-delphi is an independent fan project. It is not
> affiliated with, endorsed by, or connected to GraalOnline or
> graalonline.com, Cyberjoueurs, or Stéphane Portha ("unixmad").

These zips hold no original Graal code, graphics, sounds or levels. The
program carries small original default graphics and a starter level of its
own, so it runs as it is. Put it in the root of a 6.03r7 install you own
(or point it at one with `--data DIR`) and the install's tiles, ganis,
heads and bodies take their place. The shared `graal-assets/` folder next
to the program works too (`graal-assets/6.03r7/`, then
`graal-assets/common/`).

## Downloads

| Zip | Runs on | Window |
|---|---|---|
| `…-linux.zip` | Linux x86-64 | X11 |
| `…-windows.zip` | Windows, 32-bit | GDI |

Each zip has `Graal603` (the client), `Test603` (its test suite) and the
build's README.

## What works

- The start screen: nick name, Training, Start. Start fetches the server
list from `listserver.txt` next to the program, or else
`listserver.graal.in` on port 14922. Then account, password and Connect.
- Login with `G3D0511C`, the platform `linux` and four empty machine
fields; the language in its own frame; no tamper check.
- The Login server: a server reached by its address alone is called
Login, and there neither the tiles nor any characters are drawn, until
the server moves the client on with a server warp. A server picked from
the list plays at once.
- Server warps: the client logs in again to the named host and port, under
the new name.
- Long frames (64 KB and more) both ways.
- The first props with `linux` as the system name; movement sent every
tick in whole pixels.
- The board, the player and other players drawn from the install's tiles
and ganis; walking and collision; level links; gmaps and their edges.
- A headless mode for stress runs, with JSON stats.

## Not yet

NPCs, baddies, items and weapons; scripts and their cache; the scripted
server list and account screens; chat and its font; layered levels; update
packages. See the build's README for the full list.

## Checks behind this release

The test suite (97 checks) runs with range and overflow checks and the heap
tracer, and must end with no unfreed memory. CI also logs two of these
clients into seihai-gserver, has the second see the first, and walks one
through a level link.
Loading
Loading