Giter Club home page Giter Club logo

Comments (16)

b-desconocido avatar b-desconocido commented on May 27, 2024 2

I made a tool to modify images on TFT: https://github.com/b-desconocido/Anycubic-Mega-TFT-Resource-Converter
Gonna try to implement open-source firmware for MCU soon

from marlin-ai3m.

davidramiro avatar davidramiro commented on May 27, 2024

That's just how the menu works - there are two settings, fan speed and print speed. Both get set as you click on OK. Since the fan speed setting defaults to zero, that's why you see this behaviour.

Hence you would have to input the current fan speed too whenever you want to change the print speed so it does not get set to 0.

from marlin-ai3m.

b-desconocido avatar b-desconocido commented on May 27, 2024

So the screen didn't fetch current value of fan speed? I didn't noticed that

from marlin-ai3m.

davidramiro avatar davidramiro commented on May 27, 2024

It does fetch it and shows it under "Current". But the first time you enter the Speed menu, the "Fan Speed" setting is always on 0. After you set it manually, it will remember it.

That's just one of the quirks of the screen, nothing I can do about it sadly since its firmware is closed source.

from marlin-ai3m.

b-desconocido avatar b-desconocido commented on May 27, 2024

I get it, thank you! Do you know what MCU is used for the screen?

from marlin-ai3m.

davidramiro avatar davidramiro commented on May 27, 2024

Yes, it's a Nuvoton NUC120LC1BN. (Cortex M0)

Are you interested in reverse engineering it? I already tried doing so on the binaries that you can find on its USB interface to no avail, but that just isn't really my area of expertise 🙂

from marlin-ai3m.

b-desconocido avatar b-desconocido commented on May 27, 2024

Yes, although i haven't much experience in embedded world. There was only a single attempt in obtaining firmware from LiPo charger based on 8051 MCU, but it had read out protection and i was't able to get original firmware. Debugging was working fine, but i couldn't get the data whatever i tried - software 'tricks' or physically glitching the Vcc voltage while it loading the option bytes (i even desoldered the caps).

Gonna read the datasheet, could you please share a files you extracted from USB? Are those are 'resources' or there is an actual firmware?

from marlin-ai3m.

davidramiro avatar davidramiro commented on May 27, 2024

Here you go: screen binaries.zip

I doubt those are firmware binaries but I am curious to know what you can find out. I didn't get anything usable using Ghidra.

from marlin-ai3m.

b-desconocido avatar b-desconocido commented on May 27, 2024

Yea, these are resources - font, images and some junk, probably menu descriptors. Need to get or take a closeup photos of screen module, there could be an ISP interface to program/debug MCU. So far I have no access to my machine.

from marlin-ai3m.

b-desconocido avatar b-desconocido commented on May 27, 2024

Found a 'closeup' picture on Youtube: https://youtu.be/pqHJgDQ-qHs?t=69
There is definitely an ISP port (J4), i hope it is SWD-compatible. Other components looks pretty obvious - LDO regulator, backlight driver, MCU and 8-pin flash (?) chip. Although, I have a single picture of mine, and the MCU labeled as 'PenTableT blah blah numbers', but the board layout looks same, so it might be relabeled.

from marlin-ai3m.

b-desconocido avatar b-desconocido commented on May 27, 2024

Hurray, according to datasheet:

– Support 2 wire ICP update through SWD/ICE interface
– Support fast parallel programming mode by external programmer

Application flash (APROM): 32KB
RAM: 4KB
Data flash (kind of EEPROM): 4KB
ISP ROM (for bootloader): 4KB

4KB of ram isn't much, but enough to render complex dynamic graphics using tiled rendering. Also i need to get the part number of LCD panel and touch IC, hope Anycubic could answer these questions, cuz reversing this isn't very funny.

I asked Anycubic to provide a spare screen, whatever they ask for it or send it for free, as i want to use printer meanwhile.

from marlin-ai3m.

b-desconocido avatar b-desconocido commented on May 27, 2024

So, i found the ancestor of display module. Most likely it produced by Chinese company Easttop Display Co. Ltd and customized for Anycubic. It is either based on module M7-M350A1 or M7-H350A1. I'm trying to contact them to get the datasheets :)
Most likely no one would response, so i'm continuing my own "investigation". ISP port has the following pinout:
display1
There is no boost circuit for back light, I just confused the buzzer with an inductor :) Despite that, it has 3.3V LDO, 32Mbit flash memory, and some relabeled MCU, which looks like the one you mentioned.
In case it is NUC120LC1BN, there might be a chance it is possible to extract firmware. According to datasheet, you could get it using ISP debugger despite the state of protection bit in Config0. I will try it soon.

from marlin-ai3m.

b-desconocido avatar b-desconocido commented on May 27, 2024

I got a firmware :)
tft firmware.zip

from marlin-ai3m.

davidramiro avatar davidramiro commented on May 27, 2024

Wow, great job! Please keep me updated!

from marlin-ai3m.

b-desconocido avatar b-desconocido commented on May 27, 2024

Not much else we can do with files accessible through USB. You can change images, font and the loading screen animation. All the rest is hardcoded in firmware. It isn't that tough to reverse engineer, but it is almost impossible to add new features to existing firmware or modify it in any way due to way the code is written and free space left. More feasible solution is to write a custom firmware from scratch, although i have no clues how it should look like, what options or settings must be in, nor how it should communicate with host MCU via serial, e.g. which commands, responses and arguments must be implemented.

from marlin-ai3m.

davidramiro avatar davidramiro commented on May 27, 2024

Sorry for the late reply and thank you for your efforts! This was a great insight, I never would have the guts to mess with the screen itself.

In theory the screen firmware should be really simple. It just forwards inputs, which get processed by AnycubicTFT.cpp and then executed by calling native Marlin functions. Anyways, if you wanted to get more functionality out of the screen, I would recommend replacing it with some Marlin compatible 12864 screen. Then you get all the native menus and lots of functions you can enable which only work with a native LCD.

Thanks again, I'm closing this issue for now. But please keep me updated if you gain any more insights!

from marlin-ai3m.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.