ZXSimulator
-
- Aurora
- Posts: 889
- Joined: Mon Nov 24, 2014 2:03 pm
Re: ZXSimulator
Hi again,
Unfortunately, the tabbing in the timing figures got removed by the site ..... Spaces between colons were removed !
Perhaps the site administrators could look into this ?
Best wishes,
Steve.
Unfortunately, the tabbing in the timing figures got removed by the site ..... Spaces between colons were removed !
Perhaps the site administrators could look into this ?
Best wishes,
Steve.
Re: ZXSimulator
Steve,stevepoole wrote:Hi again,
Unfortunately, the tabbing in the timing figures got removed by the site ..... Spaces between colons were removed !
Perhaps the site administrators could look into this ?
Best wishes,
Steve.
I created a new thread for this here viewtopic.php?f=2&t=3213&p=32913#p32913 since I think benchmarks are quite interesting for others. Note that I also reformatted your table for easy reading.
Last edited by bwinkel67 on Fri Mar 27, 2020 12:49 am, edited 1 time in total.
Re: ZXSimulator
Probably better to put space-critical stuff like that as CODE or QUOTE to try to preserve the spacing as a fixed pitch font (unless someone has a better idea).stevepoole wrote:Hi again,
Unfortunately, the tabbing in the timing figures got removed by the site ..... Spaces between colons were removed !
Perhaps the site administrators could look into this ?
Best wishes,
Steve.
--
All things QL - https://dilwyn.theqlforum.com
All things QL - https://dilwyn.theqlforum.com
Re: ZXSimulator
Yup, I fixed it for himdilwyn wrote: Probably better to put space-critical stuff like that as CODE or QUOTE to try to preserve the spacing as a fixed pitch font (unless someone has a better idea).

