Changes between Initial Version and Version 1 of vtech/z80


Ignore:
Timestamp:
Jun 4, 2022, 2:10:35 PM (2 years ago)
Author:
pulkomandy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • vtech/z80

    v1 v1  
     1= Notes on VTech z80 based laptops =
     2
     3These notes are derived from the work of https://github.com/fraser125/PreTech/blob/main/Schematic/prc1000.pdf who reverse engineered the schematics by tracing pictures of the PCB. The PreComputer 1000 is simple enough and uses standard components, so from this tracing we can learn a lot about how the machine works.
     4
     5== IO decoding ==
     6
     7The IO decoding uses A15 and A14 to split the IO space in 4 areas. Officially, the z80 IO space is only 8 bits addresses, but it is well known (and used on other machines) that the IN and OUT instructions set a full 16 bit address with known and reliable behavior.
     8
     9The decoding is done using the logic ending with IC2B: it detects the IORQ and M1 lines (making sure this is an IN or OUT type instruction) and these two address bits. From there 4 signals are generated:
     10
     11=== 0xxx-3xxx: Keyboard ===
     12
     13The keyboard can only be read. Writing to the keyboard using OUT instructions will have no effect, but if keys are pressed, it will short circuit data and address lines through one of the keyboard diodes and the pressed key. This is probably OK for short durations, but should still be avoided.
     14
     15When reading, the address lines A0-A8 are wired directly to the keyboard matrix lines. So you should set one of these bits (and not more) to 0.
     16
     17For example, you can use these port numbers:
     18
     19* 0FFE - line 0 (A0 = 0)
     20* 0FFD - line 1 (A1 = 0)
     21* 0FFB - line 2 (A2 = 0)
     22* 0FF7 - line 3 (A3 = 0)
     23* 0FEF - line 4 (A4 = 0)
     24* 0FDF - line 5 (A5 = 0)
     25* 0FBF - line 6 (A6 = 0)
     26* 0F7F - line 7 (A7 = 0)
     27* 0EFF - line 8 (A8 = 0)
     28
     29For each line, the status of 8 keys will be read in the destination register of the IN instruction.
     30
     31=== 4xxx-7xxx: TODO ===
     32
     33The address bits A0-A3 are stored in a latch, but it isn't known yet what they are used for (STROBE_A -> IC1A in the schematics)
     34
     35=== 8xxx-Bxxx: Memory banks configuration ===
     36
     37Only OUT instructions are allowed. IN instructions will leave the memory configured in an unknown state.
     38
     394 data bits are used:
     40
     41* D0: Low memory bank selection
     42* D1, D2: High memory bank selection
     43* D3: Cartridge enable