Basic programs the PicoCalc

Below is a repo of all of the basic programs I’ve created so far with the pico calc. Everything is compatible with both picos.
Please feel free to drop your repos :slight_smile:

INSCCOIN/PicoBasic: A bunch of mmbasic applications for the PicoCalc.

9 Likes

Rather large project I’m working on right now, figure id share some details. I absolutely love MMBasic & have been using the picocalc for multiple hours a day programming on it. I’ve come up with some crazy ideas for programs and I think they can be pulled off for the most part. I’m currently working on an AES 128 & 256 Encrypter & Decrypter.

PicoBench 4.2+

  • I programed PicoBench over the course of 2 weeks, I still have plans for this, ill be porting it over to the Luckfox in the near future (after these other programs are complete)
  • I have a list of future improvements I’d like to make and will slowly release them.
  • The current most stable version of PicoBench is 2.5 before the math re-write. Most of the 3.0+ rewrites need modification to run properly (changing dim statements within the code)
  • I’m also working on a score system that will use all known pico chips + lyra for a more accurate & informative experience.
  • Id like your feedback on the current full release (Version 2.5 PicoBench) on what needs to be changed / done to improve usability & experience.

Current Project list:
PicoCalcCad (NOT PICO 8’s PicoCad)

  • PicoCalcCad is a PicoCad inspired program Im currently in the very early stages of building the outlines for it. Estimated release is 4 - 8 weeks.

PicoAES & DES

  • PicoAES & PicoDES are for educational uses only & should not be used as an actual encryption method. Estimated release is 1 week

PicoPaint

  • PicoPaint is a basic (lol) paint program that allows the user to use any rgb color and draw with it on screen. I’m currently having a problem where the pico goes into panic mode when there’s too many colors on screen? Estimated release is 3 weeks.

Pico-vP

  • A true Pico experience that allows the user to create and “emulate” different instances of MMBasic & Linux… (Requires Luckfox Lyra NO FLASH) Pico-vP is more or less a Virtual Box for all things pico. It’s written in C. Estimated release 4 months.

NOTE: Pico-vP is ai assisted due to my lack of Linux knowledge. Everything else is 100% written & owned by me.

6 Likes

Nice. Another site with other programs is: GitHub - rlauzon54/PicoCalcBasic: Olde Tyme BASIC programs converted to the PicoCalc

4 Likes

This is my first program for the PicoCalc, a matrix “screensaver” which runs after boot on my PicoCalc.

Wrote it to learn the BASIC dialect a bit.

13 Likes

Lots of brilliant graphics demos here TheBackShed.com - Forum
Some may need some tweaking for LCD use but many should just work

2 Likes

The challenge with those programs is that some of the features that they use aren’t supported on the PicoCalc. So don’t think that they will always work unchanged.

2 Likes

So, after 3 solid days I’m proud to announce the first game I’ve ever written in basic. I used vsc. Tested it on both Picos.
(This will be a series btw)
Astrox Onoso (Space game inspired by Oregon Trail)

9 Likes

Don’t know if this is the place for this but I’ve been tinkering with the Arduino Mega 2560 boards for a few weeks now, thought I’d share this repo INSCCOIN/MEGA-2560: Programs for the Arduino Mega 2560

I’ve also re-programed the Pico’s hex editor which can be found here alongside a few other programs. Seeing I’m still waiting on a screen replacement I can’t confirm if it displays properly, please let me know if I need to make adjustments to any of the new programs. PicoBasic/PicoDev at main · INSCCOIN/PicoBasic

Updates were made to PicoBench, 3.0 + have been removed and replaced with more stable versions. Versions 2.6 & 2.61 are now the most up to date versions.

Version 2.6 monitors temperature & speed for 60 seconds as the test runs.
Version 2.61 Monitors temperature & speed but also lets the user define how long it’ll run for.

Sneak preview of the next Onoso game.. Very pleased with how its turning out.
Current features:

  • A more open world concept, having the abilities to land on planets per sector depending on what faction controls what sector.
  • More interactive Quest system that grants rewards based on completion, time & difficulty
  • Easier map to understand (still ASCII)
  • Turn based RTS
  • 13 total side quests (Aiming for 20)
5 Likes

Screen replacement is finally here!


5 Likes

This is my first attempt at a decent sized program on the PicoCalc, a Maze generating program.

Maze on GitHub

Future improvements being an actual game built around the maze.

4 Likes

My first programming experiences were in BASIC on 8-bit machines (like a lot of people here, apparently), and I’ve really enjoyed basically picking up where I left off when I was a kid. I’ve put some of my Picomite BASIC games on GitHub.

