![]() |
Forum Index : Microcontroller and PC projects : MMBasic for Windows - pre-alphas
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Goksteroo Senior Member ![]() Joined: 15/03/2021 Location: AustraliaPosts: 114 |
I'm impressed on you speed of coding and your results. I took Mazist and broke it down to the essentials of generating a maze, printing it to screen and the using the mouse solve routine - couldn't use the original Mazist as it uses commands unknown to Windows MMBasic such as TEXT, MATH SET, GUI CURSOR and MAP commands. Each routine was timed and then I ran the same program on my MM2 to see the difference. My PC is an old I5 and only scores 185934 grains on KnviD's Benchmark. Maze size 99x69 nodes MM2: Generation: 1.8-2.7 seconds Print: 0 seconds! Solution: 1.55-2.33 Seconds PC: Generation: 0.2-0.28 Seconds Print: 0 Seconds! Solution: 0.16-0.18 Seconds Near enough to 10 times the performance for these routines. I'm looking forward to future developments. ![]() |
||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
good job Pete I give my graphical test program Testgraf.zip it seem that "Text" function is not activ "Stars" function don't work correctly I have also problem with keyboard. I am in frech (azerty), but with mmbasic some keys are in qwerty and others in azerty. It is very difficult to use for exemple : all keys on up of keybord are in numeric mode by default and specials keys are not in same place as azerty. but all alphanum keys are good also, I don't find key "_" Edited 2022-01-26 13:14 by goc30 |
||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 572 |
Its uk keyboard atm Plasma |
||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
not exactly, no "_" key, and azerty for alpha keys not qwerty |
||||
Goksteroo Senior Member ![]() Joined: 15/03/2021 Location: AustraliaPosts: 114 |
I knew using an Amstrad many years ago would be useful - muscle memory found the " and ' keys straight away! |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1111 |
I find the following very interesting and a bit confusing ![]() Running MMB4L under mint 20.2, at the command line > Timer = 0:For i = 1 to 1000000:Next i:Print timer 1898 Running MMB4W in wine under mint 20.2 (same physical machine, disk etc), at the command line >Timer = 0:For i = 1 to 1000000:Next i:Print timer 232 Are the duration of milliseconds in Scotland the same as England? ![]() ![]() D. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1111 |
Fonts appear to be different from CMM2? 'Font Test For f = 1 to 5 Font f For i = 48 to 96 Print chr$(i); Next i Next f I think font 4 should be font 2, with existing 2 and 3 being 3 and 4 respectively. Also if exiting a program that had font 5 set, invoking the editor gives an error message about 'Error: Font too large' - easy work around, either change your font back to 1 thru 4 on the exit from your program or at the command line before entering edit. D. Edit: Sorry, my bad, was comparing MM+ fonts. Edited 2022-01-26 16:06 by panky ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 572 |
Will Mode become Pages? Plasma |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10068 |
31 on my native windows box Interesting, it seems the keyboard routines deliver mapped keys for the alpha part but raw position codes for the numbers etc. To solve this I'm going to need help from foreign language keyboard users (including US) later today I'll post a special diagnostic version which will print the raw codes I receive together with the keyboard map and will be looking for someone with each language to create a map for their language |
||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
my azerty keyboard ![]() each line is same as each keyboard key line Edited 2022-01-26 19:26 by goc30 |
||||
Pluto Guru ![]() Joined: 09/06/2017 Location: FinlandPosts: 374 |
![]() Peter, this is what i get with qwerty keyboard. Not sure in what format you need to have it. /Fred |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10068 |
Lots more stuff implemented : text, longstring, settick, maths, sort MMBasic.zip I've also massively reduced the CPU load. Very little now at the command prompt and just one fully active thread when a Basic program is running. The screen update rate is reduced to about 63Hz which means on a typical 60Hz refresh monitor there will be no impact. If you have a 120MHz monitor then every two frames may be the same but I think this is a price worth paying for reducing the CPU load. The porting to a C++ environment is a bit of a pain. e.g. (for those who know C) char c[]="hello" int a=strlen(c) gives a full error, not even a warning to fix I need to cast c to a constant char i.e. char c[]="hello" int a=strlen((const char *)c) |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
Quick feedback: Regardless what video mode I use (mode 1, mode 2, mode.. mode16, all without parameters) when opening the editor, the last line (status/commands) is outside the opened window. With arrow down, it becomes visible. This is on an i5 with 1920x1080 display panel. CPU load is far down (idle is like 5% or so) but the do:i=i+1:print i,:loop until i=1000 runs slower than a MM2 on 38400 baud. Guess you throttled down too much...;) Regards, Volhout Edited 2022-01-26 23:24 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 572 |
Hi, Editor Mode - 16 % cpu Run Mode - 30 % Cpu Grainbench 130201 I5 2500S with 2,7 Ghz its a litte bit faster as version 1 12700 Grains looks fine here Edited 2022-01-26 23:38 by Plasmamac Plasma |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
FWIW all that MMB4L currently does in this area is: 1. The blocking MMgetchar() functions sleeps (and thus yields) for 1ms each time it fails to read a character - principally this stops the CPU thrashing at the MMBasic prompt. 2. PAUSE does not do a completely busy wait, it intersperses it with 1us sleeps (and thus yields). If the user wants their program not to thrash then it is up to them to call PAUSE at opportune moments. I'm sure there are better/smarter things which could be done but this has sufficed so far. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
lew247![]() Guru ![]() Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
|
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10068 |
You are simply measuring the time to scroll the screen, nothing to do with the changes - will be even slower on a CMM2. The MM2 doesn't have a screen so is outputting to a serial port via a buffered non-blocking background interrupt. Not the same at all. Try do: i=i+1:text 0,0,str$(i):loop until i=1000 |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
I ran the grainbench on this i5 system: 175000 grains. So the computation speed is top. While running grainbench it is 55% CPU load. No idea why the text printing is slower. Maybe the throttle is removed from the graphics output routine, or my W10 machine is not HW compatible (driver mismatch on HW acceleration?). But I can watch youtube video's on this machine, so it is graphics capable. PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10068 |
see my previous post |
||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
new version is OK for "TEXT" function but it seem that "ARC" function is not stable, once it works but if I restart the test it crashes |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |