Hm... maybe you should always post precise code which you were trying (or pastebin url, or something like that), because of course it *should* work, it's being tested with every commit: https://github.com/z00m128/sjasmplus...ault_pages.asm
... in multiple tests...: https://github.com/z00m128/sjasmplus...48_and_128.asm
Can you make sure you are using v1.13+ for assembling? Basically you can do `sjasmplus --msg=lstlab file.asm 2> file.lst` and the first line will contain also sjasmplus version ... which is bug (it should produce listing only), which I discovered *now* thanks to you... thanks.
But otherwise I have no idea what is not working for you and why, probably some tiny detail, which we both missed.
About snapshot... well, I didn't check those yet, as I don't use them much (sometimes zx48 snapshots for quick tests of Next features, but never zx128).
So... looking a bit into io_snapshots.cpp now ... I don't like that code too much... basically seems like zx128 has stack fixed to 0x6000? Not sure, but I think both zx48 and zx128 devices get fake zx48 sysvars+stack, but then save snapshot checks for the fake stack in wrong page, so with 128 device it will always default to 0x6000 I believe (eventually I will probably write some tests to verify my guess, but not now, focusing on more important parts).
Then it writes into file short block with register values, then pages 5, 2 and current slot3 page (i.e. should work), then second small block of extra values (PC and I/O 7FFF page num), and finally it adds remaining pages of ZX128. Then it should display warning for any other device (non zx48/zx128), but it will not work, because it's using wrong device names and the whole logic of that code is stupid and error prone.
So, unless there are some bugs I didn't see when reading quickly through it, this should work:
https://github.com/z00m128/sjasmplus...esna_zx128.asm
And testing in #CSpect 2.9.2 -> reset into ZX Spectrum ROM ...Код:DEVICE ZXSPECTRUM128 PAGE 5 ; btw this is VRAM page (and slot 3 is default) ORG 0xC000 ; so this code will be visible on screen ; and it will cause page 5 to be stored in snapshot twice, is this even legal? :D start: ld bc,0x07FE .borderMess: inc a and b out (c),a jp .borderMess SAVESNA "savesna_zx128.sna", start
but CSpect is not the most accurate emulator, so one more try with ZEsarUX 8.0:
Seems it works for me.
NEO SPECTRUMAN (30.07.2019)
написал простую проверку
и все работает как нодоКод:device zxspectrum128 slot 0 page 1 org $0000 l1 jp $C000 slot 3 page 5 savesna "test.sna",$C000
но другой исходник
имеющий в конце
ругаетсо...Код:slot 3 page 5 savesna "sidplay.sna", start
и в итоге slot 3 все время page 0xxx.asm(4538): error: [PAGE] Page number must be in range 0..3
xxx.asm(4540): warning: [SAVESNA] RAM <0x4000-0x4001> will be overriden due
to 48k snapshot imperfect format.
что не пиши...
щас попробую проредить исходник
и посмотрю что будет
BTW about outputting large files... keep in mind sjasmplus is ASSEMBLER ... it can emit MACHINE CODE ...
It would be very bad assembler, if it would be impossible to emit any machine code you need. And machine code is like binary data.
So if everything else fails (you want new file format which is not supported by sjasmplus), you can do also something like this:
This is not very practical for formats which use compression, or where you need to calculate many fields in the header, but for things like ROM images there shouldn't be any major problem to prepare binary images precisely to your liking.Код:OUTPUT "file.xyz" DB "header bytes", 1, 2, 3, 4 DISP 0x4000 vram: DB 1, 2, "... 6192 bytes in total" ENT DB "some other section bytes like crc or pages" DISP 0xC000 start: ; some code ENT ; ... etc OUTEND ; close the file
Similarly, I did need something similar for the ZX Next, so I added support of NEX file format to sjasmplus (but took me 5 months longer than I expected, because whenever I take a look at that source, I find some bug... :/ ... instead of working on my projects...)
трижды извиняюсь
нашел у себя багу
когда собирал несколько сорцов в один
один из них содержал
device zxspectrum48
в мало заметном месте
в итоге в какой то момент все компилировалось не так как надо
и сохраняло даже в 48к снапшоте...
As far as I can tell, slot 0 is not part of snapshot files, but page 1 will be stored in the zx128 snapshot, so the data you prepared there, you can still page them in at regular zx128 bank at 0xC000 (or even to other slots on +3 machines, but I don't know details how those work). But slot 0 is considered ROM area by snapshot files (but that's not problem of sjasmplus, but limitation of the file format)
Are you doing it sequentially? It's sort of like running code in ZX Spectrum.но другой исходник
ругаетсо...Код:slot 3 page 5 savesna "sidplay.sna", start
и в итоге slot 3 все время page 0
что не пиши...
щас попробую проредить исходник
и посмотрю что будет
I.e. you must do everything in correct steps:
1) select device (ZXSPECTRUM128)
2) select slot, select page (you can do it in single command `MMU 3, 5`)
3) use ORG to target the new page in that slot
4) produce the machine code (DB or instructions/macros/etc...)
5) savesna when the memory contains all machine code
BTW, *why* page 5? Why VRAM? This also damages sysvars. Are you intentionally picking the most fragile options, and then you wonder when things break?
когда я последний раз пользовался disp
(на старой версии компилятора)
оказалось что оно с ошибками компилирует
уже не помню что именно
или не работали макросы и jp вели не туда куда надо
или lua генерировала код не по тем адресам
в конечном итоге
я этим disp больше не пользуюсь
может конечно его уже и починили...
- - - Добавлено - - -
page0 прекрасно подключается у злых русских в slot0
http://dev.speccy.info/index.php?tit...#Pentagon-1024
There was a serious bug when using DISP and crossing slot-boundary, the machine code was lost. I think I fixed it in v1.12.x or v1.13.0, not sure, and too lazy to check the changelog. (the other sjasmplus has this one fixed for many years, but it was still bugged in z00m's versions)
There is another issue of DISP inside DISP, which is not well defined in docs, and not well implemented: basically one you start DISP, the next change of "$" should be done by ORG, which will affect the DISP address, and I really don't like the current status, but so far I didn't have time to rewrite this, will be probably part of incompatible v2.x changes.
But otherwise it should work reasonably well, if you hit some problem, surely let me know, thank you.
(about Pentagon ... hey, slow down, I can hardly page the banks at regular ZX128, don't know how it works at +3, and the only thing I know about Soviet ZX clones is, that they exist ... or at least there are rumours ...)
I think few years ago, like in 2008 or so, I had brief period of checking ZX scene, and I tried to find some info, but everything is in azbuka and Russian, so that didn't go well... (now I'm using google translator to decipher messages in this thread, it usually makes about 70% understandable, the rest I ignore, but it's quite exhausting to chew through some of the personal chit-chat or sort-of-poetry, so sometimes I just give up and don't understand)
Последний раз редактировалось Ped7g; 30.07.2019 в 20:24.
ну а английском могу вспомнить разве что
мануал по АТМ-у
http://alonecoder.nedopc.com/zx/books/ATMHW.rar
Ped7g (30.07.2019)
For those who know how to build from github, can you please try the current version in master branch?
https://github.com/z00m128/sjasmplus/commits/master
It's now what will become "v1.14.0" during next week, I think I'm done with the development (just want to edit docs and prepare everything for release).
And this is, as I wrote earlier, one of the last "v1.x" versions of sjasmplus, where I was trying to keep backward compatibility as high as possible.
So if you can test it with your Z80 projects and see if everything still works (or requires only very minor changes), I would love to hear from you (also of course if you run into some problem).
After this I'm planning to start work on "v2.x", which will change some of the syntax rules, and most of the old sources will require some small changes to be compilable with v2.x, so I want the v1.14.x to be very solid, stable and good assembler, because it may be the last version usable for some legacy sources (if you don't want to update them to new changes). Thank you girls and guys.
(preliminary changelog for v1.14.0 from my work notes)
- INCLUDE bugfix, now searching paths according to original documentation (may break some projects)
- UNDEFINE had undocumented feature of removing also labels, removed (seemed broken beyond repair)
- R800 MULUB was producing wrong opcode all those years... fixed.
- MODULE names can't contain dot any more, MODULE/ENDMODULE resets non-local label to "_"
- expression evaluator was not stricly 32 bit (64b binaries could have produced different results than 32b binaries)
- accessing low memory addresses 0..255 directly emits warning
- several tests added to improve the code coverage: https://coveralls.io/github/z00m128/...?branch=master
- as tests were added, minor bugs were found and squashed (errors wording, etc)
Последний раз редактировалось Ped7g; 05.08.2019 в 04:15. Причина: adding work version of changelog
Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)