Right now there are four games:

  • Landmine - you’re a tank on a battlefield full of landmines. Rescue civilians without blowing any of them up.
  • Snek - avoid a venomous snake while pushing rocks to trap it.
  • Rebound - Zero Zap, but with paddles. Or Pong meets Pinball if you didn’t have a TI-99/4A.
  • Roboworld 2048 - that one arcade game meets that other game you have on your phone. Inspired by a typo.

These are all about the same level of quality as the type-in programs you’d find in magazines Back in the Day. Also, there may be unaddressed redundancies and inefficiencies because I have a bad habit of abandoning a game once it works to my satisfaction. Still, the games do run and this is probably the only way they’ll ever get played by anybody besides my kids who are probably tired of humoring me.




8 Likes

These are great! I tried all four. My favorite is Landmine. Thanks for sharing them!

To get snek to run I did have to change line 236 to just:

do

Thanks! Glad you caught that typo, too; I’ve fixed it. Was the game crashing for you? It runs for me, but this isn’t the first time I’ve seen Picomite execute right through a missing parenthesis.

Yes the program crashed after drawing the initial play field if i didn’t adjust that line.

Looking forward for network multiplayer PONG game, that will support potentiometer connected to the side port. :slight_smile:

1 Like

here’s a quick game of asteroids i’ve been writing for the past couple of days as an exercise in writing a program from scratch entirely only in the picocalc itself :slight_smile: it’s not the most optimized and slows down with many asteroids on the screen, but i think we’ve gotten to the point we spent more time playing it than programming it now!

' ASTEROIDS.BAS
' written by <maple@maple.pet>
' 2025-09-09
' tested on pico1 picocalc

' vector data
Data 4,0,-20,10,10,0,0,-10,10
Data 3,-5,5,0,8,5,5
Data 2,0,0,0,-5
Data 15,-1,0,-0.8,-0.6,-0.4,-0.5,0,-1
Data 0.5,-0.9,0.3,-0.4,0.8,-0.5,1,0
Data 0.7,0.4,0.7,0.6,0.3,0.8,0,0.7
Data -0.3,0.9,-0.7,0.8,-0.7,0.5

FRAMEBUFFER create
FRAMEBUFFER write f

Dim rot(3,3)

Sub load_vector(l())
  For i = 0 To Bound(l())-1
    Read l(i,0)
    Read l(i,1)
    l(i,2) = 1
  Next
End Sub

Read c
Dim ship(c,3)
load_vector(ship())

Read c
Dim thrust(c,3)
load_vector(thrust())

Read c
Dim shot(c,3)
load_vector(shot())

Read c
Dim asteroid(c,3)
load_vector(asteroid())

posx = 160
posy = 160
velx = 0
vely = 0
angle = 0
invuln = 30
lives = 3
accel = 0.3
fspeed = 10 'shot speed
rspeed = 1 'rocks speed
score = 0
cooldown = 0

Dim rocks(16,6) 'x, y, velx, vely, ang, size

Sub new_rock(x, y, ang, size)
  For n = 0 To Bound(rocks())-1
    If rocks(n,5) = 0 Then
      rocks(n,5) = size
      rocks(n,4) = ang
      rocks(n,2) = Sin(rocks(n,4))*rspeed
      rocks(n,3) = -Cos(rocks(n,4))*rspeed
      rocks(n,0) = x+rocks(n,2)
      rocks(n,1) = y+rocks(n,3)
      Exit Sub
    EndIf
  Next
End Sub

For i = 0 To 3
  new_rock(Rnd()*320,Rnd()*320,Rnd*6,30)
Next

Dim shots(5,6) 'xy, vel, ang, active

Sub fire()
  If cooldown > 0 Then Exit Sub
  For n = 0 To Bound(shots())
    If shots(n,5) = 0 Then
      shots(n,0) = posx
      shots(n,1) = posy
      shots(n,2) = Sin(angle)*fspeed
      shots(n,3) = -Cos(angle)*fspeed
      shots(n,4) = angle
      shots(n,5) = 1
      cooldown = 5
      Exit Sub
    EndIf
  Next
End Sub

Sub player_hit()
  If lives > 0 Then
    posx = 160
    posy = 160
    velx = 0
    vely = 0
    angle = 0
    invuln = 30
    lives = lives - 1
  Else
    FRAMEBUFFER write n
    Print "game over!"
    Print "final score: ",score
    Pause 2000
    End
  EndIf
End Sub

Sub draw(lines(), x, y, ang, scale, op)
  cnt = Bound(lines())
  sina = Sin(ang) * scale
  cosa = Cos(ang) * scale
  rot(0,0) = cosa
  rot(1,0) = -sina
  rot(0,1) = sina
  rot(1,1) = cosa
  rot(2,0) = x
  rot(2,1) = y
  rot(2,2) = 1
  Dim rout(cnt, 3)
  Math m_mult rot(), lines(), rout()

  For i = 0 To cnt-2
    Line rout(i,0),rout(i,1),rout(i+1,0),rout(i+1,1)
  Next
  If op=0 Then Line rout(cnt-1,0),rout(cnt-1,1),rout(0,0),rout(0,1)

  Erase rout
