+ uint8_t *lockbits;
+ uint16_t locked_bytes_per_bit;
+ dynamic_lock_area_t *lock_area;
+
+ if (byteno < TOPAZ_STATIC_MEMORY) {
+ lockbits = &topaz_tag.data_blocks[0x0e][0];
+ locked_bytes_per_bit = 8;
+ } else {
+ lock_area = get_dynamic_lock_area(byteno);
+ if (lock_area == NULL) {
+ return false;
+ }
+ locked_bytes_per_bit = lock_area->bytes_locked_per_bit;
+ byteno = byteno - lock_area->first_locked_byte;
+ lockbits = &topaz_tag.dynamic_memory[lock_area->byte_offset - TOPAZ_STATIC_MEMORY];
+ }
+
+ uint16_t blockno = byteno / locked_bytes_per_bit;