Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2021-01-26 12:48:04

kalt
New member
Registered: 2021-01-26
Posts: 7

GBC Timing Diagram for Cartridge Slot

I'm looking at bitbanging the GBC cartridge slot with a 40MHZ PIC18. Is there a timing diagram that shows over what interval the LR35902 samples the line during a read and during what interval the data is considered valid on the data bus during a write? I assume there is a separate timing for when the CPU is in 8MHz vs 4MHz mode. Even if there is not a full diagram, any insight on bus timings would be helpful.

Last edited by kalt (2021-01-26 22:56:13)

Offline

 

#2 2021-01-28 20:34:16

Tauwasser
Member
Registered: 2010-10-23
Posts: 160

Re: GBC Timing Diagram for Cartridge Slot

Check out gekkio's Gameboy Complete Technical Reference, which includes timing diagrams in one of the appendices.

Offline

 

#3 2021-01-29 10:32:59

kalt
New member
Registered: 2021-01-26
Posts: 7

Re: GBC Timing Diagram for Cartridge Slot

Hmm, Im looking through the document and im not seeing what i am looking for. I see a timing diagram of some sort that shows the cpu fetch cycle. but it gives no information about the where the sampling occurs. i.e. is it on a rising edge? is it on a falling edge? which edge? how long after the transition is the data still asserted on the bus, etc.

Offline

 

#4 2021-01-29 19:14:06

Tauwasser
Member
Registered: 2010-10-23
Posts: 160

Re: GBC Timing Diagram for Cartridge Slot

Are you sure you looked at the figures in appendix C? The yellow line is the edge data is sampled on, I believe. IIRC I read in Discord that this differs between regular and double speed mode and these timings would show regular mode.

Offline

 

#5 2021-01-29 21:48:27

kalt
New member
Registered: 2021-01-26
Posts: 7

Re: GBC Timing Diagram for Cartridge Slot

ah okay, i didnt know that was what the yellow line symbolized. thanks. When I finally get my breakout board shipped I will check the lines on the oscilloscope to verify.

Last edited by kalt (2021-01-29 21:48:56)

Offline

 

#6 2021-01-30 16:42:19

gekkio
Member
Registered: 2016-05-29
Posts: 16

Re: GBC Timing Diagram for Cartridge Slot

IIRC in addition to faster clock, the only difference between double-speed and normal mode is that the address pins are asserted at the same time with A15/CS. I can't remember 100% surely which edge it was, but I'm guessing A15/CS is asserted one edge earlier.
Take this with a grain of salt, because I've only checked CGB timings once...

Offline

 

#7 2021-02-01 08:33:03

kalt
New member
Registered: 2021-01-26
Posts: 7

Re: GBC Timing Diagram for Cartridge Slot

thanks, my pin breakout board should be coming in a week or so. It looks like I should be able to bit bang it at 40MHZ provided I choose a ram chip with parallel access that can operate as fast as the controller. I will verify the timings once it comes. In the meantime, I think i have enough to move forward with the board design for the cart.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson