From a6eb615431089600a0db2ef80797535103c9e88a Mon Sep 17 00:00:00 2001 From: Robert Neumann Date: Thu, 29 Sep 2016 19:02:57 +0200 Subject: [PATCH] psxmode: kernel TTY (printf) --- pcsx2/IopMem.cpp | 4 ++++ pcsx2/ps2/pgif.cpp | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pcsx2/IopMem.cpp b/pcsx2/IopMem.cpp index 56b6a601e3..8558cb40d3 100644 --- a/pcsx2/IopMem.cpp +++ b/pcsx2/IopMem.cpp @@ -16,6 +16,7 @@ #include "PrecompiledHeader.h" #include "IopCommon.h" +#include "ps2/pgif.h" // for PSX kernel TTY in iopMemWrite32 uptr *psxMemWLUT = NULL; const uptr *psxMemRLUT = NULL; @@ -488,4 +489,7 @@ void __fastcall iopMemWrite32(u32 mem, u32 value) } } } + + if (mem == 0x000085CC) + kernelTTYFileDescrWrite(mem, value); } diff --git a/pcsx2/ps2/pgif.cpp b/pcsx2/ps2/pgif.cpp index 898f4d22e2..b076e1b16f 100644 --- a/pcsx2/ps2/pgif.cpp +++ b/pcsx2/ps2/pgif.cpp @@ -1015,7 +1015,7 @@ u8 psExp2R8(u32 mem) return 0xFF; } -int flgint = 0; +//int flgint = 0; char strb[200] = {0}; void kernelTTYFileDescrWrite(u32 mem, u32 data) @@ -1041,12 +1041,12 @@ void kernelTTYFileDescrWrite(u32 mem, u32 data) strcat(strb, stra); if ((stra[strlen(stra) - 1] == 0xA) || (stra[strlen(stra) - 1] == 0xD) || (stra[strlen(stra) - 2] == 0xA) || (stra[strlen(stra) - 2] == 0xD)) { Console.WriteLn(">%s<", strb); - if (strcmp(strb, "VSync") == 0) + /* if (strcmp(strb, "VSync") == 0) flgint ^= 1; if (strncmp(strb, "Execute", 5) == 0) { Console.WriteLn(" ###EXecute was just printed####"); doAnyIopLs = 1; - } + }*/ strb[0] = 0; } }