For speed we sometimes pointed the stack at graphical data we wanted to read because the POP (grab data from the stack) was very quick and the stack pointer incremented automatically.
The problem with this technique was that when an interrupt occurred it would dump a return address on the stack which just happened to be an arbitrary place in the games graphics data.
Mike invented the idea of creating a sort of checksum for each page (256 bytes) of data. Basically the all the first bytes in each page would be XOR'd together, all the second bytes and so on.
When the data was corrupted it was a simple matter of replacing the two bytes. You'd recalculate the checksum with Zero in place of the corrupted bytes and XOR that with the originally calculated checksum and you magically have your data back. Interrupts only occurred once per frame (50hz) so this was quite practical.
как я понял постоянная проверка контрольной суммы блока где лежит вся графика и коррекция байтов при ситуации когда стек находится в граф.данных и соответственно туда впечатывается адрес возврата при im2
в качестве небольшого бонуса.
Ste Pickford осваивает граф.редактор DPaint на Амиге
![]()





Ответить с цитированием