Basic programs the PicoCalc

So here is the very very much alpha level spreadsheet written for the picomite in mmbasic, I have no idea how well it will work on the picocalc (someday mine will get here)

https://themachine.finch-avior.ts.net/raw/61db3ef6438676169154697b804ba9540c28b2e6a3415901bf2efd4daadc0e5e?at=sheet.bas

And here is a sample sheet, a simple mortage calculator.

https://themachine.finch-avior.ts.net/raw/9e9fed4503a8d46b52ef7e976cdf68785550d447cfb7d53597c9393c9e0242eb?at=mort.sht

Let me know how it goes.

I cannot access either of those links, I get 505 bad gateway error.

%#$@ing internet, should work now.

It seems to be working well enough. One minor issue I noticed is when I use the cursor key to move past the 4th column and it wraps to the 1st column on the next row, it wipes out the row number. It does not seem to mess with the functionality, it seems to just be a superficial problem.

My PicoCalc should be getting here around the end of Novenber. I tried to get your alpha level spreadsheet to run on Windows MMBasic and not surprizingly, it didn’t run. I did get a chance to look at your code though. Very nice job! I think you’ll have it up and runing before I get my PicoCalc. Here is a thought that you might consider after you finish with this very worthy project - Since the main advanage of spreadsheets is entering and printing out data, how about making a spreadsheet app that does just that? That is, the app would first give the user a blank sheet where he could enter variable names and their vaules in columns A and B. Then the app would put the program into MMBasic mode where the code writer could manipulate the given data with formulas and comands and then send the solutions back to the spreadsheet mode. The end user would see only the input sheet and then the output sheet. Not only would this simpilfy your job but it would give all the functions and commands that MMBasic offers. It also makes spreadsheet iterative solutions possible. - Jim

a simple prime number generator:

10 For I = 2 To 2^62
20 For D = 2 To Sqr(I)+1
30 If D*D<=I And I=D*Int(I/D) Then Next I
40 Next
50 Print ;I;" ";
60 Next

I time it over a minute and use it as benchmark, but use if for whatever you want! :smiley:

1 Like

Not quite sure I am understanding you here, but the spreadsheet already has all mmbasic commands and functions built in. The save format is fairly easy to parse, I will think more about your comment and see if I can understand deeper.

OK, AAAron - I appollize, I’m a poor writer. I work with a lot of spreadsheets and I find putting long formulas into cells a bit hard. i.e. Is that calculaded vaule in N45 or Q85? I find that writing code much easier. i.e. X = R/Y Most of my work is with multiple varables. I remember names (like X) better than cells (like N45) Also, from my helping with the developement of a spreadsheet for the DM42 calculator, I know that memory is a big factor in desiging spreadsheet apps. I’m just thinking that maybe using the MMBasic program directly might help save some RAM. But I really do not know much about things like RAM. BTW, how big are you making your spreadsheet? Columns X Rows?

Right now its 26x99 CxR, but more limited by screen size as I have yet to write the part to allow scrolling, but that coming up soon.

Would it help if cells could have alias’s so like A1, that holds your budget, could have the alias budget. So you could write the formula budget/12 to calculate your monthly vs yearly budget.

That’s a very good size spreadsheet for the amount of memory we have. But you have 8MB. I’ll have 2MB I think. Anyway, even with 8MB, 26 X 99 is great. No, the alpha/number C/R system works fine for me. I just have text/data/formulas/commands all over the place in my spreadsheets. I have calculated values that go into other formulas who’s calculated values go into other formulas and on and on…. with conditional statements in between formulas. Easy to program in Basic but hard to place in a spreadsheet so that they are evaluated at the right time. Such is life! Anyway, I’m looking forward to seeing and using your spreadsheet. It is deffinate big enough for what I do. It will be one of the first programs I’ll be loading on my ‘Calc when I get it!

I added updated versions of the programs from Creating Adventure Games on Your Computer by Tim Hartnell, published in 1983.

5 Likes

