Skip to content

Commit 22c7e75

Browse files
committed
Rename files
1 parent c9c49dd commit 22c7e75

File tree

3 files changed

+114
-1
lines changed

3 files changed

+114
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ JonOfOz
5252

5353
## Journals:
5454

55-
- [Journal 1](./journals/03-20-2023.md)
55+
- [Journal 1](./journals/001.md)
56+
- [Journal 2](./journals/002.md)
File renamed without changes.

journals/002.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# 03-20-2023 - it begins!
2+
3+
### Q0: What are we doing today?
4+
### A: We're going to take a shallow dive into the `ipx` folder.
5+
I have _absolutely zero_ intentions at this early stage to dive into any part of the game code: I just want to understand what everything does at a high level, _then_ start working my way into the details once I've got the big picture and am comfortable with the codebase.
6+
7+
The research here will likely fit within chunk #5 as outlined in my [README](../README.md), `Network Play'.
8+
9+
As you might have read in [Masters of Doom](https://www.amazon.com/Masters-Doom-Created-Transformed-Culture/dp/0812972155), the idea for multiplayer came about when inspiration struck John Romero, him having seen two enemy NPCs fight each other, and realizing how awesome it would be if those were _players_ instead: that idea spawned an online game made known and revered as, in Romero's own words, **"Deathmatch"**.
10+
11+
A generation was born. LAN parties became a thing. And I'm pretty sure the code I'm about to look into is what made all of that happen.
12+
13+
I'm super excited to start looking into this. 🤩
14+
15+
---
16+
### Q1: What is the `ipx` folder?
17+
### A: According to the folder's [README](../ipx/README), it contains code supporting DOOM's IPX network driver.
18+
19+
---
20+
### Q2: What is _IPX_ anyway?
21+
### A: [Internetwork Packet Exchange.](https://en.wikipedia.org/wiki/Internetwork_Packet_Exchange) I'd not heard of it until now.
22+
It was apparently quite popular at the time, and had a small memory footprint, making it a great fit for OS's which obviously didn't have quite the memory we have today. Unfortunately, IPX didn't scale well on large networks, and was eventually phased out and replaced by TCP/IP when the Internet really began to take off.
23+
24+
---
25+
### Q3: What's in `DOOMNET.C`?
26+
### A: The `launchDOOM` function—likely, used to launch DOOM.
27+
This function seems to be called in two places:
28+
* `IPXSETUP.C`
29+
* `SERSETUP.C`
30+
31+
(Dunno what's in either of those files yet.)
32+
33+
At a high level, `launchDOOM` does some setup to launch DOOM or DOOM2 as appropriate.
34+
The file mentions things like `doomcom` (and setting its `id`), hooking in an "interrupt vector", and handling CLI arguments.
35+
36+
A lot of this is over my head right now, and that's okay, I'll dedicate more time to the finer details later.
37+
38+
---
39+
### Q4: What's in `DOOMNET.H`?
40+
### A: Various function and constant declarations, plus the declaration of the `doomcom` struct.
41+
I don't want to spend too long with this one right now, but I see some interesting things like `MAXNETNODES` and `MAXPLAYERS`, set to `8` and `4` respectively.
42+
43+
Man... It's so hard to believe how far technology has come since then. I can just see Carmack in his office now, typing out those humble little numbers some 30 years ago, dreaming of the days we're in now. 🙂
44+
45+
In the `doomcom` struct, I see some members that catch my eye: `episode`, `map`, `skill`, and `deathmatch`. Others like `extratics` and `ticdup`, I'll need to revisit on a deeper dive.
46+
47+
---
48+
### Q5: What's in `IPXSTR.H`?
49+
### A: Various string constants used throughout other files in the `ipx` folder.
50+
51+
Not gonna spend much time here until I need to dig in to the code that uses it.
52+
53+
---
54+
### Q6: What's in `IPX_FRCH.H`?
55+
### A: French versions of the constants in `IPXSTR.H`.
56+
57+
I'm not immediately sure why there's just two versions, one for English and one for French, but I can always find out later.
58+
59+
---
60+
### Q7: What's in `IPXNET.C`?
61+
### A: The IPX packet driver, and Many functions for handling various IPX network communications.
62+
63+
A little overwhelming right now, but here's the functions inside:
64+
65+
- `OpenSocket`
66+
- `CloseSocket`
67+
- `ListenForPacket`
68+
- `GetLocalAddress`
69+
- `InitNetwork`
70+
- `ShutdownNetwork`
71+
- `SendPacket`
72+
- `ShortSwap`
73+
- `GetPacket`
74+
75+
Sounds like an exciting file to explore!
76+
77+
Will continue this file tomorrow.
78+
79+
---
80+
### 03-21-2023
81+
...Aaaaaaand resuming.
82+
83+
### Q8: What's in `IPXNET.H`?
84+
### A: Various declarations that I don't know really what to make of.
85+
86+
Some interesting stuff in here: there's a `packet_t` struct which contains instances of other structs, viz. `IPXPacket` and `EBC`. The former is no doubt for storing information about IPX packets; the latter, I'm assuming, has something to do with IBM's "Event (or perhaps "Entry") Control Block", a.k.a "ECB", used to represent the status of an event.
87+
88+
Again, it's a little over my head for now.
89+
90+
---
91+
### Q9: What's in `IPXSETUP.C`?
92+
### A: Various functions for IPX setup... just a guess.
93+
94+
There's an `Error` function for handling "abnormal program terminations", a `LookForNodes` function which seems to have and a very curious `void interrupt NetISR` function.
95+
96+
I'd never heard of `interrupt` before. If I had to guess, I think it was an extension of the compiler they were using at the time. Either way, [this comment on StackOverflow](https://stackoverflow.com/a/12353679/5374137) may suggest that Carmack had to combat an issue with serial port character drops on DOS at the time. The `interrupt` function isn't so commonly needed nowadays, I gather, but it's just so interesting to me to see problems programmers used to face back then and what they did to solve them.
97+
98+
---
99+
### Q10: What's in `IPXSTR.H`?
100+
### A: Various definitions for messages to be printed out to the console.
101+
102+
103+
---
104+
105+
And for now, that's it for the `ipx` folder! 🥳
106+
107+
I'm so excited to dive into another part of the code and document my findings, if still only at this high level. Again, I plan on coming back to understanding to finer details, but only after I've investigated more of the code.
108+
109+
110+
**See you in the next journal!**
111+
112+
*JonOfOz*

0 commit comments

Comments
 (0)