Re: ZXSimulator
BTW, looks like I'm not the first to come up with the idea of a simulator. The Commodore 64 "emulated" the Spectrum back in the mid 80's but in reality it was just implementing its BASIC. Here is a demo of it, the "The Whitby Spectrum Simulator" on a plain old C64:
https://www.youtube.com/watch?v=i98CTiq707U
So the hope is when I get the ZXSimulator done for the ZX81 I could upgrade it to the ZX Spectrum though I know a lot less about its BASIC but perhaps there isn't that much more to add. Hoping at that point to get some help with speeding up the fonts to make it realtime on a 128K QL (hey, if the C64 could do it, I'll make the 128K QL do it :-/)
Here is the latest, just fixed some inefficient code that barely sped it up, but its size is down to 38K again. Still needs lots of odds and ends plus adding floating point math...TBD
https://www.youtube.com/watch?v=i98CTiq707U
So the hope is when I get the ZXSimulator done for the ZX81 I could upgrade it to the ZX Spectrum though I know a lot less about its BASIC but perhaps there isn't that much more to add. Hoping at that point to get some help with speeding up the fonts to make it realtime on a 128K QL (hey, if the C64 could do it, I'll make the 128K QL do it :-/)
Here is the latest, just fixed some inefficient code that barely sped it up, but its size is down to 38K again. Still needs lots of odds and ends plus adding floating point math...TBD
-
- Aurora
- Posts: 889
- Joined: Mon Nov 24, 2014 2:03 pm
Re: ZXSimulator
Hi admins,
< stevepoole wrote:
Hi again,
Unfortunately, the tabbing in the timing figures got removed by the site ..... Spaces between colons were removed !
Perhaps the site administrators could look into this ?
Best wishes,
Steve. >
< Dilwyn replied :
Probably better to put space-critical stuff like that as CODE or QUOTE to try to preserve the spacing as a fixed pitch font (unless someone has a better idea). >
________________
It looks as though the site software treats space charcaters as '"" rather than " " ?
Steve.
< stevepoole wrote:
Hi again,
Unfortunately, the tabbing in the timing figures got removed by the site ..... Spaces between colons were removed !
Perhaps the site administrators could look into this ?
Best wishes,
Steve. >
< Dilwyn replied :
Probably better to put space-critical stuff like that as CODE or QUOTE to try to preserve the spacing as a fixed pitch font (unless someone has a better idea). >
________________
It looks as though the site software treats space charcaters as '"" rather than " " ?
Steve.
Re: ZXSimulator
Most such sites do - I know from bitter experience of screwed up listings and tables.stevepoole wrote:Hi admins,
...
It looks as though the site software treats space charcaters as '"" rather than " " ?
Steve.
--
All things QL - https://dilwyn.theqlforum.com
All things QL - https://dilwyn.theqlforum.com
Re: ZXSimulator
Not directly aimed at ZXSimulator, just thought that I'd mention this on this thread.
I've added a ZX81 font for QL to the fonts page on my website.
It's based on the 64 character ZX81 character set, implemented as CHR$(128) onwards on QL so as to be able to use both QL and ZX81 characters. ZX81 characters are 8x8 pixels, with most characters (other than the block graphics and a few odd number width characters which are 7 pixels) using 6 out of 8 pixels across, to allow spacing between characters.
To use it on the QL you need to install it in the usual way for QL fonts. Then use CHAR_USE from Toolkit 2 to set it as font 2 for a given channel, then CHAR_INC to set character increments at 8 pixels across and 8 pixels down to vaguely resemble a ZX81.
Done as indicated in the instructions, ZX81 CHR$ 0 to 63 are 128 to 191 on QL, like the "inverse" fonts on a ZX81. On a QL, toggle normal and inverse just by swapping INK and PAPER.
As the fonts are 8 pixels wide, this can only be used in CSIZE width 1, i.e. CSIZE 1,0 or CSIZE 1,1 Download the font from http://www.dilwyn.me.uk/fonts/index.html
I've added a ZX81 font for QL to the fonts page on my website.
It's based on the 64 character ZX81 character set, implemented as CHR$(128) onwards on QL so as to be able to use both QL and ZX81 characters. ZX81 characters are 8x8 pixels, with most characters (other than the block graphics and a few odd number width characters which are 7 pixels) using 6 out of 8 pixels across, to allow spacing between characters.
To use it on the QL you need to install it in the usual way for QL fonts. Then use CHAR_USE from Toolkit 2 to set it as font 2 for a given channel, then CHAR_INC to set character increments at 8 pixels across and 8 pixels down to vaguely resemble a ZX81.
Done as indicated in the instructions, ZX81 CHR$ 0 to 63 are 128 to 191 on QL, like the "inverse" fonts on a ZX81. On a QL, toggle normal and inverse just by swapping INK and PAPER.
As the fonts are 8 pixels wide, this can only be used in CSIZE width 1, i.e. CSIZE 1,0 or CSIZE 1,1 Download the font from http://www.dilwyn.me.uk/fonts/index.html
--
All things QL - https://dilwyn.theqlforum.com
All things QL - https://dilwyn.theqlforum.com
Re: ZXSimulator
Here is the latest version:
I added full editing capabilities so now, if you want, you can write ZX81 BASIC code in the ZXSimulator. Note it still has many elements of BASIC missing so you can't fully run all ZX81 programs but you can use it to add in all the characters, even graphics. It's certainly easier to use than an emulator which forces you to remember the original ZX81 keyboard key mappings. It uses the zxtools standard (or whatever it is called) for graphics:
This is the style formatting supported in the ZX81 community for zxtools and others (as far as I can tell):
http://freestuff.grok.co.uk/zxtext2p/index.html
I also added the RAND command and the RND function though presently it can only return integers between -32667 and +32768. It needs floating point numbers to be implemented for it to truly mimic a ZX81. I used Steve Poole's LGR with value 8421 with a cycle of 65537. Anyone know the actual algorithm Sinclair used for the ZX81? Be neat to implement it for exactness.
Also found this, the definitive ZX81 BASIC reference (I have fond memories of reading this, learning BASIC for the first time):
http://www.worldofspectrum.org/ZX81BasicProgramming/
I added full editing capabilities so now, if you want, you can write ZX81 BASIC code in the ZXSimulator. Note it still has many elements of BASIC missing so you can't fully run all ZX81 programs but you can use it to add in all the characters, even graphics. It's certainly easier to use than an emulator which forces you to remember the original ZX81 keyboard key mappings. It uses the zxtools standard (or whatever it is called) for graphics:
- if you type a '%' the cursor goes to G and the next character you type will be inverted.
- if you type a '\' the cursor goes to G and the next two charters you type will generate one of the block graphics.
- cursor keys for left and right have been added in addition to delete
This is the style formatting supported in the ZX81 community for zxtools and others (as far as I can tell):
http://freestuff.grok.co.uk/zxtext2p/index.html
I also added the RAND command and the RND function though presently it can only return integers between -32667 and +32768. It needs floating point numbers to be implemented for it to truly mimic a ZX81. I used Steve Poole's LGR with value 8421 with a cycle of 65537. Anyone know the actual algorithm Sinclair used for the ZX81? Be neat to implement it for exactness.
Also found this, the definitive ZX81 BASIC reference (I have fond memories of reading this, learning BASIC for the first time):
http://www.worldofspectrum.org/ZX81BasicProgramming/
- NormanDunbar
- Forum Moderator
- Posts: 2470
- Joined: Tue Dec 14, 2010 9:04 am
- Location: Buckie, Scotland
- Contact:
Re: ZXSimulator
Thanks Dilwyn, you've saved me lots of time. I was creating a zx-81 font from the actual font data in the zx-81 ROM which I found on-line.
Stay safe.
Cheers,
Norm.
Stay safe.
Cheers,
Norm.
Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.