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
34bde6ca
"examples/web/gb.ts" did not exist on "46244a0de9f0ffb16cefba8010c507657e7c14ba"
Verified
Commit
34bde6ca
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
feat: small set of fixes
parent
c2e969f3
No related branches found
No related tags found
1 merge request
!2
Initial web version of boytacean
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/web/index.css
+1
-1
1 addition, 1 deletion
examples/web/index.css
examples/web/index.ts
+2
-2
2 additions, 2 deletions
examples/web/index.ts
src/gb.rs
+4
-0
4 additions, 0 deletions
src/gb.rs
with
7 additions
and
3 deletions
examples/web/index.css
+
1
−
1
View file @
34bde6ca
...
@@ -26,7 +26,7 @@ html {
...
@@ -26,7 +26,7 @@ html {
body
{
body
{
color
:
#ffffff
;
color
:
#ffffff
;
font-family
:
"VT323"
,
"Robot"
,
"Open Sans"
,
Arial
,
Helvetica
,
sans-serif
;
font-family
:
"VT323"
,
"Robot
o
"
,
"Open Sans"
,
Arial
,
Helvetica
,
sans-serif
;
margin
:
0px
0px
0px
0px
;
margin
:
0px
0px
0px
0px
;
padding
:
12px
12px
52px
12px
;
padding
:
12px
12px
52px
12px
;
}
}
...
...
This diff is collapsed.
Click to expand it.
examples/web/index.ts
+
2
−
2
View file @
34bde6ca
...
@@ -49,7 +49,7 @@ const KEYS: Record<string, number> = {
...
@@ -49,7 +49,7 @@ const KEYS: Record<string, number> = {
};
};
// @ts-ignore: ts(2580)
// @ts-ignore: ts(2580)
const
ROM_PATH
=
require
(
"
../../res/roms/
ld_r_r
.gb
"
);
const
ROM_PATH
=
require
(
"
../../res/roms/
tetris
.gb
"
);
type
State
=
{
type
State
=
{
gameBoy
:
GameBoy
;
gameBoy
:
GameBoy
;
...
@@ -180,7 +180,7 @@ const main = async () => {
...
@@ -180,7 +180,7 @@ const main = async () => {
await
clearCanvas
(
undefined
,
{
await
clearCanvas
(
undefined
,
{
// @ts-ignore: ts(2580)
// @ts-ignore: ts(2580)
image
:
require
(
"
./res/storm.png
"
),
image
:
require
(
"
./res/storm.png
"
),
imageScale
:
0.
4
imageScale
:
0.
2
});
});
await
wasm
();
await
wasm
();
...
...
This diff is collapsed.
Click to expand it.
src/gb.rs
+
4
−
0
View file @
34bde6ca
...
@@ -40,6 +40,10 @@ impl GameBoy {
...
@@ -40,6 +40,10 @@ impl GameBoy {
GameBoy
{
cpu
:
cpu
}
GameBoy
{
cpu
:
cpu
}
}
}
pub
fn
pc
(
&
self
)
->
u16
{
self
.cpu
.pc
()
}
pub
fn
clock
(
&
mut
self
)
->
u8
{
pub
fn
clock
(
&
mut
self
)
->
u8
{
let
cycles
=
self
.cpu_clock
();
let
cycles
=
self
.cpu_clock
();
self
.ppu_clock
(
cycles
);
self
.ppu_clock
(
cycles
);
...
...
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