z00m128 / sjasmplus

Command-line cross-compiler of assembly language for Z80 CPU.
http://z00m128.github.io/sjasmplus/
BSD 3-Clause "New" or "Revised" License
362 stars 50 forks source link

DEVICE for ZX Spectrum +3? #230

Open corbym opened 2 months ago

corbym commented 2 months ago

Hey - newbie here.. so forgive any of my ignorance please!

What device should I use to specify the ZX Spectrum +3?

I don't see it in the device list, but I expect there's some magic I could do to specify a custom device.. I am not familiar enough with the concepts to understand how to define the correct one, however.

Could someone please give me some pointers? Or help define one for me?

Thanks in advance.

ped7g commented 2 months ago

For regular +3 the ZXSPECTRUM128 should be perfect match. +3 has same memory scheme as first ZX128.

The only difference I can think of is maybe that the pre-seeded sysvar values in the virtual memory are not exactly same as ZX +3 after reset, but you shouldn't need those unless you are producing snapshot.

You may run into some issues maybe if you would use snapshots (I think the savesna does produce 128 snapshot which is not compatible with all emulators, and savetap snapshot-like variant may have loader which doesn't work correctly in +3 basic mode? I'm just guessing, as I never use these and nothing particular was reported).

corbym commented 2 months ago

hi @ped7g yes, you are right, I am having problems with producing a snapshot that can be read by  ZEsarUX, the emulator I am running.

If I force the emulator into +3 mode and run the SNA produced by the ZXSPECTRUM128 annotated code, it just crashes.

EDIT: saving as a TAP file actually works OK, I can load a tap into the +3 emulation and the program I wrote runs.

ped7g commented 2 months ago

I'm not an expert on the SNA versions, so I don't know if sjasmplus is producing some extra rare 128 type, or zesarux does not support something more common.

If somebody will provide details about what is the issue with current format and what to change, we can try to produce other variant of 128 SNA, or maybe add option to select the format. (I'm right now not at the right place to hunt this info down, not any time soon).