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

Sennen Kazoku not working because of RTC #136

Closed
RobertPeip opened this issue Nov 13, 2020 · 4 comments
Closed

Sennen Kazoku not working because of RTC #136

RobertPeip opened this issue Nov 13, 2020 · 4 comments

Comments

@RobertPeip
Copy link

Directly at startup there is this message.

According to a non-native japanese speaker the text says:
"The clock equipment is broken. The other lines is to contact nintendo for this problem."

grafik

Tested with Release 1.2

@jsmolka
Copy link
Contributor

jsmolka commented Nov 19, 2020

It seems that Sennen Kazoku doesn't follow the workflow described in GBATEK:

  1. Init CS=LOW and /SCK=HIGH, and wait at least 1us
  2. Switch CS=HIGH, and wait at least 1us
  3. Send the Command byte (see bit-transfer below)
  4. Send/receive Parameter byte(s) associated with the command (see below)
  5. Switch CS to LOW

Instead it "sets" CS low and then immediately proceeds with step 2 (while SCK is still low). I removed the /SCK=High requirement in my emulator and it works with Sennen Kazoku and the Pokemon games. There is also a nice demo you can use for RTC testing (it uses the siirtc code from the Pokemon Emerald disassembly project).

@RobertPeip
Copy link
Author

I could verify that with this change it works in my emulator. Big thanks for finding and commenting here.
Hopefully it will also work in Nanoboy.

@fleroviux
Copy link
Member

@jsmolka I guess that makes sense. The serial clock probably shouldn't matter if the chip isn't selected in the first place. Thanks for this!

@fleroviux
Copy link
Member

Ugh. Turns out all the game ever really wanted (in my case) was enabling 24h-mode by default.

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

No branches or pull requests

3 participants