[amirus] По поводу работоспособности AmiRUS под AmigaOs4

  • From: AmiS <amis@xxxxxxxxxxxx>
  • To: amirus@xxxxxxxxxxxxx
  • Date: Thu, 02 Oct 2003 20:07:07 +0400

Hello,

Я привожу вырезки бесед с разными людьми надеюсь поймёте что от кого
===============================================
вот немного инфы о том что случилось с вашей функцией MapRawKey, буду 
репортить, может
пофиксят :-) ибо меня порадовало как это под 3.9.4 работает.

keymap.library 45.16

- This is the first alpha release of the C
  re-implementation of the keymap.library. The basic
  functions of the keymap.library for forwards "MapRaw"
  and backwards "MapANSI" keyboard mapping have been
  rewritten. The only parts that are still in assembly
  are the library glue code for startup and the definition
  of the default keymaps "usa" and "usa1". The latter 
  "run native" on any machine, obviously. The former has
  possibly to be replaced by a new library interface anyhow.


keymap.library 45.17

- Fixed a bug in an "out of bounds" condition check for
  MapRawKey that happened for MouseWheel drivers <Oliver Roberts>.


keymap.library 45.18

- now compiles with gcc, removed the assembly startup code.

- moved all global vars to the library base.

- MapRawKey() and MapAnsi() have semaphore protection against
  changes to the default keymap, now.


keymap.library 50.1

- Better integration into the OS4 build.

- The 'usa0' keymap now also builds with GCC and requires
  no special assembler.


keymap.library 50.2

- ported to ppc.

- the 'usa0' keymap now also builds with ppc GCC before
  it required a special assembler ;)

============================================
нужен фрагмент кода субжа где происходит патч MapRawKey() функции, текущий
анализ показал что Вы делаете это не совсем кооректно и оставляете мусор за
собой (со слов Стефана Руперика ответственного за этот фрагмент оси)
а этот мусор повреждает какието нововведения ;-)
а под старой системой это работает ибо та область находилась в резерве

============================================
сомневаюсь что это мы что-то повреждаем.

SAVEDS ASM(WORD) amirus_MapRawKey(REG(a0, struct InputEvent *event), REG(a1, 
STRPTR buffer), REG(d1, WORD length), REG(a2, struct KeyMap *keymap))
{
    return oldMapRawKey(event, buffer, length, currentKeyMap);
}

VOID amirus_AllocSpy()
{
        systemKeyMap = AskKeyMapDefault();
        lastKeyMap = NULL;
        tempKeyMap = NULL;
        currentKeyMap = systemKeyMap;
        Forbid();
        oldMapRawKey = (MapRawKeyFPtr)SetFunction((struct Library *)KeymapBase, 
-0x02A, (APTR)amirus_MapRawKey);
        Permit();
}
============================================

A6 (KeyMapBase) is not passed to the original function.



Kind regards


Other related posts:

  • » [amirus] По поводу работоспособности AmiRUS под AmigaOs4