Skip to content

Commit

Permalink
[FDS] Small finishing touches.
Browse files Browse the repository at this point in the history
  • Loading branch information
punesemu committed Dec 11, 2023
1 parent fe10203 commit 1ab8c13
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/core/fds.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,13 @@ void fds_to_image(void) {
void fds_control_autoinsert(_fds_sinfo *sinfo) {
// NB : il crc32prg da controllare deve essere sempre quello
// del disco dove non vengono scritti i dati di salvataggio

// Gall Force - Eternal Story (Japan).fds - disk 0 side A
if (!strncmp((char *)&sinfo->block1.name[0], "GAL", 3) && (sinfo->crc32prg == 0xC5D1EC5D)) {
// Gall Force - Eternal Story (Japan) - disk 0 side A
fds.auto_insert.disabled = TRUE;
gui_overlay_info_append_msg_precompiled(39, NULL);
} else if (!strncmp((char *)&sinfo->block1.name[0], "KOM", 3) &&
((sinfo->crc32prg == 0x2B24787F) || (sinfo->crc32prg == 0x14F219C5))) {
// Koneko Monogatari - The Adventures of Chatran (Japan) - disk 0 side A oppure disk 0 side B
fds.auto_insert.disabled = TRUE;
gui_overlay_info_append_msg_precompiled(39, NULL);
}
Expand Down
6 changes: 4 additions & 2 deletions src/core/mappers/mapper_FDS.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ BYTE extcl_cpu_rd_mem_FDS(BYTE nidx, WORD address, UNUSED(BYTE openbus)) {
fds.auto_insert.disabled = TRUE;
gui_overlay_info_append_msg_precompiled(29, &count);
} else if (count == 1) {
if (side != fds.drive.side_inserted) {
if ((side != fds.drive.side_inserted) || fds.drive.disk_ejected) {
fds.auto_insert.rE445.in_run = TRUE;
fds.auto_insert.new_side = side;
fds.auto_insert.delay.side = FDS_AUTOINSERT_OP_SIDE_DELAY;
Expand Down Expand Up @@ -247,6 +247,8 @@ void extcl_cpu_every_cycle_FDS(BYTE nidx) {
fds.drive.at_least_one_scan = FALSE;
fds.drive.disk_position = 0;
fds.drive.gap_ended = FALSE;
// "Akuu Senki Raijin (Japan) (Disk Writer)" ne ha bisogno
// per non sporcare lo screen.
if (fds.drive.delay < FDS_8BIT_DELAY) {
fds.drive.delay = FDS_8BIT_DELAY;
}
Expand Down Expand Up @@ -356,7 +358,7 @@ void extcl_cpu_every_cycle_FDS(BYTE nidx) {
fds.drive.end_of_head = END_OF_HEAD;
fds.drive.disk_position = 0;
fds.drive.gap_ended = FALSE;
fds.drive.delay = FDS_8BIT_DELAY;
fds.drive.delay = 65536 * 8;
// FDS interessati :
// - 19 Neunzehn (1988)(Soft Pro)(J).fds
// visto che il controllo del r4032 e' mooooolto lento, l'eject forzato alla fine del disco
Expand Down

0 comments on commit 1ab8c13

Please sign in to comment.