Skip to content

ms2130_reverse_engineering

Mark Van den Borre edited this page Sep 4, 2023 · 24 revisions

Dumping RAM

Example:

sudo ms-tools/cli/cli --log-level=7 read RAM 0 --filename=/tmp/720576_2.bin && xxd /tmp/720576_2.bin > ram_720__576in_1080p_out_run2.hex

Analysing the RAM

Strategy

  • Diff two ram hex dumps from different resolutions. This gets rid of the large regions that are exactly the same between them.
  • Now look at these regions in two dumps with the same resolutions. Ignore the bits with differences within the same resolution. These likely are not what we are looking for.

Areas superficially examined:

  • 0000-0010: different value between identical resolutions
  • 0020? identical value between 16/9 and 4/3
  • 0060
  • 0070 something starts here, shifted by a hex word between some dumps
  • 0080 hex word shift between some dumps
  • 0090 end hex word shift
  • 00a0 possibly interesting: 720p and none identical, others quite unique by resolution
  • 00b0 - 1000 mogelijk interessant (1024, 720, none identiek, de rest uniek per res)
  • 1030 mogelijk interessant: 1024, 720, none identiek, de rest uniek per res
  • 1040 mogelijk interessant: 1024, 720, none identiek, de rest uniek per res
  • 1050 (identiek tussen alles behalve 1600x900)
  • 1060 (identiek tussen alles behalve 1600x900)
  • 1070 1280960 en 1600900 identiek; 1024768, 720, none identiek
  • 1080 1024768, 720p, none identiek; 1600900 en 1280960 uniek
  • 10a0- 10b0 1024768, 720p, none identiek; 1280960 en 1600900 uniek
  • 10c0 1600900 uniek, de rest identiek
  • 10d0 1280960 uniek, 1600900 uniek
  • 10e0 1280960 uniek, 1600900 uniek; 1024768, 720p, none identiek
  • 10f0 1280960 uniek, 1600900 uniek; 1024768, 720p, none identiek
  • 1100 idem
  • 1110 idem
  • 1140: idem. hex 16, 17, 18, 30, 31, 32 zijn significant
  • 1170: hex 5, 6, 7, 12, 14 zijn significant; ALLE WAARDEN UNIEK
  • 1490-16f0
  • 1950-19c0
  • 1a40 verschillende warden tussen identieke resoluties
  • 1bb0
  • 1bc0
  • 1bd0
  • 1be0
  • 1c30: hex 5 mogelijk belangrijk
  • 1c50-1fc0 grote blob verschil (beeld?)
  • 2000-4090 grote blob verschil (beeld?)
  • 40b0-7ff0 grote blob verschil (beeld?)
  • d150: hex 2 mogelijk belangrijk, idem tussen 1280x960 en 1600x900
  • e090 verschillende waarden tussen identieke resoluties
  • e140 1024 en none identiek, de rest uniek
  • e150
  • e160
  • e170
  • e180
  • e190
  • e260 mogelijk insignificant verschil
  • e300 verschillende waarden tussen identieke resoluties
  • e330 ... dit zou wel eens heel interessant kunnen zijn
  • e340
  • e360 mogelijk insignificant verschil
  • e390
  • e3a0 mogelijk insignificant verschil
  • e3c0 mogelijk insignificant verschil (volledig leeg bij 1600x900)
  • ef90 mogelijk insignificant verschil (andere waarde bij 1600x900)
  • efb0 mogelijk insignificant verschil (andere waarde bij 1600x900)
  • f040
  • f0c0 mogelijk interessant: hex 3, hex 15, 18, 19, 20
  • ~~f130
  • f170
  • f1a0~~
  • f3b0 hex 26 mogelijk significant, idem tussen 1280x960 en 1600x900
  • f530
  • f600-610 ... dit zou wel eens heel interessant kunnen zijn
  • f650-f660 ... dit zou wel eens heel interessant kunnen zijn
  • f840 kleine inconsistentie binnen zelfde resolutie
  • f850 terug idem tussen 1280x960 en 1600x900
  • fc00 inconsistenties
  • fc10 inconsistenties

1170

  • 00001170 seems to have interesting hex values 1, 2, 4, 5, 6, 11, 13 (13 is not significant)
    • a8f2a51: 1024768 (4/3), 1280720 (16/9), no external input
    • 80f62f9: 1200800 (3/2), 12801024 (5/4), 1280768 (5/3), 720576 (3/2), 1440576 (5/2), 1440/900 (16/10), 800600 (4/3)
    • 80f6af9: 1280*960 (4/3)
    • a0d62f1: 1600*900 (16/9)
