Commit graph

1321 commits

Author SHA1 Message Date
Gwilym Kuiper 2bab48b422 Add lifetimes to the mixer 2023-02-23 20:44:20 +00:00
Gwilym Kuiper 5ac408d414 Do all the video modes 2023-02-23 20:42:48 +00:00
Gwilym Kuiper ce5641f5ef Add correct lifetimes for Blend 2023-02-23 20:39:23 +00:00
Gwilym Kuiper 9757f7ed54 Add correct lifetimes to windows 2023-02-23 20:37:03 +00:00
Gwilym Kuiper 0eec7e366c Add lifetimes to ObjectController 2023-02-23 20:36:00 +00:00
Gwilym Kuiper b76e7b9bf0 Release v0.13.0 2023-01-19 20:21:09 +00:00
Gwilym Kuiper 1cd4cc6a9e Merge remote-tracking branch 'origin/master' into remove-option-to-manage-your-own-interrupts-in-the-mixer 2023-01-12 22:30:32 +00:00
Gwilym Kuiper 7525a6f572
Make missing a vblank interrupt wait less painful (#374)
If you missed a vblank, then the next call to wait_for_vblank would
pointlessly wait rather than returning immediately. Meaning if you
missed a vblank by a few cycles, you'd be waiting for the entire next
one :(.

- [x] Changelog updated / no changelog update needed
2023-01-12 22:24:30 +00:00
Gwilym Kuiper 43aebe4092
Fix volume zero and power of 2 (#375)
Fixes #371.

If the volume was zero, the calculation for leading zeros was incorrect.
So both reduce the amount of work done for 0 volume and also count the
leading zeros correctly in the fast path.

- [x] Changelog updated / no changelog update needed
2023-01-12 22:17:16 +00:00
Gwilym Kuiper 987d7b0d2c
Add missing methods for tiled1 to allow creating backgrounds (#368)
Fixes #367

Had missed implementations to actually get the backgrounds if you were
using tiled1 mode.

- [x] Changelog updated / no changelog update needed
2023-01-12 22:14:43 +00:00
Gwilym Kuiper 009de4e660 Update test to be more relevant 2023-01-12 22:02:07 +00:00
Gwilym Kuiper 8009ffea09 If volume is 0, don't actually play anything 2023-01-12 21:54:08 +00:00
Gwilym Kuiper 6ebe08e528 Fix out by 1 while calcuating leading zeros 2023-01-12 21:53:54 +00:00
Gwilym Kuiper 827afd87b9 Make wait_for_vblank syscall pub(crate) 2023-01-12 21:24:37 +00:00
Gwilym Kuiper e50540752c Make missing a vblank interrupt wait less painful 2023-01-12 21:20:54 +00:00
Gwilym Kuiper b50d6694d9 Add missing methods for tiled1 to allow creating backgrounds
Fixes #367
2023-01-09 11:27:25 +00:00
Corwin 4e6b4107cb and test that benchmarks the allocator 2023-01-06 18:23:42 +00:00
Gwilym Kuiper d57a1edbd4 Remove stray reference to after_vblank 2022-12-10 00:32:57 +00:00
Gwilym Kuiper 5a71db0c17 Move buffer management entirely to the mixer state 2022-12-10 00:28:30 +00:00
Gwilym Kuiper 93d0fe5700 Start refactoring towards needing &self in write_channels 2022-12-10 00:19:05 +00:00
Gwilym Kuiper a870a1deda Can set the asm buffer size just once 2022-12-10 00:01:08 +00:00
Gwilym Kuiper 6f2c1bc616 Don't need to do the mod3_estimate here too 2022-12-10 00:00:36 +00:00
Gwilym Kuiper c031e9b002 Put the MixerBuffer in IWRAM 2022-12-09 23:33:25 +00:00
Gwilym Kuiper 8efbf87c21 Get rid of references to manual interrupt work 2022-12-09 23:09:16 +00:00
Gwilym Kuiper 0f5ce17f75 Fix the examples and the games 2022-12-09 23:00:28 +00:00
Gwilym Kuiper 6df06211c6 Fix the examples 2022-12-09 22:34:16 +00:00
Gwilym Kuiper 390392a1d8 Rename timer -> fifo_timer 2022-12-09 22:28:32 +00:00
Gwilym Kuiper b74c5e39c0 Remove setup_interrupt_handler and after_vblank in the mixer 2022-12-09 22:27:04 +00:00
Gwilym Kuiper 3e8090e153 Fix clippy lint for inline format args 2022-12-09 20:36:09 +00:00
Gwilym Kuiper 99ce2f73d5
Textrender rework (#352)
This reworks the text rendering system so the tiles in some rendered
text can be persisted across frames. This is important for performance
in situations where you want to incrementally write to a text box for
example in a Pokemon/Phoenix Wright style dialogue system. Previously
the only way to do this was to render all the chars in the text every
frame, which is currently prohibitively slow (though this could be
potentially sped up).

In addition with this implementation it is easy to individually colour
each character, so I added the ability to do that to.

I expanded the tests to test keeping the renderer instance (which
contains the tiles) over multiple frames, and also added in some
coloured text.

If you are happy with this implementation then I will change the
examples which use text, and also add some more documentation. Thanks
for taking a look.
2022-11-21 23:14:40 +00:00
jem 77275e2718 add in asserts for palette indicies 2022-11-21 21:50:43 +00:00
Gwilym Kuiper 212fd32108 Remember to clear the renderer 2022-11-21 07:37:03 +00:00
Gwilym Kuiper 08ceef09cd Rename 'c to 'b 2022-11-21 07:30:33 +00:00
Gwilym Kuiper 9660b6df12 Fix the text_render example 2022-11-21 07:28:40 +00:00
Gwilym Kuiper 707c2bf7e7 Remove the 'b lifetime 2022-11-21 07:26:48 +00:00
jem fbcf001986 unneeded newlines 2022-11-20 23:17:49 +00:00
jem 8b23b7d54a wrong title 2022-11-20 23:16:23 +00:00
jem 31c4d47872 whitespace 2022-11-20 23:15:09 +00:00
jem 0f3182d5b8 fix examples 2022-11-20 19:35:03 +00:00
jem 75fe0532f1 add docs 2022-11-20 19:33:39 +00:00
jem e7d87b8eee fix clippy warnings 2022-11-19 15:57:38 +00:00
jem e576f0685e readd new line 2022-11-19 15:49:55 +00:00
jem 07dc80e8fa rework the text renderer 2022-11-19 15:44:29 +00:00
Gwilym Kuiper deb907b9eb Fix remaining spelling errors in agb 2022-11-17 21:16:40 +00:00
Gwilym Kuiper 45431615dc Fix spelling errors in hash_map 2022-11-17 21:15:48 +00:00
Gwilym Kuiper 7621f47644 fix spelling errors in sync 2022-11-17 21:15:23 +00:00
Gwilym Kuiper dce5f40c26 Fix spellings in sound 2022-11-17 21:14:38 +00:00
Gwilym Kuiper da0ea524d9 Fix spelling errors in save 2022-11-17 21:13:22 +00:00
Gwilym Kuiper 51a8ec4d95 xfer -> transfer 2022-11-17 21:12:18 +00:00
Gwilym Kuiper c8ff3b4359 blnd -> blend 2022-11-17 21:10:56 +00:00
Gwilym Kuiper aa29b52b6b PingPong is 2 words 2022-11-17 21:10:26 +00:00
Gwilym Kuiper 0d6e6c709c Fix spellings in object.rs 2022-11-17 21:10:11 +00:00
Gwilym Kuiper cc879a094e Fix spellings in blend.rs 2022-11-17 21:05:26 +00:00
Gwilym Kuiper 32a8b213fb disp -> display 2022-11-17 21:04:53 +00:00
Gwilym Kuiper 140442fe0b Fix spellings in affine.rs 2022-11-17 21:04:32 +00:00
Gwilym Kuiper b37ce0b9b6 Fix spelling errors in block_allocator 2022-11-17 21:03:32 +00:00
Gwilym Kuiper 55c7541386 backc is not a word 2022-11-17 21:00:51 +00:00
Corwin b7a6158873 remove feature not required in later nightlies 2022-11-09 00:11:35 +00:00
Gwilym Kuiper 6319fd3a20 Fix doc errors and warnings 2022-11-01 22:02:51 +00:00
Gwilym Kuiper 9c99f25a56 Spell left correctly 2022-11-01 21:25:39 +00:00
Gwilym Kuiper c57013aafd Add deny(missing_docs) to input 2022-11-01 21:25:38 +00:00
Gwilym Kuiper dfa70f4335 Add a bunch of docs for input 2022-11-01 21:15:47 +00:00
Corwin 2efddfc342 changes made to make new game 2022-10-31 19:31:54 +00:00
Corwin 70f22b9255 Release v0.12.2 2022-10-22 12:59:20 +01:00
Corwin 78f9fd2026 Release v0.12.1 2022-10-12 19:00:12 +01:00
Corwin ae419fb6c1 when building docs, don't use instruction set 2022-10-12 17:30:08 +01:00
Corwin a9faaffe46 reflow doc comments 2022-10-12 17:30:08 +01:00
Corwin ab4089f5f3 fix broken links 2022-10-12 17:30:08 +01:00
Corwin 82baaa70cb deny broken links 2022-10-12 17:30:08 +01:00
Corwin 886f604efe rustfmt 2022-10-12 17:30:08 +01:00
Gwilym Kuiper fc45af262b Release v0.12.0 2022-10-11 23:34:13 +01:00
Gwilym Kuiper f1fb9d5375 Remove pointless set_scroll_pos and scroll_pos from AffineBackground 2022-10-11 22:32:00 +01:00
Corwin e30e0b76e2
Merge pull request #324 from corwinkuiper/affine-matrix-background
Use the new Affine Matrix stuff in the affine background
2022-10-09 20:51:26 +01:00
Corwin ae8d2b2fa0 fix broken docs 2022-10-09 17:52:24 +01:00
Corwin 4dfa6c25a5 REMOVE UNUSED IMPORT THAT I JUST MADE 2022-10-09 17:27:07 +01:00
Corwin f6dd65ae52 fix test 2022-10-09 17:21:30 +01:00
Corwin 6d7bc75bbb remove another unused import (in the classic case of dev by CI) 2022-10-09 17:21:21 +01:00
Corwin fb08d7e208 remove unused import 2022-10-09 17:05:06 +01:00
Corwin 89107f7a4e correct (and much better) docs 2022-10-09 16:59:58 +01:00
Corwin ed1e8bcbdc use new affine stuff in map 2022-10-09 16:59:49 +01:00
Corwin c69fdd7bec switch to using fixed point numbers in gba representation 2022-10-09 11:41:31 +01:00
Corwin dcdf678126 completely remove scalar mul 2022-10-09 11:31:54 +01:00
Corwin 002d409db8 this is not valid because we don't track the lower right entry
for rotation and translation this remains as 1, but it should change for scaling
2022-10-09 00:56:34 +01:00
Corwin 963fbc8c23 should be a multiply 2022-10-09 00:53:48 +01:00
Corwin b43408e6e1 reimplement default 2022-10-09 00:50:41 +01:00
Corwin 3497f7a720 switch to using new affine matrix 2022-10-09 00:42:14 +01:00
Corwin d2f5a5333a Merge remote-tracking branch 'upstream/master' into object-controller2 2022-10-09 00:19:44 +01:00
Corwin dead6652eb fix lint 2022-10-08 23:46:54 +01:00
Corwin 96401c2833 implement multiplication by scalar 2022-10-08 23:44:22 +01:00
Corwin 9ed5ee2295 change name of function to match the name of the transformation 2022-10-08 23:41:41 +01:00
Corwin c33f99aaea add comment on what the matrix represents 2022-10-08 23:39:19 +01:00
Corwin 6927f84597 deny undocumented 2022-10-08 23:39:19 +01:00
Corwin c09c0b77f4 add docs 2022-10-08 23:39:19 +01:00
Corwin 5e8a50159e implement try from 2022-10-08 23:39:19 +01:00
Corwin d83f0ea710 from rotation accept generic fixnum 2022-10-08 23:39:19 +01:00
Corwin 99f01caea4 some fun affine matrix functions! 2022-10-08 23:39:19 +01:00
Corwin f17084d4f6 Merge remote-tracking branch 'upstream/master' into object-controller2 2022-10-08 23:36:59 +01:00
Gwilym Kuiper f921da930a Fix doc comment 2022-10-08 23:15:54 +01:00
Gwilym Kuiper a09be56319 Fix example 2022-10-08 23:08:04 +01:00
Gwilym Kuiper f5f73e89f5
Merge branch 'master' into affine 2022-10-08 23:03:42 +01:00
Gwilym Kuiper 1e759dbeca Move the palettes to a single constant rather than being repeated 2022-10-08 23:02:54 +01:00
Gwilym Kuiper 9bddbdba1c Seal the TiledMap trait 2022-10-08 22:40:20 +01:00
Gwilym Kuiper 5c578df227 transparent colour definition isn't really needed here 2022-10-08 22:34:54 +01:00
Gwilym Kuiper 7d43903ee0
Merge pull request #323 from gwilymk/remove-frequency-features
Remove frequency features
2022-10-08 22:24:07 +01:00
Gwilym Kuiper cc66b65847 Update the docs 2022-10-08 21:39:48 +01:00
Gwilym Kuiper 870478353c Use the correct buffer sizes 2022-10-08 21:20:13 +01:00
Gwilym Kuiper c0821c9229 Ensure packed(4) 2022-10-08 17:14:58 +01:00
Gwilym Kuiper fe2e480f28 Remove pointless casts 2022-10-08 17:13:25 +01:00
Gwilym Kuiper faed7b456f Avoid double transforming 2022-10-08 17:12:50 +01:00
Gwilym Kuiper e63e830a9c Merge remote-tracking branch 'origin/master' into affine 2022-10-08 17:05:00 +01:00
Gwilym Kuiper c5f6e10889 Update all toml files to the new transparent requirement 2022-10-08 16:59:40 +01:00
Corwin c90e8de893 clippy autofix 2022-10-08 11:34:43 +01:00
Gwilym Kuiper c6d961cd8d Almost works 2022-10-02 21:18:29 +01:00
Gwilym Kuiper 2ffc68c5c1 Start making the frequency field dynamic rather than a feature flag 2022-10-02 21:14:01 +01:00
Corwin 5e0795ae14 add garbage collection using hashmap retain 2022-10-02 20:05:13 +01:00
Corwin 7143621407 use unsafe around creating new static sprites, no guarentee that it does it correctly though 2022-10-02 19:34:38 +01:00
Corwin b7448d714e remove unused arena 2022-10-02 19:34:38 +01:00
Corwin 5d541631ae add dynamic sprite support 2022-10-02 19:34:38 +01:00
Corwin 1acf7142da switch to using rust Rc 2022-10-02 19:34:38 +01:00
Corwin 5d21f720a5 add arena library 2022-10-02 19:34:38 +01:00
Corwin 88e1635fb1 unify types 2022-10-02 19:34:38 +01:00
Corwin 781e1efc6f satisfy linter 2022-10-02 19:34:38 +01:00
Corwin 758f9849c3 track the lifetime of the static object controller 2022-10-02 19:34:38 +01:00
Gwilym Kuiper 4bf3e0d597 Add tests for size_hint and ensure .iter() returns a better iterator 2022-10-02 19:10:50 +01:00
Gwilym Kuiper 78554862c8 Move the tests to a better location 2022-10-02 19:05:29 +01:00
Gwilym Kuiper a44b8a4013 Add comment explaining the continue statement 2022-10-02 19:00:59 +01:00
Gwilym Kuiper c658b6afe5 Add implementation of retain to HashMap 2022-10-02 18:55:21 +01:00
Gwilym Kuiper 2d23f0a36c Implement size_hint for the hashmap iterators 2022-10-02 18:44:48 +01:00
Gwilym Kuiper ae5d8818b6 Fix test in release mode (don't know why this works :/ but is more correct) 2022-10-01 17:09:48 +01:00
Gwilym Kuiper ffde16abd9 Remove crate::println! 2022-10-01 15:31:19 +01:00
Gwilym Kuiper ccc3823085 Remove unused import 2022-10-01 15:30:46 +01:00
Gwilym Kuiper cde3bca0ea Make the background rotate again 2022-10-01 15:30:37 +01:00
Gwilym Kuiper dd2030d354 Use the fact that tris turn into integers nicely 2022-10-01 15:29:42 +01:00
Gwilym Kuiper 63b0fa63c6 packed(4) to ensure alignment 2022-10-01 15:28:53 +01:00
Gwilym Kuiper 83c28254a1 Update to be closer to the API I actually want but currently only works in release mode 2022-09-22 23:29:58 +01:00
Gwilym Kuiper 59673206b3 Make the example work the way I expect it to 2022-09-22 21:34:03 +01:00
Gwilym Kuiper 496b4a4953 repr packed 2022-09-22 21:33:59 +01:00
Gwilym Kuiper 84c87a8088 Merge remote-tracking branch 'origin/master' into affine 2022-09-22 20:13:23 +01:00
Alissa Rao b920d94f83
Remove agb-tests in favor of putting the tests directly in agb. 2022-09-15 23:28:38 -07:00
Alissa Rao 8f3e438070
Final round of bugfixes, documentation fixes and clippy warning fixes. 2022-09-15 23:25:17 -07:00
Alissa Rao 821098dd26
Implement EEPROM save media.
Fix EEPROM implementation.
2022-09-15 23:25:16 -07:00
Alissa Rao 8dd0f4768a
Add support for flash save media. 2022-09-15 23:25:16 -07:00
Alissa Rao 4397bb0d66
Add tests for cartridge save access. 2022-09-15 23:25:16 -07:00
Alissa Rao 2be44c12e5
Improve codestyle in asm_routines.s, remove unsafe save implementation in hyperspace-roll. 2022-09-15 23:25:16 -07:00
Alissa Rao ec41db2fc9
Reintegrate SRAM save media reader. 2022-09-15 23:25:13 -07:00
Alissa Rao d50413a3cc
Update the code style of the save module to better match agb's philosophy. 2022-09-15 23:25:08 -07:00
Alissa Rao 217f42a635
Initial work on porting gba save code to agb codebase. 2022-09-15 23:20:07 -07:00
Alissa Rao 6d51d1bef3
Rework a simpler example to use agb::sync instead of bare_metal. 2022-09-15 23:14:30 -07:00
Alissa Rao 89c76616b6
Implement a new sync API allowing for mutexes that don't require disabling IRQs. 2022-09-15 23:14:27 -07:00
Gwilym Kuiper 654bff0cb7 Mark ignore on test runner docs 2022-09-15 22:47:08 +01:00
Gwilym Kuiper 68fb9c7e02 Remove reference to the testing feature 2022-09-15 22:39:44 +01:00
Gwilym Kuiper d6c5099209 Make testing a default feature 2022-09-15 22:37:36 +01:00
Gwilym Kuiper 45e9c860df Fix small issues from latest clippy version 2022-09-15 21:04:10 +01:00
Gwilym Kuiper fcde651821 Allow movement of the affine background 2022-08-12 00:02:10 +01:00
Gwilym Kuiper 97e3948f32 Fix warnings and remove debug logs 2022-08-11 23:49:51 +01:00
Gwilym Kuiper ff89f7f425 Get first example working 2022-08-11 23:49:51 +01:00
Gwilym Kuiper 9a5ecc5cda Assert replace tile is passed two tiles of the same size 2022-08-11 23:49:51 +01:00
Gwilym Kuiper d106b0a82b Simplify map.rs 2022-08-11 23:49:51 +01:00
Gwilym Kuiper affea47a32 Remove const and rustfmt::skip 2022-08-11 23:49:51 +01:00
Gwilym Kuiper 31f85cf6b9 Simplify tiled0-2 2022-08-11 23:49:51 +01:00
Gwilym Kuiper d59e2672c0 Remove features 2022-08-11 23:49:51 +01:00
lifning ee576597c2 Add rudimentary affine background layer support. 2022-08-11 23:49:51 +01:00
Corwin d5c9312dc4 add convenience functions for performing multiple actions on one layer 2022-08-09 19:16:12 +01:00
Corwin afa9ef9109 add docs for blend 2022-08-09 19:16:12 +01:00
Corwin 921c26f7c2 add blending to the window example 2022-08-09 19:16:12 +01:00
Corwin 7ad160e30f use struct newtypes 2022-08-09 19:16:12 +01:00
Corwin cae71ff249 add blend to distributor 2022-08-09 19:16:12 +01:00
Corwin 41ccd56919 new function for blend 2022-08-09 19:16:12 +01:00
Corwin d0b3d9e7b3 add blend abstraction 2022-08-09 19:16:12 +01:00
Corwin ca9c898c14 add general set bits 2022-08-09 19:16:12 +01:00
Corwin 4a5f77ddd6 fix doc comment to link correctly 2022-08-06 21:16:11 +01:00
Corwin 12d4a8cd81 add module level docs 2022-08-06 12:51:59 +01:00
Corwin e1448f7d81 write docs for windows 2022-08-06 12:36:28 +01:00
Corwin 78ff4011c7 merge imports 2022-08-06 12:36:28 +01:00
Corwin dbbd7a3d34 add some inlines to small functions 2022-08-06 12:36:28 +01:00
Corwin e318898197 add example for window 2022-08-06 12:36:28 +01:00
Corwin 2b4a95a4a9 clamp the position before converting to u8 2022-08-06 12:36:28 +01:00
Corwin 648ce375d5 enabling and disabling windows 2022-08-06 12:36:28 +01:00
Corwin f9d9220ead function to reset the window 2022-08-06 12:36:28 +01:00
Corwin 44fd7d0027 use a name matching rust conventions 2022-08-06 12:36:28 +01:00
Corwin 7735baecc9 use a more sensible ordering of numbers 2022-08-06 12:36:28 +01:00
Corwin a188e7ba66 add abstraction over windows 2022-08-06 12:36:28 +01:00
Corwin 10423d0752 background id exposed 2022-08-06 12:36:28 +01:00
Corwin 99af3e2b17
Merge pull request #281 from corwinkuiper/hashmap-allocator
Custom allocator support in HashMap
2022-08-04 21:55:51 +01:00
Gwilym Kuiper 73cec55e05 Move crt0.s and interrupt_handler.s to src 2022-08-04 20:08:18 +01:00
Corwin 5b3d288079 support custom allocators in hashmap 2022-08-04 19:27:08 +01:00
Corwin e3ac5de377 make the allocators clonable 2022-08-04 19:26:55 +01:00
Corwin 2e97fb2b24 Release v0.11.1 2022-08-02 23:52:43 +01:00
Corwin 43b256a9f3 Release v0.11.0 2022-08-02 23:45:44 +01:00
Gwilym Kuiper 14f42670d2
Merge pull request #277 from gwilymk/deny-missing-docs-in-hashmap
Deny missing docs in HashMap and document remaining two public structs
2022-08-02 22:59:53 +01:00
Gwilym Kuiper 460cf7db91 Deny missing docs in HashMap and document two public structs 2022-08-02 22:52:16 +01:00
Corwin 267fe80981 remove doc outside of agb_fixnum 2022-08-02 19:40:22 +01:00
Corwin 46c5dcd2de inline docs in agb crate 2022-08-02 18:49:00 +01:00
Corwin 940a92b021
Merge pull request #271 from lifning/master
Support armv4t-none-eabi target as well.
2022-08-01 20:38:39 +01:00
Corwin f7d6199ab2 add the config to be able to compile this 2022-08-01 17:36:02 +01:00
Corwin 9410f6ed1d update docs 2022-08-01 12:07:50 +01:00
lifning 22e9cbccc0 Support armv4t-none-eabi target as well. 2022-08-01 02:20:03 -07:00
Corwin 0409a20527 add examples demonstrating this 2022-08-01 01:38:26 +01:00
Corwin a7e038aa18 Release v0.10.0 2022-07-31 17:08:48 +01:00
Corwin 567244d7dc remove print from test 2022-07-31 14:45:26 +01:00
Corwin 473fc12cee document objects 2022-07-31 13:42:41 +01:00
Gwilym Kuiper 3903b10d15
Merge pull request #266 from gwilymk/update-include-gfx-docs
Update include_gfx! documentation
2022-07-31 11:38:01 +01:00
Corwin cd70a3ed22 update docs 2022-07-31 01:06:36 +01:00
Corwin e92e8d39a5 implement allocators as zsts 2022-07-31 01:06:36 +01:00
Gwilym Kuiper acf33a5058 Update include_gfx! documentation 2022-07-31 00:04:52 +01:00
Gwilym Kuiper 3ec95a0277
Merge pull request #265 from gwilymk/gc-vram-at-the-correct-time
Run the GC after copying the tiles rather than before
2022-07-30 23:22:07 +01:00
Corwin b39b6f43b3 correct end address of range 2022-07-30 22:49:26 +01:00
Gwilym Kuiper 14e371c911 Run the GC after copying the tiles rather than before 2022-07-30 22:42:01 +01:00
Corwin 0c25eb6bee fix doc examples 2022-07-30 19:47:34 +01:00
Corwin 7f760d4404 add some doc comments to explain the allocators 2022-07-30 19:34:40 +01:00
Corwin feea7d2af1 privatise agb_alloc crate 2022-07-30 19:34:30 +01:00
Corwin cd000ca767 use the end of all assigned iwram data 2022-07-30 17:21:46 +01:00
Corwin a3de583d40 fix 2022-07-30 17:07:18 +01:00
Corwin 433fad15a1 mark function as pub crate so it's not used outside agb 2022-07-30 16:52:41 +01:00
Corwin 002ccc64dd implement allocator api so we can allocate to (ew/iw)ram 2022-07-30 16:40:48 +01:00
Gwilym Kuiper 0111ec43bb agb_start_tests can now be doc(hidden) 2022-07-25 22:49:18 +01:00
Gwilym Kuiper 20aebd349a Provide an empty #[entry] in lib.rs 2022-07-25 22:49:17 +01:00
Gwilym Kuiper 2e505f9684 Remove the need for a special test implementation 2022-07-25 22:49:17 +01:00
Gwilym Kuiper 9231d16071 Add some documentation for the test runner 2022-07-25 22:49:17 +01:00
Gwilym Kuiper 553a625c91 Mkae it possible to run tests in target crates (and add a basic tests in hat-wizard) 2022-07-25 22:49:17 +01:00
Corwin 29c74f6286 move commit 2022-07-24 21:30:45 +01:00
Gwilym Kuiper 8df9f4b5c4 Go back to using DMA for sprites 2022-07-21 20:52:07 +01:00
Gwilym Kuiper c2a4845a2e Add a must_use to pos 2022-07-21 20:34:26 +01:00
Gwilym Kuiper 3de22df7a2 Add get and set position on sound channels 2022-07-17 10:32:01 +01:00
Gwilym Kuiper a5e0e145d2 Attempt to support changing the volume of stereo sound 2022-07-16 18:47:39 +01:00
Corwin 1be10ba450 align sprite data to 2 byte boundaries 2022-07-16 13:36:33 +01:00
Gwilym Kuiper 2026e49569 Start the tile ram one tile in to prevent overwriting the transparent tile 2022-07-16 09:12:15 +01:00
Corwin ebc4e15f3d constify sprite function 2022-07-15 21:59:36 +01:00
Gwilym Kuiper a9da4a65f9 Update agbabi's memcpy 2022-07-14 22:43:41 +01:00
Gwilym Kuiper 6d1d3d2b9d Add repository to Cargo.toml files
Fixes #253
2022-07-14 21:49:53 +01:00
Gwilym Kuiper 4a6b093f6d Update mixer doctests 2022-07-12 15:07:28 +01:00
Gwilym Kuiper 70b227d471 Get doctests working for mixer/mod.rs 2022-07-12 15:00:52 +01:00
Gwilym Kuiper 8929486387 Make doctest in interrupt.rs work 2022-07-12 14:45:45 +01:00
Gwilym Kuiper 5e317ef192 Get doctests working on lib.rs (will fix ignored later) 2022-07-12 14:39:50 +01:00
Gwilym Kuiper 643891a9de Make the doctests work for infinite_scrolled_map 2022-07-12 14:37:32 +01:00
Gwilym Kuiper eeefec6e27 Make the first infinite_scrolled_map test run 2022-07-12 14:21:13 +01:00
Gwilym Kuiper 4c63058ba0 Fix example 2022-07-12 13:42:30 +01:00
Gwilym Kuiper 86b9c2b3dd Deny missing docs in mixer 2022-07-12 13:33:32 +01:00
Gwilym Kuiper 2c7db427f8 Document sw_mixer 2022-07-12 13:32:35 +01:00
Gwilym Kuiper d78d9155bf Allow impl Into<Num<...>> to make it a bit simpler 2022-07-12 12:53:17 +01:00
Gwilym Kuiper ead344ca0b Document the whole of mixer/mod.rs 2022-07-12 12:50:40 +01:00
Gwilym Kuiper d3c8480ce0 Write some docs for the mixer 2022-07-12 12:29:35 +01:00
Gwilym Kuiper 3f1f290791 Bring memset.s in line with latest agbabi 2022-06-24 21:19:52 +01:00
Gwilym Kuiper fcbaacac1b Update to the latest agbabi memcpy 2022-06-24 21:12:14 +01:00
Gwilym Kuiper e08aaf6c7a Reduce input and output offsets to 0..8 to half run time 2022-06-22 23:40:41 +01:00
Gwilym Kuiper d053aa1707 Add a test for the non-word case 2022-06-22 23:38:36 +01:00
Gwilym Kuiper 6aa30462f9 Replace memcpy tests with a test which does all offsets for lots of sizes
Found a bug in agbabi with size 0, source offset 1, target offset 3
2022-06-22 23:31:23 +01:00
Gwilym Kuiper 16efca4b59 Add some tests for memset4 2022-06-22 22:33:56 +01:00
Gwilym Kuiper cb5763ed53 Check sizes 0..80 in size with 0..10 offset for memset 2022-06-22 22:00:26 +01:00
Corwin 10eeeaf9e7 a test for agbabi memset 2022-06-21 02:00:29 +01:00
Gwilym Kuiper 5ca8cb8bf7 Use agbabi's fix for small copies / sets 2022-06-19 17:38:34 +01:00
Gwilym Kuiper c9f1401ef3 Fix issue with small, misaligned copies 2022-06-19 13:03:44 +01:00
Gwilym Kuiper a7d52bbed0 Add offset tests and failing test for both offetted by 1 byte 2022-06-19 12:24:55 +01:00
Gwilym Kuiper 39bef8f866 Add some basic agbabi tests for memcpy 2022-06-19 12:17:34 +01:00
Gwilym Kuiper 578b1eefa4 Delete decompile accidentally committed 2022-06-17 22:40:31 +01:00
Gwilym Kuiper 64fbf13cc3 Update gba_mb with the new requried references 2022-06-17 00:48:32 +01:00
Gwilym Kuiper cb48325f21 Add README for agbabi 2022-06-17 00:40:17 +01:00
Gwilym Kuiper 4ac3939e9a Add agbabi licence 2022-06-17 00:38:12 +01:00
Gwilym Kuiper 7e46cf6a1d Remove the hack from the mixer 2022-06-17 00:32:07 +01:00
Gwilym Kuiper 8a8e8c011b Make sure to reference the agbabi files so they are included 2022-06-17 00:30:33 +01:00
Gwilym Kuiper 2d90755090 Put everything in different sections 2022-06-17 00:30:33 +01:00
Gwilym Kuiper 601360ca67 Compile agbabi into agb 2022-06-17 00:30:33 +01:00
Gwilym Kuiper 149d2ec76b Delete the archive file each time we run the build 2022-06-17 00:30:33 +01:00
Corwin c5af151d76
Merge pull request #237 from corwinkuiper/split-asm
Split asm
2022-06-17 00:24:44 +01:00
Corwin 13df836b91 update multiboot linker 2022-06-16 23:38:07 +01:00
Gwilym Kuiper 90b5e39b42 Switch to using a single archive 2022-06-16 23:32:28 +01:00
Corwin 05adfabca8 get it working 2022-06-16 23:22:27 +01:00
Corwin 0be9da755c split out assembly 2022-06-16 22:58:22 +01:00
Gwilym Kuiper fbff538d92
Merge pull request #236 from gwilymk/document-tiled-mode
Add some doc comments to tiled mode
2022-06-16 22:58:03 +01:00
Gwilym Kuiper efeaeeac4d Finish off the comments in InfiniteScrolledMap 2022-06-16 22:42:16 +01:00
Gwilym Kuiper de965e966f Write some doc comments for InfiniteScrolledMap 2022-06-16 22:30:52 +01:00
Gwilym Kuiper bc1bf3416c Add some doc comments around the video struct 2022-06-16 22:30:26 +01:00
Gwilym Kuiper 21b8f12c03 Make the 32768Hz example print the timing to the gba screen 2022-06-16 21:36:48 +01:00
Gwilym Kuiper 9eb087ad60 Print the CPU usage for the stereo sound example 2022-06-16 21:32:16 +01:00
Gwilym Kuiper 24749ac645 Do the zeroing of the buffer in assembly 2022-06-12 17:53:39 +01:00
Gwilym Kuiper 33c948208a Don't actually need to clear the buffer 2022-06-12 17:30:01 +01:00
Gwilym Kuiper 2ace226db8 Extract a function to do the clearing of the buffer 2022-06-12 17:26:16 +01:00
Gwilym Kuiper 4969672c73 Use hand written fast fill to save a few more cycles 2022-06-12 16:53:46 +01:00
Gwilym Kuiper bec1a17cfd This doesn't need the allow 2022-06-12 13:57:16 +01:00
Gwilym Kuiper bbad55af65 Deny the stricter lints 2022-06-11 20:57:40 +01:00
Gwilym Kuiper 9759555e42 Remove cast_lossless because it isn't supported by bitfield 2022-06-11 20:56:48 +01:00
Gwilym Kuiper ba35b85c81 Final clippy lint fixes 2022-06-11 20:56:05 +01:00
Gwilym Kuiper bf9f298972 Fix some sound related lints 2022-06-11 20:51:41 +01:00
Gwilym Kuiper 062e8c8881 Fix some more linter errors 2022-06-11 20:48:18 +01:00
Gwilym Kuiper 1b393cd612 Fix new clippy lints in tiled 2022-06-11 20:40:12 +01:00
Gwilym Kuiper f2e565f512 Take advantage of the fact that CriticalSection is Copy 2022-06-11 20:34:19 +01:00
Gwilym Kuiper 1edd7f4166 Add a bunch of new clippy lints 2022-06-11 20:27:08 +01:00
Gwilym Kuiper b8cf5090cb Make clippy warnings and let CI fail if there are issues 2022-06-11 20:17:37 +01:00
Gwilym Kuiper e6f5494242 Use the syscall to do the memset because the default implementation is really slow 2022-06-11 17:22:29 +01:00
Gwilym Kuiper 4633fe7e3c Set sound bias (which seems to make this work on hardware) 2022-06-11 16:53:39 +01:00
Gwilym Kuiper 3a419b05de Improve timer API and use it 2022-06-11 16:44:29 +01:00
Gwilym Kuiper d65fd5d740 Don't require the 32kHz frequency for interrupts 2022-06-11 16:22:28 +01:00
Gwilym Kuiper 3bd85c7d7c Get correct song name 2022-06-11 16:11:18 +01:00
Gwilym Kuiper 879a4f5270 Unroll the loop a bit 2022-06-11 16:10:58 +01:00
Gwilym Kuiper 5f7a1007a2 Triple buffer the sound to avoid skipping 2022-06-11 16:08:00 +01:00
Gwilym Kuiper 7d8890b03e 32768 example 2022-06-11 15:46:10 +01:00
Gwilym Kuiper a4c696ad33 Build a special version of 'frame' for freq32768 2022-06-11 13:23:39 +01:00
Gwilym Kuiper c709455e3d Add defines for freq32768 2022-06-11 13:19:56 +01:00
Gwilym Kuiper 42d3455abf Avoid duplicating the feature flag definition 2022-06-11 13:19:52 +01:00
Gwilym Kuiper 73d6dc448f Add new frequency option 2022-06-11 13:05:30 +01:00