More than 8 ToadTogs
Posted: Fri Jan 30, 2004 9:55 pm
I'm looking for a memory efficient way to get more than 8 ToadTog bits. (Currently, using nested Toadtogs, I've got three bits holding 8 states, effectively giving me 13 Toadtog bits, but it's awfully expensive on macro/keymove memory.)
I'm wondering if multiple ToadTog devices with sequential setup codes, e.g., MISC 1800, MISC 1801, etc., all assigned to the same protocol would "do the trick". That protocol would compute the correct ToadTog storage register using the setup code in 3rd/4th byte of the keymove. The memory impact should be minimal (assuming the setup code is readily accessible). Of course, this approach also assumes there are one or more unused registers available for additional ToadTog status storage.
At this point, it's not clear from reviewing the 8910 (and other) extender code in which register the device setup code would be found. (8910.ex1 indicates that, for keymoves, only the 1st 3 bytes and the 5th byte onward are retrieved and held in registers.)
I'd welcome any comments/suggestions on the approach and if anyone knows in which register the setup code is stored and if it's still there after the protocol is loaded into RAM, please tell me.
Edit: Just realized that each device index has its associated setup code stored in the lower part of Eeprom. So, if the setup code is not already in a register, I should be able to get it using the device index in the first nibble of W03. I'll test on that basis. Comments still welcome.
I'm wondering if multiple ToadTog devices with sequential setup codes, e.g., MISC 1800, MISC 1801, etc., all assigned to the same protocol would "do the trick". That protocol would compute the correct ToadTog storage register using the setup code in 3rd/4th byte of the keymove. The memory impact should be minimal (assuming the setup code is readily accessible). Of course, this approach also assumes there are one or more unused registers available for additional ToadTog status storage.
At this point, it's not clear from reviewing the 8910 (and other) extender code in which register the device setup code would be found. (8910.ex1 indicates that, for keymoves, only the 1st 3 bytes and the 5th byte onward are retrieved and held in registers.)
I'd welcome any comments/suggestions on the approach and if anyone knows in which register the setup code is stored and if it's still there after the protocol is loaded into RAM, please tell me.
Edit: Just realized that each device index has its associated setup code stored in the lower part of Eeprom. So, if the setup code is not already in a register, I should be able to get it using the device index in the first nibble of W03. I'll test on that basis. Comments still welcome.