Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 04:19 29 Mar 2024 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 : MMBasic for Windows - pre-alphas

     Page 16 of 17    
Author Message
Romeo

Newbie

Joined: 11/02/2022
Location: France
Posts: 24
Posted: 07:40pm 15 Feb 2022
Copy link to clipboard 
Print this post

  Michal said  Hi,

I'm trying to adopt the example from Maximite, sprites/ghost/ghost.bas and it seems there is a problem with "sprite loadpng" (or something else).
Would I ask for an example with loaded sprites?

Michal

"sprite loadpng" works for me, but I think you cannot use the PNG transparency, as you need the MODE to use 12 bits colors, and this seems to be not yet implemented.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5867
Posted: 10:08pm 15 Feb 2022
Copy link to clipboard 
Print this post

BOX no longer fills the box
cls
BOX 180,125,100,20,1,RGB(MAGENTA),RGB(MAGENTA)
do:loop

VK7JH
MMedit   MMBasic Help
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 10:54pm 15 Feb 2022
Copy link to clipboard 
Print this post

  Quote  BOX no longer fills the box


Oops - will fix - know the cause
 
Goksteroo
Senior Member

Joined: 15/03/2021
Location: Australia
Posts: 110
Posted: 02:22am 16 Feb 2022
Copy link to clipboard 
Print this post

colour rgb(yellow),rgb(blue)
cls
h=mm.hres/2
text h,100,"White on Black",c,2,2,rgb(white),rgb(black)
text h,200,"Black on White",c,2,2,rgb(black),rgb(white)
text h,300,"Black on Nearly White!",c,2,2,rgb(black),rgb(254,254,254))
text h,400,"Orange on White",c,2,2,rgb(orange),rgb(white)
do
loop
Inverse "Black on White" not printed unless the value of White is changed just a tad (or to any other colour) - a white background remains clear.

Load Data works as expected, in my programs anyway.
Edited 2022-02-16 12:40 by Goksteroo
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 500
Posted: 04:32am 16 Feb 2022
Copy link to clipboard 
Print this post

How to send a Break with the serial?
Need it for some hardware.
Plasma
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5867
Posted: 04:46am 16 Feb 2022
Copy link to clipboard 
Print this post

cancel is chr$(24)
end-of-transmission-block is chr$(23)
end-of-transmission is chr$(4)
end-of-text is chr$(3)
data-link-escape is chr$(16)

or it could be something else.

Once you know what to send, is simply
PRINT #n, chr$(xx);

Jim
VK7JH
MMedit   MMBasic Help
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 08:12am 16 Feb 2022
Copy link to clipboard 
Print this post

MMBasic.zip

Fix for the various drawing issues caused by an over-enthusiastic bulk edit
 
KD5ZXG
Regular Member

Joined: 21/01/2022
Location: United States
Posts: 53
Posted: 08:49am 16 Feb 2022
Copy link to clipboard 
Print this post

>You don't need it to:

>Just start the selection with the mouse as normal and release the left button at the end of the page.
>The editor stays in selection mode. Then just use the scroll wheel to scroll down and  the selection will
>track down the new lines. Selection mode is only exited when you >CTL-X or CTRL-C or esc or del

Down was not the difficulty I failed to properly describe. My wheel strangely won't scroll or select offscreen to the right. Knowing myself, I probably broke it.

Arrows can move the cursor and select there. Wheel down selects a whole remaining line. Perhaps in excess of need, then back-arrow to deselect. Still relies on keyboard to start or end a selection where the mouse can't yet navigate.

I just tried the latest, still won't drag past the right edge. But I can now click the right edge and it moves one space per click, could it do that before? Anyways, it stops working before mouse can select the entire word I'm trying to highlight.


Edited 2022-02-16 19:16 by KD5ZXG
 
Romeo

Newbie

Joined: 11/02/2022
Location: France
Posts: 24
Posted: 09:09am 16 Feb 2022
Copy link to clipboard 
Print this post

version 5.07.03pa22
Just discovering MODE accept PAGE as second parameter, is it?
ex: MODE 8,16 returns 'error: 16 is invalid, valid is 0 to 1', and choosing MODE 8,1 gives no more cursor, my guess is this equal a PAGE WRITE 1
Sorry to ask some questions that may look silly, but as MMBasic for Windows is a Work in Progress, all the documentation is buried inside the 67k posts in the forum, and the only doc we have by now is the one concerning the CMM2, sorry for any inconvenience.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 09:39am 16 Feb 2022
Copy link to clipboard 
Print this post

  Quote  Down was not the difficulty I failed to properly describe. My wheel strangely won't scroll or select off-screen to the right. Knowing myself, I probably broke it.


OK I understand
You should be able to do what you want by right-clicking in the last position on the line but this isn't working at the moment - will try and include in the next version

  Quote  Just discovering MODE accept PAGE as second parameter, is it?
ex: MODE 8,16 returns 'error: 16 is invalid, valid is 0 to 1', and choosing MODE 8,1 gives no more cursor, my guess is this equal a PAGE WRITE 1
Sorry to ask some questions that may look silly, but as MMBasic for Windows is a Work in Progress, all the documentation is buried inside the 67k posts in the forum, and the only doc we have by now is the one concerning the CMM2, sorry for any inconvenience.


Two layer operation is work in progress. I will announce when/if ready
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 500
Posted: 01:31pm 16 Feb 2022
Copy link to clipboard 
Print this post

After going a bit deeper in the Serial Break Problem i give up because most Usb Serial Adapter have Problems with. Thx
Plasma
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3422
Posted: 01:42pm 16 Feb 2022
Copy link to clipboard 
Print this post

@plasmamac,

The picaxe debug interface uses BREAK to stop the chips, and get to upload mode (bootloader). They advertise that not all USB serial interfaces can do this. If you find out what chip is in their AXE027 cable (maybe Peter knows, he has been quite active in PICAXE land some years ago) you may find one that you can use.

Volhout
PicomiteVGA PETSCII ROBOTS
 
PhilHornby

Newbie

Joined: 28/11/2021
Location: United Kingdom
Posts: 2
Posted: 03:56pm 16 Feb 2022
Copy link to clipboard 
Print this post

  Volhout said  If you find out what chip is in their AXE027 cable ... you may find one that you can use.Volhout


FTDI FT232R - (according to FTDI's FT_Prog utility).

The Picaxe product is: HERE. As supplied, TXD,RXD,RTS & CTS are set inverted.
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 500
Posted: 05:17pm 16 Feb 2022
Copy link to clipboard 
Print this post

No link in your link
Plasma
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 06:15pm 16 Feb 2022
Copy link to clipboard 
Print this post

  Quote  How to send a Break with the serial?


I'll try and put something into the firmware. Syntax will be PRINT #n,BREAK
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 500
Posted: 06:31pm 16 Feb 2022
Copy link to clipboard 
Print this post

Hooray
Plasma
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3422
Posted: 11:55am 17 Feb 2022
Copy link to clipboard 
Print this post

@plasmamac,

Are you looking for a genuine "break" character, or a break level at the TX pin ?
That was the picaxe issue with the USB-serial convertors as I recall.

Most convertors would be able to send a break character, but the break character complies to the baudrate timing (start bit, stop bit).

The break level actually breaks with the timing requirement, and simply holds the TX line as long as you want to hold it.

The latter is what the PICAXE use, breaking with the timing set out in the baudrate, and therefore forcing to bootloader mode.
Not all USB-serial interfaces can do this.
Maybe you can fake this mode by setting the baudrate very low (i.e. 75 baud) and then sending a break character.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 12:11pm 17 Feb 2022
Copy link to clipboard 
Print this post

I've put a true BREAK into the firmware. WIN32 API has a routines specifically for starting and stopping the break condition. I've set the break at 20 bit periods
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 500
Posted: 03:13pm 17 Feb 2022
Copy link to clipboard 
Print this post

Thx for all your help
Plasma
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1028
Posted: 11:38am 04 Apr 2022
Copy link to clipboard 
Print this post

  matherp said  TIME$, DATE$, EPOCH, DATETIME$, and DAY$ functions added.

NB: TIME$ and DATE$ commands will not be included as time is derived from the system clock and we don't want to be messing around with that


Hi Peter

Is there a way of having independent TIME$ & DATE$ commands eg MMTIME$ & MMDATE$ running which can be read & changed from within MMB4W?

The reason for asking is that I'm monitoring data coming into a CMM2 on a 10 second cycle, with one data stream having a time & date code from a GPS which updates the CMM2.

I'm experimenting with MMB4W to replicate the CMM2 etc. I obviously had to ignore the TIME & DATE data coming in & just use the PC clock time (TIME$ & DATE$).

All was going OK until at one time MMB4W wouldn't decode some of the incoming data even though it was correct. I eventually noticed that the laptop I was using was 2 seconds out at that time. It hadn't yet phoned home to update it's time. I have noticed that on occasions, the laptop got over 5 seconds off time.

I played around a bit & then remembered the EPOCH & DATETIME$ functions & was able to use them to get a satisfactory TIME/DATE system going reading the incoming GPS TIME & DATE but I'm still relying on a change in the normal TIME$ seconds to update my TIME/DATE system every second.

I think a separate TIME/DATE system would be good especially if external data is being monitored by MMB4W is time sensitive & the PC/Laptop concerned is stand alone.

Hope this makes some sense.

Brian
ChopperP
 
     Page 16 of 17    
Print this page
© JAQ Software 2024