[WIP] Gameboy Printer

Hopefully someone here can help me out a little. I have been trying to get a gameboy printer to work with pokitto but I have had only limited results.
From what I can tell, I am doing everything right, but I’m getting into a situation where the printer malfunctions and refuses to print any more than a 16x16 block (the printer is being sent a full ‘line’ of 64x16 data).

If anyone has done this with arduino perhaps, maybe they can have a look at my code to see where my mistake is?

Thanks.

I dont have a gb printer. Where in the code does it stall?

The printer will initiate ok, it accepts 240 bytes of image data and replied that the buffer is full. I send the print command, the printer accepts it, starts printing. However it only prints the first 32 bytes then returns multiple error and stops.

Two words: logic analyzer

no I’m kidding. thats pretty heavy weaponry for this

can you send the data in smaller chunks?

I have it hooked up to an analyser, the data is sending ok. Sending in smaller chunks won’t help much as the print command won’t work until the buffer is full.

I think I’ll have to set up an Arduino version and test some of the existing projects to see if I’m missing anything. - I don’t have a real Gameboy to test with.

Is it possible you are missing some sort of a buffer termination character?

According to the internet you need to send an empty data packet, which I am doing. Apparently it won’t even attempt to print if something is wrong.

Hopefully this is of some help:

Also, are use using 5V / 3.3V level shifters?

No need for shifters, both are communicating with each other fine. I just seem to be missing something in the conversation.

Well after getting the same issues with arduino, it looked at my power supply. Turns out I was getting a genuine low battery warning, I thought my 9v power supply would be fine, turns out it wasn’t.

The code seems ok. :stuck_out_tongue:

[edit] For anyone wondering why I didn’t suspect the power supply at first, there is an easter-egg on the gameboy printer that when you hold the feed button when powering on, it prints ‘Hello’, this was working fine so I assumed the printer had enough power to work properly.

1 Like

Cool!

Lets 'av a video mate!!!

1 Like

Might be a little while, need to make the code do something other than dummy data.

1 Like

Is there still an issue with getPixel? I’m reading pixels and attempting to convert them to gameboy format, but each 8x1 line seems to be half back to front.
So I have to convert the pixels from
1,2,3,4,5,6,7,8
to
4,3,2,1,8,7,6,5