resonance 1.0.1
Loading...
Searching...
No Matches
cutscene.h File Reference
#include <ezmpeg.h>
#include <libgraph.h>
Include dependency graph for cutscene.h:

Go to the source code of this file.

Functions

void play_cutscene (const char *name, int with_audio)
 Play a PSS movie to the end, or until the player skips it.

Variables

VoBuf voBuf
 The decoded frame queue.
sceGsDBuff db
 The display double buffer.
VideoDec videoDec
 The video decoder instance.
AudioDec audioDec
 The audio decoder instance.

Function Documentation

◆ play_cutscene()

void play_cutscene ( const char * name,
int with_audio )

Play a PSS movie to the end, or until the player skips it.

The unit is Sony's ezmpeg sample driver adapted by the game. It is a C file, as its __FILE__ literal "cutscene.c" records. A name with a device prefix is first opened as a host file after the colon, and the routine returns at once when that fails. Otherwise it allocates one 0x57bc00 byte block for every decoder buffer, resets the GS, plays the stream, and frees the block.

Pressing and releasing Cross or Start after the eleventh decoded frame aborts the playback.

The name is inferred. The front end's Sony screen and one other caller both pass a with-audio flag of 1.

Parameters
nameThe stream to play, with its device prefix.
with_audioNon-zero to decode and play the PCM stream alongside the video.
Ghidra address:
NTSC-U/C: 0x00511010
Ghidra address:
PAL: 0x00551288

Variable Documentation

◆ voBuf

VoBuf voBuf
extern

The decoded frame queue.

The decoder stages pictures into it, and the display handlers take entries from it and release them through it.

The queue starts a cache line of its own. Its cached updates then never share a line with the display buffer placed before it.

Ghidra address:
NTSC-U/C: 0x0070cae8
Ghidra address:
PAL: 0x007509d8

◆ db

sceGsDBuff db
extern

The display double buffer.

The end-of-image handler swaps its halves as fields are shown.

The vertical blank handler writes the draw environments through the uncached segment while the GIF channel reads the buffer. The buffer therefore starts on a cache line.

Ghidra address:
NTSC-U/C: 0x0070cb00
Ghidra address:
PAL: 0x007509f0

◆ videoDec

VideoDec videoDec
extern

The video decoder instance.

The decoder and stream callbacks address it directly, because the sample registers them with a null context.

Ghidra address:
NTSC-U/C: 0x0070cd78
Ghidra address:
PAL: 0x00750c68

◆ audioDec

AudioDec audioDec
extern

The audio decoder instance.

The audio callback addresses it directly.

Ghidra address:
NTSC-U/C: 0x0070ce30
Ghidra address:
PAL: 0x00750d20