Важная информация

User Tag List

Страница 29 из 29 ПерваяПервая ... 2526272829
Показано с 281 по 287 из 287

Тема: SjASMPlus от z00m

  1. #281
    Member
    Регистрация
    10.05.2019
    Адрес
    Prague, Czech Republic
    Сообщений
    103
    Спасибо Благодарностей отдано 
    14
    Спасибо Благодарностей получено 
    37
    Поблагодарили
    26 сообщений
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Yes, since core 3.1.5 (Next OS "distro" 1.3.2) the port $0B is only ZilogDMA mode, port $6B is only zxnDMA mode. The previously used config bit in NextReg 06 is now used for beeper configuration, not related to DMA any more.

    The SW from Velesoft page should NOT work well with $6B (zxnDMA), there's not much point to even try that, the $0B port has better chance.

    But there is one more issue with SW from Velesoft page. There's lot of CZ/SK community production, done with the UA880d DMA chip (East Germany clone of Zilog DMA chip), which does *NOT* react to the "WR3.enable" bit.

    And by some unfortunate coincidence, lot of the early DMA SW does set this bit to "1" half-way into the init, there was even article in Czech paper magazine describing how to program DMA on ZX, which did contain the same bug writing to WR3.enable early.

    But the original Zilog DMA and some other clones (*and* the FPGA implementation in ZX Next) do react to the WR3.enable, and will start the transfer (as if DMA_ENABLE $87 command was sent to WR6).

    This issue was identified and known by the cz/sk community few years later after the first versions, and later versions of MB-02 disk system BIOS were patched to work correctly even with original Zilog chips, also some demos were patched, but I'm not sure if somebody did review all the SW on Velesoft page and mark which contain the WR3 bug and which is compatible with Zilog chip.

    If you have SW which does work with original Zilog chip, and does use port $0B, and you did select the correct video timing of your Next (of course you need VGA mode, not HDMI) to simulate zx48/128/+3 machine, then I would expect most of the old demos to work correctly, the 48/128/+3 timings of Next are quite accurate AFAIK (demos doing multicolors like Shock work usually pixel perfect, there were few pieces like muco1k from Busy which were not completely correct on Next the last time I have seen it (back in early 2018), but it was not completely clear if muco1k is correct on real HW, as Busy did use emulator to tune the timing ... I'm not sure if somebody managed to do proper test of it, real HW vs Next HW and after all the timing fixes were applied to Next)

    Actually, looking at (incomplete) changelog of Next core ( https://gitlab.com/SpectrumNext/ZX_S...t/changelog.md ) there was small fix to timing even in core3.1.0, so I guess nobody did run side by side HW vs Next for these demos which are so critical on the timing accuracy.

    So any precise input from people who can do the tests is welcome, but make sure you fully understand the complexity of Next setup and that you are testing in the correct mode and correct thing (with the extra bonus of some intros like muco1k containing machine-detection code, so it's better to avoid that and load the correct version explicitly, as the detection code may fail to pick the correct model too.

    In ideal world it should be on Next (running with VGA mode at 50Hz) as easy as to select your video timing (48 / 128,+2 / +2A,+2B,+3 / Pentagon) and ROMs (this is what the TAP and SNA loader does, with TAP loader displaying menu to select the machine configuration by user, SNA reads snapshot type and modifies the HW config automatically based on the type), and just run the SW and all should work.

    If it does not work correctly, and you can identify what is failing, please report it to the Next team, it's important piece of information. But it's also very tricky to find the true reason where is the problem, as there are many details contributing to the final result, as you can see from this post (it was supposed to be short 2-3 sentence post, and it's whole page instead, argh).

    - - - Updated - - -

    So, I downloaded the dma-demo-level_1.zip from velesoft page, added debug printf into ZESERUse (fork of ZEsarUX) to print every byte going to DMA port and this is the init sequence:

    ($0B) = $C3 RESET
    ($0B) = $C7 RESET port A
    ($0B) = $CB RESET port B
    ($0B) = $7D WR0 + port A adr + length, A->B, transfer
    ($0B) = $21 A.adr = 0x4021
    ($0B) = $40
    ($0B) = $BE length = 0x07BE
    ($0B) = $07
    ($0B) = $14 WR1, A++, memoryA
    ($0B) = $10 WR2, B++, memoryB
    ($0B) = $C0 WR3, enable=1
    DMA Transfer with mode 0 (single byte) requested - ignored
    ($0B) = $AD
    ($0B) = $20
    ($0B) = $40
    ($0B) = $82
    ($0B) = $CF
    ($0B) = $B3
    ($0B) = $87
    ....

    I added comments from beginning to the WR3 write, which wrongly enables the transfer (prematurely, before the DMA_LOAD command). So the demo works only on the UA880d cloned chip, which ignores this WR3 write.

    If you are bored, you can try to disassemble the demo and find the init sequences and turn $C0 into $80 in each of them (writes all-zeroes to WR3, which is actually important on real Zilog DMA, because it somehow affects timing without the write to WR3 - it's still a bit mystery why/how, as the other bits are related to interrupts/etc which is not used on MB-02 + Zilog DMA, but by testing with real HW we did find that writing explicit zero to WR3 somehow makes the machine timings more stable).

    But at this moment, Next with it's Zilog DMA emulation, can't run the SW which has the WR3.enable bug correctly, there's no such option on Next.

  2. #282
    Member
    Регистрация
    10.05.2019
    Адрес
    Prague, Czech Republic
    Сообщений
    103
    Спасибо Благодарностей отдано 
    14
    Спасибо Благодарностей получено 
    37
    Поблагодарили
    26 сообщений
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    https://github.com/z00m128/sjasmplus...es/tag/v1.15.0

    v1.15.0 changelog:
    * added `BPLIST` and `SETBP` to export breakpoints info from asm for Unreal and ZEsarUX emulators
    * added ZX-like devices with 2/4/8 MiB of virtual memory
    * the fake-sysvars/state of ZXSPECTRUM48/128/... devices reworked, moving stack down by default
    * behaviour of `--fullpath` option unified across all platforms and compilers
    * `DEFARRAY` has new operator `[#]` to retrieve current size of array.
    * `MMU` has new optional third argument to set also address (like `ORG`)
    * use of forward reference in `IF`/`IFN` emits only warning, and can be suppressed
    * internal Lua updated to 5.1.5 (last official 5.1 version)
    * STDIN can be read multiple times (per each "-" argument)
    * new macro/lua examples: `sj_sysvars.i.asm`, `section.asm`, `lua_sin_table.asm`, `union_like_structures.asm`
    * RAM limit exceeded warning/error reworked to report with more sense, fixed bug with missing labels
    * `SAVETRD` warning about invalid extension can be suppressed by "; ok"
    * `EMPTYTRD` takes as second argument disc label
    * added `--outprefix` option to prefix any output-directive filename (issue #102)

    Enjoy.

  3. Эти 3 пользователя(ей) поблагодарили Ped7g за это полезное сообщение:

    Dart Alver (19.05.2020), NEO SPECTRUMAN (19.05.2020), zebest (19.05.2020)

  4. #283
    Guru Аватар для NEO SPECTRUMAN
    Регистрация
    22.05.2011
    Адрес
    Дзержинск
    Сообщений
    4,034
    Спасибо Благодарностей отдано 
    154
    Спасибо Благодарностей получено 
    220
    Поблагодарили
    181 сообщений
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Ped7g Посмотреть сообщение
    * internal Lua updated to 5.1.5 (last official 5.1 version)
    ВНЕЗАПНО adp полностью пережил переход на новую версию
    готовый trd полностью совпал

    название диска тоже работает

  5. #284
    Veteran Аватар для zebest
    Регистрация
    11.01.2008
    Адрес
    Ладошкино
    Сообщений
    1,100
    Записей в дневнике
    3
    Спасибо Благодарностей отдано 
    35
    Спасибо Благодарностей получено 
    31
    Поблагодарили
    24 сообщений
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Ped7g, снова требуется немного разъяснить

    16+


    Три ошибки:

    и еще одна ошибка:


    я так понимаю next-команды процессора в основном работают??
    Тогда что может быть не так с этими четырьмя??
    Это не на NEXT, но процессор он него.
    Или "и так сойдет..." ?
    [свернуть]
    Profi v3.2 -=- Speccy2010,r2

  6. #285
    Member
    Регистрация
    10.05.2019
    Адрес
    Prague, Czech Republic
    Сообщений
    103
    Спасибо Благодарностей отдано 
    14
    Спасибо Благодарностей получено 
    37
    Поблагодарили
    26 сообщений
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от zebest Посмотреть сообщение
    снова требуется немного разъяснить
    If you click the letter of the particular test, it will show some debug values (usually the values which failed the test in the code).

    With that info, check the test source code to figure out what precisely failed.

    These four seems to be all I/O related, so it may be also the test does use some unlucky choice for port number to test against.

    I don't remember the implementation details for these tests, it's long time since I wrote it.
    If you can provide me with the debug info values of failed test, I may try to quickly look at the source what it means.

    But yes, your Z80N seems to be mostly working correctly, if only these four are failing.

  7. #286
    Veteran Аватар для zebest
    Регистрация
    11.01.2008
    Адрес
    Ладошкино
    Сообщений
    1,100
    Записей в дневнике
    3
    Спасибо Благодарностей отдано 
    35
    Спасибо Благодарностей получено 
    31
    Поблагодарили
    24 сообщений
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    ну да, в этих кодах ошибок уж точно я ничего не пойму

    16+











    [свернуть]

    Ну и регистры на всякий случай картинку.
    Я думаю, что не хватает какого то жизненно важного регистра. Все то они мне не нужны.
    Вот только с каким номером именно надо мне регистр))
    Profi v3.2 -=- Speccy2010,r2

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

  9. #287
    Member
    Регистрация
    10.05.2019
    Адрес
    Prague, Czech Republic
    Сообщений
    103
    Спасибо Благодарностей отдано 
    14
    Спасибо Благодарностей получено 
    37
    Поблагодарили
    26 сообщений
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от zebest Посмотреть сообщение
    в этих кодах ошибок уж точно я ничего не пойму
    nextreg *r, *n:

    It does test four NextRegister by writing/reading the value: LAYER2_XOFFSET_NR_16, VIDEO_INTERUPT_VALUE_NR_23, PALETTE_INDEX_NR_40, SPRITE_TRANSPARENCY_I_NR_4B
    (it's enough just to store and then return the same value for the test, it's not testing if the next register actual functionality is implemented)

    And your machine does also modify value written to I/O port 243B (value TRANSPARENCY_FALLBACK_COL_NR_4A is written there) - it should be not modified, "nextreg" instructions are independent from what is done directly to the $243B and $253B I/O ports.

    So to simplify when the test did stop:
    out ($243B),$4A
    nextreg $16,$01
    assert $4A == in ($243B) ; fails (is different)
    assert $01 == nextreg_16 ; fails (is $00)

    I guess the nextreg *r, A is the same issue.

    -------------

    OUTINB:

    I/O port $243B is used for the test
    out ($243B),$00
    assert $00 == in ($243B) ; fails, reads $FF

    -------------

    JP (C):

    Again depends on correct functionality of $243B / $253B, jumps to wrong address if port returns $FF instead of $00.

Страница 29 из 29 ПерваяПервая ... 2526272829

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

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

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

Похожие темы

  1. SjASMPlus Z80 кросс ассемблер
    от Aprisobal в разделе Программирование
    Ответов: 1622
    Последнее: 02.03.2020, 01:26
  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

Ваши права

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