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
02724e23
Verified
Commit
02724e23
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into joamag/color
parents
d886d70a
33198767
No related branches found
No related tags found
1 merge request
!16
Support for Game Boy Color (CGB) 😎🖍️
Pipeline
#1643
passed
2 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+8
-2
8 additions, 2 deletions
README.md
src/cpu.rs
+7
-6
7 additions, 6 deletions
src/cpu.rs
src/mmu.rs
+1
-1
1 addition, 1 deletion
src/mmu.rs
with
16 additions
and
9 deletions
README.md
+
8
−
2
View file @
02724e23
# [Boytacean](https://boytacean.
pages.dev
)
# [Boytacean](https://boytacean.
joao.me
)
A Game Boy emulator that is written in Rust 🦀.
...
...
@@ -6,7 +6,7 @@ A Game Boy emulator that is written in Rust 🦀.
## Features
*
Supports
Game Boy (DMG) emulation
*
Game Boy (DMG) emulation
*
Simple navigable source-code
*
Web and SDL front-ends
*
Support for multiple MBCs: MBC1, MBC2, MBC3, and MBC5
...
...
@@ -22,10 +22,16 @@ For the Web front-end...
*
Fullscreen browser mode
*
Debug mode - VRAM and registers
What's missing...
*
Audio emulation APU
*
Game Boy Color (GBC) emulation
## Deployments
| Provider | Stable | URL |
| --------- | ------- | ---------------------------------------------------------------- |
| Cloudfare |
`True`
|
[
boytacean.joao.me
](
https://boytacean.joao.me
)
|
| Cloudfare |
`True`
|
[
boytacean.pages.dev
](
https://boytacean.pages.dev
)
|
| Cloudfare |
`True`
|
[
prod.boytacean.pages.dev
](
https://prod.boytacean.pages.dev
)
|
| Cloudfare |
`True`
|
[
stable.boytacean.pages.dev
](
https://stable.boytacean.pages.dev
)
|
...
...
This diff is collapsed.
Click to expand it.
src/cpu.rs
+
7
−
6
View file @
02724e23
...
...
@@ -115,7 +115,7 @@ impl Cpu {
panic!
(
"Invalid PC area at 0x{:04x}"
,
pc
);
}
// @
todo
this is so bad, need to improve this by an order
// @
TODO
this is so bad, need to improve this by an order
// of magnitude, to be able to have better performance
if
self
.halted
&&
(((
self
.mmu.ie
&
0x01
==
0x01
)
&&
self
.mmu
.ppu
()
.int_vblank
())
...
...
@@ -127,8 +127,9 @@ impl Cpu {
}
if
self
.ime
{
// @todo aggregate all of this interrupts in the MMU, as there's
// a lot of redundant code involved in here
// @TODO aggregate all of this interrupts in the MMU, as there's
// a lot of redundant code involved in here which complicates the
// readability and maybe performance of this code
if
(
self
.mmu.ie
&
0x01
==
0x01
)
&&
self
.mmu
.ppu
()
.int_vblank
()
{
debugln!
(
"Going to run V-Blank interrupt handler (0x40)"
);
...
...
@@ -148,7 +149,7 @@ impl Cpu {
return
24
;
}
// @
todo
aggregate the handling of these interrupts
// @
TODO
aggregate the handling of these interrupts
else
if
(
self
.mmu.ie
&
0x02
==
0x02
)
&&
self
.mmu
.ppu
()
.int_stat
()
{
debugln!
(
"Going to run LCD STAT interrupt handler (0x48)"
);
...
...
@@ -168,7 +169,7 @@ impl Cpu {
return
24
;
}
// @
todo
aggregate the handling of these interrupts
// @
TODO
aggregate the handling of these interrupts
else
if
(
self
.mmu.ie
&
0x04
==
0x04
)
&&
self
.mmu
.timer
()
.int_tima
()
{
debugln!
(
"Going to run Timer interrupt handler (0x50)"
);
...
...
@@ -188,7 +189,7 @@ impl Cpu {
return
24
;
}
// @
todo
aggregate the handling of these interrupts
// @
TODO
aggregate the handling of these interrupts
else
if
(
self
.mmu.ie
&
0x10
==
0x10
)
&&
self
.mmu
.pad
()
.int_pad
()
{
debugln!
(
"Going to run JoyPad interrupt handler (0x60)"
);
...
...
This diff is collapsed.
Click to expand it.
src/mmu.rs
+
1
−
1
View file @
02724e23
...
...
@@ -282,7 +282,7 @@ impl Mmu {
match
addr
&
0x00ff
{
// 0xFF46 — DMA: OAM DMA source address & start
0x0046
=>
{
// @
todo
must increment the cycle count by 160
// @
TODO
must increment the cycle count by 160
// and make this a separated dma.rs file
debugln!
(
"Going to start DMA transfer to 0x{:x}00"
,
value
);
let
data
=
self
.read_many
((
value
as
u16
)
<<
8
,
160
);
...
...
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