I've been building a Z80 computer lately and had an idea for a device i'd like to put on the data bus which requires a latch. I'd like an 8-bit latch that I can write to and read from as an IO port. So the data pins need to be I/O with enable pins. But I also need it to have normal output pins for the state so I can use the stored state in other circuitry. For simplicity, assume they are switching some LEDs to show the current state. It also needs to have a clear pin so I can reset on CPU reset.
I can handle the address decoding and enable signals well enough, but finding a latch that 1. can be read back from, 2. also has normal state output and 3. is re-settable has been quite difficult. With the Z80 I also have to deal with 5V TTL levels as well. While i'm trying to use DIPs to stay vintage I'm open to SMT packages.
The perfect chip I found is the 74als666, however it basically doesn't exist anymore. TI lists it as active but it is only available in backorder / large quantities (well large for a hobby). Mouser has a grand total of 1 in stock and I'd like to have a few. Are there any alternatives? I haven't really found any. The alternatives I found either don't support read-back or don't have a clear flag. The closest I've found is the 74ABT843. Not quite the same, 9-bits instead of 8 but I think it might work. I've not worked with the ABT logic family but the logic levels look ok.
I thought about using some GALs as I have some 22v10 and 16v8s but they don't have enough IO pins. I need 8 tri-state pins to drive the data lines for reading and 8 pins to drive other circuitry. I could do a multi-chip solution with a tristate buffer but everything is so close to being a single-chip solution that I haven't switched to that.
Any thoughts over some other options I may be missing? It seems like a simple idea to have an 8-bit IO register connected to a bus but also with normal outputs. I feel like I have to be missing something.