ROM option (with or without the ZX Interface 2)

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

ROM option (with or without the ZX Interface 2)

Post 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
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

now also the scrolling text works. the keyboard scanning is quite primitive and annoying when used on text programs, though..
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

stefano wrote:the keyboard scanning is quite primitive and annoying when used on text programs, though..
Can you explain?
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post 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.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post 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.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post 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.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Good hint, I'll give it a try.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post 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.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post 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
Post Reply