Dumping/reverse engineering MSX models thread

Página 20/20
13 | 14 | 15 | 16 | 17 | 18 | 19 |

Por sergarbes

Expert (98)

imagem de sergarbes

19-07-2021, 15:02

Well then, what method do you recomend ?

Por gdx

Enlighted (4802)

imagem de gdx

19-07-2021, 15:57

I don't know but I see only that when we press these key on a French Sanyo PHC-28L and a Canon V-20, we get the same result, however these are not the same matrices. (The characters of the first two rows are reversed by pressing SHIFT or not.)

https://www.msx.org/wiki/Keyboard_Matrices

Some Japanese MSXs give the same result, although they do not have the same matrices.

Por Manuel

Ascended (18237)

imagem de Manuel

19-07-2021, 17:40

sergarbes wrote:

With this, the OpenMSX team could already emulate the HB-F700S? Thus the XML would be available to use the machine with the emulator.

Cool Cool Cool

I'll be adding it soon. I haven't had much time lately.

Por Manuel

Ascended (18237)

imagem de Manuel

19-07-2021, 17:42

sergarbes wrote:

Hi gdx, I executed KEYMATR.BAS and posted the result of pressing SHIFT+GRAPH+0 and the Key "1" in the numeric keyboard. If you need something else let me know Tongue

This only tests whether there are diodes in the keyboard hardware to prevent some key ghosting and to confirm that the numeric keypad is not mapped to the normal keyboard, but has its own place in the matrix.

Por Manuel

Ascended (18237)

imagem de Manuel

19-07-2021, 22:32

Manuel wrote:
sergarbes wrote:

With this, the OpenMSX team could already emulate the HB-F700S? Thus the XML would be available to use the machine with the emulator.

Cool Cool Cool

I'll be adding it soon. I haven't had much time lately.

Oh, looks like I already added it 5 days ago: https://github.com/openMSX/openMSX/commit/2c4961a659aae6d9cc...

Por Manuel

Ascended (18237)

imagem de Manuel

19-07-2021, 22:37

About the keymatrix.... it is mostly inside the ROM, I guess. I made a script for openMSX that tries all possible keymatrix inputs and tries to find out which character that produces. It's a grave hack, but maybe it's useful for you... don't forget to edit the file to set the output filepath/name.

set outfile "/tmp/keymatrixmapping.int"

type SCREEN0\rWIDTH40\r\key1,""\rkey2,""\rkey3,""\rkey4,""\rkey5,""\rkey6,""\rkey7,""\rkey8,""\rkey9,""\rkey10,""\r\U000c

set matrixdata []

set modifiers [ [list 0 ""] [ 1 "SHIFT"] [ 4 "GRAPH"] [ 5 "SHIFT GRAPH"] [ 16 "CODE"] [ 17 "SHIFT CODE"]]

for {set row 0} {$row < 6} {incr row} {
        for {set col 0} {$col < 8} {incr col} {
                lappend matrixdata [ $row $col]
        }
}
lappend matrixdata [ 8 0]

set matindex 0
set modifier_index 0

set results []

proc print_results {} {
        global results
        global outfile
        set sorted_results [lsort -integer -index 2 $results]
        set typed_chars []
        set fh [open $outfile "w"]
        foreach result $sorted_results {
                set charval [lindex $result 2]
                lappend typed_chars $charval
                if {$charval < 255} {
                        puts $fh "[lindex $result 0][lindex $result 1], [format %02x [lindex $result 2]], [lindex $result 3]"
                }
        }
        for {set char 0} {$char < 255} {incr char} {
                if {$char != 0x00 && $char != 0xFF} {
                        # check if this char was put into the list. If not, report it as untypable
                        if {[lsearch -exact $typed_chars $char] == -1} {
                                puts $fh "--, -, [format %02x $char]"
                        }
                }
        }
        close $fh
        #puts stderr $results
}

proc next_modifier {} {
        global modifiers
        global modifier_index
        global matindex
        set matindex 0
        set cur_modifier [lindex $modifiers $modifier_index]
        keymatrixdown 6 [lindex $cur_modifier 0]
        after time 0.3 dopress
}

proc readvalue {row col} {
        global results
        global matrixdata
        global matindex
        global modifiers
        global modifier_index
        set cur_modifier [lindex $modifiers $modifier_index]
        lappend results [ $row $col [vpeek 0] [lindex $cur_modifier 1]]
        keymatrixup $row [expr {1 << $col}]
        type \U000c
        if {$matindex < [expr [llength $matrixdata] -1]} {
                incr matindex
                after time 1 dopress
        } else {
                keymatrixup 6 [lindex $cur_modifier 0]
                if {$modifier_index < [expr [llength $modifiers] -1]} {
                        incr modifier_index
                        after time 0.3 next_modifier
                } else {
                        set ::throttle on
                        print_results
                }
        }
}

proc dopress {} {
        global matindex
        global matrixdata
        set curdata [lindex $matrixdata $matindex]
        set row [lindex $curdata 0]
        set col [lindex $curdata 1]
        keymatrixdown $row [expr {1 << $col}]
        after time 0.3 "readvalue $row $col"
}
set ::throttle off
after time 10 next_modifier

[/]

[/]

[/]

[/]

[/]

[/]

[/]

[/]

[/]

[/]

[/]

[/]

[/]

Por Manuel

Ascended (18237)

imagem de Manuel

19-07-2021, 22:39

Never mind... forum is breaking it completely... Perhaps try to quote it and then copy the raw text?

Por sergarbes

Expert (98)

imagem de sergarbes

20-07-2021, 08:35

gdx wrote:

I don't know but I see only that when we press these key on a French Sanyo PHC-28L and a Canon V-20, we get the same result, however these are not the same matrices. (The characters of the first two rows are reversed by pressing SHIFT or not.)

https://www.msx.org/wiki/Keyboard_Matrices

Some Japanese MSXs give the same result, although they do not have the same matrices.

Cool entry! I have found this one that clarifies me a bit more what you are telling.

http://map.grauw.nl/articles/keymatrix.php

Por sergarbes

Expert (98)

imagem de sergarbes

20-07-2021, 09:22

Manuel wrote:
Manuel wrote:
sergarbes wrote:

With this, the OpenMSX team could already emulate the HB-F700S? Thus the XML would be available to use the machine with the emulator.

Cool Cool Cool

I'll be adding it soon. I haven't had much time lately.

Oh, looks like I already added it 5 days ago: https://github.com/openMSX/openMSX/commit/2c4961a659aae6d9ccd75c2b07cefb8351f1df1f

Cool ! B-) B-) B-)

Thanks a lot ! :) :) :)

Por sergarbes

Expert (98)

imagem de sergarbes

20-07-2021, 09:25

Manuel wrote:

About the keymatrix.... it is mostly inside the ROM, I guess. I made a script for openMSX that tries all possible keymatrix inputs and tries to find out which character that produces. It's a grave hack, but maybe it's useful for you... don't forget to edit the file to set the output filepath/name.

Copy that Big smile

Página 20/20
13 | 14 | 15 | 16 | 17 | 18 | 19 |