Michael Mogenson
51c870281c
Add Serial and GPIO registers and implement embedded_hal traits ( #96 )
...
* Add Serial and GPIO registers and implement embedded_hal traits
Use VolAddress and phantom_fields to populate the SIOCNT, RCNT, and
SIODATA8 registers. Implement embedded_hal serial traits around an empty
SioSerial struct.
Hide serial read and write traits behind a "serial" feature flag
to make embedded-hal and nb dependencies optional.
* UART echo example
Enable the serial feature for this example. Provide a pinout
diagram to assist people with wiring up a USB to UART adapter.
2020-12-26 11:28:07 -07:00
Michael Mogenson
b354dca479
Fix address of IF register ( #97 )
...
GBATEK has the IF register at address 0x04000202.
2020-12-24 10:10:16 -07:00
Nicola Papale
1696c66b1b
Use RFC 2873 asm syntax ( #93 )
...
The new syntax is way safer and more ergonomic. In fact, it renders
obsolete some of the warnings in the docs related to the use of `asm!`.
2020-06-14 01:22:59 -06:00
Lokathor
9491249089
typo
2019-03-06 19:41:03 -07:00
Lokathor
ac031627c8
Update IME to be u16
sized, avoid newtype_enum
...
newtype_enum makes an enum, but an enum can be UB if it's no a valid bit pattern. We should avoid having registers mapped to enum types.
2019-02-14 22:11:23 -07:00
Lokathor
3b688b907c
Get all the code lined up
2019-02-14 19:39:34 -07:00
Lokathor
89b7cc0eaa
Merge branch 'dev' into lokathor
2019-02-14 19:17:02 -07:00
Lokathor
273a8bd676
commit the changes
2019-02-14 19:16:09 -07:00
Ian Pickering
0d654032bb
Add module for interrupt request (IRQ) handling
2019-02-13 17:08:57 -08:00
Ian Pickering
dc2127b2ce
Fix incorrect opcode of VBlankIntrWait BIOS function
...
It should be `swi 0x05` instead of `swi 0x04`.
2019-02-13 17:06:18 -08:00
Lokathor
d43c66c0d9
new lib file
2019-02-13 01:47:25 -07:00
Lokathor
9e7937b956
tag TODOs in docs
2019-02-13 01:46:47 -07:00
Lokathor
5d89414c13
Update the Mode 3/4/5 abstractions
2019-02-13 01:45:48 -07:00
Lokathor
61218d99f2
Update mGBA usage, stuff it in a macros module
2019-02-13 01:45:23 -07:00
Lokathor
2ca888b572
Fix rustfmt to get things a little more compact
2019-02-12 10:00:16 -07:00
Lokathor
2929076e55
jump to 120
...
Picking this because it makes the `hello_magic.rs` lines all stay on one line.
2019-02-12 09:42:17 -07:00
Lokathor
b67bdc80a1
io registers lesson, +cargo fmt with lin length down to 100
2019-02-11 21:59:17 -07:00
Lokathor
da6ce44345
shouldn't this be pub?
2019-02-09 14:35:48 -07:00
Lokathor
84a4b4b89b
Explain this better because even I forgot
2019-02-09 12:50:00 -07:00
Lokathor
fc642c064d
Convert to using the recently split off voladdress
lib
2019-02-05 00:47:06 -07:00
Lokathor
dcd7e40b15
Start towards 0.4
2019-02-04 20:25:40 -07:00
Lokathor
c933e43dd6
mgba 0.7 came out!
2019-02-02 00:20:38 -07:00
Lokathor
ddf6593f8b
Delete the builtins module
...
The `__clzsi2` function is now part of the compiler-builtins crate, so it's part of all of Rust.
2019-02-01 23:36:17 -07:00
Lokathor
ed7f830ad4
fix to work with latest nightly.
2019-01-12 21:06:38 -07:00
Lokathor
0fb9994131
IWRAM fix
2019-01-12 13:42:18 -07:00
Lokathor
a1e35a9ed1
Merge branch 'master' into lokathor
2019-01-12 13:38:16 -07:00
Lokathor
bc10122d58
admonish people to stay updated
2019-01-12 13:35:56 -07:00
Lokathor
0e363477b7
mGBA output wasn't resetting its length used
2019-01-12 13:34:43 -07:00
Eevee (Evelyn Woods)
91d40f0c5b
Make ObjectAttributes's and AffineParameters's fields public
2019-01-08 18:20:08 -07:00
Eevee (Evelyn Woods)
cdd4a3d109
Fix addresses for BG1HOFS and BG1VOFS
2019-01-08 17:23:11 -07:00
Lokathor
8ff32b0304
Update bios module to just build on x86
...
the actual functions are all unimplemented!() but oh well
2019-01-02 22:43:52 -07:00
Lokathor
f825d78e71
More registers!
2018-12-31 16:28:20 -07:00
Lokathor
4217a2b795
add sound
2018-12-31 01:07:33 -07:00
Lokathor
d62fbae4f0
more const!
2018-12-30 23:29:58 -07:00
Lokathor
dfca52a079
newtype_enum, and other updates
2018-12-29 22:39:53 -07:00
Lokathor
4c7ec468d0
Modules and newtypes, joy!
2018-12-29 20:17:48 -07:00
Lokathor
6466a53475
Move to the phantom_fields!
proc-macro
2018-12-29 00:06:08 -07:00
Lokathor
bee2d16a5b
More docs, and also less no-docs warnings
2018-12-27 23:34:12 -07:00
Lokathor
f99da154e8
minor fixes
2018-12-27 23:22:48 -07:00
Lokathor
e475253dcf
small cleanups
2018-12-27 11:51:53 -07:00
Lokathor
147a2bc45c
better vram, still not the best
2018-12-27 11:51:35 -07:00
Lokathor
e10491eb8c
OAM module
2018-12-27 11:51:07 -07:00
Lokathor
cc8d4376f8
Add timer support
2018-12-27 01:05:21 -07:00
Lokathor
72bbe412b6
clearer module organization
2018-12-26 23:13:10 -07:00
Lokathor
6271614335
backgrounds and OAM start
2018-12-26 20:19:53 -07:00
Lokathor
01ac3ec09e
travisCI fix
2018-12-25 23:52:30 -07:00
Lokathor
d6a6301815
CLOSE to another release
2018-12-25 23:19:16 -07:00
Lokathor
0f1fa8269f
More tiled data types
2018-12-25 16:46:01 -07:00
Lokathor
c440be7467
reduce the use visibility
2018-12-25 16:45:51 -07:00
Lokathor
0a6a089e70
docs fixes
2018-12-25 16:45:40 -07:00
Lokathor
89def7331b
Quick start of a background module
2018-12-25 16:45:26 -07:00
Lokathor
ce3ddd3bb0
Improving newtype
2018-12-25 16:45:10 -07:00
Lokathor
1a19831373
Page1 always starts at +0xA000
2018-12-25 16:20:51 -07:00
Lokathor
cdd330f22d
start of tiled data types
2018-12-25 14:47:26 -07:00
Lokathor
ae408931f5
make this look more normal
2018-12-25 14:46:34 -07:00
Lokathor
08ff34ae43
make the BIOS test safe
2018-12-25 14:46:08 -07:00
Lokathor
ecc7ea940d
palram
2018-12-25 14:45:51 -07:00
Lokathor
d2260fc117
Move Mode3/4/5 into gba::video::bitmap
2018-12-25 14:44:05 -07:00
Lokathor
b183e9b6b4
Allow limited unsafe access to DMA3
...
Possibly make a "DMA" trait to ensure that things stay uniform once we also have DMA0/1/2?
2018-12-24 17:56:46 -07:00
Lokathor
6a07f95973
TODO for later
2018-12-24 16:05:11 -07:00
Lokathor
1dcecb72cb
added the downshifts.
2018-12-24 16:02:47 -07:00
Lokathor
51dbb749ef
DMA first draft
2018-12-24 15:43:36 -07:00
Lokathor
ce3b871728
more button info
2018-12-24 11:57:57 -07:00
Lokathor
7d8c82ddbc
mgba panic handler 100% safe, justrelease only tho
2018-12-23 15:52:42 -07:00
Lokathor
7ab96c35f2
light cycle is also 100% safe now
2018-12-23 15:10:14 -07:00
Lokathor
35ed03cb44
cleanup, hello world runs 100% safe now
2018-12-23 14:45:38 -07:00
Lokathor
b927a348bd
sensible goals
2018-12-22 00:26:52 -07:00
Lokathor
4586d2d95f
module organization
2018-12-20 18:08:54 -07:00
Lokathor
8ede9f524d
begin IO Register classification, start with KEYINPUT
2018-12-20 16:15:23 -07:00
Lokathor
fdf0eebb69
Drop the quickcheck usage
...
Some day we can split the software math into its own crate and do quickcheck there, until then the test code must be fully no_std because otherwise the examples won't build (sadly, dev-dependencies applies to both tests and examples)
2018-12-20 15:30:08 -07:00
Lokathor
1ff25ca2b7
whoops
2018-12-19 21:04:28 -07:00
Lokathor
c3f62b1ab5
trying a commit but i think nightly is broked
2018-12-19 20:58:41 -07:00
Lokathor
f372923bad
added some tests
...
and they even pass
2018-12-18 12:09:04 -07:00
Lokathor
4d27005150
fixed point stuff
2018-12-18 02:05:59 -07:00
Lokathor
58d739dd9e
fixed point and stuff
2018-12-17 17:00:22 -07:00
Lokathor
779770a187
cleanup and cleanup designations
2018-12-16 20:55:53 -07:00
Lokathor
71a2de023f
all sorts of new bios
2018-12-16 20:55:02 -07:00
Lokathor
c892ac9681
Once we use one proc-macro, we might use them all
2018-12-16 20:54:50 -07:00
Lokathor
5408a11f54
bit/byte mixup
2018-12-16 15:22:27 -07:00
Lokathor
74d50b9218
typos
2018-12-16 15:20:07 -07:00
Lokathor
09b936262f
more BIOS
2018-12-16 15:17:30 -07:00
Lokathor
fd681b182e
fix our math terms (thanks ubsan!)
2018-12-16 00:59:36 -07:00
Lokathor
9c547a62b1
new aims
2018-12-08 01:53:37 -07:00
Lokathor
e9b62f1832
more writing, but the demo just shows white
2018-12-04 23:27:35 -07:00
Lokathor
6ae1374412
closer
2018-11-28 18:18:23 -07:00
Lokathor
2e2aec6ec9
tiles fixes, clippy fixes
2018-11-20 23:44:58 -07:00
Lokathor
e4318df495
clippy stuff
2018-11-20 04:10:48 -07:00
Lokathor
62abc3cbd2
make mode3 clear a little speedier
2018-11-20 03:41:42 -07:00
Lokathor
241fb1746c
edits, cleanups, and a goal for ch3
2018-11-17 17:14:42 -07:00
Lokathor
3a355db578
cargo-make Makefile.toml
2018-11-16 00:39:47 -07:00
Lokathor
8aa1bb0065
partial intrinsic work
2018-11-15 01:23:04 -07:00
Lokathor
6cb50aa2eb
more proc-macro
2018-11-14 20:38:43 -07:00
Lokathor
cb5d856e00
correctness
2018-11-14 20:14:36 -07:00
Lokathor
7bbbba66de
more proc-macro!
2018-11-14 19:53:53 -07:00
Lokathor
0a7da9e6d2
More mode3
2018-11-14 19:50:42 -07:00
Lokathor
e962b893fc
More cargo test
friendly
2018-11-14 19:49:00 -07:00
Lokathor
3789e206f3
VolatilePtr should be testing safe now
2018-11-14 19:47:56 -07:00
Lokathor
a4b6a4e8b2
Revert "Deploy rust-console/gba to github.com/rust-console/gba.git:master"
...
This reverts commit 2f1c243742
.
2018-11-13 12:47:52 -07:00
DocsBot (from Travis CI)
2f1c243742
Deploy rust-console/gba to github.com/rust-console/gba.git:master
2018-11-13 19:43:53 +00:00
Lokathor
4b4fc31956
key input stuff added to the lib
...
I'm not sure this is the best key input interface, but this is _an_ interface to use for now at least.
2018-11-12 16:37:38 -07:00
Lokathor
cdb9be13d6
keyinput section
2018-11-12 14:57:28 -07:00
Lokathor
db00e1e24d
Remove trivial commented out code
...
no need to "keep it for later" when it's just an import
2018-11-11 00:30:13 -07:00
Lokathor
0b9d8e9b29
hello world chapter is complete
2018-11-10 23:39:26 -07:00
Lokathor
097dd72124
almost chapter 1
2018-11-10 02:03:37 -07:00
Lokathor
5a49cbc713
Display Control
2018-11-08 22:08:13 -07:00
Lokathor
4c99082b20
triggered an ICE
2018-11-08 20:33:47 -07:00
Lokathor
e9b26f838b
io register groundwork
...
the current goal is to get enough done that we can write a sensical looking hello world game, and then put a writeup of that into the book.
2018-11-07 23:43:22 -07:00
Lokathor
dfb56c21b2
crate start
2018-11-07 21:21:17 -07:00