Cov txheej txheem:

GameBoy Pi: 7 Kauj Ruam
GameBoy Pi: 7 Kauj Ruam

Video: GameBoy Pi: 7 Kauj Ruam

Video: GameBoy Pi: 7 Kauj Ruam
Video: Lukas Graham - 7 Years [Official Music Video] 2024, Hlis ntuj nqeg
Anonim
GameBoy Pib
GameBoy Pib

Xyoo 2019 Game Boy ua kev zoo siab 30 xyoo, qhov no tau txhawb kuv kom ua ib qhov haujlwm uas kuv twb tau xav txog lawm. Lub tswv yim yooj yim yog siv rooj plaub 3D luam tawm uas zoo li Game Boy Classic thiab muab Pi Zero sab hauv khiav Retropie.

Kauj Ruam 1: Qhov:

Qhov
Qhov
  • Pi Zero W.
  • 3.5 "Zaub
  • Booster MT3608 los muab 5V
  • TP4056 kom rov roj teeb
  • Ob lossis peb Lithium cells ntawm 1000mA
  • 4GB Micro SD daim npav
  • Resistors thiab Capacitor rau suab
  • PCB Universal
  • 2.8mm txoj kab uas hla hais lus
  • PAM8403 amplifier

Kauj ruam 2: FAQ

FAQ
FAQ

Kuv tau ua FAQ rau kuv tus kheej txog qee cov lus nug ntawm qhov project:

Cov ntaub ntawv twg luam tawm? Kuv tsis ntseeg ntawm lub npe nrov PiGRRL los ntawm Adafruit thiab lwm qhov uas ze rau qhov qub. Kuv xaiv qhov qub vim tias ABXY loj dua thiab nyob deb dua. Adafruit: https://www.thingiverse.com/thing1277483 Thawj:

Cov zaub twg siv? Kuv xaiv 3.5 vim tias nws yooj yim dua rau ntsaws thiab Nws haum zoo nyob rau hauv rooj plaub.

Puas yog Pi Zero puas muaj cov vis dis aus tso tawm? Yog lawm, tab sis tsis muaj tus pin.

Puas yog Pi Zero puas muaj qhov tso tawm suab sib xws? Tsis yog. Puas tsim nyog tsim tawm raws li qhia los ntawm Adafruit:

Kuv siv lub tswv yim hloov pauv qhov twg hauv GPIO qhov twg nws sim ua cov keyboard. Ib zaug ntxiv kuv siv Adafruit daws tab sis pawg thawj coj tau tsim rau kuv:

Qhov loj me ntawm daim npav micro SD siv? Kuv siv 4GB uas txaus rau kuv. Kuv tsis xav kom muaj 5000 kev ua si tsuas yog ua rau kaum ob. Nco ntsoov tias Pi Zero tsuas tuaj yeem ua 8 lossis 16bits kev ua si zoo thiab cov roms no muaj qhov me me. Retropie siv txog 2.2GB ntawm qhov chaw.

Yuav ua li cas kom lub zog 12V cov zaub yog Raspberry Pi ua haujlwm nrog 5V? Kuv pom 5V taw tes sab hauv ntawm pawg thawj coj saib. Cov zaub muaj ib tus tswj hwm 5V thiab lwm qhov ntawm 3.3V txuas ib leeg. Kuv txuas 5v rau cov tswv yim ntawm 3.3v tus tswj hwm.

Lub roj teeb twg siv? Kuv siv ob lub roj teeb lithium ntawm 1000mA. Nrog cov cell no cov cuab yeej ua haujlwm li ntawm 1:40 teev. Kuv xav tias qhov kev daws teeb meem zoo tshaj plaws yog siv peb lub cell ntawm 1000mA.

Kuv yuav siv lub rooj tsav xwm them nqi TP4056 li cas

Kauj Ruam 3: Luam Ntawv

Cov Ntaub Ntawv Luam Ntawv
Cov Ntaub Ntawv Luam Ntawv
Cov Ntaub Ntawv Luam Ntawv
Cov Ntaub Ntawv Luam Ntawv
Cov Ntaub Ntawv Luam Ntawv
Cov Ntaub Ntawv Luam Ntawv

Raws li kuv tau hais hauv FAQ Kuv xaiv luam tawm rooj plaub no: https://www.thingiverse.com/thing: 2676949

Cov zaub 3.5 haum zoo tshaj plaws hauv rooj plaub, Kuv tau luam tawm ib qho khoom txhawb nqa (daim txiv kab ntxwv) qhov twg cov tswj hwm lub rooj tsavxwm haum thiab lub nraub qaum tau ntsia rau saum.

Kauj Ruam 4: Txhim Kho Retropie

Txhim kho Retropie
Txhim kho Retropie

