Log In  

PICO-8 0.1.9b builds are now live on Lexaloffle and Humble.

This is a bug-fixing update, mostly for crashes related to switching between widowed mode, full-screen and minimized windows. I've also included the dynamically linked pico8_dyn versions in the linux archives, that were missing from 0.1.9.

The Windows installer & .zip file include a more recent sdl2.dll, although there weren't any known issues relating to that.

I've switched back to shift-a..z for glyph entry in the code editor, as alt-a..z is sometimes reserved by the host operating system. If you find yourself accidentally entering the extended characters by accident, you can turn this off in config.txt (near the bottom). To enter glyphs without shift-a..z, press ctrl-k to toggle glyph mode.



        Added: Alternative function key mapping: ctrl-6..9 for F6..F9
        Added: Alternative glyph entry method: (ctrl-k) to toggle glyph mode
        Changed: Enter glyphs with shift a..z, but can be disabled in config.txt 
        Changed: Increased emscripten ram to 128MB (some carts at risk of running out)
        Fixed: Crash when window size is tiny or minified
        Fixed: Crash on toggling fullscreen mode
        Fixed: printh can write files outside filetree (security issue)
        Fixed: show_fps (can also now be toggled with ctrl-1)
        Fixed: Shorthand if/then syntax error when using the form: (functionname)(param)
        Fixed: log.txt not saved in path specified by -home switch
        Fixed: Default application data folder created even when -home specified
        Fixed: Missing dynamic builds (pico8_dyn) from linux archives
        Fixed: Removed unneeded RPATH from linux binaries
        Fixed: export foo%d.wav fails to write multiple files 
P#30148 2016-10-06 18:20 ( Edited 2016-10-06 22:20)

Looks nothing short of awesome here, ZEP ! Made some checks ... runs all my software fine, including Simple Notepad.

Tried out my fav games and screen teasers from SPLORE. All works here. Windows 8.1 Classic Shell edition. Green lights all the way. :)

Friendly reminder, QWERTY keyboard INPUT for next release please !



If you're going for nostalgia, the INPUT() command was founded in BASIC back in 1964.

The only reason early gaming platforms like Nintendo and Atari did NOT have QWERTY keyboards is because they were not INTENDED for users to write games in; only to play in them.

When ATARI BASIC came out, however, you better believe that they had the INPUT command all ready for use for programmers. Many games for Atari were written using the input command for a variety of things. All back in September of 1978.

The first computer I ever worked on, The T.R.S. 80 Model I, Level I, 4k, audiocassette. Made use of INPUT for a variety of games, including their BASIC.

With the TRS 80, INPUT could be used to get a numeric value for a variable A-Z, or one of two strings, A$ and B$, up to 16-characters maximum in length.

The one game for TRS 80 I remember most clearly that used INPUT effectively was, "Haunted House."


And that was many years ago as well ...

P#30152 2016-10-06 19:04 ( Edited 2016-10-07 00:21)

For some reason, avast is refusing to let me use this version of PICO-8...

P#30153 2016-10-06 19:44 ( Edited 2016-10-06 23:44)

Avast is an anti-virus program. I use Malwarebytes myself. What message are you receiving from your AV, Fayne ?

P#30154 2016-10-06 20:47 ( Edited 2016-10-07 00:47)

Have you considered that the Atari 8-bit lineup and the TRS 80 are all Home Computers and not Consoles?
It makes no sense for PICO-8, a fantasy console, to feature a keyboard. And yes while it has mouse support it doesn't advertise this as a normal feature, is rather hidden away, tells you that it's meant as a devkit only feature, and also has various issues that make it undesirable to use.

PICO-8 is a fantasy console system, runs Lua, which has NOTHING to do with BASIC, and has from the very beginning and continues to, features a dpad and two button input system.

P#30156 2016-10-06 22:07 ( Edited 2016-10-07 02:07)

Then I will wait for the "hidden away" keyboard function when it becomes available, Gamax. I am immutable on the issue.

In any case, it is ZEP's decision. Should keyboard input become available, and I hope it does, you can then make all haste to avoid using it. :)

P#30157 2016-10-06 22:16 ( Edited 2016-10-07 02:23)

