Log In  
Follow
eruonna

Cart #13375 | 2015-08-31 | Code ▽ | Embed ▽ | No License
11

Working on a pool game. Also includes Loop.

Added zoomed out mode to pool. Press button 2 to toggle zoom. Also added a check so that any ball that makes it outside the bounds of the table is considered to have gone in a pocket (because I think the most likely way to achieve that is by bouncing through a pocket in some strange way).

Cart #13350 | 2015-08-30 | Code ▽ | Embed ▽ | No License
11

11
16 comments



I didn't see this documented anywhere, and I had to work it out for my drumbeat cart, so I thought I'd save everyone else the trouble and publish what I know.

SFX:

A sound effect is stored in 68 bytes. Sfx 0 starts at address 0x3200, sfx 1 at address 0x3244, and so on.

The first 64 bytes (offset 0..63) store the 32 notes of the sound effect as described below.

Offset 64 is a byte that determines the editor mode: 0 for graph mode, nonzero for tracker mode. This has no effect on playback, just on the mode opened in the editor by default.

Offset 65 stores the playback speed. (Higher values correspond to slower playback, so "speed" isn't exactly the right name, but that is what is used in the editor.)

Offsets 66 and 67 store the loop begin and loop end times. A sound effect contains only 32 notes, but these times may be set to any byte value. All times past 32 simply play silence.

Note format:

A note is stored in 16 bits, two bytes little-endian.

Bits 0..5 store the pitch, ranging from 0 (C in octave 0) to 63 (D# in octave 5). The tracker mode editor can only enter pitches up to 60 (C 5), but it can display and play higher pitches.

Bits 6..8 store the instrument; the values are the same as in the tracker mode editor.

Bits 9..11 store the volume. Volume 0 corresponds to silence.

Bits 12..14 store the effect; the values are the same as in the tracker mode editor.

Bit 15 appears to be unused.

[b]Example code:

[ Continue Reading.. ]

62
25 comments



Cart #12907 | 2015-08-23 | Code ▽ | Embed ▽ | No License
5

Generate some random drum beats. Press Z for a new one. They are saved as sfx 0 on the cart, in case you get one you want to use somewhere else. Based on ideas from this.

I hope to add more complex and longer beats.

Added a menu with some different generation algorithms. Mutating creates a beat that changes a little at regular intervals. Sometimes it uses some non-percussive sounds, which is a bug, but I have not been able to track down the cause.

Cart #12872 | 2015-08-22 | Code ▽ | Embed ▽ | No License
5

5
1 comment