Calculator Community > TI Z80

Z80 Optimized Routines Repository

(1/3) > >>

Xeda112358:
Hi folks! I've noticed that the "Z80 Optimized Routines" threads and their equivalents on various sites aren't very easy to navigate. I am starting a repository on GitHub in the hopes of addressing these three issues:


* Organization! "Is this routine documented? What page is it on?
* Collaboration! "Is there a better version later in the thread? On what page!? Here is yetanotherversion!"
* Cleanliness! "What is this random request doing in the middle of the thread?"
I initialized the repository here.

My plan is to start porting Cemtech's thread, Omnimaga's thread, UnitedTI's thread, Z80 Heaven's routines, and my private routines folder.


If you want to help port documentation, I only ask that you cite the original author if possible, except when the original author doesn't care to be cited. If you want to add your own routines, keep it organized! And please, if you see an optimization, please make it!


A final note: I think it would be great to have an eZ80 and TI-BASIC repository, too, but I don't think I'm up for maintaining that!

the_mad_joob:
Rich idea!
Wish i had the time to help you on that...
Anyway, not sure who's the creator, but the labels on getKey.z80 are probably wrong.

Xeda112358:
On this one? The labels are in the right places, but I do notice that sometimes pressing a key will read as the wrong group :(

EDIT: Also, I'm hoping to put your routines in the repository if you'd like!

the_mad_joob:
Yes, that one.
I thought that having 2 identical labels looked weird, my first thought was that it was some kind of weird syntax compatible with a specific assembler or something.

Using SLA allows you to bypass the need for any delay, because it just enables further groups.
However, yes, it's pretty inaccurate, because you end up potentially reading duplicate key bits at once.
The safest way to do this is to actually use RLC or RLCA, so that only 1 clear bit is sent to the port at a time.
However, that implies entering the "delay madness", more specifically using the safe values of 8 or 32 cycles between OUTs & INs (6 or 15mhz).
There is a trick to really optimise that, which is to design your code so that your INs are immediately followed by OUTs, but it's not easy to explain.
Feel free to check my keybscan.z80 if you need some inspiration.

About adding my routines, sounds great, though each of my .zip file has some separate info (.txt file) that definitely need to be read, so i guess it would probably be wise to wait until i manage to include that as comments in each .z80.

Xeda112358:
Good news! I've finished Cemetech's thread and it was tedious as heck. I've also added a bunch of my personal stash that I think is in an acceptable state :P Currently at about 100 routines.

EDIT: Finished porting from the other sites.

Navigation

[0] Message Index

[#] Next page

Go to full version