Skip to content

Commit

Permalink
Update V3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
HalloSpaceBoy5 authored Jun 11, 2024
1 parent b237f9f commit 8df4406
Show file tree
Hide file tree
Showing 13 changed files with 1,611 additions and 471 deletions.
Binary file added Checkmark.sprt
Binary file not shown.
Binary file added Data Upload Mode.pbimg
Binary file not shown.
86 changes: 86 additions & 0 deletions Functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
from framebuf import FrameBuffer,RGB565
from time import sleep
class Functions:
def __init__(self, pgb, ttcolor, ottcolor, ic):
self.pgb=pgb
self.ttcolor=ttcolor
self.ic=ic
self.ottcolor=ottcolor


def readchunk(self, filename, x2, y2, w, h, q=True):
if x2>240:
sleep(0.015)
return
buffersize=w*2
p=240-w-x2
if p<0:
e=abs(240-x2)
buffersize=e*2
if p<0:
p=abs(p)
else:
p=0
o=0
x=bytearray(p*2)

size=0
with open(filename, "rb") as image_file:
for y in range(h):
existing_line_start = ((y + y2) * 240 + x2) * 2
image_file.readinto(self.pgb.buffer[existing_line_start:existing_line_start + buffersize])
image_file.readinto(x[0:p*2])
size += image_file.tell()
o+=p
if not size==1742400 and q:
self.pgb.fill_rect(x2,y2,w,h,self.ttcolor)
unit=int((len(self.ic)/2)*12)
for i,j in enumerate(self.ic):
j=j.replace("\r","")
self.pgb.create_text(j,x2+(60-(len(j)*4)),y2+(60-unit)+(i*12),self.ottcolor)
sleep(0.01)
return


def readchunk_mask(self, filename,x2,y2,w,h,cmask=57351):
with open(filename,"rb") as r:
for x in range(h):
tempfb=FrameBuffer(bytearray(r.read(2*w)),w,1,RGB565)
self.pgb.blit(tempfb,x2,y2+x,cmask)
del tempfb

def draw_image(self, imagedata,ts=-1):
ps=int(240/len(imagedata))
y=-1
for i in imagedata:
y+=1
x=-1
if not ts==-1:
if ts==0:
skip=True
elif y in range(0,ts):
skip=True
else:
skip=False
else:
skip=False
if not skip:
for f in i:
x+=1
self.pgb.fill_rect(x*ps,y*ps,ps,ps,f)
sleep(0.1)

def getimagedata(self, bgimagefile):
imagedata=[]
with open(bgimagefile) as f:
for i in range(30):
comp=[]
for x in f.readline().split(":"):
comp.append(int(x))
imagedata.append(comp)
del comp
del f
return imagedata



