AMT630A firmware for mini TFT screens

Discussion of development of software for any "obsolete" computer or video game system. See the WSdev wiki and ObscureDev wiki for more information on certain platforms.
nocash
Posts: 1405
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: AMT630A firmware for mini TFT screens

Post by nocash »

Yeah, adding a hardcoded adc-channel selection would be easy. Nicer would be auto-detecting the used channel if possible.

I don't understand what kind of hardware you have there...

ADC0 and ADC2 are not connected to anything (on the unmodded board)?

ADC1 is the keypad input... and you've short-cut it with ADC0 pin?

Why did you need the extra resistor? Is that because short-cutting ADC0+ADC1 somehow changed the voltages? Or is your keypad board different - ie. which resistor values do you have on the keypad board? 1K, 2K and 4.7K ohm?

And is there a pull-up resistor on the ADC pin on mainboard, with how many ohms?
I don't remember how that's wired on my own mainboard, but I guess there must be some pull-up (since unused ADC pins are floating somewhere between VCC and GND).

Oh, and what firmware did you have on that board originally? Or was it the 1024x600pix firmware you posted earlier? My firmware doesn't properly support that resolution though.

And what is the yellow thing on the photo, is that a LED? A PCB photo would be nice too, and the TFT display part number (and info on size/resoltution).

For downloading: Best start here, with the first page, http://remont-aud.net/dump/car_audio/ca ... nitors/356 and download all AMT6xx related files (including AMT628 or AMT629 or whatever) (ie. use your browser's search-in-page to find anything with "AMT"), and then continue at second, as far as you can get (in total there are currently 5 pages (the older pages have fewer AMT chips, so maybe 50 points are enough to get through all pages).
Important please include some info what you have downloaded where from. In the two files I have posted above (for AMT630 and AMT629), I've included an extra txt file (inside of the archives) with the URL where each file was downloaded from, and copy/paste of the text on that page (showing only the latin/ascii part though). Adding that info will probably make downloading a bit more time consuming, but it could be quite valueable to have that info included.
emax
Posts: 11
Joined: Sat Jun 09, 2018 12:55 am
Location: Russia

Re: AMT630A firmware for mini TFT screens

Post by emax »

five files per day.
Why No$x51 do not understand asm51 command CJNE ?
Attachments
534070aa66e7d.rar
(302.67 KiB) Downloaded 924 times
29932_25X20BVNIG.rar
(14.84 KiB) Downloaded 901 times
23806_25f10_ok.rar
(21.21 KiB) Downloaded 902 times
19266_mir350.rar
(16.37 KiB) Downloaded 897 times
18972_TFT_monitor_25X.rar
(16.55 KiB) Downloaded 968 times
emax
Posts: 11
Joined: Sat Jun 09, 2018 12:55 am
Location: Russia

Re: AMT630A firmware for mini TFT screens

Post by emax »

Next five files.
Attachments
40474_MT-MAIN-630A-43.rar
(20.41 KiB) Downloaded 956 times
36202_car_monitor.rar
(3.85 MiB) Downloaded 947 times
33167_dv-500_amt630_5.zip
(19.82 KiB) Downloaded 898 times
32053_SK-243-MAIN-V2..rar
(20.53 KiB) Downloaded 919 times
30941_mon_rab.rar
(21.06 KiB) Downloaded 897 times
emax
Posts: 11
Joined: Sat Jun 09, 2018 12:55 am
Location: Russia

Re: AMT630A firmware for mini TFT screens

Post by emax »

next files
Attachments
52946_25Q40_re..rar
(512.13 KiB) Downloaded 913 times
52164_NO_NAME_LCD.rar
(21.38 KiB) Downloaded 907 times
51319_ZCD-630A-4.3D_V.rar
(20.84 KiB) Downloaded 941 times
51018_work_dump_630A.zip
(22.05 KiB) Downloaded 918 times
43036_car_monitor.rar
(23.05 KiB) Downloaded 898 times
emax
Posts: 11
Joined: Sat Jun 09, 2018 12:55 am
Location: Russia

