Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:31 07 Dec 2026 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 : PicoMite windows simulator for testing

Author Message
Malibu
Senior Member

Joined: 07/07/2018
Location: Australia
Posts: 273
Posted: 02:28am 05 Dec 2026
Copy link to clipboard 
Print this post

PicoSim Ver 1.0 alpha - for testing purposes
=============================================

A Windows based simulator for PicoMite running MMBasic (.bas) programs.

What's in this zip
 PicoSim.exe     the simulator
 commands\       command definition files - keep this folder next to PicoSim.exe
 examples\       example and test programs (.bas)

Getting started
 1. Unzip everything to a folder of your choice, keeping the folders as they are.
 2. Run PicoSim.exe.
 3. Use File > Open to load one of the programs in examples\.
 4. Press F5 (Run) to simulate. Ctrl+F7 checks a program for faults without running it.

Help > What works... inside PicoSim lists everything currently simulated.

Settings are saved in %APPDATA%\PicoSim\PicoSim.ini.
Drive A: for file commands defaults to Documents\PicoSim Drive A
(change it under Options > Drive A: Folder).

This is an alpha build: please report anything that doesn't behave like a real
PicoMite, with the .bas program and what you expected to happen.


PicoSim_1.0a.zip
John
 
mozzie
Guru

Joined: 15/06/2020
Location: Australia
Posts: 539
Posted: 01:25pm 05 Dec 2026
Copy link to clipboard 
Print this post

G'day John,
My thanks for creating and posting this excellent system, some brief testing has shown it to work very well  

Considering many of us have a PC plugged into the PicoMite anyway, being able to simulate before download is definitely a winner  

Regards, Lyle.
 
Malibu
Senior Member

Joined: 07/07/2018
Location: Australia
Posts: 273
Posted: 08:10pm 05 Dec 2026
Copy link to clipboard 
Print this post

Thanks Lyle, working on a few more things now so there'll be an update soon enough.
Lots to do!

Seems to be getting more usefull as it goes along on my end (to me it does anyway), so hopefully others will find it usefull as well  
John
 
Malibu
Senior Member

Joined: 07/07/2018
Location: Australia
Posts: 273
Posted: 01:34am 06 Dec 2026
Copy link to clipboard 
Print this post

A bit more done...

Now with:
      Multiple Pico selection (PicoMite, WebMite RP2040 & RP2350)
      Conditional breakpoints for debugging
      Deploy function to send simulated code direct to the Pico
     
Simulates:
      WiFi connections
      Web connectivity (with simulated Web Browser)
      Graphics commands for LCD screens (partially done)
      Strings and Longstrings
      (And a few others that my addled brain forgets at the moment!)

Give it a try and looking forward to some feedback  


PicoSim_1.1a.zip

Edit: Uploaded the wrong zip. Fixed now (I hope!)
Edited 2026-12-06 12:36 by Malibu
John
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3482
Posted: 04:38am 06 Dec 2026
Copy link to clipboard 
Print this post

A quick test of 1.1a, this is an excellent program !

  Readme said  - Not every MMBasic command is there yet. If a program stops with an
   error that a real PicoMite wouldn't give, that's what we want to hear.


Doesn't yet have PLAY SOUND, and consequently PLAY STOP commands.
Program runs fine when those lines are REMed. They are not vital to this program, just there for testing without the 12 pin PORT connected. Everything else works as expected.
See Random Player.zip at the end of this post:-
https://www.thebackshed.com/forum/ViewTopic.php?TID=18406&PID=247302#247302#247302
In the second footnote.
.
Edited 2026-12-06 14:48 by phil99
 
Malibu
Senior Member

Joined: 07/07/2018
Location: Australia
Posts: 273
Posted: 07:11am 06 Dec 2026
Copy link to clipboard 
Print this post

Thanks for trying it Phil, it's good to get some feedback  

Try this one - here's the changes that might be good for what you want.

