Any Chance of running CP/M?

So I’m getting my PicoCalc tomorrow according to DHL. Any chance CP/M will be ported to this since it is almost like a vintage computer?

1 Like

You could try to port it, maybe it works?

3 Likes

I read that article. I’m not sure what needs to be done to use the additional PicoCalc hardware.

1 Like

You would need to implement the display and keyboard. There’s an arduino library for the TFT (TFT_eSPI, though you’ll need the updated), and another arduino library for the keyboard.

The CP/M link above doesn’t use Arduino, I just use these as examples for you to look at.

Also implementing the SD for storage would probably help since the internal flash is not very large.

I wonder if the creator of that CP/M emulator for Pico knows about the PicoCalc? The article indicates he’s interested in running it on appropriately retro hardware, and the PicoCalc might be ideal. Might be worth contacting him and letting him know the PicoCalc exists and that there are interested owners who are following his efforts. It’s also the sort of thing where a free or discounted device from Clockwork might encourage him to port it as well, but I don’t think that really happens. Still, it might be worth someone sending an email to Alex and suggesting it. (Not that he doesn’t have enough email from us to deal with, ha!)

3 Likes

there is an email on his website :+1:

Go for it!

While I think it’s cool to see anything ported to the PicoCalc (I like more options!), I don’t really have a personal interest or background in the CP/M stuff, so it would probably be better if someone else (who better knows what they were promoting) contacted him. :slight_smile:

so you didn’t wonder, you lied to us :cry: :crying_cat:

I just think the first email he gets might be better received if it came from someone who is also a fan of the CP/M and can explain why the PicoCalc is a good fit, rather than a random person like me just pointing him to a thing called the PicoCalc that he may or may not be interested in. Someone else could tell him why it would be awesome, and presumably their excitement would also come through in their message, which would encourage him to look into it.

Plus, I’ve got enough to keep track of with just the PicoMite stuff, and I don’t want to attempt to take on another project of adapting something to the PicoCalc myself. If I was the only point of contact for this, it might get forgotten or lost in the shuffle.

2 Likes

I reached out to Kevin Boone about this. I first recieved this message from him

Blockquote
Hi
I’m sure the PicoCalc could run a CP/M emulator. I am able to run CP/M on the Pico 2 with WaveShare 3.5" screen module and a USB keyboard. The problem is the very small screen – even with the tiniest characters my eyesight can handle, I can only fit about 43 character columns and 20 rows. Most of the popular CP/M applications expected an 80-column screen. CP/M programs I wrote myself work fine, because I anticipated the small screen. But even entirely text-based, original CP/M applications can be troublesome.
I haven’t seen a PicoCalc close up, but I fear it would have the same problem. The screen is only about 2.5", isn’t it? Do you know what screen technology it uses? The WaveShare module uses an ILI9488 LCD controller with SPI interface, and I suspect that the PicoCalc would be similar. Programming the screen isn’t difficult, but you’ve also got to emulate the terminal, which means (among other things) pre-rendering fonts of the appropriate size. But I’ve already done all this work for the WaveShare module.
In short, I’m 99% sure I could run CP/M on a PicoCalc. But I’m not sufficiently sure that it would be worth the effort, for me to go out and buy one.
Best wishes

I further replied with this message:

It has a four inch ILI9488 screen which I understand to use 43 characters. It uses the spi interface to do so. The keyboard uses an i2c interface instead of USB.
It might be possible to connect a serial terminal to the picocalc and access a serial terminal with an 80 column display that way though.
I guess it has the same limitations as your unit though.
With your permission, may I post this email thread to the picocalc forum?

He replied with the following:

Feel free to post my comments, for what little they’re worth, to anyplace you like.
One odd feature of the ILI9488 is that it has hardware scrolling, but only in one direction. In the WaveShare 3.5" screen, the hardware scrolling direction is along the long axis of the screen, which is basically useless. I mean, most terminals will scroll up when text reaches the bottom of the screen, not sideways. So a problem I have with the WaveShare screen is that, to scroll up, I have to redraw the entire screen every time text overflows the bottom line.
It looks to me as if the PicoCalc screen is square, or nearly square. That lea>ds me to wonder what its hardware scrolling direction is? If it’s top-to-bottom, then it would be much easier to implement a slick terminal emulator, than if it’s side-to-side. The hardware scrolling is really horrible to program, but it’s worth the effort because of the hugely improved scrolling performance.
Unfortunately, none of this changes the fact that 43 columns is not really enough for CP/M, unless you’re writing all-new code. Even the old Hitchhiker’s Guide to the Galaxy, which is entirely text-based, is unusable, because it assumes an 80-column screen (although it runs fine apart from that).
Some original CP/M programs could be hacked to change the line length – I recall there was a hack for WordStar for this. But I fear that 43 columns might be too small to be usable, even if you could make the application accept it.
I’d be happy to share what code I have, although I fear that nobody but me would be able to understand it.

2 Likes

