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.

#1 2017-07-08 17:57:15

T.T.
New member
Registered: 2017-07-08
Posts: 3

GameBoy to Oscilloscope adapter. (and weird sprite issues)

For the past two weeks I've been working on a circuit that takes signals from the Gameboy Lcd (HSync, Vsync, and the two digital pins that determine the shade of grey).

I got the idea and the information on this from the NintendOscope on http://www.flashingleds.net

Now rather than use a microcontroller like the NintendOscope did, I chose to go the more old fashioned route and use an analog circuit to create the necessary signals.

Right now my circuit is arranged like this:

Two 555 timers each create a ramp signal every time they receive their respective sync pulses. These two ramp signals then go into op amps to buffer the signal and invert them if necessary, then they are fed into the oscilloscope to create the raster scan.

For the brightness control I'm taking the two digital pins (D0 and D1), inverting them with a hex inverter (much like you would do when you do a bivert mod), feeding them into a simple 2-bit R2R ladder DAC, then this is buffered, inverted and fed into the oscilloscope brightness control.

Heres what it looks like right now.

https://www.youtube.com/watch?v=Dnz1XsB9Ljs

Every thing is fine except for some of the sprites are split and are not drawn in those split areas. I know that the Gameboy is working properly since these issues aren't present on the original screen.

So my question is, does anybody have any clues on what this may be? Any ideas would be greatly appreciated, I have a nifty project that I want to do, but won't be possible without this working.

(almost forgot to mention, the gameboy I'm using is just a regular DMG)

Offline

 

#2 2017-07-09 04:46:23

nitro2k01
Administrator
Registered: 2008-02-22
Posts: 249

Re: GameBoy to Oscilloscope adapter. (and weird sprite issues)

The Gameboy has inconsistent LCD timings. When it's drawing sprites, it takes a longer time because it has to fetch additional tile data for the sprites. This would not be acceptable on a console connected to a TV, since the TV's CRT beam will keep sweeping regardless. But the LCD signal in this case is asynchronous and is relying on a clock for timings. In other words, you can't really use a simple timed ramp, but you need to have some way of progressing the ramp one step when receiving a clock pulse.


Blog: Gameboy Genius
"A journey of a thousand miles begins with one small step"
Old Chinese Proverb

Offline

 

#3 2017-07-09 21:06:05

T.T.
New member
Registered: 2017-07-08
Posts: 3

Re: GameBoy to Oscilloscope adapter. (and weird sprite issues)

That makes sense.

I guess that means I have to redesign my circuit, but I have an idea that might work.

I'm thinking if I take the pixel clock and feed that into a binary counter with an 8-bit output register, that would take care of counting each pulse and giving me a corresponding 8-bit value. That could then be put into an 8-bit DAC to give me a ramp signal. For resetting the counter to zero and beginning a new line, I should just be able to use the H-sync pulses.

Thanks for answering my question nitro2k01, I will be sure provide updates on this new circuit.

Offline

 

#4 2017-09-06 00:58:55

T.T.
New member
Registered: 2017-07-08
Posts: 3

Re: GameBoy to Oscilloscope adapter. (and weird sprite issues)

I finally had enough time to work on the gameboy to oscilloscope adapter.
It is much better now. In fact, it would be playable if I had a controller attached to the gameboy.

https://www.youtube.com/watch?v=wBbuNE9 … e=youtu.be

This time the circuit is using binary counters to advance the beam forward for every pulse from the gameboy's pixel clock. Although, this means my circuit is 1/4 pixel behind, which is evident by the vertical bars on the sprites. I should be able to make those bars thinner by changing my 16MHz crystal to a 50MHz crystal.

All in all, I'm getting close, after I get the bars thinner, I need to add a good contrast control, and I need to figure out how to interface an unmodified nes controller with the gameboy (the old fashioned way, so no MCU smile )

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson