VGA Pages, Input, and Sound

VGA Pages, Input, and Sound

Wolfenstein’s platform layer makes the original hardware model visible. ID_VL.C and ID_VH.C operate the low-level and higher-level VGA services, ID_IN.C polls and interprets input, and ID_SD.C provides the sound layer. These files are not incidental glue; they define the timing and presentation boundary around the game loop.

Input, game update, VGA page, and sound presentation flow

Page-oriented VGA presentation allows the game to compose a frame in a buffer and then make the completed page visible, avoiding the most obvious tearing artifacts of direct visible-page drawing. The source’s explicit page and video functions reflect a time before a graphics API concealed this arrangement behind swap chains, but the conceptual boundary remains recognizable.

Input code translates keyboard, mouse, and joystick state into the control values consumed by the game, while the sound driver handles effects and music according to the resources and hardware mode available. These systems must remain separate from the world simulation: a key is a local device event until the play code interprets it, and a sound effect is presentation feedback rather than an authoritative change to the map state.