You can run 80 columns on a picocalc. It’s fairly illegible but it does work. Also, if you run the screen in 3bpp mode instead of 16bpp, you can redraw the entire screen in about 12ms, which is fast enough to scroll without using the hardware.

Also, the screen on the picocalc does scroll in the “correct” direction.

1 Like

How does one run 80 col on the calc?

Depends on what firmware you’re running. For PicoMite/WebMite, you can define custom fonts and include them in your BASIC program. An example of a font that could allow 80 characters wide and 53 lines of characters vertically is the PICO-8 font. It uses 3x5 monospaced characters with a one pixel gap. Someone would need to manually recrate that font in the format that MMBasic expects though. There are details about how fonts work in the manual, and examples on TheBackShed. The main caveat is the font will only be available in the program you define it in, and you can’t use a custom font for the editor or normal prompt. But you can define and use pretty much whatever font you want for your own programs.

But PicoMite doesn’t really apply here since the CP/M emulator firmware would need to define the font it uses in whatever way makes sense for it. It could potentially re-use the PICO-8 font though, or something like it. But yeah, legibility would be rather poor. And it may not be wise to try to use both upper and lower case, because with so few pixels they’re going to look pretty bad anyway.

Sadly the links on the pico site are dead,

ill have to look into making fonts.

Here’s PICO-8 monospaced:
PICO-8 mono upper | FontStruct

2 Likes

So I had forgotten… PicoMite actually includes a font that’s this size.


It’s font #8 which is 4x6 (actually 3x5 characters with the one pizel gap on side and bottom).

I only realized that after I made this Pico-8 font. Unless I messed up, it should be a pixel perfect version of the Pico-8 font (both upper and lower case). So either this one or the official font #8 could be used for a 80 column wide font. Might have to break out a magnifying glass to read it on the PicoCalc though!

' pico8.bas
' Font type    : Full (96 characters)
' Font size    : 4x6 pixels
' Memory usage : 292 bytes
' Font adapted from: https://www.lexaloffle.com/bbs/?tid=3760

DefineFont #10
  60200604 44000000 00AA4040 A0AEAE00 A2406EEC EACCA048 000048E0 42408848
  E4A44022 00E404A0 00800400 000000E0 80442440 C4E0AAEA E8E2E044 E062E2E0
  E820E2AA EAE8E0E2 2022E2E0 EAE0EAEA 040420E2 80040400 0E208424 2484000E
  4060E280 4A60A84A CAEAA0EA 608868E0 E8E0AACA C8E8E0C8 E08A6880 E4A0EAAA
  44E4E044 A0CAAAC0 EEE08888 AACAA0AA C0AA6AA0 4A80E8EA CAEA60AC C0E268A0
  AA4044E4 AEAA60AA E0AEAA40 AAA04AAA 48E2E0E2 C088C8E0 62204484 004A6022
  E0000000 0E000042 CA0CA0AE E0880EE0 0EC0AA0C C80EE0C8 E08A0E80 0EA0AE0A
  440EE044 A0CA0AC0 0EE08808 AA0CA0EA C0AA06A0 0480AE0E AC0E60AC C08206A0
  0A40440E AE0A60AA E0AE0A40 0AA04A0A 280EE0E2 60C464E0 C4404444 802EC064
  E0AA0400 
End DefineFont

print "pico8"
font 10, 1
for i = 32 to 127
  if i mod 16 = 0 then print
  print chr$(i);
next i
print

Just for completeness, here’s the .c definition of the same thing (like the fonts compiled into PicoMite):

// pico8.c
// Font type    : Full (96 characters)
// Font size    : 4x6 pixels
// Memory usage : 292 bytes
// Font adapted from: https://www.lexaloffle.com/bbs/?tid=3760

