Skip to content

Commit

Permalink
Implement a basic settings menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Hydr8gon committed Dec 11, 2024
1 parent 63fa248 commit aa72ea0
Show file tree
Hide file tree
Showing 9 changed files with 788 additions and 243 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ Alternatively, some flashcarts support loading ROMs directly with a supplied emu
`.smc` format to work this way; `rom-converter.py` can optionally convert input ROMs for this.

### Controls
| **N64** | **SNES** |
|:---------:|:---------------------:|
| C-Buttons | ABXY |
| D-Pad | D-Pad |
| L/R | L/R |
| A/B | Start/Select |
| Start | Toggle FPS Counter |
| Z | Toggle Layer Priority |
| **N64** | **SNES** |
|:---------:|:------------:|
| C-Buttons | ABXY |
| D-Pad | D-Pad |
| L/R | L/R |
| A/B | Start/Select |
| Start | Settings |

### Contributing
This is a personal project, and I've decided to not review or accept pull requests for it. If you want to help, you can
Expand Down
5 changes: 0 additions & 5 deletions src/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@
// Maximum opcode bytes that can be compiled in an APU JIT block
#define BLOCK_SIZE 16

// Values that control the cooldown between frame sections
#define SECTION_SHIFT 1
#define SECTION_MIN 8
#define SECTION_INC 1

// The frame section data structure's size in bytes
#define SECTION_SIZE 0x40

Expand Down
10 changes: 6 additions & 4 deletions src/dsp.S
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ timer_rates: // Lookup table for timer rates and offsets

.align 5
dsp_sample:
// Check if audio is enabled and schedule the next sample
lbu t0, audio_set
beqz t0, apu_execute
addi a3, a3, -DSP_SAMPLE

// Decrement the global timer once per sample
lhu t0, dsp_timer
bnez t0, not_zero
Expand Down Expand Up @@ -217,12 +222,9 @@ write_sample: // t4: left, t5: right
andi t0, a0, 0x1FFF
sh t0, dsp_pointer

// Schedule the next sample and check if a buffer is ready
// Submit a buffer to the AI when one is ready
andi t0, a0, 0xFFF
bnez t0, apu_execute
addi a3, a3, -DSP_SAMPLE

// Submit a buffer to the AI when one is ready
lui t0, 0xA450 // AI register upper address
la t1, dsp_buffer - 0x1000
add t1, t1, a0 // Buffer address
Expand Down
Loading

0 comments on commit aa72ea0

Please sign in to comment.