Radastan Mode - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: Help & Support (https://www.boriel.com/forum/forumdisplay.php?fid=16) +---- Thread: Radastan Mode (/showthread.php?tid=739) |
Radastan Mode - PeekPoke - 07-15-2016 Hi to all members of this forum, Are there tutorials on how to use Radastan Mode ( 128 x 96 pixels, 16 colours) with ZX Basic please ? Thank you very much. Re: Radastan Mode - Uto - 07-18-2016 Depends on what you need: Activating the mode radastan mode needs exactly the same you need with Sinclair Basic, these two OUTs if you are using the latest core version: OUT 64571,64 OUT 64827,3 Changing palette is also the same, if you are using ULAPlus: OUT 48955, 64: OUT 65339, 1 and then OUT 48955, n: OUT 65339, x per each color from 0 to 15, where n is the color number and x is the GGGRRRBB value. But if you need using BASIC drawing functions as PLOT, DRAW, CIRCLE, then they won't work at all. Also INK won't work. I don't think it would be too difficult to build a PLOT primitive with inline assembler, but I'm not sure if such functions make any sense in radastan mode, which is basically made for games, so you will be using sprites rather than lines and circles. Re: Radastan Mode - boriel - 07-18-2016 Uto Wrote:Depends on what you need:That's strange, because PLOT, DRAW, CIRCLE are built almost inline (no ROM calls). I don't own a ZX Uno, but maybe someone can have a look on what's going on so I can fix it. Even more, the routines for these are implemented in the library-asm/ draw.asm, circle.asm and plot.asm files. If you can fix them I can include them in future releases. Just use #ifdef at the beginning, and define your own macro. (i.e. #ifdef ZXUNO ) Re: Radastan Mode - Uto - 07-18-2016 I actually haven't tried, but I doubt they work, cause Radastan mode: - Represents each pixel with 4 bits, that defines the color (0-15) while normal Spectrum uses 1 bit per pixel, and attributes are located after the first 6144 bytes that define the pixels. - It's linear, meaning that after the data for 1st line, comes the date for 2nd line. In a normal Spectrum after data for 1st line, comes data for 8th line. ZesarUX emulator emulates ZX-Uno pretty good, including Radastan mode, so I guess all can be tested, but be ready for a completely different video mode. Re: Radastan Mode - boriel - 07-18-2016 Uto Wrote:I actually haven't tried, but I doubt they work, cause Radastan mode:Nice to know. Then I will check ZesarUX. In the meantime, if anyone "dares" to port the plot.asm circle.asm and draw.asm routines... Re: Radastan Mode - Uto - 07-18-2016 This is a fast sample, including a basic implemented plot routine. I'm sure is not the most optimized code, but I hope it's clarifiying: Code: SUB RadastanMode(active as UByte) '1=activate, 0=deactivate Re: Radastan Mode - boriel - 07-18-2016 Uto Wrote:This is a fast sample, including a basic implemented plot routine. I'm sure is not the most optimized code, but I hope it's clarifiying:Definitely, thanks!! What happens when you use Radastan Mode = 0? Re: Radastan Mode - Uto - 07-18-2016 boriel Wrote:Definitely, thanks!!Back to normal video mode, otherwise you can't even see the "OK 30:1" message as the routines to print chars aren't prepared either for Radastan mode. Re: Radastan Mode - boriel - 07-18-2016 Uto Wrote:Ok. And how can you PRINT in Radastan's mode? Have you got another routine?boriel Wrote:Definitely, thanks!!Back to normal video mode, otherwise you can't even see the "OK 30:1" message as the routines to print chars aren't prepared either for Radastan mode. Re: Radastan Mode - Uto - 07-18-2016 boriel Wrote:Uto Wrote:Ok. And how can you PRINT in Radastan's mode? Have you got another routine?boriel Wrote:Definitely, thanks!!Back to normal video mode, otherwise you can't even see the "OK 30:1" message as the routines to print chars aren't prepared either for Radastan mode. No sorry, in fact I don't have any routines, the ones I posted before I did just in 15-20 mins. The fact is Radastan mode is so different to other modes than nothing that writes to video RAM works the same, so printing fails, draw fails, character fails, etc. I think there is an SDK for Radastan mode for z88dk C compiler, maybe its source code is helpful. Re: Radastan Mode - LCD - 07-19-2016 The mode is similar to SAM Coupe mode 4, so maybe the sprote routine (with masking) can be adapted. The difference is, tat each line has not 128 Bytes, but 64. |