Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:07 14 Nov 2025 Privacy Policy
Jump to

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 : SC Demo prog failure

Author Message
BobDevries

Senior Member

Joined: 08/06/2011
Location: Australia
Posts: 266
Posted: 08:14am 07 Aug 2020
Copy link to clipboard 
Print this post

Hi all,

I haven't seen any comments/posts on the CMM2 article in Silicon Chip (pp88). I typed it in and checked it over and over but I still cannot get it to push a ball around the screen; all I get is a same-size "bar"bounce off the screen extremities. I tried a few mods, without success.

Did anyone get this working?

Regards, Bob Devries
Bob Devries
Dalby, QLD, Australia
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4139
Posted: 09:53am 07 Aug 2020
Copy link to clipboard 
Print this post

Maybe zip up the code and post it for those who don't have SC but may see the problem.

John
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 12:44pm 07 Aug 2020
Copy link to clipboard 
Print this post

It worked for me!

Geoff
Geoff Graham - http://geoffg.net
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4139
Posted: 03:14pm 07 Aug 2020
Copy link to clipboard 
Print this post

I guess it's something like a typo.

John
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 04:00pm 07 Aug 2020
Copy link to clipboard 
Print this post

This is the program, perhaps you can copy and paste it:

BOX 0, 0, 800, 600, 1, RGB(yellow), RGB(black)
x = 400
y = 300
dx = 1
dy = 1
DO
 CIRCLE x, y, 30, 2, ,0, RGB(red)
 x = x + dx
 IF x = 31 OR x = 767 THEN dx = dx * -1
 y = y + dy
 IF y = 31 OR y = 567 THEN dy = dy * -1
 PAUSE 2
LOOP

For people who don't have access to the SC article; this program will cause a red ball to zoom around the screen bouncing off the walls.  It is not particularly complex, nor useful, but it does provide a simple demo of graphics on the CMM2.

Geoff
Geoff Graham - http://geoffg.net
 
mclout999

Guru

Joined: 05/07/2020
Location: United States
Posts: 492
Posted: 05:21pm 07 Aug 2020
Copy link to clipboard 
Print this post

  Geoffg said  This is the program, perhaps you can copy and paste it:

BOX 0, 0, 800, 600, 1, RGB(yellow), RGB(black)
x = 400
y = 300
dx = 1
dy = 1
DO
 CIRCLE x, y, 30, 2, ,0, RGB(red)
 x = x + dx
 IF x = 31 OR x = 767 THEN dx = dx * -1
 y = y + dy
 IF y = 31 OR y = 567 THEN dy = dy * -1
 PAUSE 2
LOOP

For people who don't have access to the SC article; this program will cause a red ball to zoom around the screen bouncing off the walls.  It is not particularly complex, nor useful, but it does provide a simple demo of graphics on the CMM2.

Geoff


This little demo just showed I have a issue with the video output of my CMM2.  The demo draws the outside boarder on the screen and on my system it has 1 pixel cut off on the right side.  I have changed the aspect ration of the screen to 1 to 1 and it is just not able to display the last colum of pixels. I edited the demo with everything 1 pixle less and it works but This is not cool. I have gone back to several other demos and it is differently as issue with my system. It is like the viewing screen onto the output is 1 pixle to the left.

Does anyone know what could be causeing this.  I have fully assembled system form micromite.org. I am attached to a VGA monitor.  EDIT:  I just attached it to 2 other displays and one had just a half a pixel cut off and the second one had 1 and 1/2 pixels cut off. and they are ghosting an inverted copy of the 2 pixel columns just off-screen It is like the first 2 pixel columns for the left side are being displayed on the right a few pixels past the screen area.
Edited 2020-08-08 03:34 by mclout999
They call me Shai-Hulud (The maker)
 
berighteous
Senior Member

Joined: 18/07/2020
Location: United States
Posts: 110
Posted: 05:29pm 07 Aug 2020
Copy link to clipboard 
Print this post

Have you tried an auto calibrate on your monitor?  My display was wonky at first but I pulled up the on screen display for my monitor and hit the auto calibrate button and it fixed it.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10580
Posted: 05:30pm 07 Aug 2020
Copy link to clipboard 
Print this post

Most monitors have a "auto adjust" button or menu item which syncs the monitor to the source. Try and find it and use it. Normally solves this sort of issue
 
mclout999

Guru

Joined: 05/07/2020
Location: United States
Posts: 492
Posted: 05:55pm 07 Aug 2020
Copy link to clipboard 
Print this post

I have not used auto ajust in a long time and yes that is all it was.  The problem with my monitor is that it is only accessible from on undocumented long-press on a button used for backing out of menus (ASUS) had to find a PDF of the damn manual to find it. NOT very intuitive and thanks all for prompt help as always.
They call me Shai-Hulud (The maker)
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025