1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-09-17 03:48:46 +10:00
collapseos/arch/z80/sms/blk/620
Virgil Dupras 7001446212 Complete overhaul of recipes
Recipes contain bits and pieces of hardware-related knowledge, but
these bits feel sparse. I've been wanting to consolidate hardware-
related documentation for a while, but always fell at odds with the
recipes organisation.

We don't have recipes anymore, just a /doc/hw section that contains
hardware-related documentation which often translate to precise
instructions to run Collapse OS on a specific machine.

With this new organisation, I hope to end up with a better, more
solid documentation.
2020-10-30 20:39:39 -04:00

14 lines
632 B
Plaintext

( kbd - implement (ps2kc) for SMS PS/2 adapter )
: (ps2kcA) ( for port A )
( Before reading a character, we must first verify that there
is something to read. When the adapter is finished filling its
'164 up, it resets the latch, which output's is connected to
TL. When the '164 is full, TL is low. Port A TL is bit 4 )
0xdc PC@ 0x10 AND IF 0 EXIT ( nothing ) THEN
0x3f PC@ DROP 0b11011101 ( Port A TH output, low ) 0x3f PC!
0xdc PC@ ( bit 3:0 go in 3:0 ) 0x0f AND ( n )
0b11111101 ( Port A TH output, high ) 0x3f PC!
0xdc PC@ ( bit 3:0 go in 7:4 ) 0x0f AND 4 LSHIFT OR ( n )
( Port A/B reset ) 0xff 0x3f PC!
;