@Fayne: If it is a PUP error it is safe to ignore as PUP or Potentially Unwanted Program is mostly a designation for that are assumed unwanted based on lack of factors such as maturity, community spread, ratings, or similar metrics if memory serves me right. Basically it protects you by pointing out "Hey, not a lot of people use this thing and it is super new, you might not want to use that incase it is something unsavory". Pico-8's installer and/or zip should be small enough to toss into virustotal if you are still nervous, or just wait till Avast can get more info on the file which I should happen at some point, at least when the file is a bit older.

P#30165 2016-10-07 01:28 ( Edited 2016-10-07 05:28)

Our product, G DATA Antivirus, says its clean. :)

P#30172 2016-10-07 04:22 ( Edited 2016-10-07 08:22)

Is the update available for PocketCHIP?

P#30182 2016-10-07 08:42 ( Edited 2016-10-07 12:42)

No detections with AVG. Virustotal does have 3 detections though, oddly not from Avast however.

Bkav         W32.eHeur.Virus06
Comodo     TrojWare.Win32.TrojanDownloader.Delf.gen
Qihoo-360  HEUR/QVM20.1.0000.Malware.Gen

This was run on the installer itself and is possibly related to how the installer packs the program. On the installed pico8.exe itself, Comodo has the same detection as above, but is the only one with a detection - Bkav and Qihoo-360 both have the exe as clean, so with them it's something in the installer.

Just add it to your exceptions list.

Installer Virustotal result

Windows executable Virustotal result

False positives most often occur when something in the program is similar to something in a known virus. This can be any arbitrary thing though, such as the algorithm used to parse data or something. It all depends on what things the antivirus has in its signature list for a particular piece of malware.

P#30235 2016-10-07 18:31 ( Edited 2016-10-07 22:45)

As I understand viruses, the BEHAVIOR is what is being looked at I suspect. Not so much patterns as I don't think the actual PICO program itself has any discrepancies.

BUT - the installer EXE might.

May I suggest you, Fayne, download the ZIP edition. If it doesn't give you any trouble, runs just fine, then I suspect the fault lies in the auto-installer.

I rarely use auto-installers myself when a ZIP is available usually for that very reason as they can sometimes ring an alarm with a boisterous anti-virus or malware checker.

P#30236 2016-10-07 18:49 ( Edited 2016-10-07 22:49)

@dw817 IIRC, there is already a PICO-8 game/demo/something floating around the BBS that can read all keyboard inputs. I didn't look at the code to see how they're doing it, probably with peeking addresses or something.

As Gamax already said, this is unlikely to become a mainstream feature, as PICO-8 is a virtual console, not a virtual PC, inspired by consoles in the pre-NES era such as Atari 2600/5200/7800, Colecovision, and Intellivision. I say pre-NES because the color palette and size limitations more closely resemble those, as the NES had up to 1MB cartridge storage and a ~64 color palette, and the SEGA Master System from that same era had similar specs to the NES.

P#30238 2016-10-07 18:52 ( Edited 2016-10-07 22:52)

@dw817 Antivirus programs can only look at behaviors on installed and running programs, but not when scanning actual files like on Virustotal. When file scanning, they look at the binary data for code signatures that resemble similar code inside of known malware, even if it's arbitrary code.

For example, back when I was programming in Delphi, I frequently used a library that was included with Delphi for working with keyboard input. Some antivirus programs would pick up my programs that used that library because the same library was also used in some keyloggers that were built in Delphi (because it was a general purpose keyboard library), not because my program was keylogging. You didn't even have to install or run the program in order for it to get detected, and the library itself was harmless, but it was included in the detection signatures for certain keyloggers.

One famous example of a virus that used the same library was Subseven. Because it used that standard Delphi library, anything that used that library was also at risk of being detected as having a similar signature to Subseven, because there was a chunk of code inside your program that also existed in that virus.

P#30240 2016-10-07 18:56 ( Edited 2016-10-07 23:05)

Hi Scathe. Briefly ... I'll leave you to the AV as I've said my piece (peace ?) on it.

Now, as to the keyboard reader. scratching the back of my neck well YES, there is a routine, I bookmarked it, and it was one I was going to look at on the morrow.

