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
97c020f5
Verified
Commit
97c020f5
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
feat: new boot disable support
parent
6a5dad18
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mmu.rs
+8
-16
8 additions, 16 deletions
src/mmu.rs
with
8 additions
and
16 deletions
src/mmu.rs
+
8
−
16
View file @
97c020f5
...
@@ -33,25 +33,17 @@ impl Mmu {
...
@@ -33,25 +33,17 @@ impl Mmu {
&
self
.ppu
&
self
.ppu
}
}
pub
fn
read
(
&
self
,
addr
:
u16
)
->
u8
{
pub
fn
read
(
&
mut
self
,
addr
:
u16
)
->
u8
{
match
addr
&
0xf000
{
match
addr
&
0xf000
{
// BIOS
// BIOS
0x0000
=>
{
0x0000
=>
{
//@todo we still need to control if we're reading from boot
// in case the boot mode is active and the
// if(MMU._inboot)
// address is withing boot memory reads from it
// {
if
self
.boot_active
&&
addr
<=
0x00fe
{
// if(addr < 0x0100)
if
addr
==
0x00fe
{
// return MMU._boot[addr];
self
.boot_active
=
false
;
// else if(Z80._r.pc == 0x0100)
}
// MMU._inboot = 0;
return
self
.boot
[
addr
as
usize
];
//}
//return MMU._rom[addr];
if
self
.boot_active
{
if
addr
<
0x0100
{
return
self
.boot
[
addr
as
usize
];
}
/* else if self.cpu.as_ref().unwrap().borrow().pc() == 0x0100 {
self.boot_active = false;
}*/
}
}
self
.rom
[
addr
as
usize
]
self
.rom
[
addr
as
usize
]
}
}
...
...
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