User Tag List

Страница 26 из 70 ПерваяПервая ... 222324252627282930 ... ПоследняяПоследняя
Показано с 251 по 260 из 699

Тема: SjASMPlus от z00m

  1. #251

    Регистрация
    22.05.2011
    Адрес
    г. Дзержинск, Украина
    Сообщений
    6,829
    Спасибо Благодарностей отдано 
    483
    Спасибо Благодарностей получено 
    663
    Поблагодарили
    513 сообщений
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Ped7g Посмотреть сообщение
    `my_other_aaa_label: db 1234` will become `my_other_"abcd"_label: db 1234` and the assembling will fail.
    про это нужно написать в инструкции

    это крайне большие грабли


    к примеру у меня все метки и переменные вида some_code_blah_blah_blah


    пока заменил название define на СИЛЬНО унинальное чтоб работало
    Последний раз редактировалось NEO SPECTRUMAN; 26.04.2020 в 16:36.

  2. #252

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

    По умолчанию

    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    про это нужно написать в инструкции

    это крайне большие грабли
    Yes, indeed. It was one of the first thing I reported to the sjasmplus guys before I started contributing to the project:
    https://github.com/z00m128/sjasmplus/issues/37

    Then I "fixed" it, actually in the wrong way, it has kinda funny history...

    There was some patch done by some guy with Russian-like nickname, to allow sub-word substitutions (I think around v1.04 or v1.07).

    Then somebody added test to verify the sub-word substitutions are working (doing like `call aaa_bbb` in the test)

    Then I asked about missing docs, because the code did contain some "this can't be correct" parts, and nobody could give me more info, so I fixed it.

    About month later I finally understood the original idea of the patch author, it was meant to replace inside-word only strings starting with underscore (i.e. your "define aaa ...." would be safe in his original idea). But he didn't document it, didn't add test, and he had bug in the code, so sometimes it did replace even "aaa" inside strings like "call aaa_bbb").

    And actually the old existing test was testing precisely the bug-state, which made it even harder to find+understand the original idea.

    Unfortunately I fixed it in the completely opposite way, "aaa" now does substitute inside-words reliably (not only when bug is triggered), and to prevent inside substitution you have to add underscore.

    lesson to take:
    - send patches only with idea description, and tests showing correct behaviour
    - or send patches without bugs

    I think I will rewrite this part completely for v2.x, but I don't want to mess with it for v1.x ... consider using `define _aaa "abc"` instead of `define aaa ...`?

  3. #253

    Регистрация
    11.01.2008
    Адрес
    Ладошкино
    Сообщений
    1,811
    Записей в дневнике
    4
    Спасибо Благодарностей отдано 
    386
    Спасибо Благодарностей получено 
    339
    Поблагодарили
    244 сообщений
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Собственно вот:


    Строки 636,637. Не компиилит
    Код из диз-асма IDA
    справа тот же код в Unreal-дебагере. с минусом - компилит, как ни странно
    в дебагере Спекулятора так:
    Код:
                    ld      (ix-$ffffff80), a
                    ld      (iy-$ffffff80), a
    так то жЕ не компилит. Это нормально?
    Profi v3.2 -=- Speccy2010,r2

  4. #254

    Регистрация
    22.05.2011
    Адрес
    г. Дзержинск, Украина
    Сообщений
    6,829
    Спасибо Благодарностей отдано 
    483
    Спасибо Благодарностей получено 
    663
    Поблагодарили
    513 сообщений
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от zebest Посмотреть сообщение
    Код из диз-асма IDA
    ну это кривизна иды
    она чота не детектит отрицательные смещения...

    - - - Добавлено - - -

    Ped7g, а можно в emptytrd добавить установку названия диска?
    указывается в байтах 245-252 8 сектора
    сейчас при создании там пустота...

    типа так
    EMPTYTRD "test.trd","FCKNDSCK"

    - - - Добавлено - - -

    так же напрягает вот это сообщение
    warning: zx.trdimage_add_file: invalid file extension, TRDOS
    extensions are B, C, D and #.:
    расширение у файла может быть любым


    так же сильно не хватает функции добавление в TRD hobeta файлов
    Последний раз редактировалось NEO SPECTRUMAN; 26.04.2020 в 19:51.

  5. #255

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

    По умолчанию

    Цитата Сообщение от zebest Посмотреть сообщение
    Строки 636,637. Не компиилит
    Код из диз-асма IDA
    Z80: "(ix+imm8)" and similar process the constant as `int8_t` (signed 8bit value), i.e. the valid range is (ix-128) to (ix+127).
    (ix+128) is invalid instruction.

    I guess the IDA does think the constant is `uint8_t` and disassembles like that -> needs fix on the IDA side.

    `ld (ix-$ffffff80), a` ... well... I can imagine how this happens (-128 in `int32_t` is encoded as $ff'ff'ff'80), but I really fail to see why assembler should support this, IMO it's disassembler bug too.

    The Unreal displays it correctly (in Zilog syntax), and sjasmplus does understand that too.

    I.e. "vsjo normalno" as far as I am concerned, I don't see anything ill about this.


    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    Ped7g, а можно в emptytrd добавить установку названия диска?
    I will take a look, sounds good to me, and EMPTYTRD has currently only single argument, so I could extend it without big syntax change. But... see the following point...


    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    расширение у файла может быть любым

    так же сильно не хватает функции добавление в TRD hobeta файлов
    I'm pretty sure I have seen some docs where those extensions were specified as valid ones (i.e. others are invalid).

    But... the main issue is, that I'm totally unfamiliar with TRD/hobeta, and pretty much all disk systems for ZX (I have been using back in 199x era only TAP files and Didaktik D40 (D80), and I have seen Busy's MB-02 with BDOS). I have never seen TRD/beta/esxdos/... machines before I returned a bit to ZX world due to Next. And the Next itself has NextZXOS based on +3DOS ("+3e") with esxdos compatibility layer and I think all of this is somewhat divMMC inspired/partially compatible? I don't understand this either.

    All of these systems are considerably complex (not a 10min read to become expert on them), plus all of them seem to be closed source, and technically not very impressive (compared to MB-02), so I'm learning about them only very slowly and reluctantly, mostly trying to avoid them as much as possible. And it doesn't help the best docs seems to be often in Russian language, slowing my progress further.

    So, don't expect miracles from me - if you want TRD/hobeta support improved in sjasmplus, better provide really very detailed and precise info (like the info about disk name), ideally with some links to official system documentation, so I can double-check everything... or even better, prepare pull request with code changes and tests.

    I'm always afraid to touch this part of sjasmplus, as I don't know how to test final result (like using the TRD image on real machine or emulator) and the code is not even well covered with automated tests.

    So, if you give me simple and precise info, how to fix/improve something, or even write the code, I will try to help you. But outside of that these disk systems are not interesting for me.

  6. #256

    Регистрация
    22.05.2011
    Адрес
    г. Дзержинск, Украина
    Сообщений
    6,829
    Спасибо Благодарностей отдано 
    483
    Спасибо Благодарностей получено 
    663
    Поблагодарили
    513 сообщений
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Ped7g Посмотреть сообщение
    (ix+128) is invalid instruction.
    ошибка ошибкой и ее нужно сообщать
    но компилировать нужно при этом правильно $80...$FF
    правда я не проверял как такое компилирует sjasm

    - - - Добавлено - - -

    Цитата Сообщение от Ped7g Посмотреть сообщение
    I'm pretty sure I have seen some docs where those extensions were specified as valid ones (i.e. others are invalid).
    это окаменевшие документы

    злые русские используют и .J для jpg
    и .H и .P и .S и .M


    ну и я использую .S для SID-ов

    вместо каких то документов вот скриншоты


    а тут видно более активное использование расширений


    конечно их нельзя копировать средствами примитивного интерфейса tr-dos

    но кому этот каменный век нужен?
    когда можно так


    Последний раз редактировалось NEO SPECTRUMAN; 27.04.2020 в 03:57.

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

  8. #257

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

    По умолчанию

    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    правда я не проверял как такое компилирует sjasm
    Код:
    Main.asm(11): error: Offset out of range (+128)
     11   6000 DD 77 80         ld  (ix+128),a
    Main.asm(12): error: Offset out of range (+255)
     12   6003 DD 77 FF         ld  (ix+255),a

    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    это окаменевшие документы

    злые русские используют и .J для jpg
    и .H и .P и .S и .M
    If they are the only available documents, then it's maybe good time for somebody to do some grooming, and update some public docs. If the implementation is not open, at least docs should be kept up to date.

    Of course I didn't hunt too hard for most-current correct docs, so maybe I just missed the correct place for them. Or maybe you are just using the TRD outside of its specs (that would sound a bit stupid if it would be like modern system, but as I guess the TRD world is petrified "as is", there's not much downside to exploit, except risking error message from sjasmplus which tends to go by docs instead of reality :P ).

    I will take a look on the bad-extension message, if it's error, I will turn it down to warning and make it suppress-able by "; ok" comment then. I added it as issue #101 https://github.com/z00m128/sjasmplus/issues/101 ... when it's closed, it's done in source (and will be in next release).

  9. #258

    Регистрация
    22.05.2011
    Адрес
    г. Дзержинск, Украина
    Сообщений
    6,829
    Спасибо Благодарностей отдано 
    483
    Спасибо Благодарностей получено 
    663
    Поблагодарили
    513 сообщений
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Ped7g Посмотреть сообщение
    So to redirect the errors into log file use "sjasmplus file.asm 2> log.txt" (at least in linux/bash, not sure if this works in windows and in which shell, google how to capture STDERR in your shell, if the "2>" doesn't work).
    но так не сохраняются сообщения от lua

    и все таки при компиляции
    постоянно нужна пауза для отладки
    в lua тоже

    крайне тяжело отлаживать генерацию таблиц
    когда выводимые значения постоянно проскакивают
    большая их часть потом теряется
    в log это не выводиться
    куча посторонних сообщений

    нужна пауза во время компиляции
    которую ставить прямо в коде
    чтоб можно было в пошагов режиме проверять вот такое


    - - - Добавлено - - -

    в принципе полез
    и изменил размер буфера для командной строки

    но все равно пошаговый режим постоянно нужен

    тк нужно ждать по 17 секунд пока закончиться компиляция
    перед тем как лог можно будет начать смотреть
    Последний раз редактировалось NEO SPECTRUMAN; 10.05.2020 в 16:30.

  10. #259

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

    По умолчанию

    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    но так не сохраняются сообщения от lua
    ? Hm, works for me?

    Код:
        LUA PASS3
            io.stderr:write(string.format("write to stderr %d\n", 123))
        ENDLUA
    (obviously you must write to STDERR, if you are capturing STDERR)

    But I still completely don't understand why you "debug" the tables by looking at assembler output, I find that really cumbersome and difficult to do, I would personally never do that...

    I would just emit data file with the values (maybe having simple switch in code to emit either binary or ASCII data) and then use the hexa editor or diff to compare the data with expected results, after the assembling is done. How often do you need to debug table generator? I would expect to do it once correctly, and never look back, until some bug happens.

    Also if you are interested into the stdout output for lua printouts, you can still capture the regular ">" stdout along with stderr "2>", just use different file, or `tee` command to copy it both to file and to output.

    But I mostly think you should move your "debugging" from assembling time to checking the actual results.

    About 19s compilation ... and checking logs.... but that looks like you are building whole disk image, why don't you split that task to two, building just player + tables, quickly, then adding hundreds of sid files using the output from previous step, if you want to make full-build.

    Overall I don't know enough details about your projects to fully understand what you are doing, and if I understand you correctly, but I believe it should be possible to break your tasks a bit more and have better times...

    The "invalid extension" warning will be suppress-able in next v1.15.0 with the "; ok" comment.

  11. #260

    Регистрация
    22.05.2011
    Адрес
    г. Дзержинск, Украина
    Сообщений
    6,829
    Спасибо Благодарностей отдано 
    483
    Спасибо Благодарностей получено 
    663
    Поблагодарили
    513 сообщений
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Ped7g Посмотреть сообщение
    But I still completely don't understand why you "debug" the tables by looking at assembler output, I find that really cumbersome and difficult to do, I would personally never do that...
    а как делать по другому?

    смотреть на результат нет смысла
    так как видно только факт наличия ошибки
    но не видно где и как она возникает

    а так я вывожу в строку все переменные
    и смотрю на каком этапе все идет не так как задумано

    - - - Добавлено - - -

    Цитата Сообщение от Ped7g Посмотреть сообщение
    How often do you need to debug table generator?
    я часто так отлаживаю таблицы

    + часто у меня таблицы с параметризацией
    и могут меняться в зависимости от других настроек

    я стараюсь рассчитывать все таблицы средствами sjasm
    чтоб при необходимости их корректировать
    не было необходимости пересчитывать их сторонними средствами

    - - - Добавлено - - -

    Цитата Сообщение от Ped7g Посмотреть сообщение
    but that looks like you are building whole disk image, why don't you split that task to two, building just player + tables, quickly, then adding hundreds of sid files using the output from previous step, if you want to make full-build.
    я делаю релиз в несколько шагов

    но для отладки образ должен быть получен максимально быстро
    поэтому я сразу добавляются все нужные файлы

    выглядит так

    я что то меняю
    компилирую
    и сразу смотрю как это работает

    а не так

    меняю
    компилирую
    открываю редактор трд
    перекидываю файлы
    и только потом смотрю
    при этом забыв что я и для чего я менял до этого

    конечно добавление файлов в trd можно автоматизировать
    но у меня нет на примете такой программы

    - - - Добавлено - - -

    Цитата Сообщение от Ped7g Посмотреть сообщение
    (obviously you must write to STDERR, if you are capturing STDERR)
    а я вывожу простым print()
    такое нельзя выводить в лог?

    чтоб не расписывать длинное io.stderr:write

    - - - Добавлено - - -

    Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
    + часто у меня таблицы с параметризацией
    и могут меняться в зависимости от других настроек
    например в начале исходника у меня часто такое

    Код:
    border = 254			; Bits 5 and 3-0 hold border colour (output)
    keyboard = 254			; Main keyboard matrix (input)
    
    						lua allpass
    	ay_frq = 1750000	-- 1750000 pentagon
    				-- 1773450 128	
    				
    	zx_int_frq = 50
    						endlua
    и часто в больших количествах
    Последний раз редактировалось NEO SPECTRUMAN; 10.05.2020 в 17:24.

Страница 26 из 70 ПерваяПервая ... 222324252627282930 ... ПоследняяПоследняя

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

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

Эту тему просматривают: 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

Ваши права

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