End Sub

Function dist(x1,y1,x2,y2)
  dist = Sqr((x1-x2)^2+(y1-y2)^2)
End Function

Do
  CLS

  Do
  k$=Inkey$
  If k$=Chr$(128) Then 'up
    draw(thrust(), posx, posy, angle, 0.5, 1)
    velx=velx+Sin(angle)*accel
    vely=vely-Cos(angle)*accel
  ElseIf k$=Chr$(129) Then 'down
    velx=velx-Sgn(velx)*accel
    vely=vely-Sgn(vely)*accel
  ElseIf k$=Chr$(130) Then 'left
    angle=angle-0.3
  ElseIf k$=Chr$(131) Then 'right
    angle=angle+0.3
  ElseIf k$=Chr$(13) Then 'enter
    fire()
  ElseIf k$=Chr$(27) Then 'esc
    End
  EndIf
  Loop Until k$=""

  posx=(posx+velx+320) Mod 320
  posy=(posy+vely+320) Mod 320

  If cooldown > 0 Then cooldown = cooldown - 1
  If invuln > 0 Then invuln = invuln - 1
  If invuln Mod 2 = 0 Then draw(ship(), posx, posy, angle, 0.5)

  For n = 0 To Bound(shots())-1
    'if shot is active, process
    If shots(n,5) = 1 Then
      shots(n,0) = shots(n,0)+shots(n,2)
      shots(n,1) = shots(n,1)+shots(n,3)
      If shots(n,0) < 0 Or shots(n,0) >320 Or shots(n,1) < 0 Or shots(n,1) > 320 Then
        shots(n,5) = 0
      Else
        draw(shot(), shots(n,0), shots(n,1), shots(n,4), 1, 1)
      EndIf
    EndIf
  Next

  remain = 0
  For n = 0 To Bound(rocks())-1
    If rocks(n,5) > 0 Then
      remain = remain + 1
      rocks(n,0)=(rocks(n,0)+rocks(n,2)+320) Mod 320
      rocks(n,1)=(rocks(n,1)+rocks(n,3)+320) Mod 320

      rx = rocks(n,0)
      ry = rocks(n,1)

      If invuln = 0 And dist(posx,posy,rx,ry) < rocks(n,5)+5 Then
        player_hit()
      EndIf

      For m = 0 To Bound(shots())-1
        If shots(m,5) = 1 Then
          If dist(shots(m,0),shots(m,1),rx,ry) < rocks(n,5) Then
            'shot a rock
            shots(m,5)=0
            sz = rocks(n,5)-10
            score = score + rocks(n,5)
            rocks(n,5)=0
            ang=Rnd()*6
            rspeed = rspeed + 0.1
            new_rock(rx, ry, ang,sz)
            new_rock(rx, ry, ang+1.5,sz)
          EndIf
        EndIf
      Next

      draw(asteroid(), rocks(n,0), rocks(n,1), rocks(n,4), rocks(n,5))
    EndIf
  Next

  If remain = 0 Then
    'cleared all rocks, next level
    score = score + 500
    invuln = 30
    rspeed = rspeed - 1

    For i = 0 To 3
      new_rock(Rnd()*320,Rnd()*320,Rnd*6,30)
    Next
  EndIf

  For n = 1 To lives
    lx = 320 - n*15
    draw(ship(), lx, 15, 0, 0.5)
  Next

  Print score

  FRAMEBUFFER copy f, n
Loop
12 Likes

Great little game…. A few suggestions.

  1. Remove the loop around the key check section.
  2. Change initial and post crash ship angle to 180
  3. Change left and right increment to 6 degrees.
  4. Add sound to fire and hit (I just added play tone 4000,4000,10 after enter key check for fire clicks)
  5. Use random rock movement and splitting angles, not just vertical.
  6. Add mother ship.
  7. Add start screen with instructions, credits and random rocks flying around.

Running great on a 378Mhz Pico2 !

with the loop it makes sure that no more keys are buffered, that is, it processes all input in one frame. this helps because otherwise your inputs get delayed a lot if you try to hold a direction and shoot at the same time!

so it’s pointing downwards? how come?

it should already pick a random angle for the rocks to move! is it only going up and down for you? as for the angle the rocks splits off to, i had both rocks random before but they would often end off moving towards the same direction, so i made sure that they were going off in one random direction, but opposing ones.. maybe i can use a range

i did want to add sound, but i had trouble making it the way i wanted because of how long frames can take.. i thought about using play load sound but the limitation of only one custom waveform turned me away. i could definitely polish it up more, but i just wanted to release it already and work on something else for a while :slight_smile: