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
092ee8f2
Verified
Commit
092ee8f2
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
feat: new default bootix roms
parent
0fbb7ea4
No related branches found
No related tags found
No related merge requests found
Pipeline
#888
passed
2 years ago
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/sdl/src/main.rs
+1
-1
1 addition, 1 deletion
examples/sdl/src/main.rs
src/data.rs
+30
-0
30 additions, 0 deletions
src/data.rs
src/gb.rs
+17
-2
17 additions, 2 deletions
src/gb.rs
with
48 additions
and
3 deletions
examples/sdl/src/main.rs
+
1
−
1
View file @
092ee8f2
...
...
@@ -81,7 +81,7 @@ fn main() {
// creates a new Game Boy instance and loads both the boot ROM
// and the initial game ROM to "start the engine"
let
mut
game_boy
=
GameBoy
::
new
();
game_boy
.load_boot_
sgb
();
game_boy
.load_boot_
dmg_bootix
();
//game_boy.load_rom_file("../../res/roms.prop/tetris.gb");
//game_boy.load_rom_file("../../res/roms.prop/alleyway.gb");
...
...
This diff is collapsed.
Click to expand it.
src/data.rs
+
30
−
0
View file @
092ee8f2
...
...
@@ -29,3 +29,33 @@ pub const SGB_BOOT: [u8; 256] = [
32
,
245
,
34
,
35
,
34
,
35
,
201
,
60
,
66
,
185
,
165
,
185
,
165
,
66
,
60
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
62
,
1
,
224
,
80
,
];
pub
const
DMG_BOOTIX
:
[
u8
;
256
]
=
[
49
,
254
,
255
,
33
,
255
,
159
,
175
,
50
,
203
,
124
,
32
,
250
,
14
,
17
,
33
,
38
,
255
,
62
,
128
,
50
,
226
,
12
,
62
,
243
,
50
,
226
,
12
,
62
,
119
,
50
,
226
,
17
,
4
,
1
,
33
,
16
,
128
,
26
,
205
,
184
,
0
,
26
,
203
,
55
,
205
,
184
,
0
,
19
,
123
,
254
,
52
,
32
,
240
,
17
,
204
,
0
,
6
,
8
,
26
,
19
,
34
,
35
,
5
,
32
,
249
,
33
,
4
,
153
,
1
,
12
,
1
,
205
,
177
,
0
,
62
,
25
,
119
,
33
,
36
,
153
,
14
,
12
,
205
,
177
,
0
,
62
,
145
,
224
,
64
,
6
,
16
,
17
,
212
,
0
,
120
,
224
,
67
,
5
,
123
,
254
,
216
,
40
,
4
,
26
,
224
,
71
,
19
,
14
,
28
,
205
,
167
,
0
,
175
,
144
,
224
,
67
,
5
,
14
,
28
,
205
,
167
,
0
,
175
,
176
,
32
,
224
,
224
,
67
,
62
,
131
,
205
,
159
,
0
,
14
,
39
,
205
,
167
,
0
,
62
,
193
,
205
,
159
,
0
,
17
,
138
,
1
,
240
,
68
,
254
,
144
,
32
,
250
,
27
,
122
,
179
,
32
,
245
,
24
,
73
,
14
,
19
,
226
,
12
,
62
,
135
,
226
,
201
,
240
,
68
,
254
,
144
,
32
,
250
,
13
,
32
,
247
,
201
,
120
,
34
,
4
,
13
,
32
,
250
,
201
,
71
,
14
,
4
,
175
,
197
,
203
,
16
,
23
,
193
,
203
,
16
,
23
,
13
,
32
,
245
,
34
,
35
,
34
,
35
,
201
,
60
,
66
,
185
,
165
,
185
,
165
,
66
,
60
,
0
,
84
,
168
,
252
,
66
,
79
,
79
,
84
,
73
,
88
,
46
,
68
,
77
,
71
,
32
,
118
,
49
,
46
,
50
,
0
,
62
,
255
,
198
,
1
,
11
,
30
,
216
,
33
,
77
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
62
,
1
,
224
,
80
,
];
pub
const
MGB_BOOTIX
:
[
u8
;
256
]
=
[
49
,
254
,
255
,
33
,
255
,
159
,
175
,
50
,
203
,
124
,
32
,
250
,
14
,
17
,
33
,
38
,
255
,
62
,
128
,
50
,
226
,
12
,
62
,
243
,
50
,
226
,
12
,
62
,
119
,
50
,
226
,
17
,
4
,
1
,
33
,
16
,
128
,
26
,
205
,
184
,
0
,
26
,
203
,
55
,
205
,
184
,
0
,
19
,
123
,
254
,
52
,
32
,
240
,
17
,
204
,
0
,
6
,
8
,
26
,
19
,
34
,
35
,
5
,
32
,
249
,
33
,
4
,
153
,
1
,
12
,
1
,
205
,
177
,
0
,
62
,
25
,
119
,
33
,
36
,
153
,
14
,
12
,
205
,
177
,
0
,
62
,
145
,
224
,
64
,
6
,
16
,
17
,
212
,
0
,
120
,
224
,
67
,
5
,
123
,
254
,
216
,
40
,
4
,
26
,
224
,
71
,
19
,
14
,
30
,
205
,
167
,
0
,
175
,
144
,
224
,
67
,
5
,
14
,
30
,
205
,
167
,
0
,
175
,
176
,
32
,
224
,
224
,
67
,
62
,
131
,
205
,
159
,
0
,
14
,
30
,
205
,
167
,
0
,
62
,
193
,
205
,
159
,
0
,
17
,
242
,
1
,
240
,
68
,
254
,
144
,
32
,
250
,
27
,
122
,
179
,
32
,
245
,
24
,
73
,
14
,
19
,
226
,
12
,
62
,
135
,
226
,
201
,
240
,
68
,
254
,
144
,
32
,
250
,
13
,
32
,
247
,
201
,
120
,
34
,
4
,
13
,
32
,
250
,
201
,
71
,
14
,
4
,
175
,
197
,
203
,
16
,
23
,
193
,
203
,
16
,
23
,
13
,
32
,
245
,
34
,
35
,
34
,
35
,
201
,
60
,
66
,
185
,
165
,
185
,
165
,
66
,
60
,
0
,
84
,
168
,
252
,
66
,
79
,
79
,
84
,
73
,
88
,
46
,
68
,
77
,
71
,
32
,
118
,
49
,
46
,
50
,
0
,
62
,
255
,
198
,
1
,
11
,
30
,
216
,
33
,
77
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
62
,
255
,
224
,
80
,
];
This diff is collapsed.
Click to expand it.
src/gb.rs
+
17
−
2
View file @
092ee8f2
use
crate
::{
cpu
::
Cpu
,
data
::{
DMG_BOOT
,
SGB_BOOT
},
data
::{
DMG_BOOT
,
DMG_BOOTIX
,
MGB_BOOTIX
,
SGB_BOOT
},
mmu
::
Mmu
,
pad
::
Pad
,
ppu
::{
Ppu
,
FRAME_BUFFER_SIZE
},
...
...
@@ -62,7 +62,6 @@ impl GameBoy {
pub
fn
load_boot_file
(
&
mut
self
,
path
:
&
str
)
{
let
data
=
read_file
(
path
);
println!
(
"{:?}"
,
data
);
self
.load_boot
(
&
data
);
}
...
...
@@ -74,6 +73,14 @@ impl GameBoy {
self
.load_boot_file
(
"./res/boot/sgb_boot.bin"
);
}
pub
fn
load_boot_dmg_bootix_f
(
&
mut
self
)
{
self
.load_boot_file
(
"./res/boot/dmg_bootix.bin"
);
}
pub
fn
load_boot_mgb_bootix_f
(
&
mut
self
)
{
self
.load_boot_file
(
"./res/boot/mgb_bootix.bin"
);
}
pub
fn
load_boot_default
(
&
mut
self
)
{
self
.load_boot_dmg_f
();
}
...
...
@@ -86,6 +93,14 @@ impl GameBoy {
self
.load_boot
(
&
SGB_BOOT
);
}
pub
fn
load_boot_dmg_bootix
(
&
mut
self
)
{
self
.load_boot
(
&
DMG_BOOTIX
);
}
pub
fn
load_boot_mgb_bootix
(
&
mut
self
)
{
self
.load_boot
(
&
MGB_BOOTIX
);
}
pub
fn
frame_buffer_eager
(
&
mut
self
)
->
Vec
<
u8
>
{
self
.frame_buffer
()
.to_vec
()
}
...
...
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