Programming: How to get full screen grpahics in BASIC?
Alex Farlie (1992) 44 posts |
Hi. I was considering porting some BBC BASIC code in BASIC V. (The code is of 1990 or so vintage) So the question is, Typing MODE x in a TASK window after *BASIC didn’t do anything. (which isn’t unexpected) I’m using the IOMD 5.20 ROM with the latest version of RPCEmu if that helps. |
Martin Avison (27) 1494 posts |
Have you tried it NOT in a task window?! eg double-click a saved Basic program in a filer window which contains the MODE command … and probably something else! In a Task Window you are trying to set the MODE for that window … which does not work (apart from clearing the task Window). The vast majority of BBC BASIC code will just work. |
Alex Farlie (1992) 44 posts |
Thanks Under previous versions of RISC OS, you could exit the DESKTOP and you got full screen graphics Some further questions can probably be explained with reference to the PRM. (next problem , How to do a screendump… *SCREENSAVE works? ) |
Holger Palmroth (487) 115 posts |
A simple press of the F12 takes you out of the Desktop, like it always was the case. I don’t see why SCREENSAVE shouldn’t work, might try it out after tonight’s rocket assaults and a bit of sleep. |
Bryan Hogan (339) 593 posts |
Another option is to download Graphtask, which provides a taskwindow that supports all the graphics commands: http://www.armclub.org.uk/free/ This has the added benefit of supporting all the old style screen modes that most modern monitors can’t display. |
Alex Farlie (1992) 44 posts |
Does anyone know how to contact the developers of !GrpahTask as it seems to allow me to write broadly simmilar code between ARM BASIC V and BB4W 5 :) |
Steve Pampling (1551) 8172 posts |
GraphTask is by Dave Ruck – as per the information on the top of the download page for GraphTask. The contact e-mail is at the top right :) |
Alex Farlie (1992) 44 posts |
I’ve sent Dave Ruck an e-mail about GraphTask. Elsewhere on this forum there is a thread about adding VIDC1 emulation (which in respect of BASIC, Grpah task seems to cope with to some extent already.) |
Holger Palmroth (487) 115 posts |
How does VIDC1 emulation comes in here? Pretty much everything you do in BASIC is possible on every RISC OS platform. The most notable lack is that on some platforms the 2 – 16 colour modes are missing. This is catered by GraphTask, anyway and if you want to go literally fullscreen, you can always use the 256 colour modes, which have fully programmable palettes since the days of the RISC PC. The only limitation in 256 colours might be that the colours can’t blink. (I could be wrong about that last point.) |
Steve Pampling (1551) 8172 posts |
It looks like he’s trying to replicate the behaviour of the old Archimedes range. The real question is, for new stuff: Why? |
David J. Ruck (33) 1636 posts |
GraphTask allows simple pre-Risc PC (i.e Archimedes and BBC B BASIC) programs to run in multi-tasking window on the desktop. It uses the TaskWindow module to run the program, and takes the VDU output captured by by the TaskWindow and plots it in to a sprite. It intercepts VDU 22 mode changes and VDU 19 palette changes in order to set up the correct sized sprite with the desired palette. It sends VDU input and mouse input (corrected for window position and scaling) back to the program. What it doesn’t support is non-numbered modes (i.e. >256 colours) or any form of writing to the screen which involves calling a SWI such as Draw, Sprite, Font, ColourTrans etc. The reason for this is those SWIs act while the program is running in the TaskWindow when output is to the screen (only the VDU stream is captured). GraphTask only redirects output to the sprite when it is processing the VDU stream. It was my intention to handle this by using Wimp Filters (already used to intercept MouseV) to also apply the sprite redirection when the program was running in the TaskWindow. But I decided not to as by the time Wimp filters came in, very few programs which used these complex SWIs ran outside of the desktop, and for the few that did the performance penalty for redirecting to a sprite would have been to high. |
Alex Farlie (1992) 44 posts |
Thanks.. Thanks.. Would you be willing to consider placing !GraphTask under a suitable license? I can see a use for it. |