Code: Select all
..
SUBTYPE default -lgfxtrs80
SUBTYPE disk lgfxtrs80 -Cz--cmd
SUBTYPE wav -lgfxtrs80 -Cz--audio -Cz--fast
..
Code: Select all
..
SUBTYPE default -lgfxtrs80
SUBTYPE disk lgfxtrs80 -Cz--cmd
SUBTYPE wav -lgfxtrs80 -Cz--audio -Cz--fast
..
Code: Select all
/* Plot(), Unplot() and Point() Test by RobertK, 2018-04-07
Compile command for the following targets:
=== ZX81 (64?48) === (ok)
zcc +zx81 -startup=2 -Cz--disable-autorun -o plottest_ZX81 -create-app plottest.c
=== ZX80 (64?48) === (ok)
zcc +zx80 -o plottest_ZX80 -create-app plottest.c
Note: point() function was not working yet for this system
with 1.99B (calling it made the program crash), since nightly
build 2018-03-22 it works correctly.
=== Jupiter Ace (64x48) ===
zcc +ace -lgfxace -vn -create-app plottest.c -o pt.bin
Note: with 1.99B plotted points could not be seen, and the
point() function returned inverse values -> fixed since nightly
build 2018-03-28 (-lgfxace option added by Stefano for 64x48)
Last remaining issue: clearing the screen does not clear the
bottom line (only in this test program, while in H-Tron the entire
screen gets cleared correctly).
Load the program on the Jupiter Ace by typing:
0 0 bload pt.bin
=== Galaksija (64?48) === (ok)
zcc +gal -vn -create-app plottest.c -o plottest_galaksija.bin
Note: on the Galaksija computer type OLD to load a program from cassette.
=== VZ200 / Laser 210 / Laser 110 (128?64) === (ok)
zcc +vz -lm -pragma-redirect=fputc_cons=putc4x6 -o plottest_vz200.vz plottest.c
Note from the z88dk wiki: "The graphics mode is automatically switched on
by calling ?clg? or printing CHR$ 12 or calling the vz_mode() function."
We use clg() in this example.
Works correctly since nightly build 2018-03-31. Stefano:
"The VZ200. Its "operating system" (aka BASIC interpreter) is designed to switch
back to text mode as soon as a character is being printed.
After this nightly build you should have a new function in all the mid and low-rez
graphics drivers permitting to output some text in graphics mode.
You just need to add the following parameter in your zcc command line:"
-pragma-redirect=fputc_cons=putc4x6
=== TRS-80 (128?48) === (ok)
zcc +trs80 -lndos -lm -create-app -o plottest_trs80.bin -subtype=disk plottest.c
Clearing the screen does not work with 1.99B, since nightly build 2018-03-24
this works as well. Use the HT1080Z emulator for testing (select "Autostart file"
and open the .cmd file)
=== Robotron Z1013 (64?64) === (ok)
zcc +z1013 -lm -create-app plottest.c -o plottest_z1013
Note: top line (plotted pixel at 1,1) was not visible with 1.99B,
since nightly build 2018-03-22 it works correctly.
=== Philips VG5000 (80?72) === (ok)
zcc +vg5k -create-app -clib=graphics -lm plottest.c -o plottest_vg5000
Note: In 1.99B Plot() function displayed " characters instead of pixels.
New compile option -clib=graphics added since nightly build 2018-03-31.
Use the DCVG5K emulator (dcvg5k.free.fr) for testing
Attach the .k7 cassette file and type CLOAD to load the program
(note that the VG5000 has a French AZERTY keyboard so on most
other keyboard layouts you have to type CLOQD)
=== Mattel Aquarius (80?48) === (ok)
zcc +aquarius -lm -create-app plottest.c -o plottest_aquarius
Note: Everything works, except for that plotted pixels are not
all the same size. In the plot test the second pixel looks ok
while the first and third are too flat.
Stefano: "I saw a comment about odd pixels on the Mattel Aquarius.
Sadly there is very little we can do for it, the character set is
so fancy and unbalanced. The bottom right pixel in a 2x3 matrix is
totally missing while the bottom-right pixel in a 2x2 matrix is
repeated twice, this is something I really can't understand because
the font was accurately overloaded of any kind of different symbol
and a duplicate like this is very odd (chr 26 = chr 224).
By the way I added a graphics variant [in nightly build 2018-03-29]:
just use '-lgfxaq48' to bend your graphics resolution from 64x72
to 64x48 [should be 80x48], they are both compatible with the text mode."
-> looks good now, the plotted pixels are all the same size now
Use the "Virtual Aquarius" emulator for testing. Loading
instructions from the z88dk wiki:
from within the emulator, load the loader: cload
press ENTER twice, then play the ?_plottest_aquarius.caq? cassette file (loader)
at the ?OK? prompt, type RUN <ENTER>
press ENTER twice, then play the ?plottest_aquarius.caq? cassette file
wait? then have fun !
=== EG2000 (160?100) ===
zcc +trs80 -lndos -lm -create-app -subtype=eg2000disk -pragma-redirect=fputc_cons=putc4x6 -o plottest_eg2000.bin plottest.c
Note: plotted points could not be seen with 1.99B. New compile option
-pragma-redirect=fputc_cons=putc4x6 added in nightly build 2018-04-05.
Last remaining issues: screen is shifted towards the bottom
so that the bottom line of the border cannot be seen. Clearing the screen
does not work.
Use the Genieous emulator (gaia.atilia.eu) for testing. See the TRS-80
loading instructions above (use "Autostart file" after entering SYSTEM)
=== Sharp MZ-700 (80?50) === (ok)
zcc +mz -lm -create-app plottest.c -o plottest_sharpmz
Note: clearing the screen does not work in 1.99B, fixed since
nightly build 2018-03-29
In M.A.M.E. attach The .mzt cassette file, then press L and Enter
to initiate loading, then use M.A.M.E.'s tape control to start the tape.
=== Philips P2000 (78?72) ===
zcc +p2000 -o plottest_p2000 -create-app -lm plottest.c
M.A.M.E. (tested with 0.170 and 0.196) does not allow to load software on that system.
Tested with the M2000 emulator for DOS (in DOSBox), use the -tape <filename> option to
attach the .cas file, load it with "cload" and then type "run".
Plotted points cannot be seen (some characters appear instead), everything else is ok.
=== ABC80 (78?72) === (still to be tested)
zcc +abc80 -lm -o plottest_abc80 -create-app plottest.c
Note from z88dk Wiki: "The pseudo graphics mode is supported. You first
need to issue a clg () command to set up the graphics page."
.BAC or .BAS file can be quickloaded and listed in M.A.M.E., but cannot be run
=== Nascom (96?48) === (still to be tested)
zcc +nascom -lm -o plottest_nascom -create-app plottest.c
(.nas file can be successfully loaded in M.A.M.E. in
both Nascom 1 and Nascom 2, but what to do next?)
=== Robotron Z9001 (80x48) === (still to be tested)
zcc +z9001 -lm -o plottest_z9001 -create-app plottest.c
Compiler errors "symbol ?plot? not defined"
*/
#include <stdio.h> // required for printf()
#include <graphics.h> // contains plot() and point() functions
// define the screen dimensions for the current system
#if defined(__ZX81__) || defined(__ZX80__) || defined(__ACE__) || defined(__GAL__) // ZX81, ZX80, Jupiter Ace, Galaksija
#define X_RES 64
#define Y_RES 48
#elif defined(__VG5000__) // Philips VG5000
#define X_RES 80
#define Y_RES 72
#elif defined(__AQUARIUS__) // Mattel Aquarius
#define X_RES 80
#define Y_RES 48
#elif defined(__VZ200__) // VZ200 / Laser 210 / Laser 110
#define X_RES 128
#define Y_RES 64
#elif defined(__TRS80__) && !defined(__EG2000__) // TRS-80
#define X_RES 128
#define Y_RES 48
#elif defined(__TRS80__) && defined(__EG2000__) // EG2000 (constant for this sub-type available since nightly 2018-03-31)
#define X_RES 160
#define Y_RES 100
#elif defined(__Z1013__) // Robotron Z1013
#define X_RES 64
#define Y_RES 64
#elif defined(__SHARPMZ__) // Sharp MZ-700
#define X_RES 80
#define Y_RES 50
#elif defined(__ABC80__) // Luxor ABC 80
#define X_RES 78
#define Y_RES 72
#elif defined(__NASCOM__) // Nascom
#define X_RES 96
#define Y_RES 48
#elif defined(__P2000__) // Philips P2000
#define X_RES 78
#define Y_RES 72
#elif defined(__Z9001__) // Robotron Z9001
#define X_RES 80
#define Y_RES 48
#else
#define X_RES 0
#define Y_RES 0
#endif
void main()
{
int x,y;
printf("%c",12); // clear the screen
printf("\n\n\n\n\n*** plot test (%d x %d) ***\n\n",X_RES,Y_RES);
printf("press any key to plot and unplot\n\n");
fgetc_cons(); // wait for keypress
#if defined(__VZ200__) || defined(__VG5000__) || defined(__ABC80__)
clg(); // activate graphics mode
printf("%c",12); // we clear the screen...
printf("\n\n",12); // ...and move a little down because otherwise the huge letters of the VZ200 and VG5000 graphics mode wouldn't fit on the screen
#endif
plot(1,1);
plot(3,3);
plot(5,5);
unplot(5,5);
plot(7,7);
printf("press any key to point-check\n\n");
fgetc_cons(); // wait for keypress
printf("point(3,3) (plotted) is %d\n",point(3,3)); // should be 1
printf("point(5,5) (unplotted) is %d\n",point(5,5)); // should be 0
printf("point(10,10) (blank) is %d\n",point(10,10)); // should be 0
// check if the screen dimensions for this platform have been defined above
if (X_RES>0 && Y_RES>0)
{
printf("\npress any key to draw border\n");
fgetc_cons(); // wait for keypress
for (x = 0; x < X_RES; ++x)
{
plot(x,Y_RES-1);
plot(x,0);
}
for (y = 1; y < Y_RES; ++y)
{
plot(0,y);
plot(X_RES-1,y);
}
}
printf("\npress any key to clear screen\n");
fgetc_cons(); // wait for keypress
printf("%c",12); // clear the screen
printf("done.\n");
fgetc_cons(); // wait for keypress
}
Ok, I have solved that now, I should have better read the documentation before asking: I need to add the -lgfx9001 parameter for lo-res graphics.RobertK wrote:Robotron Z9001: Compiler errors "symbol ?plot? not defined" when trying to compile with
zcc +z9001 -lm -o plottest_z9001 -create-app plottest.c
Code: Select all
=== Robotron Z9001 (80x48) === (almost ok)
zcc +z9001 -lm -lgfx9001 -o plottest_z9001 -create-app plottest.c
or
zcc +z9001 -lm -lgfx9001 -subtype=kcc -o plottest_z9001 -create-app plottest.c
Use JKCEMU for testing, there you can run either a .TAP or a .KCC file.
Note: combining -lgfx9001 and -clib=ansi...
zcc +z9001 -lm -lgfx9001 -clib=ansi -o plottest_z9001_ansi -create-app plottest.c
...works only on monochrome systems (on colour machines, characters cannot be
seen and plotted points are partly invisible)
Exactly, that was the difference! My game is compiled for ANSI mode, while the plot test program was not.stefano wrote:or the j ace you can try with the ansi clib variant (clib=ansi)
The clg() command was missing, thanks!stefano wrote:please confirm you are running the p2000 emulator in color mode (p2000c). the p2000m variant was 80 column text and is not supported. be sure to issue a clg() command, etc.
Maybe Marcel de Kogel would be interested to host it on his website? I hope he is still fine after so many years, his page was last updated in 2001...stefano wrote:you may also be interested in my p2000 emulator port to allegro, it is pre.built for but is surely easy to port on mac or linux.
my old webtite is gone, does anyone have a hint on where this stuff could be placed?
Code: Select all
/* Plot(), Unplot() and Point() Test by RobertK, 2018-04-13
Compile command for the following targets:
=== ZX81 (64?48) === (ok)
zcc +zx81 -startup=2 -Cz--disable-autorun -o plottest_ZX81 -create-app plottest.c
=== ZX80 (64?48) === (ok)
zcc +zx80 -o plottest_ZX80 -create-app plottest.c
Note: point() function was not working yet for this system
with 1.99B (calling it made the program crash), since nightly
build 2018-03-22 it works correctly.
=== Jupiter Ace (64x48) === (ok)
zcc +ace -lgfxace -clib=ansi -vn -create-app plottest.c -o pt.bin
Note: with 1.99B plotted points could not be seen, and the
point() function returned inverse values -> fixed since nightly
build 2018-03-28 (-lgfxace option added by Stefano for 64x48)
Last remaining issue: clearing the screen does not clear the
bottom line. Workaround: compiling with the paramter -clib=ansi for
VT100 ANSI mode solves the problem.
Load the program on the Jupiter Ace by typing:
0 0 bload pt.bin
=== Galaksija (64?48) === (ok)
zcc +gal -vn -create-app plottest.c -o plottest_galaksija.bin
Note: on the Galaksija computer type OLD to load a program from cassette.
=== VZ200 / Laser 210 / Laser 110 (128?64) === (ok)
zcc +vz -lm -pragma-redirect=fputc_cons=putc4x6 -o plottest_vz200.vz plottest.c
Note from the z88dk wiki: "The graphics mode is automatically switched on
by calling ?clg? or printing CHR$ 12 or calling the vz_mode() function."
We use clg() in this example.
Works correctly since nightly build 2018-03-31. Stefano:
"The VZ200. Its "operating system" (aka BASIC interpreter) is designed to switch
back to text mode as soon as a character is being printed.
After this nightly build you should have a new function in all the mid and low-rez
graphics drivers permitting to output some text in graphics mode.
You just need to add the following parameter in your zcc command line:"
-pragma-redirect=fputc_cons=putc4x6
=== TRS-80 (128?48) === (ok)
zcc +trs80 -lndos -lm -create-app -o plottest_trs80.bin -subtype=disk plottest.c
Clearing the screen does not work with 1.99B, since nightly build 2018-03-24
this works as well. Use the HT1080Z emulator for testing (select "Autostart file"
and open the .cmd file)
=== Robotron Z1013 (64?64) === (ok)
zcc +z1013 -lm -create-app plottest.c -o plottest_z1013
Note: top line (plotted pixel at 1,1) was not visible with 1.99B,
since nightly build 2018-03-22 it works correctly.
=== Robotron Z9001 (80x48) === (almost ok)
zcc +z9001 -lm -lgfx9001 -o plottest_z9001 -create-app plottest.c
or
zcc +z9001 -lm -lgfx9001 -subtype=kcc -o plottest_z9001 -create-app plottest.c
Use JKCEMU for testing, there you can run either a .TAP or a .KCC file.
Note: combining -lgfx9001 and -clib=ansi...
zcc +z9001 -lm -lgfx9001 -clib=ansi -o plottest_z9001_ansi -create-app plottest.c
...works only on monochrome systems (on colour machines, characters cannot be
seen and plotted points are partly invisible)
=== Philips VG5000 (80?72) === (ok)
zcc +vg5k -create-app -clib=graphics -lm plottest.c -o plottest_vg5000
Note: In 1.99B Plot() function displayed " characters instead of pixels.
New compile option -clib=graphics added since nightly build 2018-03-31.
Use the DCVG5K emulator (dcvg5k.free.fr) for testing
Attach the .k7 cassette file and type CLOAD to load the program
(note that the VG5000 has a French AZERTY keyboard so on most
other keyboard layouts you have to type CLOQD)
=== Mattel Aquarius (80?48) === (ok)
zcc +aquarius -lm -create-app plottest.c -o plottest_aquarius
Note: Everything works, except for that plotted pixels are not
all the same size. In the plot test the second pixel looks ok
while the first and third are too flat.
Stefano: "I saw a comment about odd pixels on the Mattel Aquarius.
Sadly there is very little we can do for it, the character set is
so fancy and unbalanced. The bottom right pixel in a 2x3 matrix is
totally missing while the bottom-right pixel in a 2x2 matrix is
repeated twice, this is something I really can't understand because
the font was accurately overloaded of any kind of different symbol
and a duplicate like this is very odd (chr 26 = chr 224).
By the way I added a graphics variant [in nightly build 2018-03-29]:
just use '-lgfxaq48' to bend your graphics resolution from 64x72
to 64x48 [should be 80x48], they are both compatible with the text mode."
-> looks good now, the plotted pixels are all the same size now
Use the "Virtual Aquarius" emulator for testing. Loading
instructions from the z88dk wiki:
from within the emulator, load the loader: cload
press ENTER twice, then play the ?_plottest_aquarius.caq? cassette file (loader)
at the ?OK? prompt, type RUN <ENTER>
press ENTER twice, then play the ?plottest_aquarius.caq? cassette file
wait? then have fun !
=== EG2000 (160?100) ===
zcc +trs80 -lndos -lm -create-app -subtype=eg2000disk -pragma-redirect=fputc_cons=putc4x6 -o plottest_eg2000.bin plottest.c
Note: plotted points could not be seen with 1.99B. New compile option
-pragma-redirect=fputc_cons=putc4x6 added in nightly build 2018-04-05.
Last remaining issues: screen is shifted towards the bottom
so that the bottom line of the border cannot be seen. Clearing the screen
does not work.
Use the Genieous emulator (gaia.atilia.eu) for testing. See the TRS-80
loading instructions above (use "Autostart file" after entering SYSTEM)
=== Sharp MZ-700 (80?50) === (ok)
zcc +mz -lm -create-app plottest.c -o plottest_sharpmz
Note: clearing the screen does not work in 1.99B, fixed since
nightly build 2018-03-29
In M.A.M.E. attach The .mzt cassette file, then press L and Enter
to initiate loading, then use M.A.M.E.'s tape control to start the tape.
=== Philips P2000 (78?72) ===
zcc +p2000 -o plottest_p2000 -create-app -lm plottest.c
M.A.M.E. (tested with 0.170 and 0.196) does not allow to load software on that system.
Tested with the M2000 emulator for DOS (in DOSBox), use the -tape <filename> option to
attach the .cas file, load it with "cload" and then type "run".
Issues:
- last visible y coordinate is 69. Plotted points in lines 70, 71 and 72 cannot be seen.
- when plotting over a character, another character appears instead of the plotted pixel.
=== ABC80 (78?72) === (still to be tested)
zcc +abc80 -lm -o plottest_abc80 -create-app plottest.c
Note from z88dk Wiki: "The pseudo graphics mode is supported. You first
need to issue a clg () command to set up the graphics page."
.BAC or .BAS file can be quickloaded and listed in M.A.M.E., but cannot be run
=== Nascom (96?48) === (still to be tested)
zcc +nascom -lm -o plottest_nascom -create-app plottest.c
(.nas file can be successfully loaded in M.A.M.E. in
both Nascom 1 and Nascom 2, but what to do next?)
*/
#include <stdio.h> // required for printf()
#include <graphics.h> // contains plot() and point() functions
// define the screen dimensions for the current system
#if defined(__ZX81__) || defined(__ZX80__) || defined(__ACE__) || defined(__GAL__) // ZX81, ZX80, Jupiter Ace, Galaksija
#define X_RES 64
#define Y_RES 48
#elif defined(__VG5000__) // Philips VG5000
#define X_RES 80
#define Y_RES 72
#elif defined(__AQUARIUS__) // Mattel Aquarius
#define X_RES 80
#define Y_RES 48
#elif defined(__VZ200__) // VZ200 / Laser 210 / Laser 110
#define X_RES 128
#define Y_RES 64
#elif defined(__TRS80__) && !defined(__EG2000__) // TRS-80
#define X_RES 128
#define Y_RES 48
#elif defined(__TRS80__) && defined(__EG2000__) // EG2000 (constant for this sub-type available since nightly 2018-03-31)
#define X_RES 160
#define Y_RES 100
#elif defined(__Z1013__) // Robotron Z1013
#define X_RES 64
#define Y_RES 64
#elif defined(__SHARPMZ__) // Sharp MZ-700
#define X_RES 80
#define Y_RES 50
#elif defined(__ABC80__) // Luxor ABC 80
#define X_RES 78
#define Y_RES 72
#elif defined(__NASCOM__) // Nascom
#define X_RES 96
#define Y_RES 48
#elif defined(__P2000__) // Philips P2000
#define X_RES 78
#define Y_RES 72 // 69 is the last visible y coordinate
#elif defined(__Z9001__) // Robotron Z9001
#define X_RES 80
#define Y_RES 48
#else
#define X_RES 0
#define Y_RES 0
#endif
void main()
{
int x,y;
printf("%c",12); // clear the screen
printf("\n\n\n\n\n*** plot test (%d x %d) ***\n\n",X_RES,Y_RES);
printf("press any key to plot and unplot\n\n");
fgetc_cons(); // wait for keypress
#if defined(__P2000__) || defined(__ABC80__)
clg(); // activate graphics mode
#elif defined(__VZ200__) || defined(__VG5000__)
clg(); // activate graphics mode
printf("%c",12); // we clear the screen...
printf("\n\n",12); // ...and move a little down because otherwise the huge letters of the VZ200 and VG5000 graphics mode wouldn't fit on the screen
#endif
plot(1,1);
plot(3,3);
plot(5,5);
unplot(5,5);
plot(7,7);
printf("press any key to point-check\n\n");
fgetc_cons(); // wait for keypress
printf("point(3,3) (plotted) is %d\n",point(3,3)); // should be 1
printf("point(5,5) (unplotted) is %d\n",point(5,5)); // should be 0
printf("point(10,10) (blank) is %d\n",point(10,10)); // should be 0
// check if the screen dimensions for this platform have been defined above
if (X_RES>0 && Y_RES>0)
{
printf("\npress any key to draw border\n");
fgetc_cons(); // wait for keypress
for (x = 0; x < X_RES; ++x)
{
plot(x,Y_RES-1);
plot(x,0);
}
for (y = 1; y < Y_RES; ++y)
{
plot(0,y);
plot(X_RES-1,y);
}
}
printf("\npress any key to clear screen\n");
fgetc_cons(); // wait for keypress
printf("%c",12); // clear the screen
printf("done.\n");
fgetc_cons(); // wait for keypress
}
Ok, so I have to compile it like this...stefano wrote:Reason for this last evidenced P2000 behavior is that text and graphics cannot be mixed on the P2000.
Code: Select all
#if defined(__VZ200__) || defined(__VG5000__) || defined(__P2000__)
x_4x6 = 19;
y_4x6 = 9;
printf("testing 4x6...\n\n");
#endif
No change unfortunately, and a problem with the point() function:stefano wrote:P2000 coordinates bug should be fixed.
Please check tomorrow, after the nightly build.
When running the compiled .cmd file in the Genieous emulator it only shows some underscore character in the top left part of the screen. Calling clg() does not help.stefano wrote:EG2000 needed some cleanup (sprites, etc..). I adjusted also the clg() command but I still see an oddly shifted display which I'm quite sure being a feature of the genieous emulator.
Code: Select all
/* Plot(), Unplot() and Point() Test by RobertK, 2018-04-20
Compile command for the following targets:
=== ZX81 (64?48) === (ok)
zcc +zx81 -startup=2 -Cz--disable-autorun -o plottest_ZX81 -create-app plottest.c
=== ZX80 (64?48) === (ok)
zcc +zx80 -o plottest_ZX80 -create-app plottest.c
Note: point() function was not working yet for this system
with 1.99B (calling it made the program crash), since nightly
build 2018-03-22 it works correctly.
=== Jupiter Ace (64x48) === (ok)
zcc +ace -lgfxace -clib=ansi -vn -create-app plottest.c -o pt.bin
Note: with 1.99B plotted points could not be seen, and the
point() function returned inverse values -> fixed since nightly
build 2018-03-28 (-lgfxace option added by Stefano for 64x48)
Last remaining issue: clearing the screen does not clear the
bottom line. Workaround: compiling with the paramter -clib=ansi for
VT100 ANSI mode solves the problem.
Load the program on the Jupiter Ace by typing:
0 0 bload pt.bin
=== Galaksija (64?48) === (ok)
zcc +gal -vn -create-app plottest.c -o plottest_galaksija.bin
Note: on the Galaksija computer type OLD to load a program from cassette.
=== VZ200 / Laser 210 / Laser 110 (128?64) === (ok)
zcc +vz -lm -pragma-redirect=fputc_cons=putc4x6 -o plottest_vz200.vz plottest.c
Note from the z88dk wiki: "The graphics mode is automatically switched on
by calling ?clg? or printing CHR$ 12 or calling the vz_mode() function."
We use clg() in this example.
Works correctly since nightly build 2018-03-31. Stefano:
"The VZ200. Its "operating system" (aka BASIC interpreter) is designed to switch
back to text mode as soon as a character is being printed.
After this nightly build you should have a new function in all the mid and low-rez
graphics drivers permitting to output some text in graphics mode.
You just need to add the following parameter in your zcc command line:"
-pragma-redirect=fputc_cons=putc4x6
=== TRS-80 (128?48) === (ok)
zcc +trs80 -lndos -lm -create-app -o plottest_trs80.bin -subtype=disk plottest.c
Clearing the screen does not work with 1.99B, since nightly build 2018-03-24
this works as well. Use the HT1080Z emulator for testing (select "Autostart file"
and open the .cmd file)
=== Robotron Z1013 (64?64) === (ok)
zcc +z1013 -lm -create-app plottest.c -o plottest_z1013
Note: top line (plotted pixel at 1,1) was not visible with 1.99B,
since nightly build 2018-03-22 it works correctly.
=== Robotron Z9001 (80x48) === (almost ok)
zcc +z9001 -lm -lgfx9001 -o plottest_z9001 -create-app plottest.c
or
zcc +z9001 -lm -lgfx9001 -subtype=kcc -o plottest_z9001 -create-app plottest.c
Use JKCEMU for testing, there you can run either a .TAP or a .KCC file.
Note: combining -lgfx9001 and -clib=ansi...
zcc +z9001 -lm -lgfx9001 -clib=ansi -o plottest_z9001_ansi -create-app plottest.c
...works only on monochrome systems (on colour machines, characters cannot be
seen and plotted points are partly invisible)
=== Philips VG5000 (80?72) === (ok)
zcc +vg5k -create-app -clib=graphics -lm plottest.c -o plottest_vg5000
Note: In 1.99B Plot() function displayed " characters instead of pixels.
New compile option -clib=graphics added since nightly build 2018-03-31.
Use the DCVG5K emulator (dcvg5k.free.fr) for testing
Attach the .k7 cassette file and type CLOAD to load the program
(note that the VG5000 has a French AZERTY keyboard so on most
other keyboard layouts you have to type CLOQD)
=== Mattel Aquarius (80?48) === (ok)
zcc +aquarius -lm -create-app plottest.c -o plottest_aquarius
Note: Everything works, except for that plotted pixels are not
all the same size. In the plot test the second pixel looks ok
while the first and third are too flat.
Stefano: "I saw a comment about odd pixels on the Mattel Aquarius.
Sadly there is very little we can do for it, the character set is
so fancy and unbalanced. The bottom right pixel in a 2x3 matrix is
totally missing while the bottom-right pixel in a 2x2 matrix is
repeated twice, this is something I really can't understand because
the font was accurately overloaded of any kind of different symbol
and a duplicate like this is very odd (chr 26 = chr 224).
By the way I added a graphics variant [in nightly build 2018-03-29]:
just use '-lgfxaq48' to bend your graphics resolution from 64x72
to 64x48 [should be 80x48], they are both compatible with the text mode."
-> looks good now, the plotted pixels are all the same size now
Use the "Virtual Aquarius" emulator for testing. Loading
instructions from the z88dk wiki:
from within the emulator, load the loader: cload
press ENTER twice, then play the ?_plottest_aquarius.caq? cassette file (loader)
at the ?OK? prompt, type RUN <ENTER>
press ENTER twice, then play the ?plottest_aquarius.caq? cassette file
wait? then have fun !
=== Sharp MZ-700 (80?50) === (ok)
zcc +mz -lm -create-app plottest.c -o plottest_sharpmz
Note: clearing the screen does not work in 1.99B, fixed since
nightly build 2018-03-29
In M.A.M.E. attach The .mzt cassette file, then press L and Enter
to initiate loading, then use M.A.M.E.'s tape control to start the tape.
=== EG2000 (160?100) === (probably ok)
zcc +trs80 -lndos -lm -create-app -subtype=eg2000disk -pragma-redirect=fputc_cons=putc4x6 -o plottest_eg2000.bin plottest.c
Note: plotted points could not be seen with 1.99B. New compile option
-pragma-redirect=fputc_cons=putc4x6 added in nightly build 2018-04-05.
Use the Genieous emulator (gaia.atilia.eu) for testing. See the TRS-80
loading instructions above (use "Autostart file" after entering SYSTEM).
Last remaining issues: screen is shifted towards the bottom so that the bottom line
of the border cannot be seen. Stefano: "I still see an oddly shifted display which I'm
quite sure being a feature of the genieous emulator.
=== Philips P2000 (78?72) === (ok)
zcc +p2000 -pragma-redirect=fputc_cons=putc4x6 -o plottest_p2000g -create-app -lm plottest.c
M.A.M.E. (tested with 0.170 and 0.196) does not allow to load software on that system.
Tested with the M2000 emulator for DOS (in DOSBox), use the -tape <filename> option to
attach the .cas file, load it with "cload" and then type "run".
Stefano: "text and graphics cannot be mixed on the P2000. As on the vg5000 it uses the same
videochip designed for the "TELETEXT" TV service (known in Italy as TELEVIDEO), later adopted
also by the French "MINITEL" (known in Italy as "VIDEOTEL", or "PRESTEL" in the UK).
It works on a text row base, where a first control character determines the output mode for
the whole text row (e.g. TEXT versus GRAPHICS). The Graphics mode is just a different font
configured for the well known blocky low resolution.
So.. you can still try to apply some target specific trick to force text or graphics
content on selected rows (I could provide a clg variant acting on a single row specified),
or you try to fit the new 4x6 font mode."
-> 4x6 parameter added to the compile command above.
Everything works correctly since nightly build 2018-04-20.
=== ABC80 (78?72) === (still to be tested)
zcc +abc80 -lm -o plottest_abc80 -create-app plottest.c
Note from z88dk Wiki: "The pseudo graphics mode is supported. You first
need to issue a clg () command to set up the graphics page."
.BAC or .BAS file can be quickloaded and listed in M.A.M.E., but cannot be run
=== Nascom (96?48) === (still to be tested)
zcc +nascom -lm -o plottest_nascom -create-app plottest.c
(.nas file can be successfully loaded in M.A.M.E. in
both Nascom 1 and Nascom 2, but what to do next?)
*/
#include <stdio.h> // required for printf()
#include <graphics.h> // contains plot() and point() functions
void main()
{
int x,y;
int xMax, yMax;
// determine the screen dimensions for this system
// coordinates go from 0 to this max value
xMax=getmaxx();
yMax=getmaxy();
printf("%c",12); // clear the screen
printf("\n\n\n\n\n*** plot test (%d x %d) ***\n\n",xMax+1,yMax+1);
printf("press any key to plot and unplot\n\n");
fgetc_cons(); // wait for keypress
#if defined(__ABC80__) || defined(__EG2000__)
clg(); // activate graphics mode
#elif defined(__VZ200__) || defined(__VG5000__) || defined(__P2000__)
clg(); // activate graphics mode
printf("%c",12); // we clear the screen...
printf("\n\n",12); // ...and move a little down because otherwise the huge 4x6 letters wouldn't fit on the screen
#endif
plot(1,1);
plot(3,3);
plot(5,5);
unplot(5,5);
plot(7,7);
printf("press any key to point-check\n\n");
fgetc_cons(); // wait for keypress
printf("point(3,3) (plotted) is %d\n",point(3,3)); // should be 1
printf("point(5,5) (unplotted) is %d\n",point(5,5)); // should be 0
printf("point(10,10) (blank) is %d\n",point(10,10)); // should be 0
// check if the screen dimensions for this platform have been defined above
if (xMax>0 && yMax>0)
{
printf("\npress any key to draw border\n");
fgetc_cons(); // wait for keypress
for (x = 0; x <=xMax; ++x)
{
plot(x,yMax);
plot(x,0);
}
for (y = 1; y <=yMax; ++y)
{
plot(0,y);
plot(xMax,y);
}
}
printf("\npress any key to clear screen\n");
fgetc_cons(); // wait for keypress
printf("%c",12); // clear the screen
printf("done.\n");
fgetc_cons(); // wait for keypress
}
It's processing a file "lgfxtrs80" that doesn't exist. It looks like the command line has "lgfxtrs80" instead of "-lgfxtrs80" to link that as a library. But lib/config/trs80.cfg still has the minus there in subtype disk.RobertK wrote:BTW, it seems that compiling for the TRS-80 with the subtype "disk" is broken now. With yesterdays nightly when you compile like this...
zcc +trs80 -lndos -lm -create-app -o plottest_trs80.bin -subtype=disk plottest.c
...at this step...
PROCESSING lgfxtrs80.asm.m4
m4 -I "C:\Misc\z88dk\lib\config\\..\..\\lib\target\trs80\classic" -I "C:\Misc\z88dk\lib\config\\..\..\/src/m4" < "lgfxtrs80.asm.m4" > "C:\Users\ws09.PSC\AppData\Local\Temp\zccD5B53"
...you get a "file not found" error. Without the subtype parameter it works.
Hmm, I tried if maybe a 160x100 screen would be shown entirely on the Genieous emulator screen, but it wasn't. The last visible line is 95, that means a 160x96 fits on the screen.stefano wrote:FYI, a new behaviour is now present on the EG2000, the graphics try to work with a 160x102 resolution, but the earlier models would show only the first 100 lines.
Code: Select all
#if defined(__EG2000__)
if (yMax==101) yMax=95;
#endif
No, it was a problem in one of the nightly builds that you have already fixed, see your reply #26. For the TRS-80 target everything works fine again.alvin wrote:It's processing a file "lgfxtrs80" that doesn't exist. It looks like the command line has "lgfxtrs80" instead of "-lgfxtrs80" to link that as a library. But lib/config/trs80.cfg still has the minus there in subtype disk.