There are unfortunately a few conceptional restrictions in addressing the ZXblast hardware which showed up later and refers to the I/O usage. The concept was taken from the ZXmore but I did overlook that the addresses with A0 and A1 can not be locked when using them together with the third (configurable) address line. The ZX81 hardware does react on all action with A0=0 or A1=0. The third address line can be choosed from A3/A4/A5/A6/A7 while the default is A3 resulting in possible io addresses $F4,$F5,$F6,$F7. Due to this circumstance I used a workaround while writing to internal registers using IN instructions like IN A,(C). This looks crazy but works reliable.
Here is a list of all used addresses and bound functions. Due to another restriction (available pins) registers can be written to with 4 bit size only while using address lines A12-A15. So as there are more registers to be used for configuration, there is a mechanism to change the target register (RAM register) to additional internal registers.
Code: Select all
OUT $FF (end vsync )
OUT $FE (NMI on)
OUT $FD (NMI off)
IN $FE (read keyboard)
...
IN $F5 (write to instance RAM register)
IN $F6 (write to instance ROM register)
IN $F7 (read USB)
OUT $F7 (write USB)
IN $FD (select internal register/switch instance RAM register)
$00=RAM instance register (switch instance RAM)
Bit 7 ($80) = switch off NMI control / ZXblast control
$70=ZXblast
$60=instance 1
$50=instance 2
$40=instance 3
$30=instance 4
$20=instance 5
$10=instance 6
$00=instance 7
$10=control register
bit 4=RAM active in area $2000-$3FFF
bit 5=A15 mirror on (restricted to 16k ROM/16k RAM)
bit 6=activate paging
bit 7=page size 16k (default 8k)
$20=ram layout register - activate RAM in main memory area (0=ROM, 1=RAM)
bit 4=$0000-$3FFF
bit 5=$4000-$7FFF
bit 6=$8000-$BFFF
bit 7=$C000-$FFFF
$30=page select register - for page 0-15
$00-$F0, 16 pages (8 or 16k depending on bit 7 of control register)
$40=page window address
$00=$0000
$10=$2000
$20=$4000
$30=$6000
$40=$8000
$50=$A000
$60=$C000
$70=$E000
bit 7=high bit of page select register to use page 16-31
$50=external memory register (switch off address are completely for compatibility)
bit 4=$2000-$3FFF
bit 5=$8000-$BFFF
bit 6=$C000-$FFFF