Page 1 of 1

ROM option (with or without the ZX Interface 2)

Posted: Wed Jan 09, 2019 12:13 pm
by stefano
This one was already present, but for small configuration error it was only half-working.

Now fixed: https://github.com/z88dk/z88dk/issues/1060

Posted: Tue Jan 22, 2019 10:54 pm
by stefano
now also the scrolling text works. the keyboard scanning is quite primitive and annoying when used on text programs, though..

Posted: Tue Jan 22, 2019 11:12 pm
by dom
stefano wrote:the keyboard scanning is quite primitive and annoying when used on text programs, though..
Can you explain?

Posted: Wed Jan 23, 2019 11:06 am
by stefano
I'm referring to my simple interrupt hanlder, activated with "-startup=2" in classic mode.
It is minimalistic, no smart delays on the keyboard auto-repeat nor CAPS-SHIFT or SYMBOL-SHIFT support (only lowercase, etc).
I just inserted a litte bit of delay in the keyboard scanning code to make it (sort of) usable when typing text, but the only advantage at the moment is the small code size.

Posted: Wed Jan 23, 2019 11:14 am
by stefano
Compared to the relevant effort I had to put to build a ROM version of DSTAR, I'm really enthusiast of the new z88dk features, the workarounds you made possible with sections and the many enhancements are incredibly effective.

A ROM version of wall.c took 1/5 of the time and most of fixes are now part of z88dk, to be fixed once, and valid also for other targets... impressive.

Posted: Wed Jan 23, 2019 11:31 am
by dom
stefano wrote:I'm referring to my simple interrupt hanlder, activated with "-startup=2" in classic mode.
It is minimalistic, no smart delays on the keyboard auto-repeat nor CAPS-SHIFT or SYMBOL-SHIFT support (only lowercase, etc).
I just inserted a litte bit of delay in the keyboard scanning code to make it (sort of) usable when typing text, but the only advantage at the moment is the small code size.
Ah right, why don't you use call in_Inkey() instead? That will handle the shift keys and remove duplicate-ish code.

Posted: Wed Jan 23, 2019 11:36 am
by stefano
Good hint, I'll give it a try.

Posted: Wed Jan 23, 2019 12:41 pm
by stefano
It works, all the characters are remapped properly but the program gets 284 bytes bigger and a workaroud to avoid a fast "auto-repeat" effect is still necessary. The impact on the CPU speed is not relevant.
I inserted this new handler as the default option and left the old one hidden behind a #pragma option (#pragma define tinykbdhandler=1).

Considering the 'repeat' hassle, the backspace key gets very useful.

Posted: Sat Feb 09, 2019 1:45 pm
by stefano
more clean-up on the keyboard code, I totally removed the interrupt driven portion.: it makes fgetc_cons quite simple (no repeat) but effective.
Other functions could be easily adapted with the smc_code section (draw_profile..). beeper and scrolling are provided with a direct implementation.
there is still a relevant percentage of non working examples, but now the balance is good