I just added pico-edit to my github. This was the program I was not going to write, but it seems like there is some desire for a text editor or word processor on the PicoCalc. This is an extension of pipedit.bas, it adds Open/Save file functionality, Copy/Cut/Paste to and from the clipboard and a help screen invoked with Ctrl-L. I have no intentions of adding anymore functionality, but if you find a bug, let me know and I will correct it. Personally, I would suggest using the built in editor, but if you want something you can build up yourself, here you go.

4 Likes

For some Japanese users (myself included), I’ve made Japanese katakana font data usable in MMBASIC.
I used the “k8x12” font created by Num Kadoma -san. (License information for the font is available at the following page: font )

On PCs, half-width kana are represented as values in the extended ASCII range from 0xA1 to 0xDF. However, when edited in MMBASIC, the most significant bit is removed, replacing them with values from 0x21 to 0x5F. Therefore, I placed the font data within that range.
(DeepL)

'***** Japanese Katakana Font
'  written by sweacco
'
'  The "k8x12" font 
'  by num_kadoma -san is used.
'
'  N=64, &h20 start, h=&h0C, w=&h08
'  abcdefgh -> ghefcdab
DefineFont #9
  40200C08
  00000000 00000000 00000000
  00000000 40000000 0040a0a0
  1010101e 10101010 00000000
  10000000 10101010 00f01010
  00000000 00000000 00404080
  00000000 00181800 00000000
  02fe0000 08047c02 00006010
  00000000 202804fc 00004020
  04000000 d0301008 00001010
  00000000 0484fc20 00003008
  00000000 10107800 0000fc10
  00000000 2818fc08 000018c8
  20000000 2028e43c 00001010
  00000000 10107000 0000fc10
  00000000 043c047c 00007c04
  00000000 045454a4 00003008
  00000000 003e4000 00000000
  02fe0000 10101814 00004020
  08040200 08c82818 00000808
  fe101000 04048282 00003008
  107c0000 10101010 000000fe
  fe080800 48281808 00001888
  fe101000 22221212 0000844a
  7c101000 08fe1010 00000808
  3e202000 04048242 00006018
  7e404000 08088848 00002010
  027e0000 02020202 00007e02
  fe242400 04242424 00003008
  00106000 040422c2 00006018
  047c0000 28100808 00008244
  fe202000 20282422 00001e20
  42820000 08040442 00002010
  3e202000 040cb242 00006018
  10700c00 1010fe10 00002010
  52a20000 04045252 00003008
  00007c00 101010fe 00002010
  20202000 20242830 00002020
  fe101000 10101010 00004020
  007c0000 00000000 000000fe
  047c0000 14081824 0000c022
  047c1000 d2341008 00001010
  08080800 20101008 00008040
  24280000 42442424 00008242
  40404000 4040704c 00003e40
  02fe0000 08040402 00006010
  50200000 04048850 00000002
  fe101000 92525410 00003010
  02fe0000 10304804 00000808
  000c3000 00000c30 00000678
  10101000 44202020 0000f24c
  64040400 14080818 0000c024
  207c0000 2020fe20 00001e20
  e23e2000 10202824 00001010
  08780000 08080808 000000fe
  027e0000 02023e02 00007e02
  00007c00 040202fe 00003008
  44444400 08044444 00002010
  28280800 4a2a2828 0000884c
  40404000 48444440 00006050
  427e0000 42424242 00007e42
  82fe0000 08040482 00002010
  20c00000 08040202 0000c030
  000050a0 00000000 00000000
  40a0a040 00000000 00000000
End DefineFont

Font 9

For i=0 To 255
  If i Mod 16=0 Then Print ""
  Print Chr$(i);
Next i

print ""
print "コンニチハ、ニホン。"

And this is the hirakana font data.