SOUND (new)
 PLAY TONE left, right [, duration [, interrupt]]
 PLAY SOUND channel, L | R | B, S | Q | T | W | P | N | U | O [, frequency [, volume]]
 PLAY SAMPLE left%(), right%(), freq, attack, decay, sustain, release
             [, freqR, attackR, decayR, sustainR, releaseR] [, interrupt]
 PLAY RELEASE
 PLAY STOP / PAUSE / RESUME
 PLAY VOLUME left, right
 PLAY WAV / FLAC / MP3 / MIDIFILE file$ [, interrupt]
 PLAY WAV / FLAC / MP3 / MIDIFILE folder$ [, interrupt]   (every file in turn)
 PLAY NEXT / PLAY PREVIOUS
 PLAY MODFILE file$ [, interrupt]
 PLAY MODSAMPLE sample, channel [, volume]
 PLAY LOAD SOUND array%()
 PLAY TTS [PHONETIC] text$ [, speed [, pitch [, mouth [, throat]]]] [, interrupt]
 PLAY MIDI / PLAY MIDI CMD cmd%, data1%, data2% / PLAY MIDI TEST n
 PLAY NOTE ON channel%, note%, velocity% / PLAY NOTE OFF channel%, note% [, velocity%]
 PLAY HALT / PLAY CONTINUE track$
 MM.INFO(SOUND)
 Options > Mute Sound

GRAPHICS (new)
 ARC x, y, r1, [r2], a1, a2 [, c]
 BACKLIGHT percent
 TEXT ... "V"   (vertical text)
 PIXEL(x, y)
 FRAMEBUFFER CREATE / LAYER [colour] / WRITE N|F|L / COPY from, to [, B]
 FRAMEBUFFER MERGE [colour] [, B | R | A] [, rate] / WAIT / SYNC / CLOSE [F|L]
 SPRITE READ / LOADBMP / LOADPNG / LOADARRAY / WRITE
 SPRITE SHOW [SAFE] / HIDE [SAFE] / HIDE ALL / RESTORE
 SPRITE NEXT / MOVE / SCROLL / COPY / SWAP / CLOSE [ALL]
 SPRITE INTERRUPT sub / SPRITE SET TRANSPARENT n
 SPRITE(X | Y | W | H | L | C | T | E | S | N | D | V, n [, m])
 GUI BITMAP x, y, bits [, w [, h [, scale [, c [, bc]]]]]
 GUI TEST LCDPANEL / GUI TEST TOUCH / GUI CALIBRATE / GUI RESET LCDPANEL
 GUI INTERRUPT down [, up]
 TOUCH(X) / TOUCH(Y) / TOUCH(X2) / TOUCH(Y2)   (the mouse on the Display window)

The file:
PicoSim_1.1.1a.zip
(unless I messed it up again!   )

Again, all feedback is appreciated!
John
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3482
Posted: 07:27am 06 Dec 2026
Copy link to clipboard 
Print this post

Play sound works well.
Thankyou for implementing so quickly.
 
Malibu
Senior Member

Joined: 07/07/2018
Location: Australia
Posts: 273
Posted: 07:39am 06 Dec 2026
Copy link to clipboard 
Print this post

No worries, glad it worked!

With me being an air-headed Numpsy, I never even thought of putting a screen shot up of what this is all about, so here's one now  

Sheders might get a better idea of what I'm trying to achieve...



John
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3482
Posted: 07:49am 06 Dec 2026
Copy link to clipboard 
Print this post

Having the pins on the graphic show their state as the program runs is a very nice touch.
In the Random Player program you can see which bells are being struck as the tones play.
 
jwettroth

Regular Member

Joined: 02/08/2011
Location: United States
Posts: 100
Posted: 05:19pm 06 Dec 2026
Copy link to clipboard 
Print this post

This is very cool- it may become a favorite!

I was fooling with it and threw some code at it that I was working on.

The CHR$ command generated an error on what I thought should be legal.

Print #1,Chr$(CKSUM%\256);
Print #1,Chr$(CKSUM%-(256*(CKSUM%\256)));

The first call to this generated a pop-up error-
<<Print #1,CHR$(CKSUM%\256)>> Number out of bounds- CKSUM% is 65536


I was outputting a string on a uart with a checksum in it.  This should have worked, no?

I also note that it generated an error on DEVICE WS2812  ... commented these out.

Not to detract, its a wonderful app and a nice tool.  I look forward to digging in more and exploring.
John Wettroth
 
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 2026