Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Page x Command
Author | Message | ||||
cs41 Newbie Joined: 08/08/2016 Location: AustraliaPosts: 27 |
I have been trying to use the GUI SETUP and PAGE x commands as I would like to make use of them in a program rewrite. Can't seem to get PAGE to work. In the following short test pgm the display always shows TEST PAGE 4 even though the command PAGE 1 has been issued. Cannot see what I am doing wrong, but hope someone can see my error. Thanks. .... ' test 64 pin Backpack ' using MBasic v 5.4D ' SC 64 pin Backpack 2016 ' Using a ILI9341 display OPTION AUTORUN ON PWM 2, 1000,50 ' Set LCD Backlight brightness CLS RGB(Green) GUI SETUP 1 TEXT 20,20," TEST PAGE 1" , L, 2, 2, RGB(Black), RGB(Green) GUI SETUP 2 TEXT 20,20," TEST PAGE 2" , L, 2, 2, RGB(Black), RGB(Green) GUI SETUP 4 TEXT 20,20," TEST PAGE 4" , L, 2, 2, RGB(Black), RGB(YELLOW) PAGE 1 end |
||||
GoodToGo! Senior Member Joined: 23/04/2017 Location: AustraliaPosts: 188 |
I think it's because 'TEXT' doesn't work too well on PAGE's. You will need to CLS the screen each and every time you call a new page to remove the previous TEXT's. Maybe try the GUI Caption command instead? Have a look at page 47 of the MM+ manual for some helpful hints on what GUI commands are available to you which are designed for the GUI PAGE and GUI SETUP commands.... Hope the above helps, GTG! ...... Don't worry mate, it'll be GoodToGo! |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9066 |
GTG is exactly right. DO NOT use the TEXT command, use GUI CAPTION. This is very important, as use of TEXT on a page with ANY GUI controlled elements, can lead to corrupted text etc, simply becasue the MM+ is not re-drawing those TEXT commands each time you switch pages. Read the "Advanced graphics programming techniques" section of the MM+ manual. Smoke makes things work. When the smoke gets out, it stops! |
||||
cs41 Newbie Joined: 08/08/2016 Location: AustraliaPosts: 27 |
Thanks everyone... comments appreciated. Still much to learn but really appreciate everyones efforts to make this a great programming language and platform Started many years ago with Locomotive basic, then GW Basic then Quick Basic and on to VB5 with Tiger Basic thrown in along the way. Thanks again cs |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9066 |
Never heard of Locomotive BASIC - will have to do a bit of a read-up on that one, just for my information. If it makes you feel any better, I made EXACTLY the same mistake as you when learning the GUI controls - I used the TEXT command on GUI pages, and got all kinds of corruption of the text. I thought I should just be able to put the text where I wanted, and job-done. But it was only after I made that mistake, and Geoff told me I should not be doing it that way, that I understood WHY you need the captions to also be a GUI element. IE: If you are using ANY GUI controls AT ALL, then EVERYTHING on the screen has to be a GUI element, including text, so that the MM can manage the screen-switching correctly for you. Feel free to post any more questions - the rest of us here have all had to learn it at some point(i'm still learning!), and the members here are very welcoming and helpful to newbies. Smoke makes things work. When the smoke gets out, it stops! |
||||
busa Regular Member Joined: 12/02/2015 Location: AustraliaPosts: 81 |
OMG! Long live the CPC |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9066 |
Nope, never heard of it. I now know it was an Amstrad BASIC back in the 80's. Back then, I was using the Atari 800XL and 130XE machines, so never came across the Amstrad BASIC. I knew of Amstrad, but never had one or any friends with one, so never came across that name before. Smoke makes things work. When the smoke gets out, it stops! |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 1985 |
Locomotive basic was produced for the Amstrad CPC and PCW range of computers by Locomotive Software Ltd - it was reasonable quick (not as fast as BBC Basic though) and was the first of the 80's interpreted basics to support interrupts, timers, sound generation and graphics PROPERLY. It was a line-numbered approach which looks primitive today but had some really nice (great reference for future MMBasic dev?) features e.g. lovely commands to work with the four timer interrupts (which were unheard of at the time - other basics largely relied on timing loops) like these EVERY 50,x GOSUB xxx - for regular ticks or AFTER 50,x GOSUB xxx - for one off timer shots There were a number of sound Queues where you could stack up notes to be played on the three voices and flag specific ones to rendezvous with others etc and interrupt when space in the queues became free with ON SQ(x) GOSUB xxx Another feature was the ability to extend the language through "RSXs" (Resident system extensions) which allowed you to write Z80 code which could pass values back and forth using Human-friendly names which looked just like part of the language... they were introduced in your code with a bar | and there were some oh-so funny (straight face) commands people did like |BQ, |BARASTREISAND, |STD etc... how we laughed Coincidentally, I have been tinkering with a graphic pack in MMBasic that emulates the graphics module with proper Cartesian co-ordinates and graphics windows with scaled axes. I was never happy with the modern (well since windowed environments) that treats 0,0 as the top left - it should be the bottom left. With the graphics window you could set the graphics window, the size and scale could be what you like and the 0,0 point at any point in the window and PLOTs, DRAWs etc. outside didn't show. nice. This pack will allow me to create "mini-graphs" on any point of the uM screen. It was a reasonably capable machine with (on the 6128) 128K of RAM which was very useful. Back in the mid 80's We used it as a Z80 platform for tons of hardware; production line Transformer and PSU testers etc. I wrote RADAR and Meteorological processing software on CPCs and we sold lots of them to Plessey for the refurb of their WF3 weather RADAR which we refurbed to WF33 under project Aladdin. We also converted the code to QuickBasic and ported the whole system to PCs and sold more as a bolt-on to existing systems to provide weather processing by piggy-backing the serial printer output from the RADAR itself. It would generate PILOT and TEMP messages on the fly, detect balloon bursts and archive flight data... pretty cutting edge for 1986. WF33 this page shows the refurbed controller (down from a fridge-sized cabinet) but not the CPC/PC processor sadly. I still have print-outs of the code somewhere. Before WF33+WindProc/MeteoProc, there were reams of fan-fold papaer and guys with slide-rules and code-sheets to make up the PILOT/TEMP messages - a tall order for manual labour every six hours including the flight time! We rocked... VIZ and Visala were our only competitors and their systems cost £100Ks. Ours was cheap enough the UK Met Office could sponsor them all over the world. Unfortunately the UK Tech Manufacturing industry was in decline in the 80's & 90s... directions changed (Plessey moved away from Met RADAR), giants fell (Thorn EMI - what a shame!) and the world went a different way. I learned a lot, moved mountains and had a blast... happy days... |
||||
cs41 Newbie Joined: 08/08/2016 Location: AustraliaPosts: 27 |
Looks like we have started a walk down memory lane. Maybe we should have a new thread "Vintage Basic" for those who would like to discuss this more. Yes it was the CPC128 that we started with. Loco Basic was good in those days and could do lots with it. Bought my original CPC128 from AWA in Fiji. (now Comtech Fiji). If someone wants to start the new thread go for it (with GIZMO's agreement of course.) Again thanks for comments re GUI commands. I have been reading this forum for a long time now and really appreciate the helpful advice given. cs |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9066 |
Sorry about that, cs41 We're all a bit guilty of that from time to time, on thread to thread..... Smoke makes things work. When the smoke gets out, it stops! |
||||
Print this page |