Page 2 of 2

Re: ZX 81 development on Linux. What tools?

Posted: Mon May 03, 2021 5:36 am
by sboisvert
sl07h1 wrote: Sun Mar 21, 2021 10:35 pm Hi, I'm a Linux user, I would like if there's a tool setup for do the following:

1. Write Assembler code (or BASIC code) in a reasonable way and export the code to an emulator to test.
2. Export stuff from the emulator to a .tgz file (or a .p file) in order to get the stuff working in the ZX 81

Thanks.
I posted my findings here earlier today - have only begun looking into this stuff though, but there's some ideas.

Re: ZX 81 development on Linux. What tools?

Posted: Fri Jun 11, 2021 2:42 am
by sl07h1
sboisvert wrote: Mon May 03, 2021 5:36 am
sl07h1 wrote: Sun Mar 21, 2021 10:35 pm Hi, I'm a Linux user, I would like if there's a tool setup for do the following:

1. Write Assembler code (or BASIC code) in a reasonable way and export the code to an emulator to test.
2. Export stuff from the emulator to a .tgz file (or a .p file) in order to get the stuff working in the ZX 81

Thanks.
I posted my findings here earlier today - have only begun looking into this stuff though, but there's some ideas.
Awesome, I'm using ZesarUX for BASIC stuff, it works very well with ZX81 Tape Convert and my Zeedy. I will give it a try and tell the story later!!

Thanks!

Re: ZX 81 development on Linux. What tools?

Posted: Sun Oct 17, 2021 8:30 pm
by Neurogate
My own experience in Linux environment for ZX81 assembler development:

1. Visual Studio Code with DeZog
2. z88dk development kit
3. ZEsarUX

VS Code configuration files:

In tasks.json:

Code: Select all

        {
            "label": "z88dk",
            "type": "shell",
            "command": "z88dk.z88dk-z80asm", 
            "args": [
                "-mz80",
                "+zx81",
                "-l",
                "-m",
                "${file}"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
In launch.json:

Code: Select all

        {
            "type": "dezog",
            "request": "launch",
            "name": "ZEsarUX",
            "remoteType": "zrcp",
            "rootFolder": "${fileDirname}",
            "zrcp": {
                "hostname": "localhost",
                "port": 10000
            },
            "z88dk": [{
                "path": "${fileDirname}/${fileBasenameNoExtension}.lis",
                "srcDirs": [""],
                "mapFile": "${fileDirname}/${fileBasenameNoExtension}.map",
                "mainFile": "${fileDirname}/${fileBasenameNoExtension}.asm",
                "excludeFiles": [ "${fileDirname}" ]
            }], 
            "disassemblerArgs": {
                "numberOfLines": 24,
                "esxdosRst": true
            },
            "preLaunchTask": "z88dk",
            "load": "${fileDirname}/${fileBasenameNoExtension}.P"
        }
I found that there is problem with communication between VS Code and ZEsarUX - after compilation of assembler code to .P file VS Code can't send it to ZEsarUX. To fix this bug you can download source code of ZEsarUX and in the file utils.c change function insert_tape_cmdline to:

Code: Select all

void insert_tape_cmdline(char *s)
{
        tapefile = malloc(strlen(s)+1);
	strcpy(tapefile,s);
}
It is not ideal decision, because there also possible some memory leak, but it's work.

Re: ZX 81 development on Linux. What tools?

Posted: Tue Jan 11, 2022 4:09 am
by marste
Neurogate wrote: Sun Oct 17, 2021 8:30 pm I found that there is problem with communication between VS Code and ZEsarUX - after compilation of assembler code to .P file VS Code can't send it to ZEsarUX. To fix this bug you can download source code of ZEsarUX and in the file utils.c change function ...
ZesarUX should be on github, you can contribute making a pull request and discuss a proper fix in case!

Re: ZX 81 development on Linux. What tools?

Posted: Fri Jan 21, 2022 1:47 pm
by Neurogate
My solution is not ideal, only a temporary one. It's like fixing a hole in a water pipe with a chewing gum - it works, but no more. As an engineer, I understand that this is an ugly solution of the problem.

Re: ZX 81 development on Linux. What tools?

Posted: Tue Feb 15, 2022 11:47 pm
by marste
Today I tested the last ZesarUX communicating with the last DeZog and the latter was perfectly able to send the program to debug. Or it has been corrected or maybe there is some configuration to adjust.
And I'm using Linux versions of both.

Re: ZX 81 development on Linux. What tools?

Posted: Fri Feb 18, 2022 1:19 am
by Neurogate
If it works - don't touch it :)
I'm having a problem, and I've changed the source code to fix it, maybe it's a feature of my computer's configuration.

Re: ZX 81 development on Linux. What tools?

Posted: Sun Feb 20, 2022 11:56 pm
by marste
I got the answer: "load" works only for ZX Spectrum program (eg SNA) not for ZX81 ones (.p)!

Re: ZX 81 development on Linux. What tools?

Posted: Mon Feb 21, 2022 10:56 am
by Neurogate
marste wrote: Sun Feb 20, 2022 11:56 pm I got the answer: "load" works only for ZX Spectrum program (eg SNA) not for ZX81 ones (.p)!
So... by this it's not a feature of my computer's configuration but a bug of work with ZX81. By this my solution with modification of the source code can be useful, because at me all work fine now and for ZX81 (.p) code.

Re: ZX 81 development on Linux. What tools?

Posted: Mon Apr 18, 2022 6:45 pm
by chernandezba

I found that there is problem with communication between VS Code and ZEsarUX - after compilation of assembler code to .P file VS Code can't send it to ZEsarUX. To fix this bug you can download source code of ZEsarUX and in the file utils.c change function insert_tape_cmdline to:

Code: Select all

void insert_tape_cmdline(char *s)
{
        tapefile = malloc(strlen(s)+1);
	strcpy(tapefile,s);
}
It is not ideal decision, because there also possible some memory leak, but it's work.
Thanks for reporting it. Your code change was good enough to fix it, however the real bug was on the ZRCP layer (the protocol that comunicates VS Code and ZEsarUX). I've just fixed it! :)

https://github.com/chernandezba/zesarux ... 0b6f012545


Cheers