Commit graph

55 commits

Author SHA1 Message Date
Matt L 093146fd8a
Using asm and global_asm from core::arch module. (#157)
* Using asm and global_asm from core::arch module.

* Commenting out some broken code with higher registers.
2022-01-01 21:54:46 -07:00
Hpmason ec0ca7d804
Add RNG (#142)
* Add random

* Add GBA random example

* switch macro_export to pub(crate)

* rename u32_to_u32 macro

* remove useless pub use

* Comment out extra u32 to u16 macro

* Comment random_color example

* formatting

* More commenting

* Add/fix some docs

* Fix some doc links

* Remove use of u64
- Halve bit widths where u64 was used

* Add Gen32::next_color()
2021-05-17 12:22:51 -06:00
Lokathor 127f31ecf2 fix macros. 2021-05-01 19:45:55 -06:00
Lokathor 6a709689ed this is the commit that gave the ICE. 2021-05-01 18:38:52 -06:00
Lokathor fd3a308e8a
remove proc macro usage and finish out the mmio (#125)
* .

* more updates, much more to do soon.

* hello world works again.

* fix key interrupts.

* remove the old book

* don't forget timers.

* we can just use search, duh.

* cleanup

* more bios

* finished most mmio, finished bios.

* dump some old macros that shouldn't have been pub to begin with.

* Update README.md

* for now, just make this a u16

* timers

* fix hello_world

* timer fix

* docs on timers

* block resetting work ram for now.

* put preserves_flags on bios calls as appropriate

* add a code page 437 tile sheet.

* docs.

* sound :( it's all bad but we'll fix it in 0.5

* move most backup files back into the lib.

* CI might work now?

* fix up non-serial examples.

* oops, gotta check out the repo.

* readme.
2021-04-08 23:57:30 -06:00
Lokathor 3bcd64f28c
update to voladdress-0.4 (#120)
* update to voladdress-0.4 (via git)

* restore the imports rust-analyzer told me to break.
2021-03-31 20:22:42 -06:00
Alissa Rao 79099d807b
Adds support for reading/writing to save media. (#109)
* Write some of the basic infrastructure for SRAM support.

* Implement battery-backed SRAM.

* Implement non-Atmel Flash chips.

* Implement support for Atmel Flash SRAM chips.

* Implement EEPROM support, various refactorings to SRAM system.

* Replace Save API with one based more cleanly on the flash chip API.

* Run rustfmt on new save media code.

* Improve test_savegame and fix remaining bugs caught by the changes.

* Proofreading on comments/documentation for save module.

* Fix addresses for read/verify routines in save::flash.

* Rebase save_api onto current master.
2021-02-22 23:19:37 -07:00
Alissa Rao 8bfa1a228a
Adds support for NO$GBA's debugging API. (#108)
* Implement a debugging interface that allows the use of debugging on multiple emulators.

* Implement NO$GBA debugging interface.

* Run rustfmt on new debug code.

* Fix the debug module not compiling on non-ARM systems.

* Don't error (and just silently truncate) on messages that are too long.
2021-02-22 23:19:14 -07:00
Alissa Rao 2aa59bb341
Implement a sync API for working with global mutable state. (#107)
* Add IntelliJ workspace files to the .gitignore.

* Add a simple make_example script for Linux.

* Create a `sync` module with many GBA-specific sync utilties.

* Fix overflow error in debug mode in the hello_world crate.

* Fixes to DMA.

* Code cleanup for the sync module.

* Run rustfmt on new sync code.

* Fix up some names and documentation in the sync module.

* Add a few changes suggested by thomcc for the locks.

* Added needed compiler fences to `InitOnce::try_get`.
* Change the error in `RawMutex::raw_unlock` to better reflect the cause.

* Add a proper issue link to the __sync_synchronize hack.

* Disable interrupts during `InitOnce::try_get`.

* Fix some bad wording in the comments for `InitOnce::try_get`

* Use the new target in `cfg` checks to see if we're on GBA.

* Change registers used for transfer_align4_arm for the different target.

* Cleanup on sync_api changes for the target change.
2021-02-21 16:57:26 -07:00
Michael Mogenson d52d627113
Remove cargo-xbuild dev dependency (#95)
* Remove cargo-xbuild dev dependency

As of Rust nightly 2020-07-15, we can set the default build target
and build-std feature of cargo instead of relying on cargo-xbuild.

Since the thumbv4-non-agb target is the default for all cargo commands,
change the Rust snippets in Makefile.toml to cross-platform duckscript.

The only uglyness we're left with is running the unit tests. We want to
build and run the tests on the host archetecture. Create three platform
overrides for Mac, Windows, Linux and set flags to override the default
target triple and build-std option.

* remove uneeded attribute

From cargo: "the feature `cfg_target_vendor` has been stable since
1.33.0 and no longer requires an attribute to enable"
2021-01-12 14:41:51 -07:00
Lokathor 3b688b907c Get all the code lined up 2019-02-14 19:39:34 -07:00
Lokathor d43c66c0d9 new lib file 2019-02-13 01:47:25 -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 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 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 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 e10491eb8c OAM module 2018-12-27 11:51:07 -07:00
Lokathor 72bbe412b6 clearer module organization 2018-12-26 23:13:10 -07:00
Lokathor d6a6301815 CLOSE to another release 2018-12-25 23:19:16 -07:00
Lokathor ce3ddd3bb0 Improving newtype 2018-12-25 16:45:10 -07:00
Lokathor ecc7ea940d palram 2018-12-25 14:45:51 -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 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 c3f62b1ab5 trying a commit but i think nightly is broked 2018-12-19 20:58:41 -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 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 e4318df495 clippy stuff 2018-11-20 04:10:48 -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 e962b893fc More cargo test friendly 2018-11-14 19:49:00 -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 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