User Tag List

Показано с 1 по 10 из 699

Тема: SjASMPlus от z00m

Комбинированный просмотр

Предыдущее сообщение Предыдущее сообщение   Следующее сообщение Следующее сообщение
  1. #1

    Регистрация
    21.01.2011
    Адрес
    г.Кстово
    Сообщений
    703
    Спасибо Благодарностей отдано 
    8
    Спасибо Благодарностей получено 
    5
    Поблагодарили
    4 сообщений
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    In my project I have much text data (text dialogs). They not very big at once (may be 200b-3K for block), but their count big enough. And for each I need label to print text to screen. If I will use incbin, this would need for 500+ files to include.

    I could wrote fulltext parser to get labels from text, but then I would have to solve problem where to store this labels and how to name them.
    Последний раз редактировалось Demige; 24.07.2019 в 18:09.
    Zx-Evolution rev.c
    ZS Scorpion 1024K rev.2013

  2. #1
    С любовью к вам, Yandex.Direct
    Размещение рекламы на форуме способствует его дальнейшему развитию

  3. #2

    Регистрация
    26.11.2013
    Адрес
    г. Новосибирск
    Сообщений
    1,104
    Спасибо Благодарностей отдано 
    1,349
    Спасибо Благодарностей получено 
    323
    Поблагодарили
    152 сообщений
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Demige, а что если попробовать на LUA написать аналог INCBIN. Назвать его INCTEXT. Пусть он работает так же как INCBIN, но строки текста заканчивающиеся особым знаком превращал в метки.
    Тогда подсунув ему такой текст в файле Messages.txt:
    Код:
    Label1>>
    Supertext 
    Message1>>
    Game over!
    Вызвав INCTEXT "Messages.txt",">>"
    Он создаст две метки для двух текстов.

    Этот пользователь поблагодарил Reobne за это полезное сообщение:

    Demige(25.07.2019)

  4. #3

    Регистрация
    10.05.2019
    Адрес
    Prague, Czech Republic
    Сообщений
    229
    Спасибо Благодарностей отдано 
    51
    Спасибо Благодарностей получено 
    103
    Поблагодарили
    77 сообщений
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Demige Посмотреть сообщение
    In my project I have much text data (text dialogs). They not very big at once (may be 200b-3K for block), but their count big enough. And for each I need label to print text to screen. If I will use incbin, this would need for 500+ files to include.

    I could wrote fulltext parser to get labels from text, but then I would have to solve problem where to store this labels and how to name them.
    I see, ok, this is the kind of stuff which makes big-text seem more important than I expected.

    Some notes about possible workarounds with current sjasmplus version:

    You can process data in device memory (reading them with { address } operator), but you can't easily build dynamic labels name from that, and values from memory can be read only in pass3, so the INCBIN+MACRO+DEFINE path would be very difficult to create some workaround, and it would probably not work well = unless I'm overlooking something, this is wrong approach.

    Lua can add symbols (labels) (build dynamically, from file content for example) and can add bytes to the output (at least according to docs, I don't have these covered in tests, so you may find new bugs if you will try these, reporting them with example.asm will help me a lot). And there's probably a way in Lua to open text file and parse it, so you can implement your own INCTEXT as Reobne suggested, seems like good idea and should very likely work well (unless you run into some bug in sjasmplus). If you will go this route, and run into some problems, let me know, so we can fix it all.

    Finally is the classic DB way *that* bad for these things?
    Код:
    Dialog1:
      db "Hi", 13, 13
      db "Some text.", 13
      db "Next line.",0
      ; to get zero terminated text with ZX enter=13 newlines
    Depending on your workflow and where the devtime is mostly spent, having external .txt file processed by lua may even bring some productivity boost and may make it easier for non-programmer people to contribute to your project, so the Lua workaround sounds to me quite good, maybe even better than native support for big-text blocks from sjasmplus, but it's more initial work to get that setup working.

    (would be also nice example of lua usage, if you want to share it afterwards , I can add it to the project tests/luaexamples)
    Последний раз редактировалось Ped7g; 25.07.2019 в 05:00.

    Этот пользователь поблагодарил Ped7g за это полезное сообщение:

    Demige(31.07.2019)

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Похожие темы

  1. SjASMPlus Z80 кросс ассемблер
    от Aprisobal в разделе Программирование
    Ответов: 1663
    Последнее: 19.06.2021, 01:36
  2. Исходники TR-DOS для SjASMPlus
    от Keeper в разделе Программирование
    Ответов: 20
    Последнее: 11.02.2011, 11:57
  3. Запуск STS из .sna, сгенерированного sjasmplus.
    от siril в разделе Программирование
    Ответов: 7
    Последнее: 11.10.2010, 21:33
  4. Breakpoints в связке Sjasmplus+UnrealSpeccy
    от Kurles в разделе Программирование
    Ответов: 19
    Последнее: 26.01.2009, 12:36
  5. Disturbed COverMAnia ( music disk with z00m music collection)
    от kyv в разделе Музыка
    Ответов: 10
    Последнее: 27.03.2008, 10:01

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •