Run Arduventure kickstarter version on homemades with SSD1309 displays

With the urge to play Arduventure on a 2.4" OLED display with SSD1309 controller and the source not coming out for quite a while. I looked into hacking the hexfile and succeeded :smiley:

  • Make a copy of the hex file
  • Open hex file with a text editor
  • Search and replace 8D14BD with E3E398
  • save and upload the modified hexfile

7 Likes

Wow … a simple find and replace makes it work?

3 Likes

Why not! :smiley: Clever trick!

1 Like

Yes.

For the techy details:

The OLED initalisation code contains a command Charge pump enable (0x8D, 0x14) that isn’t supported by SSD1309 displays and causes the left and right halves of the display to be flipped. This command is replaced by two No OPeration commands (0xE3). Conveniently the command is at the end of a line record in the hex file so it is directly folowed by a checksum byte (0xBD). By replacing the command with two NOPs, the checksum changes to 0x98

2 Likes

It’s the first time I’ve said it openly but your Flynn is bigger than mine.

This is pretty cool it means loaders like ProjectABE could potentially on the fly patch games for other displays before uploading without the need to recompile.

3 Likes

HaHaHa :joy:

Yes, just find the lcdBootProgram and replace 8D 14 with E3 E3.

I’ve just adapted the homemade Arduboy2 library using E3 E3 for SSD1309 displays so a SSD1309 hex file can be patched on the fly to SSD1306 too.

Looks like I’ll be adapting my python uploader soon :slight_smile:

1 Like

That is so neat! Gives me an idea for a new Uploader flag

2 Likes

Sweet. With more uploaders supporting this. An SSD1309 display could almost become a replacement display.

btw. I forget to mention that I wrote a python uploader yesterday that patches on the fly now.

2 Likes

I hadn’t looked into SSD1309’s yet. Is that command the only major difference between it and the 1306?

I didnt do a thorough comparison. but the main difference between the ssd1306 and ssd1309 is that the ssdd1306 has an internal charge pump and the ssd1309 does not.The charge pump command is what causes the problem.