What probem? I can stop whenever I want! (More Games in AL and Business Central)
Demo of retro game ports running in Business Central through AL: Galaga, which needed a Z80 processor emulator written in AL because the game is pure Z80 assembler, and Quake, which uses an enhanced C2AL converter and a soft renderer. Both build on the earlier Doom port's UI and approach. The video also covers ROM sourcing and Quake's performance limits.
- Introduction and overview of game ports in AL
- Galaga port and arcade games discussion
- How Galaga differs from Doom - assembler vs C source
- Z80 emulator architecture and implementation
- Z80 emulator as generic processor implementation
- Quake port introduction and challenges
- Quake engine in AL and C2AL tool enhancements
- Performance considerations and conclusion
Overview
Erik Hougaard follows up his Doom port with two more games in AL. Galaga is written in pure Z80 assembler rather than C, so the C-to-AL approach used for Doom did not apply. He built a Z80 emulator in AL instead, with all opcodes, the register set and a 64K memory modelled as an array of integers.
Quake was ported with the C2AL converter, which gained a lot of new functionality for this. The result is a single codeunit of about 64000 lines called Quake engine. It uses soft rendering, supports pack files and stores save games in a table. It runs slowly when a scene has a lot of movement.
Key points
- Galaga is written in pure Z80 assembler, not C, so it needed an emulator rather than the C-to-AL converter used for Doom.
- The Z80 emulator in AL implements all opcodes and the registers A, F, B, C, D, E, H, L plus alternative registers. Memory is an array of integers over a 64K address space, and the ROMs are mapped into the memory space.
- The emulator is more or less generic and could run any Z80 code, such as code from a Spectrum. The video demonstrates it with Galaga.
- Galaga ROM files are not in the repository and must be sourced separately, because they are not the presenter’s to distribute.
- Galaga and Quake reuse the same UI and frame-handling controller as the Doom port.
- The Quake port uses the enhanced C2AL tool and produces one codeunit called Quake engine, about 64,000 lines of code.
- Quake uses soft rendering instead of OpenGL, loads a pack file as a resource, stores save games as a table, and includes only the shareware levels.
Features
Every feature below: status not stated, demoed.
| Feature | At |
|---|---|
| Galaga port to AL | 1:21 |
| Z80 emulator implementation in AL | 3:47 |
| Quake port to AL | 7:53 |
| C2AL converter enhancements | 10:22 |
| Doom port to AL | 0:14 |
AL objects mentioned
As heard in the captions. A name that matches one object page by exact type and name links to it; the others stay as named.
- codeunit “Quake engine” at 10:22
Not found in BC28-30: codeunit “Quake engine”.
Quotes
- 0:27 “finally answered the uh each old question uh can it run Doom?”
- 2:27 “Galaga is not written in C. Galaga is written in pure assembler for the Z80 uh processor.”
- 4:27 “The Z80 is a has a 64K RAM address space. So, memory is just an array of integers.”
- 6:27 “implemented all the op codes for a z80 processor and and and this thing is is more or less generic”
- 10:33 “the C2AL tool gained a lot of extra functionality in order to do Quake”
Presenters (as heard): Merrick, Claude.
