Log In  
Page:
1
2

thanks for sharing!, this setup does indeed seem to work for me, has anyone found a way to exit pico-8 using a gamepad?, might there be a way of mapping a gamepad's button to a custom script that would kill the pico-8 process or something similar?

P#45939 2017-11-06 13:36 ( Edited 2017-11-06 18:36)

Used this guide again recently, thanks so much.

Now that pico8 0.1.11 allows exiting pico8 from the splore option menu, its a perfect addition to a RetroPie setup.

P#46689 2017-11-25 09:16 ( Edited 2017-11-25 14:16)

i'm curious about a tic-80 version of it! :o)

P#46750 2017-11-27 14:32 ( Edited 2017-11-27 19:32)

It should be basically the same steps to add TIC-80. There's nothing really Pico-8 specific about these instructions. Try it and let us know!

P#46888 2017-11-30 18:35 ( Edited 2017-11-30 23:35)

Hi all!

I managed to get a full screen PICO-8 on my Gameboy Zero (Super AIO based) with:
pico8 -pixel_perfect 0 -width 320 -height 240

But my audio is still super fast and, even worse, I cannot use any button.

Any idea about how to fix at least buttons?
I've read about an SDL mapper somewhere...

P#47261 2017-12-10 17:20 ( Edited 2017-12-10 22:20)

I've fixed the controller, at least!

The SuperAIO creator helped me, here's how it should be done...

This page did the trick for me:
https://bbs.nextthing.co/t/guide-to-writing-new-sdl2-controller-mappings-for-your-input-devices-for-use-with-pico-8-from-your-pocketchip/8757

Here's the line I've added to /home/pi/.lexaloffle/pico-8/sdl_controllers.txt:
03000000412300003680000001010000,Arduino LLC Arduino Leonardo,platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b5,start:b4,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1

Now if I only could fix the ultra-speed music :P :D

P#47297 2017-12-11 18:03 ( Edited 2018-04-04 17:09)

I've got my individual games running from Emulation Station using the -run switch in a shell script. Problem is, you still can't quit a game via the gamepad. Whilst this now works for Splore, it doesn't work within a p8 game on it's own. The only menu options you get are "Continue", "Favourite" or "Reset Cart".

To make this setup perfect, can we please PLEASE PLEASE have "Shutdown" added to this menu?

I'm using the latest "g" version of PICO-8 at the moment.

P#48116 2018-01-13 08:53 ( Edited 2018-01-13 13:53)

Cross-linking from here for posterity: Thanks to WoWin for finding an ALSA config fix for USB audio!

https://www.lexaloffle.com/bbs/?pid=50003

The issue was sound being played too fast and too high a pitch. WoWin's fix configures a virtual sound card to convert the sampling rate. Edit /etc/asound.conf:

pcm.card {
 type hw card 1
}
pcm.!default {
 type plug;
 slave {
  pcm card;
  rate 48000;
 }
}
ctl.!default {
 type hw card 1
}

You may have already edited this file for USB audio set-up via these Adafruit instructions. This expands on that.

So glad to have this fixed! I now have the perfect keyboardless Pico-8 mini-arcade machine!

P#50005 2018-03-06 02:16 ( Edited 2018-03-06 07:16)

sorry for double posting what others have already requested, but I'm too looking forward for a menu solution which allows quitting a game without typing "shutdown" via keyboard.

arashi256 wrote (quote):
"I've got my individual games running from Emulation Station using the -run switch in a shell script. Problem is, you still can't quit a game via the gamepad. Whilst this now works for Splore, it doesn't work within a p8 game on it's own. The only menu options you get are "Continue", "Favourite" or "Reset Cart".

To make this setup perfect, can we please PLEASE PLEASE have "Shutdown" added to this menu? [...]"

I'd love to play pico8 games on my handheld device (GameBoy Zero) plus firing them up via the -run switch and quitting out of pico8 via a menu option.

P#50007 2018-03-06 09:19 ( Edited 2018-03-06 14:23)

1st thing:
HOORAY for WoWin :D

Then...
Same issue here, GBZ-CM3.

I have a SuperAIO and I am planning to write a script that kills PICO-8 with a button combination but I am not able, at the moment, to read button inputs from Python.

P#50959 2018-03-29 07:25 ( Edited 2018-03-29 11:25)