./ram_1024768_in_1080p_out_run1.hex:00001170: ea89 f2a1 a4c5 21c3 e0c0 0902 1c03 0501  ......!.........
./ram_1024768_in_1080p_out_run2.hex:00001170: ea89 f2a1 a4c5 21c3 e0e8 0902 1c03 0501  ......!.........
./ram_1200800_in_1080p_out_run1.hex:00001170: e809 f621 a4cf 29c3 e0a4 0902 1c03 0501  ...!..).........
./ram_1200800_in_1080p_out_run2.hex:00001170: e809 f621 a4cf 29c3 e0cc 0902 1c03 0501  ...!..).........
./ram_12801024in_1080p_out_run1.hex:00001170: e809 f621 a4cf 29c3 e0c0 0902 1c03 0501  ...!..).........
./ram_12801024in_1080p_out_run2.hex:00001170: e809 f621 a4cf 29c3 e0e8 0902 1c03 0501  ...!..).........
./ram_1280768_in_1080p_out_run1.hex:00001170: e809 f621 a4cf 29c3 e00c 0902 1c03 0501  ...!..).........
./ram_1280768_in_1080p_out_run2.hex:00001170: e809 f621 a4cf 29c3 e034 0902 1c03 0501  ...!..)..4......
./ram_1280768_in_1080p_out_run3.hex:00001170: e809 f621 a4cf 29c3 e0fc 0902 1c03 0501  ...!..).........
./ram_1280768_in_1080p_out_run4.hex:00001170: e809 f621 a4cf 29c3 e024 0902 1c03 0501  ...!..)..$......
./ram_1280960_in_1080p_out_run1.hex:00001170: e809 f6a1 a4cf 29c3 e080 0902 1c03 0501  ......).........
./ram_1280960_in_1080p_out_run2.hex:00001170: e809 f6a1 a4cf 29c3 e0a8 0902 1c03 0501  ......).........
./ram_1440576_in_1080p_out_run1.hex:00001170: e809 f621 a4cf 29c3 e098 0902 1c03 0501  ...!..).........
./ram_1440576_in_1080p_out_run2.hex:00001170: e809 f621 a4cf 29c3 e070 0902 1c03 0501  ...!..)..p......
./ram_1440900_in_1080p_out_run1.hex:00001170: e809 f621 a4cf 29c3 e064 0902 1c03 0501  ...!..)..d......
./ram_1440900_in_1080p_out_run2.hex:00001170: e809 f621 a4cf 29c3 e030 0902 1c03 0501  ...!..)..0......
./ram_1600900_in_1080p_out_run1.hex:00001170: ea09 d621 a4cf 21c3 e0c4 0902 1c03 0501  ...!..!.........
./ram_1600900_in_1080p_out_run2.hex:00001170: ea09 d621 a4cf 21c3 e0ec 0902 1c03 0501  ...!..!.........
./ram_720__576in_1080p_out_run1.hex:00001170: e809 f621 a4cf 29c3 e028 0902 1c03 0501  ...!..)..(......
./ram_720__576in_1080p_out_run2.hex:00001170: e809 f621 a4cf 29c3 e050 0902 1c03 0501  ...!..)..P......
./ram_720p000_in_1080p_out_run1.hex:00001170: ea89 f2a1 a4c5 21c3 e070 0902 1c03 0501  ......!..p......
./ram_720p000_in_1080p_out_run2.hex:00001170: ea89 f2a1 a4c5 21c3 e098 0902 1c03 0501  ......!.........
./ram_800600__in_1080p_out_run1.hex:00001170: e809 f621 a4cf 29c3 e03c 0902 1c03 0501  ...!..)..<......
./ram_800600__in_1080p_out_run2.hex:00001170: e809 f621 a4cf 29c3 e064 0902 1c03 0501  ...!..)..d......
./ram_none000_in_1080p_out_run1.hex:00001170: ea89 f2a1 a4c5 21c3 e010 0902 1c03 0501  ......!.........
./ram_none000_in_1080p_out_run2.hex:00001170: ea89 f2a1 a4c5 21c3 e038 0902 1c03 0501  ......!..8......

00a0

  • 00a0 seems to have interesting hex values 1, 3, 6, 9, 11, 14, 15, 16, 19, 21, 23:
    • 13ccb518508: 1024768, 1280720
    • 934c951800a: 1200800, 1280 1024, 1280768. 1440576, 1440900, 720576
    • 934d911c08a: 1280*960
    • d145b5d8488: 1600*900
    • 934c951800a: 800*600
    • 13ccb518508: none

00001bc0

grep -r 00001bc0 ./|sort|grep -e 1024768 -e 720p
./ram_1024768_in_1080p_out_run1.hex:00001bc0: 0000 0100 1d02 0002 0000 0000 0001 0000  ................
./ram_1024768_in_1080p_out_run2.hex:00001bc0: 0000 0100 1d02 0002 0000 0000 0001 0000  ................
./ram_720p000_in_1080p_out_run1.hex:00001bc0: 0000 0104 1d02 0002 0200 0000 0001 0000  ................
./ram_720p000_in_1080p_out_run2.hex:00001bc0: 0000 0104 1d02 0002 0200 0000 0001 0000  ................

hex value 7:

  • 1024*768: 0
  • 720p: 4

hex values 4,5,6,7, 8,9,10,11:

  • 0100 1bbd: 1200*800
  • 0100 1d02: 1024*768
  • 0100 2a32: 12801024, 1600900, 1280*960
  • 0111 0a8c: 720*576
  • 0100 1f4f: 1440900, 1280768
  • 0104 1d02: 720p
  • 0100 0fa0: 800*600
  • 0100 1965: none
  • 011e 1518: 1440*576
  • 0122 1d02: 1080p30
  • 0110 3a05: 1080p60
  • 011f 3a05: 1080p50
  • 0100 740a: 2160p24
  • 0100 740{a,b}: 2160p25
Clone this wiki locally