X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=picodrive.git;a=blobdiff_plain;f=pico%2Fsound%2Fym2612.h;h=73a36a842eb854c7abaff796a2a256ddd129c641;hp=f5e98a05786508e859bf3650d5a803613fb91e31;hb=6d28fb5023d53282209ade40fdd30f46905aacbf;hpb=1cfc5cc4ce06642b9bc45ca3b9d32793718e9455 diff --git a/pico/sound/ym2612.h b/pico/sound/ym2612.h index f5e98a0..73a36a8 100644 --- a/pico/sound/ym2612.h +++ b/pico/sound/ym2612.h @@ -43,10 +43,16 @@ typedef struct INT16 volume; /* #0x1a envelope counter | need_save */ UINT32 sl; /* #0x1c sustain level:sl_table[SL] */ - UINT32 eg_pack_ar; /* #0x20 (attack state) */ - UINT32 eg_pack_d1r; /* #0x24 (decay state) */ - UINT32 eg_pack_d2r; /* #0x28 (sustain state) */ - UINT32 eg_pack_rr; /* #0x2c (release state) */ + /* asm relies on this order: */ + union { + struct { + UINT32 eg_pack_rr; /* #0x20 1 (release state) */ + UINT32 eg_pack_d2r; /* #0x24 2 (sustain state) */ + UINT32 eg_pack_d1r; /* #0x28 3 (decay state) */ + UINT32 eg_pack_ar; /* #0x2c 4 (attack state) */ + }; + UINT32 eg_pack[4]; + }; } FM_SLOT;