Ok here's two quick Python hacks to quit PICO-8 using the gamepad.

Bad news is that it is quite ugly stuff, good news is that they work :D

Here's the 1st, tested on my Gameboy Zero with SuperAIO:

import pygame
import subprocess
from pygame.locals import *

class App:
    def __init__(self):
        pygame.display.init()
        pygame.joystick.init()

        self.my_joystick = None
        self.joystick_names = []

        # Enumerate joysticks
        for i in range(0, pygame.joystick.get_count()):
            self.joystick_names.append(pygame.joystick.Joystick(i).get_name())

        # By default, load the first available joystick.
        if (len(self.joystick_names) > 0):
            self.my_joystick = pygame.joystick.Joystick(0)
            self.my_joystick.init()

    def check_buttons(self):
        for button_number in range(0, self.my_joystick.get_numbuttons()):
            if (self.my_joystick.get_button(button_number)):
                print "You just pressed button " + button_number
                if (button_number == 8):
                    print ("Die, PICO-8!")
                    subprocess.call(['killall','pico8'])
                    print ("Yey")
                    self.quit()

    def main(self):
        while (True):
            self.g_keys = pygame.event.get()
            check_buttons()

    def quit(self):
        pygame.quit()

app = App()
app.main()

In order to use the script I launch my PICO-8 games like this:

#!/bin/bash
pushd "/home/pi/Pico-8"
sudo /usr/bin/python /home/pi/Scripts/python-superaio-custom-button/custom-button.py &
./pico8 -pixel_perfect 0 -run /home/pi/Pico-8/lua-pico-8-pong/pico-8-pong.p8
popd

I've also written another quick hack for the lightning button on the Raspiboy.

This script has short press function to kill PICO-8 and long press to shutdown Raspiboy.

In this case there is no need to tweak how the PICO-8 games are launched, you just need to be sure that the script is run at system startup (add it to /etc/rc.local):

from gpiozero import Button
import subprocess
from signal import pause

def shutdown():
    print("Halting system...")
    subprocess.check_call(['sudo', 'poweroff'])

def kill_pico8():
    print("Killing PICO-8...")
    try:
        subprocess.check_call(['killall', 'pico8'])
    except subprocess.CalledProcessError, e:
        print "PICO-8's dead baby, PICO-8's dead.\n"#, e.output

lightning_button = Button(17, hold_time=5)
lightning_button.when_held = shutdown
lightning_button.when_pressed  = kill_pico8

pause()

I will setup two repos on github with instructions and report links ASAP :)

P#51275 2018-04-03 15:30 ( Edited 2018-04-05 19:17)

@ltpitt thanks for sharing the code. if you could, please also share your instructions you were talking about earlier.

P#51592 2018-04-13 15:16 ( Edited 2018-04-13 19:16)

What if I didn't want to give Pico-8 its own menu with themes and everything? What if I just wanted to put it in the ports menu? I created the appropiate pico8.sh file in the ports directory, and it shows up on the menu, but when I try to turn it, it says "no config found for Pico8". So I tried to add a config to /opt/retropie/configs/ports/emulators.cfg but I can't seem to get it recognized. Any help?

P#52090 2018-04-27 22:32 ( Edited 2018-04-28 02:32)

good news everybody:

Zep told me that in the next update we will have a SHUTDOWN option for the in-game menu.

P#53860 2018-06-28 03:01 ( Edited 2018-06-28 07:01)
1

Have anyone ran into problems with permissions and found a answer?

P#54093 2018-07-12 01:57 ( Edited 2018-07-12 05:57)

@dddaaannn can you post a windows tutorial for setting up pico8 on retropi/emulation station?

your tutorial is for linux and you don't really say where you are copying and editing files

P#55264 2018-08-16 17:12 ( Edited 2018-08-16 21:12)

@Shadowblitz16 I don't have regular access to Windows so I won't be able to write and test a full tutorial. From the EmulationStation config documentation it looks like you can find the themes files under ~/.emulationstation/themes where "~" is your user home folder. If the Windows installer doesn't create that for you and put some themes in it, you may have to download and install a theme in that location separately, then use it as an example for the Pico-8 config instructions.

If you try it and find gotchas, please post them to this thread! I'm sure future Windows users would appreciate it.

P#55290 2018-08-16 22:29 ( Edited 2018-08-17 02:29)