Retropie yog software uas yuav ua haujlwm, nws twb muaj cov emulators tau teeb tsa thiab siv tau yooj yim heev, hauv internet koj tuaj yeem pom ntau qhov "yuav ua li cas" nruab nws. Tsuas yog nthuav dav yog, tom qab teeb tsa thawj zaug uas koj yuav thov teeb tsa tus tswj hwm, teeb tsa cov keyboard ua tus tswj hwm thiab nco cov yuam sij hauv ntawv lossis lwm yam. Cov ntaub ntawv no yog qhov tsim nyog rau teeb tsa tus tswj hwm GPIO piav qhia sai sai.

Txhawm rau rub tawm Retropie mus rau:

Kauj Ruam 5: Tus Tswj GPIO

Image
Image
GPIO Tus Tswj
GPIO Tus Tswj
GPIO Tus Tswj
GPIO Tus Tswj

Txog tus tswj hwm kuv xaiv siv Adafruit daws: https://learn.adafruit.com/pigrrl-2/software#insta …

Kuv tau ua lub rooj tsavxwm nrog PCB thoob ntiaj teb cov khoom siv sib cuam tshuam hloov pauv thiab txuas lawv mus rau GPIO.

Txhawm rau nruab Adafruit tus tsav tsheb siv cov lus txib:

ua cd

curl https://raw.githubusercontent.com/adafruit/Raspbe…>> retrogame.sh

sudo chmod +x retrogame.sh

sudo bash retrogame.sh Thawj lo lus txib rub tawm tsab ntawv, qhov thib ob muab kev tso cai ua tiav thiab thib peb khiav tsab ntawv. Tom qab khiav xaiv "1. PiGRRL 2 tswj" thiab rov pib dua. Nws yuav tsim cov ntawv "/boot/retrogame.cfg", kho cov ntawv no raws li koj cov keyboard teeb tsa. Koj puas nco qab daim ntawv ntawm "Txhim kho Retropie"?

Tus qauv ntawm cov ntawv yog:

LEFT 4 # Joypad sab laug

RIGHT 19 # Joypad txoj cai

UP 16 # Joypad nce

DOWN 26 # Joypad nqis

LEFTCTRL 14 # 'A' khawm

LEFTALT 15 # 'B' khawm

Z 20 # 'X' khawm

X 18 # 'Y' khawm

SPACE 5 # 'Xaiv' khawm

Nias 6 # 'Pib' khawm

A 12 # Sab xub pwg khawm

S 13 # Txoj cai xub pwg khawm

Qhov twg thawj kab ntawv yog cov keyboard, qhov thib ob yog GPIO pins thiab qhov thib peb yog cov lus tawm tswv yim. Piv txwv li, hauv cov ntaub ntawv saum toj no GPIO 20 ua rau tus lej Z ntawm cov keyboard thiab X khawm raws li SNES tus qauv tswj.

Kauj Ruam 6: GPIO Suab Tawm

Image
Image
GPIO Suab Tawm
GPIO Suab Tawm

Pi Zero tsis muaj suab tawm, tab sis Adafruit muaj peev xwm tso suab tawm nrog qee qhov tiv thaiv thiab lub peev xwm txuas ntawm ob lub pins ntawm GPIO thiab muab kab ntawm cov lej hauv /boot/config.cfg cov ntaub ntawv. Rau pawg thawj coj kuv siv PCB thoob ntiaj teb thiab tsuas yog cov tiv thaiv thiab cov khoom siv hluav taws xob, cov diodes yog tiv thaiv GPIO rau qee qhov hluav taws xob siab thiab kuv tsis siv.

Tus GPIO tus pin siv yog: GPIO #13 (tus pin #33) como PWM1GPIO #18 (tus pin #12) como PWM0 Koj tsis tuaj yeem siv cov pins no rau tus tswj keyboad.

Ntxiv kab hauv qab no hauv /boot/config.cfg thiab txuas lub xov tooj cua koj twb muaj lub suab.

dtoverlay = pwm-2chan, pin = 18, func = 2, pin2 = 13, func2 = 4 Lub suab tawm tsis tau nthuav dav thiab koj tuaj yeem siv PAM8403 lub tshuab ua haujlwm los ua qhov no.

Kauj Ruam 7: Ua tiav Kev Tsim thiab Xeem

Ua tiav Kev Tsim thiab Xeem
Ua tiav Kev Tsim thiab Xeem
Ua tiav Kev Tsim thiab Xeem
Ua tiav Kev Tsim thiab Xeem
Ua tiav Kev Tsim thiab Xeem
Ua tiav Kev Tsim thiab Xeem
Ua tiav Kev Tsim thiab Xeem
Ua tiav Kev Tsim thiab Xeem

Kev ua kom tiav tsis yooj yim vim tias ntau qhov thiab xaim tsis yooj yim kom haum rau hauv rooj plaub. Nrog kev ua siab ntev thiab saib xyuas txhua yam ua haujlwm tau zoo. Ua raws qee cov duab thiab yees duab ntawm qhov tshwm sim kawg.

Pom zoo: