Re: ZXmore - questions and answers (FAQ)
Posted: Tue Jun 28, 2016 12:11 am
So finally release 1.9 is available.
All necessary files can be downloaded here in a comfortable ZIP archive:
http://www.ginger-electronic.com/Downlo ... terV19.zip
Following changes and new features are here listed shortly:
Realising multi tasking mode was much more complicate than thought and needed 3 different approaches and has some restrictions as well, see below. Multi tasking can be selected with hotkey DS-M and switched on and off (toggle mode) but needs at least two running instances. The foreground instance has display and keyboard, the background instance(s) will be executed only. Foreground task is run at top margin while one or more background tasks are run in bottom margin in a round-robin manner. If only 1 background instance used, it will get 50% of cpu time, when using 2 instances every instance get 25% or with 3 instances 16.5%. The foreground instance has always 50% speed. When using two instances both will run with 50% of 6.5 MHz speed so all in all both with full/normal speed of a ZX81 (3.25 MHz). Okay - a bit faster, 130% in comparison to a usual ZX81.
This could be useful for long running programs with maybe calculating some graphics or calculation of prime numbers or similar tasks.
In the foreground you may work, program or play game.
Restrictions applied to multi tasking mode:
1) PAL video mode only
Realistin this feature was very tricky and is timing sensitive and result in problems using NTSC mode with about shorter periods of program execution. PAL is much more reliable. I tested with some standard applications with BASIC, assembly code or graphics and some games like 1kchess.p for example. There maybe problems with programs using own video drivers and customized system variables like dr. beep's 1k programs, I think. There maybe also problems with programs using extensively NMI switches on/off or expecting NMI's to occur regularly.
2) RAM mirror may be required
Extensively switching on/off for NMIs may cause problems which is maybe worth to explain.
This is an acid test program:
Running this program in one instance and another one in a second may cause problems. Reason is the extended M1 NOT mode supported from ZXmore which allows execution of machine code programs in whole memory (even in area $C000-$FFFF). It is necessary, to detect the video display which forces A15 of RAM always low to point to correct DFILE location. Video mode is detected when either INT ACK or HALT occurs. During testing it showed up, that FAST mode display may cause trouble when not detected properly. Then DFILE is read from A15 high (not forced low) pointing to wrong display data. So I had to add an additional condition to active video with NMI switching off. This doesn't show up earlier. So there are two fixes. A hardware fix with a CPLD from 06/2016 on or as workaround to use RAM mirror which forces A15 to point always to the same memory address but limits memory to 32k only (either 8k-40k or 16k-48k). The fixed CPLD now gives also a correct video pattern for the LOAD routine (stripes).
3) Text display only
Realizing multi tasking required also own display drivers. So during multi tasking you may see text screens only. HRG programs are executed fine but do not show the graphics content. A workaround is to temporarily switch off multi tasking and after checking contents switch it on. FAST mode periods in general (as occurring during program editing for example shortly) do not harm the multi tasking mode because display is always switched off during that time configuring or changing the DFILE contents.
4) Framecounter (FRAMES)
The frame counter is decremented in multi tasking mode but is not in all cases set correctly. Every time a background instance is executed, FRAMES will be decremented by one. If only 1 background task is present, this corresponds to 50 frames per second. If two background tasks are executed in round-robin than both frames are executed 25 frames per second while FRAMES is decremented by 25 only. So timing measurements may not work properly when running more than one background task.
But give it a try - it's a funny feature.
All necessary files can be downloaded here in a comfortable ZIP archive:
http://www.ginger-electronic.com/Downlo ... terV19.zip
Following changes and new features are here listed shortly:
Code: Select all
## [V1.9] - 2016.06
### Added
[+] multi tasking mode (automatic instant switching with time slice)
[+] added support for vdrive protocol with minimalistic driver
[+] backup of single instances as *.BAK and continue session later (after power-off)
[+] saved single instances maybe continued on any other instance, easy cloning possible
[+] backup and restore of complete ZXmaster including all active instances in tools menu
[+] restore of previously saved backup with pressing NEWLINE during reset or power-up
### Changed
[*] instance switching moved from top margin to bottom margin due to technical reasons
### Fixed
[-] frame synchronisation between instance switching (smooth switching)
[-] video timing precised
[-] ZX81 FAST mode display A15 fix with new CPLD (rev. 06.2016)
This could be useful for long running programs with maybe calculating some graphics or calculation of prime numbers or similar tasks.
In the foreground you may work, program or play game.
Restrictions applied to multi tasking mode:
1) PAL video mode only
Realistin this feature was very tricky and is timing sensitive and result in problems using NTSC mode with about shorter periods of program execution. PAL is much more reliable. I tested with some standard applications with BASIC, assembly code or graphics and some games like 1kchess.p for example. There maybe problems with programs using own video drivers and customized system variables like dr. beep's 1k programs, I think. There maybe also problems with programs using extensively NMI switches on/off or expecting NMI's to occur regularly.
2) RAM mirror may be required
Extensively switching on/off for NMIs may cause problems which is maybe worth to explain.
This is an acid test program:
Code: Select all
10 SLOW
20 PRINT "X";
30 FAST
40 RUN
3) Text display only
Realizing multi tasking required also own display drivers. So during multi tasking you may see text screens only. HRG programs are executed fine but do not show the graphics content. A workaround is to temporarily switch off multi tasking and after checking contents switch it on. FAST mode periods in general (as occurring during program editing for example shortly) do not harm the multi tasking mode because display is always switched off during that time configuring or changing the DFILE contents.
4) Framecounter (FRAMES)
The frame counter is decremented in multi tasking mode but is not in all cases set correctly. Every time a background instance is executed, FRAMES will be decremented by one. If only 1 background task is present, this corresponds to 50 frames per second. If two background tasks are executed in round-robin than both frames are executed 25 frames per second while FRAMES is decremented by 25 only. So timing measurements may not work properly when running more than one background task.
But give it a try - it's a funny feature.