Minju, it requires you to have your own custom JAVASCRIPT modification. If it were a memory location only, that'd be sweet, but no - this means the program essentially will not run directly in the BBS.

Where I'm interested in posting code.

But - to another point, now that I'm on the Itchy site, it may very well be possible for me to write PICO games that read keyboard. I don't know.

I come back to my own words. Will I write code that I don't want others to see and possibly get paid for them to play and/or use it ? That's a big step for me.

In any case, the fact you can type text freely in the code editor but not at all in the game, will always be a crooked shank to me as they are both connected to each other.

And I know I'm not alone - I came across a few other coders who would like QWERTY keyboard input() and inkey() for PICO as well.

The curious thing is, were it written in a future update. All of you purists can simply decide not to use it. It won't affect your code, not one binary bit. :)

P#30241 2016-10-07 19:10 ( Edited 2016-10-07 23:33)

IIRC, the demo I saw was running on the BBS, so it wasn't using custom JavaScript. I could be misremembering where I saw it though, as it was quite some time ago. Usually I'm good about saving the demos I like or find interesting, so I can take a closer look at them later, so I might have it. Unfortunately I have quite a lot of stuff saved, and I'm also terrible about renaming them from "h9d78syd08sgo.p8.png" to something actually indicating what it is, so I'd have to do some digging.

Yes, Itch.io lets you post whatever JavaScript you want (aside from probably some common sense stuff that could pose a security risk to Itch.io themselves, like some document and window methods), so if you went that route it would almost certainly work there.

"All of you purists can simply decide not to use it. It won't affect your code, not one binary bit. :)"

The problem though is that part of the reason PICO-8 is designed the way it is, is probably so that there's consistency between all of the cartridges with regards to controls. You basically instantly know when using an American keyboard (I know it's slightly different for keyboards of other regional layouts), that Z is button 1, X is button 2, and up, down, left, and right are directional.

When full discretion is given to the developer about the input layouts, suddenly you don't know which buttons do what. Is it spacebar for action? Enter? Z? Something else? WASD movement or arrow keys? Maybe numberpad keys? It becomes a lot less consistent and straightforward for the users. I think the consistency helps the simplicity of the games, which is a net gain for users.

P#30242 2016-10-07 19:29 ( Edited 2016-10-07 23:58)

If it's PEEKS and POKES, Scathe, and works on current PICO 0.1.9b (Windows) and runs just fine in the PICO BBS either Firefox or Google Chrome - I will definitely be interested !

P#30243 2016-10-07 19:33 ( Edited 2016-10-07 23:33)

See my edits to the above post.

P#30244 2016-10-07 19:36 ( Edited 2016-10-07 23:36)

Reading ... I'd settle for just INPUT() then. That forces a "?" mark to appear and what you type is seen then, backspace to make corrections, and ENTER to confirm saving that in the variable.

That won't interfere with reading the joystick (Z) and (X) as INPUT stops everything waiting for numeric or string entry before the code can continue any further. Perhaps continuing to play repeated music in the background is accepted during INPUT phase.

The TRS-80 did not have INKEY$ when it first came out - but it did have INPUT.

P#30246 2016-10-07 19:40 ( Edited 2016-10-07 23:42)

You mean something similar to a textbox you can add for users to type into, but doesn't allow remapping of actual controls to different keys? Sure, I could get on board with something like that, especially since zep plans to make global/online hiscores a thing. He'll probably implement something like the following natively instead though, so it works with controllers and touch devices:

Cart #28738 | 2016-09-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#30247 2016-10-07 20:01 ( Edited 2016-10-08 00:10)

BTW, in regards to the Avast situation: It wasn't PUP, it was CyberCapture, which triggers for unknown files. It asked me to send the file to Avast for analysis and I was later notified that the installer and program were determined to be safe, so there should no longer be any problems with Avast. Strangely though, by default, Avast always blocks unknown files and the expected "Run anyways" button is instead an "I trust this file" button that just gives Avast your opinion. If there are any future problems with PICO-8 updates and Avast, here's how you allow Avast to allow you to use PICO-8:

P#30248 2016-10-07 20:19 ( Edited 2016-10-08 00:19)

I've seen this before. It's really good. Slightly, I may be making a different one. :)

Mine is constructed so zero tiles, mapper, sound, music, or even the screen is affected once leaving the routine - with no file saving of memory either. Despite its appearance and despite its onboard sounds it is all self-contained and recovers the screen beneath it too when leaving . A perfect ninja. :)

Currently it's 154-lines of source. I was going to post it completed tomorrow.

Usage is:

function input(txt,str)

Where TXT is the text that appears in the box as a prompt. "?" added if the last character is alpha. STR can be blank or contain a previous value.

Completely mouse-driven.

Yet I'll still trade this over for a good old-fashioned true QWERTY INPUT() routine.

P#30249 2016-10-07 20:22 ( Edited 2016-10-08 00:32)

Regarding the whole keyboard thing....

... So, not entirely outside the theme/scope of a "fantasy console"

(Atari, NES also had them I believe)

P#30252 2016-10-07 22:54 ( Edited 2016-10-08 02:57)

Thanks, Felicitous ! That definitely deserves a medal.


P#30254 2016-10-07 22:58 ( Edited 2016-10-08 05:31)

The Intellivision keyboard only happened because they were trying to market the Intellivision as a computer (Hence keyboard also known as the Intelliputer) which didn't sell at all, it also is not just a keyboard and adds another processor, more ram, a built in tape-deck, and printer support to give the Intellivision features you'd want from a Computer

The ECS, which is the thing they actually ended up releasing (Yay controversy over constantly delaying the Keyboard due to it being too expensive to produce and running into federal issues) and has keyboard support, is yet again marketed to make the Intellivision into a Computer (Entertainment Computer System) and features more ram, tape support, and printer support.

That Famicom keyboard ... I don't know. I suppose it's also probably also an attempt to bring Computer users to use the Famicom, it also gives you more memory and tape drive support. It also cannot be used on the NES due to the expansion port being different and eventually hidden away.

(This obviously just means PICO-8 needs a tape drive too :p)

P#30298 2016-10-08 09:46 ( Edited 2016-10-08 14:03)

We could go backwards and forwards all day with examples and counter examples. The point I was trying to make that still stands is that enabling keyboard input for pico8 isn't far fetched with respect to the "fantasy console" concept. If we're going to get purist about it, all those original consoles didn't have a built-in IDE either. Or require you to load and run cassettes...

Personally, I'd love to be able to create old-Skool text adventures and the ilk, so would love to see keyboard support. After all, no one needs to use it if they don't want to... Or play the games that use it.

Ultimately it's up to Zep, as to what direction he wants to take pico8 in the future.

P#30299 2016-10-08 10:00 ( Edited 2016-10-08 14:02)

It's okay, Felicitous. Gamax has been against keyboard input from the starting gate. I, however, can see how INKEY$() might cause ripples in the community who want classic 2-button gaming.

Yet I also cannot see any harm with INPUT (requiring you to press ENTER to confirm your choice).

Time will tell. I only hope when INPUT is added, it is soon.

And yes, I fully agree with you. Would love to break out some good old text-adventures. I wrote a fair shake in my day and could post my source for methods on short-code ways to build a message interpreter - as Text Adventures, with a very friendly nod to Scott Adams, was definitely the rage back in '78.

I played all of his games and while I only won the pilot, "Adventureland" his other text adventures certainly showed me a grand time with incredibly deep plots and story.



P#30304 2016-10-08 12:55 ( Edited 2016-10-08 17:02)

I say pre-NES because the color palette and size limitations more closely resemble those, as the NES had up to 1MB cartridge storage and a ~64 color palette, and the SEGA Master System from that same era had similar specs to the NES.

That's not completely true.

On the memory bus, only 32 Kbyte of the cart can been seen, and if cart can bigger it's because of the use of what we call "memory mapper", which is basically having multiple 32 KByte cart that you can switch. It's something we can do with PICO-8, a bit difficult, but can be done.

For the colours, the palette is large that's true, but on screen it's a different story. Unless you use some (clever) tricks, a tile is only 4 colours and you have only 4 palette of 3 colours (1 is a transparent colour) so basically without mid-frame trick you only have 12 colours at the same time on screen.