5 changes: 5 additions & 0 deletions Intro Text.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Welcome!, This is the PicoBoy: a video/game console that makes/making games as easy as pi!, We are now going to/configure your PicoBoy/to your liking., Before we do anything,/let's test your PicoBoy's/hardware!, Press A to begin!, Test your buttons!, Press all of the/buttons to continue, Button Test Passed!, Test your sound!, (Flip the switch on the/top to the left), When you hear a sound/press the A button., Press A to begin testing., Testing channel , When you hear a sound,/press the A button., Channel , failed!, passed!, Sound test passed., Sound test failed., Check the soldering/on your sound diodes., Tests Passed!, Your PicoBoy has passed/all of its hardware tests., Now lets start configuring/your PicoBoy!, Press A to continue!, Choose a background color/using the left and right/buttons., Press A to continue., Use the left and right/buttons to change the/brightness., Press A to continue., Use the left and right/buttons to change the/volume., Press A to continue., All Done!, You are all done/setting up your PicoBoy!, Press home to continue!
Bienvenido!, Este es el PicoBoy: una/videoconsola juegos que hace/que los juegos sean tan/faciles como pi!, Ahora vamos a/configurar tu PicoBoy/a tu gusto., Antes de hacer nada,/probemos tu PicoBoy/ hardware!, Presione A para comenzar!, Pruebe sus botones!, Presione todos los botones/ para continuar, Prueba de botones/aprobada!, Pruebe su sonido!, (Gire el interruptor en la/parte superior hacia/la izquierda), Cuando escuche un sonido/presione el boton A., Presione A para comenzar/la prueba., Probando canal , Cuando escuche un sonido,/presione el boton A., Canal , fallo!, paso!, Prueba de sonido paso., Prueba de sonido fallo., Verificar la soldadura/en sus diodos de sonido., Pruebas aprobadas!, Su PicoBoy ha pasado/todas sus pruebas de/hardware., Ahora comencemos a/configurar su PicoBoy!, Presione A para continuar!, Elija un color de fondo/usando la izquierda y/la derecha Botones., Presione A para continuar., Use los botones/izquierdo y derecho/para cambiar el brillo., Presione A para continuar., Use los botones/izquierdo y derecho/para cambiar el/volumen., Presione A para continuar., Todo Listo!, Ya terminaste/configuraste tu PicoBoy!, Presiona Inicio para/continuar!
Bienvenue!, Voici le PicoBoy: une console/de jeu video qui rend les/jeux aussi simples que pi!, Nous allons maintenant/configurer votre PicoBoy/a votre gout., Avant de faire/quoi que ce soit,/testons votre PicoBoy/ materiel!, Appuyez sur A pour commencer!, Testez vos boutons!, Appuyez sur tous les boutons/pour continuer, Test des boutons/reussi!, Testez votre son!, (Basculez l'interrupteur/en haut vers la gauche), Lorsque vous entendez un son/appuyez sur le bouton A., Appuyez sur A pour/commencer le test., Test du canal , Lorsque vous entendez un son,/appuyez sur le bouton A., Canal , echec!, reussi!, Test sonore reussi., Test sonore echoue., Verifiez la soudure/sur vos diodes sonores., Tests reussis!, Votre PicoBoy a reussi/tous ses tests materiels., Commencons maintenant a/configurer votre PicoBoy!, Appuyez sur A pour/continuer!, Choisissez une couleur de/fond en utilisant les touches/gauche et droite boutons., Appuyez sur A pour/continuer., Utilisez les boutons gauche/et droit pour modifier/la luminosite., Appuyez sur A pour/continuer., Utilisez les boutons gauche/et droit pour modifier/le volume., Appuyez sur A pour/continuer., Tous Termine!, Vous avez termine/configure votre PicoBoy!, Appuyez sur Accueil/pour continuer!
Willkommen!, Das ist der PicoBoy: eine/Spielekonsole die Spiele/ soeinfach macht wie Pi!, Wir werden jetzt Ihren/PicoBoy nach Ihren/Wunschen konfigurieren., Bevor wir etwas unternehmen,/lassen Sie uns Ihren PicoBoy/testen Hardware!, Drucken Sie A um zu/beginnen!, Testen Sie Ihre Tasten!, Drucken Sie alle Tasten/um fortzufahren, Tastentest bestanden!, Testen Sie Ihren Sound!, (Drehen Sie den Schalter/oben nach links), Wenn Sie a horen Ton/Drucken Sie die A-Taste., Drucken Sie A um mit/dem Test zu beginnen., Testen des Kanals , Wenn Sie einen Ton horen,/drucken Sie die A-Taste., Kanal , fehlgeschlagen!, Bestanden!, Tontest bestanden., Tontest fehlgeschlagen., Uberprufen das Loten/an Ihren Sounddioden., Tests bestanden!, Ihr PicoBoy hat alle seine/Hardwaretests bestanden., Jetzt beginnen wir mit der/Konfiguration Ihrem PicoBoy!, Drucken Sie A um/fortzufahren!, Wahlen Sie eine/Hintergrundfarbe mit/der linken und rechten Taste/Tasten., Drucken Sie A um/fortzufahren., Verwenden Sie die Links-/und Rechts-Tasten/um die Helligkeit zu andern., Drucken Sie A um/fortzufahren., Verwenden Sie die Links-/und Rechts-Tasten/um die Lautstarke zu andern., Drucken Sie A um/fortzufahren., Alle Fertig!, Sie sind mit der Einrichtung/Ihres PicoBoy fertig!, Drucken Sie die Home-Taste/um fortzufahren!
Benvenuto!, Questo e PicoBoy: una console/per videogiochi giochi che/rende i giochi facili/come pi!, Ora configureremo il tuo/PicoBoy a tuo piacimento., Prima di fare qualsiasi cosa/testiamo il tuo PicoBoy/hardware!, Premi A per iniziare!, Prova i pulsanti!, Premi tutti i pulsanti/per continuare, Test dei pulsanti/superato!, Metti alla prova il tuo/suono!, (Sposta l'interruttore in/alto a sinistra), Quando senti un suono/premi il pulsante A., Premi A per iniziare/il test., Test del canale , Quando senti un suono,/premi il pulsante A., Canale , fallito!, superato!, Test del suono superato., Test del suono fallito., Controlla la saldatura/sui diodi sonori., Test superati!, Il tuo PicoBoy ha superato/tutti i test hardware., Ora iniziamo a configurare/il tuo PicoBoy!, Premi A per continuare!, Scegli un colore di/sfondo usando i tasti/sinistro e destro., Premere A per continuare., Utilizzare i pulsanti/sinistra e destra per/modificare la luminosita., Premere A per continuare., Utilizzare i pulsanti/sinistra e destra per/modificare il volume., Premere A per continuare., Tutto Fatto!, Hai finito configurato/il tuo PicoBoy!, Premi Home per continuare!
5 changes: 5 additions & 0 deletions Main Text.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
No Games, Settings, No Image, DATA UPLOAD MODE/Plug your PicoBoy/into your computer/and run the PicoBoy/Communication Software./To exit data/upload mode reset/your PicoBoy., Game failed to start!/This game may be corrupted./Press any button to exit., Image/Corrupted
No Juegos, Ajustes, Sin imagen, MODO DE CARGA DATOS/Conecta tu PicoBoy/a tu computadora/y ejecuta PicoBoy/Communication Software./Para salir de modo/de carga de datos/reinicia tu PicoBoy., El juego no pudo comenzar!/Este juego puede estar/danado. Presione cualquier/boton para salir., Imagen/corrupta
Pas De Jeux, Parametres, Pas d'image, MODE AJOUTER DONNEES/Branchez votre PicoBoy/dans votre ordinateur/et lancez le PicoBoy/Communication Software./Pour quitter les donnees/ajouter la remettre du/mode donnees ton PicoBoy., Le jeu n'a pas pu demarrer!/Ce jeu est peut-etre/Appuyez sur n'importe quel/corrompu. bouton pour/quitter., Image/corrompue
Keine Spiele, Einstellungen, Kein Bild, DATENHOCHLADEN-MODUS/Verbinden dein PicoBoy/zu deinem Computer/und verwenden PicoBoy/Communication Software./Daten verlassen Upload/Modus zuruckgesetzt/Dein PicoBoy., Das Spiel konnte nicht/gestartet werden!/Dieses Spiel ist/moglicherweise beschadigt./Drucken Sie eine beliebige/Taste, um den Vorgang/zu beenden., Bild/beschadigt
Niente Giochi, Impostazioni, Nessuna/immagine, MODALITA AGGIUNTA DATI/Collega il tuo PicoBoy/nel tuo computer ed/eseguire il PicoBoy/Communication Software./Per uscire dai modalita/aggiunta dati ripristina/il tuo PicoBoy., Impossibile avviare/il gioco!/Questo gioco potrebbe/essere corrotto. Premere/qualsiasi pulsante per/uscire., Immagine/danneggiata
1 change: 1 addition & 0 deletions No Games.pbimg

Large diffs are not rendered by default.

65 changes: 54 additions & 11 deletions PicoBoySDK.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,27 @@ def init_display(self):

def decrease_brightness(self):
if self.DUTY_CYCLE > self.DUTY_CYCLE_MIN:
self.DUTY_CYCLE -= 2750
self.DUTY_CYCLE -= int((self.DUTY_CYCLE_MAX-self.DUTY_CYCLE_MIN)/20)
if self.DUTY_CYCLE<self.DUTY_CYCLE_MIN:
self.DUTY_CYCLE=self.DUTY_CYCLE_MIN
self.bl.duty_u16(self.DUTY_CYCLE)
with open("/brghtness.conf", "w") as w:
w.write(str(self.DUTY_CYCLE))
try:
with open("/brghtness.conf", "w") as w:
w.write(str(self.DUTY_CYCLE))
except:
""

def increase_brightness(self):
if self.DUTY_CYCLE < self.DUTY_CYCLE_MAX:
self.DUTY_CYCLE += 2750
self.DUTY_CYCLE += int((self.DUTY_CYCLE_MAX-self.DUTY_CYCLE_MIN)/20)
if self.DUTY_CYCLE>self.DUTY_CYCLE_MAX:
self.DUTY_CYCLE=self.DUTY_CYCLE_MAX
self.bl.duty_u16(self.DUTY_CYCLE)
with open("/brghtness.conf", "w") as w:
w.write(str(self.DUTY_CYCLE))
try:
with open("/brghtness.conf", "w") as w:
w.write(str(self.DUTY_CYCLE))
except:
""

def power_off(self):
pass
Expand Down Expand Up @@ -204,6 +214,13 @@ def __init__(self,namespace=None,tick_time=0.025):
else:
print(error)
sys.exit()
try:
with open("/langauge.conf") as r:
self.langauge=int(r.read())
if self.langauge>4:
raise
except:
self.langauge=0
self.maskcolor=self.color(31,17,9)
self.namespace=namespace
self.tick=tick_time
Expand Down Expand Up @@ -363,11 +380,37 @@ def Update(self, savescore=None, noclear=False):
vsys_voltage = adc_voltage * 3
if vsys_voltage<1.9:
self.fill(self.color(0,0,0))
self.Create_Text("BATTERY CRITICALLY LOW!",-1,30,(255,255,255))
self.Create_Text("Please replace the", -1, 130, (255,255,255))
self.Create_Text("batteries in your PicoBoy.", -1, 145, (255,255,255))
self.Create_Text("Please switch your", -1, 200, (255,255,255))
self.Create_Text("PicoBoy off.", -1, 215, (255,255,255))
print(self.langauge)
if self.langauge==0:
self.Create_Text("BATTERY CRITICALLY LOW!",-1,30,(255,255,255))
self.Create_Text("Please replace the", -1, 130, (255,255,255))
self.Create_Text("batteries in your PicoBoy.", -1, 145, (255,255,255))
self.Create_Text("Please switch your", -1, 200, (255,255,255))
self.Create_Text("PicoBoy off.", -1, 215, (255,255,255))
if self.langauge==1:
self.Create_Text("BATERIA CRITICAMENTE BAJA!",-1,30,(255,255,255))
self.Create_Text("Por favor reemplace el", -1, 130, (255,255,255))
self.Create_Text("baterias en su PicoBoy.", -1, 145, (255,255,255))
self.Create_Text("Por favor cambia tu", -1, 200, (255,255,255))
self.Create_Text("PicoBoy fuera.", -1, 215, (255,255,255))
if self.langauge==2:
self.Create_Text("BATTERIE CRITIQUEMENT FAIBLE!",-1,30,(255,255,255))
self.Create_Text("Veuillez remplacer le", -1, 130, (255,255,255))
self.Create_Text("piles dans votre PicoBoy.", -1, 145, (255,255,255))
self.Create_Text("Veuillez changer votre", -1, 200, (255,255,255))
self.Create_Text("PicoBoy s'en va.", -1, 215, (255,255,255))
if self.langauge==3:
self.Create_Text("BATTERIE KRITISCH NIEDRIG!",-1,30,(255,255,255))
self.Create_Text("Bitte ersetzen Sie die", -1, 130, (255,255,255))
self.Create_Text("Batterien in Ihrem PicoBoy.", -1, 145, (255,255,255))
self.Create_Text("Bitte wechseln Sie Ihr", -1, 200, (255,255,255))
self.Create_Text("PicoBoy aus.", -1, 215, (255,255,255))
if self.langauge==4:
self.Create_Text("BATTERIA CRITICAMENTE SCARICA!",-1,30,(255,255,255))
self.Create_Text("Si prega di sostituire il", -1, 130, (255,255,255))
self.Create_Text("batterie del tuo PicoBoy.", -1, 145, (255,255,255))
self.Create_Text("Per favore, cambia il tuo", -1, 200, (255,255,255))
self.Create_Text("PicoBoy spento.", -1, 215, (255,255,255))
self.rect(75,60,80,40,self.color(255,0,0))
self.fill_rect(155,70,10,20,self.color(255,0,0))
self.line(75,60,155,99,self.color(255,0,0))
Expand Down
42 changes: 37 additions & 5 deletions PicoGameBoy.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,44 @@ def show(self):
if vsys_voltage>10:
vsys_voltage = adc_voltage * 3
if vsys_voltage<1.9:
try:
with open("langauge.conf") as r:
self.langauge=int(r.read())
if self.langauge>4:
raise
except:
self.langauge=0
self.fill(PicoGameBoy.color(0,0,0))
self.create_text("BATTERY CRITICALLY LOW!",-1,30,PicoGameBoy.color(255,255,255))
self.create_text("Please replace the", -1, 130, PicoGameBoy.color(255,255,255))
self.create_text("batteries in your PicoBoy.", -1, 145, PicoGameBoy.color(255,255,255))
self.create_text("Please switch your", -1, 200, PicoGameBoy.color(255,255,255))
self.create_text("PicoBoy off.", -1, 215, PicoGameBoy.color(255,255,255))
if self.langauge==0:
self.create_text("BATTERY CRITICALLY LOW!",-1,30,PicoGameBoy.color(255,255,255))
self.create_text("Please replace the", -1, 130, PicoGameBoy.color(255,255,255))
self.create_text("batteries in your PicoBoy.", -1, 145, PicoGameBoy.color(255,255,255))
self.create_text("Please switch your", -1, 200, PicoGameBoy.color(255,255,255))
self.create_text("PicoBoy off.", -1, 215, PicoGameBoy.color(255,255,255))
if self.langauge==1:
self.create_text("BATERIA CRITICAMENTE BAJA!",-1,30,PicoGameBoy.color(255,255,255))
self.create_text("Por favor reemplace el", -1, 130, PicoGameBoy.color(255,255,255))
self.create_text("baterias en su PicoBoy.", -1, 145, PicoGameBoy.color(255,255,255))
self.create_text("Por favor cambia tu", -1, 200, PicoGameBoy.color(255,255,255))
self.create_text("PicoBoy fuera.", -1, 215, PicoGameBoy.color(255,255,255))
if self.langauge==2:
self.create_text("BATTERIE CRITIQUEMENT FAIBLE!",-1,30,PicoGameBoy.color(255,255,255))
self.create_text("Veuillez remplacer le", -1, 130, PicoGameBoy.color(255,255,255))
self.create_text("piles dans votre PicoBoy.", -1, 145, PicoGameBoy.color(255,255,255))
self.create_text("Veuillez changer votre", -1, 200, PicoGameBoy.color(255,255,255))
self.create_text("PicoBoy s'en va.", -1, 215, PicoGameBoy.color(255,255,255))
if self.langauge==3:
self.create_text("BATTERIE KRITISCH NIEDRIG!",-1,30,PicoGameBoy.color(255,255,255))
self.create_text("Bitte ersetzen Sie die", -1, 130, PicoGameBoy.color(255,255,255))
self.create_text("Batterien in Ihrem PicoBoy.", -1, 145, PicoGameBoy.color(255,255,255))
self.create_text("Bitte wechseln Sie Ihr", -1, 200, PicoGameBoy.color(255,255,255))
self.create_text("PicoBoy aus.", -1, 215, PicoGameBoy.color(255,255,255))
if self.langauge==4:
self.create_text("BATTERIA CRITICAMENTE SCARICA!",-1,30,PicoGameBoy.color(255,255,255))
self.create_text("Si prega di sostituire il", -1, 130, PicoGameBoy.color(255,255,255))
self.create_text("batterie del tuo PicoBoy.", -1, 145, PicoGameBoy.color(255,255,255))
self.create_text("Per favore, cambia il tuo", -1, 200, PicoGameBoy.color(255,255,255))
self.create_text("PicoBoy spento.", -1, 215, PicoGameBoy.color(255,255,255))
self.rect(75,60,80,40,PicoGameBoy.color(255,0,0))
self.fill_rect(155,70,10,20,PicoGameBoy.color(255,0,0))
self.line(75,60,155,99,PicoGameBoy.color(255,0,0))
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PBOS V2.6
PBOS V3.0
Loading

0 comments on commit 8df4406

Please sign in to comment.