GBC input timing

Discussion of programming and development for the original Game Boy and Game Boy Color.
Post Reply
12341231214
Posts: 3
Joined: Sat May 20, 2023 9:17 pm

GBC input timing

Post by 12341231214 »

I modded a GBC to be able to control it from a computer using an Arduino and now I'm trying to be able to record and playback gameplay. I'm currently using the pad labeled SPS on the board as a measure of time since it seems to run at a steady 60ish Hz but when playing back a recording it seems to get out of sync very easily.

So I was wondering if there would be a better place to get my timing from, possibly some kind of input latch like a NES controller has if that exists somewhere on a GBC?

Thanks.
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: GBC input timing

Post by calima »

GBC does not have autoread like SNES. Games may read input at any time they wish, and as many times a frame they wish. It sounds like this is your issue, and when you supply input too late, the game applies it one frame later.

I don't think there is any "latch" hw signal, but I'm not 100% sure.
12341231214
Posts: 3
Joined: Sat May 20, 2023 9:17 pm

Re: GBC input timing

Post by 12341231214 »

Well that's unfortunate, it still happens even with a hardcoded sequence of inputs so maybe an Arduino just isn't fast enough.
Thanks for the info.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: GBC input timing

Post by lidnariq »

On the original Game boy, there's a signal that the code must toggle in order to scan the joypad.

Unfortunately for you, they got rid of it on the Game Boy Color, and there's just 8 digital inputs instead.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: GBC input timing

Post by tepples »

Earlier Game Boy systems (Game Boy, Super Game Boy, and Game Boy pocket) have a 2x4-key matrix that the program scans using two output lines (P14 and P15). Does Game Boy Color still output P14 on the SD line of the Game Link connector?
12341231214
Posts: 3
Joined: Sat May 20, 2023 9:17 pm

Re: GBC input timing

Post by 12341231214 »

tepples wrote: Sun May 21, 2023 12:29 pm Does Game Boy Color still output P14 on the SD line of the Game Link connector?
Seems like it doesn't, all of the link connector pins are either always high or always low during normal gameplay.
Post Reply