ZX 81 development on Linux. What tools?

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
sboisvert
Posts: 29
Joined: Mon Nov 02, 2009 3:43 pm

Re: ZX 81 development on Linux. What tools?

Post 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.
sl07h1
Posts: 30
Joined: Mon Feb 22, 2021 7:16 pm

Re: ZX 81 development on Linux. What tools?

Post 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!
Neurogate
Posts: 21
Joined: Tue Aug 31, 2021 6:46 pm

Re: ZX 81 development on Linux. What tools?

Post 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.
Sinclair ZX81, Sinclair QL, Sinclair ZX Spectrum +2, Atari 130XE, Commodore 64C, Yamaha YIS503IIIR MSX2 & etc
User avatar
marste
Posts: 203
Joined: Sun Aug 10, 2014 9:58 pm
Location: Italy
Contact:

Re: ZX 81 development on Linux. What tools?

Post 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!
Post Reply