Decoding the Gameboy LCD output.

stevestrong
Posts: 1831
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Decoding the Gameboy LCD output.

Post by stevestrong » Thu Nov 16, 2017 1:20 pm

Usb should work when overclocking to 96Mhz.

ZeroWalker
Posts: 57
Joined: Wed Nov 01, 2017 6:17 pm

Re: Decoding the Gameboy LCD output.

Post by ZeroWalker » Thu Nov 16, 2017 1:33 pm

It should?

Thought it was limited to 48mhz, and the divider was either 1 or 1.5.

stevestrong
Posts: 1831
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Decoding the Gameboy LCD output.

Post by stevestrong » Thu Nov 16, 2017 1:42 pm

Sorry, i was wrong, of course you're right. I was thinking on F4....

ZeroWalker
Posts: 57
Joined: Wed Nov 01, 2017 6:17 pm

Re: Decoding the Gameboy LCD output.

Post by ZeroWalker » Thu Nov 16, 2017 4:56 pm

Ah, damn xd

ZeroWalker
Posts: 57
Joined: Wed Nov 01, 2017 6:17 pm

Re: Decoding the Gameboy LCD output.

Post by ZeroWalker » Thu Nov 16, 2017 5:05 pm

What about ESP32?

User avatar
RogerClark
Posts: 7489
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Decoding the Gameboy LCD output.

Post by RogerClark » Thu Nov 16, 2017 8:11 pm

I didnt think ESP32 has hardware USB.

GD32F103 can run at 96Mhz with USB or overclock to 120MHz and still runs USB.
However I found compatibility issues with the STM32 so we no longer actively suppport them.

If RPi etc dont have a bare metal version that has USB, I think perhaps BeagleBone does.

However the F4 seems a more cost effective option.

and like steve says, I am surprised that its not possible to do this on the F103, as we can get 11fps @ 320 x 240 from the OV7670 and out to a LCD display on a F103.

BTW. The ILI9341 LCD works as a good frame buffer, as we can read the frame buffer back out if that display and upload to PC via serial, albeit take around 1 sec to upload

ZeroWalker
Posts: 57
Joined: Wed Nov 01, 2017 6:17 pm

Re: Decoding the Gameboy LCD output.

Post by ZeroWalker » Thu Nov 16, 2017 9:07 pm

But it does have bluetooth and wireless i think, which might be good enough, but perhaps it's difficult to setup.

And well the STM32 can get the data kinda fine, but it's the transfer part in real time that's problematic cause of the slow USB Serial.
I got 16ms to send 5760 bytes basically, which is far from fast, but as a PC doesn't have any real options to transfer except via USB, that breaks it;p

User avatar
RogerClark
Posts: 7489
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Decoding the Gameboy LCD output.

Post by RogerClark » Thu Nov 16, 2017 9:20 pm

Re: ESP32

You'd have to use WiFi. BLE is far too slow, its not designed for streaming data, and BLE support on Windows is very weak, and only available in a basic form since Windows 8 (or possibly 8.1)

Actually ESP32 also supports "Classic Bluetooth" but thats an even more complicated can of worms, and I think getting the PC end of things to work would be a nightmare (I wouldnt even know where to start)

You can potentially just read a whole frame from the Gameboy into RAM on the ESP32 and then render a web page of that data.

dave j
Posts: 9
Joined: Thu Nov 02, 2017 8:49 pm

Re: Decoding the Gameboy LCD output.

Post by dave j » Thu Nov 16, 2017 10:16 pm

ZeroWalker wrote:
Thu Nov 16, 2017 9:07 pm
And well the STM32 can get the data kinda fine, but it's the transfer part in real time that's problematic cause of the slow USB Serial.
It's worth keeping in mind that the arduino libraries add layers on top of the hardware. In the case of USB, STM32F1s have a 512 byte buffer that they have to use when sending/receiving data. The arduino libraries have to copy the buffer you pass them to this 512 byte buffer in order to transfer it - which obviously takes time. You may need to write to that buffer directly in order to get it to run fast enough - which implies avoiding the arduino libraries for USB. Look at the STM32F1 reference manual for details.

Post Reply