Looks good. I'm looking forward to the day when PICO-8 can run either on the Gameboy Advance or the PSP 1000.

If it can run on the GBA, the PSP 1000 already has a GBA emulator with option for Load and Save State. Pretty tasty that when you think of some of those very tricky platformers. :)

P#55301 2018-08-17 00:05 ( Edited 2018-08-17 04:05)

Err, I wouldn't hold your breath. I'm not sure the PSP has the CPU bandwidth to run PICO-8. Certainly not a demanding cart, anyway.

Lua's a fun language and it's portrayed on PICO-8 as a fast one, but it's not actually very fast unless you're super careful about how you create new GC objects (or preferably don't) and how you reference tables.

I realize that, conceptually, a 333MHz processor ought to be able to run a fantasy console that supposedly only runs at 4MiHz, but it's not that simple. PICO-8 hides some Lua ugliness with single-cycle (well, fantasy cycle) table lookups that actually cost hundreds or worse on the host processor. Even simple math ops that are a single cycle in the fantasy console are dozens or worse on the host CPU.

Also, I'm pretty sure zep relies on SDL, so unless PSP homebrew has an SDL implementation, that's a stumbling block too.

Oh, and I dunno how much of this is OS bloat, but on Windows, if I just run PICO-8 without doing anything with it, it needs 41MB of memory. The entire PSP memory space is 32MB, and 8MB of that is normally reserved for the firmware to use. Not sure if homebrew kicks the firmware out of memory and does all the low-level work itself, but even so, that's an overly-tight fit.

Mind you, it's possible that it might just squeak by. I'm just saying I wouldn't be too optimistic and, if it were me, I wouldn't put a lot of effort into a niche like that without knowing it would turn out well. I mean, there isn't even an android client, and that has a far broader appeal.

P#55339 2018-08-17 16:06 ( Edited 2018-08-18 05:45)

Hey guys,

Has any one tried to set Pico-8 on the RetroStone? It's similar to gameboyzeros but the board inside is using H3 processor. So Retrorangepi distro of Retropie.

P#58270 2018-10-23 05:10 ( Edited 2018-10-23 09:10)

@GBZ-CM3 / @dddaaannn do you know if the shutdown option has been added yet? such that you can load individual games from retropie and be able to exit back?

P#60484 2019-01-01 16:28
3

Thanks for this post very helpful :-D We have our Picade with our game "Dykie Street" !

P#61111 2019-01-22 19:29 ( Edited 2019-01-22 19:30)
1

I got a menu and I can select PICO 8 but nothing loads. I tried loading it from terminal and i got a permission error.

P#65146 2019-06-10 22:51

@dddaaannn the pico8 system is not showing on emulation station.

I followed the directions and got it to show up once but pico8 didn't launch so I messed with it some more..

I have this in my es_systems.cfg

  <system>
    <name>pico8</name>
    <fullname>PICO-8</fullname>
    <path>/home/pi/RetroPie/roms/pico-8</path>
    <extension>.p8 .p8.png</extension>
    <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ pico8 %ROM%</command>
    <platform>pico8</platform>
    <theme>pico8</theme>
  </system>

I also checked and the folders paths and names are right as far as I can tell
"/home/pi/" contains a "pico-8" folder with a pico8 app and
"/home/pi/RetroPie/roms/" contains a "pico-8" folder with the p8.png files

P#65874 2019-07-16 00:08 ( Edited 2019-07-16 19:11)

Thanks for the guide. I just started to working on this. Dont really have any Linux skills so this could be a Challenger for me.
Ok lets start out slowly and ftp the RasperryPi files of the Pico-8 zip to my RasperryPi.. well that was easy. Next, just like the guide says: shell prompt, then run the pico8 command: ~/pico-8/pico8 -splore

Nope this did not work, problems so early in the process? This is probably something super simple that im missing. Im in the pico8 folder that i created I typed LS and I can see all the files there just as it should be. And when i type pico8 or pico8 -splore I just get this message:

-bash: pico8: command not found.
Why cant i launch Pico-8?

P#67007 2019-08-29 10:25

from what I can tell, .p8.png in <extension> doesn't work because it's comparing it to the last extension (.png) -- so you have to use just .png

Anybody have any ideas how to get .p8.png to work?

P#69553 2019-11-01 14:03
1

I can't download "pico-8_0.1.8_arm.zip" anymore...

I can download pico-8_0.2.0c_raspi.zip???!!

This does not work as a libwiringPi dependancy is not met...

If it is installed a glib.2.27 dewpendancy can't be met!!

How do I get the old file listed here?

P#74924 2020-04-18 09:16

Can you show the exact error message?
(copy text if possible, if not screenshot or photo)

P#75702 2020-05-01 17:32
1

iabhua, try running pico8_dyn instead -- that worked for me on (what I think is) the latest version of RetroPie.

P#76967 2020-05-21 03:49
1

In case anyone else missed it, you can exit from Splore using a gamepad by hitting the "start" button, and then going to Options -> Shutdown PICO-8. Note: I'm using PICO-8 v0.2.0c.

P#77078 2020-05-23 15:35

How can I set the pixel-perfect resolution on RetroPie with GPi Case?
Dot by dot (I know it's very small), or 2x scaling (256px x 240px: lose vertical 16px).

P#78107 2020-06-15 06:46

I could set 2x integer scaling on the GPi Case.

/boot/config.txt

framebuffer_height=256
hdmi_timings=256 1 38 10 20 320 1 20 4 4 0 0 0 60 0 6400000 1
P#78480 2020-06-25 02:57 ( Edited 2020-06-25 02:57)

OH THANKS, FINALLY THIS IS WORKING

I put the downloaded carts in the folder the program looks for them, and I'm more than fine with them not working from the menu in Emulation Station. It'd be cute, but I'm trying to cut down on space usage (meaning I'd rather have another game than a single one listed with some metadata and a marquee)

While these barely take up any space, I'm not done with configuring retropie at all.

Hint for anyone who can't get it to run: Double check your written code. Even your copy/paste code. This only works for me with a .sh file to launch pico-8 in splore mode, .sh file in the emulation station cfg file, and the carts inside /home/pi/.lexaloffle/pico-8/carts - It works and all, but needs a keyboard to exit, and I dind't want to dare touch more code for now. Maybe in the future.

P#80421 2020-08-06 11:12 ( Edited 2020-08-06 12:38)

I was able to run Pico-8 on my Gpi case but I hadn't in a long time. Updated Pico-8 by downloading and overwriting the files in its directory. Now I get "Couldn't load home/pi/pico-8/pico8.dat" Has anybody successfully updated pico-8 on gpi?

EDIT:

Never mind, my dat file was somehow 0 bytes. Something must have happened while transferring and now it works great!

P#80640 2020-08-11 18:57 ( Edited 2020-08-11 19:21)

@Yanazake

If your booting into SPLORE then there is an option to shutdown PICO8, meaning you won’t need that keyboard

P#80660 2020-08-12 07:55
3

Hi, I'm new around here.

First off, I would like to show my appreciation for the guide. It is really helpful, thanks to you, I am able to run Pico-8 on my GPi!

Noticing you mention that there are two ways to launch Pico-8 from EmulationStation (ES). However, by improving the configuration a little bit I am able to launch Pico-8 in both SPLORE and as a standalone game file.

Hopefully, this is useful to someone. Here's what I did:

  1. Append this to es_systems.cfg
  <system>
    <name>pico8</name>
    <fullname>PICO-8</fullname>
    <path>/home/pi/RetroPie/roms/pico8</path>
    <extension>.p8 .sh</extension>    <!-- I don't want games to show up as <GAME_TITLE>.p8 in ES so I decided to use *.p8 file format only, adding *.png format if you wish -->
    <command>/home/pi/pico-8/customRunCommand.sh %ROM%</command>
    <platform>pico8</platform>
    <theme>pico8</theme>
  </system>
  1. Create a new file /home/pi/pico-8/customRunCommand.sh with the below context. This will determine file format and execute runcommand.sh accordingly.
#!/bin/bash
cmd=""
if [[ "$1" == *.sh ]]
then
    #is a script file, execute script
    #this can be used to execute any script flexibly
    cmd="$1"
elif [[ "$1" == *.p8 ]]
then
    #is a game image
    cmd="/home/pi/pico-8/pico8 '$1' -run"
else
    #unsupported file
    exit
fi
/opt/retropie/supplementary/runcommand/runcommand.sh 0 "$cmd"
  1. Create a new file /home/pi/RetroPie/roms/pico8/-SPLORE.sh with the below context. This will launch Pico-8 in -splore.
#!/bin/bash
pushd "/home/pi/pico-8"
./pico8 -splore
popd
  1. Make both -SPLORE.sh and customRunCommand.sh executable
chmod a+x /home/pi/pico-8/customRunCommand.sh
chmod a+x /home/pi/RetroPie/roms/pico8/-SPLORE.sh
  1. Put all *.p8 game files to /home/pi/RetroPie/roms/pico8 as defined in es_systems.cfg

  2. Restart ES and enjoy the result

Some pictures



P#81853 2020-09-15 13:17 ( Edited 2020-09-15 14:57)

@Mika:

Sorry, I can't seem to get your custom switcher script to work, even if I copied it correctly. I can get a SPLORE.sh shell to launch via:

<command>/opt/retropie/supplementary/runcommand.sh 0 %ROM%</command>

I can also get individual games running via

<command>/opt/retropie/supplementary/runcommand.sh 0 "/home/pi/pico-8/pico-8 -run %ROM%"</command>

It's just the switching script that really doesn't work, and every time I select any option in emulationstation (either -SPLORE or a game) I just get kicked out back out. I have zero knowledge of bash to audit it. I also copied the file exactly so I'm pretty sure I have no typos, and my paths all seems to be correct.

What could I be doing wrong? Here's what I have:



Sorry for the picture-of-screenshot. You see me in the first picture unsuccessfully trying to take a screenshot, which will give you an idea of how unfamiliar I am with anything Linux.

  • customRunCommand.sh in ~/pico-8, +SPLORE.sh in roms. Permissions are correct I think.
  • Tried various ways to run the game. All the commented lines work if I try them one by one:
  • first line runs splore if I choose +SPLORE.sh in the menu
  • second line works for running roms if I choose a cartrdige
  • third line works for running splore no matter what I choose

chooser file, doesnt work

P#83205 2020-10-22 04:05 ( Edited 2020-10-22 04:46)

Who is the owner of +SPLORE.sh and customRunCommand.sh?

You could check it by running "ls -lthr"

P#83206 2020-10-22 05:45

they're both owned by 'pi'. Can't take screenshot, but -

-rwxr-xr-x 1 pi pi 487 Oct 22 06:06 customRunCommand.sh

-rwxr-xr-x 1 pi pi 57 Oct 22 00:19 +SPLORE.sh

P#83207 2020-10-22 06:19

In case it's useful for anybody, this is how to setup the controller for Pico8 with the Piboy DMG. Write this in home/pi/.lexaloffle/pico-8/sdl_controllers.txt
15000000010000000100000000010000,PiBoy DMG Controller,platform:Linux,x:b3,a:b0,b:b1,y:b4,back:b8,start:b9,dpleft:b13,dpdown:b11,dpright:b14,dpup:b12

P#83352 2020-10-25 21:23

@efofecks Sorry for the delayed response, I am quite busy with stuff recently. Your setup seems correct. If it's still not working try printing $1 and $cmd values and see whether the values are correct or not. You can ssh into the device and run script to lauch the game (it's the same as selecting game title from ES)

i.e: ./path/to/file/customRunCommand.sh /home/pi/path/to/game.p8

P#83366 2020-10-26 14:55 ( Edited 2020-10-26 15:09)

I just got this and will be following this guide to put my RP4 desktop computer into it!

P#83625 2020-11-02 19:09

Hello, I can only download pico-8_0.2.1b_raspi.zip from the official website, which is not the author mentioned as pico-8_0.1.8_arm.zip. I get stuck at the step ~/pico-8/pico8 -splore. I think my retropie cannot read the file.

Besides, I don't quite follow the step on Create or edit the file "/etc/asound.conf". I cannot find a folder called etc after I installed the retropie.

If there is any video on software part setup, can anyone share it to me?
I hope someone can shed some lights on me.

P#84562 2020-11-21 09:25

On my picade I have to use pico8_dyn in all the run commands, not just pico8. Mika's solution works great for me with that change.

P#85062 2020-12-04 19:43
1

Thank you so much @dddaaannn and @Mika! Just got the pico-8 set up on my retropie for both Splore and direct cart mode!!!

P#89041 2021-03-16 04:33
Page:

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 22:41:10 | 0.103s | Q:92