From a682e20bbdcee89094513e6168d54d5573fb7a87 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Tue, 4 Feb 2025 17:20:15 +0100 Subject: [PATCH] modem: modem must hang up as soon as reg20 is written some games don't do a full reset and the modem would stay connected. Remove debug file dumps. --- core/hw/modem/modem.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/core/hw/modem/modem.cpp b/core/hw/modem/modem.cpp index b52e7310a..6be776fdd 100644 --- a/core/hw/modem/modem.cpp +++ b/core/hw/modem/modem.cpp @@ -127,8 +127,6 @@ static bool data_sent; static u64 last_comm_stats; static int sent_bytes; static int recvd_bytes; -static FILE *recv_fp; -static FILE *sent_fp; #endif static int modem_sched_func(int tag, int cycles, int jitter, void *arg) @@ -436,12 +434,12 @@ static void modem_reset(u32 v) memset(&modem_regs, 0, sizeof(modem_regs)); state = MS_RESET; LOG("Modem reset start ..."); + net::modbba::stop(); } else { if (state == MS_RESET) { - net::modbba::stop();; memset(&modem_regs, 0, sizeof(modem_regs)); state = MS_RESETING; ControllerTestStart(); @@ -470,13 +468,6 @@ static u8 download_crc; static void ModemNormalWrite(u32 reg, u32 data) { -#ifndef NDEBUG - if (recv_fp == NULL) - { - recv_fp = fopen("ppp_recv.dump", "w"); - sent_fp = fopen("ppp_sent.dump", "w"); - } -#endif //if (!module_download && reg != 0x10) // LOG("ModemNormalWrite : %03X=%X", reg,data); u32 old = modem_regs.ptr[reg]; @@ -525,8 +516,6 @@ static void ModemNormalWrite(u32 reg, u32 data) data_sent = true; #ifndef NDEBUG sent_bytes++; - if (sent_fp) - fputc(data, sent_fp); #endif net::modbba::writeModem(data); modem_regs.reg1e.TDBE = 0; @@ -686,10 +675,6 @@ u32 ModemReadMem_A0_006(u32 addr, u32 size) modem_regs.reg1e.RDBF = 0; SET_STATUS_BIT(0x0c, modem_regs.reg0c.RXFNE, 0); SET_STATUS_BIT(0x01, modem_regs.reg01.RXHF, 0); -#ifndef NDEBUG - if (connect_state == CONNECTED && recv_fp) - fputc(data, recv_fp); -#endif update_interrupt(); } else if (reg == 0x16 || reg == 0x17)