Giter VIP home page Giter VIP logo

Comments (7)

uyjulian avatar uyjulian commented on September 25, 2024

Last time I checked, printf messages with fileXio are working with DTL-T machines.

Once I reverse the STDIO and IOMAN module, I'll probably have a better understanding of how this all integrates and how to resolve this.

from ps2sdk.

fjtrujy avatar fjtrujy commented on September 25, 2024

Last time I checked, printf messages with fileXio are working with DTL-T machines.

Once I reverse the STDIO and IOMAN module, I'll probably have a better understanding of how this all integrates and how to resolve this.

Was it before or after the newlib integration, #161 ?

from ps2sdk.

uyjulian avatar uyjulian commented on September 25, 2024

Last time I checked, printf messages with fileXio are working with DTL-T machines.
Once I reverse the STDIO and IOMAN module, I'll probably have a better understanding of how this all integrates and how to resolve this.

Was it before or after the newlib integration, #161 ?

After

from ps2sdk.

rickgaiser avatar rickgaiser commented on September 25, 2024

These printf messages that magically appear in PCSX2, do you know how they get there?

I'm assuming they are IOP SIO writes, not EE SIO? And I'm assuming ioman somehow uses fd=0 and fd=1 to write to the IOP serial port. Can you confirm the PCSX2 output you see is the IOP serial port output? And if not, do you know what it is?

Searching in the ps2sdk sources I can find no driver for using the iop serial port.
We could probably make an iop serial port driver (using ps1 code as example), then do the same thing we do with udptty:

close(0);
close(1);
DelDrv(tty_device.name);
if (AddDrv(&tty_device) < 0)
return MODULE_NO_RESIDENT_END;
open(DEVNAME "00:", 0x1000 | O_RDWR);
open(DEVNAME "00:", O_WRONLY);

from ps2sdk.

fjtrujy avatar fjtrujy commented on September 25, 2024

These printf messages that magically appear in PCSX2, do you know how they get there?

I'm assuming they are IOP SIO writes, not EE SIO? And I'm assuming ioman somehow uses fd=0 and fd=1 to write to the IOP serial port. Can you confirm the PCSX2 output you see is the IOP serial port output? And if not, do you know what it is?

Searching in the ps2sdk sources I can find no driver for using the iop serial port. We could probably make an iop serial port driver (using ps1 code as example), then do the same thing we do with udptty:

close(0);
close(1);
DelDrv(tty_device.name);
if (AddDrv(&tty_device) < 0)
return MODULE_NO_RESIDENT_END;
open(DEVNAME "00:", 0x1000 | O_RDWR);
open(DEVNAME "00:", O_WRONLY);

Watching into the PCSX2 code I saw it print messages coming from SIO_TXFIFO

https://github.com/PCSX2/pcsx2/blob/master/pcsx2/HwWrite.cpp#L314

I think that somehow fio redirect to SIO Write

from ps2sdk.

uyjulian avatar uyjulian commented on September 25, 2024

PCSX2 hooks IOMAN write and SYSMEM Kprintf.

write: https://github.com/PCSX2/pcsx2/blob/e3eae7fbe83aad3952e3ed6a8e56fc016b51a9c3/pcsx2/IopBios.cpp#L725
Kprintf: https://github.com/PCSX2/pcsx2/blob/e3eae7fbe83aad3952e3ed6a8e56fc016b51a9c3/pcsx2/IopBios.cpp#L752

In order to resolve this, probably need to determine if IOMAN is hooked already, and if so, use its functionality instead

from ps2sdk.

fjtrujy avatar fjtrujy commented on September 25, 2024

In the end, it wasn't an issue in the ps2sdk it was PCSX2 that wasn't hooking properly fileXio.
This PR PCSX2/pcsx2#7007 has fixed the issue.

Cheers

from ps2sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.