Commit graph

606 commits

Author SHA1 Message Date
Gwilym Kuiper 06901b3543 Move post-work to pre-work 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 530b71e0df Copy slightly too much 2022-03-05 19:23:53 +00:00
Gwilym Kuiper a365c14917 Small fixes 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 3a795fea8f Handle moving up to 10 tiles at once 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 610be70b92 Correctly set the initial offset value in init() 2022-03-05 19:23:53 +00:00
Gwilym Kuiper a998ae31a4 Correctly use the map width and not the display width 2022-03-05 19:23:53 +00:00
Gwilym Kuiper ebf21f4add Avoid pointless copies 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 66a61e33e6 More correctly special case tile 0 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 666867e933 Track the generation along with the tile data 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 10c97f48d8 Introduce the MapLoan to infinite scrolled map 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 2c8fce40d3 Store the used backgrounds in a bit array 2022-03-05 19:23:53 +00:00
Gwilym Kuiper cd05fee360 Use a concrete type for the TileReference 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 5793d6b6ab Introduce methods for increasing and decreasing the reference 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 2a04ebd884 Rename TileReference to VRamState 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 5533c9c052 Fix reuse issue 2022-03-05 19:23:53 +00:00
Gwilym Kuiper a2c6c6a70c Make the tile references clearer 2022-03-05 19:23:53 +00:00
Gwilym Kuiper bf10d9a5ff Try copying the correct amount 2022-03-05 19:23:53 +00:00
Gwilym Kuiper 7f0d7757c5 Really trying hard to get this working 2022-03-05 19:23:53 +00:00
Gwilym Kuiper f785d65057 Something that seems like it is close to working 2022-03-05 19:23:50 +00:00
Gwilym Kuiper 472875edac Update the wave example 2022-03-05 19:21:54 +00:00
Gwilym Kuiper 38e57489a3 Rework the settings a little to allow for raw tile ids 2022-03-05 19:21:54 +00:00
Gwilym Kuiper cf72a9331a Add API for setting tile data from just a number 2022-03-05 19:21:54 +00:00
Gwilym Kuiper 1286a58511 Ensure that we don't copy twice 2022-03-05 19:21:54 +00:00
Gwilym Kuiper 0081d1c6ee Update the chicken example 2022-03-05 19:21:54 +00:00
Gwilym Kuiper 06c988e952 Fix the test logo and the example 2022-03-05 19:21:54 +00:00
Gwilym Kuiper 8fcb9e607d Special case the first element in references 2022-03-05 19:21:54 +00:00
Gwilym Kuiper bdeaf346cd Remove the old tile before creating the new one 2022-03-05 19:21:54 +00:00
Gwilym Kuiper 2044cbf379 Generation makes more sense to be a u16 for better data storage 2022-03-05 19:21:54 +00:00
Gwilym Kuiper 0ebd2c2e40 transparent is probably more correct 2022-03-05 19:21:54 +00:00
Gwilym Kuiper 1562e63bee Marker is a better name for this probably 2022-03-05 19:21:54 +00:00
Gwilym Kuiper 7c3725497c Add method to hide background 2022-03-05 19:21:54 +00:00
Gwilym Kuiper 93d82f309e Test logo now displays 2022-03-05 19:21:54 +00:00
Gwilym Kuiper b2c16f754b Add some room to breathe 2022-03-05 19:21:54 +00:00
Gwilym Kuiper effaac3885 hopefully enough to actually maybe display something? 2022-03-05 19:21:54 +00:00
Gwilym Kuiper 5ea6eb0f1d Complete re-do of tile storage management in backgrounds 2022-03-05 19:21:54 +00:00
Gwilym Kuiper 6690538781 Some inlines in SoundChannel which weren't being inlined for some reason 2022-03-05 18:51:17 +00:00
GBA bot 03dfaf9d5f Update lockfiles 2022-03-01 20:07:25 +00:00
GBA bot 84ee900e18 Update lockfiles 2022-02-24 20:50:57 +00:00
GBA bot 5a7efa660a Update lockfiles 2022-02-24 20:37:17 +00:00
Corwin Kuiper 1c5978e806 update lock files 2022-01-22 13:11:06 +00:00
Gwilym Kuiper 0744027b39 Update lockfiles 2022-01-20 23:00:53 +00:00
Corwin 5a861e7d48
Merge pull request #161 from corwinkuiper/alloc-better
Improving allocator
2022-01-20 22:53:35 +00:00
Gwilym Kuiper 5f753d791a Fix the entry link and the syntax 2022-01-20 22:34:30 +00:00
Corwin Kuiper 970b38e7da module level docs and test cfg 2022-01-20 22:28:52 +00:00
Corwin Kuiper f7693f553c pad the either layout to align 2022-01-20 22:20:54 +00:00
Corwin Kuiper fc6acda14d add some explanatory comments 2022-01-20 22:20:17 +00:00
Corwin Kuiper 08e07a0d37 merge multiple blocks 2022-01-20 19:06:48 +00:00
Corwin Kuiper 1614e46c4e move test runner to own module 2022-01-18 19:49:07 +00:00
Corwin Kuiper e75adf9e67 check no blocks are leaked during testing 2022-01-18 19:33:25 +00:00
Corwin Kuiper 49c8720c8c A nice allocator!! Merges blocks together 2022-01-18 19:32:22 +00:00
Corwin Kuiper 03e9517215 only use critical section once 2022-01-17 21:46:14 +00:00
Corwin Kuiper 17de9a42bd use bare_metal mutex 2022-01-17 21:44:25 +00:00
Gwilym Kuiper a9e728a037
Merge pull request #160 from gwilymk/make-agb-entry-create-gba-struct
Make agb entry create gba struct
2022-01-17 19:47:44 +00:00
Gwilym Kuiper 3366bfbfdf Remove siphasher by using DefaultHasher::new instead 2022-01-16 22:10:57 +00:00
Gwilym Kuiper 6d8d72077f Make it harder to call by accident 2022-01-16 21:50:18 +00:00
Gwilym Kuiper 040ff2eb0c Update the rust doc 2022-01-16 21:48:45 +00:00
Gwilym Kuiper cf9ea504f6 Update agb tests and all the examples 2022-01-16 21:38:30 +00:00
Gwilym Kuiper 17867da596
Merge pull request #155 from agbrs/renovate/syn-1.x
Update Rust crate syn to 1.0.85
2022-01-12 23:18:16 +00:00
Gwilym Kuiper d44e0fc796 Update lockfiles 2022-01-12 23:05:02 +00:00
Gwilym Kuiper 19f071fd5a Use agb::fixnum rather than agb::number 2022-01-12 22:09:57 +00:00
Corwin Kuiper 5b7e1a760d split to own crate 2022-01-07 16:59:19 +00:00
Corwin Kuiper 3bb3dcf1b6 allow the remaining warnings from clippy 2022-01-06 19:50:35 +00:00
Corwin Kuiper e5efdcd29c move use to inside function 2022-01-06 19:48:44 +00:00
Corwin Kuiper 222efe9122 move tests to conditionally compiled modules
also only enable custom test framework feature in test mode
2022-01-06 19:47:30 +00:00
Corwin 039bc0acb1
Merge pull request #153 from corwinkuiper/remove-step
remove the step feature
2022-01-04 00:42:33 +00:00
Corwin Kuiper 0e55916865 add test 2022-01-04 00:31:27 +00:00
GBA bot 60e78768a4 You don't need extern crate agb; any more 2022-01-04 00:16:25 +00:00
Corwin Kuiper 6d829bd741 remove the step by feature
should have test to make sure it does what I want it to do
2022-01-04 00:10:51 +00:00
Gwilym Kuiper e601cc53ca
Merge pull request #151 from gwilymk/remove-feature-asm-now-that-it-is-stable
Remove feature(asm) now that it is stable
2022-01-03 23:53:10 +00:00
GBA bot 234db0da96 Set waitstate to 0x4317 as is standard in most games 2022-01-03 23:27:31 +00:00
GBA bot 8afc57c158 Remove feature(asm) now that it is stable 2022-01-03 23:02:26 +00:00
Corwin 311c26caad
Merge pull request #149 from gwilymk/pong-book
First 3 chapters on writing a pong game
2022-01-03 23:01:34 +00:00
GBA bot f62501a748 Update the examples to correctly use the new API 2022-01-02 21:48:05 +00:00
GBA bot 6277eaeaee Split vblank() into frame() and after_vblank() 2022-01-02 21:47:08 +00:00
GBA bot 8d13ee3a39 Add some blank lines to make code folding work better 2022-01-02 18:28:31 +00:00
GBA bot 99146ac048 Add doc comments for top level modules 2022-01-02 18:27:23 +00:00
GBA bot 0b986df563 Doc hide test runner stuff 2022-01-02 18:25:44 +00:00
GBA bot d4daf8bf0a Add docs for entry macro 2022-01-02 18:22:13 +00:00
GBA bot 02939041b4 Use the entry macro for the test main 2022-01-02 18:14:37 +00:00
GBA bot af40d48360 Add section on loading graphics and document the include_gfx! macro 2022-01-02 18:11:36 +00:00
GBA bot a39d5cfd69 Add some more documentation 2022-01-02 11:27:26 +00:00
GBA bot b5ff4991fa Use builder style for ObjectStandard 2022-01-02 11:14:18 +00:00
GBA bot 618929939f Document the Gba struct 2022-01-01 23:15:14 +00:00
GBA bot 3a8ec51ce1 Make Cargo.lock consistent with Cargo.toml 2022-01-01 22:21:58 +00:00
Renovate Bot 2e042d87c9
Update Rust crate bitflags to 1.3 2022-01-01 21:08:27 +00:00
GBA bot fa88bc40c6 Add another missing must_use 2022-01-01 11:35:49 +00:00
GBA bot 5f13c69fcf Replace .map.flatten with .flat_map 2022-01-01 11:35:17 +00:00
GBA bot afe69b98b8 Add a bunch of must_use now requested by clippy 2022-01-01 11:34:43 +00:00
GBA bot 21c934623d Import the new asm macro required in newer versions of nightly 2022-01-01 11:20:30 +00:00
Corwin Kuiper 38703c7cb8 add different implementation of sqrt 2021-12-06 23:31:42 +00:00
Corwin Kuiper 3800be4dcb test for accuracy of magnitude function 2021-12-06 22:51:43 +00:00
Corwin Kuiper affa27c8e0 remove unused crate 2021-12-06 22:43:58 +00:00
Corwin Kuiper 9a25274bb0 switched the magnitude function to use the alpha max + beta min algorithm 2021-12-06 19:49:27 +00:00
Corwin Kuiper b347f9338e actually test base B in test base 2021-12-04 13:52:47 +00:00
Corwin 453e098703
Merge pull request #135 from corwinkuiper/number-macro
create a number macro that can use floating point numbes
2021-12-04 03:11:26 +00:00
Corwin Kuiper ecd04190fa remove unused stuff 2021-12-04 02:57:51 +00:00
Corwin Kuiper 6e0cbbe9eb create a number macro that can use floating point numbes 2021-12-04 02:44:57 +00:00
Gwilym Kuiper 69e3c299ca Fix clippy lint 2021-11-22 19:33:09 +00:00
Gwilym Kuiper a331909370 Assert that gba struct is zero sized 2021-11-22 19:28:58 +00:00
Gwilym Kuiper 75bd475f08 Split out to a timer controller to keep the GBA struct zero sized 2021-11-22 19:27:08 +00:00
Gwilym Kuiper f7a10677dd Allow use of timer again after mixer is done 2021-11-22 19:14:51 +00:00
Gwilym Kuiper bfc02e0aa8 Make sound now take the first class timer object 2021-11-18 22:28:26 +00:00
Gwilym Kuiper 8876c47aa9 Remove the generics (sorry that GBA is no longer zero sized...) 2021-11-18 22:28:26 +00:00
Gwilym Kuiper 8ef46279c8 set overflow amount should take a mut self 2021-11-18 22:28:26 +00:00
Gwilym Kuiper 20511843ca Move timers to be fields in the controller 2021-11-18 22:28:26 +00:00
Gwilym Kuiper fd610d8cc1 Add support for timers 2021-11-18 22:28:26 +00:00
Corwin b88cf39a67
Merge pull request #130 from gwilymk/fix-printing-of-negative-numbers
Fix printing of negative numbers
2021-11-18 22:16:34 +00:00
Corwin Kuiper 8143d43149 fix clippy lint 2021-11-18 21:30:35 +00:00
Gwilym Kuiper e1e4318c38 Add comment explaining how the fiddle works 2021-11-18 21:11:29 +00:00
Gwilym Kuiper 89f89803dd GREEN: Fudge fractional and integral bits to get negative numbers to work 2021-11-18 21:05:29 +00:00
Gwilym Kuiper 413a819e64 Fix compiler warning for tests 2021-11-18 20:57:18 +00:00
Gwilym Kuiper 2eec47f31a RED: Add failing tests for negative number printing 2021-11-18 20:57:18 +00:00
Corwin Kuiper 7ba84b7691 add registers to sqrt clobber list
will need to go through the other syscalls and find out whether we need
to add registers to the clobber list. We probably need to add all per
the call convention (r0, r1, r2, r3 are callee saved).
2021-10-31 20:14:41 +00:00
Gwilym Kuiper 5c10af2f72 Add methods for getting and setting a palette colour 2021-10-30 21:16:40 +01:00
Gwilym Kuiper a92a2f503c Reduce maximum number of sound channels to 8 2021-10-30 21:16:32 +01:00
Corwin Kuiper 301e2c115a fix tile ids 2021-10-30 20:33:54 +01:00
Corwin Kuiper d0808cb7f2 added helpful functions 2021-10-30 18:38:57 +01:00
Gwilym Kuiper 6ed9b06b22 Ensure that the buffer size isn't actually the first instruction in add 2021-10-30 16:02:40 +01:00
Gwilym Kuiper 6ac3789d11 Export ChannelId 2021-10-30 15:38:59 +01:00
Corwin Kuiper b492f3d43d fix rect issue with touching 2021-10-30 12:24:43 +01:00
Corwin Kuiper be44dbed3d add useful derives 2021-10-30 10:12:45 +01:00
Corwin Kuiper 2838ea5f32 add more maths 2021-10-29 18:34:42 +01:00
Gwilym Kuiper c6e7827e34 Add support for 18157Hz 2021-10-29 15:51:05 +01:00
Gwilym Kuiper 26620e850e Have the constants only in one place 2021-10-29 15:51:05 +01:00
Gwilym Kuiper 46b40c8e5b channel.data.len() = 2 * channel.pos 2021-10-29 14:29:22 +01:00
Gwilym Kuiper 5266e7a40c Release agb v0.8.0 2021-10-28 22:28:45 +01:00
Gwilym Kuiper c49952eff9 Reduce the length of the examples 2021-10-28 22:27:08 +01:00
Gwilym Kuiper 0a68eee3f9 Remove unused field 2021-10-28 21:48:22 +01:00
Gwilym Kuiper e3a35a2eda Release agb-sound-converter v0.1.0 2021-10-28 21:39:33 +01:00
Corwin 2391acb68d
Merge pull request #116 from corwinkuiper/nice-objects
Sane Objects!
2021-10-27 18:32:08 +01:00
Corwin b7734726a6
Merge pull request #123 from gwilymk/stereo-sound
Stereo sound
2021-10-27 18:30:37 +01:00
Corwin 3f310b70a2
Merge pull request #119 from corwinkuiper/partial-backgrounds
possible iter for backgrounds
2021-10-27 18:30:25 +01:00
Gwilym Kuiper 1d38b75289 Reduce stereo mixing by 1 instruction 2021-10-26 23:09:50 +01:00
Gwilym Kuiper 9524b4b3c3 Loads of comments to explain what all the steps are doing 2021-10-26 22:25:35 +01:00
Gwilym Kuiper 050ee184b0 Add stereo sound example 2021-10-26 22:14:46 +01:00
Gwilym Kuiper 5bd656d8cb Add support for stereo sound 2021-10-26 22:14:34 +01:00
Corwin Kuiper ec0d4431ad allow direct access to screen 2021-10-24 20:41:21 +01:00
Corwin Kuiper f2c4354c1b reduce to a byte array 2021-10-23 17:15:57 +01:00
Corwin Kuiper 713791b3fe satisfy linter 2021-10-23 17:15:57 +01:00
Corwin Kuiper 8d0c50b37a affines are referenced counted with the new RC arena(ish) implementation 2021-10-23 17:15:53 +01:00
Gwilym Kuiper 4f0b01b932 Add option to mark sound as stereo 2021-10-18 21:22:36 +01:00
Gwilym Kuiper e92383e29c
Merge pull request #121 from gwilymk/agb-sound-converter
Agb sound converter
2021-10-18 21:19:31 +01:00
Gwilym Kuiper eb26a21629 Attempt to make it so that the sound converter doesn't create too many tokens 2021-10-17 23:22:36 +01:00
Gwilym Kuiper 66e201ae39 Update example to use the new macro 2021-10-17 22:38:19 +01:00
Corwin Kuiper d22e46f7e3 resolve some clippy lints 2021-10-17 22:08:33 +01:00
Corwin Kuiper 1541d514c9 possible iter for backgrounds 2021-10-17 21:59:57 +01:00
Gwilym Kuiper 6f804d884b Release agb v0.7.0 2021-10-04 23:43:18 +01:00
Gwilym Kuiper cc62ef72a7 Release agb-macros v0.1.0 2021-10-04 21:02:52 +01:00
Corwin Kuiper df98f58c0e fix clippy lints 2021-10-04 20:56:28 +01:00
Gwilym Kuiper 94309a2518
Merge pull request #113 from gwilymk/add-test-for-rust-bug
Add test that data_end is in the correct place
2021-10-04 20:38:54 +01:00