Hi Daniel! How did you solve the problem?? I am writing an article for the MSX Assembly Page right now, about the key matrices, and I am interested in how you proceeded.
Also, I only have 2 keyboard layout tables, one being an international one, the other being the UK one (they both differ on only 1 field). Do you have more of them?? Thanks in advance, ~Grauw ----- Original Message ----- From: "Daniel Caetano" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 13, 2002 7:26 AM Subject: How to converte keyboard matrix data to ASCII? > > People, > > I'm translating Snatcher to portuguese and then to English. > At this time, the translation is going very well, and I'll > release betas as soon as the final programming problems > finish. > I found a little problem that I'm not being able to solve. > The game reads the columns and lines of the keyboard to find > what key is pressed. It's the only way, since it replaces > the interrupt. But this is not the point. > At one place, the game converts the data (line and column > got on the key matrix) to a character value, based on a > internal table. This table originaly pointed to Kanji/Hiragana > characters (Japanese language). I converted them ASCII values > and it really works... well... in some machines. > > The problem resides in the fact the relation > line/column -> ASCII is NOT defaut. It seems to be different > on several machines, even if they are from the same country > and have similar keyboard. > The result is: in some computers, the keys act as expected > (when you press the "A" key, the A appears on the screen). > But on other computers, when you press the "A" key, something > different appears (say, an "8" is shown). > > Once there is no default way to convert a line/colum from > keymatrix to a ASCII code (the BIOS has a table, but it's > position is not the same in every computer), I think the solution > is to preload the proper convertion table in the upper memory (say, > on the PLAY queue space) and point the game to look there. > This would be ok IF I knew a way to detect what the hell > kind of keyboard the machine uses. > One way to detect it is asking to the user to push some keys, > but this is very annoying and not compatible with the work I'm > doing on Snatcher. > > I'm writting here in the hope someone know a misterious way > to detect the keyboard type. > > Before someone ask me, I know the byte 0x002C of ROM says me > the keyboard type. But this means nothing. On computers with > the same value for this byte, the answer of the key matrix was > different one from another. )^= > > BTW, Snatcher is non-standard in many aspects. This is one of > them. Konami never thought to release this game outside its > county (this explains why they do not worried about differente > keyboard types than the japanese one). > > I hope someone can help me, and I can continue the translation. > > Thanx in advance. > > Daniel Caetano > > PS: The actual stage of translation is somewhat more advanced than > Oasis was. But as soon as this problem is fixed, the translation > will not be hard, since I had developed several programs that > automatically replaces the texts and relocate them when they > do not fit in the space. > > > []'s > > Daniel Caetano > [EMAIL PROTECTED] > > ..."A necessidade de criatividade e' o que contribui para a > mudanca. A criatividade mantem o criador vivo." (Frank Herbert) > http://soulmatrix.dynodns.net/ - This OS/2 system uptime is 0 days 05:42 hours. > > > -- > For info, see http://www.stack.nl/~wynke/MSX/listinfo.html _______________________________________________ MSX mailing list ([EMAIL PROTECTED]) Info page: http://lists.stack.nl/mailman/listinfo/msx
