playground.darkbyte.sk

Place for ZX Spectrum freaks
It is currently Sat Sep 23, 2017 4:35 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri May 12, 2017 3:08 pm 
Offline

Joined: Mon Nov 25, 2013 10:11 pm
Posts: 298
Location: Bratislava
Taka myslienka, co ma len tak (mimo cohokolvek ineho) napadla:

Pri zapise na vystupne porty je niekedy nutne zmenit len niektore bity a ine zachovat nastavene tak ako su. Typicky priklad: #FE. Ked chce clovek zapipat, pricom nechce zmenit farbu borderu, jedina moznost je pametat si niekde posledne zapisanu hodnotu, tuto zobrat, odmaskovat stary bit pre reprak, primaskovat novy bit a cele outnut.

A mna napadlo, ze vystupne porty by mohli fungovat nasledovne. Spodnych osem bitov adresy by adresovalo port (ako obvykle), ale hornych 8 bitov adresy by bola maska, ktora urcuje, ktore bity sa OUTom realne zmenia. Ak by takto fungoval port #FE, zvuky na EAR by sa vydavali outovanim na port #18FE, bez vplyvu na farbu borderu. Border by sa zase dal zmenit na porte #07FE bez vplyvu na aktualny stav EARu.

Samozrejme bolo by to pouzitelne len na 8-bitove porty. A prinasalo by to nutnost (vecsinou) port adresovat 16-bitovo. Ale soft by to zjednodusilo, lebo clovek by si (obvykle) nemusel pametat co na port poslal a potom logickymi operaciami selektivne menit iba tie bity co zmenit potrebuje.

Je jasne, ze prerabat existujuce porty (#FE, #7FFD,...) na taketo spravanie nema vyznam kvoli poruseniu kompatibility. Avsak mohlo by to byt pouzitelne pri navrhu nejakej novej periferie, kde sa cez jeden OUT bude nastavovat viac nezavislych veci naraz.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group