Gwilym Kuiper
068bc95fe7
Fix warning with non-constant string
2022-03-05 19:35:19 +00:00
Gwilym Kuiper
a3e5187457
Use DMA to copy the entire internal map in one go
2022-03-05 19:35:07 +00:00
Gwilym Kuiper
7b43debd3e
WIP: Try removing the hashmap
2022-03-05 19:25:55 +00:00
Gwilym Kuiper
aa7823232b
Try using a vec of vecs rather than a hashmap
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
ceb17a0186
Update hat chooses wizard and purple night
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
22c6e37c88
Finally extract InfiniteScrolledMap
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
6b492c5956
Extract more to new files
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
78fb706c9a
Extract map to its own file
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
e88602b570
Get my brackets correct
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
a35119fdbd
Fix hat chooses the wizard
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
742231fbc5
Try a different transparent tile then 0
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
ed2af0d57e
Extract VRamManager to the tiled
module
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
f1bc09d6cd
Avoid crackle on load
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
d896adfad5
Clear the backgrounds once they aren't used any more
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
de594ad362
Make init
take an impl Fn
rather than a Box<dyn Fn()>
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
3a913f142a
Remove pop while loading a level
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
b0b8ec55c4
Remove unused TILE_BACKGROUND
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
63dd837518
Tiny performance improvement with dma to copy the tile data
2022-03-05 19:25:09 +00:00
Gwilym Kuiper
08aeb56f1e
Update background and foreground independentently
2022-03-05 19:25:06 +00:00
Gwilym Kuiper
3941117aa7
Switch to rustc-hash
2022-03-05 19:24:28 +00:00
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
Corwin
3e94bd27ee
Merge pull request #101 from corwinkuiper/sane-backgrounds
...
Sane backgrounds
2021-10-04 20:34:12 +01:00
Gwilym Kuiper
a31efe7156
Add test that data_end is in the correct place
2021-10-04 20:15:34 +01:00
Gwilym Kuiper
25cca44b6b
Cargo fmt
2021-10-03 23:26:02 +01:00
Gwilym Kuiper
871d90c889
Special case mixer without multiplication
2021-10-03 23:00:43 +01:00
Corwin Kuiper
9192722f5a
fix build
2021-09-19 20:56:36 +01:00
Corwin Kuiper
f7c2118a40
start work on separating out background sizes
2021-09-19 20:17:50 +01:00
Corwin Kuiper
1ae3c34877
begin work on affine regular compatability
2021-08-28 23:02:35 +01:00
Corwin Kuiper
3d269c98fd
split blocks
2021-08-21 12:56:15 +01:00
Corwin Kuiper
63d880f083
no point checking if null and returning null
2021-08-21 12:03:30 +01:00
Corwin Kuiper
6523a3c6b8
free list allocator
2021-08-21 11:07:53 +01:00
Corwin
e5f331587f
Merge pull request #108 from gwilymk/simple-alloc-implementation
...
Simple alloc implementation
2021-08-18 00:04:40 +01:00
Gwilym Kuiper
6d11302725
Fix clippy lint in the allocator
2021-08-16 23:40:16 +01:00
Gwilym Kuiper
bec0cc6055
Make alloc an optional default feature
2021-08-16 23:32:31 +01:00
Gwilym Kuiper
469db77437
Add allocation example
2021-08-16 23:28:33 +01:00
Gwilym Kuiper
22189eb809
Add some more allocation tests
2021-08-16 23:20:51 +01:00
Gwilym Kuiper
b30cc7715c
Add really simple block reuse
2021-08-16 22:55:02 +01:00
Gwilym Kuiper
e80ad601a3
Extract current alloc to a new_block function
2021-08-16 22:33:56 +01:00
Gwilym Kuiper
d372ca74bf
Use the block allocator by default now
2021-08-16 22:31:10 +01:00
Gwilym Kuiper
4b9e4ce42a
Move tests to agb_alloc mod.rs
2021-08-16 22:28:41 +01:00
Gwilym Kuiper
7425e9973d
Add a really basic block allocator
2021-08-16 22:25:08 +01:00
Gwilym Kuiper
f2ce19c356
Switch to non-null
2021-08-16 22:24:32 +01:00
Gwilym Kuiper
a7a1cb3ecd
use super::*;
2021-08-16 21:20:52 +01:00
Gwilym Kuiper
c8ac436b84
Use constants rather than hard coded stuff
2021-08-16 21:20:29 +01:00
Gwilym Kuiper
81e9789272
Correctly handle OOM
2021-08-16 21:19:51 +01:00
Gwilym Kuiper
94d5a71007
Split out bump_allocator
2021-08-16 21:14:28 +01:00
Gwilym Kuiper
8a0cb86eda
Assert that it is actually in ewram
2021-08-16 21:11:40 +01:00
Gwilym Kuiper
cd4718f8c5
Remove the need for this to be mut and write it in a more 'rusty' way
2021-08-16 21:08:39 +01:00
Gwilym Kuiper
22c6efa5fa
Have a new() method
2021-08-16 21:07:25 +01:00
Gwilym Kuiper
2bacbf35dc
Extern definition can be made smaller
2021-08-16 21:04:37 +01:00
Gwilym Kuiper
7062610aba
Start a basic allocator with a super simple test
2021-08-16 21:02:55 +01:00
Gwilym Kuiper
1c07268f11
Include alloc
2021-08-16 21:02:36 +01:00
Gwilym Kuiper
a500c9dbb1
Make mutex new constant and reduce unsafe block size
2021-08-16 21:02:03 +01:00
Corwin Kuiper
87705514a7
Merge branch 'master' of github.com:agbrs/agb into affine-double-warning
2021-08-16 19:31:07 +01:00
Corwin Kuiper
4d45ca4203
remove warning
2021-08-16 19:31:04 +01:00
Corwin Kuiper
fe9461e5c5
redraw everything if there is no overlap
2021-08-15 23:40:57 +01:00
Corwin Kuiper
631bf2bae2
add collision function
2021-08-15 23:40:25 +01:00
Gwilym Kuiper
1b40fe2b03
Merge pull request #106 from gwilymk/half-multiplications-in-sound-mixing
...
Halve the number multiplications in sound mixing
2021-08-15 23:36:21 +01:00
Gwilym Kuiper
5d255fddea
Add asm_include.s to the rerun-if-changed in build.rs
2021-08-15 23:27:39 +01:00
Gwilym Kuiper
dffd57204c
Remove trailing space
2021-08-15 23:04:02 +01:00
Gwilym Kuiper
a2f0c43f26
Reduce the number of registers stored and used
2021-08-15 23:00:17 +01:00
Gwilym Kuiper
1be6dfbf36
Unwind loop 4 times
2021-08-15 22:36:32 +01:00
Gwilym Kuiper
0c48975fa0
Do 2 mulitplications at once
2021-08-15 22:18:02 +01:00
Gwilym Kuiper
a2da434013
Rename the directory
2021-08-15 20:39:17 +01:00
Gwilym Kuiper
4a6ef023f5
Rename agb-entry to agb-macro in cargo.tomls
2021-08-15 20:37:36 +01:00
Corwin Kuiper
2974711a38
update more
2021-08-08 00:01:58 +01:00
Corwin Kuiper
7708ccc4e1
remove unused import
2021-08-07 23:51:07 +01:00
Corwin Kuiper
36c6ab1914
correct the commit routine
2021-08-07 23:50:28 +01:00
Corwin Kuiper
0ccde7d328
satisfy linter
2021-08-07 18:41:28 +01:00
Corwin Kuiper
724147ecfa
commit step required now
2021-08-07 18:20:08 +01:00
Corwin Kuiper
7798f4c95f
nicer way of using mutable backing storages
2021-08-07 18:15:46 +01:00
Corwin Kuiper
d6b388e1d6
simplify the generics
2021-08-07 18:14:41 +01:00
Corwin Kuiper
6652bdbd70
make to generics
2021-08-07 18:14:05 +01:00
Corwin Kuiper
e176e986ad
part way implementation of background
2021-08-07 18:14:02 +01:00
Corwin Kuiper
f9014a0bf9
started work on new background implementation
2021-08-07 18:12:49 +01:00
Gwilym Kuiper
503b7262ca
May as well call this version 0.1
2021-08-07 16:45:08 +01:00
Gwilym Kuiper
739f81dd30
rename agb-entrypoint to agb-entry
2021-08-07 16:40:09 +01:00
Gwilym Kuiper
861ecc626a
Use the new entrypoint macro in all the examples
2021-08-07 16:37:32 +01:00
Gwilym Kuiper
d2a4d0d1c3
Export the new macro in agb
2021-08-07 16:33:17 +01:00
Gwilym Kuiper
c59f063b2b
Rename crate with an _ to be consistent with the image converter
2021-08-07 16:33:17 +01:00
Corwin Kuiper
ff51341679
print in interrupt
2021-08-07 14:16:41 +01:00
Corwin Kuiper
477b0465fb
add docs for vblank interrupt
2021-08-07 14:14:06 +01:00
Corwin Kuiper
fa250cee60
remove allow warning
2021-08-07 14:14:06 +01:00
Corwin Kuiper
b559b0eb54
add some docs
2021-08-07 14:14:06 +01:00
Corwin Kuiper
c60eaaaff0
doesn't need to be public
2021-08-07 14:14:06 +01:00
Corwin Kuiper
5093884612
move enable and disable to impl
2021-08-07 14:14:06 +01:00
Corwin Kuiper
476b030b41
rename wait for vblank functions
2021-08-07 14:14:06 +01:00
Corwin Kuiper
99f992353a
fix wave example
2021-08-07 14:14:06 +01:00
Corwin Kuiper
da6ff40a32
add docs
2021-08-07 14:14:06 +01:00
Corwin Kuiper
1b971b8993
add lock with key
2021-08-07 14:14:06 +01:00
Corwin Kuiper
00a5b2487c
change to using extern in linker
2021-08-07 14:14:06 +01:00
Corwin Kuiper
013522f642
setting lto to thin works?
2021-08-07 14:14:06 +01:00
Corwin Kuiper
4467d0cf18
fix incorrect label from rebase
2021-08-07 14:14:06 +01:00
Corwin Kuiper
3b26c0b262
acknowledge requests after handling them
2021-08-07 14:14:06 +01:00
Corwin Kuiper
7b46bc9703
change name to "get"
2021-08-07 14:14:04 +01:00
Corwin Kuiper
37c29b7ec3
should enable interrupts by writing a 1
2021-08-07 14:13:23 +01:00
Corwin Kuiper
47f8ee5b70
satisfy linter
2021-08-07 14:13:20 +01:00
Corwin Kuiper
f8fb6ba7b4
change implementation of vblank to use new interrupt handler
...
also fixes all examples
2021-08-07 14:12:00 +01:00
Corwin Kuiper
7b05da4783
change name of interrupt handler
...
it is no longer simple
2021-08-07 14:12:00 +01:00
Corwin Kuiper
007d4d3ff8
handler does not need to be public to be exposed
2021-08-07 14:12:00 +01:00
Corwin Kuiper
f1a2b76d28
arm is callee save
2021-08-07 14:12:00 +01:00
Corwin Kuiper
e22564a29c
disable interrupts during handler
2021-08-07 14:12:00 +01:00
Corwin Kuiper
9bab2a75d0
add macro for much easier interrupt handler adding
2021-08-07 14:12:00 +01:00
Corwin Kuiper
8b8b2b17a2
change to using iter
2021-08-07 14:12:00 +01:00
Corwin Kuiper
1ac33bfbc8
put interrupt handler in iwram, 32 bit bus
2021-08-07 14:12:00 +01:00
Corwin Kuiper
bd1f5f6a5a
store gbatek recommended registers
2021-08-07 14:12:00 +01:00
Corwin Kuiper
ac5fd06106
add test for length of interrupt table
2021-08-07 14:12:00 +01:00
Corwin Kuiper
d607f892e3
change to array for efficient lookup table
2021-08-07 14:12:00 +01:00
Corwin Kuiper
a959e8e06b
don't use register 4
2021-08-07 14:12:00 +01:00
Corwin Kuiper
47b02d29cf
correct which way round locked and unlocked is
2021-08-07 14:12:00 +01:00
Corwin Kuiper
1318e7eca4
ensure mutex is unlocked before locking
2021-08-07 14:12:00 +01:00
Corwin Kuiper
a9aad11dd7
make interrupt system interrupt safe(r)
...
FnMut is not something that can be used in a interrupt safe manner.
Instead use Fn with a Mutex that disables interrupts with a lock.
2021-08-07 14:12:00 +01:00
Corwin Kuiper
a5488fab56
review of documentation suggests that this does nothing
2021-08-07 14:12:00 +01:00
Corwin Kuiper
f54a539296
use better calling convention
2021-08-07 14:12:00 +01:00
Corwin Kuiper
086a4385be
correct comments to accurately reflect what is going on
2021-08-07 14:12:00 +01:00
Corwin Kuiper
466d0844c5
push all registers, as rust may be using them
2021-08-07 14:12:00 +01:00
Corwin Kuiper
597b9370fc
don't disable and reenable interrupts
2021-08-07 14:12:00 +01:00
Corwin Kuiper
b98e6cbb02
add all other interrupts
2021-08-07 14:12:00 +01:00
Corwin Kuiper
30c5a0eea9
export interrupt module
2021-08-07 14:12:00 +01:00
Corwin Kuiper
c2d4c99f66
correct exportation of functions
2021-08-07 14:12:00 +01:00
Corwin Kuiper
2ff9644310
disable interrupts during the interrupt handler
2021-08-07 14:12:00 +01:00
Corwin Kuiper
dacdf51dca
remove unused debug counter
2021-08-07 14:12:00 +01:00
Corwin Kuiper
ebfd637300
satisfy linter by removing elidable lifetime
2021-08-07 14:12:00 +01:00
Corwin Kuiper
2cc0bee7c3
example first version of an interrupt handler implemented with closures
2021-08-07 14:12:00 +01:00
Corwin Kuiper
42647b7373
add println macro for mgba
2021-08-07 13:21:54 +01:00
Gwilym Kuiper
c265a95996
Release agb v0.6.0
2021-08-01 21:50:18 +01:00
Gwilym Kuiper
7229e9012d
Update agb's agb-image-converter to 0.6.0
2021-08-01 21:46:08 +01:00
Gwilym Kuiper
de360f5dbc
Merge pull request #95 from gwilymk/attempt-speedup-mixer-in-asm
...
Speed up the mixer by writing the core loops in ASM
2021-08-01 21:35:07 +01:00
Gwilym Kuiper
ac8e2dfe9d
Go back to the other way of addressing as they aren't equivalent
2021-08-01 21:29:44 +01:00
Gwilym Kuiper
ec65b18fd2
Make the str consistent with the ldr
2021-08-01 21:23:31 +01:00
Gwilym Kuiper
809d3f52ee
update the comment about what's kept between iterations
2021-08-01 21:01:59 +01:00
Gwilym Kuiper
cce3ecdde5
Use r9 rather than lr
2021-08-01 21:00:49 +01:00
Gwilym Kuiper
2db696f8bf
reuse r4
2021-08-01 20:59:01 +01:00
Gwilym Kuiper
18d96e4349
Update comments now I understand what's happening
2021-08-01 20:50:52 +01:00
Gwilym Kuiper
451f38604d
Add an explicit .pool at the end of the mixer
2021-08-01 20:45:57 +01:00
Gwilym Kuiper
d1c312ab79
Remove loads of whitespace
2021-08-01 20:44:37 +01:00
Gwilym Kuiper
09ad082f3f
Furter rearranging for more sense making
2021-08-01 20:41:56 +01:00
Gwilym Kuiper
80e03073fd
Reorder the asm instructions to make better sense
2021-08-01 20:29:45 +01:00
Gwilym Kuiper
1af53aacb4
Done check makes sense to go at the end
2021-08-01 20:23:39 +01:00
Gwilym Kuiper
cc99aad4c5
Move the comments to a nicer place in the file
2021-08-01 20:23:05 +01:00
Gwilym Kuiper
5bc3844a14
Merge pull request #92 from gwilymk/proc-macro-for-agb-image-converter
...
Proc macro for agb image converter
2021-08-01 20:07:17 +01:00
Gwilym Kuiper
9f259fdc0a
Make clippy happy by using .add rather than .offset
2021-07-31 23:18:26 +01:00
Gwilym Kuiper
f1b6b1035b
Reduce mixer_collapse by 1 instruction
2021-07-31 22:01:20 +01:00
Gwilym Kuiper
8cffa4ae3d
Better comparison
2021-07-31 22:00:41 +01:00
Gwilym Kuiper
f5d771d349
Use asm for the tight loops in the sound mixer
2021-07-31 21:47:05 +01:00
Gwilym Kuiper
e3510a73f7
Re-export the image converter macro
2021-07-26 23:42:28 +01:00
Gwilym Kuiper
d7a24d9659
Start switching to the quote crate for generating the code
2021-07-22 19:03:49 +01:00
Gwilym Kuiper
19e0a0527b
Use syn crate rather than litrs
2021-07-22 18:43:27 +01:00
Gwilym Kuiper
21a11a4e41
Run rustfmt on modified files in agb
2021-07-21 22:48:23 +01:00
Gwilym Kuiper
8466e9eaa4
Remove usage of typed_builder
2021-07-21 22:15:46 +01:00
Gwilym Kuiper
8713f514be
Switch to a proc macro for generating the image data
2021-07-21 22:07:29 +01:00
Gwilym Kuiper
53952d8e34
Add support for reading config data from a toml file
2021-07-21 20:59:25 +01:00
Gwilym Kuiper
383c5454ea
Start work for new proc macro by generating a TileData
2021-07-21 20:27:04 +01:00
Gwilym Kuiper
4a9f98e09c
Allow agb-image-converter from the path
2021-07-21 20:26:38 +01:00
Gwilym Kuiper
3468fbb761
Add myself as an author for agb
2021-07-21 19:36:24 +01:00
Corwin
97cbc8c9a6
Merge pull request #90 from gwilymk/multiboot-support
...
Multiboot support
2021-07-19 17:53:01 +01:00
Corwin
b0afeade99
Merge pull request #86 from agbrs/mgba-test-runner-cycles
...
Mgba test runner cycles
2021-07-13 22:30:05 +01:00
Corwin Kuiper
c722c99f9e
set cpu targets for asm and rust
2021-07-13 19:17:08 +01:00
Corwin Kuiper
220ddac280
use different optimisation settings
2021-07-03 22:19:02 +01:00
Corwin Kuiper
744c7a8bb4
get cycles
2021-07-03 22:18:53 +01:00
Corwin Kuiper
e32a086122
Release agb v0.5.0
2021-07-03 15:51:13 +01:00
Gwilym Kuiper
7e3b983e80
Reduce duplication in crt0.s
...
Couldn't move the interrupt setup though :/. Not sure why
2021-06-26 23:00:10 +01:00
Gwilym Kuiper
d2cad77eb9
Add multiboot support
2021-06-26 22:25:27 +01:00
Gwilym Kuiper
0b5d6f7978
Add a method to stop a playing sound
2021-06-25 22:26:00 +01:00
Gwilym Kuiper
bd15a87c4d
Ensure you don't hand over an already done channel
2021-06-25 22:20:18 +01:00
Gwilym Kuiper
025f4f5a91
Fix clippy lints by removing lifetimes
2021-06-25 22:18:40 +01:00
Gwilym Kuiper
90551b0ba1
Calculate the panning differently to ensure left and right ears get same amounts
2021-06-25 22:12:03 +01:00
Gwilym Kuiper
290d546248
Add lowering the volume to the example
2021-06-25 22:01:50 +01:00
Gwilym Kuiper
3c0d881a45
Allow for volume control
2021-06-25 21:57:24 +01:00
Gwilym Kuiper
c81d73f8d5
Don't panic if the song has finished
2021-06-25 21:54:12 +01:00
Gwilym Kuiper
773729de98
Update example to allow you to change where the sound is coming from
2021-06-25 21:53:42 +01:00
Gwilym Kuiper
80ce5173e1
Provide a way to get the channel again
2021-06-25 21:41:35 +01:00
Gwilym Kuiper
27a470c648
Return a way to get back at the channel
2021-06-25 21:38:10 +01:00
Gwilym Kuiper
754abd58bd
Return an indication as to what the sound ID is
2021-06-25 21:31:17 +01:00
Gwilym Kuiper
2409cd5538
Remove .high_priority()
2021-06-25 21:29:37 +01:00
Gwilym Kuiper
45b8480a35
Allow mutation of the SoundChannel
2021-06-25 21:27:46 +01:00
Corwin Kuiper
1b3358345e
fix by showing object
2021-06-24 20:10:05 +01:00
Corwin
e6a1dbae12
Merge pull request #82 from corwinkuiper/renovate/bitflags-1.x
...
Update Rust crate bitflags to 1.2
2021-06-21 01:18:59 +01:00
Renovate Bot
6681897494
Update Rust crate bitflags to 1.2
2021-06-21 00:13:32 +00:00
Renovate Bot
d06b3518fa
Update Rust crate agb_image_converter to 0.4.0
2021-06-21 00:02:36 +00:00
Corwin Kuiper
5a00e735e9
Release agb v0.4.1
2021-06-21 00:00:27 +01:00
Corwin Kuiper
d48eab29a8
Release agb v0.4.0
2021-06-20 23:55:41 +01:00
Gwilym Kuiper
574e91df2f
Add sound priorities
2021-06-20 21:59:34 +01:00
Corwin
53cf1a5064
Merge pull request #67 from gwilymk/more-exciting-mixer
...
More exciting mixer
2021-06-20 21:49:39 +01:00
Gwilym Kuiper
db4233ccee
Rename mixer.rs to sw_mixer.rs
2021-06-20 21:29:44 +01:00
Corwin Kuiper
ece5595d18
bump to 0.3.1
2021-06-20 21:06:57 +01:00
Corwin Kuiper
3546ce9ca4
implement clone and copy
2021-06-20 21:05:50 +01:00
Gwilym Kuiper
057467ecf8
Only do the if statement once per channel rather than once per index
2021-06-18 22:56:49 +01:00
Gwilym Kuiper
ea9441f40b
Don't need to go through archive.org
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
11a74979eb
Fix unaligned write
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
e88eb16c62
Calculate panning correctly
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
d28b885e29
Shouldn't output to the left with channel B
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
898620112b
Reinstate panning
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
bcee6be7df
Fix issues discovered while testing
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
f82ed3d7c1
Keep track of whether a channel is done
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
063af3fc40
Panning working?
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
9b77ab7587
Allow controlling of playback speed
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
5b1f85a619
Make the current position in the audio sample a fix point
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
54e9498886
Add usize implementation for Number
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
a41bb0b89b
Have 2 buffers for left or right control
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
74f2fdbc8b
Tell GBA that we want 2 channels
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
c5d58e83a7
Add ability for DMA2 to do something
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
ffd4f8e773
Extract mixer code to mixer.rs
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
94d15de3f4
Move GBA hardware related stuff to hw.rs
2021-06-18 22:29:31 +01:00
Gwilym Kuiper
5d958d685c
Move mixer to its own folder
2021-06-18 22:29:31 +01:00
Corwin Kuiper
e77152ef1b
better mul and div by integer for fixed num type
2021-06-16 19:14:22 +01:00
Corwin Kuiper
de546984ba
add line for objdump
2021-06-16 19:00:08 +01:00
Corwin Kuiper
517ffd6dee
0.3.0
2021-06-16 14:05:46 +01:00
Corwin Kuiper
1a2e04f4cc
fix tile copier
2021-06-13 15:06:47 +01:00
Corwin Kuiper
760796b1db
fix error in full map drawing
2021-06-13 12:26:16 +01:00
Gwilym Kuiper
100764b38c
Add manhattan distance method
2021-06-12 21:02:31 +01:00
Corwin Kuiper
52a97594fd
fix examples
2021-06-12 20:59:30 +01:00
Corwin Kuiper
4aff120c68
add customisation of default
2021-06-12 20:59:23 +01:00
Corwin Kuiper
9dedf26619
use current pressed buttons when creating new controller
2021-06-12 18:54:45 +01:00
Gwilym Kuiper
76d3f55606
Implement divassign for vector 2d
2021-06-12 15:09:54 +01:00
Corwin Kuiper
da5ed768de
add priority
2021-06-12 13:56:29 +01:00
Corwin Kuiper
6268c607c3
derive ordering and equation
2021-06-12 11:13:49 +01:00
Corwin Kuiper
67e20b1e72
square rooting and magnitudes
2021-06-12 11:13:40 +01:00
Corwin Kuiper
682bbc9a50
change everything to explicitly use u32
2021-06-11 20:47:46 +01:00
Corwin Kuiper
b08e8d24be
from tuple accepts anything that is convertable
2021-06-11 20:38:06 +01:00
Corwin
f57a250c1c
Delete iwillnotletyouletmedown.gba
2021-06-08 20:13:49 +01:00
Corwin Kuiper
8b206ba40c
changed to use rotation directly
...
as was previously written, this would not do anything as integer rotation is an identity.
2021-06-08 19:12:25 +01:00
Corwin Kuiper
a5f4673806
set position with vector
2021-06-08 19:08:45 +01:00
Corwin Kuiper
4f21b40cfc
make multiply and divide more generic
2021-06-08 17:18:44 +01:00
Corwin Kuiper
301a22d93a
add type for making unit vector from angle
2021-06-08 17:10:27 +01:00
Corwin Kuiper
1ac9e54296
fix sin implementation
2021-06-08 17:08:05 +01:00
Corwin Kuiper
81db1b861c
multiplication and division by constant
2021-06-08 16:46:13 +01:00
Corwin Kuiper
0ea0f1df3f
implement base changing
2021-06-08 15:54:25 +01:00
Corwin Kuiper
527729f5ba
I am aware this uses too many arguments, but it's private so I don't care too much
2021-06-08 12:34:24 +01:00
Corwin Kuiper
4aa2a18058
remove unused imports
2021-06-08 12:32:51 +01:00
Corwin Kuiper
9952771bd4
use new tuple implementation
2021-06-08 12:32:23 +01:00
Corwin Kuiper
d6eff37b8a
add from for tuple
2021-06-08 12:31:27 +01:00
Corwin Kuiper
2163a3b490
fix examples
2021-06-08 12:31:20 +01:00
Corwin Kuiper
df954505bf
update tiled functions to use new vector2d
2021-06-08 12:31:06 +01:00
Corwin Kuiper
77f6512ba9
give access to underlying coordinates
2021-06-08 12:25:10 +01:00
Corwin Kuiper
161a429320
should not be public
2021-06-08 12:23:13 +01:00
Corwin Kuiper
0283790185
a vector implementation
2021-06-08 12:22:25 +01:00
Corwin Kuiper
b0329bdcea
fix examples and tests
2021-06-07 13:38:18 +01:00
Corwin Kuiper
c106efa8b9
change to system where drawing must provide the map
2021-06-07 13:38:11 +01:00
Corwin Kuiper
86d5c7ca35
optimise getting reference and allow for updating a specific area
2021-06-06 23:27:40 +01:00
Corwin Kuiper
6b725e90ad
stop using references
2021-06-06 18:30:42 +01:00
Corwin Kuiper
900b594039
use easily optimisable division for truncate
2021-06-06 18:27:15 +01:00
Corwin Kuiper
87bace3584
let user decide whether to use slice or refcell
2021-06-06 16:35:38 +01:00
Corwin
342aac005c
Merge pull request #63 from corwinkuiper/split-object
...
move object out of tiled0
2021-06-06 16:18:18 +01:00
Corwin Kuiper
7e837fc3e8
move object out of tiled0
2021-06-06 15:56:01 +01:00
Gwilym Kuiper
40f7975f46
Loop if requested
2021-06-06 15:48:52 +01:00
Gwilym Kuiper
86ba309377
Add ability to set that a channel should loop
2021-06-06 15:47:57 +01:00
Gwilym Kuiper
0875e640de
Handle sounds of length not exactly a multiple of SOUND_BUFFER_SIZE
2021-06-06 14:48:01 +01:00
Gwilym Kuiper
333797332e
Fix the example after rebase
2021-06-06 14:21:03 +01:00
Gwilym Kuiper
3f3b34c250
Fix clippy warning
2021-06-06 14:17:08 +01:00
Gwilym Kuiper
e181f7a751
Refactor to make it a bit more obvious what the write buffer is
2021-06-06 12:58:31 +01:00
Gwilym Kuiper
106e53f917
Use the new mixer in the example
2021-06-06 12:58:31 +01:00
Gwilym Kuiper
f126c7f4f4
Make SoundChannel public
2021-06-06 12:58:31 +01:00
Gwilym Kuiper
d7a8928955
Add should_loop option
2021-06-06 12:58:31 +01:00
Gwilym Kuiper
46683e42c8
Probably too much in 1 commit
2021-06-06 12:58:31 +01:00
Gwilym Kuiper
72dbf2ef9c
Add simple double buffer
2021-06-06 12:58:31 +01:00
Gwilym Kuiper
334472f749
Add a comment explaining where the frequency and buffer size come from
2021-06-06 12:58:31 +01:00
Gwilym Kuiper
9d1aeea077
Make it easier for the user to provide sound samples
2021-06-06 12:58:31 +01:00
Gwilym Kuiper
df7a72d618
Fix the sound frequency to 10512Hz
2021-06-06 12:58:31 +01:00
Gwilym Kuiper
8d980697bb
Add attribution for the music
2021-06-06 12:58:31 +01:00
Gwilym Kuiper
6ab61b6eb0
Add really basic sound mixer that can play simple tunes
2021-06-06 12:58:31 +01:00
Gwilym Kuiper
c2ba8d835a
Move old sound code to the dmg module
2021-06-06 12:58:30 +01:00
Corwin Kuiper
b0c4a8fd80
satisfy linter
2021-06-06 11:14:50 +01:00
Corwin Kuiper
20c06536e4
clear affine matrix on drop
2021-06-06 11:14:50 +01:00
Corwin Kuiper
006b05ceda
move commit to attributes, similar to object
2021-06-06 11:14:50 +01:00
Corwin Kuiper
a26732e1fa
clear object when dropped
2021-06-06 11:14:50 +01:00
Gwilym Kuiper
13dc368d18
Add basic noise channel support
2021-06-06 10:37:17 +01:00
Gwilym Kuiper
1bb05560cb
Make it so that multiplication doesn't overflow so easily
2021-06-06 00:25:45 +01:00
Gwilym Kuiper
026dad0773
Change base can change between convertable integer types too
2021-06-06 00:25:29 +01:00
Gwilym Kuiper
0b41e9e917
Sweep works backwards
2021-06-05 22:53:51 +01:00
Corwin
aa10a893f4
Merge pull request #54 from corwinkuiper/object-hidden-by-default
...
Object hidden by default
2021-06-05 22:42:20 +01:00
Corwin Kuiper
be963611ce
affine starts at position 9
2021-06-05 22:41:34 +01:00
Corwin Kuiper
4cc7650ddc
objects are hidden by default
...
no need to do it twice
2021-06-05 22:14:47 +01:00
Corwin Kuiper
eb352085f1
have objects be hidden by default
2021-06-05 22:14:08 +01:00
Gwilym Kuiper
3357a4b69d
Put brackets around nine / forty to ensure that we don't divide where we don't have to
2021-06-05 21:58:32 +01:00
Gwilym Kuiper
aa39b2b6ad
Make to_raw take self by value rather than reference
2021-06-05 21:49:36 +01:00
Gwilym Kuiper
54e28f5dd4
Add a Number type for i32
2021-06-05 21:47:04 +01:00
Gwilym Kuiper
174517fbb1
Fix tests
2021-06-05 21:47:04 +01:00
Gwilym Kuiper
508f33facd
Add support for all the integer widths
2021-06-05 21:47:03 +01:00
Gwilym Kuiper
de47dbc5dd
Make number generic on i32
2021-06-05 21:30:02 +01:00
Corwin
ec87adceb2
Merge pull request #52 from corwinkuiper/number-trig
...
implement trig functions
2021-06-05 21:10:38 +01:00
Corwin Kuiper
9176e668a1
implement trig functions
2021-06-05 21:06:21 +01:00
Corwin
1807b0adc6
Merge pull request #51 from corwinkuiper/fix-affine
...
fix index for affine matrix
2021-06-05 20:55:12 +01:00
Corwin Kuiper
36903a0a65
fix index for affine matrix
2021-06-05 20:48:02 +01:00
Gwilym Kuiper
46562e275c
Update test for new interface
2021-06-05 20:31:04 +01:00
Gwilym Kuiper
6ab644cf71
Mark affine matrix input as C and packed
2021-06-05 20:29:16 +01:00
Gwilym Kuiper
e7edaa1a27
Accept more sensible arguments in affine_matrix
2021-06-05 20:29:12 +01:00
Gwilym Kuiper
ceb1b97df8
Use image-converter 0.2.0
2021-06-05 18:13:03 +01:00
Corwin Kuiper
93b0b757bd
make all const functions
2021-06-05 17:53:07 +01:00
Corwin Kuiper
e55ef4d152
add from and to raw
2021-06-05 17:40:41 +01:00
Gwilym Kuiper
363a16ce33
Add implementation of rem_euclid stolen from f32's implementation and add a test
2021-06-05 17:27:00 +01:00
Gwilym Kuiper
cdaef51d76
Add tests for %
2021-06-05 17:23:43 +01:00
Gwilym Kuiper
56cf16def4
Fix int() method to return as-if this was a float
2021-06-05 17:23:28 +01:00
Gwilym Kuiper
8b1ad400a7
Include fix length in debug string
2021-06-05 17:23:06 +01:00
Gwilym Kuiper
8b2dfdffc1
Add proper implementation of debug for Num
2021-06-05 17:22:23 +01:00
Gwilym Kuiper
e78c9abcec
Add basic definition of rem and remassign
2021-06-05 16:53:07 +01:00
Gwilym Kuiper
34981ea3dd
Make change_base function public
2021-06-05 16:35:58 +01:00
Gwilym Kuiper
fe0e9f8196
Add the ability to change the base of a fixnum
2021-06-05 16:34:31 +01:00
Corwin Kuiper
18e017ae73
expose number module
2021-06-05 16:15:43 +01:00
Corwin Kuiper
ec161d9161
fix chicken example
2021-06-05 16:14:48 +01:00
Corwin Kuiper
a39363b6ae
add similar treatment to sprite palettes as background palettes
2021-06-05 16:14:41 +01:00
Corwin
a3874e7140
Merge pull request #41 from gwilymk/improve-fixnum
...
Improve fixnum
2021-06-05 16:08:46 +01:00
Gwilym Kuiper
0099dfa688
Get implementation of AddAssign correct
2021-06-05 15:58:56 +01:00
Gwilym Kuiper
0b8eda336d
Use better trait bounds for numbers
2021-06-05 15:54:50 +01:00
Gwilym Kuiper
1b5a6421fd
Add some more division tests
2021-06-05 15:46:33 +01:00
Gwilym Kuiper
8b2f3f14bb
Use more precise implementations
2021-06-05 15:46:13 +01:00
Corwin Kuiper
2a9788d26f
remove lifetime specifier
2021-06-05 14:41:39 +01:00
Corwin Kuiper
eea0e6d3b3
fix chicken example
2021-06-05 00:27:13 +01:00
Corwin Kuiper
3b9231ef6e
fix coordinates
2021-06-05 00:26:10 +01:00
Corwin Kuiper
225d0aca9f
set 1d mapping
2021-06-05 00:16:44 +01:00
Corwin Kuiper
1d8ac652f1
fix sprite size ordering
2021-06-05 00:16:31 +01:00
Corwin Kuiper
b1ff352623
use lifetimes to prevent affine matrix dropping
2021-06-04 22:39:10 +01:00
Corwin Kuiper
33738c0f93
add test for affine matrix getting
2021-06-04 22:29:27 +01:00
Corwin Kuiper
8867c5c9f1
satisfy linter
2021-06-04 19:43:09 +01:00
Corwin Kuiper
1c779e3c31
fix example
2021-06-04 19:37:45 +01:00
Corwin Kuiper
95407e11f6
add test and fix implementation
2021-06-04 19:37:41 +01:00
Corwin Kuiper
72662cff5a
update documentation
2021-06-04 19:29:21 +01:00
Corwin Kuiper
cd602d69a4
add allocation for objects and matricies
2021-06-04 19:28:43 +01:00
Corwin Kuiper
3cdb966dd9
fix implementation
2021-06-04 19:15:58 +01:00
Corwin Kuiper
a17b37c2b7
add new test
2021-06-04 19:15:25 +01:00
Corwin Kuiper
a7cb7ea7b4
keep track of which objects have been assigned
2021-06-04 18:36:23 +01:00
Corwin Kuiper
9fad597844
fix faulty implementation
2021-06-04 18:36:08 +01:00
Corwin Kuiper
c208b6528a
add tests
2021-06-04 18:35:49 +01:00
Corwin Kuiper
8bf59e0f20
add bitarray implementation
2021-06-04 18:31:28 +01:00
Corwin Kuiper
9286378a36
add sprite sizes
2021-06-04 17:58:06 +01:00
Corwin Kuiper
363e032119
prevent unwanted creation
2021-06-04 11:45:04 +01:00
Corwin Kuiper
91bb5c0774
add helper function for asserting output
2021-06-04 10:42:45 +01:00
Corwin Kuiper
12406fc952
test the test logo
2021-06-04 10:30:25 +01:00
Corwin Kuiper
ba80dbefd1
add documentation for object functions and structs
2021-06-03 19:22:26 +01:00
Corwin Kuiper
b023807bc0
add documentation for submodules
2021-06-03 19:22:16 +01:00
Corwin Kuiper
6eb13473bb
add documentation for submodules
2021-06-03 19:22:08 +01:00
Corwin Kuiper
a98a0d0362
fix warnings
2021-05-31 07:34:09 +01:00
Corwin Kuiper
2b28199570
affine matrix calculation
2021-05-31 07:34:09 +01:00
Corwin Kuiper
100b69a4f3
fix chicken with name change
2021-05-31 07:34:09 +01:00
Corwin Kuiper
eb596decfc
affine object is gettable
2021-05-31 07:34:09 +01:00
Corwin Kuiper
4a74d88530
affine is gettable
2021-05-31 07:34:09 +01:00
Corwin Kuiper
4e10e231a7
expose attributes publically
2021-05-31 07:34:09 +01:00
Corwin Kuiper
fbfdd360db
remember to add affine id to self
2021-05-31 07:34:09 +01:00
Corwin Kuiper
dc4bead590
write affine to oam
2021-05-31 07:34:09 +01:00
Corwin Kuiper
02de6af625
set affine to affine object
2021-05-31 07:34:09 +01:00
Corwin Kuiper
0202c51c77
add affine object
2021-05-31 07:34:09 +01:00
Corwin Kuiper
bade37f363
redo object in terms of set_bits
2021-05-31 07:34:09 +01:00
Corwin Kuiper
5cdcfcc0b3
add set bits function
2021-05-31 07:34:09 +01:00
Corwin Kuiper
353fa23876
update chicken example to match
2021-05-31 07:34:09 +01:00
Corwin Kuiper
7aa213936e
object attributes in terms of three separate parameters
2021-05-31 07:34:09 +01:00
Corwin Kuiper
c3b81a4585
don't touch highest 16 bits
2021-05-31 07:34:09 +01:00
Corwin Kuiper
2c14a8454a
remove unneeded non_exhaustive
2021-05-31 07:34:09 +01:00
Corwin Kuiper
f3c89cea9c
correct spelling
2021-05-31 07:34:09 +01:00
Corwin Kuiper
06210591e9
object attribute for all object modes
2021-05-31 07:34:09 +01:00
Corwin Kuiper
300aafd665
add show / hide implementations
2021-05-31 07:34:09 +01:00
Corwin Kuiper
118b6e9a85
load zeros to correspond to argc and argv
2021-05-29 12:18:34 +01:00
Corwin Kuiper
e0e3cdb403
add explicit version
2021-05-23 06:15:32 +01:00
Corwin Kuiper
537bd69998
bump version to 0.2.0
2021-05-23 06:04:35 +01:00
Corwin Kuiper
5f5cdf5871
add target for docs.rs
2021-05-23 06:03:23 +01:00
Corwin Kuiper
9355ef3cc2
add clippy component
2021-05-23 02:20:32 +01:00
Corwin Kuiper
1a7d31d11a
add rust-toolchain.toml
2021-05-23 02:16:15 +01:00
Corwin Kuiper
c14dd2cd33
change entrypoint signature of all examples
2021-05-22 21:22:44 +01:00
Corwin
5d4565b81e
Merge pull request #26 from corwinkuiper/gdb-debug
...
gdb-debug
2021-05-20 07:35:59 +01:00
Corwin Kuiper
5bf6635153
move launch.json to parent
2021-05-20 07:25:51 +01:00
Corwin Kuiper
6508885193
fix object in opt-level 0
...
not sure why it didn't work before
2021-05-20 07:20:29 +01:00
Corwin Kuiper
f00e9e58ca
add chicken debugger launch.json
2021-05-20 07:20:00 +01:00
Corwin Kuiper
0ba57ea6d0
include debug information in elf
2021-05-20 07:19:38 +01:00
Corwin Kuiper
94a0f87209
build with debug information and zero optimisation
2021-05-20 07:18:54 +01:00
Corwin Kuiper
734a337d07
assemble with debug information
2021-05-20 07:18:33 +01:00
Corwin Kuiper
8b55a63ca9
further satisfy linter
2021-04-28 20:11:36 +01:00
Corwin Kuiper
298fbfb4be
satisfy linter
2021-04-28 20:02:04 +01:00
Corwin Kuiper
b7150722db
remove unused import
2021-04-28 19:32:59 +01:00
Corwin Kuiper
20e588a898
remove unused enum
2021-04-28 19:32:52 +01:00
Corwin Kuiper
d85590bff6
added documentation
2021-04-28 19:32:06 +01:00
Corwin Kuiper
0b2472484f
update chicken example
2021-04-28 03:15:26 +01:00
Corwin Kuiper
f240f60013
use new api for backgrounds
2021-04-28 03:10:10 +01:00
Corwin Kuiper
12e01d6e01
add good map support
2021-04-28 03:09:08 +01:00
Gwilym Kuiper
ba2813f927
Add example for the logo and ensure that it gets included in the library
2021-04-20 22:58:53 +01:00
Gwilym Kuiper
62e0c346c5
End-to-end logo working
2021-04-20 22:52:23 +01:00
Gwilym Kuiper
74544374a5
Add a test logo with a chicken and a whale
2021-04-20 21:56:04 +01:00
Gwilym Kuiper
4daafdec20
Actually output some rust code
2021-04-20 20:41:41 +01:00
Gwilym Kuiper
8fd4186f0f
Move everything to the agb directory
2021-04-19 22:47:43 +01:00