Giter Site home page Giter Site logo

There is a bug in __card_getfilenum about gcmm HOT 7 CLOSED

suloku avatar suloku commented on August 11, 2024
There is a bug in __card_getfilenum

from gcmm.

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
Thank you very much for noticing, I didn't have twilight princess for gamecube, 
so I guess I never got the chance of this happening to me.

I'll fix this in a couple hours.

ps: sorry for the late response, I saw this last week, but I didn't have time 
to correct the bug since today.

Btw, what is the incorrect behavior? I'm gonna test it, I'm curious to see what 
happens.

Original comment by [email protected] on 3 Sep 2013 at 8:46

  • Changed state: Started

from gcmm.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
[deleted comment]

from gcmm.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
I've been checking the code and even in the case when trying to open gczelda 
file from the memory card and the code stomps with gczelda2, then it checks the 
gamecode, and as it is different, it should proceed to the next file in the 
entri list...

So, what is exactly the incorrect behavior and how to reproduce it?

ps: still, I agree it is better to just use stricmp

Original comment by [email protected] on 3 Sep 2013 at 9:09

from gcmm.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
A more thourough testing has revealed that the problem wasn't with the strnicmp 
function, but with gamecode detection, as I stated earlier it should prevent 
the behavior you experienced.

Your fix does indeed fix the bug, but the bug remains if you have 2 savegames 
of the same game but from different regions, so the problem is with gamecode 
detection.

I hope I can fix it soon.

Original comment by [email protected] on 3 Sep 2013 at 10:14

from gcmm.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
Ok, I think I nailed it. I (and others before me) incorrectly assumed that 
CARD_init()can be used to set the company and the gamecode and that it can be 
called as many times as wanted to change it. But that is wrong, this function 
only works the first time, which makes sense, as a game will only use a single 
company and gamecode for its savefiles.

I just need to change all the card_init calls for Card_setcompany and 
card_setgamecode and card_getfilenum will work correctly, no need to change it 
(as it is part of libogc I'd prefer to leave it as unchanged as possible).

The program has been working because the first call to card_init is made with 
null params, so this allows to list all entries in the card. In fact I myself 
fixed savegame restoring (which sometimes worked and sometimes didn't) by using 
card_setcompany and card_setgamecode, and then I took on GCMM. Silly me I 
didn't notice then.

Original comment by [email protected] on 3 Sep 2013 at 11:34

from gcmm.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
Done. I lost an mc in the process, I think it is because its old, as the 
problems appear with older versions of gcmm and only in this mc (not a nintendo 
MC).

_card_sectorerase failed whenever I tried to restore an image to that MC, I 
couldn't find out why.

But the filename/region bug is fixed. Thanks again for noticing.

Original comment by [email protected] on 3 Sep 2013 at 3:26

  • Changed state: Fixed

from gcmm.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
That make sense, I wasn't using CARD_init to set the gamecode or company

Original comment by [email protected] on 6 Sep 2013 at 5:36

from gcmm.

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.