From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:PSID and RSID (SID music)" |
|---|
| claim | "libsidplayfp decodes the version >= 2 flags word as: bit 0 MUS (clock any; the load then fails with 'not supported yet' after the rest of the header was parsed), bit 1 PSID-specific (PSID files) or BASIC (RSID files), bits 2-3 clock (0 unknown, 1 PAL, 2 NTSC, 3 any; ignored when the MUS bit is set), bits 4-5 first SID model (1 6581, 2 8580, 3 any). In versions 3 and 4, bits 6-7 give the model of a second SID and bits 8-9 of a third, but only when the corresponding header byte at 122 (123 in v4, and different from byte 122) is even and outside $00-$41 and $80-$DF; otherwise that SID is not used. In version 5 bits 6-9 become panning layout and mode, bit 10 an embedded song length table (4 bytes per song at the end of the file), bit 11 FM OPL, and all SIDs use the first SID's model." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PSID and RSID (SID music)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "flags word at offset 118 when version >= 2" |
|---|
| effect | "sets clock, SID models, compatibility mode" |
|---|
| function | "PSID::tryLoad, getSidModel" |
|---|
| condition | "version >= 2; v5 meanings differ. Read PSID::tryLoad, getSidModel, validateAddress and the flag enums at c855551959; accepted versions are PSID 1-5 and RSID 2-5. generateSidAddresses (v5 address list) was not read." |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "flag enums PSID_MUS..PSID_FMOPL; clock switch on flags & PSID_CLOCK; getSidModel(flags >> 4/6/8); version 5 branch; musPlayer throw. Other tools (HVSC spec) not read" |
|---|
| repo | "https://github.com/libsidplayfp/libsidplayfp" |
|---|
| commit | "c855551959b74651a800bdc16df1665de21f4e21" |
|---|
| path | "src/sidtune/PSID.cpp" |
|---|
| lines | "82-109, 131-143, 574-683, 713-714" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Flags clock and SID model" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T13:07:46.596Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T17:46:46.496Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read PSID.cpp tryLoad 574-683, getSidModel and validateAddress at c855551: MUS, PSID-specific/BASIC, clock, model bits, v3/v4 second/third SID gating (third must differ from second), v5 branch with panning, FM OPL, song-length table; MUS throw at the end. generateSidAddresses not read." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T16:38:46.698Z" |
|---|
| summary | "Second and third SID model bits only count when the sidChipBase address passes validateAddress; version 5 uses its own address generation and first-SID model for all; PSID-specific bit applies only…" |
|---|
| changed | | "claim" |
| "data" |
| "confidence" |
|
|---|
|
|
|---|