fontdatatype pico8[292] PROGMEM={
0x04,0x06,0x20,0x60,
0x00,0x00,0x00, // Chr$(32)
0x44,0x40,0x40, // Chr$(33)  !
0xAA,0x00,0x00, // Chr$(34)  "
0xAE,0xAE,0xA0, // Chr$(35)  #
0xEC,0x6E,0x40, // Chr$(36)  $
0xA2,0x48,0xA0, // Chr$(37)  %
0xCC,0xEA,0xE0, // Chr$(38)  &
0x48,0x00,0x00, // Chr$(39)  '
0x48,0x88,0x40, // Chr$(40)  (
0x42,0x22,0x40, // Chr$(41)  )
0xA4,0xE4,0xA0, // Chr$(42)  *
0x04,0xE4,0x00, // Chr$(43)  +
0x00,0x04,0x80, // Chr$(44)  ,
0x00,0xE0,0x00, // Chr$(45)  -
0x00,0x00,0x40, // Chr$(46)  .
0x24,0x44,0x80, // Chr$(47)  /
0xEA,0xAA,0xE0, // Chr$(48)  0
0xC4,0x44,0xE0, // Chr$(49)  1
0xE2,0xE8,0xE0, // Chr$(50)  2
0xE2,0x62,0xE0, // Chr$(51)  3
0xAA,0xE2,0x20, // Chr$(52)  4
0xE8,0xE2,0xE0, // Chr$(53)  5
0xE8,0xEA,0xE0, // Chr$(54)  6
0xE2,0x22,0x20, // Chr$(55)  7
0xEA,0xEA,0xE0, // Chr$(56)  8
0xEA,0xE2,0x20, // Chr$(57)  9
0x04,0x04,0x00, // Chr$(58)  :
0x04,0x04,0x80, // Chr$(59)  ;
0x24,0x84,0x20, // Chr$(60)  <
0x0E,0x0E,0x00, // Chr$(61)  =
0x84,0x24,0x80, // Chr$(62)  >
0xE2,0x60,0x40, // Chr$(63)  ?
0x4A,0xA8,0x60, // Chr$(64)  @
0x4A,0xEA,0xA0, // Chr$(65)  A
0xEA,0xCA,0xE0, // Chr$(66)  B
0x68,0x88,0x60, // Chr$(67)  C
0xCA,0xAA,0xE0, // Chr$(68)  D
0xE8,0xC8,0xE0, // Chr$(69)  E
0xE8,0xC8,0x80, // Chr$(70)  F
0x68,0x8A,0xE0, // Chr$(71)  G
0xAA,0xEA,0xA0, // Chr$(72)  H
0xE4,0x44,0xE0, // Chr$(73)  I
0xE4,0x44,0xC0, // Chr$(74)  J
0xAA,0xCA,0xA0, // Chr$(75)  K
0x88,0x88,0xE0, // Chr$(76)  L
0xEE,0xAA,0xA0, // Chr$(77)  M
0xCA,0xAA,0xA0, // Chr$(78)  N
0x6A,0xAA,0xC0, // Chr$(79)  O
0xEA,0xE8,0x80, // Chr$(80)  P
0x4A,0xAC,0x60, // Chr$(81)  Q
0xEA,0xCA,0xA0, // Chr$(82)  R
0x68,0xE2,0xC0, // Chr$(83)  S
0xE4,0x44,0x40, // Chr$(84)  T
0xAA,0xAA,0x60, // Chr$(85)  U
0xAA,0xAE,0x40, // Chr$(86)  V
0xAA,0xAE,0xE0, // Chr$(87)  W
0xAA,0x4A,0xA0, // Chr$(88)  X
0xAA,0xE2,0xE0, // Chr$(89)  Y
0xE2,0x48,0xE0, // Chr$(90)  Z
0xC8,0x88,0xC0, // Chr$(91)  [
0x84,0x44,0x20, // Chr$(92)  backslash
0x62,0x22,0x60, // Chr$(93)  ]
0x4A,0x00,0x00, // Chr$(94)  ^
0x00,0x00,0xE0, // Chr$(95)  _
0x42,0x00,0x00, // Chr$(96)  `
0x0E,0xAE,0xA0, // Chr$(97)  a
0x0C,0xCA,0xE0, // Chr$(98)  b
0x0E,0x88,0xE0, // Chr$(99)  c
0x0C,0xAA,0xC0, // Chr$(100)  d
0x0E,0xC8,0xE0, // Chr$(101)  e
0x0E,0xC8,0x80, // Chr$(102)  f
0x0E,0x8A,0xE0, // Chr$(103)  g
0x0A,0xAE,0xA0, // Chr$(104)  h
0x0E,0x44,0xE0, // Chr$(105)  i
0x0E,0x44,0xC0, // Chr$(106)  j
0x0A,0xCA,0xA0, // Chr$(107)  k
0x08,0x88,0xE0, // Chr$(108)  l
0x0E,0xEA,0xA0, // Chr$(109)  m
0x0C,0xAA,0xA0, // Chr$(110)  n
0x06,0xAA,0xC0, // Chr$(111)  o
0x0E,0xAE,0x80, // Chr$(112)  p
0x04,0xAC,0x60, // Chr$(113)  q
0x0E,0xAC,0xA0, // Chr$(114)  r
0x06,0x82,0xC0, // Chr$(115)  s
0x0E,0x44,0x40, // Chr$(116)  t
0x0A,0xAA,0x60, // Chr$(117)  u
0x0A,0xAE,0x40, // Chr$(118)  v
0x0A,0xAE,0xE0, // Chr$(119)  w
0x0A,0x4A,0xA0, // Chr$(120)  x
0x0A,0xE2,0xE0, // Chr$(121)  y
0x0E,0x28,0xE0, // Chr$(122)  z
0x64,0xC4,0x60, // Chr$(123)  {
0x44,0x44,0x40, // Chr$(124)  |
0xC4,0x64,0xC0, // Chr$(125)  }
0x2E,0x80,0x00, // Chr$(126)  ~
0x04,0xAA,0xE0, // Chr$(127)  
};

It works on the old MMBasic for Windows port as well, which I used to get this screenshot, since it’s a bit of a pain to get one easily from the PicoCalc, and I couldn’t be bothered copying the file back from it. :slight_smile:

1 Like

I remember looking at this when I ported over Super Star Trek, since that assumed an 80 column display.

Bottom line is that Font 8 is too small to be useful for most things.