Review of ports for the Chloe project ------------------------------------- (1) collection of current state: $xxFF %1111.1111 nothing selected in($FF) -> read/spy screenbyte read by ula out($FF) -> no action (snow?) $xxE7 %1110.0111 IF1 microdrive data i/o $xxEF %1110.1111 IF1 rs232 and microdrive control i/o $xxF7 %1111.0111 IF1 rs232/net i/o $xxFB %1111.1011 ZX Printer status/control i/o $xx7F %0111.1111 Fuller joystick i/- $xx3F %0011.1111 Fuller AY reg. select/read i/o $xx5F %0101.1111 Fuller AY write -/o $xx1F %0001.1111 Kempston joystick i/- $EFFE %1111.1110 Sinclair1 joystick i/- (simulates keys) $F7FE %1111.1110 Sinclair2 joystick i/- (simulates keys) $xxF5 %1111.0101 TS2068 AY reg. select/read i/o $xxF6 %1111.0110 TS2068 AY reg. write -/o $xxFE %1111.1110 ULA i/o in($nnFE) nn = sel. keyboard rows -> %765kkkkk k = key, 6 = ear out($FE),%76543bbb bbb = border color, 3,4 = ear,mic $7FFD %0111.1111.1111.1101 ZX128 memory control -/o $FFFD %1111.1111.1111.1101 ZX128 AY reg. select/read i/o $BFFD %1011.1111.1111.1101 ZX128 AY reg. write -/o $1FFD %0001.1111.1111.1101 ZX+3 add. memory control, disk, par. control $2FFD %0010.1111.1111.1101 ZX+3 FDC status i/- $3FFD %0011.1111.1111.1101 ZX+3 FDC data i/o // proposed for new SIO and PIO: // $8FFD %1000.1111.1111.1101 PIO data // $9FFD %1001.1111.1111.1101 PIO control // $AFFD %1010.1111.1111.1101 SIO data // $BFFD %1011.1111.1111.1101 SIO control (2) summary of current state Bit 0 traditionally selects the ULA. If you replace the ULA, this bit should be first choice to use too. For providing the old functions you must do it in any case. Port should not react to out($F6) which is AY on TS2068. Bit 1 traditionally selects the memory control. If you replace/enhance it, this is the first choice to use too. For providing the old functions you must do it in any case. Port should not react to out($F5) which is used for AY on TS2068. Bit 2 is tabu if you want to maintain support for the ZX printer. Bit 3 and 4 are used by the interface 1. so they should be tabu too. Bit 4 is used by AY on TS2068 too. Bit 5, 6, and 7 are used by the Kempston joystick interface and by the Fuller box for joystick and AY. Kempston address decoding is overall problematic. But as long as we do not use a port with bits 5, 6, and 7 all 0 it should be ok. Fuller box can be ignored because we have a built-in AY chicp and joysticks. (3) conclusion on free ports therefore the following addresses are free to use: %xxx1.1110 for ula stuff %xxx = %000 not used wg. kempston %xxx = %111 traditional functions %xxx1.1101 for memory control stuff %xxx = %000 not used wg. kempston %xxx = %111 traditional functions %xxx1.1111 any new fancy stuff %xxx = %000 not used wg. kempston %xxx = %111 not used wg. ula, mem.ctrl. (4) review of current port proposals OUT D7 to $7FFD control processor speed -> maybe ok (though not memory related!) OUT D6 to $7FFD map ram to bank 0 -> ok OUT to $1FFD control major ram page range -> collides with +2/+3 (mem.ctrl., disk motor, par. port strobe) why do you give up disk dos compatibility with +2/+3? the FDC stuff could stick at the usual addresses! OUT to $xxFC controls video hardware. -> bit 0 active for ULA, good collides with AY addressing, which can be bypassed. collides with memory control :-((( ditto. collides with +2/+3 FDC access and par.port strobe => it would be better to use an additional bit from 5-7 MIDI: which port is the midi port? IF1 RS232? probably not. data port A of the AY chip? this is the parallel port, isn't it? data port B of the AY chip? this is not connected on the ZX 128. please let me know! i need this info anyway. YM2203: Why replace the AY chip, if you attach the midi chip? PS-2 keyboard: How do you plan to attach it? micro controller? (probably, the ULA replacement tingy) we need a classic mapping of the keyboard to port $FE! Kempston Mouse: In $FBDF, $FFDF, $FADF. this occupys bit A6. this could be ok. BUT: it seems, that the coordinate range is limited to 0...255 in both X and Y direction. This is no problem with the current screen size but will make us weep in the new highres modes!!! we'll need either a serial port 1200 bps afaik for PC mice or a silly 6 bit (8 bit) input port for Atari / Amiga mice. IF2 Joysticks: maybe the easiest way, but Kempston is much more supported by games. as the original Kempston interface has so much problems with address decoding, an internal Kempston interface would be a good deal. also games which only support Kempston may have functions on keys 'pressed' by the IF2 joysticks. So IF2 joysticks as first choice is probably bad! How many 2 player games _require_ IF2 joysticks? (5) new proposals $xx1F joystick, kempston type. i really prefer this! ula port (bit 0 low): $xx7E select ULA register $xxBE read/write ULA register w/ auto increment one of the 'misc' ula registers includes the z80 speed bit mouse, keyboard: undecided. state could be mapped into ULA registers. we'd need a dual sio for them, which needs no address in the z80 i/o address space if we control it from the new ULA. maybe the micro controller has some serial features? memory port (bit 1 low): $0FFD %1111.1101 major ram page control; should be readable $7FFD %1111.1101 ZX128 memory control -/o $FFFD %1111.1101 ZX128 AY reg. select/read i/o $BFFD %1111.1101 ZX128 AY reg. write -/o $1FFD %1111.1101 ZX+2/+3 add. memory control, disk, (par. control) $2FFD %1111.1101 ZX+2/+3 FDC status i/- $3FFD %1111.1101 ZX+2/+3 FDC data i/o