Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #1934 > unrolled thread
| Started by | Robert Heaton <rob@robheaton.co.uk> |
|---|---|
| First post | 2012-07-18 21:04 +0100 |
| Last post | 2012-07-21 19:21 +0100 |
| Articles | 10 — 6 participants |
Back to article view | Back to comp.sys.acorn.programmer
BASIC & Screenmodes Robert Heaton <rob@robheaton.co.uk> - 2012-07-18 21:04 +0100
Re: BASIC & Screenmodes Matthew Phillips <spam2011m@yahoo.co.uk> - 2012-07-18 21:46 +0100
Re: BASIC & Screenmodes Robert Heaton <rob@robheaton.co.uk> - 2012-07-19 06:28 +0100
Re: BASIC & Screenmodes Martin <News03@avisoft.f9.co.uk> - 2012-07-19 10:18 +0100
Re: BASIC & Screenmodes Robert Heaton <rob@robheaton.co.uk> - 2012-07-19 20:31 +0100
Re: BASIC & Screenmodes druck <news@druck.org.uk> - 2012-07-19 21:52 +0100
Re: BASIC & Screenmodes Robert Heaton <rob@robheaton.co.uk> - 2012-07-20 18:53 +0100
Re: BASIC & Screenmodes jgharston <jgh@arcade.demon.co.uk> - 2012-07-20 14:07 -0700
Re: BASIC & Screenmodes Justin Fletcher <gerph@gerph.org> - 2012-07-21 16:53 +0100
Re: BASIC & Screenmodes druck <news@druck.org.uk> - 2012-07-21 19:21 +0100
| From | Robert Heaton <rob@robheaton.co.uk> |
|---|---|
| Date | 2012-07-18 21:04 +0100 |
| Subject | BASIC & Screenmodes |
| Message-ID | <500716b9$0$7326$5b6aafb4@news.zen.co.uk> |
I'm working my way through the excellent book "Starting BASIC" by the late Ray Favre. The main program that is built throughout the book runs in MODE 12, I'm using a Beagleboard running RISC OS 5.19 and whenever the BASIC program runs, I can't see the output. My monitor just reports "out of range" Is there an entry needed to the MDF file I'm using? Or can someone with more BASIC knowledge recommend a more suitable MODE? Many Thanks, Rob.
[toc] | [next] | [standalone]
| From | Matthew Phillips <spam2011m@yahoo.co.uk> |
|---|---|
| Date | 2012-07-18 21:46 +0100 |
| Message-ID | <842c62b152.Matthew@sinenomine.freeserve.co.uk> |
| In reply to | #1934 |
In message <500716b9$0$7326$5b6aafb4@news.zen.co.uk> on 18 Jul 2012 Robert Heaton wrote: > I'm working my way through the excellent book "Starting BASIC" by the > late Ray Favre. > > The main program that is built throughout the book runs in MODE 12, I'm > using a Beagleboard running RISC OS 5.19 and whenever the BASIC program > runs, I can't see the output. > My monitor just reports "out of range" > > Is there an entry needed to the MDF file I'm using? Or can someone with > more BASIC knowledge recommend a more suitable MODE? MODE 12 was 640 x 256 pixels in 16 colours. I guess it rather depends on the program you are trying to run whether it matters much what the mode is. It depends on whether it does tricks like writing direct to screen memory. If it doesn't, then your best bet (without creating an MDF, which might be quite a challenge for such a low resolution) would be to go for a 16 colour mode with a larger resolution. Part of the screen would probably be unused, but at least you would get output. Except I suspect that the Beagleboard may not support 16 colour modes. Or maybe I am getting muddled up with the Iyonix which does not support 4 colour modes. You can alter the mode command to specify the resolution and colours. To get the string for you current mode, just go to the Display Manager tool on the iconbar, click Menu and follow the "Mode" item. For example, on this machine (an Iyonix) I see X1280 Y1024 C16M EX1 EY1 The EX1 and EY1 indicate the conversion of OS units to pixels: in this case 2 OS units per pixel in both dimensions. In more recent versions of BASIC (RISC OS 3.5 onwards, I suspect) you can do MODE "X1280 Y1024 C16M EX1 EY1" There are a few other options. Try HELP MODE to see them. -- Matthew Phillips Durham
[toc] | [prev] | [next] | [standalone]
| From | Robert Heaton <rob@robheaton.co.uk> |
|---|---|
| Date | 2012-07-19 06:28 +0100 |
| Message-ID | <50079b18$0$7322$5b6aafb4@news.zen.co.uk> |
| In reply to | #1935 |
On 2012-07-18 20:46:34 +0000, Matthew Phillips said: > In message <500716b9$0$7326$5b6aafb4@news.zen.co.uk> > on 18 Jul 2012 Robert Heaton wrote: > >> I'm working my way through the excellent book "Starting BASIC" by the >> late Ray Favre. >> >> The main program that is built throughout the book runs in MODE 12, I'm >> using a Beagleboard running RISC OS 5.19 and whenever the BASIC program >> runs, I can't see the output. >> My monitor just reports "out of range" >> >> Is there an entry needed to the MDF file I'm using? Or can someone with >> more BASIC knowledge recommend a more suitable MODE? > > MODE 12 was 640 x 256 pixels in 16 colours. > > I guess it rather depends on the program you are trying to run whether it > matters much what the mode is. It depends on whether it does tricks like > writing direct to screen memory. > > If it doesn't, then your best bet (without creating an MDF, which might be > quite a challenge for such a low resolution) would be to go for a 16 colour > mode with a larger resolution. Part of the screen would probably be unused, > but at least you would get output. > > Except I suspect that the Beagleboard may not support 16 colour modes. Or > maybe I am getting muddled up with the Iyonix which does not support 4 colour > modes. > > You can alter the mode command to specify the resolution and colours. To get > the string for you current mode, just go to the Display Manager tool on the > iconbar, click Menu and follow the "Mode" item. For example, on this machine > (an Iyonix) I see > > X1280 Y1024 C16M EX1 EY1 > > The EX1 and EY1 indicate the conversion of OS units to pixels: in this case 2 > OS units per pixel in both dimensions. > > In more recent versions of BASIC (RISC OS 3.5 onwards, I suspect) you can do > > MODE "X1280 Y1024 C16M EX1 EY1" > > There are a few other options. Try > > HELP MODE > > to see them. Thank You! I'll have a play and see how I get on. Rob.
[toc] | [prev] | [next] | [standalone]
| From | Martin <News03@avisoft.f9.co.uk> |
|---|---|
| Date | 2012-07-19 10:18 +0100 |
| Message-ID | <52b1a701a5News03@avisoft.f9.co.uk> |
| In reply to | #1936 |
> On 2012-07-18 20:46:34 +0000, Matthew Phillips said:
> > MODE "X1280 Y1024 C16M EX1 EY1"
If this is just to set the current mode, then a much easier way is to use
MODE MODE
I know this looks odd, but the second MODE is used as a function, and
returns the current MODE. The first MODE then takes the returned value of
the second to set the MODE. The result is a full-screen, single tasking,
scrolling window rather like the old BBC days ... but in a rather higher
resolution.
But if the program depends on some aspect of the mode, then this may not
work.
--
Martin Avison
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received.
[toc] | [prev] | [next] | [standalone]
| From | Robert Heaton <rob@robheaton.co.uk> |
|---|---|
| Date | 2012-07-19 20:31 +0100 |
| Message-ID | <0618dfb152.rob@rob.robheaton.co.uk> |
| In reply to | #1937 |
In message <52b1a701a5News03@avisoft.f9.co.uk>
Martin <News03@avisoft.f9.co.uk> wrote:
>> On 2012-07-18 20:46:34 +0000, Matthew Phillips said:
>>> MODE "X1280 Y1024 C16M EX1 EY1"
> If this is just to set the current mode, then a much easier way is to use
> MODE MODE
> I know this looks odd, but the second MODE is used as a function, and
> returns the current MODE. The first MODE then takes the returned value of
> the second to set the MODE. The result is a full-screen, single tasking,
> scrolling window rather like the old BBC days ... but in a rather higher
> resolution.
> But if the program depends on some aspect of the mode, then this may not
> work.
MODE MODE did the trick!
Thanks again.
Rob.
[toc] | [prev] | [next] | [standalone]
| From | druck <news@druck.org.uk> |
|---|---|
| Date | 2012-07-19 21:52 +0100 |
| Message-ID | <ju9s21$b3t$1@dont-email.me> |
| In reply to | #1935 |
On 18/07/2012 21:46, Matthew Phillips wrote: > In message <500716b9$0$7326$5b6aafb4@news.zen.co.uk> > on 18 Jul 2012 Robert Heaton wrote: >> The main program that is built throughout the book runs in MODE 12, I'm >> using a Beagleboard running RISC OS 5.19 and whenever the BASIC program >> runs, I can't see the output. >> My monitor just reports "out of range" >> >> Is there an entry needed to the MDF file I'm using? Or can someone with >> more BASIC knowledge recommend a more suitable MODE? > > MODE 12 was 640 x 256 pixels in 16 colours. > > I guess it rather depends on the program you are trying to run whether it > matters much what the mode is. It depends on whether it does tricks like > writing direct to screen memory. Old programs will assume a 1280x1024 OS unit screen size for graphics, 80x25 for text, and will probably depend on the 16 colour variable palette. All of which can be overcome, but not very straight forward for BASIC beginners. > X1280 Y1024 C16M EX1 EY1 > > The EX1 and EY1 indicate the conversion of OS units to pixels: in this case 2 > OS units per pixel in both dimensions. X1280 Y1024 C16 EX2 EY3 would simulate the OS unit screen size, and give 80x25 text, plus 16 colours. Graphics wouldn't look exactly the same as lines will be a lot thinner due to their being more pixels per OS unit. If 16 colours aren't supported use C256. ---druck
[toc] | [prev] | [next] | [standalone]
| From | Robert Heaton <rob@robheaton.co.uk> |
|---|---|
| Date | 2012-07-20 18:53 +0100 |
| Message-ID | <50099af1$0$10732$5b6aafb4@news.zen.co.uk> |
| In reply to | #1940 |
On 2012-07-19 20:52:17 +0000, druck said: > On 18/07/2012 21:46, Matthew Phillips wrote: >> In message <500716b9$0$7326$5b6aafb4@news.zen.co.uk> >> on 18 Jul 2012 Robert Heaton wrote: >>> The main program that is built throughout the book runs in MODE 12, I'm >>> using a Beagleboard running RISC OS 5.19 and whenever the BASIC program >>> runs, I can't see the output. >>> My monitor just reports "out of range" >>> >>> Is there an entry needed to the MDF file I'm using? Or can someone with >>> more BASIC knowledge recommend a more suitable MODE? >> >> MODE 12 was 640 x 256 pixels in 16 colours. >> >> I guess it rather depends on the program you are trying to run whether it >> matters much what the mode is. It depends on whether it does tricks like >> writing direct to screen memory. > > Old programs will assume a 1280x1024 OS unit screen size for graphics, > 80x25 for text, and will probably depend on the 16 colour variable > palette. All of which can be overcome, but not very straight forward > for BASIC beginners. > >> X1280 Y1024 C16M EX1 EY1 >> >> The EX1 and EY1 indicate the conversion of OS units to pixels: in this case 2 >> OS units per pixel in both dimensions. > > X1280 Y1024 C16 EX2 EY3 would simulate the OS unit screen size, and > give 80x25 text, plus 16 colours. Graphics wouldn't look exactly the > same as lines will be a lot thinner due to their being more pixels per > OS unit. If 16 colours aren't supported use C256. Thanks druck, Your suggestion provides better results than the use of MODE MODE. Rob.
[toc] | [prev] | [next] | [standalone]
| From | jgharston <jgh@arcade.demon.co.uk> |
|---|---|
| Date | 2012-07-20 14:07 -0700 |
| Message-ID | <9f656f98-e87b-4270-af37-8b16eba4550d@fi17g2000vbb.googlegroups.com> |
| In reply to | #1940 |
druck wrote: > Old programs will assume a 1280x1024 OS unit screen size for graphics, > 80x25 for text, 80x32 for text. MODE 12:REPEAT:V%=VPOS:PRINT:UNTIL V%=VPOS:PRINT VPOS+1 JGH
[toc] | [prev] | [next] | [standalone]
| From | Justin Fletcher <gerph@gerph.org> |
|---|---|
| Date | 2012-07-21 16:53 +0100 |
| Message-ID | <alpine.DEB.1.10.1207211648350.8213@buttercup.gerph.org> |
| In reply to | #1942 |
On Fri, 20 Jul 2012, jgharston wrote:
> druck wrote:
>> Old programs will assume a 1280x1024 OS unit screen size for graphics,
>> 80x25 for text,
>
> 80x32 for text.
>
> MODE 12:REPEAT:V%=VPOS:PRINT:UNTIL V%=VPOS:PRINT VPOS+1
<sob> That's not how you get the text height of a mode.
Depending on your intentions:
SYS "OS_ReadModeVariable", mode, 2 TO ,,lines_minus_one
- maximum addressable line for any mode
data%!0=2:data%!4=-1
SYS "OS_ReadVduVariable", data%, data%
lines_minus_one = data%!0
- maximum addressable line in the current mode
data%!0=257:data%!4=-1
SYS "OS_ReadVduVariable", data%, data%
lines = data%!0
- lines in the current text window
It's also wrong to use OS_Byte 160 to obtain similar information, if you
felt inclined to do that.
--
Gerph <http://gerph.org/>
... You're a fraud and you know it
But it's too good to throw it all away
[toc] | [prev] | [next] | [standalone]
| From | druck <news@druck.org.uk> |
|---|---|
| Date | 2012-07-21 19:21 +0100 |
| Message-ID | <jues00$tqr$1@dont-email.me> |
| In reply to | #1942 |
On 20/07/2012 22:07, jgharston wrote: > druck wrote: >> Old programs will assume a 1280x1024 OS unit screen size for graphics, >> 80x25 for text, > > 80x32 for text. Sorry, you are correct. ---druck
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.acorn.programmer
csiph-web