Repository navigation
Releases
v0.0.1: Out of This World cutscene viewer for Sega Master System: implement using Arena.
Full Changelog: https://github.com/haroldo-ok/ootw-cutscene-sms/commits/v0.0.1
This is a technical achievement for Sega Master System software engineering. Fitting the cinematic cutscenes of Éric Chahi's 1991 masterpiece Out of This World (Another World) into a 4 MB .sms cartridge---complete with streaming video deltas, a global 57,446-tile dictionary, and SN76489 PSG tracker conversions---is a requires data compression, VDP bandwidth management, and Z80 assembly optimization.
Video Streaming & Data Compression Pipeline
DOS Asset Processing Pipeline
│
┌───────────────────────────────────────┼───────────────────────────────────────┐
▼ ▼ ▼
Resource Extraction (Bytekiller) Off-line Frame Capture AWPSG Tracker Translation
- Unpacks memlist.bin & banks - Vector bytecode interpreter - Converts MOD order lists
- References rawgl format - Renders 256×192 16-color frames - Outputs raw AWA byte streams
│ for SN76489 PSG registers
▼
AWENC / AWREPACK Engine
- 8×8 Tile Deduplication (57,446 tile dictionary)
- Pre-converted 4-bitplane VDP layout (32 bytes/tile)
- Nearest-tile distance substitution (≤ 447 slots)
- Per-frame VRAM uploads & tilemap cell deltas
Core Technical Highlights
-
Global Tile Dictionary & VDP Limits: To keep video playback within hardware constraints, all 15 cutscenes share a single dictionary of 57,446 tiles pre-formatted to 4-bitplane SMS VDP layout. Every frame is restricted to VRAM tile slots 1--447 to safeguard the tilemap at
0x3800, using pixel-distance tile substitution for high-density frames. -
V-Counter Synchronization: Video playback uses port
0x7E(V-counter wrap) for precise VBlank timing rather than status-register IRQ flags, maintaining frame sync across diverse hardware revisions and emulators. -
Hot-Loop Z80 Assembly Streaming: VRAM writes in
aw_tile,aw_ups, andaw_cellsare timed with ≥28 cycle spacing to avoid VDP VRAM write corruption during active display. Data delivery time is dynamically subtracted from the frame hold counter to preserve real-time playback speeds. -
SN76489 Music Engine: Translates tracker period tables and volume envelopes into synchronized PSG register streams (
AWA), serviced on every frame tick alongside video streaming.
Cutscene Roster & Performance Profiles
| Cutscene ID | Cutscene Name | Real-Time Sync & Performance |
|---|---|---|
| 0 | TITLES |
100% Real-Time (249 ticks vs 248 scheduled) |
| 1 | INTRO |
100% Real-Time streaming |
| 2 | CITY 1 OPENING |
Real-Time bandwidth compliant |
| 3 | MUTATION |
High tile density pass (~1.4--1.7× speed scaling) |
| 4 | CITY 2 OPENING |
100% Real-Time streaming |
| 5 | CISTERN DROP |
100% Real-Time streaming |
| 6 | ESCAPE FALL |
100% Real-Time streaming |
| 7 | CITY 3 OPENING |
100% Real-Time streaming |
| 8 | SEA DEPARTURE |
100% Real-Time streaming |
| 9 | CITY 4 OPENING |
100% Real-Time streaming |
| 10 | BEAM DEPARTURE |
100% Real-Time streaming |
| 11 | CITY 5 OPENING |
Peak tile uploads (~1.4--1.7× speed scaling) |
| 12 | FOREST GATE |
100% Real-Time streaming |
| 13 | ENDING |
100% Real-Time streaming |
| 14 | PASSWORD |
100% Real-Time streaming |