So the PICO-8 is more close to a NES/Famicom than anything that came before like the Atari 2600. PICO-8 have some sort of sprites, tilemap, and 4 sound channels with fancy effect, some of these things even the NES does not really have them.

P#30582 2016-10-10 17:28 ( Edited 2016-10-10 21:28)

Wow ! Only 12-colors on the NES, Godzil ? I'm AMAZED at some of the screens I've seen in it while playing. I knew each 8x8 tile could only hold 4-colors, but I thought the entire palette was rich - like 256 color choices.

Even more impressed now about old-school graphics on it and what they managed to get away with !

I guess while we're on comparisons, I KNOW the ATARI 2600 has a greater range of audio than PICO currently - and DEFINITELY far less than NES. Comments ?

P#30605 2016-10-10 22:17 ( Edited 2016-10-11 02:29)

Octaves are numbered wrong, (at least compared to systems in use for the past 300 years,) and don't go nearly low enough in my opinion. (two octaves lower would be quite usable, three would be even better.)

As it currently is, many pico-8 tunes give me a headache at normal volumes.

P#30674 2016-10-11 15:10 ( Edited 2016-10-11 19:10)

It's not just that, Tyroney, it won't do certain sounds ! Watch this video of Atari Superman and LISTEN to the sounds. Many of them cannot be made in PICO no matter how clever you put the notes together. Especially the helicopter guy and when Superman picks up a piece of blown-up bridge.

Even just Superman flying is a unique sound unable to be reproduced in PICO.


P#30675 2016-10-11 15:59 ( Edited 2016-10-11 19:59)

Well the Atari 2600 doesn't feature simple waveforms, it's uses shift registers to generate what is essentially short looping 1bit samples. Because of that and because it uses a frequency divider, quite a bit of frequencies it produces are horribly off of an octave scale.

P#30846 2016-10-13 13:53 ( Edited 2016-10-13 17:53)

And yet it has a greater sound range. Now, as for the NES. I'm not so sure. I think PICO and the NES are matched.

P#30853 2016-10-13 14:25 ( Edited 2016-10-13 18:25)


This is actually a very poor example of the NES audio capabilities as you can't really use this in a game, but can't do this in PICO-8.

P#30858 2016-10-13 15:36 ( Edited 2016-10-13 19:38)

"Octaves are numbered wrong, (at least compared to systems in use for the past 300 years,)"

Wait, what is the trick mentioned in that thread to play sounds in "slow mode"?

P#30869 2016-10-13 16:29 ( Edited 2016-10-13 20:29)

Pretty sure they're cheating, Gamax, and that's not actually the audio of the NES. Single word speech was possible on the NES but it was RARE and took a lot of space.

Compare PICO to THIS:


And if you REALLLY want to get primitive, there is this:


Curiously I'll be using a method similar to this for my own engine. Not using marbles per se, but the same effect where you HIT the note of an instrument to create a desired effect.

P#30871 2016-10-13 16:35 ( Edited 2016-10-13 20:38)

Welp! Turns out you're completely wrong and the NES can actually do that. (and PICO-8 can't, which was the point of me posting that)

NesDev post with rom download here.
Best non emulator footage I can find is this Classic Game room review: https://www.youtube.com/watch?v=PAgT9xbjy7M

Plus that video you've linked states in it's description: "Some details are left out," "samples that aren't DPCM", the demo is just a bunch of 7bit PCM being streamed from the cart into the DMC channel (samples)

P#30872 2016-10-13 16:42 ( Edited 2016-10-13 20:51)

W O W ! 257k ! This is astounding. Don't mind me, I'm very old-skool and didn't think something like that was possible - and I have hundreds of hacks, demos, and full original year 2000+ carts for NES - first time I've seen (or heard of) that partiicular one. :)

As Dayna asked Avon one time in Blake's 7.

"Don't you ever get tired of always being right ?"

To which he coolly replied. "No, just of you always being wrong."

P#30873 2016-10-13 16:50 ( Edited 2016-10-13 20:52)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-10-04 09:33:14 | 0.065s | Q:64