1#ifndef YAZE_APP_ZELDA3_TRACKER_H
2#define YAZE_APP_ZELDA3_TRACKER_H
24constexpr char op_len[32] = {1, 1, 2, 3, 0, 1, 2, 1, 2, 1, 1, 3, 0, 1, 2, 3,
25 1, 3, 3, 0, 1, 3, 0, 3, 3, 3, 1, 2, 0, 0, 0, 0};
28static int sbank_ofs[] = {0xc8000, 0, 0xd8000, 0};
31constexpr char fil1[4] = {0, 15, 61, 115};
32constexpr char fil2[4] = {0, 4, 5, 6};
33constexpr char fil3[4] = {0, 0, 15, 13};
193 unsigned char *
GetSpcAddr(
Rom &rom,
unsigned short addr,
short bank);
206 int WriteSpcData(
Rom &rom,
void *buf,
int len,
int addr,
int spc,
int limit);
The Rom class is used to load, save, and modify Rom data.
void EditTrack(Rom &rom, short i)
Opens an editor window for a specific track. (Legacy UI-related function)
unsigned char * GetSpcAddr(Rom &rom, unsigned short addr, short bank)
Gets a direct pointer to music data within the ROM. This function is critical for parsing....
short AllocSpcCommand()
Allocates a new SpcCommand from a pre-allocated pool. This uses a classic free-list implementation fo...
SongSpcBlock * AllocSpcBlock(int len, int bank)
Allocates a new SongSpcBlock for holding generated SPC data. These blocks are the building blocks for...
void SaveSongs(Rom &rom)
High-level function to save all modified song data back to the ROM. (Currently commented out,...
short LoadSpcCommand(Rom &rom, unsigned short addr, short bank, int t)
Loads a block of music data from a given ROM address. This is the main parser. It reads the raw byte ...
short GetBlockTime(Rom &rom, short num, short prevtime)
Calculates the total time (duration) of a block of SpcCommands. This is essential for synchronization...
int WriteSpcData(Rom &rom, void *buf, int len, int addr, int spc, int limit)
Writes a prepared data block into the ROM file. This is a utility for SaveSongs, formatting the data ...
short SaveSpcCommand(Rom &rom, short num, short songtime, short endtr)
Saves a block of edited SpcCommands back into a binary format. This is the serializer,...
ZeldaSfxInstrument * sndinsts
std::vector< Song > songs
void NewSR(Rom &rom, int bank)
Creates a new, empty song range (SongRange) and opens it for editing. (Legacy UI-related function)
SpcCommand * current_spc_command_
void LoadSongs(Rom &rom)
High-level function to load all song data from the ROM. (Currently commented out, but this would be t...
const SpcCommand & GetSpcCommand(short index) const
constexpr int kOverworldMusicBank
constexpr char op_len[32]
constexpr int kDungeonMusicBank
Main namespace for the application.
A state structure for a GUI sample editor.
int selr
Right hand sample selection point.
int sell
Left hand sample selection point.
Represents one of the 8 channels (tracks) in a song.
A metadata structure to keep track of parsed sections of the song data. Used to avoid re-parsing the ...
Represents a block of binary data destined for the APU (SPC700) RAM. This is the intermediate format ...
Represents a complete song, which is a collection of SongParts.
The core data structure representing a single command in a music track. A song track is a doubly-link...
Defines an instrument for a song, mapping to a sample and ADSR settings.
Defines an instrument for a sound effect.
Represents a decoded instrument sample (a waveform).