Robotron Z1013: KRT Highres Graphics
Robotron Z1013: KRT Highres Graphics
There have been three different approaches to add highres graphics to the Z1013:
https://hc-ddr.hucki.net/wiki/doku.php/ ... vollgrafik
KRT graphics is implemented in the JKCEMU emulator ("Extras" -> "Einstellungen" -> Z1013 -> "Erweiterungen" -> "Vollgrafikkarte nach KRT 11 und FA 7/91").
Documentation can be found here (in German, I can help with translation if required):
https://github.com/anchorz/sdcc-z1013-k ... master/doc
Z1013_KRT_11_Grafik.png
Z1013_FA791_1.png
Z1013_FA791_2.png
Z1013_FA791_3.png
It would be nice to have KRT graphics support for the Z1013 target.
Could maybe some parts of the code from here be reused?
https://github.com/anchorz/sdcc-z1013-kc85
https://hc-ddr.hucki.net/wiki/doku.php/ ... vollgrafik
KRT graphics is implemented in the JKCEMU emulator ("Extras" -> "Einstellungen" -> Z1013 -> "Erweiterungen" -> "Vollgrafikkarte nach KRT 11 und FA 7/91").
Documentation can be found here (in German, I can help with translation if required):
https://github.com/anchorz/sdcc-z1013-k ... master/doc
Z1013_KRT_11_Grafik.png
Z1013_FA791_1.png
Z1013_FA791_2.png
Z1013_FA791_3.png
It would be nice to have KRT graphics support for the Z1013 target.
Could maybe some parts of the code from here be reused?
https://github.com/anchorz/sdcc-z1013-kc85
Re: Robotron Z1013: KRT Highres Graphics
When using -lgfx9001gfx for the Z1013, it compiles without error, but instead of graphics primitives some characters appear.
Getmaxx() and Getmaxy() report the Z9001 highres resoulution 320x192 instead of 256x256.
Attached is my simplified plot test from 2018 (ignore the bugs mentioned in the comments, I think most of that has been fixed).
Getmaxx() and Getmaxy() report the Z9001 highres resoulution 320x192 instead of 256x256.
Attached is my simplified plot test from 2018 (ignore the bugs mentioned in the comments, I think most of that has been fixed).
I have just upgraded to the current JKCEMU version, the settings screen has slightly changed (and "Spectrum graphics" is now emulated as well):
You do not have the required permissions to view the files attached to this post.
Re: Robotron Z1013: KRT Highres Graphics
I'll try to take a look at this over the coming days. And thanks for the screenshot it's answered a question I had about whether KRT and the regular display could coexist.
I'm definitely not kicking the can down the road on the CPC work....
I'm definitely not kicking the can down the road on the CPC work....
Re: Robotron Z1013: KRT Highres Graphics
I've just merged a KRT driver that works on both the z1013 and z9001.
This provides a unified driver for both graphics and generic console that switches between the normal text mode and KRT hires graphics. A nice feature on the z9001 is that colour (on an 8x8px basis) is supported. The respective wiki pages have had some minor updates to detail the screenmdoes.
The way the screen is addressed is quite interesting - the 1k window is banked over the regular text display memory and to go down a pixel row (within an 8x8 character) you just change the paged in graphics bank. Although the principle is similar, the port driving is different and because of the different stride there wasn't a huge amount of portability.
I noticed an issue with the latest jkcemu: I couldn't get .tap program to autostart on the z9001, reverting to 0.9.7 restored the behaviour.
This provides a unified driver for both graphics and generic console that switches between the normal text mode and KRT hires graphics. A nice feature on the z9001 is that colour (on an 8x8px basis) is supported. The respective wiki pages have had some minor updates to detail the screenmdoes.
The way the screen is addressed is quite interesting - the 1k window is banked over the regular text display memory and to go down a pixel row (within an 8x8 character) you just change the paged in graphics bank. Although the principle is similar, the port driving is different and because of the different stride there wasn't a huge amount of portability.
I noticed an issue with the latest jkcemu: I couldn't get .tap program to autostart on the z9001, reverting to 0.9.7 restored the behaviour.
Re: Robotron Z1013: KRT Highres Graphics
Fantastic, thanks Dom!
Two questions/issues:
1. Z1013: can the screen colours be inverted to white on black?
I've tried...
...but this has no effect.
2. Z9001: plottest.c works, but sprites are not functional yet, compiling grtest.c gives these errors:
Attached is the updated grtest.c package.
Two questions/issues:
1. Z1013: can the screen colours be inverted to white on black?
I've tried...
Code: Select all
textcolor(WHITE);
textbackground(BLACK);
2. Z9001: plottest.c works, but sprites are not functional yet, compiling grtest.c gives these errors:
Code: Select all
target/z9001/graphics/putsprite.asm:60: error: undefined symbol: pixeladdress
^---- pixeladdress
target/z9001/graphics/putsprite.asm:112: error: undefined symbol: zx_saddrpdown
^---- zx_saddrpdown
Indeed, I will report that to the author.
You do not have the required permissions to view the files attached to this post.
Re: Robotron Z1013: KRT Highres Graphics
I had a feeling you might ask that about the z1013 graphics. Consider it done - it's a total flip (since it's a B&W machine), so nothing to tune.
The z9001 was confusing me for a while: I'm certain it was working the other night, but today it just ended up crashing. It turns out the keyboard scanning routines were calling directly into ROM rather than using the CP/M style vector. I've now fixed that up (I hope) and sorted out the putsprite issue.
Hopefully that's enough to be considered working now.
Is it worth supporting any of the other graphics cards? How common were they?
The z9001 was confusing me for a while: I'm certain it was working the other night, but today it just ended up crashing. It turns out the keyboard scanning routines were calling directly into ROM rather than using the CP/M style vector. I've now fixed that up (I hope) and sorted out the putsprite issue.
Hopefully that's enough to be considered working now.
Is it worth supporting any of the other graphics cards? How common were they?
Re: Robotron Z1013: KRT Highres Graphics
Hmm, did you commit your changes? The Z1013 screen colours are still unchanged, and the Z9001 compiler error is still there. Last night's build was however successful.
All I know is that the Spectrum graphics was very complicated to build, and KRT was very simple (only four ICs), so I believe that KRT was far more common.
I have never seen a Robotron computer in real life, but I will ask on the forum.
All I know is that the Spectrum graphics was very complicated to build, and KRT was very simple (only four ICs), so I believe that KRT was far more common.
Re: Robotron Z1013: KRT Highres Graphics
I'm an idiot, I ended up doing the changes in a branch. I've now merged it across. So hopefully next time....
Re: Robotron Z1013: KRT Highres Graphics
No problem about the delay. Z1013 is perfect now, thanks!
Z9001 KRT graphics is perfect as well, but every fgetc_cons() call makes the program crash, sometimes the screen gets filled with dots on each character position. You can reproduce it with grtest.c, the crash happens after the text "Press any key to clear screen" appears.
P.S. The JKCEMU emulator issue with the non-autostarting Z9001 TAP files is a bug, the author will fix it for the next release.
Z9001 KRT graphics is perfect as well, but every fgetc_cons() call makes the program crash, sometimes the screen gets filled with dots on each character position. You can reproduce it with grtest.c, the crash happens after the text "Press any key to clear screen" appears.
P.S. The JKCEMU emulator issue with the non-autostarting Z9001 TAP files is a bug, the author will fix it for the next release.
Re: Robotron Z1013: KRT Highres Graphics
The z9001 one is weird, I was testing on 0.9.7 and I had to change the keyboard routines since they were just hanging when KRT graphics was turned on - I thought that maybe the ROM was different and we were using non-public entry points.
The filling with dots is the effect of filling the text memory with " " which you normally get after the program exits and the monitor program takes over again.
Are you using 0.9.7 or the latest?
The filling with dots is the effect of filling the text memory with " " which you normally get after the program exits and the monitor program takes over again.
Are you using 0.9.7 or the latest?
Re: Robotron Z1013: KRT Highres Graphics
Ok, then that's the result of the program crashing without switching back to text mode.
0.9.7, since I don't know how to start the program if it does not auto-start.
Re: Robotron Z1013: KRT Highres Graphics
This one was fun...
It looks like the z9001 monitor uses 64 bytes at the end of the text screen to store state and vectors used by the monitor firmware. When graphics is enabled that memory isn't available (since it's replaced with the graphics memory) so any firmware calls end up effectively in space.
I've added some copying code to duplicate those variables into the KRT graphics memory and things now appear to be working
It looks like the z9001 monitor uses 64 bytes at the end of the text screen to store state and vectors used by the monitor firmware. When graphics is enabled that memory isn't available (since it's replaced with the graphics memory) so any firmware calls end up effectively in space.
I've added some copying code to duplicate those variables into the KRT graphics memory and things now appear to be working
Re: Robotron Z1013: KRT Highres Graphics
I thought it worked in the past ? Sorry for leaving you alone in this kind of mess.
Re: Robotron Z1013: KRT Highres Graphics
No worries, I think it had the appearance of working - it caught me out as well since I thought it was good for the tests I was running.
It's all good fun, now I'm moving onto restoring the accelerated code you wrote.
It's all good fun, now I'm moving onto restoring the accelerated code you wrote.
Re: Robotron Z1013: KRT Highres Graphics
putsprite() and stencil_rende()r now have fast path versions for the hires modes.
Z9001 shows some fantastic colour clash as an added bonus.
Z9001 shows some fantastic colour clash as an added bonus.
Re: Robotron Z1013: KRT Highres Graphics
Can't wait to try it, but the binaries in the current nightly are from yesterday 4:07...
Re: Robotron Z1013: KRT Highres Graphics
Sorry I broke the build with some code which didn't compile for Windows. Fingers crossed for tonights build.
Re: Robotron Z1013: KRT Highres Graphics
The Z9001 look almost perfect now. But I can't get Deepspace to work, it crashes when the game starts. On one occasion it crashed when I picked up fuel for the first time. Attached is a WIP version.
I have tested joystick input separately (both in text and graphics mode), this works without any problem. And also 1-Bit Sound (sound needs to be activated in JKCEMU like this: Extras -> Audio/Kassette -> third Tab "Ausgang Sound-Generator/Lautsprecher" -> Aktivieren).
The Z9001 target only supports Joystick 1 and 2 for virtual joystick input, you will need a USB joystick/gamepad for testing with JKCEMU (Extras -> Joysticks -> "Verbinden" when a USB-Joystick is connected) . BTW, QAOP-NM would be nice to have and would make testing easier.
I have tested joystick input separately (both in text and graphics mode), this works without any problem. And also 1-Bit Sound (sound needs to be activated in JKCEMU like this: Extras -> Audio/Kassette -> third Tab "Ausgang Sound-Generator/Lautsprecher" -> Aktivieren).
The Z9001 target only supports Joystick 1 and 2 for virtual joystick input, you will need a USB joystick/gamepad for testing with JKCEMU (Extras -> Joysticks -> "Verbinden" when a USB-Joystick is connected) . BTW, QAOP-NM would be nice to have and would make testing easier.
You do not have the required permissions to view the files attached to this post.
Re: Robotron Z1013: KRT Highres Graphics
Your wish etc....
I've added qaop-mn as a keyboard joystick and fixed up the crash behaviour - an unbalanced stack when printing the fuel sprite it seems.
I've added qaop-mn as a keyboard joystick and fixed up the crash behaviour - an unbalanced stack when printing the fuel sprite it seems.
Re: Robotron Z1013: KRT Highres Graphics
Now everything is fine, mission accomplished!
BTW, yesterday's graphics speed improvement on both targets is impressive!
And thanks for QAOP-NM! I've noticed that the Z9001 seems to require some CP/M-like keyboard polling which slows down gameplay a little (with joystick control gameplay is faster), but we can live with that.
BTW, yesterday's graphics speed improvement on both targets is impressive!
And thanks for QAOP-NM! I've noticed that the Z9001 seems to require some CP/M-like keyboard polling which slows down gameplay a little (with joystick control gameplay is faster), but we can live with that.
Re: Robotron Z1013: KRT Highres Graphics
" yesterday's graphics speed improvement on both targets is impressive!"
Re: Robotron Z1013: KRT Highres Graphics
I've just noticed that some time ago Jens has released version 0.9.8.3 of his emulator in which the Z9001 autostart issue has been fixed, so we can use the latest release again:
http://www.jens-mueller.org/jkcemu/download.html