Log In  
Page:
1
2

There should be an option in the config file for pixel perfect scaling. Try turning that off and it should allow non-square resolutions. Things will be stretched though.


Ok, so yes turns out the screen was not set up correctly. 848x400 instead of 800x400 shrug. These screens from China don't have a lot of documentation. Anyways, after I configured the screen, the pico-8 screen was native 128x128, a box in the center of the screen. The ONLY way I could make it bigger was adding -pixel_perfect to the execution argument. I tried adding things like pixel_perfect to the config file but I guess I'm not formatting it right. Pico-8 launches in 128x128 full screen (small box in the center of the screen). Then after exiting Pico-8, the config.txt file and my changes are gone.

As a side note, I can't get windowed mode to work at all. If I make the existing line =1 and boot Pico-8, it launches in full screen and when I exit, the windowed line is back to =0. So there's something funny going on in there.


I am running a Pi Zero W

I have been trying to get pico-8 running for days on rasbian.

the pico8 executable comes up with "SDL Error: Could not initialize OpenGL / GLES library" and the pico8_dyn executable which I am assuming fixes the issue of it not being able to find SDL (this is what I am assuming because these error messages are useless) comes up "SDL Error: rpi not available"

I bought Pi to use specifically for experimenting and pico8 (I know there is a dedicated distro but it appears not to have wifi capabilities) so I am pretty dissapointed.


I've just got a Pi 3 and had the exact same errors as you Ultimatepowaa...

I've managed to partially get around it by doing the following (updating the firmware). (NOTE not sure if this is the best way to do this, do at your risk):

sudo BRANCH=next rpi-update

Now, pico8 works fine, BUT I still get the same error with pico8_dyn:

SDL Error: rpi not available
** FATAL ERROR: Unable to initialize SDL

I wouldn't be concerned about this but I am having trouble with pico8 and wiringpi (for gpio) even though I have the latest version of that installed.

Anyone know how to get around the above error?

EDIT: I have installed SDL 2 by the way, like this:

sudo apt-get install libsdl2-2.0-0

Presumably I am missing something...


Just to follow up from my previous post...

I didn't really manage to 'fix' it as such. However I have got around the problem and got pico8 working fully, with wiringPi by downgrading the firmware to 4.4.49:

sudo rpi-update 2ca627126e49c152beb1bf7abd7122ce076dcc65

Haven't got too far with it yet but GPIO inputs/outputs seem to be working great :)


Late to the party as usual, but has anyone yet figured out a proper way to close the app on Retropie or know a way to bind a hotkey for exitting or something? That's my only problem with Pico-8 on Retropie atm.


@NKO A new version of Pico is supposed to land this week with a menu option for exiting, iirc.


@springogeek Fantastic news! Cannot wait for the new release! So far it's been really nice little tool.


Hi,

I am new to Pico 8, just purchased it the other day and I am trying to get a minimal system for it on the Raspberry Pi 3.
I have no un-needed services, no X of course, and my own SDL2 build which works fine. All in all, it boots into pico-8 in 3 seconds or so.

However, I have a big problem: sometimes, when I have been runnig pico-8 for, let's say, a minute or so, there's a 3-5 seconds pause on the game. Music keeps playing but the main character or whatever there's on screen is stopped.
I think it's related to lack-of-network in my system: since there's no source code I can't debug, but by guess I'd say pico8 is timing out on network or something similar, and that causes the UGLY pause.

So, since a new version is due to land soon, could it have an option for totally disabling all network operations/tests/timeouts/whatever, please?

Thanks!


@vanfanel I don't think that's network timeout what you are seeing here, it must be something else.

Why don't you try to run pico-8 under strace to see what's happening?


@makz: you were right. When I got a "stall", this was happening according to strace, with "Picoman":

