Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLE vs LLE mcServe differences #1333

Open
bigianb opened this issue Dec 5, 2023 · 2 comments
Open

HLE vs LLE mcServe differences #1333

bigianb opened this issue Dec 5, 2023 · 2 comments

Comments

@bigianb
Copy link
Contributor

bigianb commented Dec 5, 2023

The following small home-brew file executes memory card calls and logs the output. There are differences between PCSX2 and Play! which I think will cause issues with games.

https://github.com/bigianb/ps2-functests/tree/main

Summary seems to be that mcChrDir seems to return the working directory after the cd (different than docs).
cd to a non existing directory should return -4 whilst Play! returns 0

PCSX2 output:

Memcard test
Initialising memcard
mcInit returned 0
Init succeded
mcGetInfo returned 0
    mcGetInfo sync returned -1
    Type: 2 Free: 5353 Format: 1
mcGetInfo returned 0
    mcGetInfo sync returned 0
    Type: 2 Free: 5353 Format: 1
mcChdir '/' returned 0
    mcChdir sync returned 0
    mcChdir old dir returned '/'
mcGetDir /* returned 0 and 4 entriesdir FUNCTEST exists, so deleting it
    mcDelete returned 0
    mcDelete sync returned 0
mcMkDir 'FUNCTEST' returned 0
    mcMkDir sync returned 0
mcChdir 'FUNCTEST' returned 0
    mcChdir sync returned 0
    mcChdir dir returned '/FUNCTEST'
mcChdir '/notthere' returned 0
    mcChdir sync returned -4
    mcChdir dir returned '/FUNCTEST'
mcChdir '/nothere' returned 0
    mcChdir sync returned -4
    mcChdir dir returned '/FUNCTEST'
That's all folks

Play! output

Hello
Memcard test
Initialising memcard
mcInit returned 0
Init succeded
mcGetInfo returned 0
    mcGetInfo sync returned -1
    Type: 2 Free: 8192 Format: 1
mcGetInfo returned 0
    mcGetInfo sync returned 0
    Type: 2 Free: 8192 Format: 1
mcChdir '/' returned 0
    mcChdir sync returned 0
    mcChdir old dir returned ''
 **** ERROR: Expected old dir '/' to be returned from mcChdir ****
mcGetDir /* returned 0 and 9 entriesdir FUNCTEST exists, so deleting it
    mcDelete returned 0
    mcDelete sync returned 0
mcMkDir 'FUNCTEST' returned 0
    mcMkDir sync returned 0
mcChdir 'FUNCTEST' returned 0
    mcChdir sync returned 0
    mcChdir dir returned ''
 **** ERROR: Expected dir '/FUNCTEST' to be returned from mcChdir ****
mcChdir '/notthere' returned 0
    mcChdir sync returned 0
    mcChdir dir returned ''
 **** ERROR: Expected -4 to be returned from mcChdir ****
 **** ERROR: Expected dir '/FUNCTEST' to be returned from mcChdir ****
mcChdir '/nothere' returned 0
    mcChdir sync returned 0
    mcChdir dir returned ''
 **** ERROR: Expected -4 to be returned from mcChdir ****
 **** ERROR: Expected dir '/FUNCTEST' to be returned from mcChdir ****
That's all folks
@jpd002
Copy link
Owner

jpd002 commented Dec 5, 2023

Oh, very nice! We'll have to fix the problematic cases in the emu.

Interesting cases we could add: Using ChDir('\..') while being in the root dir. And also ChDir('\..\somedir'). There's a bunch of games that seem to use that (LOTR: The Return of the King for example, EA games, Kim Possible).

@bigianb
Copy link
Contributor Author

bigianb commented Dec 5, 2023

exactly - it's something I've wanted to do for a while - it takes the guesswork out of things and can form an automated test at some stage. I'll keep adding the edge cases but thought what is shown currently is a good start because it specifically does things that RTA does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants