Close

Beta release!

A project log for Tek V2

Version 2 of PS/2 keyboard adapter for Zeddies

danjovicdanjovic 10/12/2019 at 07:140 Comments

I have found a bug that happened when DEBUG directive was active.

I forgot to save the _temp_register_ on the beginning of the ISR and it caused the AVR to crash and reset while printing debug data to serial console.

ISR (INT0_vect, ISR_NAKED) {

  asm volatile (
    "push __tmp_reg__\n\t" // <- THAT WAS MISSING!
    "in __tmp_reg__,__SREG__ \n\t"   // Save Status register

    "push r17\n\t"                   // keep PINB state
    "push r18\n\t"                   // keep PIND state
    "push r19\n\t"                   // temp Data to write on Output
    "push r20\n\t"                   // register to read keymap
    "push r26\n\t"                   // Pointer to Keymap
    "push r27\n\t"                   //
...

After that was fixed the project began to behave like expected, so I am releasing it as a beta.

I Will change the structure of the ".h" files to make easier to define new keyboard matrices (ZX81,Speccy,Ace) as well as new keyboard layouts (pt_br, en, etc).

Discussions