52Fermer54
blastarLe 21/04/2021 à 10:00
hi, I tested TeoT some time ago, it's very impressive!

using 16bit values is a bit tricky.
the port ($320000/REG_SOUND) only accepts 8bit values, so there must be 2 writes for the lower and the higher byte... between this writes you have to wait to give the z80 time to process the input... I don't know how practicable this is in time-critical moments. much more critical: if even one byte is lost, everything could get messed up.
I'm not sure but I don't think any of the commercial sound drivers work with real 16bit values.

there are different solutions to avoid this limitation:
- two bytes: 1st) type of next value (control command, FM, sample etc) -> 2nd) real value (will not work for your project)
- situation-based sample lists: switch between lists containing generic (main character) and special (level dependent) samples. you can of course also change the list for each sample so this solution would be very close to a 16bit variant.

the solution with different samplelists would probably be the easiest to implement. currently the commands 0x04-0x10 would still be available...so 8 bank should be feasible. however, it is important that the switch-command is not lost or the wrong samples will be played. 8 x 224 = support for up to 1792 sound commands! smile