open("./config/cdata/funfetched_nanoman.p8d.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 14
open("./config/cdata/funfetched_nanoman.p8d.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 14
open("./config/cdata/funfetched_nanoman.p8d.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 14
open("./config/cdata/funfetched_nanoman.p8d.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 14

For some reason, Picoman writes to disk when you shot repeatedly...

Also, I got an identic stall on "The Infinite sewers of Doh" when this happened:

[pid 527] open("./config/cdata/sewersofdoh.p8d.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 14
[pid 527] open("./config/cdata/sewersofdoh.p8d.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 14
[pid 527] open("./config/cdata/sewersofdoh.p8d.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 14
[pid 527] open("./config/cdata/sewersofdoh.p8d.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 14

"Infinite sewers of Doh" writes to disk every time I change difficulty level or set/unset the "warrior" option.

So it seems to be related to disk (microSD in this case) access...
What are those games doing when they access these files in a writable mode during runtime?? Can it be somehow avoided for SD-based platforms like the Pi?? SD card access is slow and can, of course, cause these stalls.


hum yes, in "sewers of doh" I do call dset() on every option change, and of course it's up to no good on a microSD.

from the manual: "There is no need to flush written data -- it is automatically saved to permanent storage even if POKE()'ed directly." I sure hope there isn't a disk access on every dset or poke, and that's it's cached till next inter-frame at least (are those file open actually fourfold though?). maybe zep can streamline the whole thing a little better (like wait 10-30 seconds between file updates and make them as quick as possible)?

I think a proper (and "retro") way for pico-8 to deal with saves would be to stall the game and show a spinning icon (like with load(), cstore() etc). as a dev you'd have to be cautious about it. that might be too late though, as that would break a number a carts.

in the meantime I'll be updating my games...


@ultrabrite: thanks for the response and for taking time to update your games to avoid this somehow. Settings could be saved on exit, for example, using an explicit dset() call, if I have understood you correctly.

The strangest case is Nanoman, where the SD card is accessed... in every shooting sequence.
That causes a stall sometimes (not always), but I don't see why would a game do that.


if you mean "Nanoman" by funfetched, it seems to be using dset/dget a lot. the code is minified, but my guess is that they're used as a way to peek/poke full 32bits numbers in memory. that would be a hack but hey, that seemed free...


@ultrabrite: yes, that's the game I mean, corrected.

I have been examining other games under strace, and it seems that Nanoman is an exception, luckily.
Most simply access those config/cdata/<game>.txt on exit.

Should I report to Nanoman creator?

Another question: The game "The Lair" seems to be trying to access /dev/gpiomem. Any idea about what function (in Pico8 code) could be doing that and why?


RE The Lair, having had a very quick look in the code, krajzeg is poking into GPIO memory (0x5f80+). I'm not sure if this is really done for GPIO use, or just using that part of memory.

I didn't think using GPIO should have any noticeable speed hit. Certainly with my testing so far with GPIO on Pi 3 it does not. I will be doing a lot of testing with this soon so will be able to confirm.


@minsoft: Do you know what parts of the code in "The Lair" could I comment so it doesn't access the GPIO memory??
In my Pi systems, the GPIO module is not loaded (for other technical reasons of no relevance here) yet I'd like to try it.


Wanted to post a link here, for anyone still having issues getting PICO-8 running on a Raspberry Pi with an Adafruit PiTFT:
https://www.lexaloffle.com/bbs/?pid=45533

Hope that helps!


@vanfanel if disk access is slow for you, try to run pico-8 from /dev/shm. It's a location that acts like a filesystem but resides in memory, which should speed things up a lot. Pico-8 and its games are small enough to fit there, I believe. Just be aware that on shutdown its contents would be lost, but maybe you can make a shell script to backup the contents on shutdown and restore them on boot.


This is pretty cool.


How do I set windowed-mode? I'm using the latest Pico-8-version (Raspbian) and change the config.txt in ~/.lexaloffice/pico-8/

window_size 512 512
windowed 1

but Pico-8 starts in fullscreen and after quitting it, "windowed" in config.txt is again set to 0...


I'm seeing the same problem, trying to get Pico-8 to run in a window on Raspbian. Again, the config file resets 'windowed' while allowing the 'window_size' to be altered. Even running with the -windowed' tag doesn't do it.

On controllers, http://www.generalarcade.com/gamepadtool/ (as mentioned in the manual me->RTFM) has Win/Mac/Linux tools that can generate the SDL text. It seems the main difference is just the platform tag at the end. Here's a NES and SNES USB code from Windows:

030000001008000001e5000000000000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,
dpup:-a1,leftshoulder:b4,rightshoulder:b6,start:b9,x:b3,y:b0,platform:Windows,

03000000790000001100000000000000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,
dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows,

And here is the same code from Mac:

030000001008000001e5000006010000,NEXT SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,
dpup:-a1,leftshoulder:b4,rightshoulder:b6,start:b9,x:b3,y:b0,platform:Mac OS X,

03000000790000001100000006010000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a4,dpleft:-a3,
dpright:+a3,dpup:-a4,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,

The only difference is platform:<presumably we would need 'Linux' for rPi> at the end of the text, based on Liquidream's post about being partially successful with a PS3. So, another poster talking about cross-compatibility should not be correct in saying we don't know how to convert between different platforms. I'll have to experiment now; slightly complicated by me using rPi Zeros, as I have to unplug the keyboard to plug in the controller, after Pico-8 has started (using Raspbian rather than PicoPi)

These settings are for the following controllers (the cheapest 'good' ones I've found):

https://www.amazon.co.uk/gp/product/B0778KKKR9/ USB NES controller, although they report as SNES, but just don't have all the buttons wired up; I've opened one up and they only have the right number of internal buttons (see images here: https://www.dropbox.com/s/88hrrk6rw5uj5xb/nesORsnes.zip?dl=0 ), so the 'blob' chip must be a generic one, but the PCB is NES only. NOTE the SDL shows a mapping for shoulder buttons, which this controller doesn't have.

and

https://www.amazon.co.uk/gp/product/B01NAEO5W6/ USB SNES controller, which has way more buttons than Pico-8 needs.

If we compare to Liquidream's PS3 controller text:

060000004c0500006802000000010000,PS3 Controller (Bluetooth),a:b14,b:b13,y:b12,x:b15,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,
rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,
righttrigger:b9,platform:Linux,

We have 'leftstick', 'rightstick', 'lefttrigger', 'righttrigger' and '(Bluetooth)', which are unique, and 'leftx', 'lefty', 'rightx', and 'righty' in addition to the 'dp' (D-Pad) options. If we look at the NES USB controller above, which don't have joysticks, we can see the use of '+a0' and '-a0' for left and right, equating to 'a0' on the PS3, as the values will be given by the stick positions, and similarly for the y axis, and for the right stick. I am guessing that 'leftstick:b1' means when you press down the joystick, which is often called L3; the same for R3 for right stick. So, if you wanted to use the D-Pad on the PS3 you would need to change the settings to mimic the one from a NES/SNES controller.

I will experiment now, to see if all this results in a good cheap usb controller working with Pico-8

DoctorMike
P.S. to install wiringPi, I could not get git to work; I suspect it is out of date info, but this web site suggests it was never a good way to do it: http://wiringpi.com/download-and-install/


Well, unplugging keyboard and substituting the usb controller didn’t work :-(
SDL text added to the relevant file in the .lexaloffle folder, unless it needs formatting? It could be because PICO-8 starts before controller is plugged in, of course. I’ll have to wait until I get my microUSB hub, to be able to have a keyboard and controller both plugged in. I should try PicoPi and/or use a Pi3 to see if it just the USB swapping, or use a Bluetooth keyboard, or controller, to see if I’m missing something else. However, it could be SDL2 not installed, or some other software missing. Will keep experimenting!


Ahah! This site has Linux SDL text:
https://github.com/gabomdq/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt
so I’ll try these tomorrow; could still be the USB swapping, of course…


[Damn, lost the post I was writing. Rewrite]
On Windows, no SDL text needed; the USB controller just works, but PICO-8 doesn’t detect hot swapped controllers. Looks like I’m going to have to use rPi3 (more USB ports) or have one peripheral connect via Bluetooth. Clearly, for game playing at least, TinyPi or the Waveshare Game Hat - using GPIO for the controls - won’t have this issue. I need to try this with the Pi0 on Monday, to see. A shame Pico can’t detect new USB controllers after launch, as it would have made cheaper the whole dev kit route. The USB keyboard/trackpad (~£6 on eBay https://www.ebay.co.uk/itm/2-4GHz-Mini-Wireless-Keyboard-and-Touchpad-Mouse-Android-Smart-TV-Box-Laptop-PC/302748418393 but can be cheaper without the rechargeable battery) is great, but the OK button in the middle of the pad causes unexpected pauses of games, and up being mapped as jump in many games causes problems, when it would be better as Z or X.


Here's my Raspi Pico-8. I bring it to some classic game conventions and it will be at Midwest Gaming Classic again this year. Hug Arena is a favorite there. The design is somewhat inspired by the HAL 9000. I'm just running the stock OS. I have the boot messages suppressed and it boots straight to 'splore. I usually download a few games and update before shows, but if wifi is at an event I can just pull new games down at the event as needed.
I talk a little bit about it on YouTube here: https://www.youtube.com/watch?v=19A82VSfXuo


OK, on a Pi3 the usb controller is recognised by Pico-8 without any additional set up or editing of files for SDL, using a base Raspbian and a standard install of Pico. Same with PicoPi. So, it appears that there is no need for an SDL entry for the controller, just that it be plugged in when Pico-8 starts. However, having a config text might allow button remapping, which could work for the PlayStation controllers. Now to getting my TFT SPI screen working...


Hello !

Here is my temporary setup. I plan to dismantle the little screen and build a new box inspired by the design of portable computers from the 80's, or maybe I will go full Steam Punk :-)

I used gamaral's picopi image : https://guillermoamaral.com/read/picopi/
I tweaked it a little bit so that I could fill the screen, by default it was a pixel perfect rendering that was way to small.

I modified one of his scripts so that we can pass parameters to PICO-8 at startup and set the width, height and pixel_perfect options and generated a new image.

Thanks and have a good one :-)


1

Ok, quick update. I finally got the SPI TFT screen working, with reference to several web pages describing subtley different approaches. Pico-8 on Pi Zero recognises the USB controller, wiht some editing of the GPIO pins in the config file; I modified a TinyPi set up. On that, I managed to remove the joystick button function, which on my bluetooth keyboard, and the controller, caused false pauses when using the joystick in games. I swapped button one on the waveshare lcd hat for the joystick click, leaving button two as Z and button three as X (using the normal keyboard nomenclature).

On screen woes, I either had the SPI screen trying to represent a tiny version of the Raspbian desktop, while the HDMI screen showed a miniature version in the centre, or I had nothing on the TV, and what was effectively the top left corner of a full size desktop (barely showing the Wastebasket icon and a tiny bit of menu bar. With PicoPi, I saw a shrunk version of Pico-8 on the small screen, or both. With some hacking of the config file, and realising that the small screen was treated differently when the HDMI cable was removed, I've managed to get Pico-8 running full screen on the waveshare. However, it would be almost impossible to code on that screen. And without a usb hub, it is hard to have a keyboard and mouse - necessary for programming, and some games - but, at least, I can now use the waveshare controls for playing. What would be cool, would be using these controls for moving the mouse on the Raspbian desktop; no idea if GPIO can be used for that. Also, I think it is important (with the windowed version of Pico-8 now just released) to set up the boot sequence to detect if HDMI is connected, and run desktop, or run Pico-8 in splore mode if there is no TV/Monitor plugged in.


Anybody run into issues using the keyboard after performing a Ctrl+S or Ctrl+R keystrokes using PicoPi? It seems like all of the letter keys stop working after that point in the code editor and Pico-8 command prompt, but still recognize Z and X as buttons in-game. Tested with a couple different keyboards and ensured that the layout was correct in the PicoPi config.


1

The TV zeb is using in the original post picture is so good, I've been trying to find it. I can't find the Panasonic TH6-X3V anywhere except Japanese auction sites though.


2

I know this is an old thread, but I just managed to get this working:

I expect this would be pretty straightforward for someone who knows what they are doing. But for me it was a bit of a struggle to figure it all out (linux isn't my strong suit).

Most things run quite well. But because it's a Raspberry Pi Zero some more demanding carts can be a bit sluggish.


Hello all -

I am a Windows user with some beginner experience with Pico8. I also have two Pis at hand (a zero and a 3b) and I'd like to try out Pico8 on both. I have zero experience with Linux, however I am confortable with installing various images on the Pi as I've used the 3b for RetroPie for a while now. And as of now I have Raspbian up and running on it as well, on a separate SDcard.

I've downloaded pico-8_0.1.12c_raspi.zip from my account. Now could someone be kind enough to cleary break down all the steps to install it/get it to run on the Pi from there ? As said I have no experience whatsoever with Linux and/or Raspbian so I am hoping for some detailled steps. I've tried to locate the standalone Pi image discussed earlier in this thread as that seemed like a nice all-in-one package but it doesn't seem to be available anymore.

Thanks a bunch ! I am really looking forward to it as the ultimate goal is to get Pico8 running on my RGB Sony PVM :)


1

Hi again you all -
I am not sure if this is considered bad practice on this forum but I thought I'd bump this up. Thanks a ton if you can help !


[edit]
Update ! The above can be discarded as my issue was simply caused by me trying to run it on a Zero, which crashed when running the non "dyn" version and that led me to assume I was doing something wrong. The other executable works fine (albeit slow in full screen) ; and both versions run great at full speed on a 3b in both windowed mode and fullscreen mode.

Now here is another question. Would anyone know how to get pico8 to run at 2x scale while in fullscreen on a CRT ? I am using a Pi2Scart hat on the Pi to connect it to a Sony PVM. My Pi config.txt is as follows :

disable_audio_dither=1
dtparam=audio=on
dtoverlay=vga666
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
hdmi_timings=320 1 16 30 34 240 1 2 3 22 0 0 0 60 0 6400000 1 #240p

I can set it to double-sized (256*256) in windowed mode, but that shows the desktop behind the app ; and in fullscreen mode I can only manage to get it to either 1x (hence too small on a 240p display), or leave everything by default which makes it 4x I believe. Note that I do not mind the picture being cropped a bit at 2x.

My video settings in the Pico8 config.txt are :

window_size 256 256
screen_size 0 0
windowed 1
window position -1 -1
frameless 1
fullscreen_method 1

Which gives me this :

Any ideas ?


@Yakeru What awesome mini tv do you have here? A very good fit for PICO-8.


@P.O.

Make sure to take in account for the aspect ratio. Pico 8 is nativity a 1:1 pixel format and the Sony Trinitron is displaying in the NTSC 240p 4:3 aspect ratio.

The only way to fill the screen would either require a crop or a stretch. Pixel perfect would have two columns on the side of the screen as the display is more wide than it is tall.

Typical NTSC was 320x240

I would try multiplying by 1.875 or (15/7) on the height to get 240.
Depending on what is preferred you can multiply the width by 2.5 to get it
stretched... Or multiply it by 1.875 to get pixel perfect 👌


1

I installed the pico-8 on my Raspberry Pi Zero W and built a case out of an AMD Threadripper box, as is fitting for this performance beast!. The monitor is just standard ASUS fare I am afraid. Sprinkled some led lights and plushies on top and it came out really cute!


I found this random 7 inch LCD screen in a second-hand store:

It is a little heavy but includes a battery and HDMI port. I connected it to a raspi zero, loaded a micro SD card with a slightly old version of raspbian on it (without X!), put it in a band-aid plastic case and I was pleasantly surprised to see pico-8 just boot from the console (tty)! The statically-linked version only needs wiringpi and seems to be linked with sdl with directfb enabled (I don’t have libsdl on that system, and the version from the repository wouldn’t have directfb support, so no pico8_dyn). Our favourite bootup sound goes to the screen and keyboard works. I couldn’t see the mouse pointer however, and didn’t find any information online (people seem to say that sdl with directfb has support without anything else needed).

Really close to having a cozy development and gaming station!


1

I was having trouble getting Pico-8 to boot on my headless Raspberry Pi Zero via VNC. It just hung and I didn't see anything onscreen.

Turning on composite video output in raspi-config solved this. I now see Pico-8 via VNC, with no monitor actually plugged in.

Posting here in case anyone else is having similar issues.


Page:

[Please log in to post a comment]