Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PSX Memory Cards: Sourcing SIO Data Values
#21
pandubz:
Nice to hear the existing code can be coerced into working.
We should still look up some documents and figure out the proper chain of events.
As far as I remember, Memory Cards and Pads use the same protocol. Just the commands are different.

The PSX kernel SIO code for Memory Cards is apparently very buggy and only works because it uses lots of delays.
It looks like all PSX games use the kernel functions and I don't think they changed with the move to the PS2.
So that could explain the trouble we appear to have only with PSX Memory Cards. They require extra careful timing.
Reply

Sponsored links

#22
why is that, why would timing be so finicky?? I'm striving to learn about emulation and programing in general so sorry if this seems like a dumb question.
Reply
#23
(09-08-2017, 07:49 AM)kenshen Wrote: why is that, why would timing be so finicky?? I'm striving to learn about emulation and programing in general so sorry if this seems like a dumb question.

I think, think the issue is that the physical PS1 may not handle IO requests from memory cards in real time. That is, in whatever central thread the PS1 had running the show, there was no "checkMemcardWaiting" function that got called every cycle to see if a memory card operation was pending. Rather, it may be every 3-5 cycles, memory cards are probed. So if one memory card operation had a follow up, if not held up until the PS1 let those 3-5 cycles pass, it would get dropped and thus the whole operation fails. I have not the slightest idea if this is accurate or not, but that is what I am led to believe from what I have seen. Heck for all I know it could be that it was on a separate thread and so that thread has to be ready before another SIO call can happen. I'm making wild inferences here so take my word with a grain of salt and trust Rama before me.

Side note, I have PSX cards reading and controller input working with non preprocessor based code controlling whether the PS2 (lack of) delay or PSX delay fires. The last remaining item is a reliable way to tell if the emulator is in PSX or PS2 mode. So far I have tried using "mcd->IsPSX()" and "psxCpu", both of which end up evaluating to true not in all cases, but definitely a fair amount of the SIO calls made by PS2 games. Aaaaaaaand it's done, PS2 games no longer set off the PSX delays.

Updated my repo (https://github.com/RedPanda4552/pcsx2). Although I think it will need changes in terms of cleanliness, I am thinking it is time to submit this as a PR. Another side note, I have learned not to merge changes from the source repo. That made things get ugly real fast.
Problems? Check out the development builds for the latest updates.

Mobo: ASUS Prime Z370-A
CPU: Intel i7-8700K (3.7 GHz)
RAM: G.Skill TridentZ, 2x8 GB DDR4 (3000 MHz)
GPU: EVGA GeForce GTX 1070 Ti FTW2 (8 GB)
OS: Windows 10 Pro (64 bit)

Oh yeah Red Pandas are cool too.


Reply




Users browsing this thread: 1 Guest(s)