cj7hawk
Veteran Member
Hi All,
At the moment, I'm converting the ZX Spectrum ROM to a CP/M .COM executable to run Sinclair Basic from the command line.
I'm part way there, though not very far yet. I have it executing without requiring interrupts using the BDOS for video and keyboard, with several features operating correctly, while keeping shy of the BDOS and once I have the functions working correctly, I'll start working on adding in file and disk support within the standard command set.
I've gotten the cursor up, have it running in 80 columns+ ( it looks pretty nice in 80 columns compared to the cramped 32 column Spectrum screen ) and I'm working on building a series of objectives to allow it to do more, eg, have variable screen resolutions - (eg, 20,32,40,56,64,80,128 column displays ) and also support graphics protocols to deliver the commands it already has there. I'm planning on converting as much of it as possible to support ADM-3A and RG-512 format and also to make it work under emulation on Windows 10/11 from CLI.
I plan to remove old redundant code (eg, fixed-memory video support ) and it loads into the normal TPA at $100, though it does hook the RSTs so as to drive it's own functions - RST38 isn't used though, and neither is NMI since it can run entirely with interrupts disabled now.
It's currently a little smaller than the typical 16K footprint and my goal is to achieve the same program size capability as a ZX Spectrum can handle, while maintaining the BDOS and BIOS and respecting the zero page. I can recover the unused memory, and also the character rom code, as well as some of the print and input routines as I've replaced them already.
I'm also looking at ways to integrate CLI parsing so that when a command is typed in, eg p-r-i-n-t - it will hit the error and change it out for the F5 token "print". This presently extends to editing, which will fill the command line with the spelled command rather than the token, though I'm not sure of the best way to do this, but I want to support both fast-token generation and typing in keywords, while supporting both simultaneously, including mixing them.
I was wondering what other changes I should make while I'm at it, and what people would want to see in a CP/M supported version of ZX Spectrum Basic. So far, I'm thinking to make SAVE and LOAD work directly with the disk system via the BDOS, but don't want to go too far or use overlays, as the interpreter really should work standalone like most basics. Making CAT work as a DIR is an obviously needed capability, and FORMAT can be used to change external settings or do something else (eg, screen resolutions in software ) while i suppose copy could, well, copy files, though at 128 bytes at a time, it isn't going to be blisteringly fast for that kind of activity. Though I don't really need to support OS functions from the CLI since it's a *CP/M* system and those functions are more or less available from the host OS.
So what would other Sinclair fans want to see if ZX Spectrum BASIC programs ran on CP/M machines?
Thanks
David
At the moment, I'm converting the ZX Spectrum ROM to a CP/M .COM executable to run Sinclair Basic from the command line.
I'm part way there, though not very far yet. I have it executing without requiring interrupts using the BDOS for video and keyboard, with several features operating correctly, while keeping shy of the BDOS and once I have the functions working correctly, I'll start working on adding in file and disk support within the standard command set.
I've gotten the cursor up, have it running in 80 columns+ ( it looks pretty nice in 80 columns compared to the cramped 32 column Spectrum screen ) and I'm working on building a series of objectives to allow it to do more, eg, have variable screen resolutions - (eg, 20,32,40,56,64,80,128 column displays ) and also support graphics protocols to deliver the commands it already has there. I'm planning on converting as much of it as possible to support ADM-3A and RG-512 format and also to make it work under emulation on Windows 10/11 from CLI.
I plan to remove old redundant code (eg, fixed-memory video support ) and it loads into the normal TPA at $100, though it does hook the RSTs so as to drive it's own functions - RST38 isn't used though, and neither is NMI since it can run entirely with interrupts disabled now.
It's currently a little smaller than the typical 16K footprint and my goal is to achieve the same program size capability as a ZX Spectrum can handle, while maintaining the BDOS and BIOS and respecting the zero page. I can recover the unused memory, and also the character rom code, as well as some of the print and input routines as I've replaced them already.
I'm also looking at ways to integrate CLI parsing so that when a command is typed in, eg p-r-i-n-t - it will hit the error and change it out for the F5 token "print". This presently extends to editing, which will fill the command line with the spelled command rather than the token, though I'm not sure of the best way to do this, but I want to support both fast-token generation and typing in keywords, while supporting both simultaneously, including mixing them.
I was wondering what other changes I should make while I'm at it, and what people would want to see in a CP/M supported version of ZX Spectrum Basic. So far, I'm thinking to make SAVE and LOAD work directly with the disk system via the BDOS, but don't want to go too far or use overlays, as the interpreter really should work standalone like most basics. Making CAT work as a DIR is an obviously needed capability, and FORMAT can be used to change external settings or do something else (eg, screen resolutions in software ) while i suppose copy could, well, copy files, though at 128 bytes at a time, it isn't going to be blisteringly fast for that kind of activity. Though I don't really need to support OS functions from the CLI since it's a *CP/M* system and those functions are more or less available from the host OS.
So what would other Sinclair fans want to see if ZX Spectrum BASIC programs ran on CP/M machines?
Thanks
David