Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
boytacean
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
João Magalhães
boytacean
Commits
487d59a6
Verified
Commit
487d59a6
authored
9 months ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
chore: format black
parent
15e4d622
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#4350
passed
9 months ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/ipython/pocket.ipynb
+1
-0
1 addition, 0 deletions
examples/ipython/pocket.ipynb
with
1 addition
and
0 deletions
examples/ipython/pocket.ipynb
+
1
−
0
View file @
487d59a6
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
"outputs": [],
"outputs": [],
"source": [
"source": [
"from boytacean import GameBoy\n",
"from boytacean import GameBoy\n",
"\n",
"ROM_PATH = \"../../res/roms/demo/pocket.gb\"\n",
"ROM_PATH = \"../../res/roms/demo/pocket.gb\"\n",
"gb = GameBoy(apu_enabled=False, serial_enabled=False)\n",
"gb = GameBoy(apu_enabled=False, serial_enabled=False)\n",
"gb.load_rom(ROM_PATH)\n",
"gb.load_rom(ROM_PATH)\n",
...
...
%% Cell type:code id:6527990d-da11-4660-a9c2-56bb4a57de37 tags:
%% Cell type:code id:6527990d-da11-4660-a9c2-56bb4a57de37 tags:
```
python
```
python
from
boytacean
import
GameBoy
from
boytacean
import
GameBoy
ROM_PATH
=
"
../../res/roms/demo/pocket.gb
"
ROM_PATH
=
"
../../res/roms/demo/pocket.gb
"
gb
=
GameBoy
(
apu_enabled
=
False
,
serial_enabled
=
False
)
gb
=
GameBoy
(
apu_enabled
=
False
,
serial_enabled
=
False
)
gb
.
load_rom
(
ROM_PATH
)
gb
.
load_rom
(
ROM_PATH
)
for
_
in
range
(
220
):
for
_
in
range
(
220
):
gb
.
next_frame
()
gb
.
next_frame
()
gb
.
image
()
gb
.
image
()
```
```
%% Cell type:code id:bea9dcad-f3a5-479f-8116-4d6031ddfac9 tags:
%% Cell type:code id:bea9dcad-f3a5-479f-8116-4d6031ddfac9 tags:
```
python
```
python
gb
.
set_palette
(
"
hogwards
"
)
gb
.
set_palette
(
"
hogwards
"
)
for
_
in
range
(
400
):
for
_
in
range
(
400
):
gb
.
next_frame
()
gb
.
next_frame
()
gb
.
image
()
gb
.
image
()
```
```
%% Cell type:code id:eb697a68-77d4-443d-96da-0e81f9b39d2a tags:
%% Cell type:code id:eb697a68-77d4-443d-96da-0e81f9b39d2a tags:
```
python
```
python
gb
.
set_palette
(
"
christmas
"
)
gb
.
set_palette
(
"
christmas
"
)
for
_
in
range
(
400
):
for
_
in
range
(
400
):
gb
.
next_frame
()
gb
.
next_frame
()
gb
.
image
()
gb
.
image
()
```
```
%% Cell type:code id:1f75c0f0-7350-4870-8385-b1815d672e75 tags:
%% Cell type:code id:1f75c0f0-7350-4870-8385-b1815d672e75 tags:
```
python
```
python
with
gb
.
video_capture
(
video_format
=
"
avc1
"
,
video_extension
=
"
mp4
"
,
fps
=
60
):
with
gb
.
video_capture
(
video_format
=
"
avc1
"
,
video_extension
=
"
mp4
"
,
fps
=
60
):
for
_
in
range
(
400
):
for
_
in
range
(
400
):
gb
.
next_frame
()
gb
.
next_frame
()
```
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment