![]() |
Forum Index : Microcontroller and PC projects : MMBasic for Windows - pre-alphas
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 125 |
Hi matherp, 1. 500ms of pause sometimes a bit too little, for me on some computers only 1000ms is enough 2. Could you please reduce the graphics load a little. For me, on the i5-2400, the MMBasic editing window itself takes 45% of the CPU. Michal |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6223 |
Sorry about the slow response to this. Windows (and Linux) allocate the com port number when the device gets plugged in. Internally, a Windows program gets a 'handle' to the port when it's opened but any program can access the device using the comport that Windows allocated. You can go into device manager and change the allocated port number. Widows retains a list of com port devices that have ever been plugged in. Windows tries to allocate the same number the next time a device is plugged in. If the device has a serial number, Windows can differentiate it from a same make device and therefore allocates a different port number. This list usually never gets reset so if you are programming a batch of devices that have serial numbers, life can be a pain. You can edit the registry to tell Windows to ignore serial numbers, something that helps in this case. The registry key: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter\Devices holds the list of known devices but doesn't tell you if the are currently plugged in. You can reset the list by writing zeros to: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter ***Disclaimer: I haven't tried this recently so beware*** Jim VK7JH MMedit |
||||
ElectroPI Newbie ![]() Joined: 27/04/2012 Location: AustraliaPosts: 37 |
Hi Jim, To clear used com ports in Windows 10 just open Device Manager and under menu item "View" select "Show Hidden Devices". In the bottom box when you expand the "Ports (COM & LPT)" entry you'll see a complete list of all assigned com ports even if there's nothing currently using the port. Right-click each one and select "Uninstall" to remove it. I do this all the time so anything I plug in is always assigned a low com port number. Peter |
||||
KD5ZXG Regular Member ![]() Joined: 21/01/2022 Location: United StatesPosts: 53 |
Device Cleanup makes quick work of it. I test hundreds of EVMs with up to eight COM ports every day. But I caution against removing unused instances of anything not COM, HID, or memory stick. When you accumulate thousands of unused devices in the registry, you do not want multiple clicks to remove each instance. That method will take an eternity. Mind you, I can only speak for Windows 7. https://www.uwe-sieber.de/misc_tools_e.html I see a new tool "COM Name Arbiter" specifically for the COM port problem. Maybe I should try that next time. Not sure if its any safer. Edited 2022-02-05 16:29 by KD5ZXG |
||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 572 |
Fun Fact :small world . the Author above (uwe sieber) live 500 m near me. Plasma |
||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1532 |
I've been using his tools for a while. I think he has a lot of useful things on offer. Thanks for that. Regards Michael Just an impression to show how many COM ports you can have.(Win7): Edited 2022-02-06 05:22 by twofingers causality ≠ correlation ≠ coincidence |
||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 125 |
It seems to me that setting up a startup PAUSE and CPU usage for graphics should be a configuration parameter at MMBasic startup. Michal |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10075 |
Lots more stuff MEMORY command, FRAMEBUFFER command, PAGE command, IMAGE command (rotate, resize, warp etc), LOAD JPG, LOAD BMP all as per CMM2 except jpg is more flexible and can overlap the screen MMBasic.zip |
||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 572 |
Thank you , you save my Sunday Night Plasma |
||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 572 |
found a problem with blit : Box 100,100,100,100,22,RGB(red),RGB(blue) Blit 100,100,300,300,100,100 Blit read 1,100,100,20,20 Blit write 1,200,200 buffer in use Plasma |
||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 125 |
Thanks matherp, Now (5.07.03pa13): i5-2400 3,1 GHz 20%CPU, grain.bas 44%CPU 253661 grains, gui-test.bas 44%CPU E5450 3,0 GHz 22%CPU, grain.bas 44%CPU 183879 grains, gui-test.bas 38%CPU i7-4770s 3,1 GHz 8%CPU, grain.bas 24%CPU 317486 grains, gui-test.bas 19%CPU Michal Edited 2022-02-07 08:50 by Michal |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3319 |
Worked for me, but got the error on a second run. Blit buffer must be closed before attempting BLIT READ a second time. I use ON ERROR SKIP: BLIT CLOSE 1 before a BLIT READ just in case the BLIT buffer exists. Edited 2022-02-07 08:41 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
Any speed-tests to load a full-screen bitmap happened yet? ![]() |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3319 |
What am I doing wrong with this? MODE 1,16 Error : 1 is invalid (valid is 100 to 3840) Scratch that--I reread the beginning of the thread Edited 2022-02-07 08:54 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 125 |
And yet(5.07.03pa13): i3-5005U 2GHz 27%CPU, grain.bas 54%CPU 138096 grains, gui-test.bas 45%CPU Michal |
||||
Goksteroo Senior Member ![]() Joined: 15/03/2021 Location: AustraliaPosts: 114 |
I've been doing some testing of conversions of some of my programmes for the CMM2 to Windows MMB and have come across a few issues. There are workarounds for these and so I don't see any issues that need immediate attention, if at all - info is for interest sake only. open "books.dat" for input as #1 gives a file #1 already open error but works as expected if the file number is changed. ? left over open file #1 from MMB boot. framebuffer create 1600,1200 gives an error in some modes. Seems to accept only values 2x current V&H page resolution. Can use another page instead of the framebuffer and use page resize 1,1600,1200 instead. mm.info(framebuffer) gives and erroneous result. mm.info(page address 1) works as expected. #INCLUDE not yet working, but not an issue as you can just paste the INC files onto the end of the main .bas file. Any one come across any other anomalies? |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10075 |
Thanks for the report Please describe how exactly you get this. I haven't been able to replicate You can't create a framebuffer smaller than the screen so this should happen in mode 16. Have you seen it in other modes? By the way maximum framebuffer size is 7680x4320 Please explain further |
||||
Goksteroo Senior Member ![]() Joined: 15/03/2021 Location: AustraliaPosts: 114 |
load bmp "file.bmp",0,0 open "books.dat" for input as #1 Will give you the file number already open error. Seems to be the load bmp that produces the open file as a 'close #1' before the 'open' command works. Frame buffer size - oops I was in mode 16 when I was producing the error. What happens to the framebuffer when mode is changed withing a program? Further trials of mm.info(framebuffer) goes... I was using the FB address to load a book file as data to the frame buffer. If I used the CMM2 code MM Basic crashes and closes as the file is loaded, but if I change the code to an expanded 'normal' page then I get a syntax error. I had assumed the data was being loaded into some forbidden area of memory, hence the crash. I now assume 'load data File$,address' is not implemented? Edited 2022-02-08 23:02 by Goksteroo |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10075 |
pa14 MMBasic.zip Full sprite engine and blit from CMM2 now available. Framebuffer closed on change of mode. Bug in closing files fixed Edited 2022-02-09 00:16 by matherp |
||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 572 |
Hi after : Box 100,100,100,100,22,RGB(red),RGB(blue) Blit 100,100,300,300,100,100 Blit read 1,100,100,20,20 Blit write 1,200,200 the next command will crash *load *new etc ![]() Edited 2022-02-09 02:33 by Plasmamac Plasma |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |