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.
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
Check out gekkio's Gameboy Complete Technical Reference, which includes timing diagrams in one of the appendices.
Offline
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
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
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
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
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