Re: AMT630A firmware for mini TFT screens

Post by emax »

last three files
Attachments
s_1528978373_NO_blue_1024h600.zip
(25.19 KiB) Downloaded 888 times
57157_AMT630A.rar
(13.79 KiB) Downloaded 943 times
55733_spi_flash_zsd_6.rar
(22.31 KiB) Downloaded 902 times
nocash
Posts: 1405
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: AMT630A firmware for mini TFT screens

Post by nocash »

Thanks! But... oh no, you did it! You didn't include the URL's and other text/info ; (
Hmmm, it looks a bit as if the first 5 digits of the zip/rar name are matching up with the last 8 digits of the URL?
So this http://remont-aud.net/dump/car_audio/ca ... -1-0-57157 would correspond to file 57157_AMT630A.rar [13.79 KiB]?
On the other hand, looking at two other URLs, http://remont-aud.net/dump/car_audio/ca ... -1-0-57877 and http://remont-aud.net/dump/car_audio/ca ... -1-0-56231 - I can't find files for them.

No$x51 supports two asm syntaxes, ".native" and ".nocash", in the latter one, CJNE is called JNE (and it differs on using round/square brackets and # prefixes). The syntaxes are described in CPU Microprocessor chapter.
Btw. did you read my previous post, with the questions about what hardware you have?
emax
Posts: 11
Joined: Sat Jun 09, 2018 12:55 am
Location: Russia

Re: AMT630A firmware for mini TFT screens

Post by emax »

Do not worry! I have prepared a file to organize the data.

About hardware.
I have small 4.3" car monitor. Its native firmware - WD-888-V1.0 CRX441.zip
Its keyboard have 3 buttons with resistors 1k, 2k, 4.7k, but in another order and another ADC input. Pull-up resistor 12k, so voltage on input of ADC change in another range. I corrected your firmware and keyboard works good. Yes I added power LED, because blackscreen idle mode and autoswitch to second AV input annoyed me. TFT panel 480x272 size, marked on te connector ZNL043T702-P40.
It remains to solve two problems:
1. Settings are not saved. May be your firmware do not work with my flash chip? I tried three different chips - no result :cry: Which chip exactly works with your firmware? Now I changed presetting in your firmware to my needs.
2.Not sure it possible. Can AMT630a zoom picture in small limits (3-5%)? The fact is that all picture does not fit in screen. I need "underscan" picture. Pleases that menu item "signal decoding - pal/ntsc/pal60" change size of picture.

And yet one questons: How Nocash works with local/global labels as is "@@...", what determines its scope area?
Attachments
amt.xlsx
(20.44 KiB) Downloaded 979 times
emax
Posts: 11
Joined: Sat Jun 09, 2018 12:55 am
Location: Russia

Re: AMT630A firmware for mini TFT screens

Post by emax »

Last news.
1.Сombining the PLL multiplier and the total number of points in a line, I achieved a vertical scaling. But to scale horizontally, it is necessary to change the sampling frequency of the input analog signal. I do not know yet how.
2.Strange things: an unknown command (20h to reg FDD0h)allows write one byte into a flash. The written byte I put in the reg FDD1h :shock:
nocash
Posts: 1405
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: AMT630A firmware for mini TFT screens

Post by nocash »

[FDD0h]=20h for manual flash write sounds right, I was wondering if the chip might support such a thing. And sharing [FFD1h] for write data and write status does make sense, too. For daily use I would stick with 100h-byte DMA write instead manual 1-byte writes; the DMA is probably faster (and maybe it's also better for chip lifetime to do a single 100h-byte write instead many 1-byte writes). But good to know that the 1-byte write feature does exist!

For vertical scale, changing "total number of points" means... that you are changing "total including hblank"? Which/how many registers did you need to change?

For horizontal scale, isn't the 4:3 vs 16:9 ratio option already doing right that? I do only have a 3.5 inch 4:3 display, so I've never actually seen how 16:9 would look like, but I thought it's mainly affecting horizontal scale.
Looking at the 4.3/5.0 inch firmware, the ratio is mainly changing the words at FC96h-FC97h (NTSC) and FCC2h..FCC3h (PAL).
And, maybe only less important fine-tuning, also the word (or 2 bytes?) at FCADh-FCAEh (NTSC) and FCD9h-FCDAh (PAL).

Oh, and about your previos post (sorry for not replying earlier):

The local labels (with @@-prefix) are erased whenever defining a global label (without @@-prefix), that behaviour is adopted from borland's turbo assembler.

Did you get the "firm_do_save_settings" function working with your flash chips? It should work with anything that's 128Kbyte or bigger, unless some chips need different write-protect-status values, or extra delays, or different erase commands or so. Best check the chip part numbers and the datasheets for that chips.

For the keyboard, did you get it working without additional/external resistor? Ie. by just changing the ADC range values in the firmware? If yes, would be interesting to see which values you are using.
emax
Posts: 11
Joined: Sat Jun 09, 2018 12:55 am
Location: Russia

Re: AMT630A firmware for mini TFT screens

Post by emax »

for vertical scaling I change FD0Ah, now 9Dh and FCC5h/FCC4h = 43Ah.(only for 50Hz) The image is slightly reduced vertically and completely enters the screen. And I little adjust offset and crop.
Changing 16x9/4x3 does not matter to zoom input image.
In the scaler, as I understand it, there are two independent processes:
The first digitizes the input analog signal with ONE frequency and fills the memory buffer.
The second - outputs data from memory buffer to the screen with a another frequency.
In AMT630a datasheet ADC clock frequency may be 13.5 - 54 MHZ. I need to increase this frequency a little, but I do not yet know how.
With the flash while the troubles, your firmware does not read the ID of my chip, only FF FF FF.
The keyboard I redid over your resistors with my was a lot of bugs.
nocash
Posts: 1405
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: AMT630A firmware for mini TFT screens

Post by nocash »

emax wrote:Changing 16x9/4x3 does not matter to zoom input image.
In the scaler, as I understand it, there are two independent processes:
The first digitizes the input analog signal with ONE frequency and fills the memory buffer.
The second - outputs data from memory buffer to the screen with a another frequency.
In AMT630a datasheet ADC clock frequency may be 13.5 - 54 MHZ. I need to increase this frequency a little, but I do not yet know how.
Yes, I guess so, too (concerning the first/second step).
But 16x9/4x3 does affect the zoom (of the output), doesn't it?
Though I guess it might add black borders or the like (when the zooming out too far, ie. when the input buffer did store data outside of the usual screen boundaries).

Yeah, changing the ADC input clock might do it (no, I don't know how). If you want to "zoom out" then you would need to decrease it a bit. And alongsides you would probably also need to adjust the sample starting point in some other register (and maybe also the sample width or end point... unless it ends automatically when the buffer for the line gets full).
emax wrote:With the flash while the troubles, your firmware does not read the ID of my chip, only FF FF FF.
The ID is used only in the diagnostic screen (not needed for my flash write function)...
But yeah, the read ID command should work for all chips...
Looks as if something is wrong there (and, yes, that same problem might also affect writing).
emax
Posts: 11
Joined: Sat Jun 09, 2018 12:55 am
Location: Russia

Re: AMT630A firmware for mini TFT screens

Post by emax »

nocash wrote: Yes, I guess so, too (concerning the first/second step).
But 16x9/4x3 does affect the zoom (of the output), doesn't it?
Though I guess it might add black borders or the like (when the zooming out too far, ie. when the input buffer did store data outside of the usual screen boundaries).

Yeah, changing the ADC input clock might do it (no, I don't know how). If you want to "zoom out" then you would need to decrease it a bit. And alongsides you would probably also need to adjust the sample starting point in some other register (and maybe also the sample width or end point... unless it ends automatically when the buffer for the line gets full).
Thank you very much, I did so. I completely removed crops and lowered the scale. Now almost the whole picture is included in the screen.
nocash wrote: The ID is used only in the diagnostic screen (not needed for my flash write function)...
But yeah, the read ID command should work for all chips...
Looks as if something is wrong there (and, yes, that same problem might also affect writing).
all succeeded, saving parameters works without reading ID.
I also turn on chips UART with baudrate -27000000/-22/32 = 38 352 bauds. It's very close to 38 400 and work fine with PC. My simple terminal code allows add a color OSD on the screen from another device (arduino etc).
Thats all with AMT630a.
In the future I start a similar work with MST720 and RTD2660.
qczek
Posts: 5
Joined: Sun Jan 27, 2019 5:57 am

Re: AMT630A firmware for mini TFT screens

Post by qczek »

Hi,
First of all, @nocash it's impressive what you did. Thanks for your work.
I found this forum, just because I started thinking about custom free available firmware for cheap LCD monitors, which are used by RC maniacs, for FPV flights. There are a lot of them on the market, but I think, that all are based on firmware provided by chip manufactures. My goal is to add OSD which will visualize flight parameters, draw artificial horizon, display GSP coordinates, etc. Exactly what analog OSD based on MAX7456 does, but with colours and draw directly on LCD screen by video processor.
There are a lot of displays based on TW8820 or other chips, but ATM630A is cheapest i think :) and maybe it's good point to start with it.
I wonder what do you think, about it, do you think that, there is possibility to use C compiler (SDCC is free available) to build firmware from scratch, just based on your reverse engineering?

Anyway, I found two pieces of small 3.5inch lce in my drawer looking exactly the same like your.
I can enter service menu and change some parameters, but i don't really know what does VCOMAC and VCOMDC means...
But snow is working, fine :) I'm not sure if when is ON, the displays shows composite input event when sync is lost, or it's just replacement of static black/blue screen turing on, when level of signal is lower then defined value (something like noise gate?).
IMG_20190127_120337.jpg
IMG_20190127_120259.jpg
IMG_20190125_173809.jpg
So i'm going to try replace the firmware by one provided by you, but don't know if it's any way to do it without flash programming devices. I only have JTAG devices used by me to program STM32 hw, and it look not suitable for SPI flash programming ;)
Maybe you have any idea how to do it, maybe arduino boards which some smart software?

I also run your emulator, it works fine;) but don't have idea how to simulate menu/+/- buttons ? to get the menu )?
Best regards
Kris
User avatar
Jarhmander
Formerly ~J-@D!~
Posts: 568
Joined: Sun Mar 12, 2006 12:36 am
Location: Rive nord de Montréal

Re: AMT630A firmware for mini TFT screens

Post by Jarhmander »

With a ST Nucleo board and STLink utility, you could do an SPI flash programmer fairly easily. STLink utility comes with "external loaders", which can be used to flash external memories connected to a ST mcu. You can thus wire up a Nucleo to the SPI Flash, and then use an external loader that works with SPI Flash chips, and you're done.
((λ (x) (x x)) (λ (x) (x x)))
qczek
Posts: 5
Joined: Sun Jan 27, 2019 5:57 am

Re: AMT630A firmware for mini TFT screens

Post by qczek »

Jarhmander wrote:With a ST Nucleo board and STLink utility, you could do an SPI flash programmer fairly easily. STLink utility comes with "external loaders", which can be used to flash external memories connected to a ST mcu. You can thus wire up a Nucleo to the SPI Flash, and then use an external loader that works with SPI Flash chips, and you're done.
Thanks,
I was not aware, that STLink can do that :) I was using openocd only..
Anyway it looks like st does not provide external loader for 4Mbits flash like t52s40 used on my board :(
Or maybe i can use loader for different flash size, need to check... and first find connection diagram for SPI flashing.
Thanks again.
Kris
Post Reply