Войти в систему

Home
    - Создать дневник
    - Написать в дневник
       - Подробный режим

LJ.Rossia.org
    - Новости сайта
    - Общие настройки
    - Sitemap
    - Оплата
    - ljr-fif

Редактировать...
    - Настройки
    - Список друзей
    - Дневник
    - Картинки
    - Пароль
    - Вид дневника

Сообщества

Настроить S2

Помощь
    - Забыли пароль?
    - FAQ
    - Тех. поддержка



Пишет nancygold ([info]nancygold)
@ 2024-07-10 01:26:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Entry tags:computing

Dumping More and More
Okay. I have successfully dumped the VOC files.
It was a bit confusing since Hz parameter had really strange values.
But that is because they were decoded using the following function:

uint16_t stshDecVocSampleRate(uint8_t encfreq) {
  return 1000000 / (0x100 - encfreq);
}


Why VOC encoded the sample rate as a byte?
No idea. Maybe early Sound Blaster had single byte registers.
Or it was easier to have single byte timings.
In any case, that results in lose of precision.
Therefore 11111Hz instead of 11025Hz.

Some VOC authoring software stored filename and a comment inside the audio data section.
That results into a thud sounds preceding the proper audio signal.
Apparently nobody noticed it due to the low quality of the early audio.

Surprisingly no modern audio player supports VOC files,
despite them being the standard during 90ies.
Later versions also support 16bit audio.

The *.com files for audio drivers are also packed inside STRONG.DAT.
Still have to research how these get loaded and run.

Anyway, I'm now proceeding to properly naming the sprites.
That isn't hard but requires parsing the entity types.
Since file ids for animation LBMs are stored inside types.
Portrait file ids also reside inside the entity type.
Entity types are large 149-byte structs.
These build upon the assets system and form the core of the game.
The game manual also doesn't list any stats for the unity types.
So I have no idea which value is max health and which is move speed.

I'm probably the first person after Cathryn who looks at these.
Since the game FAQs don't have any unit stats either.
Although people do know there is the "debug" option.
So either somebody disassembled the game's main or it was published on the game's BBS.
And they apparently successfully got through the overlay manager.
Since the "debug" option handler lies inside the overlayed code.
That means they used a live debugger.

The actor entities are differentiated from the static entities.
I.e. buildings and scenery have they own entity types.
That is a bad design, leading to combinatorial explosion.
Then again, universal entity types requires proper ECS.
Unsure how challenging will be implementing ECS for 286.



(Добавить комментарий)


(Анонимно)
2024-07-10 14:53 (ссылка)
>Unsure how challenging will be implementing ECS for 286

Are you planning to eventually build it for ancient 16 bit dos? Why? Why not port it to vulkan or at least SDL, like all these HoMM, RedAlert opensource engines do?

(Ответить) (Ветвь дискуссии)


[info]nancygold
2024-07-10 19:33 (ссылка)
I don't have any goals, outside of wasting some time.

(Ответить) (Уровень выше)

Рак за руку грека ЦАП
[info]necax
2024-07-10 16:24 (ссылка)
Томущо это вообще энум аппаратно, ибо клок у DAC не непрерывный

> a thud sounds preceding the proper audio signal
Для борьбы с финиш мгимо и ликбеза рекомендую вкатиться на Курсере в DSP в Matlab. Так-то характерный пук в начале потока даёт постоянная составляющая на диффузор. Я бы взял эталонные файлы у Archive Team и проверил

(Ответить) (Ветвь дискуссии)

Re: Рак за руку грека ЦАП
[info]nancygold
2024-07-11 10:28 (ссылка)
>Я бы взял эталонные файлы у Archive Team и проверил
I opened a few voc in hex editor, and they had file name in the audio data chunk.
For example,
http://cd.textfiles.com/vgaspectrum/sound/voc1/ahh.voc

(Ответить) (Уровень выше) (Ветвь дискуссии)

Re: Рак за руку грека ЦАП
[info]necax
2024-07-11 13:29 (ссылка)
> file name in the audio data chunk
Pretty normal given Creative Inc. (or LLC or GMbH or whatever) they had 0.5 decades of monopoly @ IBM PC market
thanks William Herny Gates III is only 8.3 name can be stuffed within the file data


BTW, decoder by VLC project is producing that constant current 'puck sound' at the end of the stream</b> right here as well (RTL ALC272)

(Ответить) (Уровень выше)