Skip to content

Commit

Permalink
Added a warning for "Souseiki Fammy - ROM-QD for 256K+64K (Japan) (Un…
Browse files Browse the repository at this point in the history
…l)".
  • Loading branch information
punesemu committed Jan 3, 2024
1 parent 9e53074 commit 2ce45cf
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/fds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,13 @@ void fds_control_autoinsert(_fds_sinfo *sinfo) {
fds.auto_insert.r4032.disabled = FALSE;
fds.auto_insert.end_of_head.disabled = TRUE;

// Souseiki Fammy - ROM-QD for 256K+64K (Japan) (Unl)
if (!strncmp((char *)&sinfo->block1.name[0], "ILE", 3) &&
((sinfo->crc32prg == 0x01218B9D) || (sinfo->crc32prg == 0xF1BCA55D))) {
fds.auto_insert.disabled = TRUE;
gui_unsupported_hardware();
return;
}
if (fds.info.total_sides == 1) {
// auto insert disabilitato
fds.auto_insert.disabled = TRUE;
Expand Down
6 changes: 6 additions & 0 deletions src/gui/mainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,12 @@ void mainWindow::open_dkeyb(BYTE mode) {
dlgkeyb->switch_mode(mode);
dlgkeyb->show();
}
void mainWindow::unsupported_hardware(void) {
QMessageBox::warning(this,
tr("Warning"),
tr("This rom requires unsupported hardware to function correctly."),
QMessageBox::Ok);
}

void mainWindow::connect_menu_signals(void) {
// File
Expand Down
1 change: 1 addition & 0 deletions src/gui/mainWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ class mainWindow : public QMainWindow, public Ui::mainWindow {
void shout_into_mic(BYTE mode);
void hold_fast_forward(BYTE mode);
void open_dkeyb(BYTE mode);
void unsupported_hardware(void);

private:
void connect_menu_signals(void);
Expand Down
4 changes: 4 additions & 0 deletions src/gui/qt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,10 @@ void gui_detach_barcode_change_rom(void) {
qt.dbarcode->change_rom();
}

void gui_unsupported_hardware(void) {
qt.mwin->unsupported_hardware();
}

#if defined (WITH_OPENGL)
void gui_wdgopengl_make_current(void) {
if (gui.start) {
Expand Down
2 changes: 2 additions & 0 deletions src/gui/qt.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ EXTERNC void gui_vs_system_insert_coin(void);

EXTERNC void gui_detach_barcode_change_rom(void);

EXTERNC void gui_unsupported_hardware(void);

EXTERNC void gui_nes_keyboard(void);
EXTERNC void gui_nes_keyboard_paste_event(void);
EXTERNC void gui_nes_keyboard_frame_finished(void);
Expand Down

0 comments on commit 2ce45cf

Please sign in to comment.