'***** Japanese Hiragana Font
'  written by sweacco
'
'  The "k8x12" font 
'  by num_kadoma -san is used.
'
'  N=64, &h20 start, h=&h0C, w=&h08
'  abcdefgh -> ghefcdab
DefineFont #9
  40200C08
  00000000 00000000 00000000
  00000000 40000000 0040a0a0
  1010101e 10101010 00000000
  10000000 10101010 00f01010
  00000000 00000000 00404080
  00000000 00181800 00000000
  20fc1000 48289876 00003e40
  20000000 6c382078 000064b4
  00000000 84848488 000040a0
  38000000 04443800 00003008
  38000000 10087800 00004c28
  20000000 643820f4 000068a4
  00000000 48c47890 00002020
  10000000 b894d4b8 00002010
  10000000 70101c10 00006498
  00000000 04c43800 00003008
  00000000 003e4000 00000000
  207c2000 aa6a3c28 000064b2
  84880000 a2828282 000040a0
  3c003c00 04020242 00003008
  7c003800 28381008 00008e48
  22f42000 a2623c20 00006ca2
  f4202000 484a4a2a 000090a8
  087c0800 403c04fe 00003c40
  20100800 10204040 00000808
  be848400 84848484 00001088
  007c0000 80400000 00007e80
  08fe0800 40443c04 00001c20
  40404000 42404040 00003844
  08fe0800 38484838 00003008
  fe242400 202c2424 00001e20
  20107c00 202010fe 00001c20
  20f82000 4840404e 00008e90
  20fc2000 02625c20 00003804
  c23c0000 04020202 00000038
  10fe0000 20202020 00000c10
  20202000 8040302c 00007e80
  22f42000 249c4444 00001826
  809c8000 a0908080 00009ea0
  5c480800 96b24a6a 000046aa
  f22c2000 6a662222 000026aa
  54380000 a2a29292 00001844
  be848400 a49c8484 000098a6
  4624e800 84848444 00003048
  10083000 4a4c1010 0000308a
  50200000 04088850 00000002
  84be8000 9c8484be 000098a6
  10fe1000 781010fe 00006294
  24107000 a4a6643c 000018c4
  22f42000 62a4a460 00003c42
  5c480800 92aa4a6a 00004ca2
  20fc1000 2220fc20 00001c22
  e25c4800 20202422 00001010
  cabc1000 9caa8a8a 00002010
  1e101000 98701010 00006294
  40186000 82c2bc40 00003804
  44645800 04044444 00003008
  10087c00 32824438 0000384c
  f42c2000 64642424 000022a4
  10087c00 02824438 00003804
  f22c2000 62622222 00002ca2
  20101000 48483020 0000848a
  000050a0 00000000 00000000
  40a0a040 00000000 00000000
End DefineFont

Font 9

For i=0 To 255
  If i Mod 16=0 Then Print ""
  Print Chr$(i);
Next i

print ""
print "コンニチハ、ニホン。"
4 Likes

I’m still working on MMB apps!

Over the last few months my life has gotten quite busy for me (School & working full time) I havnt had a whole lot of time to be active within the PicoCalc community. Currently being worked on is my attempt of a remake / expansion of 1984’s Elite for the calc. So far I have about 5 hours in this project (mostly research). My goal is to have a playable version by the end of 2025.

9 Likes

We used to play that on BBC computers during our lunch breaks :smiling_face_with_sunglasses:. Would be great to see it running on a PicoCalc with Pico2 inside. Note MMBasic has some 3d commands …

Going to try and stick to wire frame only while the stat bar will be blocked with yellow. So far after about an hour I got a proper cube that the fpov can rotate around it.

2 Likes

I added eliza.bas to my github, originally published in Creative Computing 1977 July-August issue, I have updated it, removing line numbers and such. For many of my generation, this was our first exposure to A.I. and chatbots.

2 Likes

A VERY early build of PicoElite is avaiable to download. I spent the last 30 hours nonstop writing this, note that Claud 3.7 did a majority of the comments and about 10% of the programming. The readme.md is also generated by Claud. I will be SLOWLY updating this as time goes on, theres a list of todo’s at the bottom of the readme file.

Note, on the map screen its improperly formatted, this will change on version 0.3, going to be using font 7 for all help menus, trading, dialog & maps.

6 Likes

I created PicoPaint this night while I did not sleep.
It’s a bit lame and does not support many color because of framebuffer. It was fun to code

Paint screenshot

6 Likes