Saturn: transition to the next track when indexes overflow (Flash Sega Saturn Vol. 14: Monster Slider demo) (#1044)

This commit is contained in:
Sergiy Dvodnenko
2025-10-02 07:36:19 +03:00
committed by GitHub
parent 1addb89ffe
commit 75f567e96d

View File

@@ -532,6 +532,11 @@ void satcdd_t::CommandExec() {
int cmd_idx = comm[4];
int cmd_tno = comm[8];
if (cmd_idx > this->toc.tracks[cmd_tno - 1].index_num && cmd_tno - 1 < this->toc.last) {
cmd_idx -= this->toc.tracks[cmd_tno - 1].index_num;
cmd_tno += 1;
cmd_fad = this->toc.tracks[cmd_tno - 1].start + 150;
}
int fad = cmd_fad + this->GetSectorOffsetByIndex(cmd_tno, cmd_idx);
switch (comm[0]) {